🦋 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.
holyghost Iy depends on the implementation though :-) 00:10
*It
00:20 Black_Ribbon joined 00:25 oddp left 00:32 Altai-man_ joined 00:34 sena_kun left 00:35 vrurg_ joined, vrurg_ left 00:38 vrurg_ joined 00:40 aborazmeh joined, aborazmeh left, aborazmeh joined 00:45 k-man left 00:47 k-man joined, vrurg left 00:56 vrurg_ left 00:57 vrurg joined 01:06 molaf left 01:10 leont left 01:19 molaf joined 01:23 cpage left 01:24 gnufr33dom left 01:27 gnufr33dom joined, cpage joined 01:28 yuplushi left 01:30 aborazmeh left
holyghost I'm cooking, Blanche waked up, one of my concubine parrot birds 01:43
I had to be more silent ...
anyway, lights out now 01:46
01:52 rbt left, yuplushi joined, rbt joined
holyghost is going to rest for a while in his bed 01:55
01:57 ensamvarg3 joined 02:03 yangzq50 joined, molaf left 02:05 Manifest0 left, Manifest0 joined 02:13 lucasb left 02:15 molaf joined 02:28 codesections left 02:31 codesections joined 02:33 sena_kun joined 02:34 Altai-man_ left 02:37 xelxebar left, xelxebar joined 03:16 guifa left 03:25 yangzq50 left 03:33 ShimmerFairy left 03:54 codesections left 04:04 abraxxa left 04:07 abraxxa joined 04:16 abraxxa left 04:19 abraxxa joined 04:22 Black_Ribbon left 04:23 camelCaser left 04:26 camelCaser joined 04:32 Altai-man_ joined 04:34 sena_kun left 05:00 andrzejku joined 05:28 kensanata joined 05:38 krunen left, krunen joined 05:39 bocaneri joined 05:45 aluaces joined 05:52 hungrydonkey joined 05:55 rbt left, rbt joined 06:03 hungrydonkey left 06:16 xinming left, xinming joined 06:28 patrickb joined, gnufr33dom left 06:33 sena_kun joined 06:34 bocaneri left, Altai-man_ left 06:35 patrickb left 06:44 Xliff joined 06:47 xinming left 06:49 xinming joined, ufobat joined 06:53 bocaneri joined 06:54 hungrydonkey joined 07:09 patrickb joined 07:13 domm left 07:19 clarjon1 joined 07:22 squashable6 left 07:23 squashable6 joined 07:44 hungrydonkey left, domm joined, hungryd87 joined 07:47 dakkar joined 07:55 patrickb left
Xliff What's the best way to parse a situation where you have nested tokens? Consider a standard Perl6 block. How would you parse it and all of the blocks under it? 08:02
moritz something like 08:05
token stuff { <-[{}]>* } 08:06
Xliff Yeah, but what if there are blocks inside of <stuff>?
moritz token nested { '{' ~ '}' <stuff> [<nested> <stuff>]* }
Xliff moritz++ 08:07
holyghost Xliff, moritz, I am just writing a tokenizer too :-) 08:10
implementing some java and smalltlk classes in scheme for a irc client with lots of addons
moritz recommends a certain book... 08:11
08:11 rbt left, rbt joined 08:16 ufobat left, schlaftier3 joined 08:17 ufobat joined, schlaftier left, schlaftier3 is now known as schlaftier 08:18 ufobat left 08:23 ufobat joined 08:24 dolmen joined 08:26 Sgeo left
holyghost moritz : what book do you recommend ? 08:27
moritz holyghost: www.apress.com/us/book/9781484232279 (my own) 08:30
08:32 Altai-man_ joined, pecastro joined 08:34 sena_kun left, dolmen left 08:35 dolmen joined, dolmen left 08:39 dolmen joined
holyghost moritz : thx, I'll look into it later on, I don't have the money to buy it though, I have enough spent on the kids already :-( 08:42
I'm going to see if I can use something from the rebol language in my scheme package 08:43
right now :-)
moritz holyghost: if you give an email address I can send you a copy of the manuscript pre production (so with all the typos still intact :D ) 08:46
08:47 oddp joined
holyghost [email@hidden.address] thx 08:47
08:48 dolmen left
holyghost I read "mastering regular expressions" 2nd ed. from O'Reilly back in the day 08:48
s/read/had
08:48 xinming left 08:49 xinming joined
moritz I've read either the 2nd or 3rd edition. Learned a lot. :D 08:49
08:49 cpan-raku left
moritz and then even more talking grammars with jnthn, pmichaud and TimToady 08:49
holyghost right
I should study it once, I have to reread Programming perl 4th 08:50
I finished the 2nd ed back in the day
in 2000
there's lots of stuff with /g which I don't remember 08:51
regex was perl then not libregex or the usenix libs
\/g for looping I mean
08:55 cpan-raku joined, cpan-raku left, cpan-raku joined
kawaii moritz: just bought a copy :) 08:59
09:04 markong joined
moritz kawaii: thanks :-) 09:09
oh and to everyone who read the books: I'd *really* be happy about (even very short) reviews + ratings on Amazon
those help a lot
(even if you didn't buy through amazon) 09:10
09:17 markoong joined 09:18 markong left 09:35 aborazmeh joined, aborazmeh left, aborazmeh joined 09:45 leont joined 09:50 rindolf joined
Altreus Red fails its tests, apparently trying to test mysql, which of course I don't have 09:57
should it be skipping or is it a known issue?
09:58 rbt left, rbt joined
Altai-man_ Altreus, creating a ticket would be the best way to know. 09:59
09:59 ensamvarg3 left
Altreus ya, will do - figured I'd avoid one if I didn't need to ;) 10:00
10:22 ensamvarg3 joined 10:26 aluaces left 10:33 sena_kun joined 10:34 Altai-man_ left 10:40 xinming left 10:41 xinming joined
SmokeMachine Altreus: Red do not have mysql integration yet. isn't it DBIish failing? 10:58
Altreus: could you, please, show me the error? 10:59
11:01 guifa joined 11:06 fedorafa_ joined 11:10 aborazmeh left, oddp left 11:11 MasterDuke left 11:13 fedorafa_ left 11:23 JJMerelo joined
JJMerelo The 20th anniversary of the first Perl 6 RFC will be in two weeks raku.org/archive/rfc/1.html 11:25
And we should celebrate.
accordingly
So, I've been thinking that what we could do is write 20 articles, that would pick up one specific RFC (accepted or not), pay homage to the person that created it, and also write a very short article on how it's implemented now in Raku 11:26
We would publish one every day from Aug 1st to Aug 20th
Possibly in the same Advent Calendar blog, because, well, opening a 20th anniversary blog is probably not worth the while. 11:27
I'm going to create a page there, and I'm looking for volunteers.
Failing that, I'll designate you directly :-)
Everyone OK with this?
lizmat sounds like a plan to me! :-) 11:28
Geth_ advent: 271e9dd83e | (JJ Merelo)++ | 20th/README.md
Adds first
11:34
advent: 0c62cd28b8 | (JJ Merelo)++ | 20th/README.md
JJ ignores markdown, news at ten
11:36
JJMerelo So, here's the file github.com/Raku/advent/tree/master/20th Please add yourself for 1, 2 or n slots up to 20. Don't worry if they fill up, we can use backups
11:45 aluaces joined 12:01 patrickb joined 12:03 andrzejku left 12:04 andrzejku joined
Xliff Odd.... why is this not giving me the right set of columns. 12:06
repl.it/@Xliff/DazzlingLinedLocks#main.raku
The first array should be full of "has"
Altreus SmokeMachine: oh yes, you're right, DBIish 12:25
gist.github.com/Altreus/687717dee2...e5a93d8080 12:27
12:28 yangzq50 joined 12:29 xinming left 12:30 xinming joined 12:31 dylanwh_ joined, polettixx left 12:32 patrickb left, Altai-man_ joined 12:34 sena_kun left 12:38 e left, dylanwh left, robinsmidsrod left, webstrand left, dylanwh_ is now known as dylanwh 12:40 codesections joined, matiaslina left, KnightLautrec[m] left, Nasrudin left, unclechu left, CIAvash left, AlexDaniel` left 12:42 robinsmidsrod joined, webstrand joined, xinming left 12:44 polettixx joined, xinming joined 12:45 unclechu joined 12:53 KnightLautrec[m] joined, AlexDaniel` joined, matiaslina joined, Nasrudin joined, CIAvash joined 12:59 andrzejku left, e joined
Altreus SmokeMachine: the example you made for kawaii both works and errors for me gist.github.com/Altreus/b99550c403...f679d847f6 13:06
SmokeMachine Altreus: I'll take a look at it after $DAYJOB, sorry 13:08
13:08 Xliff left, MasterDuke joined
Altreus right on 13:09
You might be better off pinging kawaii then, since I tend to want to stop coding in the evenings these days :) 13:10
kawaii I'll be around
SmokeMachine ok
13:11 rbt left, rbt joined 13:16 oddp joined 13:19 dataangel left 13:24 Sgeo joined 13:39 JJMerelo left 13:46 MasterDuke left 13:51 codesections left 13:53 codesections joined 14:01 rbt left, rbt joined 14:29 wamba joined 14:33 sena_kun joined 14:34 Altai-man_ left 14:38 markoong left 14:52 wamba left 14:54 yangzq50 left 14:56 Tirifto joined
Zero_Dogg Is there any way to await two different promises, returning control once *either* has been fulfilled? If I directly "await" two, it waits for both rather than either 15:02
sena_kun Zero_Dogg, Promise.anyof
`await Promise.anyof($p1, $p2)` <-
Zero_Dogg How did I miss that? I've been staring at the docs for Promise… Thanks, sena_kun! 15:04
sena_kun You are welcome.
Voldenet Promise.anyof and Promise.allof don't work like in other languages tho 15:09
m: say await Promise.anyof(Promise.broken("eh")) 15:11
camelia True
timotimo yeah, anyof is just "changed away from `planned`", not "succeeded" 15:13
Zero_Dogg that's fine, I want to timeout an Proc::Async, so I'm checking the state of that afterwards anyway
timotimo as you should :) 15:14
Voldenet the bigger problem with Promise.allof imo is that you don't get results 15:16
timotimo yeah, which is why "await" accepts multiple promises and gives you the results
so that the shorter of the two does what you more likely want and the longer one is more rarely needed, but still accessible
Voldenet that makes sense, it's just not the common convention 15:17
Zero_Dogg raku has been really fun to play around with, lately. Wrote my first code in 2016, but now that it's much more easily accessible it's becoming my go-to 15:18
timotimo what does await with multiple arguments do in other languages? 15:19
Voldenet "invalid syntax" :P 15:22
timotimo ok, so raku had the opportunity to huffmanize and took it :)
15:34 kensanata left 15:44 JJMerelo joined
rbt @Altreus: Looks like an old DBIish 15:50
Altreus: Zef cached version perhaps? I bet it works if you nuke TempDir StoreDir 15:54
16:05 skids joined
Altreus I already notest installed it :) but I can try another 16:14
timotimo R#2968 16:16
linkable6 R#2968 [closed]: github.com/rakudo/rakudo/pull/2968 Fix RI's from-json creating nested arrays on assign
timotimo m: my @a = from-json '[]'; dd @a 16:17
camelia Array @a = []
Saw 1 occurrence of deprecated code.
================================================================================
Sub from-json (from GLOBAL) seen at:
<tmp>, line 1
Please use JSON::Fast, JSON::Tiny or JSON::Pretty from h…
16:22 MasterDuke joined
rbt Altreus: If DBIish 0.6.2 (latest via zef) failed tests I'd like to fix it. 16:24
16:32 Altai-man_ joined 16:33 andrzejku joined 16:34 sena_kun left
Altreus rbt: TempDir StoreDir would be .zef/tmp and .zef/store? 16:35
seemed to be enough 16:40
rbt: tested fine, bit noisy though :) 16:41
16:42 dakkar left
rbt I think those are the paths it uses. I just do `zef nuke TempDir StoreDir` though and let zef figure it out. 16:44
Altreus ah! tools with valuable functions 16:53
I'm not used to that
16:54 MasterDuke left 16:56 ufobat left
SmokeMachine Altreus, kawaii: that should be working now: github.com/FCO/Red/blob/master/t/5...r-update.t 16:58
cpan-raku New module released to CPAN! Red (0.1.22) by 03FCO 16:59
kawaii SmokeMachine: thanks! I'm away from my laptop for the next few hours but I'll test it as soon as possible! 17:00
17:00 dolmen joined
SmokeMachine kawaii: 👍 17:03
17:10 dolmen left
cpan-raku New module released to CPAN! PDF::Tags (0.0.1) by 03WARRINGD 17:24
Altreus SmokeMachine: what's the incantation to set the filename for sqlite?
17:26 xinming left
SmokeMachine Altreus: `$*RED-DB = database "SQLite", :database<./my-database-file.db>` 17:26
Altreus ta
17:26 xinming joined
Altreus couldn't find a doc telling me how the database function works :) 17:26
is it just hard to find?
does it need writing?
SmokeMachine Altreus: or `red-defaults "SQLite", :database<./my-database-file.db>` depending on how you are setting your driver 17:27
Altreus: I think it's not written yet, Let me search for it, just a sec 17:28
Altreus red-defaults is a helpful function :)
17:28 gabiruh left, gabiruh joined
SmokeMachine Altreus: it's described here... let me see if I can find a more in-depth description 17:29
Altreus: I like even more of red-defaults-from-config github.com/FCO/Red/blob/master/lib...Do.pm6#L21 17:30
Altreus yeah! 17:33
17:35 molaf left
SmokeMachine Altreus: The only other doc I found about that is this one, but it’s not very helpful: fco.github.io/Red/api/Red/Do 17:35
17:37 JJMerelo left
holyghost Just got onto my 1000 lines of scheme 17:57
I'm going to go graphical now with scx (X11 API for scheme), for a sound editor 18:01
18:04 hungryd87 left, rbt left
SmokeMachine Altreus: is it working? 18:04
18:05 rbt joined 18:07 Sgeo left 18:09 Sgeo joined 18:10 lucasb joined 18:18 hungrydonkey joined 18:24 bocaneri left 18:27 Kaiepi left, Kaiepi joined 18:31 _jrjsmrtn left, __jrjsmrtn__ joined 18:33 epony left, sena_kun joined 18:34 Altai-man_ left 18:37 codesections left 18:38 Kaiepi left, Kaiepi joined 18:46 theangryepicbana joined, theangryepicbana left 18:47 xelxebar left 18:48 xelxebar joined 18:55 MilkmanDan left 18:57 MilkmanDan joined 19:02 andrzejku left 19:04 lichtkind joined 19:05 xinming left 19:06 andrzejku joined, xinming joined 19:08 epony joined 19:15 xelxebar left, xelxebar joined 19:22 MasterDuke joined 19:24 molaf joined 19:30 stux|RC left, hungrydonkey left 19:31 stux|RC joined 19:38 xinming left 19:39 xinming joined 19:41 MasterDuke left 19:43 wamba joined 19:51 hungrydonkey joined
kawaii SmokeMachine: works fine on the first cycle (the 'create' part), but 'update' always crashes with a nonsensical error 19:53
www.irccloud.com/pastebin/JqefqVTv/
SmokeMachine: this makes no sense, because it created the entry in the database correctly the first time, but seems on update it tries to put the wrong data in the wrong column, i.e. one of the IDs into the reputation column 19:54
We can
can't get it to output the query it's running either, even with the RED-DEBUG var set
SmokeMachine kawaii: is the new versionll breaking? 19:57
kawaii SmokeMachine: we're using 0.1.22 19:58
SmokeMachine kawaii: it seems to be a biting problem again 19:59
kawaii but you can see here, on update, it tried to set the user-id into the reputation column for some reason :) `value "240882564770955275" is out of range for type integer`
but create works perfectly
SmokeMachine kawaii: is it the same code? I'll try to reproduce 20:01
kawaii SmokeMachine: `.elems ?? .map(*.reputation += 1).save !! .create: :1reputation with Reputation.^all.grep({ .guild-id == $guild.id && .user-id == $reputee-id });`
www.irccloud.com/pastebin/mIhuSz8I/
SmokeMachine: schema ^ 20:02
20:05 hungrydonkey left, hungrydonkey joined 20:08 hungrydonkey left 20:09 Petr37 joined
SmokeMachine I've found the error! the bind order is wrong... 20:11
kawaii ah, 0.1.23 incoming? ^_^ 20:15
20:15 xinming left
SmokeMachine yes... in a few minutes... 20:15
20:15 dolmen joined 20:17 xinming joined
SmokeMachine kawaii: I was "calculating" the binds to the WHERE before the ones to SET... and it only changes something on Pg that uses numbers ($1, $2) instead of simple ? 20:17
I still have to find a way to run tests with Pg... 20:18
kawaii SmokeMachine: how about Docker? 20:21
SmokeMachine kawaii: sorry? what about docker? 20:22
ah! you mean to test it?!
kawaii If you need an environment for running Pg specific tests
yes :)
SmokeMachine I do have Pg installed on my machine... but I'd like a way to run it as CIon GitHub action or RakuDist (like this: github.com/FCO/Red/issues/421) 20:24
kawaii: 0.1.23 should appear any moment now... 20:25
it's already on CPAN
kawaii I'll pull the module source and just use that :) 20:26
20:26 Petr37 left
SmokeMachine kawaii: on, that's already there, please, let me know if that's working 20:27
kawaii: and thanks for all the bug reports, and to be using Red )
:)
cpan-raku New module released to CPAN! Red (0.1.23) by 03FCO
SmokeMachine ^^ here it is! ) 20:28
:)
kawaii www.irccloud.com/pastebin/o4vsjNy7/
SmokeMachine: perfect :D
SmokeMachine \o/ 20:29
kawaii thank you so much
SmokeMachine kawaii: thank YOU!
20:29 squashable6 left
kawaii I will be using Red for many more little projects like this in the future, so hopefully we can work to make the library even better now :) 20:29
SmokeMachine kawaii: yes, please! 20:30
kawaii: I hope you enjoy using Red :)
kawaii much nicer than just using DBIish and writing raw SQL :)
even for a small project like this the codebase looks much cleaner
20:31 squashable6 joined
kawaii SmokeMachine: will Red have some kind of driver for working with Redis servers too in the future? 20:31
20:31 Xliff joined 20:33 Altai-man_ joined
SmokeMachine kawaii: it was the plan at the beginning... but a lot of things still have to be thought to make that happen. the closest we have about that (yet very far) is this: github.com/FCO/Red-Driver-Cache-Redis 20:33
kawaii: but that's not what you want, and it's still a prototype...
20:34 sena_kun left
kawaii ah I see, a query cache :) 20:35
Xliff Has any one figured out the best way to get Raku to call function pointers from C? 20:36
Mind you, these are NOT function defs, but function pointer defs. 20:37
kawaii SmokeMachine: one minor thing, `last_updated` is never updated on `update`, do I need to add something to my code? :) very new to this so not sure if I need to add something
20:37 dolmen left
kawaii I just need to call DateTime.now whenever that happens, to get the new value 20:37
SmokeMachine kawaii: you could do a trigger on postgres (Red do not support that yet, and that's probable the best solution) or you can add a before-update Red phaser 20:40
kawaii: github.com/FCO/Red/blob/master/doc...md#phasers 20:41
kawaii: something like `method !update-time is before-update { self.last_update .= now }` should work 20:43
kawaii I'll try that soon 20:44
SmokeMachine I mean: method !update-time is before-update { self.last-update .= now }
no, that'll not work with your code... :( 20:46
that only works for loaded objects, and with that code you never load an object. :( 20:47
20:47 rindolf left 20:49 kensanata joined 20:50 andrzejku left
cpan-raku New module released to CPAN! Random::Names (0.0.1) by 03ELIZABETH 20:51
kawaii SmokeMachine: not too important right now, and time for me to stop programming today, thanks for all your help though :) 20:54
SmokeMachine kawaii: to use that, you'll probably need to do something like: www.irccloud.com/pastebin/KF1bEDSf/ 20:55
kawaii: but that will be easier whe we have the create or update 20:56
does anyone have a suggestion of how a create or update should look on Red? 20:57
21:04 kensanata left 21:06 Xliff left 21:19 cpage_ joined, cpage left, cpage_ is now known as cpage
SmokeMachine kawaii: I think I've found a way to make the before-update phaser run on ResultSeq updates also... :) 21:20
21:21 Petr37 joined 21:22 wamba left 21:24 markoong joined 21:30 wamba joined
Petr37 can anyone recommend good Raku book ? 21:31
timotimo take a perl 6 book and pretend where-ever it says "perl 6" it means raku :) :) 21:33
i don't actually have a suggestion or recommendation
holyghost Petr37 : I have "Think Perl6", which is a bit old since raku but a good read, not too difficult (and there's scheme language features in it, hyphens) 21:36
kawaii SmokeMachine: I will have plenty of time to test tomorrow :) 21:37
holyghost You cannot program set! or nil? in raku though 21:38
timotimo what do these two functions do? i assume `nil?` checks if something is Nil?
and `set!` does what? like assignment? 21:39
holyghost I mean you cannot use a ! or ? in raku's syntax, not the native scheme code you mentioned 21:40
in lisp and scheme you can
timotimo unless you use Slang::Piersing
cpan-raku New module released to CPAN! Random::Names (0.0.2) by 03ELIZABETH 21:46
rypervenche Petr37: raku.guide/ is very good, if you're looking for a good site. 21:48
oddp Also, some of Shitov's material is free. 21:51
holyghost I'm going to buy "a programmer's guide to sound" for my scx sound system 21:54
Tim Kientzle 21:55
TBH
it was mentioned on stackoverflow
20$ used
including shipping
I have an electro group called "Lost Momentum", I only have one song in the making though, a remix 21:56
Involves lots of time 21:57
I hate my mouse for it :-)
21:58 reach_satori left, reach_satori joined
Petr37 rypervenche, thanks. i read them all. 22:00
22:05 aborazmeh joined, aborazmeh left, aborazmeh joined 22:08 skids left 22:09 aluaces left 22:11 hungrydonkey joined 22:16 lichtkind left
SmokeMachine now Red can use before-update on ResultSet updates! :) 22:23
22:25 mowcat joined 22:28 clarjon1 left
SmokeMachine .tell kawaii now this works: www.irccloud.com/pastebin/uVZiQ0Da/ 22:29
tellable6 SmokeMachine, I'll pass your message to kawaii
22:35 Altai-man_ left
cpan-raku New module released to CPAN! Red (0.1.24) by 03FCO 22:36
22:41 |oLa| joined, |oLa| left
cpan-raku New module released to CPAN! Hash2Class (0.0.3) by 03ELIZABETH 22:59
23:00 aborazmeh left
tbrowder lizmat: \o/ beat me to it again--nice class-maker! 23:04
lizmat tbrowder: now with a class skeleton generator that takes a JSON file 23:05
23:05 oneeggeach joined
lizmat to make life easier :-) 23:05
enough for today.. &
tbrowder g'nite.., 23:06
lucs wonders in what tense was "i read them all" intended... 23:08
23:19 wamba left 23:38 markoong left 23:50 pecastro left 23:54 cpan-raku left 23:55 cpan-raku joined, cpan-raku left, cpan-raku joined