Raku Conference Day 2 on Youtube: www.youtube.com/watch?v=BL9-XdC9WYI 🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 14 August 2022.
00:06 reportable6 left, reportable6 joined 00:50 epony joined 00:59 razetime joined 01:11 razetime left 01:12 razetime joined 01:18 razetime left 01:22 razetime joined 01:24 kjp left 01:30 m_athias left, nine left 01:32 nine joined, m_athias joined
[Coke] github.com/coke/sudoku-helper 02:10
(Had this script for ages, finally put it somewhere)
What do we need to do to make "use experimental :cached; 02:14
" not experimental?
er, rephrasing, to make "is cached" not require the use. 02:15
I see 2 tickets in rakudo/rakudo (#4665 and #4666) - anything else? 02:16
02:26 jgaz joined 02:39 razetime left 02:41 jgaz left 02:42 razetime joined 02:50 razetime left, razetime joined 02:56 Kaiepi joined 03:01 swaggboi left 04:01 irc_user joined 04:04 queddd joined 04:53 queddd left 05:47 razetime left, razetime joined 06:05 razetime left 06:06 razetime joined, reportable6 left 06:08 reportable6 joined 06:23 razetime left 06:24 razetime joined 06:44 razetime left 06:45 razetime joined 06:56 razetime left 06:59 MoC joined 07:07 ioh left 07:14 razetime joined 07:20 irc_user left 07:54 bigdata joined 08:28 eseyman left 08:36 Sgeo left 09:36 quotable6 left, bloatable6 left, notable6 left, reportable6 left, greppable6 left, linkable6 left, shareable6 left, nativecallable6 left, tellable6 left, squashable6 left, bisectable6 left, committable6 left, evalable6 left, sourceable6 left, coverable6 left, squashable6 joined, coverable6 joined 09:37 quotable6 joined, shareable6 joined, greppable6 joined, tellable6 joined 09:38 linkable6 joined, reportable6 joined, evalable6 joined, bloatable6 joined 09:39 nativecallable6 joined, notable6 joined, sourceable6 joined, committable6 joined, bisectable6 joined 10:39 greppable6 left, squashable6 left, sourceable6 left, shareable6 left, bisectable6 left, notable6 left, linkable6 left, tellable6 left, quotable6 left, reportable6 left, coverable6 left, benchable6 left, committable6 left, evalable6 left, unicodable6 left, statisfiable6 left, bloatable6 left, releasable6 left, nativecallable6 left 10:40 bloatable6 joined, squashable6 joined, coverable6 joined, tellable6 joined, quotable6 joined, sourceable6 joined, reportable6 joined, committable6 joined, linkable6 joined, nativecallable6 joined 10:41 benchable6 joined, bisectable6 joined 10:42 shareable6 joined, evalable6 joined, greppable6 joined, unicodable6 joined, releasable6 joined, notable6 joined, statisfiable6 joined 11:42 linkable6 left, nativecallable6 left, squashable6 left, greppable6 left, committable6 left, shareable6 left, quotable6 left, bloatable6 left, sourceable6 left, releasable6 left, unicodable6 left, bisectable6 left, coverable6 left, evalable6 left, benchable6 left, notable6 left, statisfiable6 left, reportable6 left, tellable6 left 11:43 notable6 joined 11:44 shareable6 joined, grondilu joined
grondilu hi all 11:44
11:44 statisfiable6 joined, releasable6 joined, epony left, sourceable6 joined, unicodable6 joined, greppable6 joined
grondilu m: put blob32.new: 2**32 11:44
camelia Stringification of a Blob[uint32] is not done with 'Str'. The 'decode'
method should be used to convert a Blob[uint32] to a Str.
in block <unit> at <tmp> line 1
11:44 bisectable6 joined, coverable6 joined
grondilu m: dd blob32.new: 2**32 11:44
camelia Blob[uint32].new(0)
11:44 benchable6 joined
grondilu m: dd blob64.new: 2**64 11:44
camelia Cannot unbox 65 bit wide bigint into native integer
in block <unit> at <tmp> line 1
11:45 linkable6 joined, quotable6 joined, tellable6 joined, squashable6 joined, evalable6 joined, reportable6 joined
grondilu not sure why blob32 and blob64 would behave differently here 11:45
11:45 bloatable6 joined, committable6 joined, nativecallable6 joined
grondilu m: my uint64 $ = 2**64 11:47
camelia Cannot unbox 65 bit wide bigint into native integer
in block <unit> at <tmp> line 1
grondilu m: my uint32 $ = 2**32 11:48
camelia ( no output )
grondilu :🤔
11:48 bigdata left
grondilu FYI I stumbled upon this when trying to implement SHA-512 11:58
lizmat m: m: my uint64 $ = 2**64 - 1 12:04
camelia ( no output )
lizmat grondilu: 2**64 does *not* fit in a 64 bit uint so the error message is correct 12:05
or one could argue it should just cut off...
thing is, 2**32 *can* be represented as a native int on 64 bit systems, so in that case it's a native int being put into a native int that is not large enough 12:06
m: my uint8 $a = 256; say $a
camelia 0
12:07 reportable6 left 12:08 reportable6 joined
grondilu yeah I guess one could argue on the semantics. I think it should just cut off. 12:09
lizmat thing is, the logic is currently when converting from a bigint into a native int, is to throw if it doesn't fit
2**64 cannot be represented as a native int currently 12:10
hence the error
grondilu yeah but 2**32 can't be represented as a int32 either. It can be represented as a native int, but only because there are natives that are larger. 12:11
lizmat I bet it will give the same error on a 32bit system 12:12
the logic is "can be represented as a native int on this architecture" I guess
grondilu I see.
lizmat I guess we could think about a pragma for cutting off 12:13
or a dynamic variable
the logic for MoarVM is in nqp/MoarVM/src/6model/reprs/P6bigint.c 12:16
grondilu on a related note, it's a bit annowing that algebraic operations on native ints do not remain native ints, even when the result is assigned to a native int variable 12:18
m: my uint64 $ = (my uint64 $ = 2**63) * (my uint64 $ = 2) 12:19
camelia ( no output )
grondilu ah I thought that would die
m: my uint64 $a = 2**63; my uint64 $ = $a + $a
camelia ( no output )
grondilu damn I can't reproduce it 12:20
m: my uint64 $a = 2**63; put my uint64 $ = $a + $a + $a; 12:21
camelia 9223372036854775808
grondilu m: my uint64 $a = 2**63; put .WHAT given my uint64 $ = $a + $a + $a;
camelia Use of uninitialized value of type Int in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.

in block at <tmp> line 1
grondilu m: my uint64 $a = 2**63; put .?WHAT given my uint64 $ = $a + $a + $a;
camelia ===SORRY!=== Error while compiling <tmp>
Cannot use .? on a non-identifier method call
at <tmp>:1
------> my uint64 $a = 2**63; put .?WHAT⏏ given my uint64 $ = $a + $a + $a;
expecting any of:
method arguments
grondilu m: my uint64 $a = 2**63; dd my uint64 $ = $a + $a + $a; 12:22
camelia -9223372036854775808
grondilu 😕
lizmat yup, as long as the compiler can assure something is a native, it will do cut off 12:23
with literal values, it assumes non-native
the exact reasoning I'm not sure about, feels like something that could change in the future 12:24
grondilu hang on 12:25
m: say (my uint64 $ = 5) ~~ uint64 # just checking type setting syntax
camelia False
grondilu ok how do I test if a variable points to a native? 12:26
12:28 euandreh left
lizmat good question... not possible without nqp afaik 12:28
afk for some fresh hot air &
grondilu sha-512 is supposed to be very similar to sha-256, so I thought I would be able to just substitute blob32 to blob64 and so on but apparently that won't work. 12:37
oh well
12:38 grondilu left
nine m: What prevents it from working? 12:56
camelia ===SORRY!=== Error while compiling <tmp>
Bogus postfix
at <tmp>:1
------> What prevents it from working⏏?
expecting any of:
infix
infix stopper
postfix
statement end
statemen…
nine What prevents it from working?
13:09 vasko_ left 13:15 vasko joined, vasko left, vasko joined 13:25 euandreh joined 13:56 vasko left 13:58 vasko joined, vasko left, vasko joined, vasko left 14:01 vasko joined, vasko left, vasko joined 14:10 epony joined 14:14 razetime_ joined, razetime left 14:17 Kaiepi left
guifa grondilu: best you can do is 14:17
tellable6 guifa, I'll pass your message to grondilu
15:00 perlbot left, simcop2387 left 15:16 Kaiepi joined
guifa my int $a = 42; my Int $b = 42; say $a.VAR.WHAT; say $b.VAR.WHAT 15:47
evalable6 (IntLexRef)
(Scalar)
15:49 simcop2387 joined 15:50 perlbot joined
stevied if someone has a moment and is knowledgeable about using NativeCall with Windows API, please have a look at www.perlmonks.org/?node_id=11146662 15:54
[Coke] You'll be better off using stack overflow than perlmonks, IME. 16:11
stevied Already went that route. See comments at stackoverflow.com/questions/735623...8_73562354 16:23
16:34 razetime_ left, razetime joined
hmm, maybe the handle is the hex number found here in this file: metacpan.org/release/CHORNY/Win32A...gistry.pc? 16:37
does that even make sense? I guess I could try it.
16:49 razetime_ joined, razetime left
ugexe `my $program-files-path = shell("echo %ProgramFiles%", :out).out.slurp(:close)` or some such is the quick and easy way 16:50
shell('echo "%ProgramFiles%"'... rather 16:56
16:58 razetime joined, razetime_ left
ugexe PS C:\Users\ugexe\zef\bar> raku -e "say shell(q|echo %ProgramFiles%|, :out).out.slurp(:close)" 16:59
C:\Program Files
stevied yeah, wanted to see if I could learn how to use the API, though. 17:00
oh, and I did figure out how to use the API to get the paths 17:02
so I'm set with that
right now, I'm trying to figure out how to get the subkeys with the api
17:02 razetime left 17:03 razetime joined
ugexe win: fix thread race in uv_cwd() and uv_chdir() (#3708) - github.com/libuv/libuv/commit/4db0...790734e2d3 17:09
hmm hopefully we update libuv soon :)
i guess thats not in a release yet though 17:11
17:11 razetime left
ugexe same with the commit for fixing uv_os_uname to handle Windows 11 17:11
17:11 razetime joined
ugexe there is also a fix to make macOS return kilobytes for rss like all the other OS 17:13
there is a telemetry test that works around that issue
17:15 swaggboi joined 17:27 otpv joined 17:29 otpv left 17:35 razetime left 18:06 reportable6 left 18:09 reportable6 joined 18:57 Sgeo joined 19:28 axmed99 joined
stevied figured out my problem querying the registry. Knowing that the constant's `HKEY_LOCAL_MACHINE ` value is `0x80000002` was indeed the key to figuring this out. stackoverflow.com/a/73594981/1641112 19:43
pats on the back welcome
19:54 axmed99 left 19:55 axmed99 joined 20:29 Sgeo left
leont I thought I made an issue for yesterday's dispatching issue, but apparently I didn't 20:54
And now I may have a new one
21:29 linkable6 left, evalable6 left, linkable6 joined 21:30 evalable6 joined 21:38 discord-raku-bot left, gfldex left 22:28 nebuchadnezzar left 22:45 jmcgnh left 22:52 jmcgnh joined 23:12 a3r0_ left 23:14 discord-raku-bot joined 23:15 gfldex joined 23:20 a3r0 joined
Geth doc: 1de7522804 | (Tom Browder)++ | doc/Language/variables.pod6
Add a practical example of augmenting class IO::Path
23:27
doc: 7e11a94430 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
Merge pull request #4105 from tbrowder/aug-class

Add a practical example of augmenting class IO::Path
linkable6 Link: docs.raku.org/language/variables
23:51 MoC left