🦋 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 6 September 2022. |
|||
00:00
jpn left
00:08
derpydoo left
00:28
MyNetAz left
00:44
lichtkind left
00:53
yewscion joined
00:57
yewscion left
01:16
oodani left
01:17
oodani joined
|
|||
SmokeMachine | Would someone like to proofread a new post? | 01:18 | |
01:18
oodani left
|
|||
SmokeMachine | dev.to/fco/redeventstore-32gh-temp-slug-9138685 | 01:19 | |
01:19
oodani joined
|
|||
SmokeMachine | weekly: dev.to/fco/redeventstore-3o9o | 01:25 | |
notable6 | SmokeMachine, Noted! (weekly) | ||
01:51
yewscion joined
01:56
yewscion left
02:05
LainExperiments left
02:25
yewscion joined
02:26
Aedil joined
02:30
yewscion left
02:35
hulk joined,
kylese left
02:38
silug left
02:39
elvlysh joined
02:59
librasteve_ left
03:04
elvlysh left
03:15
hulk left,
kylese joined
03:16
yewscion joined
03:19
elvlysh joined
03:24
elvlysh left
03:26
yewscion left
03:33
elvlysh joined
03:49
Aedil left
03:57
maylay left
03:59
Aedil joined,
maylay joined
04:12
yewscion joined
04:14
maylay left
04:15
maylay joined
04:21
yewscion left
04:30
kylese left
04:32
kylese joined
04:37
yewscion joined
04:38
ulipink joined,
wayland76 joined
04:39
ulipink left,
wayland left
04:42
yewscion left
04:48
stanrifkin_ joined
04:50
stanrifkin left
04:59
elvlysh left
05:05
MyNetAz joined
05:22
yewscion joined
05:27
yewscion left
05:54
yewscion joined
05:59
yewscion left
06:08
maylay left
06:09
maylay joined
06:22
stanrifkin_ left
06:24
stanrifkin_ joined
06:50
Aedil left
07:11
MyNetAz left,
stanrifkin_ left
07:26
MyNetAz joined
07:32
yewscion joined
07:37
yewscion left
07:53
jpn joined
07:58
jpn left
08:04
yewscion joined
08:06
kylese left
08:08
yewscion left
08:10
kylese joined
08:52
yewscion joined
08:57
yewscion left
08:58
lichtkind joined,
Aedil joined
09:00
dakkar joined,
JimmyZhuo joined
09:31
jpn joined
09:32
euandreh1 joined
09:35
jpn left
09:36
euandreh left,
euandreh1 is now known as euandreh
09:42
sena_kun joined
09:52
jpn joined
09:58
jpn left
10:16
yewscion joined
10:20
jpn joined
10:21
yewscion left
10:25
jpn left
10:26
dakkar left
10:40
yewscion joined
10:41
Sgeo left
10:45
yewscion left
11:05
jpn joined
11:10
jpn left
12:00
yewscion joined
12:04
yewscion left
12:06
jpn joined
12:11
jpn left
12:21
sdomi left
|
|||
librasteve | SmokeMachine: I have proof read your post … looks good to me. | 12:33 | |
12:50
jpn joined
|
|||
melezhik. | . | 12:54 | |
12:55
jpn left
13:07
jpn joined
13:12
jpn left
13:14
kylese left
13:16
kylese joined,
yewscion joined
13:21
yewscion left
13:54
maylay left,
JimmyZhuo left
13:56
maylay joined,
sdomi joined
14:02
yewscion joined
14:08
jpn joined
14:10
yewscion left
14:14
jpn left
14:15
xinming left
14:17
MyNetAz left
|
|||
SmokeMachine | librasteve: thanks | 14:17 | |
melezhik. | Looks good for me either | 14:22 | |
14:29
maylay left
14:31
maylay joined
14:38
maylay left
14:40
maylay joined
14:54
MyNetAz joined
15:01
yewscion joined
15:02
silug joined
15:08
yewscion left
15:09
jpn joined
15:14
jpn left
15:29
maylay left
15:32
maylay joined
|
|||
lizmat | weekly: www.lastdodo.com/en/items/11047443...-butterfly | 15:51 | |
notable6 | lizmat, Noted! (weekly) | ||
16:10
jpn joined
16:15
jpn left
16:53
maylay left
16:55
maylay joined
17:11
jpn joined
17:16
jpn left
|
|||
SmokeMachine | dev.to/fco/redeventstore-3o9o | 18:05 | |
18:08
jpn joined
18:16
jpn left
18:34
jpn joined
18:44
jpn left
18:53
jpn joined
19:14
jpn left
19:16
jpn joined
19:24
jpn left
19:45
wbooze joined
19:58
wbooze_ joined
20:01
wbooze left
20:25
wbooze_ left,
maylay left
20:26
maylay joined
20:59
wbooze joined
|
|||
tbrowder | librasteve showed me how to get a list of M random elements from a set of N elements. is there some clever way to make that "random" list repeatable? maybe by restting srand? | 21:01 | |
*resetting | |||
yes, srand is the key | 21:04 | ||
21:05
wbooze left
|
|||
librasteve | m: srand(1234); say (^100).pick(4); | 21:08 | |
evalable6 | (75 31 47 90) | ||
Raku eval | (3 70 69 96) | ||
librasteve | m: srand(1234); say (^100).pick(4); | ||
Raku eval | (3 70 69 96) | ||
evalable6 | (75 31 47 90) | ||
librasteve | you had it on the nail | ||
tbrowder | thanks! that's what i need fer sure | 21:11 | |
hm, when i use it in a loop, it does weird things. first val is diff, but later ones are the same. still experimenting... | 21:24 | ||
let's see if i can demo... | 21:31 | ||
trimmimg down my use case... | 21:36 | ||
back in a bit... | 21:37 | ||
m: my $n = 10; my @u = 1..5; for 0..2 { say(srand(5); @u.roll($n)) } | 21:48 | ||
camelia | (5)((2 4 2 1 5 3 5 3 1 1)) (5)((5 4 3 1 4 4 4 3 4 3)) (5)((5 4 3 1 4 4 4 3 4 3)) |
||
tbrowder | weird ^^ see first is diff, others the same | 21:49 | |
[Coke] | I believe that's an issue with roll. | 21:52 | |
m: my $n = 10; my @u = 1..5; for 0..2 { say(srand(5); say 10.rand } | |||
camelia | ===SORRY!=== Error while compiling <tmp> Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1) at <tmp>:1 ------> 5; for 0..2 { say(srand(5); say 10.rand <HERE>} expecting any of: … |
||
[Coke] | m: my $n = 10; my @u = 1..5; for 0..2 { say(srand(5); 10.rand) } | 21:53 | |
camelia | (5)(1.9862253286493636) (5)(6.761485947582429) (5)(6.761485947582429) |
||
[Coke] | m: BEGIN srand(5); my $n = 10; my @u = 1..5; for 0..2 { say(srand(5); 10.rand) } | ||
camelia | (5)(6.761485947582429) (5)(6.761485947582429) (5)(6.761485947582429) |
||
tbrowder | i can just ignore the first, but the algo must be wrong somehow. coke i tried using rand an got same results | ||
[Coke] | But BEGIN to present the srand and roll was still giving different answers on the first roll through. | ||
"preset" | 21:54 | ||
tbrowder | obviously i didn't use rand correctly | ||
21:55
maylay left
|
|||
tbrowder | so, an issue? | 21:55 | |
did you try INIT block | 21:56 | ||
21:57
maylay joined
|
|||
[Coke] | only tried the BEGIN (which still had the wrong answer) and then the rand - which with begin worked. | 21:57 | |
You shouldn't need a BEGIN, and I don't see anything obvious in 'method roll' in List that would cause that. | 21:58 | ||
I don't think your code is wrong, smells like a bug | |||
tbrowder | INIT didn't work either | ||
21:58
Guest60 joined
|
|||
tbrowder | i'm pretty sure i've use srand before with success, maybe in roast. | 21:59 | |
but probably not with roll... | 22:00 | ||
Guest60 | Long time perl user. New project, like to use Raku. Require the ability to compile distributable AMD64 binaries for window 10/11. Have a test OO project built. Can somebody refer me to a good reference for making binaries? | 22:01 | |
[Coke] | I'm not sure such a reference exists. | 22:02 | |
tbrowder: I tried removing the BEGIN and using MVM_DISABLE_JIT and MVM_DISABLE_SPESH with no help | 22:03 | ||
er, SPESH_DISABLE and and JIT_DISABLE | |||
tbrowder | Guest60: such a project sounds like a good thing to spread raku to windows ppl! | 22:11 | |
Guest60 | tbrowder: It was always a big hurdle for perl. XS was no fun. I just want UI and math to both be easy in one language, and to not have to support OS level dependency hell issues post-install. I was kinda hoping that was the direction that Raku was going in when I saw nativecall(). | 22:28 | |
lizmat | I understand patrickb has been working on Windows executables for scripts | 22:53 | |
22:59
sena_kun left
23:04
lichtkind left
|
|||
[Coke] | nativecall is for calling out to C, not for bundling into an executable. | 23:10 | |
so if you already have some C that is buildable on your target platform, you can install rakudo and have some raku code that calls out to it. | 23:11 | ||
23:19
Sgeo joined
23:31
Guest60 left,
jpn joined
23:39
jpn left
23:43
stanrifkin joined
23:53
maylay left,
maylay joined
|