🦋 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:10 ctilmes joined 00:12 hacktor left 00:13 aborazmeh joined, aborazmeh left, aborazmeh joined 00:16 Altai-man_ joined 00:18 mowcat left, sena_kun left 00:26 hacktor joined 00:40 ctilmes left 00:47 Manifest0 left 00:51 Manifest0 joined 00:59 hacktor left, hacktor joined 01:03 ctilmes joined 01:28 ctilmes left 01:29 ctilmes joined 01:30 mowcat joined 01:35 melezhik left 01:43 molaf left 01:56 molaf joined 02:05 pilne left, brtastic joined 02:11 mahafyi left, aborazmeh left 02:16 sena_kun joined 02:17 jmaslak joined 02:18 Altai-man_ left
jmaslak I'm having the executable from perl6/rakudo 2020.05 crash (with a complex, high memory utilization, multi-threaded program). Is there a guide to providing information needed to report a useful bug on this, since I don't have an easy-to-reproduce-for-someone-else case? 02:19
I do have a core dump so I got that far. 02:20
02:27 ctilmes left
timotimo without knowing anything more, a "bt" of every thread seems promising, and if possible calling MVM_dump_backtrace(tc) on every thread where you can find a tc with a not-optimized-out value 02:33
02:33 ctilmes joined
timotimo you're probably running the whole thing with JIT, which will give some very strange stack traces, but that's known and harmless, if annoying 02:34
jmaslak bt - gist.github.com/jmaslak/197339bf06...5b1d326720 02:35
timotimo ah, double free or corruption, that's not fun 02:36
jmaslak I'm not sure how to do the MVM_dump_backtrace(tc) or how to find a tc with a not-optimized-out value.
timotimo it's possible to cause memory corruption by growing arrays or hashes from multiple threads at the same time, or from one thread while another writes to it without growing it
oh, your moar is without debug symbols
02:37 mowcat left
timotimo that makes things a lot more tricky i'm afraid 02:37
jmaslak Doh! I'm using rakubrew - I'm glad to rebuild with symbols if you point me in the right direction for options.
02:38 jmaslak8 joined 02:39 Cabanossi left
timotimo OK, you can try --configure-opts=--moar-option=--optimize=0 --configure-opts=--moar-option=--debug=3 02:40
not sure if that'll reach the right target
build / build-rakudo take that argument
optimize=0 will of course make your everything slower, but it's a lot easier to debug 02:41
02:41 jmaslak left
jmaslak8 Will try - I'm fine with slower to help figure out what is doing it. I wouldn't be surprised if I'm extending an array / list in multiple places (I definitely won't say it's not *my* bug) 02:41
timotimo there's a "single-user mode" thingie in moar that can explode in your face when you do that, let me have a look how it's activated 02:42
oh, hm, can't be activated using a configure option, only by changing a #define in src/6model/reprs/VMArray.h 02:43
i should petition to make including debug symbols in moar builds the default 02:44
or perhaps including "split debug symbols" mode, where the debug symbols land in a different file, but i've never tried to do that 02:45
how much experience do you have with gdb? 02:46
02:47 jmaslak8 is now known as jmaslak
jmaslak I have used it before, but not on complex multi-threaded apps, and it's been a long time since I've done anything beyond bt. 02:48
timotimo OK i'll just spell it out in detail, because it's time i go to bed soon
for a quick "bt of all threads" you can issue "thread apply all bt", but for the MVM_dump_backtrace bit you may have to actually switch to each thread in turn 02:49
for that you'll "info threads" to get the list, "thread 5" to switch to a thread, and then "up" until the frame has a readable "tc=0xblah" in the function call printout
then you can "call MVM_dump_backtrace(tc)" from there
jmaslak ok, I can give that a try. 02:50
timotimo there are limitations to what you can do with "call" when doing a post-mortem aka with a core dump
so perhaps you'll have more luck running your program with raku-gdb-m / perl6-gdb-m
02:51 Cabanossi joined
timotimo if you really don't mind spending a lot of time waiting, like if you can reproduce the bug over night without interaction, throwing valgrind at it can be helpful 02:51
oh, how could i forget asan, maybe that would be the smarter first step actually
jmaslak asan? 02:52
timotimo --configure-opts=--moar-option=--asan which requires a library to be installed, too
yeah, it's a memory checker like valgrind, but it requires you to build the program to include it 02:53
but it's a lot faster
valgrind can be truly glacial
i think it'd be best to combine --asan with the optimize=0 and debug=3 options and then running your program in the gdb version of raku/perl6 02:54
jmaslak Okay, let me see what I can do. 02:58
03:16 farcas1982regreg joined 03:17 mayuresh joined
mayuresh hello. :) 03:17
o great ones, welcome me, the latest convert to #raku.
yeah, i spent some time hating #raku.
but on reading up some more, i see potential in it. 03:18
so yeah, i am here, and i am gonna stay. :)
i read an article via twitter which described 'oo'. 03:20
that was the turning point.
also, correct me if i'm wrong, but the regex are normal.
unlike in "perl 5", where there are 'pcre'. 03:21
no response! hmnn, looks like i've still not been forgiven. 03:24
no worries, i'll still stick with "raku", i like it.
even the 'ide' called "comma" is impressive.
though i am more used to "vim". 03:25
i wonder where i could get the syntax files for "vim".
would anyone here know?
still no response! 03:26
okay, now i gotta go take bath. it's early morning.
bye for now.
be right back.
03:26 mayuresh left 03:27 MilkmanDan left 03:29 MilkmanDan joined 03:30 farcas1982regreg left 03:32 farcas1982regreg joined 03:42 ctilmes left 03:49 mayuresh joined
mayuresh alrighty, i'm back. 03:49
hello. :)
how come no one is active? 03:53
or am i being ignored?
i think everyone is just inactive. 03:56
people out here don't seem to be vindictive.
hence i can't assume that i'm being ignored.
alrighty, see you everybody after 12~14 hours.
bye.
03:56 mayuresh left 04:07 hungrydonkey joined 04:15 hungrydonkey left 04:16 Altai-man_ joined 04:18 sena_kun left 04:19 KotH left, KotH joined 04:22 hungrydonkey joined 04:23 jmaslak left 04:32 hungrydonkey left 04:38 hungrydonkey joined 04:46 aborazmeh joined, aborazmeh left, aborazmeh joined 04:54 hungrydonkey left 04:58 Cabanossi left 05:05 Cabanossi joined 05:32 sauvin joined 05:56 sjm_uk joined 06:16 sena_kun joined 06:18 Altai-man_ left 06:34 Doc_Holliwood left 06:43 andrzejku joined
Geth doc: f78e05ac1f | (Stoned Elipot)++ | xt/routine-definitions.t
Add test for routine header vs routune definitions

ref #3350
06:46
doc: f8064dd42a | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | xt/routine-definitions.t
Merge pull request #3380 from Raku/test-for-3350

Add test for routine header vs routine definitions This is awesome. I'll leave the referred issue open to add what needs to be corrected there as a checklist. Thanks!
linkable6 DOC#3350 [open]: github.com/Raku/doc/issues/3350 [bug][xt] Header/definition discrepancy
06:51 dhaval joined
dhaval where can I find best benchmark comparison between p5 and p6? 06:52
07:03 aborazmeh left
MasterDuke dhaval: best how? there currently aren't any really comprehensive ones. [Tux] does daily runs of his Text::CSV benchmark, perl6/raku results here tux.nl/Talks/CSV6/speed4.html 07:18
07:19 dhaval left
MasterDuke i'm not sure if the perl5 numbers are on the website, but they're posted in #raku-dev daily 07:19
nine mayuresh: it's quite common for the channel to be quiet when Europe is asleep 07:29
tellable6 nine, I'll pass your message to mayuresh
MasterDuke and friday evening is kind of a slower time in general 07:31
07:36 vike left 07:40 andrzejku left 08:14 xinming joined 08:16 Altai-man_ joined 08:17 xinming_ left 08:18 sena_kun left 08:20 gnufr33dom left 08:21 kensanata joined 08:34 dhaval joined 08:41 konvertex joined 08:53 dhaval left 08:54 kensanata left 09:00 vike joined 09:03 dhaval joined 09:23 sjm_uk left 09:26 dhaval left 09:43 stoned75 joined
AlexDaniel MasterDuke: yeah I wish… 09:45
09:48 stoned75 left 09:54 rindolf joined
lizmat weekly: colincrain.wordpress.com/2020/05/0...nary-bits/ 09:54
notable6 lizmat, Noted! (weekly)
lizmat weekly: perlweeklychallenge.org/blog/meet-...n-2020-04/
notable6 lizmat, Noted! (weekly)
10:06 sjm_uk joined 10:13 stoned75 joined 10:15 chloekek joined, poohman_1 joined 10:16 sena_kun joined 10:18 Altai-man_ left
poohman_1 Hello all, I use trying out the pdf modules by dwarring and came across a type called dict 10:18
is dict a built in type in Raku or is it only specific to the PDF modules 10:19
10:22 hungrydonkey joined
lizmat dict is not a built-in type 10:32
10:35 mowcat joined
hungrydonkey Hello, everyone. I just started to learn how to write socket program with raku. I want to know if there is any way to get information about peer socket except for peer-host and peer-port in IO::Socket::Async. 10:38
AlexDaniel hungrydonkey: welcome! Information like what? 10:42
hungrydonkey like IP address and port 10:44
As I know, class IO:: socket:: INET does not provide similar functions. 10:46
10:47 brtastic left
AlexDaniel hungrydonkey: oh, you're using INET but want the info that Async provides 10:54
hungrydonkey Yeah, you're right! 10:56
AlexDaniel .seen Kaiepi
tellable6 AlexDaniel, I saw Kaiepi 2020-05-04T22:34:07Z in #raku-dev: <Kaiepi> lizmat, is github.com/rakudo/rakudo/pull/3589 good to go now with the release made?
AlexDaniel hungrydonkey: hmm I'm not sure… but any reason not to use the Async version? 11:00
11:04 rindolf left 11:06 rindolf joined
hungrydonkey Because I don't know much about raku's concurrency mechanism. I will continue to study raku, and I enjoy programming with raku. Anyway, thank you AlexDaniel, thank you community. 11:11
11:12 Noisytoot joined 11:16 poohman_1 left 11:17 Doc_Holliwood joined 11:19 molaf left 11:23 poohman_1 joined
timotimo hungrydonkey: with a "react" block you don't have to introduce concurrency at the code level; your react block will only have code run in it from one thread at any time 11:28
11:30 hungrydonkey left 11:37 chloekek left 11:38 caterfxo left 11:39 MasterDuke left 11:40 poohman_1 left 11:41 k-man left 11:44 k-man joined 11:53 Noisytoot left, poohman_1 joined 12:03 MasterDuke joined 12:04 brtastic joined 12:13 Noisytoot joined 12:16 Altai-man_ joined, ctilmes joined 12:17 hungrydonkey joined 12:18 sena_kun left 12:19 Noisytoot left 12:37 caterfxo joined 12:51 sjm_uk left 12:59 ctilmes left 13:05 poohman_1 left 13:19 poohman_1 joined, sjm_uk joined 13:24 pecastro joined 13:29 chloekek joined 13:39 poohman_1 left 13:40 Itaipu left 13:41 andreoss joined 13:53 hungrydonkey left 14:05 jmaslak joined 14:06 Itaipu joined
jmaslak With leak detection off, but using libasn, this is what I'm seeing on 2020.05 - gist.github.com/jmaslak/544665019e...e21a79bfde 14:07
14:08 poohman_1 joined 14:09 brtastic left, orinthe left 14:11 grumble left 14:16 grumble joined, sena_kun joined 14:18 Altai-man_ left
lizmat jmaslak: o/ 14:23
you should probably throw that gist on #moarvm
along with the code that generated that gist ? 14:24
14:27 Itaipu left 14:28 ctilmes joined
timotimo oh dang, yeah, i should ahve pointed out to turn leak detection off 14:29
14:29 Itaipu joined
timotimo i wonder if moar can call anything inside libasan to do that automatically 14:29
14:30 aborazmeh joined, aborazmeh left, aborazmeh joined
timotimo jmaslak: did it crash right after that message? 14:31
jmaslak Yes
timotimo OK, so the hash being visited by the GC there was bigger when the loop was going through the entries than it was when it checked the size beforehand 14:32
moar isn't supposed to run GC while any code that modifies things runs, though
jmaslak This is multithreaded (lots of start {} blocks). 14:33
timotimo yeah, but the GC is stop-the-world
so it should have no threads run user code, only do GC things 14:34
could also be a bug in the element counting function of our hash impl
lizmat jmaslak: oops, sorry I missed the backlog
jmaslak I don't think it always crashed - I'm glad to try running it on older versions if that is helpful. (Code FWIW is Net::BGP's bgpmon.p6 script while receiving a full BGP table) 14:35
timotimo do you feel comfortable applying a moarvm patch and rebuilding only moar? 14:38
a "make install" inside moar's source folder should be enough
i put it as a comment to your gist 14:39
running that without asan would give us a hint if this occurs often, and you could also breakpoint it to see what the other threads are up to at that moment
jmaslak I can learn. :) I've built this outside of rakubrew so it should be straight forward. 14:40
timotimo ah, good
jmaslak Definitely getting output along the lines of "in MVMHash_gc_mark: expected HASH_CNT to match count fo HASH_ITER_FAST invocations, but had -8 at the end 14:44
14:44 sjm_uk left
jmaslak The -8 varies. Seems to be getting bigger (started at -1) as execution continues 14:44
s/bigger/more negative/
timotimo OK that's a big wtf from me 14:45
i hope it's concurrent modification or reading data while it hasn't reached the other core yet or something like that 14:46
jmaslak I definitely wouldn't promise I'm not accidentally modifying a data structure across multiple threads.
timotimo would be good to know if this can happen, though. it shouldn't :) :)
14:46 gnufr33dom joined
jmaslak I'm good at triggering the impossible. ;) 14:47
timotimo thumbs up for that
jmaslak I'm going to try to see where in my code this is coming from too. 14:48
timotimo so "break MVMhash.c:64" would get us in the right spot to check
jmaslak ok 14:49
timotimo it would be very frightening if this output also triggered in non-multithreaded programs 14:52
but i think we've got people run valgrind against moar regularly and this never exploded before
anyway, until now i had assumed that changing hashes so that its actual allocation size changes was the only way to make it explode 14:53
jmaslak I added a comment to the gist of the bt from the breakpoint.
timotimo but with this it looks like it can also cause trouble from just adding individual items to a relatively empty hash 14:54
Manifest0 I'm getting a sigsegv on raku's repl. I'm doing: "for ^720 {say ($_/34560*100)}" and then "720/48". 14:55
On Rakudo version 2020.05-48-gde173a18c built on MoarVM version 2020.05-4-gc4917b192
timotimo OK, we'll want backtraces from the other threads as well
though with the jit active, they'll all look odd after some point 14:56
jmaslak This is happening inside an array->hyper().map().grep(). The map() does a lot.
timotimo unless you're writing to a hash declared outside that, that ought to be fine
env MVM_JIT_DISABLE=1 will keep stack traces "normal" 14:57
Manifest0: very interesting, could i ask you to run it with "raku-gdb-m" if you have a gdb installed?
Manifest0 timotimo: sure
timotimo: you'll have to guide me through... :-( 14:59
timotimo no problem
it should work the same until it segfaults
Manifest0 Thread 1 "rakudo-m" received signal SIGSEGV, Segmentation fault.
0x00007ffff79b6939 in MVM_spesh_frame_walker_move_outer () from /usr/lib/libmoar.so
jmaslak For my problem, I do see a potential concurrency/hash issue inside the map(). Let me see if I can narrow it down. I'll report back.
timotimo OK, next thing you can do is "bt" for a C-level backtrace, and for a raku-level backtrace we would need a moar with debug symbols, otherwise we'll have a hard time finding the TC object we need to call it with 15:00
Manifest0 timotimo: paste.opensuse.org/58982474 15:02
timotimo OK, can you re-run it with the environment variable MVM_JIT_DISABLE=1 set? 15:04
Manifest0 no success 15:05
jmaslak On my issue, I do think that's it hitting. I'll throw some locks around the shared accesses to the hash to be safe, but I think this is it. I added my problematic code (running in a hyper()) to the gist. There shouldn't be any withdrawals or changes to hash elements, just additions of new ones, up to the point of crash. 15:06
timotimo it should at least give a better output to "bt"
jmaslak s/that's it hitting/that it is modifying a hash in multiple threads/
Manifest0 oh. i ran the simple raku :-). Gimme a sec
same output: paste.opensuse.org/78704749 15:09
timotimo huh, that's a bit odd 15:10
what you pasted when you came in, was that the entirety of the code you're running?
Manifest0 yes
timotimo oh wow
that's incredible
it reproduces just fine here, so i can probably more easily debug it here than telling you everything to do 15:11
Manifest0 just two lines. If i ran the lines in the same line with a ; separating them, it will go through
Nice :-D
It's very easy to reproduce
timotimo you've literally managed to crash the compiler 15:12
Manifest0 Don't know if i shoud be happy or not XD 15:13
i tried a bit with other numbers but without success 15:14
should i open a git issue?
timotimo yes, i'll put a full backtrace there, too 15:15
Manifest0 ok 15:16
github.com/rakudo/rakudo/issues/3678 15:22
jmaslak FYI, the checkin that fixed my issue in my code (it also let me control degree of parallelization for debugging, so ignore those changes): github.com/jmaslak/Raku-Net-BGP/co...6ef3f88251 15:24
I'll have to re-work how not to have a bottleneck lock like that, but at least it runs without crashing now. I can deal with the performance later. 15:25
poohman_1 Hello all, 15:26
timotimo i assume all the threads need up-to-date data from the hash that other threads may have changed recently?
poohman_1 Is there any way I can have a look at the history of the IRC Raku channel
I had asked a question a month back and got an answer 15:27
I have forgotten a bit about it
timotimo colabti.org/irclogger/irclogger_log/raku has the logs
poohman_1 thanks
wow thanks 15:28
jmaslak timotimo - I don't think there is a lot of reading of recently written data at the point of crash (I'd be surprised if there is *any* - that would occur after the initial BGP sync, not during it). So lots of new hash elements added by multiple threads, growing fairly quickly. Lots of hash lookups that return not found as well. 15:29
timotimo in that case you can copy the hash for every thread and accumulate changes in a per-thread hash, then merge it all into one hash afterwards 15:31
lizmat or produce a stream of Pairs and combine that in a hash afterwards
timotimo right 15:32
can send all pairs on a channel and have an extra thread put together the result while the other workers are working
(including sending the original hash either as a hash or as pairs)
15:33 k-man left
jmaslak Ya, I'll have to do some thinking. I have some thoughts of what I can do here, the old code also has another concurrency bug if there is a lot of quickly occurring updates to paths (that would happen after the initial BGP). 15:33
Concurrency is hard. ;)
timotimo true 15:35
good thing raku offers so many ways to handle it
15:35 k-man joined
jmaslak Yes - I love having all the paradigms built-in - message passing, locking, async, threads, etc. 15:36
15:41 jmaslak left 15:43 jjmerelo joined 15:44 sjm_uk joined 15:47 aborazmeh left 15:50 ctilmes left 16:06 jjmerelo left 16:10 brtastic joined
guifa How does one manually create a multi method for composition? 16:14
doing .^add_method doesn't work
and anons can't be multi
timotimo i believe you'd have to .^add_multi_method
guifa oh
guifa puts on dunce cap 16:15
didn't even realize that was a method :-)
timotimo check Perl6::Metamodel::MultiMethodContainer
guifa timotimo++
timotimo those will be renamed to Raku:: eventually i'm sure
16:16 Altai-man_ joined
guifa I'm trying to get my Binex stuff as close to the regex grammar as possible 16:16
16:16 aborazmeh joined, aborazmeh left, aborazmeh joined, poohman_1 left 16:17 poohman_1 joined
guifa I'm trying to get my Binex stuff as close to the regex grammar as possible but I can't seem to add new tokens to regex and method defs 16:17
16:19 sena_kun left 16:20 aborazmeh left 16:24 aborazmeh joined, aborazmeh left, aborazmeh joined
guifa I think I can get much closer and usable by creating an anonymosu subclass and adding in the binex methods via manually composition 16:26
requiring a .new isn't the worst
16:29 eiro joined
eiro hello people. 16:29
16:31 sour joined
sour hello, does anyone know where I can read about raku benchmarking (general performance benchmarking) to get an idea about how well it performs, if such information exists? 16:31
AlexDaniel sour: we used to have this: github.com/japhb/perl6-bench 16:35
sour: but a lot of things have changed since the last time somebody used it, I think
eiro: o/
sour 6 jun 2018 last commit, it may not be up to date, yeah 16:36
timotimo those were also mostly microbenchmarks, some of which are now hitting very well optimized paths of moarvm's specializer, and so are better than average 16:37
AlexDaniel I'm actually interested in seeing more benchmarking 16:38
pretty sure it can uncover some fixable issues
MasterDuke agreed 16:40
16:40 ctilmes joined 16:50 oneeggeach joined, oneeggeach left 17:01 dd070 joined 17:02 ctilmes left 17:03 poohman_1 left, poohman_1 joined
tigerpaws Hi. After my presentation this week, (which was a disaster, too much material and detail) I got two interesting questions I had no answer for: can we make a binary executable (jvm, I suppose), and what is the business case for raku? 17:24
I know ther's no good answer for the second, but maybe someone has some ideas anyway? 17:25
AlexDaniel tigerpaws: binary executables I think should be possible eventually, people were working on it recently
tigerpaws: on moar that is
moritz tigerpaws: what exactly do you mean by "the business case for raku"? 17:26
tigerpaws I don't really know, and I suspect the guy asking it doesn't either. In fact, I don't remember anyone ever mentioning a business case for ruby or python either. 17:28
AlexDaniel: So we'd package Moar with the code, or the code would be integrated into moar? 17:29
moritz there are some possible questions that might fit, like "why would a business develop their software in raku?" or "why would a company sopport into the develping raku as a language?"
Altai-man_ Killer features include concurrency, parsing, very advanced OOP, whip-it-up-ability, custom everything... 17:30
moritz or summarized, developer productivity 17:31
tigerpaws moritz: You're right, those two questions might actually work. I know the person that asked that, and he wasn't at the level in the company (my former company) to ask either of those questions, so I suppose it was more rhetorical.
moritz good for small things, but with types and all also good for scaling up code bases 17:32
tigerpaws I like those features. I wasn't originally thinking of evangelizing, but I might go that way. It would be an uphill battle, though. 17:33
I was wondering if there were some things we could steal from python, like numpy or pandas, by linking directly to the C library (I think they are in C) 17:34
moritz there's also Inline::Python (and a branch to port it to Python 3 is in progress) 17:35
Altai-man_ I am not sure if anyone "must" evangelize Raku. If you find it fun, just join the bandwagon, do things you find nice and little by little... 17:36
AlexDaniel tigerpaws: I guess they were just wondering if somebody is using Raku in production (yes) and if so what for exactly
sour raku may be a language fit for the next hundred years, but people shouldn't wait 100 years to realize 'oh boy, this would've been good all along' 17:37
AlexDaniel lizmat: maybe I should make a blog post indeed…
konvertex Uphill battle for sure. Even more so when crystal (about to hit 1.0) and nim offer similar dev productivity, but also come with neck-breacking perf improvements over ruby and python, respectively. 17:38
tigerpaws AlexDaniel: It's one of my former employees, and he has been forcibly converted from perl5 to ruby since I left. So, from his point of view, he's of course wondering if it's a good job decision to look at raku,. 17:39
I don't know crystal. What is that?
konvertex But raku offers a sweet mix of features. Given that the mem usage and perf situation improves over the next releases, it might replace all other langs for me, apart from ada/rust for the super low-level stuff. 17:40
Crystal is ruby with whole-program type inference and macros essentially.
17:41 dd070 left 17:42 dd070 joined
tigerpaws Ok, I've just checked out the crystal site. Interesting, but still ruby. Interesting. I'll have a look at it. 17:42
AlexDaniel: blog post about what? raku usage in production or binary executables? 17:43
17:43 sawyer joined
sawyer lizmat: o/ :) 17:44
AlexDaniel tigerpaws: what I use raku for in production :)
konvertex Yes, please.
tigerpaws AlexDaniel: I think we need as many of those as we can get. I really liked Jonathan's talks about Cro and his Easilang stuff. In fact, I'm taking a demo service I wrote for python and kubernetes and converting it to CRO to see how that goes. 17:46
konvertex Speaking of lizm4t. There was this recent Supply.rotate commit in rakudo. Is the reference implementation basically free to add certain api improvments that aren't covered in the spec yet? Or was this added following some RFC process somewhere? Sorry, still new to this. 17:47
AlexDaniel konvertex: yes it is free to add new features 17:51
konvertex: but it can't change or remove features that are in 6.c or 6.d
konvertex Okay, I see. 17:52
AlexDaniel konvertex: I mean, it can, but the feature has to remain intact if you have `use v6.c` or `use v6.d` in your coe
17:52 pilne joined
AlexDaniel code* 17:52
17:53 dd070 left 17:55 dd070 joined 18:01 dd070 left 18:02 dd070 joined 18:03 sjm_uk left 18:04 mowcat left
poohman_1 hello all 18:08
can someone tell me what this "q:to/EOI" means?
any link to some documentation would help 18:09
Altai-man_ pochi_, it is called "heredoc".
docs.raku.org/syntax/heredocs%20:to <- poohman_1
guifa basically "quote from here, until you find EOI"
Altai-man_ guifa, "from next line" maybe? 18:10
poohman_1 thanks Altai-man & guifa
18:16 sena_kun joined
El_Che and it's indented so it doesn't mix up your code layout 18:17
tellable6 2020-05-08T19:18:50Z #raku-dev <patrickb> El_Che There is a decent possibility that the 2020.05 release broke relocatability. See here: github.com/rakudo/rakudo/issues/3669
2020-05-08T19:20:11Z #raku-dev <patrickb> El_Che I tested this on windows and it's definitely broken. Changes are high it's also broken on non-windows. I'm working on a fix.
18:18 Altai-man_ left 18:28 dd070 left 18:40 rouking joined
rouking I've noticed a problem with the stringification of hashes (as in calling .Str). Namely, { a => { b => 'c' } } and { { a => 'b' } => 'c' } end up outputting the same thing when you call .Str 18:42
This wouldn't be a huge issue except it causes confusion when they're used as hash keys, since standard hashmaps coerce keys to Str 18:43
AlexDaniel m: put { a => { b => 'c' } }
camelia a b c
AlexDaniel m: put { { a => 'b' } => 'c' }
camelia a b c
AlexDaniel m: dd { a => { b => 'c' } }
camelia Hash % = {:a(${:b("c")})}
AlexDaniel m: dd { { a => 'b' } => 'c' }
camelia Hash % = {"a\tb" => "c"}
rouking m: my %h1 = {a => 'b'} => 'c'; my %h2 = a => { b => 'c' }; my %h = %h1 => 1; say %h{%h2}; 18:47
camelia (1)
18:47 andrzejku joined
rouking Also the value ends up being a List?? 18:47
Very strange
18:47 suman joined
suman how to know how much time does a script require to run ? Is it putting say now - INIT now; at the end of script? 18:48
m: say now - INIT now;
camelia 0.00127652
suman m: say now - INIT now; 18:50
camelia 0.0012778
AlexDaniel suman: yeah 18:51
lizmat suman: you could also do a "END say now - INIT now" anywhere in the script
suman Thank you 18:52
18:53 poohman_1 left 18:56 sjm_uk joined 19:04 poohman_1 joined
suman I have posted raku solution for this problem, see at the end disqus comment biospace.xyz/posts/reading-dna-on-computers/ 19:13
To run code go here repl.it/repls/CorruptNavyblueSeahorse
But it runs quite slow ! 19:15
sena_kun suman, there is also github.com/Raku/examples/blob/mast...t/fasta.p6 but I am not sure how related that is. 19:16
Last time I checked it was "Rakudo is 7 times slower than Perl 5" which is not horribly bad if you ask me though can be better, of course. 19:18
sour hello, do you have some links for that claim? @sena_kun 19:20
sena_kun sour, to what claim? Sorry, when I copy-pasted "7 times slower than" I mean "in this particular benchmark on my machine", not "in general", because "performance in general" is a lie of all lies.
sour, see github.com/Raku/examples/blob/ench...ut/RESULTS 19:21
sour thanks
the " 7 times slower" thing :P 19:22
sena_kun sour, I think someone smarter than me can rewrite it into something faster, but I have other things and I am not smart in the first place. :P 19:23
MasterDuke timotimo: github.com/Raku/examples/blob/ench...-body.raku seems like something that could be re-written to take advantage of your hyper-ops optimization branch 19:24
timotimo oh, hm, yeah it actually possibly could 19:25
but only removing one layer of for loop 19:26
the $i would be a single value, the $k would be hypered over
oh
it's actually triangle-shaped
but the @XS and @YS can be advanced with a hyperop, so you save these three lines in the outer for loop 19:30
19:30 dd070 joined
MasterDuke offset_momentum() could be hypered, right? 19:31
timotimo yeah that looks good
only five planets, though
wonder how big the difference would be at such a small number 19:32
19:36 suman left
timotimo i can relatively easily support += whereas supporting actually mentioning the result array somewhere in the expression will be harder, since it has to make sure it never reads a value after it has been written to in the same hyper execution 19:36
19:40 andrzejku left
timotimo m: my int @foo = 1, 2, 3, 4; my int @bar = 10, 10, 10, 10; my int @result = @foo >>+<< @bar >>+<< (@bar >>*=>> 10); say @result 19:42
camelia [111 112 113 114]
timotimo m: my int @foo = 1, 2, 3, 4; my int @bar = 10, 10, 10, 10; my int @result = (@foo >>+<< @bar) >>+<< (@bar >>*=>> 10); say @result
camelia [111 112 113 114]
timotimo and this kind of stuff also has to be correct
m: my int @foo = 1, 2, 3, 4; my int @bar = 10, 10, 10, 10; my int @result = @foo >>+<< @bar >>div<< (@bar >>*=>> 10); say @result 19:44
camelia [2 3 4 5]
timotimo eeeh obviously
m: my int @foo = 1, 2, 3, 4; my int @bar = 10, 10, 10, 10; my @result = @foo >>+<< @bar >>/<< (@bar >>*=>> 10); .raku.say for @result
camelia 2.0
3.0
4.0
5.0
timotimo m: my int @foo = 1, 2, 3, 4; my int @bar = 10, 10, 10, 10; my @result = @foo >>+<< @bar >>/<< (@bar >>*=>> 10); .nude.say for @result
camelia (2 1)
(3 1)
(4 1)
(5 1)
timotimo m: my int @foo = 1, 2, 3, 4; my int @bar = 10, 10, 10, 10; my @result = @foo >>+<< @bar »=>« (@bar >>*=>> 10); .raku.say for @result 19:45
camelia 11 => 100
12 => 100
13 => 100
14 => 100
poohman_1 Hello all, is "$match.make: $match<pair>».made" the same as "$match.make($match<pair>».made);"
timotimo sorry for the spam
poohman_1: yeah; this syntax only works for method calls, though 19:46
tigerpaws timotimo: No, I love the last one (with =>)
poohman_1 thanks timotimo - I prefer the brackets, just wanted to make sure it was nothing Grammar specific 19:47
timotimo trying to zero in on exactly when values are gotten and when they are changed
dd070 can I use raku in production ?
timotimo dd070: a bunch of people already do, so i'd say give it a try 19:48
depends on what exactly you're going to do with it
El_Che dd070: like for all production projecte, have tests and monitoring and you'll be fine. New releases (bug fixes and new features) arr released regularly. 19:49
timotimo committable6: 6c my @foo = 1, 2, 3, 4; @foo.reverse >>+=>> 1; say @foo; my int @bar = 1, 2, 3, 4; @bar.reverse >>+=>> 2; say @bar 19:50
19:50 dd0701 joined
committable6 timotimo, gist.github.com/eb02c68d6caf867e3a...0ea88da7d2 19:50
timotimo ha, two change spots 19:51
but the behavior changed (broke, i'd say) back near the end of 2016
very interesting, very interesting indeed
19:53 dd070 left 19:56 caterfxo left 20:01 mjsir911 left 20:04 sjm_uk left
dd0701 timotimo: some network scripts. read/write socket data, read/write remote redis server . and probably full blown mvc web application. 20:06
timotimo yeah, that sounds like something raku should be good for
dd0701 that's good. where it should not be used then? except AI. 20:07
timotimo hard realtime is currently not possible 20:08
dd0701 is it related with performance drawbacks compared to p5 ?
timotimo can't run on embedded hardware, by which i mean like STM or ATMega where you don't have an OS underneath it
running rakudo on moarvm means you'll haev a stop-the-world garbage collector 20:09
in general, those don't do hard realtime
dd0701 I haven't used p5 for hard realtime either. in fact no language before. 20:10
timotimo i guess perl5 is a bit better for it because it uses reference counting, but i assume it also comes with a little garbage collector to get rid of reference cycles that are otherwise not "anchored"
like cpython has 20:11
many performance drawbacks of raku over p5 can be defeated with parallelism in raku
dd0701 I like async but its not always usable for some apps 20:13
20:13 rindolf left
timotimo it's not only async that raku has 20:13
dd0701 like, simple web app, parse request, query db and prepare html output and send it.
timotimo that sounds like you can parallelize perfectly 20:14
dd0701 perhaps job of middleware
to support concurrent requests 20:15
timotimo cro does that just fine by itself
20:16 Altai-man_ joined
timotimo cro is very good :) 20:17
20:18 sena_kun left
dd0701 yes just checked that. 20:19
I often have to write script to sync ebay/amazon data. call api, fetch large number of orders, update local db etc.
but as you said I would be using parallelism 20:20
with Raku
20:41 dd0701 left 20:42 dd0701 joined 20:43 andreoss left, stoned75 left 20:44 stoned75 joined 20:49 dd0701 left 20:52 k-man left, elcaro left, elcaro joined 20:55 mowcat joined 20:57 k-man joined 20:59 brtastic left 21:01 sour left 21:13 stoned75 left, farcas1982regreg left
poohman_1 hello all, what is the equality operator or inequality operator to check if something is Nil - i keep getting use of Nil in string context 21:29
21:29 poohman_1 left 21:30 poohman_1 joined
AlexDaniel poohman_1: usually you'd use .defined 21:30
m: say Nil.defined
camelia False
AlexDaniel if it has to be an operator then maybe `$x ~~ Nil` 21:31
poohman_1 $Match<something>.made~~Nil - would that make sense?? 21:32
moritz usually just checks for defined 21:33
AlexDaniel yeah, usually that'd be $Match<something>.made.defined
or even better `with $Match<something>.made { .say }` 21:34
poohman_1 but the last example would not give me Bool, would it/ 21:35
?
AlexDaniel poohman_1: yeah, but you asked about checking if something is Nil 21:36
it won't give you Bool but it does check :)
poohman_1 ok I meant as a condition 21:37
:) - thanks
21:40 aborazmeh left
poohman_1 m: $a="ffff";say $a.int; 21:58
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3<BOL>7⏏5$a="ffff";say $a.int;
poohman_1 m: my $a="ffff";say $a.int;
camelia No such method 'int' for invocant of type 'Str'. Did you mean 'Int'?
in block <unit> at <tmp> line 1
poohman_1 m: my $a="ffff";say $a.Int;
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5ffff' (indicated by ⏏)
in block <unit> at <tmp> line 1
timotimo m: my $a = "ffff"; say :16($a) 21:59
camelia 65535
timotimo m: my $a = "ffff"; say "0x$a".Int
camelia 65535
poohman_1 m: my $a="0000";my $b="0010"; my @c = 16(@a) .. 16(@b); say @c; 22:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@a' is not declared. Did you mean '$a'?
at <tmp>:1
------> 3my $a="0000";my $b="0010"; my @c = 16(7⏏5@a) .. 16(@b); say @c;
poohman_1 m: my $a="0000";my $b="0010"; my @c = 16($a) .. 16($b); say @c; 22:03
camelia No such method 'CALL-ME' for invocant of type 'Int'
in block <unit> at <tmp> line 1
poohman_1 m: my $a="0000";my $b="0010"; my @c = 0 .. 16; say @c; 22:04
camelia [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
poohman_1 m: my $a="0000";my $b="0010"; my @c = :16($a) .. :16($b); say @c; 22:05
camelia [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
poohman_1 cool 22:06
any way to display @c also in hex?
tobs m: my @c = 0..16; say @c.map(*.base(16)) 22:07
camelia (0 1 2 3 4 5 6 7 8 9 A B C D E F 10)
poohman_1 cool - thanks timotimo and tobs 22:08
tobs poohman_1: this calls the .base(16) method on everything in @c and collects the results
timotimo i prefer .fmt for that tbh
m: my @c = 0..16; say @c.fmt("%0x")
camelia 0 1 2 3 4 5 6 7 8 9 a b c d e f 10
timotimo m: my @c = 0..16; say @c.fmt("%02x") 22:09
camelia 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10
timotimo m: my @c = 0..16; say @c.fmt("«0x%02x»")
camelia «0x00» «0x01» «0x02» «0x03» «0x04» «0x05» «0x06» «0x07» «0x08» «0x09» «0x0a» «0x0b» «0x0c» «0x0d» «0x0e» «0x0f» «0x10»
timotimo m: my @c = 0..16; say @c.fmt("«0x%02x»", " ←=→ ")
camelia «0x00» ←=→ «0x01» ←=→ «0x02» ←=→ «0x03» ←=→ «0x04» ←=→ «0x05» ←=→ «0x06» ←=→ «0x07» ←=→ «0x08» ←=→ «0x09» ←=→ «0x0a» ←=→ «0x0b» ←=→ «0x0c» ←=→ «0x0d» ←=→ «0x0e» ←=…
poohman_1 nice - you have any tricks to get it in upper case as well? 22:10
:) 22:11
timotimo of course
m: my @c = 0..16; say @c.fmt("«0x%02X»", " ←=→ ")
camelia «0x00» ←=→ «0x01» ←=→ «0x02» ←=→ «0x03» ←=→ «0x04» ←=→ «0x05» ←=→ «0x06» ←=→ «0x07» ←=→ «0x08» ←=→ «0x09» ←=→ «0x0A» ←=→ «0x0B» ←=→ «0x0C» ←=→ «0x0D» ←=→ «0x0E» ←=…
poohman_1 wow - supercool - thanks
timotimo m: say "hello how are you doing today my friend".samecase("Aa" x 50) 22:12
camelia HeLlO HoW ArE YoU DoInG ToDaY My fRiEnD
poohman_1 m: say "hello how are you doing today my friend".samecase("Aa" x 10) 22:13
camelia HeLlO HoW ArE YoU Doing today my friend
timotimo m: say "hello how are you doing today my friend".samemark("öôóòõø" x 50) 22:14
camelia ḧêĺl̀õ ḧôẃ ̀ãrë ̂ýòũ d̈ôíǹg̃ ẗôd́àỹ m̈ŷ ́f̀r̃iën̂d́
timotimo seems like ø doesn't count as "having a mark"? 22:15
lizmat well, it doesn't ?
22:16 sena_kun joined 22:18 ctilmes joined, Altai-man_ left 22:19 chloekek left 22:27 melezhik joined, melezhik left 22:30 sena_kun left 22:51 poohman_1 left 23:05 pecastro left 23:10 mowcat left 23:38 aborazmeh joined, aborazmeh left, aborazmeh joined 23:40 aborazmeh left 23:52 Sgeo joined 23:55 Sgeo_ left