🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:02 lucasb left
SmokeMachine What do you guys think of something like this? gist.github.com/FCO/b5ff6f7470ecc1...2dbe00a4ef 00:17
Xliff SmokeMachine: I don't understand it. 00:22
SmokeMachine: What is #post? Where does it come from? Why does $session-id not have a "!"? 00:23
Same with #get and #post.
It seems like your example is only a part of what you want evaluated.
SmokeMachine Xliff: Is a way I'm writing to do a "event pattern recognition"... 00:24
#get and #post are ids..
Xliff: #get and #post are ways of getting values from different events... 00:25
Xliff Ah. Would be nice to see the whole thing. 00:26
Is it large?
Looking around, I find this: github.com/FCO/EventExpressionLanguage 00:27
And the temperature+humidity example is also confusing.
00:28 titsuki joined
Xliff So where is the link between event temperature and #temp? 00:28
Is it because the attribute is called $temperature?
If you have established $temperature, why do you need #temp? 00:29
SmokeMachine Xliff: $temparature is a attribute of the fire-risk event... #temp is a identifier for the temperature event... 00:32
Xliff OK, so how have you established the relationship between #temp and event temperature? 00:36
Is that what is done in the match section?
SmokeMachine Xliff: you can see `event fire-risk { ... }` as a class definition and `has $temperature = #temp.value` is the attribute temperature of the event `fire-risk`. the match block would be the equivalent of an `TOP` token on a grammar, `event-name()` is equivalent to `<event-name>` on grammar, and `temperature(#temp)` is equivalent to `$<temp>=<temperature>` or `<temp=.temperature>`... 00:38
00:38 wamba left 00:39 mowcat left
SmokeMachine Xliff: when you match a event, you can "give it a name" with `#my-name`... 00:39
Xliff OK. Still, I have a little problem with that because the definitions are muddied by the match section./ 00:40
You define #temp here: "temperature(#temp, value > 40, ?area == #hum.area )"
But #hum isn't defined until the next line... 00:41
humidity(#hum, value < 20, ?area == #temp.area)
And both #temp and #hum are used before their definition!
That makes things very confusing.
At least for me.
SmokeMachine Xliff: that's why I use an `?` on `?area == #hum.area`
Xliff Ah. OK. 00:42
However I still prefer my declarations to be clear.
Could you consider a way of making the link between the events and the #-vars more explicit? 00:43
SmokeMachine Xliff: any idea?
Xliff Hrm. Sorry. Not at the moment. I am taking a break from my own projects, atm. 00:44
See github.com/Xliff/p6-Clutter/tree/glib-split
SmokeMachine Xliff: isn't explicit enough using it inside of the match? 00:45
Xliff No
At least not for me.
Explicit, would be declaring the link between event temperature and #temp before #temp is ever used. 00:46
Again, that's just my preference.
But that is matched by most languages, even Raku
SmokeMachine Xliff: but if you want to match more than one `temperature` event, how to differentiate it? 00:47
Xliff How would you do that, now?
SmokeMachine `temperature(#temp1) temperature(#temp2)`
Xliff OK, so consider that to be the way you link a event to a #-var. 00:48
So your example might look something like this: pastebin.com/adpykGnU 00:49
OR could look like this: pastebin.com/TxsMqY39 00:50
Ah. missed it, but also assume a "my humidity #hum;" in there. 00:52
SmokeMachine I prefere the second one... but I don't see that as necessary... 00:54
Xliff SmokeMachine: Well, you asked for opinions, so I've given you mine. Good luck with it. 00:56
rypervenche [Coke]: Thanks (about .clone)
Xliff And for the record, I do see it as necessary, if only for new users understanding. You could make it optional...
SmokeMachine Xliff: yes, and thank you very much!
Xliff You're welcome. 00:57
SmokeMachine Xliff: making it optional makes a lot of sense...
Xliff :)
SmokeMachine Xliff: but you think it difficult to know where it was declared? 00:58
Xliff Yes 01:00
01:05 Kaiepi left 01:06 Kaiepi joined 01:14 hungrydonkey joined
Geth doc: coke self-assigned xt/examples-compilation.t - can't see error github.com/Raku/doc/issues/3188
d12ac69b4f | Coke++ | xt/examples-compilation.t

  * for both solo and inline example compilation
  * remove diag that was just showing a boolean if an error happened.
Closes #3188
01:33 sena_kun joined 01:35 Altai-man_ left 01:37 __jrjsmrtn__ joined, _jrjsmrtn left 01:44 hungrydonkey left 01:55 Maylay left 01:58 aborazmeh left 02:05 lostinfog joined 02:20 Kaiepi left, Kaiepi joined, Maylay joined 02:21 squashable6 left 02:23 squashable6 joined 02:24 molaf left 02:25 titsuki left
[Coke] given a try with no catch block, what would a CATCH block that mimicked that functionality look like? 02:31
... nevermind. I can just deal with $! after the block. 02:34
02:37 molaf joined
linkable6 DOC#3188 [closed]: github.com/Raku/doc/issues/3188 [xt] xt/examples-compilation.t - can't see error
03:32 Altai-man_ joined 03:34 sena_kun left 04:08 El_Che left 04:09 El_Che joined 04:23 eseyman left 04:25 eseyman joined 04:35 darkstardev13 joined, raven__ left 04:54 hungrydonkey joined 04:57 lostinfog left 05:18 rindolf joined 05:33 sena_kun joined 05:35 Altai-man_ left 06:09 jmerelo joined 06:10 |Sno| left 06:12 Doc_Holliwood joined
Geth doc: f9f1dce50f | (Ben Davies)++ | 2 files
Document how `when` can be used in `for` loops
doc: d8a382cd89 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 2 files
Merge pull request #3224 from Kaiepi/for-when

Document how `when` can be used in `for` loops
06:48 |Sno| joined 07:02 sauvin joined 07:10 kensanata joined 07:16 stoned75 left 07:31 reach_satori_ left 07:32 Altai-man_ joined 07:34 sena_kun left 07:37 jmerelo left 07:40 reach_satori joined 07:51 rindolf left, wamba joined 08:35 poga joined, Black_Ribbon left 08:36 rindolf joined 08:59 abraxxa left, abraxxa joined 09:08 robertle left 09:12 Doc_Holliwood left 09:25 Doc_Holliwood joined 09:27 ufobat joined, pecastro joined 09:33 sena_kun joined 09:34 aluaces left 09:35 Altai-man_ left
cpan-raku New module released to CPAN! HTTP::API::MusicBrainz (0.0.1) by 03TYIL 09:51
09:53 daxim left 09:54 kensanata left 09:59 daxim joined, wamba left 10:03 wamba joined 10:06 Doc_Holliwood left
lizmat clickbaits rakudoweekly.blog/2020/02/17/2020-...eblessing/ 10:21
10:25 Doc_Holliwood joined 10:31 titsuki joined 10:37 libertas joined 10:42 reach_satori left 10:45 dakkar joined 10:50 kensanata joined 11:09 Doc_Holliwood left 11:10 pmurias joined 11:29 Doc_Holliwood joined 11:32 Altai-man_ joined 11:34 reach_satori joined, sena_kun left 11:36 wamba left 11:37 pmurias left 11:38 pmurias joined 11:46 pmurias left 12:09 wamba joined 12:24 Doc_Holliwood left 12:29 wamba left 12:39 kktt007 joined 12:54 kktt007 left 12:55 kktt007 joined 13:02 pmurias joined
SmokeMachine Sorry for insisting on it, but does anyone have any thoughts about [this](github.com/FCO/EventExpressionLanguage)? 13:13
I’m developing this currently, and if someone find any problems at this early stages it would be much better than if I find it after done... 13:16
13:16 squashable6 left 13:17 squashable6 joined, squashable6 left, kktt007 left 13:18 kktt007 joined 13:20 squashable6 joined
SmokeMachine I think I’m agreeing with Xliff ‘s comment about the problem of using identifiers before declaring them... 13:21
But I couldn’t find a good solution for that yet... 13:22
13:29 aluaces joined
SmokeMachine But the fact is, the new event is only created as the last step of the chain, and that’s where those identifiers are used... but I like to have the event attributes at the beginning of the definition... it makes it easier to understand the events... 13:30
13:33 sena_kun joined
SmokeMachine And I think (and that who it’s being implemented) the `#myId.myAttr` as a closure that will return that that wasn’t declared yet... 13:33
13:34 aborazmeh joined, aborazmeh left, aborazmeh joined
SmokeMachine And at some point, the parser will throw an error if you never declare a used id... 13:35
13:35 Altai-man_ left 13:36 reach_satori left, MasterDuke left
SmokeMachine Xliff: ^^ 13:36
13:37 kktt007 left, kktt007 joined
rypervenche Where does the & at the end of someone saying they're going afk come from? 13:46
SmokeMachine rypervenche: is it putting it into background? 13:49
[Coke] yah, shell job control 13:50
sena_kun rypervenche, shell background task
[Coke] fg # now I'm back
rypervenche Ah ok, I wasn't sure if it was something else.
[Coke] though I never see anyone 'fg'. :)
13:55 Xliff left 13:56 lucasb joined, squashable6 left 13:58 squashable6 joined 14:05 mowcat joined 14:17 kktt007 left 14:24 dogbert17 joined 14:51 aborazmeh left 15:13 mowcat left
uzl[m] o/ 15:15
Question: old.reddit.com/r/rakulang/comments...iners_and/
Voldenet SmokeMachine: why "A | B" is "A XOR B" instead of "A OR B" 15:16
15:18 mowcat joined
Voldenet also, there's no "NOT" which I find a bit weird 15:18
jnthn uzl[m]: `has BinaryNode $.left is rw` so that you get an rw container back from it, perhaps? 15:19
15:20 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined
Voldenet uzl[m]: docs say that `is rw` works only on a class docs.raku.org/language/typesystem#trait_is_rw 15:30
jnthn oh, I didn't even notice the `is rw` at the package level; I pretty much never use it... :)
Voldenet …but it indeed does not work ;) 15:31
15:32 Altai-man_ joined
Voldenet m: role X is rw { has $.x; }; (X.new.x = 4).say 15:32
camelia Cannot modify an immutable 'Any' type object
in block <unit> at <tmp> line 1
Voldenet m: class X is rw { has $.x; }; (X.new.x = 4).say
camelia 4
jnthn Interesting...
I don't think that was intended 15:33
Yeah, looks like it's not working by mistake, and nobody ever noticed yet :)
Please open an issue 15:34
15:34 sena_kun left
SmokeMachine Voldenet: how should a NOT be implemented? 15:36
15:37 hungrydonkey left, hungrydonkey joined
Voldenet SmokeMachine: as ! probably 15:39
15:42 wamba joined
SmokeMachine Voldenet: I mean, when I do `event(bla == 42)` I store a query for `{ type => ("==" => "event"), bla => ("==" => 42) }` on my query storage. What should I do on `NOT event(bla == 42)` case? I've being thinking on storing a query like: `{ type => ("!=" => "event") }, { bla => ("!=" => 42) }`, but I'm not really sure... 15:45
15:47 ZZZzz joined
Voldenet somewhat terse explanation, of `is rw` problem, but probably nothing more is needed github.com/rakudo/rakudo/issues/3495 15:47
jnthn It's fine; thanks 15:48
Voldenet SmokeMachine: !(a == b) may not always is equivalent to (a != b) though, especially in three-valued logic 15:59
SmokeMachine Voldenet: on this case, `a == b` means something like `%storage<a><b>` 16:01
Voldenet: for now, `==` uses a hash and any other thing (`>`, `<`, `>=`, `<=`) uses a btree... 16:03
16:05 Doc_Holliwood joined 16:07 pmurias left 16:21 kensanata left 16:30 hungrydonkey left, hungrydonkey joined
Voldenet SmokeMachine: after reconsidering, it's possible to negate all queries just by using reversed operators 16:31
16:33 jmerelo joined
jmerelo releasable6: status 16:33
releasable6 jmerelo, Next release in ≈4 days and ≈2 hours. 5 blockers. 0 out of 234 commits logged
jmerelo, Details: gist.github.com/d10a9d0164819200c7...1d5ef8d2f2
Voldenet SmokeMachine: however, it would be nice if it was possible to express "if we didn't get a specific event in the last 5 minutes" 16:42
16:42 hungrydonkey left, rindolf left
discord6 <もふもふいつ撫でも (Mofu MOFO)> Can a kind gentleman explain this prototype to me? perl proto sub trait_mod:<is>(Mu $, |) {*} I guess the $ means it expects a Scalar. But what does the pipe | mean. Same with {*}. Please help babby that is me. 16:42
16:42 hungrydonkey joined 16:43 hungrydonkey left, hungrydonkey joined
Voldenet | means "anything else" in prototypes, {*} is a standard syntax for them - docs.raku.org/language/functions#proto 16:47
16:47 rindolf joined 16:48 wamba left
discord6 <Highlander> Normally | slurps named and positional args into Capture (whose name would come after the pipe), but in the case of a proto sub it means candidates for that sub are allowed to take any additional parameters they like 16:50
<もふもふいつ撫でも (Mofu MOFO)> Thanks, that halps. Now time to wrack my brain over how to apply this sexyness. 16:57
<もふもふいつ撫でも (Mofu MOFO)> So many features to learn. I'm crying/dying. 16:58
16:58 |Sno| left
Voldenet SmokeMachine: is it possible to dynamically define type names? For example: `warning-humidity` or `warning-temperature` by saying `event :: { has $type = #ev.type; match { [ temperature(#ev, value > 40) ^ humidity(#ev, value < 20) ] }` 17:00
uh, more like: event :: { has $type = "warning-" ~ #ev.type; match { [ temperature(#ev, value > 40) ^ humidity(#ev, value < 20) ] } 17:02
17:07 titsuki left
Voldenet SmokeMachine: another thing that's probably mising is ability to write arbitrary raku code, so you could express :temperature-average((%state<#temp-now><value> + %state<#temp><value>) / 2) 17:10
17:13 lostinfog joined 17:15 aborazmeh joined, aborazmeh left, aborazmeh joined, aindilis left
SmokeMachine Voldenet: you'll be able to do something like: `has $temperature-average = #temp-now.value + #temp.value / 2;` 17:16
Voldenet oh, ok
I'm not sure if counting events wouldn't be useful
17:17 aindilis joined
Voldenet "event ban-ip { has $ip = #login.remote-ip; match { [ invalid-login(#login) ** 10 ] 5min }" 17:18
SmokeMachine Voldenet: something like: `has $temperature-average = #temp.all.sum / #temp.all.count` But I have no idea of how to represent that...
Voldenet SmokeMachine: actually, I was not expecting actual average, just average of captured 2 events in this case 17:19
SmokeMachine Voldenet: maybe if using * ou + it becomes an array?
Voldenet: as we do with tokens... 17:20
17:21 pecastro left
Voldenet it would make sense, then it'd be possible to actually get 5min average from stream of events by using `match { [ temperature() * Inf ] 5min` 17:22
SmokeMachine m: grammar Bla { token a {"a"}; token TOP { <a>+ } }; class BlaAction { method TOP($/) { say $<a>.^name } }; Bla.parse: "aaa", :actions(BlaAction)
camelia Array
SmokeMachine Voldenet: yes... good idea! 17:23
17:33 sena_kun joined 17:35 Altai-man_ left 17:37 domidumont joined 17:38 domidumont left 17:48 chloekek joined
Voldenet SmokeMachine: I've just noticed that in the "event ban-ip" example I've forgotten to write a filter for 'group by ip', but it'd be pretty fun idea to implement fail2ban in EventExpressionLanguage 17:50
SmokeMachine Voldenet, Xliff: Now I'm thinking... if we do array for multiple times event, we don't REALLY need ids... we can call that by the event type..., so `bla() ble() bla()`, we could access it's values as `#bla[0]`, `#ble` and `#bla[1]`... 17:52
Voldenet: yes, it would! :) 17:53
`event ban-ip { has $ip = #login.remote-ip; match { [ invalid-login(#login, ?remote-ip == #login.remote-ip) ** 10 ] 5min }` 17:54
or? 17:56
Voldenet it looks quite nice, especially considering that 'invalid-login' can be emitted by filtering supply constructed from 'journalctl -f'
SmokeMachine `event ban-ip { has $ip = #login.remote-ip; match { [ invalid-login(#login, ?remote-ip == #login.last.remote-ip) ** 10 ] 5min }`
Voldenet #login.remote-ip definitely 17:59
SmokeMachine Voldenet: or should `#id.array-operation` use #id as array and `#id.item-operation` use the last value on `#id`?
Voldenet it'd be more practical to filter by last event just by writing `#id.field` 18:00
SmokeMachine `#id.sum`, `#id.average`, `#id.count`, etc use all events matched by `#id` and `#id.value`, `#id.any-other-thing` use the last value
should be possible to `#id[3]`? 18:01
Voldenet yeah, but more like: `#id[-1]`
or `#id[*-1]` if we use raku syntax
SmokeMachine I mean if you want the 4th...
Voldenet I agree that indices should work 18:02
in fact: `event ban-ip { has $ip = #login.remote-ip; match { [ invalid-login(#login, ?remote-ip == #login[0].remote-ip) ** 10 ] 5min }` 18:03
SmokeMachine I'm also thinking on changing it's name... I'm not sure if EEL is a good idea...
18:03 hungrydonkey left
Voldenet all messages should be filtered using first known ip, not last, obviously 18:03
SmokeMachine Voldenet: but if you filter by the last, (since you are using ?) the first time will not filter, the 2nd time it will filter by the first, the third will filter by the second that is equal to the first, etc... 18:05
so, `#login[0].remote-ip` would behave the same `#login[*-1].remote-ip`... 18:07
18:07 aluaces left
Voldenet uh, what about: `event ban-ip { has $ip = #login.remote-ip; match { [ invalid-login(#last) && invalid-login(#login, ?remote-ip == #last.remote-ip) ** 10 ] 5min }` 18:08
it's more explicit where #last is stored then 18:09
SmokeMachine Voldenet: in that case you wouldn't need the `?` on `?remote-ip`...
Voldenet the idea is that every first "invalid login" would get captured into the store, then next invalid-login events will be only captured into #login array if they use the same ip as the first one 18:11
SmokeMachine Voldenet: that's what the other codes would do either... 18:12
Voldenet: it gets the values from the last event and creates new queries with that values... 18:14
Voldenet: so if the invalid-login has remote-ip as, it will add on query-storage a query like: `{ :type("==" => "invalid-login"), :remote-ip("==" => "") }` 18:15
Voldenet Okay, I guess that this makes sense: `event ban-ip { has $ip = #login.remote-ip; match { [ invalid-login(#login, ?remote-ip == #login.last.remote-ip) ** 10 ] 5min }` 18:19
SmokeMachine Voldenet: but if `#id.not-list-operation` means `#id.last.not-list-operation` then, you don't need that `.last` there... 18:20
every new code I see/write makes me think that's a good idea... 18:21
18:23 MasterDuke joined
Voldenet yeah, the only filters that usually make sense in this context is 'last', maybe 'current' in rare cases, hardly ever it'd access all the previous values 18:23
18:25 aborazmeh left 18:27 dakkar left 18:29 reach_satori joined 18:30 dansolo42 left
Voldenet there might be a need to express 'group of fields that must be the same like in the previous event' 18:31
SmokeMachine Voldenet: why the `attr == #id.something-else` isn't good for that? 18:33
Voldenet `event smart-rising { has $val = #v.value; has $id = #v.id; has $device = #v.device; match { [ smart-value-change(#v, ?device == #v.device, ?value > #v.value, ?id > #v.id) ** 5 ] 10min }`
`event smart-rising { has $val = #v.value; has $id = #v.id; has $device = #v.device; match { [ smart-value-change(#v, ?device == #v.device, ?value > #v.value, ?id == #v.id) ** 5 ] 10min }`
it's not very obvious what it does
18:34 natrys joined
SmokeMachine device changing price? 18:35
18:35 dansolo42 joined
Voldenet it's emitting hard disk values from smart 18:35
18:36 aluaces joined
Voldenet but the problem is that there's a need to monitor it by-device and by the property (temperature_celsius is not error_count) 18:36
I propose shorter syntax: `event smart-rising { has #v; match { [ smart-value-change(#v, ? == #v, ?value > #v.value) ** 5] 10min }` 18:37
"current #v must be exactly like previous one, but value must be rising" 18:38
SmokeMachine Voldenet: does that mean everything but value are equal? 18:39
Voldenet Yeah, exactly
and that it emits the same attributes that event it received, but with different type
SmokeMachine Voldenet: but what about timestamp? every event has timestamp... and they will not be the same... 18:40
Voldenet hm, and in fact event may have 4 fields being a compound key and 10 fields not being a key 18:41
`event smart-rising { has #v; match { [ smart-value-change(#v, ?<device id> == #v<device id>, ?value > #v.value) ** 5] 10min }` 18:42
SmokeMachine Voldenet: what about `?[device, id] == #v.[device, id]`?
:) different postcircumfixes... :P
Geth advent: tmtvl++ created pull request #47:
Add tmtvl to the list for 2020
Voldenet I guess it's pretty intuitive, then
18:43 squashable6 left
SmokeMachine Ive preferred yours... 18:43
what about `?*<device id> == #v<device id>` ?
Voldenet: (have you seen the `*`?) 18:44
18:44 squashable6 joined
jmerelo m: "abc" ~~ /$<foo> = (\w+)/; say $<foo> 18:46
camelia 「abc」
Geth advent: a8cd879511 | (Tim Van den Langenbergh)++ | raku-advent-2020/authors.md
Add tmtvl to the list for 2020
advent: 240e37d013 | Altai-man++ (committed using GitHub Web editor) | raku-advent-2020/authors.md
Merge pull request #47 from tmtvl/tmtvl/add-me-to-schedule

Add tmtvl to the list for 2020
jmerelo m: "abc" ~~ /$<foo> = (\w+)/; my $key = "foo"; say $<$key>
camelia Nil
Voldenet SmokeMachine: that'd work only if that syntax would also be valid: smart-value-change(#v, *.device == #v.device)
jmerelo m: "abc" ~~ /$<foo> = (\w+)/; my $key = "foo"; say $<"$key"> 18:47
camelia Nil
jmerelo m: "abc" ~~ /$<foo> = (\w+)/; my $key = "foo"; say $<"foo">
camelia Nil
SmokeMachine Voldenet: you have a point...
jmerelo m: "abc" ~~ /$<foo> = (\w+)/; my $key = "foo"; say $/{$key}
camelia 「abc」
Voldenet SmokeMachine: in fact, having * in place of current element may enable future syntax additions 18:49
jmerelo m: grammar Foo { token TOP { <bar> }; token bar { .+ }}; say Foo.parse( "bar" )
camelia 「bar」
bar => 「bar」
jmerelo m: grammar Foo { token TOP { <bar> }; token bar { .+ }}; class FooAction { method TOP($/) { make $<bar>.made }; method bar($/) { make ~$/} }; say Foo.parse( "bar" ) 18:50
camelia 「bar」
bar => 「bar」
jmerelo m: grammar Foo { token TOP { <bar> }; token bar { .+ }}; class FooAction { method TOP($/) { make $<bar>.made }; method bar($/) { make ~$/} }; say Foo.parse( "bar", :actions( FooAction.new ) ) 18:51
camelia 「bar」
bar => 「bar」
jmerelo m: grammar Foo { token TOP { <bar> }; token bar { .+ }}; class FooAction { method TOP($/) { make $<bar>.made }; method bar($/) { make ~$/} }; say Foo.parse( "bar", :actions( FooAction.new ) ).made
camelia bar
SmokeMachine Voldenet: maybe `#` instead of `*`? `#.<device id> = #v.<device id>` and `#.device == #v.device`
jmerelo m: grammar Foo { token TOP { <bar> }; token bar { .+ }}; class FooAction { method TOP($/) { my $key = "bar"; make $/{$key}.made }; method bar($/) { make ~$/} }; say Foo.parse( "bar", :actions( FooAction.new ) ).made
camelia bar
jmerelo Cool 18:52
Voldenet SmokeMachine: it just occured to me, that # may be "default id" for the event, so: smart-value-change(*.device == #.device) 18:53
SmokeMachine Voldenet: Sorry, I got lost...
Voldenet SmokeMachine: # instead of #v, so smart-value-change(#, ?<device id> == #<device id>, ?value > #.value) ** 5] 18:54
in which case, # could be dropped to be default: smart-value-change(?<device id> == #<device id>, ?value > #.value) 18:55
if * was used: smart-value-change(?*<device id> == #<device id>, ?value > #.value)
or rather: smart-value-change(?*<device id> == #<device id>, ?*.value > #.value) 18:56
SmokeMachine Voldenet: so, the `#` would be the last matched event of the same type as th current? 18:57
Voldenet yes
SmokeMachine Voldenet: that makes sense... (and will be hard to explain/documente...) 18:58
Voldenet: I think all this is hard to explain not explaining internal behaviour... 18:59
19:03 aindilis left
Voldenet #type = event-type(filters…) ** count, filters are boolean expressions separated by `,`, * - current event hash, # - previous event of current type hash, ? true or unknown 19:03
in the meanwhile, different #id syntax 19:04
jmerelo twitter.com/PerlConferences/status...9577671684 19:05
19:05 aindilis joined
Voldenet SmokeMachine: I think examples are going to be a lot more useful than docs 19:08
SmokeMachine Voldenet: I agree... 19:09
Voldenet: `#` is more complex than `last from the same type`, but last from the same matcher... 19:10
Voldenet: `bla(attr = 42) bla(attr = #.attr)` is that valid? I don't think `#.attr` on the 2nd one should be 42... 19:12
Voldenet: I think `#` should only be valid inside a quantified matcher...
Voldenet Right, because otherwise you have nothing to compare to 19:13
19:15 aborazmeh joined, aborazmeh left, aborazmeh joined
Voldenet btw, regarding #ids I'm not sure if this syntax wouldn't be better: `#temp = temperature(value > 40, ?area == #hum.area) & #hum = humidity(value < 20, ?area == #temp.area)` 19:15
it's more raku-ish 19:16
and then `#old = bla(*.attr == 42, ?*.attr > #old.attr)` makes more sense, because #old is being set when it's matched 19:17
…in which case `#old = bla(?*.attr > #old.attr) ** 2` looks weird 19:18
oh well, bbl, but interesting language idea nonetheless 19:19
19:20 jmerelo left 19:21 Kaiepi left 19:22 sauvin left
SmokeMachine Voldenet: that was one of my first attempts... for some reason I've changed my mind... but Im ok of trying it again... 19:22
19:27 Kaiepi joined 19:32 Altai-man_ joined 19:35 sena_kun left 19:45 molaf left 19:58 rindolf left 20:17 aborazmeh left
guifa o/ 20:26
20:34 |oLa| joined
rypervenche Are there Camelia plushes for sale anywhere? And if not, will there be any at the Perl and Raku Conf in Houston? 20:42
20:42 AlexDaniel joined 20:43 AlexDaniel left, AlexDaniel joined 20:44 hacktor left 20:46 [Sno] joined
MasterDuke i think liz and wendy have the only stock of them, but they aren't planning to go to houston. don't know if they're planning to send any with someone else 20:46
lizmat: ^^^
lizmat no plans either way at this moment
although we might actually start taking online orders at some point 20:47
if there is enough demand :-)
20:51 mowcat left, pecastro joined 20:53 lbns joined
cpan-raku New module released to CPAN! Pg::Notify (0.0.5) by 03JSTOWE 20:54
20:58 pmurias joined 20:59 |oLa| left 21:00 wamba joined 21:02 hacktor joined 21:09 lbns left 21:33 sena_kun joined 21:35 Altai-man_ left 21:41 Black_Ribbon joined 21:45 molaf joined 21:56 chloekek left 21:58 hacktor left 22:22 hacktor joined 22:34 mowcat joined 22:47 wamba left
SmokeMachine m: my $s = Supplier.new; $s.Supply.lines.map({ .&from-json }).tap: *.&dd; $s.emit: q"{}\n"; say "after"; $s.emit: q"{}\n"; say "after"; $s.emit: q"{}\n"; say "at the end" 22:50
camelia after
at the end
SmokeMachine should this(^^) be printing the empty hashes between this prints? 22:51
22:53 natrys left
SmokeMachine m: my $s = Supplier.new; $s.Supply.lines.map({ .&from-json }).tap: *.&dd; $s.emit: qq"\{}\n"; say "after"; $s.emit: qq"\{}\n"; say "after"; $s.emit: qq"\{}\n"; say "at the end" 22:53
camelia Hash %result = {}
at the end
Hash %result = {}
Hash %result = {}
Saw 1 occurrence of deprecated code.
Sub from-json (from GLOBAL) seen at:
SmokeMachine m: use JSON::Fast; my $s = Supplier.new; $s.Supply.lines.map({ .&from-json }).tap: *.&dd; $s.emit: qq"\{}\n"; say "after"; $s.emit: qq"\{}\n"; say "after"; $s.emit: qq"\{}\n"; say "at the end" 22:54
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find JSON::Fast in:
SmokeMachine m: use JSON::Fast; my $s = Supplier.new; $s.Supply.map({ .&from-json }).tap: *.&dd; $s.emit: qq"\{}\n"; say "after"; $s.emit: qq"\{}\n"; say "after"; $s.emit: qq"\{}\n"; say "at the end"
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find JSON::Fast in:
SmokeMachine m: $*IN.Supply.tap: *.say 22:56
camelia »Wann treffen wir drei wieder zusamm?«
»Um die siebente Stund‘, am Brückendamm.«
»Am Mittelpfeiler.«
»Ich lösche die Flamm.«
»Ich mit«

»Ich komme vom Norden her.«
»Und ich vom Süden.…
SmokeMachine m: $*IN.Supply.lines.tap: *.say
camelia »Wann treffen wir drei wieder zusamm?«
»Um die siebente Stund‘, am Brückendamm.«
»Am Mittelpfeiler.«
»Ich lösche die Flamm.«
»Ich mit«

»Ich komme vom Norden her.«
»Und ich vom Süden.…
SmokeMachine m: $*IN.Supply.lines.tap: *.say; say "before closing" 22:57
camelia »Wann treffen wir drei wieder zusamm?«
»Um die siebente Stund‘, am Brückendamm.«
»Am Mittelpfeiler.«
»Ich lösche die Flamm.«
»Ich mit«

»Ich komme vom Norden her.«
»Und ich vom Süden.…
elcaro lizmat: count me in as wanting 1 (or 2). Camelia plushies. I'm in Australia, and won't get a chance to go to any international conferences 23:02
23:06 pmurias left
libertas Hi, what is '-> ' syntax meaning in my @fibo = 0, 1, -> $a, $b { $a + $b } ... *; lazy infinite list? 23:26
23:26 titsuki joined 23:32 Altai-man_ joined 23:34 pecastro left, pmurias joined 23:35 sena_kun left 23:37 Doc_Holliwood left, Doc_Holliwood joined
jnthn libertas: "lambda" - that is, a piece of code that takes two parameters, $a and $b, and then adds them together 23:41
23:46 lucasb left
elcaro libertas: as jnthn said, it's just a lambda 23:54
m: my &add = -> $a, $b { $a + $b }; say add(3, 5); 23:55
camelia 8
23:55 aborazmeh joined, aborazmeh left, aborazmeh joined