Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-14

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:05 Praise joined #perl6
00:07 atta joined #perl6
00:29 apiw joined #perl6
00:35 kurahaupo joined #perl6
00:38 kurahaupo_ joined #perl6
00:39 kurahaupo` joined #perl6
00:50 kurahaupo joined #perl6
00:51 virtualsue joined #perl6
00:51 mike__ joined #perl6
00:54 mattn_jp joined #perl6
00:58 mohae joined #perl6
01:02 yeahnoob joined #perl6
01:14 AlexDaniel .tell Skarsnik Hi! I am parsing ≈6000 html files with Gumbo. Although I only store just a couple of tiny bits (Str-s) I am still running out of memory after around 822 files (16Gb RAM). I'm pretty sure that it is not me and something else is leaking this memory. Could be something in Gumbo or could be something in Perl6. Do you have any idea?
01:14 yoleaux AlexDaniel: I'll pass your message to Skarsnik.
01:26 kurahaupo joined #perl6
01:44 arnsholt AlexDaniel: If it's a NativeCall wrapper, the library wrapper probably leaks memory due to hacks and general shenanigans in the NativeCall implementation
01:45 AlexDaniel arnsholt: that sounds horrible
01:45 AlexDaniel I'm so disappointed with that script actually
01:45 AlexDaniel first I got into 「hyper」 problems
01:45 arnsholt That's because it is kinda terrible, yeah =/
01:45 arnsholt I perpetrated some of said hacks originally. Kinda regretting taking it in that direction, in hindsight
01:46 AlexDaniel then double free or corruption thingy when using just 「start」 blocks
01:46 AlexDaniel so all disappointed I dropped everything and went with a simple algorithm that does things in serial without that parallel magic
01:46 arnsholt I've never worked on the concurrency stuff, so *probably* not my fault in those cases =)
01:46 AlexDaniel and now it eats 16 gb memory 1/10 way through…
01:47 AlexDaniel I should probably get more memory…
01:48 AlexDaniel 160 gb should probably work
01:48 * AlexDaniel cries in the corner
01:48 arnsholt Yeah, that memory leak is really annoying. Unfortunately it's tricky to fix as it's probably best fixed by a non-trivial redesign of bits of NativeCall
01:48 arnsholt Well, you can always just split the job into pieces
01:49 arnsholt 100 files at a time or whatever
01:49 AlexDaniel arnsholt: and now you're saying that it will be fixed after a *redesign*. I'll go hang myself, this script is never going to be done…
01:49 AlexDaniel yeah, I've thought about that. Yes, that will complicate everything but it will work
01:50 arnsholt If you really do need the data from all 6000 files in memory at the same time, write one script to dump the data from each file to JSON or whatever and another to read in the mess of JSON and do the processing
01:51 arnsholt It's a bit messy, but that's generally how things get done =)
01:51 arnsholt Also, it's a kind of approach that you can't avoid in truly large-scale scenarios
01:52 AlexDaniel arnsholt: Yes, I know, it is possible to make it work. But it's not as simple because these are not just 6000 files, I'm building a rather deep structure (hash in array in hash etc…) out of 1-2 strings from each page
01:53 arnsholt Should be dumpable to JSON, no? Then you don't have to do any nasty serializing and parsing logic on your own
01:53 arnsholt Just use one of the JSON modules to handle it
01:54 AlexDaniel yeah, that's what I'm building in the end. JSON.
01:55 AlexDaniel arnsholt: I'm just unhappy because currently it is a simple 100 line script which *should* work. Sure enough I can split it in a hunder of 1-line script so that the memory is cleaner correctly, but…
01:55 AlexDaniel hundred*
01:56 AlexDaniel scripts*
01:56 AlexDaniel cleaned* geez
01:57 AlexDaniel arnsholt: I'm also unhappy because e.g. I can't find a way to report “double free or corruption” thingy
01:57 AlexDaniel arnsholt: I've seen it several times, it happens after a while if you're using a couple of 「start」 blocks. But I cannot narrow it down to something reportable
01:58 AlexDaniel .tell Skarsnik you may also read this: http://irclog.perlgeek.de/perl6/2016-02-14#i_12037219 who knows, maybe you're the right person to fix this :)
01:58 yoleaux AlexDaniel: I'll pass your message to Skarsnik.
02:00 AlexDaniel arnsholt: and I don't think that a 100-line script that parses 800 files an crashes after 1+ hours is a good candidate for a script that could be attached to the bug report.
02:23 raiph joined #perl6
02:24 molaf_ joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:47 perlawhirl joined #perl6
02:48 perlawhirl hi perlers
02:49 perlawhirl just wonderin about the best way to check if a word contains a particular diacritic, eg a GRAVE
02:49 perlawhirl my $word = 'papà'; say so $word.comb.grep( *.uniname.contains('GRAVE') );
02:49 perlawhirl m: my $word = 'papà'; say so $word.comb.grep( *.uniname.contains('GRAVE') );
02:49 camelia rakudo-moar 97eafa: OUTPUT«True␤»
02:50 perlawhirl so that's what i came up with... any other suggestions
02:51 perlawhirl m: my $word = 'papà'; say $word.comb».uniname.contains('GRAVE');
02:51 camelia rakudo-moar 97eafa: OUTPUT«True␤»
02:53 perlawhirl that's a little nicer i guess
03:04 AlexDaniel perlawhirl: hold on
03:05 geekosaur m: my $word = 'papà'; say so $word ~~ /<:name(/GRAVE/)>/;
03:05 camelia rakudo-moar 97eafa: OUTPUT«True␤»
03:05 AlexDaniel m: .say for ‘à’.NFD».chr».Str».uniname
03:05 camelia rakudo-moar 97eafa: OUTPUT«LATIN SMALL LETTER A␤COMBINING GRAVE ACCENT␤»
03:05 AlexDaniel m: .say for ‘à’.NFD».chr».uniname
03:05 camelia rakudo-moar 97eafa: OUTPUT«LATIN SMALL LETTER A␤COMBINING GRAVE ACCENT␤»
03:05 geekosaur m: my $word = 'papà'; say so $word.NFD ~~ /\x0300/;
03:05 camelia rakudo-moar 97eafa: OUTPUT«False␤»
03:06 geraud joined #perl6
03:06 geekosaur whoops
03:06 AlexDaniel m: .say for ‘à’.NFD».chr».uniprop
03:06 camelia rakudo-moar 97eafa: OUTPUT«Ll␤Mn␤»
03:06 AlexDaniel perlawhirl: perhaps you might want to look at Mn prop after getting your string in NFD form
03:07 noganex_ joined #perl6
03:07 AlexDaniel m: say [~] (0..0x1FFFF ==> grep { .uniprop eq ‘Mn’ })».chr
03:07 camelia rakudo-moar 97eafa: OUTPUT«…»
03:08 AlexDaniel m: say ‘a’ ~ [~] (0..0x1FFFF ==> grep { .uniprop eq ‘Mn’ })».chr
03:08 camelia rakudo-moar 97eafa: OUTPUT«…»
03:08 AlexDaniel camelia: honestly I have no idea why you can't print that
03:13 flussence m: say (0..0x1FFFF ==> grep { .uniprop eq ‘Mn’ }).elems
03:14 camelia rakudo-moar 97eafa: OUTPUT«1327␤»
03:15 perlawhirl AlexDaniel: i like your fist one. i knew there'd be a nice and short way using smartmatch
03:15 petercommand m: say <1 2 3>
03:15 camelia rakudo-moar 97eafa: OUTPUT«(1 2 3)␤»
03:15 perlawhirl m: my $word = 'papà'; say so $word ~~ /<:name(/GRAVE/)>/;
03:15 camelia rakudo-moar 97eafa: OUTPUT«True␤»
03:15 geekosaur I think you meant mine
03:15 petercommand m: say <<1 2> 2 3>
03:15 camelia rakudo-moar 97eafa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6zNeEhivrf␤Unable to parse expression in shell-quote words; couldn't find final '>>' ␤at /tmp/6zNeEhivrf:1␤------> 3say <<1 2> 2 3>7⏏5<EOL>␤    expecting any of:␤        argument list␤        …»
03:15 perlawhirl oh
03:15 perlawhirl sorry geekosaur
03:15 perlawhirl it was you :D
03:15 AlexDaniel xD
03:15 petercommand m: say < <1 2> 2 3>
03:15 camelia rakudo-moar 97eafa: OUTPUT«Value of type List uselessly passed to val()  in block <unit> at /tmp/X2DdUDIfjO line 1␤(<1 2> 2 3)␤»
03:16 petercommand at first i thought i can do nested list using this syntax, but turns out i can't
03:16 AlexDaniel perlawhirl: just keep in mind that if you're looking for GRAVE then you basically get all these:
03:16 AlexDaniel m: say [~] (0..0x1FFFF ==> grep { .uniname ~~ /GRAVE/ })».chr
03:16 camelia rakudo-moar 97eafa: OUTPUT«`ÀÈÌÒÙàèìòùǛǜǸǹȀȁȄȅȈȉȌȍȐȑȔȕˋˎ˴˵̖̀̏̀ЀЍѐѝѶѷ॓ᐠ᷀᷅᷆᷈᷉ḔḕṐṑẀẁẦầẰằỀềỒồỜờỪừỲỳ⛼`????????????????␤»
03:17 geekosaur petercommand, < > quotes the insie, so embdded < > are no longer special
03:17 AlexDaniel perlawhirl: which, for exmple, contains HEADSTONE GRAVEYARD SYMBOL
03:17 perlawhirl AlexDaniel: all good... not actually solving anything for myself. i saw a perl question on SO, and was just thinking to myself how much easier these sorts of things are in perl6
03:17 AlexDaniel .u HEADSTONE GRAVEYARD SYMBOL
03:17 yoleaux U+26FC HEADSTONE GRAVEYARD SYMBOL [So] (⛼)
03:17 geekosaur yeh, I was thinking that it might want spaces
03:18 geekosaur m: my $word = 'papà'; say so $word ~~ /<:name(/ GRAVE /)>/;
03:18 camelia rakudo-moar 97eafa: OUTPUT«True␤»
03:18 geekosaur although that could potentially lose too, come to think of it
03:18 AlexDaniel m: my $word = 'pap⛼'; say so $word ~~ /<:name(/ GRAVE /)>/;
03:18 camelia rakudo-moar 97eafa: OUTPUT«True␤»
03:18 geekosaur m: say [~] (0..0x1FFFF ==> grep { .uniname ~~ /GRAVE$/ })».chr
03:18 camelia rakudo-moar 97eafa: OUTPUT«ÀÈÌÒÙàèìòùǛǜǸǹȀȁȄȅȈȉȌȍȐȑȔȕЀЍѐѝᐠ᷆᷈ḔḕṐṑẀẁẦầẰằỀềỒồỜờỪừỲỳ????????????????␤»
03:19 geekosaur m: say [~] (0..0x1FFFF ==> grep { .uniname ~~ /GRAVE$$/ })».chr
03:19 camelia rakudo-moar 97eafa: OUTPUT«ÀÈÌÒÙàèìòùǛǜǸǹȀȁȄȅȈȉȌȍȐȑȔȕЀЍѐѝᐠ᷆᷈ḔḕṐṑẀẁẦầẰằỀềỒồỜờỪừỲỳ????????????????␤»
03:19 geekosaur sigh
03:19 AlexDaniel $ was ok :)
03:19 geekosaur doin it wrong
03:19 sortiz joined #perl6
03:19 sortiz \o #perl6
03:19 yoleaux 13 Feb 2016 11:46Z <lizmat> sortiz: the || suggestion gives a tiny slowdown in my benchmarks, so I didn't apply that
03:19 perlawhirl m: say [~] (0..0x1FFFF ==> grep { .uniname ~~ /<< GRAVE >>/ })».chr
03:19 camelia rakudo-moar 97eafa: OUTPUT«`ÀÈÌÒÙàèìòùǛǜǸǹȀȁȄȅȈȉȌȍȐȑȔȕˋˎ˴˵̖̀̏̀ЀЍѐѝѶѷ॓ᐠ᷀᷅᷆᷈᷉ḔḕṐṑẀẁẦầẰằỀềỒồỜờỪừỲỳ`????????????????␤»
03:20 AlexDaniel .u Ǹ
03:20 yoleaux U+01F8 LATIN CAPITAL LETTER N WITH GRAVE [Lu] (Ǹ)
03:20 perlawhirl .u ˎ
03:20 yoleaux U+02CE MODIFIER LETTER LOW GRAVE ACCENT [Lm] (ˎ)
03:20 geekosaur oh, it does end with it
03:20 AlexDaniel perlawhirl: perhaps if you want to get just letters than you have to look for Lu property + GRAVE
03:20 AlexDaniel then*
03:21 AlexDaniel that being said, I still think that NFD is the only accurate solution
03:21 mr-foobar joined #perl6
03:22 perlawhirl sometime like... $word ~~ /<:name(/ <:Lu> .+ GRAVE$ /)>/;
03:22 perlawhirl should work for most things
03:22 perlawhirl m: my $word = 'teˎst'; say $word ~~ /<:name(/ <:Lu> .+ GRAVE$ /)>/;
03:22 camelia rakudo-moar 97eafa: OUTPUT«Nil␤»
03:23 perlawhirl goodo
03:23 perlawhirl m: my $word = 'papà'; say $word ~~ /<:name(/ <:Lu> .+ GRAVE$ /)>/;
03:23 camelia rakudo-moar 97eafa: OUTPUT«「à」␤»
03:24 AlexDaniel perlawhirl: why would you want to do that, by the way?
03:24 AlexDaniel I mean, what's the reason why this question was asked?
03:24 perlawhirl oh like i said... just thinking about the problem cause i saw a perl5 question on so.
03:25 perlawhirl if you're interested: http://stackoverflow.com/questions/35375557/regex-match-character-with-specific-diacritic
03:25 sortiz .tell lizmat I was assuming that less bytecode implies less opcodes so better times, That worries me, I need to make a deeper analysis.
03:25 yoleaux sortiz: I'll pass your message to lizmat.
03:25 perlawhirl after i tried a few things and failed i was thinking, geez this is so much easier in perl6
03:26 perlawhirl and then was just wondering about the best way to actually do it in perl6
03:27 perlawhirl to be clear... i don't really have a problem i'm looking to solve... just thinking out loud :D
03:27 geekosaur m: my $word = 'papx̀'; say $word ~~ /<:name(/ <:Lu> .+ GRAVE$ /)>/;
03:27 camelia rakudo-moar 97eafa: OUTPUT«Nil␤»
03:27 geekosaur didn't think so
03:28 perlawhirl geekosaur: yep, already tested that it also doesn't pick up 'ˎ'
03:28 perlawhirl .u ˎ
03:28 yoleaux U+02CE MODIFIER LETTER LOW GRAVE ACCENT [Lm] (ˎ)
03:29 perlawhirl m: my $word = 'teˎst'; say so $word ~~ /<:name(/ <:Lu> .+ GRAVE$ /)>/;
03:29 camelia rakudo-moar 97eafa: OUTPUT«False␤»
03:29 perlawhirl which is what you would want if you were trying to solve this issue
03:30 AlexDaniel perlawhirl: oh, the answer to this question is really simple
03:33 AlexDaniel if only I could make Uni act like a list…
03:33 AlexDaniel ah, lit
03:33 AlexDaniel 「list」
03:33 AlexDaniel m: say so ‘àầằèềḕìǹòồṑùǜừẁỳ’.NFD.list.grep: 768
03:33 camelia rakudo-moar 97eafa: OUTPUT«True␤»
03:33 AlexDaniel perlawhirl: ↑ that's it
03:34 AlexDaniel after NFD that grave will end up being COMBINING GRAVE ACCENT
03:34 AlexDaniel so just search for it and that's it
03:35 AlexDaniel it also has a nice effect of finding real COMBINING GRAVE ACCENT (which is good!)
03:38 perlawhirl that's cool
03:39 cognominal joined #perl6
03:42 raiph joined #perl6
03:55 petercommand what does the * mean in something like *@var?
04:00 petercommand is there any doc i can refer to?
04:01 sortiz petercommand, search for Slurpy Parameters in http://doc.perl6.org/type/Signature
04:01 AlexDaniel Hotkeys: my@h – that's something :D
04:02 geekosaur http://design.perl6.org/S06.html#List_parameters
04:02 Hotkeys heh
04:02 Hotkeys who needs whitespace
04:02 Hotkeys not this guy
04:02 Hotkeys the only one you can't do it with is the \ sigil
04:03 petercommand sortiz: thx!
04:03 petercommand geekosaur: :D
04:03 petercommand thanks, geekosaur
04:04 TEttinger joined #perl6
04:11 skids joined #perl6
04:11 jack_rabbit joined #perl6
04:14 b2gills m: say ("abàầằèềḕìǹòồṑùǜừẁỳy" ~~ m:g/(.) <?{ $0.Str.NFD.any == "\c[COMBINING GRAVE ACCENT]".ord }>/)».Str
04:14 camelia rakudo-moar 97eafa: OUTPUT«(à ầ ằ è ề ḕ ì ǹ ò ồ ṑ ù ǜ ừ ẁ ỳ)␤»
04:38 rurban joined #perl6
04:45 kaare_ joined #perl6
04:47 perlawhirl joined #perl6
04:58 revhippie left #perl6
05:04 Herby_ joined #perl6
05:07 Herby_ Evening, everyone!
05:10 Herby_ m: "Skyfall" ~~ /Sky 'fall'?/;
05:10 camelia rakudo-moar 97eafa: ( no output )
05:10 sortiz good * Herby_
05:10 Herby_ \o
05:10 Herby_ m: say "Skyfall" ~~ /Sky 'fall'?/;
05:10 camelia rakudo-moar 97eafa: OUTPUT«「Skyfall」␤»
05:10 Herby_ m: say "Sky" ~~ /Sky 'fall'?/;
05:10 camelia rakudo-moar 97eafa: OUTPUT«「Sky」␤»
05:11 Herby_ flipping through the "Perl 6 Modules 'Want List'"
05:11 Herby_ to see if there are any I can tackle
05:14 Herby_ exciting Saturday night, I know.
05:17 Herby_ m: say "Skyfalling" ~~ /Sky 'fall'?/;
05:17 camelia rakudo-moar 97eafa: OUTPUT«「Skyfall」␤»
05:17 Herby_ m: say "Skyfalling" ~~ /Sky 'fall'?>>/;
05:17 camelia rakudo-moar 97eafa: OUTPUT«Nil␤»
05:19 neilb_ joined #perl6
05:33 mr-foobar joined #perl6
05:33 sortiz .seen hoelzro
05:33 yoleaux I saw hoelzro 12 Feb 2016 21:05Z in #perl6: <hoelzro> I was going to say "2215?! Perl 6 really *is* a one-hundred year language!"
05:41 sortiz .ask hoelzro Reading your changes for multi-line, in nqp, why is $more-code-sentinel outside of the class, more over, why not an attribute?
05:41 yoleaux sortiz: I'll pass your message to hoelzro.
05:45 Cabanossi joined #perl6
06:18 rurban joined #perl6
06:20 rurban joined #perl6
06:27 kurahaupo joined #perl6
06:39 sortiz .tell hoelzro Seems to me that other exceptions to catch are those produced by HLL::Grammar.FAILGOAL, method that I suppose can be overridden too.
06:40 yoleaux sortiz: I'll pass your message to hoelzro.
06:55 kurahaupo_ joined #perl6
06:56 kurahaupo joined #perl6
06:57 ramon joined #perl6
07:36 secwang joined #perl6
07:50 virtualsue joined #perl6
07:56 CIAvash joined #perl6
08:02 Actualeyes left #perl6
08:03 Averna joined #perl6
08:04 kurahaupo joined #perl6
08:07 spider-mario joined #perl6
08:12 darutoko joined #perl6
08:13 kurahaupo joined #perl6
08:19 Laurent_R joined #perl6
08:29 nine Good morning!
08:29 yoleaux 13 Feb 2016 16:51Z <jnthn> nine: I don't know that we need to do anything; a pass with some passing TODO'd tests is still a perfectly fine pass.
08:30 nine .tell jnthn well our test harness counts test files with passing TODOs as failed. Seems like a good thing for the master tests but not for 6.c.
08:30 yoleaux nine: I'll pass your message to jnthn.
08:43 masak morning, nine
08:47 firstdayonthejob joined #perl6
09:04 hankache joined #perl6
09:04 rindolf joined #perl6
09:05 dayangkun joined #perl6
09:10 nine Looks like we already fail 15 6.c tests :/
09:12 masak wow, how did that happen?
09:15 nine I guess people just don't run the 6.c tests before committing
09:17 dolmen joined #perl6
09:20 wwwbukolaycom joined #perl6
09:24 dalek rakudo/nom: 66628aa | (Stefan Seifert)++ | src/core/CompUnit/Repository (3 files):
09:24 dalek rakudo/nom: CompUnit::Repository::resolve
09:24 dalek rakudo/nom:
09:24 dalek rakudo/nom: New method to ask the repository chain if a module matching the given
09:24 dalek rakudo/nom: DependencySpecification is available. This could for example be used
09:24 dalek rakudo/nom: by panda to avoid trying to install an already installed module.
09:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/66628aa372
09:24 dalek rakudo/nom: 062e7aa | (Stefan Seifert)++ | src/core/CompUnit/ (3 files):
09:24 dalek rakudo/nom: Centralize more precompilation code
09:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/062e7aabea
09:24 dalek rakudo/nom: d71f42f | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
09:24 dalek rakudo/nom: CompUnit::Repository::Installation::uninstall
09:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d71f42febe
09:24 dalek rakudo/nom: 8ca26ce | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
09:24 dalek rakudo/nom: Fixes for installing from outside a dists directory
09:24 dalek rakudo/nom:
09:24 dalek rakudo/nom: Use the stable names instead of local file paths when generating file
09:24 dalek rakudo/nom: ids. This way those ids no longer depend on the current working
09:24 dalek rakudo/nom: directory. Previously we used  the path like "./lib/Foo.pm6" for
09:24 dalek rakudo/nom: generating the id and would end up with a different id if installing the
09:24 dalek rakudo/nom: file by using e.g. "modules/Foo/lib/Foo.pm6".
09:24 dalek rakudo/nom:
09:24 dalek rakudo/nom: Only affects newly installed dists.
09:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8ca26cebb4
09:28 mr-foobar joined #perl6
09:49 apiw joined #perl6
10:01 ely-se joined #perl6
10:03 RabidGravy joined #perl6
10:06 dalek rakudo/nom: 123c7aa | moritz++ | src/core/Seq.pm:
10:06 dalek rakudo/nom: Fix RT #127492
10:06 dalek rakudo/nom:
10:06 dalek rakudo/nom: .perl of an already iterated Seq died instead of producing
10:06 dalek rakudo/nom: a string that, when EVAL()ed, produces a Seq that has been
10:06 dalek rakudo/nom: iterated.
10:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/123c7aadfb
10:06 dalek roast: 760dbe8 | moritz++ | S32-list/seq.t:
10:06 dalek roast: RT #127492: .perl on a consumed Seq
10:06 dalek roast: review: https://github.com/perl6/roast/commit/760dbe8465
10:08 frankjh joined #perl6
10:14 Laurent_R_ joined #perl6
10:14 secwang joined #perl6
10:18 perlawhirl joined #perl6
10:19 hankache joined #perl6
10:25 dalek ecosystem: 9d0a2a7 | jamesneko++ | META.list:
10:25 dalek ecosystem: Add Dice::Roller to ecosystem
10:25 dalek ecosystem:
10:25 dalek ecosystem: RPG-style dice string rolling tool: https://github.com/jamesneko/dice-roller
10:25 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/9d0a2a74d0
10:25 dalek ecosystem: 0e483b4 | azawawi++ | META.list:
10:25 dalek ecosystem: Merge pull request #154 from jamesneko/patch-1
10:25 dalek ecosystem:
10:25 dalek ecosystem: Add Dice::Roller to ecosystem
10:25 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/0e483b4c4d
10:31 pmurias joined #perl6
10:31 pmurias nine: it seems that we need the proposed tracking of the 6.c passing master
10:32 nine pmurias: definitely. Without appropriate tooling, this is doomed to fail.
10:33 wbill joined #perl6
10:34 leont joined #perl6
10:48 wbill joined #perl6
10:51 uruwi joined #perl6
10:51 uruwi Hello, short question.
10:52 p6newbee joined #perl6
10:54 uruwi Is there any way to make parsing with grammars treat whitespace as significant?
10:54 uruwi If you're asking why I'd do that: this project is for fun.
10:57 apiw joined #perl6
10:58 masak uruwi: using `rule` instead of `regex` or `token` in a grammar will make whitespace significant.
10:58 masak uruwi: but I'm not 100% sure that's what you're asking about.
10:58 masak here, let me provide an example.
10:59 masak m: grammar G { token TOP { foo bar } }; say ?G.parse("foobar"); say ?G.parse("foo bar")
10:59 camelia rakudo-moar 123c7a: OUTPUT«Potential difficulties:␤    Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤    at /tmp/Tx3QcXc0QZ:1␤    ------> 3grammar G { token TOP { foo…»
10:59 masak heh :)
10:59 masak m: grammar G { rule TOP { foo bar } }; say ?G.parse("foobar"); say ?G.parse("foo bar")
10:59 camelia rakudo-moar 123c7a: OUTPUT«False␤True␤»
11:00 uruwi m: grammar G {rule TOP { <a>* }; rule a { 0 | 1 | 2 } }; say G.parse("012012");
11:00 camelia rakudo-moar 123c7a: OUTPUT«Nil␤»
11:00 uruwi ^ this is what I mean
11:01 uruwi m: grammar G { regex TOP { <a>* }; token a { 0 | 1 | 2 } }; say G.parse("012012");
11:01 camelia rakudo-moar 123c7a: OUTPUT«「012012」␤ a => 「0」␤ a => 「1」␤ a => 「2」␤ a => 「0」␤ a => 「1」␤ a => 「2」␤»
11:01 uruwi m: grammar G { rule TOP { <a>* }; token a { 0 | 1 | 2 } }; say G.parse("012012");
11:01 camelia rakudo-moar 123c7a: OUTPUT«「012012」␤ a => 「0」␤ a => 「1」␤ a => 「2」␤ a => 「0」␤ a => 「1」␤ a => 「2」␤»
11:01 uruwi m: grammar G { rule TOP { <a>* }; rule a { 0 | 1 | 2 } }; say G.parse("012012");
11:01 camelia rakudo-moar 123c7a: OUTPUT«Nil␤»
11:02 uruwi m: grammar G { rule TOP { <a>* }; regex a { 0 | 1 | 2 } }; say G.parse("012012");
11:02 camelia rakudo-moar 123c7a: OUTPUT«「012012」␤ a => 「0」␤ a => 「1」␤ a => 「2」␤ a => 「0」␤ a => 「1」␤ a => 「2」␤»
11:02 uruwi Is there any performance benefit to using rule instead of regex?
11:03 uruwi Or is the only difference the treatment of whitespace?
11:03 uruwi Oh wait, rule doesn't backtrack
11:03 uruwi So it's more similar to token in that regard.
11:04 masak yes, rule is token + sigspace
11:07 uruwi Thanks anyway!
11:08 BenGoldberg joined #perl6
11:08 [Tux] test            22.139
11:08 [Tux] test-t          12.083
11:08 [Tux] csv-parser      50.672
11:09 masak [Tux]++ # relentless marking of bench
11:17 RabidGravy going back down again
11:18 sftp joined #perl6
11:19 RabidGravy it definitely seems there is a limit around the 12ish
11:19 RabidGravy still struggling to find a nice example of Audio::Liquidsoap without any dependencies
11:21 musiKk joined #perl6
11:26 SCHAAP137 joined #perl6
11:32 telex joined #perl6
11:37 rurban joined #perl6
11:42 mkz joined #perl6
11:53 dolmen joined #perl6
12:00 wbill_ joined #perl6
12:10 uruwi joined #perl6
12:10 uruwi Is anyone else having trouble with deep nesting levels in grammars?
12:11 masak could you be more specific?
12:11 masak I'm pretty sure I've nested hundreds of levels in some of my parses. once you get going, it's hard to stop.
12:11 uruwi More specifically, parsing operator precedences.
12:12 masak that's not specific enough :)
12:13 uruwi Each level I add doubles the time needed for parsing.
12:13 uruwi I'm seeing if I can replace instances of "regex" with "token" instead.
12:14 masak yes, sounds like you need to eliminate some rampant backtracking there
12:14 masak there's a rule of thumb: the more mature and scaled-up the language, the less backtracking should be required
12:15 uruwi Mature in terms of?
12:16 pmurias do we want to have both the line and the column (instead of just the line in exception backtraces)?
12:18 masak uruwi: mature in terms of the purposes it's meant to be put to. a full-fledged programming language is likely to (want to) be mature and have little backtracking.
12:18 masak uruwi: a constraint-satisfaction puzzle is likely to want to make use of a lot of backtracking.
12:19 masak pmurias: I usually like both, yes.
12:19 masak with the caveat that they point to the right place :) something Perl 5 does quite well, and other languages generally less well
12:26 pmurias erlang for a long time didn't display either and still managed to be the cool new thing
12:26 pmurias ;)
12:28 masak LTA error messages are the norm, I fear.
12:34 rurban joined #perl6
12:35 pmurias masak: internally we are using the file positions, it's only when translated for displaying that info gets lost
12:42 rurban joined #perl6
12:43 apiw joined #perl6
12:44 pmurias should "is native(LIB)" be now turned into "is native(LIB, VERSION)"
12:44 pmurias ?
12:45 RabidGravy pmurias, LIB can be a list
12:46 uruwi Fortunately, all that time seems to be spent at the start
12:46 RabidGravy so you can just change LIB to be "my constant LIB = ( 'somelib', v0.1)
12:46 pmurias when using Readline I get a note that I should consider adding a version
12:51 [TuxCM] joined #perl6
12:52 kurahaupo joined #perl6
12:56 ka joined #perl6
12:57 kid51 joined #perl6
13:04 [Tux] joined #perl6
13:13 pmurias joined #perl6
13:17 vendethiel joined #perl6
13:26 firstdayonthejob joined #perl6
13:28 sortiz Can I assume that in a Lock protected block no other thread can't touch the memory of a Blob, nor reallocate it?
13:31 pmurias masak: it's an interesting question how the awesomeness of minor things influences language adoption/fun of use compared to the big things (speed/library support)
13:31 vendethiel o/, #perl6
13:34 pmurias vendethiel: hi
13:34 partly joined #perl6
13:34 partly Hi
13:34 partly I can not figure out how to say List<Int> in perl6
13:35 partly I read the Containers documentation,
13:35 dolmen joined #perl6
13:35 partly Or is this not possible in perl6?
13:37 timotimo m: my Int @foo = 1, 2, 3, 4; say @foo
13:37 camelia rakudo-moar 123c7a: OUTPUT«[1 2 3 4]␤»
13:38 timotimo m: say Array[Int].new(1, 2, 3, 4, 5)
13:38 camelia rakudo-moar 123c7a: OUTPUT«[1 2 3 4 5]␤»
13:42 pmurias do we want the column from HLL::Compiler.line_and_column_of to be 0-indexed or 1-indexed?
13:43 apiw joined #perl6
13:43 partly if i put Array[Int] @haystack in my function signature i get an error
13:43 RabidGravy yes
13:43 RabidGravy you are asking for an Array of Arrays of Ints
13:44 RabidGravy I guess you mean Int @haystack
13:44 partly if i do Int @haystack in function signature and give it an array of ints, i get the error: expected Positional[Int] but got Array
13:45 daxim joined #perl6
13:46 timotimo yeah, type constraints are nominal in perl6
13:46 timotimo you need to actually Array[Int].new(...) or my Int @array ...
13:47 timotimo just because you write [1, 2, 3, 4], you don't get an Array[Int]
13:47 RabidGravy If you really must do something like that then you want something like:
13:47 RabidGravy m: 'sub foo(Array[Int] $a) { say $a }; my Int @b = (^10); foo(@b)
13:47 camelia rakudo-moar 123c7a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s5jxR2Jjwt␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/s5jxR2Jjwt:1␤------> 3) { say $a }; my Int @b = (^10); foo(@b)7⏏5<EOL>␤    expecting any of:␤        sing…»
13:47 partly timotimo: well i would be happy if i could say: here should be something listy which contains ints
13:47 RabidGravy m:  sub foo(Array[Int] $a) { say $a }; my Int @b = (^10); foo(@b)
13:47 camelia rakudo-moar 123c7a: OUTPUT«[0 1 2 3 4 5 6 7 8 9]␤»
13:48 BenGoldberg joined #perl6
13:48 partly ok, i see how this makes sense, but this makes no sense to normal human beeing
13:48 timotimo m: sub test(@arr where *.all ~~ Int) { say "yay" }; test([1, 2, 3, 4])
13:48 camelia rakudo-moar 123c7a: OUTPUT«Constraint type check failed for parameter '@arr'␤  in sub test at /tmp/I4q299kjEZ line 1␤  in block <unit> at /tmp/I4q299kjEZ line 1␤␤»
13:48 timotimo ah, yes
13:49 partly i mean yeah, by using Array[Int] $haystack i get an array while @haystack is positional, but this is weird
13:49 timotimo m: sub test(@arr where *.>>isa(Int).all) { say "yay" }; test([1, 2, 3, 4])
13:49 camelia rakudo-moar 123c7a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6i6CVNZKbj␤Missing dot on method call␤at /tmp/6i6CVNZKbj:1␤------> 3sub test(@arr where *.>>7⏏5isa(Int).all) { say "yay" }; test([1, 2,␤    expecting any of:␤        postfix␤»
13:49 timotimo m: sub test(@arr where *>>.isa(Int).all) { say "yay" }; test([1, 2, 3, 4])
13:49 camelia rakudo-moar 123c7a: OUTPUT«yay␤»
13:49 timotimo m: sub test(@arr where *>>.isa(Int).all) { say "yay" }; test([1, 2, 3, 4, "hey"])
13:49 camelia rakudo-moar 123c7a: OUTPUT«Constraint type check failed for parameter '@arr'␤  in sub test at /tmp/H8LAYaGqKv line 1␤  in block <unit> at /tmp/H8LAYaGqKv line 1␤␤»
13:50 partly ahh nice
13:50 partly timotimo: thank you, this will do
13:51 partly but just out of curiosity, if use Array[Int] $haystack, later in the function @haystack.elems breaks, because it has the wrong sigil, how would i convert it to a @var ?
13:52 timotimo i find that question hard to answer, because ... what do you expect that to do?
13:52 jnthn You'd normally just write Int @haystack, so you don't couple to the exact implementation type being passed.
13:52 yoleaux 08:30Z <nine> jnthn: well our test harness counts test files with passing TODOs as failed. Seems like a good thing for the master tests but not for 6.c.
13:52 timotimo you can use the binding operator (:=) to do that
13:52 RabidGravy or
13:52 jnthn .tell nine Then we should fix our test harness to not do that.
13:52 yoleaux jnthn: I'll pass your message to nine.
13:52 RabidGravy m: sub foo(Array[Int] $a) { my @a = $a.list; say @a }; my Int @b = (^10); foo(@b)
13:52 camelia rakudo-moar 123c7a: OUTPUT«[0 1 2 3 4 5 6 7 8 9]␤»
13:53 RabidGravy or any other squillion methods
13:53 jnthn RabidGravy: That works, but also makes a copy.
13:53 RabidGravy indeed
13:54 partly ahh so i have a reference, which i make by using := or .list method on it back to something listy, right?
13:54 jnthn I find it funny that people start out saying "how do I List<int> in Perl 6", presumably with a C++/Java/C# background given the use of that syntax, then get surprised when they are expected to make the types match on either side - just as C++/Java/C# would make them do. :)
13:54 RabidGravy but yeah, so
13:54 RabidGravy m: sub foo(Int @a ) { say @a }; my Int @b = [^10]; foo(@b) # just works
13:54 camelia rakudo-moar 123c7a: OUTPUT«[0 1 2 3 4 5 6 7 8 9]␤»
13:54 RabidGravy so I'm really not sure what the problem is here
13:55 partly m: sub foo(Int @a) { say @a }; foo([1,2,3])
13:55 camelia rakudo-moar 123c7a: OUTPUT«Type check failed in binding @a; expected Positional[Int] but got Array␤  in sub foo at /tmp/6gQRWjqIuH line 1␤  in block <unit> at /tmp/6gQRWjqIuH line 1␤␤»
13:55 partly does not work
13:55 jnthn partly: Yes because you did not type the thing you are passing
13:56 RabidGravy you can't have it both ways
13:56 partly [] == is not always an array?
13:56 partly or list? or whatever?
13:56 jnthn partly: It's always an *untyped* array.
13:56 partly ahh!
13:56 sortiz m: my Array[Int] $foo .= new(1,2,3,4,5); say $foo.elems; sub f(@a) { say @a.elems }; f(@$foo);
13:56 camelia rakudo-moar 123c7a: OUTPUT«5␤5␤»
13:57 jnthn m: sub foo(Int @a) { say @a }; foo(my Int @ = 1,2,3)
13:57 camelia rakudo-moar 123c7a: OUTPUT«[1 2 3]␤»
13:57 partly i think i understand now my issue. so i misunderstood []
13:58 RabidGravy m: sub foo(Int @a) { say @a }; foo([1,2,3] but Positional[Int]) ; # just do demonstrate
13:58 camelia rakudo-moar 123c7a: OUTPUT«[1 2 3]␤»
13:58 partly thank you all for your patience
13:58 jnthn RabidGravy: That's...naughty :)
13:58 RabidGravy it's all about the naughty here
13:59 * jnthn wonders if we need a better write-up of typed arrays and stuff in the docs somewhere... :)
13:59 partly jnthn: yes please
14:00 wamba joined #perl6
14:00 Ben_Goldberg joined #perl6
14:02 masak partly: Perl 6's type system is nominal. in practice that means that it's not enough for an array to contain only Ints in order to match `Int @array`, it actually has to be declared as an Array[Int]. "nominal", as in "by name", as in you have to declare that it's an Array of Ints.
14:03 partly m: sub foo(Int @f) { say @f }; foo([1,2,'a'] but Positional[Int])
14:03 camelia rakudo-moar 123c7a: OUTPUT«[1 2 a]␤»
14:03 partly masak: so if i say it's Positional[Int] it just believes me, like in the example above?
14:04 partly or is this some kind of weird string to int casting?
14:04 timotimo no, it's just a footgun
14:05 * jnthn advises against `but Positional[Int]` style tricks
14:07 masak yes, that does seem ill-advised
14:07 jnthn Will see if I can find some time to write a bit more in http://doc.perl6.org/language/list#Typing later on today
14:07 masak you're slapping a type onto it, instead of declaring it as the type it actually is
14:08 jnthn Given Perl 6's meta-programming capabilities, the sky's the limit in terms of what you can claim. :-)
14:09 mr-foobar joined #perl6
14:10 timotimo well, at least with the "but" trick you can get it to typecheck any later additions to the array
14:11 jnthn Uh...no you don't :)
14:11 jnthn I don't think so, anyway
14:11 * jnthn bbl
14:14 partly m: my @a = [1,2,3] but Positional[Int]; @a[3] = 'a'.
14:14 camelia rakudo-moar 123c7a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bsxfwV6XxM␤Malformed postfix call␤at /tmp/bsxfwV6XxM:1␤------> 1,2,3] but Positional[Int]; @a[3] = 'a'.7⏏5<EOL>␤»
14:14 partly m: my @a = [1,2,3] but Positional[Int]; @a[3] = 'a';
14:14 camelia rakudo-moar 123c7a: ( no output )
14:14 partly m: my @a = [1,2,3] but Positional[Int]; @a[3] = 'a'; say @a
14:14 camelia rakudo-moar 123c7a: OUTPUT«[1 2 3 a]␤»
14:17 masak boo!
14:18 timotimo oh, damn
14:19 timotimo it doesn't parameterize it properly
14:20 masak haha -- I don't know what you mean by that, but it sounds like Star Trek speak. "it doesn't reverse the polarity!" :P
14:20 masak timotimo: I don't see it as an "error", it's just the foot being shot as ordered IMHO
14:20 timotimo right :)
14:21 masak timotimo: as in, the underlying object that the `but` acts on is *not* typed
14:21 [Tux] joined #perl6
14:22 timotimo right, and the role itself isn't responsible for all the implementations of the methods
14:22 timotimo that's TypedArray
14:22 sortiz From class Lock doc: "A Lock is a low-level constructor for ensuring that only one thread works with a certain object at a given time". That description doesn't seem right or I'm missing something?
14:23 [Tux] joined #perl6
14:23 masak sortiz: the word "constructor" there surprises me.
14:24 sortiz And I understand that a Lock protects a block, not an object.
14:24 rurban joined #perl6
14:25 masak sortiz: looking at the tests and the source, I'd say so too.
14:27 * masak sees no tests for the "reentrant" bit and is left wondering what would be a good code example showing off that
14:30 partly :w
14:30 * masak hugs partly, good vim user!
14:31 partly well it was targeted to spacemacs ;)
14:32 * masak .oO( space-Macs, like the aliens in "Independence Day" are using? )
14:33 partly https://github.com/syl20bnr/spacemacs
14:36 _mg_ joined #perl6
14:43 timotimo it's not space-macs, it's spac-emacs
14:44 timotimo just like run-escape rather than rune-scape
14:46 Actualeyes joined #perl6
14:47 apiw joined #perl6
14:52 dolmen joined #perl6
14:58 apiw joined #perl6
15:14 apiw joined #perl6
15:24 mspo I tried spacemacs and was impressed when emacs found my mouse but a bunch of the installs failed and it seemed a little thrown together
15:25 edehont joined #perl6
15:39 frankjh joined #perl6
15:39 daxim joined #perl6
15:40 CIAvash joined #perl6
15:44 brrt joined #perl6
15:44 dalek doc: 17f6714 | (Eric de Hont)++ | doc/Language/regexes.pod:
15:44 dalek doc: Update regexes.pod
15:44 dalek doc:
15:44 dalek doc: I found a small typo: staring -> starting
15:44 dalek doc: review: https://github.com/perl6/doc/commit/17f67143b3
15:44 dalek doc: 9d3e034 | (Fritz Zaucker)++ | doc/Language/regexes.pod:
15:44 dalek doc: Merge pull request #395 from edehont/patch-1
15:44 dalek doc:
15:44 dalek doc: Update regexes.pod
15:44 dalek doc: review: https://github.com/perl6/doc/commit/9d3e0346d7
15:46 edehont My first pull request EVER!
15:53 _mg_ joined #perl6
15:56 timotimo good! :)
15:56 timotimo may it be the start of something great
16:05 rurban joined #perl6
16:09 khw joined #perl6
16:13 edehont Who knows :-)
16:26 rindolf joined #perl6
16:27 sufrostico joined #perl6
16:34 apiw joined #perl6
16:46 SCHAAP137 joined #perl6
16:48 musiKk joined #perl6
16:50 skids joined #perl6
17:09 rurban1 joined #perl6
17:09 rurban1 left #perl6
17:15 Ben_Goldberg joined #perl6
17:16 moritz regarding rakudo commit 123c7aadfb9ef0c656c3b4fb6281605345a015cf
17:16 moritz would you think it'd be cleaner if I gave Seq a special constructor for creating an already-consumed Seq, and then patch .perl to emit that?
17:23 Juerd I think that makes sense. Maybe just a :named?
17:33 mr-foobar joined #perl6
17:35 apiw joined #perl6
17:41 jnthn moritz: Sounds reasonable, yeah. Seq.already-consumed or so. It'd match up with various Supply factories (Supply.interval, etc.)
17:42 bowtie joined #perl6
17:47 moritz Juerd: named doesn't make sense, because unlike the normal constructor, it doesn't need an iterator
17:48 Juerd moritz: MMD
17:48 AlexDaniel joined #perl6
17:48 Juerd moritz: Different signature, different routine, still 'new'.
17:56 sevvie joined #perl6
18:04 AlexDaniel “LTA error messages are the norm, I fear.” – depends on the community :)
18:04 AlexDaniel security issues are also a norm in some places
18:05 dolmen joined #perl6
18:08 rurban joined #perl6
18:09 rurban2 joined #perl6
18:10 rurban3 joined #perl6
18:11 apiw joined #perl6
18:16 zakharyas joined #perl6
18:18 Skarsnik joined #perl6
18:22 partly when using NativeCall, how do express that a class is in a namespace?
18:23 timotimo C doesn't have namespaces, or classes
18:24 partly I'm trying to wrap a C++ library
18:24 timotimo OK, that's a different thing, then :)
18:24 timotimo i'd presume it'd just be putting a :: in the name?
18:25 Skarsnik probably don't have marshmaling code for namespace
18:25 yoleaux 01:14Z <AlexDaniel> Skarsnik: Hi! I am parsing ≈6000 html files with Gumbo. Although I only store just a couple of tiny bits (Str-s) I am still running out of memory after around 822 files (16Gb RAM). I'm pretty sure that it is not me and something else is leaking this memory. Could be something in Gumbo or could be something in Perl6. Do you have any idea?
18:25 yoleaux 01:58Z <AlexDaniel> Skarsnik: you may also read this: http://irclog.perlgeek.de/perl6/2016-02-14#i_12037219 who knows, maybe you're the right person to fix this :)
18:25 partly timotimo: hmm surprisingly it works now, or at least i get another error. I thought i tried the obvious ::. Thanks anyway :)
18:26 * timotimo has never tried C++ with nativecall
18:31 _mg_ joined #perl6
18:37 MadcapJake my syntax highlighter is being used at github, unfortunately they skip the variable selector and so other rules are getting captured inside of variable names...
18:38 nine jnthn: the Perl 6 versioning guidelines say that changing a method from only to multi is ok. But that would break subclasses that still have the only method wouldn't it?
18:38 yoleaux 13:52Z <jnthn> nine: Then we should fix our test harness to not do that.
18:42 jevin_ joined #perl6
18:47 Ven joined #perl6
18:47 jnthn nine: The only method in the subclass would hide the multi in the base class
18:47 jnthn nine: Got an example to demonstrate the bustage you're worrying about?
18:54 Ven joined #perl6
18:56 BenGoldberg_ joined #perl6
18:56 apiw joined #perl6
18:59 ely-se joined #perl6
19:00 dalek doc: 56e386c | jnthn++ | doc/Language/list.pod:
19:00 dalek doc: Some notes on nominal nature of array typing.
19:00 dalek doc: review: https://github.com/perl6/doc/commit/56e386c12e
19:00 dalek doc: ce52670 | jnthn++ | doc/Language/list.pod:
19:00 dalek doc: Assorted small wording tweaks.
19:00 dalek doc: review: https://github.com/perl6/doc/commit/ce52670a1d
19:02 ka joined #perl6
19:08 brrt joined #perl6
19:11 abaugher joined #perl6
19:16 FROGGS joined #perl6
19:18 apiw joined #perl6
19:23 musiKk joined #perl6
19:27 apiw joined #perl6
19:28 Skarsnik AlexDaniel, it can be XML/perl6 fault. did you use something to track the memory print after each call?
19:28 AlexDaniel Skarsnik: I didn't. What exactly should I try?
19:29 Skarsnik Linux::Proc::Statm? x)
19:29 AlexDaniel hmm ok I'll try
19:29 Skarsnik or read yourself /proc/pid/statm
19:29 AlexDaniel a bit later
19:30 nine jnthn: I don't have an example at hand. Just trying to feel my way around how to best evolve the CompUnit::Repository API
19:32 Begi joined #perl6
19:44 dalek rakudo/nom: bc4c6df | moritz++ | src/core/Seq.pm:
19:44 dalek rakudo/nom: Simplify fix for RT #127492
19:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bc4c6df27c
19:44 arnsholt Skarsnik: 9 times out of 10 it'll be things like explicitly-manage that leaks the memory
19:44 arnsholt NativeCall is inherently leaky, sadly =(
19:44 Skarsnik there is none in Gumbo
19:45 neilb joined #perl6
19:45 arnsholt There are other things that leak too, though
19:46 arnsholt Come to think of it, I'm not sure if structs or arrays are ever freed, for example
19:47 arnsholt (Unless explicitly done in the library code, of course)
19:50 Skarsnik I have a big Perl 6 leak with XML
19:51 Skarsnik I lost 4Mb for each request on the tree on one script
19:51 bowtie joined #perl6
19:53 arnsholt Oh, wow
19:55 Ben_Goldberg joined #perl6
19:55 * jnthn nearly has nqp-m with Moar run with --full-cleanup clean under valgrind leak check; will do similar for Rakudo (though it's not a lot worse). Then it'll be possible to use it to pick out real leaks.
19:58 timotimo jnthn: wow, any new commits coming for that?
19:59 * timotimo does the evil thing where he asks a question and immediaetly afterwards goes AFK
19:59 vendethiel what an evillord.
19:59 jnthn timotimo: It already is like that at HEAD, with the ones I've pushed over the last week or two :)
20:00 jnthn I need to figure out how to get the standard handles cleanly cleaned up is all
20:00 Sqirrel joined #perl6
20:03 Skarsnik nice work jnthn :)
20:03 FROGGS timotimo: I'm working on box2d now btw
20:05 arnsholt jnthn: Oh, very cool!
20:05 arnsholt I really wish I had time to hack on some of these things, but I suspect that'd be a bad idea, sadly
20:07 LGD joined #perl6
20:14 SCHAAP137 joined #perl6
20:20 neilb_ joined #perl6
20:24 spider-mario joined #perl6
20:24 geraud joined #perl6
20:27 hankache joined #perl6
20:48 dalek rakudo/nom: d924ae2 | LLFourn++ | src/ (2 files):
20:48 dalek rakudo/nom: Make require use CompUnit interface for importing
20:48 dalek rakudo/nom:
20:48 dalek rakudo/nom: The following now works:
20:48 dalek rakudo/nom: 1. require 'lib/Module.pm' <sym>;
20:48 musiKk joined #perl6
20:49 dalek joined #perl6
20:49 Begi left #perl6
20:49 yqt joined #perl6
20:50 dalek roast: 45685a3 | lizmat++ | S11-modules/require.t:
20:50 dalek roast: Unfudge now passing test, LLFourn++
20:50 dalek roast: review: https://github.com/perl6/roast/commit/45685a398d
20:52 apiw joined #perl6
20:56 Ben_Goldberg joined #perl6
20:58 revhippie joined #perl6
21:02 dolmen joined #perl6
21:04 jnthn nine: I think https://rt.perl.org/Ticket/Display.html?id=127465 already happened?
21:06 lizmat jnthn: I think it has
21:06 yoleaux 03:25Z <sortiz> lizmat: I was assuming that less bytecode implies less opcodes so better times, That worries me, I need to make a deeper analysis.
21:10 llfourn lizmat: thanks for merging and thanks for noticing that I broke ip5 tests
21:10 yoleaux 13 Feb 2016 14:19Z <nine> llfourn: pr 694 regresses several spec tests in the 6.c branch (some of them the S01 integration tests)
21:10 llfourn oh. thanks to nine as well then :P
21:10 lizmat llfourn: thank you for doing all the hard work  :-)
21:11 andirc8000 joined #perl6
21:11 llfourn .tell nine thanks for noticing that. I've set myself up for testing ip5 now :)
21:11 yoleaux llfourn: I'll pass your message to nine.
21:12 andirc8000 left #perl6
21:15 AlexDaniel Skarsnik: yeah, it is rising like 4MB per each file
21:16 AlexDaniel or more
21:16 AlexDaniel Skarsnik: just a quick test, not a precise result
21:16 lizmat is this on the most recent version of Rakudo?  or a release version
21:16 brrt joined #perl6
21:16 lizmat I seem to recall jnthn fixing a leak related to slurping files in Moar like last week
21:17 AlexDaniel lizmat: the most recent thing, I've built it just a few minutes ago
21:17 AlexDaniel lizmat: well, looking at the way it goes I think that it is better now. But I didn't really measure it before
21:18 Skarsnik AlexDaniel, did you try before/after gumbo parse? I made sure gumbo free its allocated memory.
21:18 nine jnthn: indeed. Closed the ticket. Thanks for pointing this out!
21:18 yoleaux 21:11Z <llfourn> nine: thanks for noticing that. I've set myself up for testing ip5 now :)
21:19 jnthn AlexDaniel: If you know to valgrind it with leak checking, and can arrange to pass --full-cleanup to MoarVM, feel free to gist me an output; it's still a bit noisy.
21:22 AlexDaniel I'll see if I have time for this
21:22 [Sno] joined #perl6
21:22 AlexDaniel Skarsnik: yup. If I call parse-html then it clogs the memory
21:23 AlexDaniel if I do everything else without actually parsing it then I don't see any leaks actually
21:23 Skarsnik well it build a xml tree
21:23 Skarsnik this take perl6 memory
21:24 Skarsnik Can you try using a filter that find nothing? to see if the memory print it the same
21:24 Skarsnik like parse-html(:class<helloworldpiko>)
21:26 mithaldu_ joined #perl6
21:27 mkz joined #perl6
21:30 ugexe m: say (try require Test:xxx); say (try require Test:auth<foo:bar>); say (try require TestXXX);
21:30 camelia rakudo-moar 9c8c3b: OUTPUT«(Test)␤(Test)␤Nil␤»
21:31 AlexDaniel Skarsnik: yep, it is much better with that kind of filter
21:31 Skarsnik a lot?
21:31 AlexDaniel yeah like 5 to 10 times better
21:32 Skarsnik well it only create a xml tree with a html root
21:32 Skarsnik so gumbo does not leak
21:32 Skarsnik since I basicly just convert what gumbo give me to xml objects (and filtering myself)
21:33 AlexDaniel Skarsnik: I think that you're right
21:33 AlexDaniel according to what I see it sounds correct
21:33 lizmat m: class Foo is Date { has $.foo };  dd Foo.new( :2016year, foo => 42)
21:33 camelia rakudo-moar 9c8c3b: OUTPUT«Foo.new(2016,1,1)␤»
21:34 SWAN joined #perl6
21:35 Skarsnik the foo get lost?
21:35 lizmat yup
21:35 Skarsnik m: class Foo is Date { has $.foo };  say Foo.new( :2016year, foo => 42).foo;
21:35 camelia rakudo-moar 9c8c3b: OUTPUT«(Any)␤»
21:36 lizmat incomplete subclassability, is it a bug or not ?  :-)
21:36 AlexDaniel m: class Foo is Date { has $.foo is rw }; dd Foo.new:2016year:42foo:25day
21:36 camelia rakudo-moar 9c8c3b: OUTPUT«Foo.new(2016,1,25)␤»
21:37 AlexDaniel m: class Foo is Date { has $.foo }; Foo.new:2016year:42foo:25day.perl.say
21:37 camelia rakudo-moar 9c8c3b: OUTPUT«Foo.new(2016,1,25)␤»
21:38 apiw joined #perl6
21:38 Skarsnik m: class Foo is Int { has $.foo };  say Foo.new(foo => 42).foo;
21:38 camelia rakudo-moar 9c8c3b: OUTPUT«42␤»
21:38 stmuk are multi-dimensional arrays thread unsafe?
21:38 Skarsnik date is special? x)
21:38 Skarsnik m: class Foo is Date { has $.foo };  say Foo.new(foo => 42).foo;
21:38 camelia rakudo-moar 9c8c3b: OUTPUT«Cannot call Foo.new with these named parameters: foo␤  in block <unit> at /tmp/rKtSThY_af line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3041␤  in block <unit> at /tmp/rKtSThY_af line 1␤␤»
21:39 Skarsnik m: class Foo is Date { has $.foo };  say Foo.new(:foo(42)).foo;
21:39 camelia rakudo-moar 9c8c3b: OUTPUT«Cannot call Foo.new with these named parameters: foo␤  in block <unit> at /tmp/XTrYpMiNWR line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3041␤  in block <unit> at /tmp/XTrYpMiNWR line 1␤␤»
21:39 Skarsnik Oook
21:39 Skarsnik that something
21:39 Skarsnik m: dd Date
21:39 camelia rakudo-moar 9c8c3b: OUTPUT«Date␤»
21:44 jnthn stmuk: Well, they're not vulnerable to resize data races, and you can't pop/push/shift/unshift them, so not vulnerable to those either.
21:45 jnthn stmuk: Non-native ones will still have auto-vivification races.
21:45 jnthn (Of the Scalar container)
21:46 jnthn stmuk: But the array itself is fine.
21:46 stmuk ok thanks
21:47 DrForr Howdy. Looking at the Routine class there appears to be no API to get a name other than to stringify the object.
21:47 jnthn m: say &abs.name
21:47 camelia rakudo-moar 9c8c3b: OUTPUT«abs␤»
21:47 DrForr Sometimes it's the simple things :)
21:49 virtualsue joined #perl6
21:49 dalek doc: d9a18dd | jnthn++ | doc/Type/Routine.pod:
21:49 dalek doc: Document Routine.name.
21:49 dalek doc: review: https://github.com/perl6/doc/commit/d9a18dd8e2
21:50 DrForr OTOH I don't see.. Ah, thanks :)
21:50 jnthn ;)
21:50 * jnthn had Atom open in the directory from doing the patch about typed arrays earlier :)
22:03 neilb_ joined #perl6
22:22 sortiz joined #perl6
22:23 sortiz .
22:31 pierrot joined #perl6
22:43 dalek roast: 25c40d0 | LLFourn++ | S11-modules/ (3 files):
22:43 dalek roast: More require tests
22:43 dalek roast:
22:43 dalek roast: now that #f565f80 has been merged
22:43 dalek roast: review: https://github.com/perl6/roast/commit/25c40d05f7
22:48 hoelzro .
22:48 yoleaux 05:41Z <sortiz> hoelzro: Reading your changes for multi-line, in nqp, why is $more-code-sentinel outside of the class, more over, why not an attribute?
22:48 yoleaux 06:40Z <sortiz> hoelzro: Seems to me that other exceptions to catch are those produced by HLL::Grammar.FAILGOAL, method that I suppose can be overridden too.
22:49 hoelzro sortiz: I don't see any reason for it to not be an attribute; I think I just didn't think of it =)
22:49 hoelzro sortiz: other FAILGOAL exceptions will be for input that has the wrong character, right?
22:49 hoelzro so I don't know if that should trigger multi-line mode
22:49 sortiz hoelzro, Hi.
22:50 hoelzro o/
22:50 sortiz I try, for exmaple my @a = [
22:50 sortiz Or my $b = <
22:51 sortiz All those die in FAILGOAL
22:51 hoelzro ahhh
22:52 sortiz But that's a naked nqp::die
22:52 sortiz (via Grammar.panic)
22:53 apiw joined #perl6
22:54 sortiz see https://github.com/salortiz/nqp/blob/master/src/HLL/Grammar.nqp#L279
22:54 dalek rakudo/nom: 585619f | lizmat++ | src/core/Date.pm:
22:54 dalek rakudo/nom: Make Date fully subclassable
22:54 dalek rakudo/nom:
22:54 dalek rakudo/nom: When using additional named parameters, obviously.  This shouldn't
22:54 dalek rakudo/nom: affect efficiency of the base class measurably.
22:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/585619f35a
22:55 lizmat m: class Foo is Date { has $.foo };  dd Foo.new( :2016year, foo => 42).foo  # should work after ^^^
22:55 camelia rakudo-moar 9c8c3b: OUTPUT«Any␤»
22:55 dolmen joined #perl6
22:58 sortiz So seems to me a good candidate for detect the need of more input. What do yo think?
23:09 uruwi joined #perl6
23:09 uruwi Quick question: what are mergesubstates and mergesubrule?
23:13 uruwi These are taking half of the total time needed to start parsing
23:14 lizmat good night, #perl6!
23:15 uruwi Good night
23:15 sortiz 'night, lizmat
23:16 uruwi But really, it's taking about a minute to start, though when it's past it can whiz through the source.
23:16 uruwi I guess it's related to optimization?
23:23 uruwi Grammar I'm trying to use is here: https://github.com/bluebear94/u/blob/master/u.pl6
23:25 dalek ecosystem: cc75770 | RabidGravy++ | META.list:
23:25 dalek ecosystem: Add Audio::Liquidsoap
23:25 dalek ecosystem:
23:25 dalek ecosystem: See https://github.com/jonathanstowe/Audio-Liquidsoap
23:25 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/cc7577005a
23:25 skids uruwi: likely the folks that could answer that questionn are asleep right now.
23:32 RabidGravy I got bored of trying to think of any more dependency-free examples
23:52 apiw joined #perl6
23:54 TEttinger joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo