🦋 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
reportable6 left,
jpn left
00:03
reportable6 joined
00:31
Manifest0 left
01:04
xinming left
01:06
xinming joined
01:32
Xliff joined
|
|||
Xliff | \o | 01:33 | |
Fun with supplies and intervals -- replit.com/@Xliff/EasygoingOliveFi...#main.raku | |||
No writeup, yet. If interested, just ping me and I'll whip up a quick one, tomorrow. | |||
01:44
jpn joined
01:49
jpn left
02:13
teatwo joined
02:16
teatime left
02:38
jpn joined
02:43
jpn left
03:16
Vyrus left
03:17
Vyrus joined
04:17
reportable6 left,
sourceable6 left,
coverable6 left,
nativecallable6 left,
greppable6 left,
statisfiable6 left,
shareable6 left,
evalable6 left,
squashable6 left,
bisectable6 left,
tellable6 left,
releasable6 left
04:18
evalable6 joined,
statisfiable6 joined,
bisectable6 joined,
greppable6 joined,
releasable6 joined,
squashable6 joined
04:19
reportable6 joined,
coverable6 joined,
shareable6 joined,
nativecallable6 joined,
sourceable6 joined
04:20
tellable6 joined
04:27
jpn joined
04:32
jpn left
04:40
rf left
05:26
jpn joined
05:44
jpn left
05:54
squashable6 left
05:56
squashable6 joined
06:00
reportable6 left
06:01
reportable6 joined
06:03
gnulinuxuser joined
06:08
euandreh left
07:02
euandreh joined
07:29
jpn joined
07:34
jpn left
07:42
andinus left
07:43
andinus joined
08:06
andinus left
08:07
andinus joined
08:10
andinus left,
andinus joined
08:13
andinus left
08:14
andinus joined
08:15
andinus` joined
|
|||
lizmat | Xliff interested :-) | 08:40 | |
08:42
jpn joined
08:45
teatwo left,
teatwo joined
08:51
epony left
09:00
Manifest0 joined
09:03
derpydoo left
09:04
razetime joined
09:05
razetime1 joined
09:08
jpn left,
razetime1 left
09:15
andinus left
09:16
andinus joined
09:21
Sgeo left
09:56
squashable6 left
09:57
squashable6 joined
10:02
jpn joined
10:08
jpn left
10:34
zara joined
10:41
zara left
10:45
derpydoo joined
11:10
gnulinuxuser left
11:24
ab5tract joined
11:25
eroux joined
11:39
Xliff left
|
|||
gfldex | lolibloggedalittle: gfldex.wordpress.com/2023/04/23/not-even-empty/ | 11:44 | |
12:00
reportable6 left
12:01
reportable6 joined
12:03
razetime left
13:03
linkable6 left,
evalable6 left
13:06
evalable6 joined,
linkable6 joined
14:06
evalable6 left,
linkable6 left
14:07
linkable6 joined,
evalable6 joined
14:13
tea3po joined
14:16
teatwo left
14:18
tea3po left,
tea3po joined
14:24
epony joined
14:47
xinming left
14:49
xinming joined
15:14
jpn joined
15:18
tea3po left,
tea3po joined
15:24
jpn left
15:45
Geth left,
Geth joined
15:48
Xliff joined
|
|||
Xliff | lizmat: OK. Where is the best place for raku blogs? | 15:49 | |
lizmat | dev.to ? | ||
Xliff | Ah. I'll need to get an account there. Thanks. | ||
lizmat: dev.to/xliff/using-a-supply-to-tra...a-box-3d1b | 16:21 | ||
Still needs the conclusion.... | 16:22 | ||
Voldenet | Xliff: are you absolutely sure that this code is thread safe? | 16:29 | |
Xliff | No. | ||
Voldenet | probably access to the $bonus needs a lock | ||
Xliff | There is an attempt to use locking. | ||
True. But for my purposes.... it's irrelevant. | 16:30 | ||
Please mention that in the comments when it goes up. | |||
Adding in any discussion about thread safety would muddy the issue. | 16:31 | ||
lizmat | Xliff: why the BUILD method ? | ||
Xliff | lizmat: That's because it's there in Supply-factories.pm6 | ||
So I just adjusted the source for Suppy.interval to taste. | 16:32 | ||
lizmat | also, why augment Supply? why not create a sub ? | 16:34 | |
Xliff | Because I didn't know how to do it with a sub. Using a sub does not imply nor promote reusability, and this also points out a missed opportunity with Supply.interval. | 16:35 | |
lizmat | well, apart from that, but augmenting means you can't precompile | ||
Xliff | This is how Supply.interval was implemented. I'm using the same technique Rakudo itself uses to add Supply.interval. | 16:36 | |
lizmat | sub interval-with-value( $interval, $value, $delay = 0, :$scheduler = $*SCHEDULER) | ||
that may be so, but augment outside of the core, is a very heavy thing to do | 16:37 | ||
Xliff | I prefer it this way. | ||
lizmat | ok, just my 2c :-) | ||
Xliff | If you want to make that argument, it can be done in the comments. :-) | 16:38 | |
Your 2c is more like a quarter, but is best for further discussion, yes? | |||
lizmat | sure | ||
Voldenet | meh, dev.to requires too much effort to comment, but it's not relevant anyway | 16:39 | |
lizmat | you can also comment here: www.reddit.com/r/rakulang/comments...tems_in_a/ | ||
Voldenet | otoh, I'm curious why not just do `Supply.interval(2).map({ [42, $++] })` | 16:44 | |
16:48
evalable6 left,
linkable6 left
16:49
evalable6 joined
16:51
linkable6 joined
|
|||
Voldenet | it's nice because it automatically creates a scope and it's very likely to be thread safe in scenario like: | 17:01 | |
m: my $var = 42; react { whenever Supply.interval(.1).map({ [$var, $++] }).head(5) { .say }; whenever Promise.in(.1) { $var = -1; }} | |||
camelia | [42 0] [-1 1] [-1 2] [-1 3] [-1 4] |
||
Xliff | Voldnet: Huh! Not bad. | 17:08 | |
I'm not so well versed in react/whenever so that solution did not occur to me. | |||
Voldenet: How well does that .map work with .tap? | 17:10 | ||
Voldenet | .map emits MapSupply | ||
Xliff | And that means... ? | 17:11 | |
Voldenet | It works like a normal tap would | ||
Xliff | OK, great! | ||
Voldenet | Hmm, I'm still not entirely sure about thread safety of setting var and reading it the way I did - since emit may run before or after $var is changed | 17:14 | |
lock would make it clearer | 17:17 | ||
17:37
rf joined
|
|||
rf | Afternoon folks, I have time today to write a blog post :) | 17:38 | |
18:00
reportable6 left
18:02
reportable6 joined,
sena_kun joined
|
|||
lizmat | ++rf | 18:11 | |
18:27
Sgeo joined
|
|||
rf | In Rakudo's source, where is `Supply.interval` declared? | 18:27 | |
lizmat | src/core.c/Supply-factories.pm6 line 79 | 18:36 | |
rf | Thanks! | 18:37 | |
Also dev.to/rawleyfowler/functional-pro...-raku-9ib, had to rush a bit I have family coming so ping me with spelling mistakes or anything :D | |||
lizmat | rf I think you forgot WhateverCode as an anonymous function | 18:40 | |
my &add = * + * | 18:41 | ||
rf | Ah good catch! | ||
I'm not going to cover it completely but I will make sure to mention it | |||
lizmat++ | 18:43 | ||
Xliff | Can you create a REPL<CStruct> class at runtime? | 19:14 | |
lizmat | I don't see why not? | 19:16 | |
it would be BEGIN time inside the EVAL ? | |||
Xliff | No. In a sub using the HOW | 19:17 | |
lizmat | I suggest write your class, then feed that Str to .AST and say the result. If that produces valid RakuAST code, that would be a way to go about it | 19:19 | |
Xliff | lizmat: So you do NOT recommend using ^add_method and .^add_attribute? | 19:25 | |
19:27
linkable6 left,
evalable6 left
19:28
evalable6 joined,
linkable6 joined
20:28
linkable6 left,
evalable6 left
20:29
evalable6 joined,
linkable6 joined
20:56
avuserow_ is now known as avuserow
20:59
squashable6 left
21:00
squashable6 joined
21:17
sena_kun left
22:17
evalable6 left,
linkable6 left
22:19
linkable6 joined
22:20
evalable6 joined
|
|||
Anton Antonov | Is anyone else experiencing upload problems with fez / raku.land ? | 22:32 | |
It seems that the newest update at raku.land is from 3 days ago. | 22:33 | ||
23:20
evalable6 left,
linkable6 left,
evalable6 joined
23:21
linkable6 joined
23:22
Manifest0 left
23:45
TieUpYourCamel joined
|