🦋 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.
lizmat s/emiting/emitting/ ? 00:35
SmokeMachine Oh! Let me change it! 00:39
lizmat I would turn the ANSI color sequences into readable constants, having them in the code examples is making things more complicated to read then they should
be
SmokeMachine Thanks
lizmat also: why the "lazy gether" / "take" 00:40
that feels completely superfluous here
SmokeMachine to make the events to be created just before emitting...
instead of all at once... 00:41
lizmat if you do: my @events = 00:42
and do s/take// on all the next lines, and drop the closing }
it should still work ?
SmokeMachine yes. but it would print the same seconds on all the lines, no? 00:44
lizmat you mean that the "take" is slowing things down? 00:47
ah, I see what you mean: by making it lazy, you think it would slow down? 00:49
I think the "sleep 1" in the for @events loop is what is significant there
which reminds me.... 00:53
sleep&
SmokeMachine lizmat: thanks for your help! :) 00:56
tbrowder SmokeMachine: thnx for list rev example. raif showed me a similar method using .pairs instead of .kv 12:20
*raiph 12:22
so it seems the .antipairs takes the prize, eh? 12:29
m: my @a=<1 2 a b>; my %a = @a.antipairs; say %a.gist 12:30
camelia {1 => 0, 2 => 1, a => 2, b => 3}
tbrowder 👍 12:31
very rakuish
lizmat fwiw, I've been wanting to introduce a .vk for many years now... it's just that it would percolate into a lot of other areas as well 12:33
all the places that accept :kv would most likely also need a :vk then as well 12:34
tbrowder hm, a .vk would be more intuitive to me, but i see the prob 12:46
lizmat and once down that road, why not have :ap for antipairs :-) 12:50
tbrowder if we had .vk at the start, why antipairs?
lizmat I don't recall atm 12:51
why antipairs came about
tbrowder :ap is an alias for one thing, :vk alias for 2 things 12:52
well, duh, no
i would love :vk and never lose sleep ove lack of :ap 12:53
actually i completely forgot about .pairs until raiph reminded me 12:56
tbrowder but i use .kv all the time 12:56
tbrowder but the way i typically use it (.kv -> $k, $v { ... } i don't think about needing .vk 13:00
Larry's vision for perl/raku suits my scatter brain perfectly 13:02
SmokeMachine lizmat: morning! Do you think that’s better now? github.com/FCO/Sourcing-FoodDelive...st-post.md 13:26
lizmat well, I still think it's a bit too much on the code, and too little explanation: still feels largely as documentation rather than a blog post 13:29
also: in the examples, what is the use of making the events fully qualified, like: Sourcing::FoodDelivery::Event::OrderAccepted
why not just OrderAccepted
SmokeMachine Do you mean in general or that last bit?
lizmat well, for instance, each example includes at least "use Sourcing;" 13:30
you could say at the start of the Food Delivery Example: all of the examples assume the "Sourcing" module has been loaded 13:31
then get rid of those lines in the examples
SmokeMachine I was thinking on if someone was going to look at the repo, that would make it easier to differentiate the parts… but that’s a very good point… I think I’ll make averything on root…
lizmat well, this is a blog post to get people interested 13:32
they don't need to know all the nooks and crannies at this point ?
SmokeMachine That makes sense…
Do you think I also shouldn’t show all the events? 13:33
lizmat I think you can get rid of PaymentFailed it isn't mentioned anywhere apart from its definition 13:35
also: isn't this also about encapsulation of events? 13:36
I mean, aren't PaymentInitiated/Confirmed sub-events of OrderAccepted ? 13:37
SmokeMachine No, they aren’t… OrderAccept only used them… 13:41
If you can say the events belongs to someone, it would belong to a Aggregation, not to a Projection… 13:42
lizmat then I don't completely grok your blog yet :-) 13:43
SmokeMachine Projections are just “view” of a set of events… Aggregations that own the events… they have the commands that validate and emit the events…
On this first one I’m only talking about projections… I thought splitting the concepts of projection, aggregation and process into different posts would make it easier to understand… isn’t it? 13:45
I’m afraid if I make it explicit on the post, I will need to talk about aggregations… and it would not make sense to split the posts… 13:58
Unless I make it a bit more explicit by just create a new projections using the same events… maybe a projection to show all orders by user… 14:01
lizmat hmmm 14:04
SmokeMachine Make sense? 14:05
lizmat well, I would try to reduce the number of events, if at all possible 14:06
leave out all of the Payment events, as they are not necessary to understand the concept, I'd say 14:07
SmokeMachine I think that makes sense… 14:08
I’m trying to do that… would you mind if I ask your opinion again when I finish it? 14:13
lizmat no, I wouldn't mind 14:18
SmokeMachine lizmat: do you think that's a bit better now? 14:53
lizmat PaymentInitiated/Confirmed/Failed are mentioned, but not really explained 14:56
I feel you could remove them and mention something like "In a real world example, there would be events for initiating payment requests, and handling the results of that event" 14:58
SmokeMachine I thought leaving it there to show projections don't need (and probably shouldn't) use all the events..
lizmat then you should mention that :-) 14:59
SmokeMachine makes sense... :)
SmokeMachine lizmat: mentioned... 15:05
lizmat ok, sorry if I keep mentioning things, but maybe it would make sense to make a table out of the OrderCreated ... OrderDelivered introductions, now that they're basically a single line of text 15:07
SmokeMachine please, keep mentioning while you see thing I could improve! :) 15:08
do you mean something like: 15:09
| event name | description |
?
lizmat maybe on the printout example, change the times to something less in the middle of the night? :-)
yes
SmokeMachine yes.. I think the table made it better... 15:15
done 15:20
lizmat yup
I think you can make the header align with |: the header alignment feels off 15:21
sorry for the nitpicking :-)
SmokeMachine I’ll do that in a min… sorry, my wife gave me a mission now… :) 15:24
lizmat hehe :-) 15:24
SmokeMachine lizmat: does it look better now? 16:14
lizmat yup
SmokeMachine Thanks for all your help! :) 16:15
lizmat you're very much welcome
so where are you going to post it ?
SmokeMachine any idea/critic/suggestion about the framework itself?
I'm planning to create a wordpress one for that... 16:16
lizmat wordpress generally doesn't like markdown, dev.to does
SmokeMachine dev.to? I'll take a look... 16:17
lizmat once posted, please do a weekly: with the URL
SmokeMachine lizmat: thanks, I will... do you have any suggestion about the framework itself? 16:22
lizmat not at the moment...
SmokeMachine lizmat: it seems it has no raku highlight... is that correct... do you know if there is any way to allow that? 16:31
lizmat they don't have raku highlight, indeed 16:35
but WP doesn't either afaik
If it's readable, I select Perl highlighting, but only if it doesn't deter from readability
SmokeMachine if it's ok with no highlight... (still not published): dev.to/fco/sourcing-part-1-explori...e1ad96959d 16:44
I just discovered I have a user in dev.to since 2018... :) 16:45
SmokeMachine dev.to/fco/sourcing-part-1-explori...lug-855533 16:47
I cannot find how to publish that... :( 16:51
lizmat before I tell you how
SmokeMachine ok... I found it... I must be very dumb... 16:52
lizmat feels like "note "apply OrderCreated";" is debug code left in accidentally ?
SmokeMachine yeah... that's not needed... I'll remove that
lizmat making it use Perl highlighting, it's ```perl I think 16:53
also, you can only publish when you're editing, oddly enough
not when you're previewing 16:54
also, if you want to make it a series of blog posts, don't forget to set that
SmokeMachine I did try with ```perl, but it became a worst than with no highlight... 16:55
lizmat ok, then keep it off :-)
SmokeMachine oh! is there a option for a set of posts?!
lizmat yes 16:56
SmokeMachine where?
lizmat click on the six-sided symbol while you're editing
next to the Save Changes
SmokeMachine usercontent.irccloud-cdn.com/file/.../image.png 16:57
should something be here t 16:58
should something be here?
lizmat did you publish already ?
yes, something should be there
SmokeMachine I think I did.. usercontent.irccloud-cdn.com/file/.../image.png 17:01
ok.. I think that's like that because I'm using the basic editor... I changed that to the other one and created a new post and then I'm seeing what you described... but I'm not finding how to open the old post on this editor... 17:03
lizmat I guess copy-paste ? 17:06
SmokeMachine do you mean delete the original one and create a new one? 17:07
lizmat yes
SmokeMachine dev.to/fco/sourcing-part-1-explori...n-raku-5e3 17:14
lizmat: again, thanks for all your help 17:15
lizmat weekly: dev.to/fco/sourcing-part-1-explori...n-raku-5e3
notable6 lizmat, Noted! (weekly)
lizmat you're welcome :-)
also posted on /r/rakulang and /programming.dev/rakulang 17:18
/programming.dev/c/rakulang rather
[Coke] I may update the tags for issues on github to avoid spaces in the tags. 19:32
I think this is causing issues with searching.
lizmat [Coke]++ 19:45