# IRC log for #perl6, 2016-02-21

All times shown according to UTC.

Time Nick Message
00:00 AlexDaniel Juerd: ok I think that there's an easier way to confirm your solution…
00:01 AlexDaniel I'll just slam random input into your solution and into mine, let's see if it finds any bugs…
00:11 AlexDaniel m: say ‘abc’ eq ‘abc’ eq ‘abc’ eq ‘abc’
00:12 AlexDaniel m: my @a = ‘abc’, ‘abc’, ‘abc’, ‘abc’; say [eq] @a
00:13 autarch joined #perl6
00:16 poele joined #perl6
00:22 AlexDaniel Juerd: yeah!
00:24 AlexDaniel Juerd: https://gist.github.com/AlexDaniel/791f4994d35e2d8a63b1
00:27 Juerd AlexDaniel: What the...
00:27 AlexDaniel ya :)
00:28 Juerd AlexDaniel: That's not even valid input, though :)
00:28 Juerd That can never happen in a game
00:28 AlexDaniel errr, are you sure?
00:28 AlexDaniel I mean *exactly* this input is not going to happen
00:28 Juerd Yes, games always grow from the center.
00:28 AlexDaniel but a similar situation probably can
00:29 Juerd Show me :)
00:29 Juerd (Regardless, I have no idea what's happening here!)
00:30 Juerd Oh, 8 requires special treatment :(
00:31 poele left #perl6
00:31 Juerd That is, for the edge
00:31 Juerd I think I'll leave it at the current state
00:31 Juerd Feel free to debug if you do like to
00:32 Hotkeys what's the best way to find the next existing number in an array given a number that doesn't exist
00:32 damnlie joined #perl6
00:32 Hotkeys eg
00:33 Hotkeys given @a = [1, 7, 9, 10] and \$n = 2, how would I get 7?
00:33 Hotkeys oh wait
00:34 Hotkeys m: @a.first(*
00:34 camelia rakudo-moar 8fdaad: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7Gn1ss7sg7␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/7Gn1ss7sg7:1␤------> 3a.first(*7⏏5<EOL>␤»
00:34 Hotkeys er
00:34 Hotkeys m: my @a = [1, 7, 9, 10]; my \$n = 2; @a.first(* > \$n).say
00:34 AlexDaniel Juerd: this position is just fine
00:34 Hotkeys okay got it
00:35 AlexDaniel Juerd: not sure if I did everything right but something like this: https://gist.github.com/AlexDaniel/65623bce3cd1f360eed0
00:36 Juerd AlexDaniel: I lost interest though
00:36 AlexDaniel XD
00:36 Juerd AlexDaniel: I realised that I'm spending way too much time on this.
00:36 AlexDaniel true-true
00:37 AlexDaniel Juerd: I think that this is the last bug though
00:37 timotimo sdh: sorry, i haven't caught up with recent JVM work yet
00:39 timotimo synopsebot6 seems happier now that it has no limit on number of processes it may spaws
00:39 timotimo spawn
00:40 AlexDaniel Juerd: actually, yes, it is the last bug. I'm currently running both solutions and comparing the output. After like 2 minutes it found nothing
00:40 AlexDaniel Juerd: that previous bug was actually found by this script… but I think that I got lucky
00:40 Juerd Just find it then :P
00:40 timotimo grondilu: with recent changes taken into account, my code for white noise is now at something like 20 FPS, how does that sound to you? :)
00:47 gfldex joined #perl6
00:48 Juerd AlexDaniel: Out of the 6 that my solution found, I don't know which one is wrong or missing.
00:48 mspo http://i.imgur.com/mRNOELn.png
00:48 AlexDaniel mspo: awesome
00:48 mspo AlexDaniel: I've never seen anything so relevant to this channel ;)
00:49 AlexDaniel I've never seen these quotes in Estonia though…
00:50 AlexDaniel Juerd: hmm did you just fix something?
00:51 cfedde joined #perl6
00:51 AlexDaniel because it looks like it went away
00:54 AlexDaniel Juerd: https://gist.github.com/AlexDaniel/2b23299c8b68fa4a7426
00:55 AlexDaniel Juerd: this one is slightly different
00:57 AlexDaniel Juerd: seems like it cannot find any solution from the edge: https://gist.github.com/AlexDaniel/2b23299c8b68fa4a7426
00:58 AlexDaniel Juerd: “Out of the 6 that my solution found” – this was not a test case, it was just a proof that this state is valid
00:58 AlexDaniel “proof” because I played it by hand
01:00 AlexDaniel mspo: any stats about which one is the most common?
01:02 mspo AlexDaniel: just a link I saw on reddit, not much background info
01:04 cfedde joined #perl6
01:10 cfedde joined #perl6
01:27 kid51 joined #perl6
01:34 pierrot joined #perl6
01:42 Ben_Goldberg joined #perl6
02:01 PerlJam joined #perl6
02:02 sortiz joined #perl6
02:02 sortiz \o #perl6
02:05 skids \o
02:06 masak o/
02:09 masak I'm toying around with LF and CRLF. I observe the following: if I read a file with CRLF line endings with Rakudo, and just print it back out with -n or -p, it comes out with LF line endings. (I'm on Linux.)
02:09 masak this, I think is a good default.
02:10 masak I haven't yet been able to override that default. I don't think it's possible with today's Rakudo.
02:10 Hotkeys is there an option for as-is yet
02:11 masak S28 says there's supposed to be a \$*OUT.output-record-separator, but there isn't in Rakudo right now
02:11 Hotkeys so you don't convert any of the line endings
02:11 Hotkeys and just leave them as is
02:11 skids .nl-out?
02:11 masak skids: see above; S28 says it's called \$*OUT.output-record-separator
02:12 masak I'm a little confused as to why the naming between \$*IN.input-line-separator() and \$*OUT.output-record-separator() is inconsistent
02:12 skids Yes but S28 is probably older than the whole CRLF thing right before 6.c
02:12 masak skids: yes; that's part of why I'm asking
02:12 masak m: say \$*OUT.nl-out
02:12 masak oh, so that one does exist.
02:12 * masak tries
02:13 masak it's confusing when S28 says one thing and Rakudo implements another ;)
02:14 skids Yeah we need a re-whirlpool-the-design-docs initiative
02:15 masak ok, .nl-out works
02:17 masak I don't know what "re-whirlpool" means, but it seems to me it'd be worth it to take S28 as a starting point when introducing new replacements for old Perl 5 special variables :)
02:23 sortiz For "re-whirlpool" I understand that, now that roasts tests are somewhat normative, when there are inconsistencies between them and S*, the tested form should be taken to S*.
02:23 masak t/spec/S32-num/power.rakudo.moar
02:23 masak TODO passed:   13-15, 68-70
02:24 masak sortiz: the tests have been normative in that sense for years, IMO.
02:24 masak maybe even since they were created.
02:24 timotimo fair enough, but development reality made the specs get outdated at a much faster pace than they used to
02:25 masak that doesn't seem to be the problem here, though
02:25 masak the problem is that S28 was never even consulted
02:25 sortiz That is what I know, yes.
02:25 masak I'm just curious why that is
02:26 timotimo i think the names used to be implemented that way in rakudo, but were later changed again?
02:26 timotimo hm, no, that's not it
02:29 BenGoldberg joined #perl6
02:30 BenGoldberg joined #perl6
02:32 masak no, there used to be a single .nl, and then they were split up as .nl-in and .nl-out
02:37 sortiz In that sense what was missing at the time was to update the specs.
02:38 masak or to read them
02:39 geekosaur that was near the start of the final rush toward 6.c, no?
02:39 geekosaur think people were in too much of a hurry
02:40 skids IIRC that change was done at a pretty frantic time.  In addition to that, lizmat++ spent a lot of time reworking IO design docs, kept soliciting feedback or for some sort of approval for a merge, but was feeling a bit warnocked on the matter.  Not that nl-out was part of that.
02:41 masak yes, yes
02:42 sortiz Btw, in roast I only found two mentions to 'nl-out' and only in the context of exceptions.
02:46 skids But it was reasonable with the general sense that IO needed a rework to treat that part of the design as a bit more fungeable than the rest.
02:46 masak it's far too easy to come in after a change and expect a full accounding of events and why things were done the way they were
02:46 masak I'm not trying to do that
02:46 masak I'm just interested in some sort of consistency going forward
02:46 * timotimo is likely to go forward to bed in the very near future
02:46 masak S28 is among the less stable/reliable documents, I'm aware of that
02:46 masak but it still has value IMO
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:48 skids Yeah unfortunately (for this purpose) the rules for 6.c-errata are "no new tests, just unfudges" and unless I missed it there's no level between master and that yet.
02:49 masak e20a16b2bea9eebaab2a05496e8ff134a4cde9f2 from roast is interesting.
02:49 masak there used to be a test with `\$RT123888.input-line-separator`, but it got changed to `\$RT123888.nl`
02:50 masak the commit comment seems unrelated to that change.
02:50 masak I can see how no-one thought to update S28 if that was the only test, and if the change was made in passing without acknowledging it in the commit comment ;)
02:55 timotimo good night #perl6
02:55 skids o/
02:55 Herby_ \o
02:56 skids .oO(Herby_ always waves with the opposite hand from me.  Contrarian. :-)
02:56 Herby_ it is my nature :)
03:00 AlexDaniel what is FSA?
03:00 masak AlexDaniel: "finite state automaton"?
03:01 ugexe fixed size allocator
03:02 masak Federal Student Aid
03:09 sortiz AlexDaniel, In MoarVM The fixed size allocator provides a thread-safe mechanism for getting and releasing fixed-size chunks of memory."
03:13 AlexDaniel thanks
03:50 dalek roast: 04784c1 | skids++ | S01-perl-5-integration/context.t:
03:50 dalek roast: Fix some spelling
03:50 dalek roast: review: https://github.com/perl6/roast/commit/04784c1bc3
03:50 dalek roast: 2f4cda8 | skids++ | S01-perl-5-integration/context.t:
03:50 dalek roast: Missed some spelling to fix
03:50 dalek roast: review: https://github.com/perl6/roast/commit/2f4cda87d3
03:50 dalek roast: e57bfe9 | skids++ | S01-perl-5-integration/context.t:
03:50 dalek roast: Merge pull request #105 from skids/master
03:50 dalek roast:
03:50 dalek roast: Did this as a PR to prove to myself it does not merge automatically
03:50 dalek roast: review: https://github.com/perl6/roast/commit/e57bfe98c5
03:51 skids Good.  I must have been confused the first time I tried that.
03:55 noganex_ joined #perl6
03:58 dalek rakudo/nom: 5dcf96f | (Carl Masak)++ | src/core/IO.pm:
03:58 dalek rakudo/nom: remove predeclaration of Instant in core/IO.pm
03:58 dalek rakudo/nom:
03:58 dalek rakudo/nom: This one hasn't been needed since
03:58 dalek rakudo/nom: 509545a46136390feef5f3c0f56943ccf6a1881a.
03:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5dcf96f1e7
04:07 sunnavy joined #perl6
04:11 yoleaux 20 Feb 2016 21:45Z <pmurias> MadcapJake: lab name => "common case", try => {...}; lab name => "complex case", try => {variant1 => {...}, variant2 => {...}}
04:15 Ben_Goldberg joined #perl6
04:19 Actualeyes joined #perl6
04:27 mattp_ joined #perl6
04:34 cognominal joined #perl6
04:42 Ben_Goldberg m: use POSIX;
04:42 camelia rakudo-moar 5dcf96: OUTPUT«===SORRY!===␤Could not find POSIX in:␤    /home/camelia/.perl6/2015.12-403-g5dcf96f␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUn…»
04:43 Sgeo__ joined #perl6
04:44 kaare_ joined #perl6
04:47 grassass joined #perl6
04:51 edenc joined #perl6
04:51 kaare_ joined #perl6
04:52 AndyDee joined #perl6
04:54 kst` joined #perl6
04:58 vendethiel joined #perl6
05:37 Cabanossi joined #perl6
06:13 davido_ joined #perl6
06:21 jdv79 is panda bootstrap broken?
06:44 cpage_ joined #perl6
06:46 CIAvash joined #perl6
06:50 sortiz jdv79, I didn't see any problem in my last 'rakudobrew build'
06:57 jdv79 yeah its fine
06:57 jdv79 having a env issue which is causing the wrong perl6 to be run
07:04 * masak .oO( env: the silent killer )
07:04 jdv79 anyone know why moving ~/.rakudobrew would stop its PATH entries from magically appearing
07:06 jdv79 NO.  there's .profile and i was looking for .bash* files.  :(
07:08 aindilis joined #perl6
08:11 pmurias joined #perl6
08:12 rindolf joined #perl6
08:13 darutoko joined #perl6
08:41 DoverMo joined #perl6
08:41 DoverMo my nib broke
08:45 Hotkeys unbreak it
08:45 Hotkeys DoverMo: what happened?
08:47 AlexDaniel break it again, try to figure out why exactly it breaks. Then submit a bug report.
08:50 DoverMoo joined #perl6
08:59 chienjo joined #perl6
09:02 _mg_ joined #perl6
09:12 psch joined #perl6
09:14 psch hi #perl6 o/
09:14 psch .seen sdh
09:14 yoleaux I saw sdh 20 Feb 2016 23:45Z in #perl6: <sdh> Ah, thanks.  Is it in the works?  I was digging around the runtimes to see what I could hack together, but didn't have any luck.
09:14 psch ah, doesn't tell when someone left...
09:15 psch .tell sdh https://github.com/perl6/nqp/tree/standalone-jar/tools/jvm has some probing from a while ago wrt deploying jars.  i'm unsure in how far it still works nowadays, though.
09:15 yoleaux psch: I'll pass your message to sdh.
09:16 wamba joined #perl6
09:20 molaf joined #perl6
09:23 ely-se joined #perl6
09:25 dalek rakudo/nom: dae9f6a | okaoka++ | LICENSE:
09:25 dalek rakudo/nom: Fix a license duration 2000-2015 -> 2000-2016
09:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dae9f6a363
09:25 dalek rakudo/nom: 7010f32 | niner++ | LICENSE:
09:25 dalek rakudo/nom: Merge pull request #717 from okaoka/fix-license-duration
09:25 dalek rakudo/nom:
09:25 dalek rakudo/nom: Fix a license duration 2000-2015 -> 2000-2016
09:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7010f322c2
09:25 iH2O joined #perl6
09:32 petercommand joined #perl6
09:37 RabidGravy joined #perl6
09:42 agentzh joined #perl6
09:42 agentzh joined #perl6
09:50 iH2O left #perl6
09:51 vendethiel joined #perl6
09:54 RabidGravy HARR!
10:09 masak H∀RR!
10:11 RabidGravy W€€!
10:11 [Tux] test            22.532
10:11 [Tux] test-t          11.956
10:11 [Tux] csv-parser      49.302
10:12 RabidGravy Oöøh! nice
10:12 RabidGravy started going down again
10:15 RabidGravy if I have a parametric role, and I compose that into another role is there a way of applying the parameter when I apply the resulting role to an actual class
10:15 RabidGravy a  bit like
10:15 RabidGravy m: role Foo[\$bar?] { method bar() { say \$bar }}; role Bar does Foo {}; my \$a = "yu"; \$a does Bar["yuck"]; \$a.bar
10:15 camelia rakudo-moar 7010f3: OUTPUT«No appropriate parametric role variant available for 'Bar'␤  in any specialize at gen/moar/m-Metamodel.nqp line 2600␤  in any specialize at gen/moar/m-Metamodel.nqp line 2194␤  in any compose at gen/moar/m-Metamodel.nqp line 2979␤  in any generate_…»
10:15 RabidGravy but working obviously
10:16 masak I fail to see why that shouldn't work
10:17 RabidGravy well I guess because Bar itself doesn't have parameters,
10:19 TEttinger joined #perl6
10:23 arnsholt role Bar[\$b] does Foo[\$a] { ... } perhaps?
10:23 arnsholt s/\$a/\$b/
10:23 arnsholt Obviously
10:32 RabidGravy Nope, I'll have to stick with the yucky I have at the moment
10:37 spider-mario joined #perl6
10:40 renormalist joined #perl6
10:41 _dolmen_ joined #perl6
10:44 CIAvash joined #perl6
11:00 RabidGravy also need more coffee
11:02 nine coffee++
11:10 hankache joined #perl6
11:10 hankache hola #perl6
11:25 apiw joined #perl6
11:32 domidumont joined #perl6
11:39 vendethiel joined #perl6
11:45 musiKk joined #perl6
11:56 apiw joined #perl6
12:15 vendethiel joined #perl6
12:19 FROGGS joined #perl6
12:35 rburkholder joined #perl6
12:40 kid51 joined #perl6
12:48 _mg_ joined #perl6
12:53 FROGGS joined #perl6
12:54 Skarsnik joined #perl6
12:55 pmurias joined #perl6
12:58 zpmorgan joined #perl6
12:58 pmurias .tell do we need %Test::Lab::context for anything? in ruby the defaults are set per class, having that global doesn't seem to give us much
12:58 yoleaux pmurias: I'll pass your message to do.
13:01 BenGoldberg joined #perl6
13:16 Skarsnik Hello
13:16 pmurias hi
13:18 RabidGravy erp
13:19 Relsak joined #perl6
13:20 FROGGS pmurias: was it intentional that you .told "do" something?
13:27 apiw joined #perl6
13:30 pmurias .tell MadcapJake do we need %Test::Lab::context for anything? in ruby the defaults are set per class, having that global doesn't seem to give us much
13:30 pmurias FROGGS: no, thanks
13:32 pmurias any ideas when the rakudo-js grant vote will take place?
13:35 nine Does rakudo always use the Backtrace class when printing backtraces?
13:36 jnthn nine: afaik, yes, except when you pass --ll-exception, then we just let the VM spew out whatever it will
13:37 pmurias do we want to add column info to the Backtrace class?
13:37 nine jnthn: ah, that could explain it, thanks!
13:37 nine I'm working on getting rid of absolute paths in precomp files. I already turned them into paths relative to the repository that contains the files and now "just" need to assemble it back together on output
13:38 jnthn nine: Will this rid us of the sha-1s in backtraces too?
13:38 nine And out of lazyness I tested with NativeCall and --ll-exception :)
13:38 nine jnthn: yes, I already add the requested module's name in () to the displayed source path
13:39 jnthn nine: Is there a way we can show the path the source file had inside its distribution?
13:39 jnthn Instead of the SHA-1
13:40 vendethiel joined #perl6
13:41 Skarsnik hm, for https://rt.perl.org/Ticket/Display.html?id=127345 it's in the Backtrace class?
13:41 nine I'd rather like to keep the SHA-1 in the output as you can copy&paste this path to look at the source. Adding the module name to the output should already make the backtrace much more readable
13:41 Begi joined #perl6
13:51 Psyche^ joined #perl6
13:53 Begi is there a method to keep only letters in a string ?
13:53 Begi without spaces and ponctuation
13:54 jnthn m: say "oh! I've been stripped!".subst(/\W+/, '', :g)
13:54 camelia rakudo-moar 7010f3: OUTPUT«ohIvebeenstripped␤»
13:54 jnthn Though that'll keep _ too
13:55 jnthn m: say "o__h! I've been stripped!".subst(/<-:Letter>+/, '', :g)
13:55 camelia rakudo-moar 7010f3: OUTPUT«ohIvebeenstripped␤»
13:55 jnthn That used the Unicode Letter property
13:55 jnthn m: say "o__h! I've been stripped!".subst(/<-:L>+/, '', :g)
13:55 camelia rakudo-moar 7010f3: OUTPUT«ohIvebeenstripped␤»
13:55 jnthn Can shorten it to that if golfing :)
13:59 Ulti http://www.lamdu.org/ this feels like something you could maybe do with Rakudo
14:00 musiKk joined #perl6
14:03 moritz m: say "o__h! I've been stripped!".comb(/<:L>+/).join
14:03 camelia rakudo-moar 7010f3: OUTPUT«ohIvebeenstripped␤»
14:08 lizmat sometimes I think .comb should also be able to take a Callable, like .grep
14:09 BenGoldberg m: say [  "o__h! I've been stripped!".comb(/<:L>+/) ]
14:10 camelia rakudo-moar 7010f3: OUTPUT«[o h I ve been stripped]␤»
14:13 Amendil joined #perl6
14:14 BenGoldberg What would be the semantics, if .comb *did* take a Callable?
14:14 moritz lizmat: you can jsut write .comb.grep
14:15 lizmat yeah, but I was thinking performance
14:15 lizmat try this for difference:   .comb(/../) and .comb(2)  :-)
14:16 apiw joined #perl6
14:17 jnthn I think we'd get more mileage out of making simple regexes like that a bunch faster. :)
14:19 autarch joined #perl6
14:19 lizmat jnthn: true, but Callable has it's own rewards in that respect...  and we don't really have a .grep on characters
14:20 jnthn lizmat: I don't know it's worth a lot over .comb.grep tbh
14:20 nine I don't get it. Why do I get "Could not find symbol '&RepositoryRegistry'" for a \$file = CompUnit::RepositoryRegistry.repository-for-name(... in Backtrace's AT-POS at runtime?
14:20 moritz lizmat: the approach of adding ever more specialized built-ins for performance doesn't scale
14:23 lizmat moritz: I said "sometimes I think"  :-)
14:23 moritz lizmat: noted :-)
14:24 jnthn The trade-off of note is that every one we add increases base memory
14:24 nine Ah, predeclaring CompUnit::RepositoryRegistry fixes it
14:24 moritz nine: bootstrapping is fun :-)
14:25 beatdown joined #perl6
14:29 dalek doc: dafabe7 | (Simon Ruderich)++ | doc/Type/Hash.pod:
14:29 dalek doc: Hash: fix display of code listing
14:29 dalek doc:
14:29 dalek doc: The tab caused the listing to be displayed as multiple listing separated
14:29 dalek doc: by an empty line.
14:29 dalek doc: review: https://github.com/perl6/doc/commit/dafabe7ae0
14:34 dududuedu joined #perl6
14:40 vendethiel joined #perl6
14:41 stux|RC-only joined #perl6
14:43 rudi_s I'm looking at Hash documentation and I'm a little confused about the last example in "Loop over hash keys and values": for %vowels.kv { .say } with "This would print the list one line at a time". <- This is not true, it prints all keys and values. Any idea how the code is supposed to look?
14:44 rudi_s And in the example before that, should we mention .flat as an alternative way to get the usual -> \$k, \$v { .. } way?
14:46 moritz +1 to the latter
14:46 FROGGS rudi_s: for the first snipped, it should probably say "This would print one Pair at a time."
14:46 psch m: my %h = a => 0, b => 1, c => 3; for %h.kv { .say }
14:46 camelia rakudo-moar 7010f3: OUTPUT«a␤0␤c␤3␤b␤1␤»
14:46 FROGGS ohh
14:46 FROGGS of course :o)
14:47 FROGGS the sentence is still weird though
14:47 psch yeah, "the list" seems insufficiently explained
14:47 FROGGS yeah
14:47 moritz feel free to replace it or toss it
14:47 Ben_Goldberg joined #perl6
14:48 lizmat m: sub a(*@a) { state \$b = -> { say @a.shift }; \$b() }; a(1,2,3); a(4,5,6)   # jnthn moritz: is this a scoping issue or not?
14:48 camelia rakudo-moar 7010f3: OUTPUT«1␤2␤»
14:48 lizmat I would expected 1,4 there
14:48 moritz lizmat: looks fine to me
14:49 moritz lizmat: the state initializer is only run the first time, and the pointy block is a closure
14:50 rudi_s I'd drop the code example including the last sentence of the paragraph as I've no idea what it's supposed to say, any objections?
14:50 lizmat hmmm...
14:50 moritz rudi_s: it's supposed to give you an idea how iterating a hash works
14:50 psch rudi_s: fwiw, explaining what actually happens is probably sensible, i'm at a lost how to phrase it though
14:51 rudi_s Should I change the previous example to ust .flat per default and mention that without .flat the pointy block needs to split the argument.
14:51 moritz what happens when you iterate over %h, %h.kv, %h.pairs, %h.keys etc?
14:51 moritz rudi_s: nah, just offer both; There is more than one way to do it!
14:51 rudi_s moritz: But that's the first example in the section, I'm talking about the last one.
14:51 psch "This would print the list consisting of unordered and flattened Pairs one element at a time." seems slightly wrong...
14:51 rudi_s moritz: Ok.
14:52 moritz ah well, if it's redundant and unclear, by all means, drop it
14:52 rudi_s "The output of this operation is a L<Seq>," <- this seems to be wrong too, the result is a List, not a Seq.
14:52 psch m: my %h = a => 0, b => 1, c => 3; say %h.kv.WHAT
14:52 camelia rakudo-moar 7010f3: OUTPUT«(Seq)␤»
14:53 rudi_s m: my %h = a => 0, b => 1, c => 3; say %h.sort(*.key)>>.kv.WHAT
14:53 camelia rakudo-moar 7010f3: OUTPUT«(List)␤»
14:54 rudi_s m: my %h = a => 0, b => 1, c => 3; say %h.sort(*.key)>>.kv[0].WHAT
14:54 camelia rakudo-moar 7010f3: OUTPUT«(List)␤»
14:54 BenGoldberg_ joined #perl6
14:54 moritz .kv gives you Seq of List objects, no?
14:54 psch huh
14:54 psch isn't that calling .kv on Pairs?
14:55 psch m: my %h = a => 0, b => 1, c => 3; say %h.sort(*.key)>>.WHAT
14:55 camelia rakudo-moar 7010f3: OUTPUT«(List)␤»
14:55 psch err, WHAT *shakes fist*
14:55 moritz m: say %*ENV.sort[0].^name
14:55 camelia rakudo-moar 7010f3: OUTPUT«Pair␤»
14:55 psch m: my %h = a => 0, b => 1, c => 3; say %h.sort(*.key)>>[0].WHAT
14:55 camelia rakudo-moar 7010f3: OUTPUT«(List)␤»
14:55 psch right, so the sorted Pairs each get a .kv, which is why the order remains
14:55 rudi_s moritz: But not with >>.kv, not ide awhy.
14:56 moritz because >> is magical about the way how far it descends into a nested data structure *handwave*
14:56 rudi_s My point is, we shouldn't say it returns a Seq in the docs if it doesn't.
14:56 moritz +1
14:56 psch and the hyper is what builds the List afaik
14:57 BenGoldberg joined #perl6
14:58 psch yeah, the nodemap helper for METAOP_HYPER_POSTFIX builds a List directly
14:58 psch tbh, i'd rather say the example is misleading
14:58 psch the .kv call doesn't happen on a Hash in the first place
14:58 rudi_s Yeah.
14:59 apiw joined #perl6
15:01 Ben_Goldberg joined #perl6
15:02 psch well, the example is useful on it's own, it just seems a little misplaced vOv
15:02 rudi_s Proposed patch: https://pbot.rmdir.de/3tRjAtzxfSdFKYbusG166Q
15:06 psch rudi_s: looks good to me, fwiw
15:07 kurahaupo joined #perl6
15:15 kurahaupo joined #perl6
15:16 apiw joined #perl6
15:16 kurahaupo_ joined #perl6
15:18 dalek doc: d70a800 | (Simon Ruderich)++ | doc/Type/Hash.pod:
15:18 dalek doc: Hash: clarify the looping over sorted keys example
15:18 dalek doc: review: https://github.com/perl6/doc/commit/d70a800685
15:18 rudi_s psch: Thanks.
15:19 vendethiel joined #perl6
15:21 jack_rabbit joined #perl6
15:21 Ben_Goldberg joined #perl6
15:23 jnthn lizmat: On the state/closure thing, agree with moritz; the closure is taken and stored at state variable initialization.
15:24 Ben_Goldberg joined #perl6
15:24 apiw joined #perl6
15:28 zakharyas joined #perl6
15:28 apiw joined #perl6
15:30 Relsak joined #perl6
15:31 _mg_ joined #perl6
15:32 nine I just don't get it. How can my \$custom-lib := nqp::hash(); in CompUnit::RepositoryRegistry ever become empty after having actual contents?
15:32 zpmorganASDF joined #perl6
15:34 zpmorgag joined #perl6
15:36 nine Aaah...different processes!
15:37 nine And of course, the precomp process skips the normal repository initialization, so \$custom-lib stays empty
15:37 renormalist is there something I can install to have moer Emacs'ish keybindings in perl6 REPL (having rakudo 2016.01)?
15:38 renormalist (wordwise jump, delete, transpose typos)
15:38 apiw joined #perl6
15:39 psch apparently i have to build a ContextRef manually to get jvm interop working with all the new CUR stuff..?
15:39 psch renormalist: i think Linenoise does a few of those at least?  otherwise people use rlwrap i think
15:39 psch the Linenoise module that is*
15:39 * renormalist looks up rlwrap
15:40 musiKk joined #perl6
15:41 psch re the ContextRef thingy: previously RakudoJavaInterop.computeInterop() returned a Hash, which apparently was enough to register the class successfully.  nowadays i run into a nqp::ctxlexpad invocation that wants a ContextRef there
15:42 psch unfortunately i don't have one, and the existing CallFrame i could stuff into a freshly allocated one apparently don't have the methods actual lexical information about e.g. the methods of the class
15:42 renormalist psch: thanks, rlwrap works for me.
15:44 psch renormalist: you're welcome :)
15:44 renormalist and I also realized it is an FAQ - I'm now just reading that whole thing. :-)
15:44 psch hm, i might not actually need anything though, right?  as in, a java class never has an attached lexical scope, only methods and attributes...  not sure if that actually means i don't need CU::Handle.globalish-package to know what a java class can do...
15:45 psch orrr i forgot what exactly a lexical scope is :S
15:46 apiw joined #perl6
15:48 nine Yes! "in block  at /home/nine/rakudo/install/share/perl6/site/sources/C59503AFF985B18BEF96604D1979FE6EA8004641 (Panda::Installer) line 61" while the precomp file only contains "site#sources/C59503AFF985B18BEF96604D1979FE6EA8004641 (Panda::Installer)"
15:49 RabidGravy nine++
15:57 apiw joined #perl6
15:59 dalek nqp/relocateable-precomp: 571323a | (Stefan Seifert)++ | src/ (2 files):
15:59 dalek nqp/relocateable-precomp: Option for a source-name different from the actual source file
15:59 dalek nqp/relocateable-precomp:
15:59 dalek nqp/relocateable-precomp: While absolute paths are useful for reading source files reliably, we don't
15:59 dalek nqp/relocateable-precomp: want to save those absolute paths in precompiled files as the source files
15:59 dalek nqp/relocateable-precomp: may move after precompilation. This happens when modules are packaged for
15:59 dalek nqp/relocateable-precomp: Linux distributions and the build process runs with an unprivileged user
15:59 dalek nqp/relocateable-precomp: while the result should be installed in a system location.
15:59 dalek nqp/relocateable-precomp:
15:59 dalek nqp/relocateable-precomp: The source-name option allows for specifying a different string to use for
15:59 dalek nqp/relocateable-precomp: the \$?FILES variable and thus for the path to the source file in backtraces.
15:59 dalek nqp/relocateable-precomp: review: https://github.com/perl6/nqp/commit/571323af36
15:59 khw joined #perl6
16:00 Skarsnik hoo, is that a step to system wide pre comp file?
16:01 stmuk_ nine++
16:06 dalek rakudo/relocateable-precomp: 59ed434 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
16:06 dalek rakudo/relocateable-precomp: Turn short-name lookup files into directories
16:06 dalek rakudo/relocateable-precomp:
16:06 dalek rakudo/relocateable-precomp: This may become part of CompUnit::Repository::Installation format v1.
16:06 dalek rakudo/relocateable-precomp: Having to change any already existing files on installation of a module makes
16:07 dalek joined #perl6
16:10 nine Store logical file names in precomp files
16:10 nine We now use logical file names for annotating sources and construct absolute paths when printing stack traces. This avoids storing absolute paths inprecompiled files which is a problem for packaging modules for Linux distributions.
16:10 nine It also allows for us to add the name of the requested module to the backtrace output, alleviating the problem with the undeciferable SHA-1 file names.
16:10 nine Review: https://github.com/rakudo/rakudo/commit/37440f09e146c45d78e52809aac418a920730d01
16:12 rudi_s I have either a Str or Nil and want to call .chomp on Str but not on Nil (which causes a warning). I tried \$x.?chomp but that doesn't work as Nil is a subclass of Class which has .chomp as method. Any idea?
16:24 timotimo m: say Nil.chomp
16:24 camelia rakudo-moar 7010f3: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/MbONCtpJkV line 1␤␤»
16:24 timotimo ah, that's how
16:24 timotimo m: say quietly Nil.chomp
16:24 camelia rakudo-moar 7010f3: OUTPUT«␤»
16:24 timotimo m: say quietly "oh my gosh   ".chomp
16:24 camelia rakudo-moar 7010f3: OUTPUT«oh my gosh   ␤»
16:24 virtualsue joined #perl6
16:25 rudi_s That feels a big ugly.
16:27 rudi_s Is there something like \$_ = \$_.chomp with \$x which modifies \$x in short?
16:27 timotimo sure, \$x .= chomp
16:28 timotimo oh, that "with" was perl6-with
16:28 rudi_s Ah, nice.
16:28 rudi_s \$x .= chomp with \$x; good enough for me.
16:28 timotimo aye
16:28 rudi_s Thakns.
16:28 apiw joined #perl6
16:32 timotimo nine: i merged that commit into nom; that was a mistake, wasn't it? :)
16:32 timotimo nine: because now make install complains with "Constraint type check failed for parameter '\$precomp-id'" "in block <unit> at tools/build/install-core-dist.pl line 13"
16:33 nine ouch
16:34 nine You'd probably need the whole relocaeable-precomp branch
16:35 timotimo oh, did i say "merged that commit"? i meant "merged that branch"
16:35 timotimo rather than cherry-pick it
16:35 timotimo maybe i need a reconfigure?
16:36 nine You also need the relocateable-precomp nqp branch
16:39 Ben_Goldberg joined #perl6
16:40 timotimo oh!
16:40 timotimo yeah, turns out i didn't look closely enough at all
16:42 rudi_s Can I prefix an enum with a "namespace"? enum Foo <A B C>; adds A directly into the file. I'd like to get Foo::A. At the moment I have module Foo { enum Foo <A B C>; } but then the type is Foo::Foo. Can I get just Foo?
16:42 timotimo >:(
16:42 timotimo Configure.pl isn't good at NQP_REVISION and branches and merges and stuff
16:44 timotimo with a straight-up checkout of the relocatable-precomp branch it works better
16:45 skids joined #perl6
16:46 Ben_Goldberg joined #perl6
16:47 pierrot joined #perl6
16:47 ELBeavers_away left #perl6
16:48 rudi_s Can I use the return type constrain to declare that the function should return an array with values of specific type? Like my Str @x;
16:50 timotimo no, same as parameter type constraints
16:51 Ben_Goldberg joined #perl6
16:52 Ben_Goldberg m: my %vowels = 'a' => 1, 'e' => 2, 'i' => 3, 'o' => 4, 'u' => 5; for %vowels.sort(*.key)>>.kv -> [\$vowel, \$index] { "\$vowel: \$index".say }
16:52 camelia rakudo-moar 7010f3: OUTPUT«a: 1␤e: 2␤i: 3␤o: 4␤u: 5␤»
16:52 rudi_s timotimo: But I can declare foo(Str @foo) and it seems to work.
16:53 rudi_s I want the same for the return type.
16:53 timotimo that is a check for "does the user pass a Str-typed Positional of some kind"
16:53 timotimo it does not check "is the array passed in filled with only Str objects or derived from Str objects"
16:53 timotimo so if you do "returns Positional[Str]", you'll have to declare the object you're returning to fill that role
16:54 timotimo it won't introspect a regular array for "is it only Str in there?"
16:54 rudi_s Ah, too bad. Thanks.
16:55 Ben_Goldberg m: my %vowels = 'a' => 1, 'e' => 2, 'i' => 3, 'o' => 4, 'u' => 5; for %vowels.sort(*.key) -> (:key(\$vowel), :value(\$index)) { "\$vowel: \$index".say }
16:55 camelia rakudo-moar 7010f3: OUTPUT«a: 1␤e: 2␤i: 3␤o: 4␤u: 5␤»
16:58 apiw joined #perl6
17:00 timotimo nine: i wonder if we can get the profiler to know about the nicer filenames, too
17:01 timotimo nine: but the profiler itself is "only" vm-level, so not exactly sure how to introduce the two
17:03 timotimo now that our filenames are so super long, maybe it'd be a good idea to have the filenames as a list up front in the json blob and then reference that array later on
17:03 timotimo so that the file gets a bit smaller?
17:04 jameslenz joined #perl6
17:06 timotimo on the other hand, i really can't tell what exactly it is that makes browsers fall to their knees: raw json blob string size, or size of the constructed object?
17:06 Skarsnik the js is bad maybe§
17:07 timotimo if you'd like to improve it, feel absolutely free :)
17:07 Skarsnik I rather work on the Qt thingy x)
17:08 timotimo sure, that's fine, too
17:08 timotimo last time i looked, it didn't do anything with the GC list, for example
17:09 timotimo and it doesn't do anything at all with the call graph except sum up all the data
17:09 jameslenz joined #perl6
17:10 flussence I wonder how many of these workarounds are going to pile up before we all finally accept the sha1 filenames thing is insane :/
17:10 timotimo i'd find it nicer if the filenames could be the original filenames on disk and only change if there's disambiguation needed
17:11 timotimo but there could definitely be good reasons against my idea
17:13 yoleaux 13:30Z <pmurias> MadcapJake: do we need %Test::Lab::context for anything? in ruby the defaults are set per class, having that global doesn't seem to give us much
17:14 apiw joined #perl6
17:16 MadcapJake .tell pmurias the Ruby version has the helper method as a module, so the default_scientist_context lets you change the context for any time you use the science helper.  I thought the best reflection of that in P6 would be a module-scoped hash.
17:16 ugexe timotimo: i imagine part of it might be you don't really know whats allowed (at least on windows). on windows you can create files with illegal characters using perl (5 or 6) and windows does nothing to stop it or warn about it
17:17 Ben_Goldberg Err, if a file is creatable with some specific character as part of the name, doesn't that mean that that char is, in fact, legal?
17:18 MadcapJake .ask pmurias what would you see as a more Perl 6 reflection of that?  Check here for some context (pun intended): https://github.com/github/scientist#adding-context
17:19 timotimo ugexe: okay, so we'd just limit to a-zA-Z - and _
17:19 ugexe its legal for some underlying part of windows, but not others
17:19 timotimo and - and _ are only allowed between a-z and A-Z
17:19 timotimo and 0-9
17:20 ugexe but without a unique mapping couldnt 2 modules with names differing only by 1 Unicode character end up in the same path?
17:20 timotimo yeah, so? in taht case we disambiguate with whatever method we feel necessary
17:21 jnthn I wonder how many discussions we're going to have trying to work out clever mapping strategies before folks learn to darn cope with the sha-1 names. :/
17:21 MadcapJake jnthn, do you really think sha-1 names in an error message are user-friendly?
17:21 verzit joined #perl6
17:22 jnthn MadcapJake: No, which is why I said earlier I thought we should show the source filename as it was in the installed distribution.
17:22 ugexe 11:10:33         nine | It also allows for us to add the name of the requested module to the backtrace output,
17:22 timotimo yeah, we do that now
17:23 jnthn OK, good.
17:23 apiw joined #perl6
17:23 timotimo i see no good way to introduce it to the profiler
17:23 jnthn We might want to abbreviate the SHA-1s, or only show them in debugging output.
17:23 timotimo often enough the table in the "routines" tab is all wonky because a few routines in the table are super super wide because of their file name
17:24 MadcapJake jnthn, ok I'm in agreement with that, i think we should show not only the source but the module-relative path e.g., «Module::Name/Foo/Bar.pm6»
17:24 timotimo and the allocations popup is *super* b0rked, too
17:24 jnthn MadcapJake: Yes, that's what I mean by the source filename as it was, before we installed it. Though I can see I that wasn't so clear how I wrote it ;)
17:26 * mst needs to get round to documenting the current CURLI on-disk layout
17:26 mst ... and then take a chainsaw to it, because having the filenames be hashes is frigging ridiculous
17:26 jnthn *sigh*
17:26 mst (having a hash as part of the *path*, less so)
17:26 jnthn So long as I don't have to work on this, I guess it's fine.
17:27 mst jnthn: it's ok. I understand why it was done that way. the trick will be to keep all the advantages of that *and* get back some of the things we lost
17:27 mst and I'm about 98% sure I know how to do that
17:27 mst I'm also not expecting anybody else to
17:28 timotimo how terrible would it be to reduce the shasums to only 2/3rds or 1/2 length?
17:28 domidumont joined #perl6
17:28 jnthn I guess we just have different design ideas on it. I like the SHA-1s in the installation repo because (a) filesystem valid name issues go away and (b) it makes it darn clear you're not meant to be messing with those things by hand
17:29 MadcapJake jnthn, what's the route to take if you want to tweak a module?
17:29 mst if you're trying to tweak then you want a lib/ dir or something outside the CURLI with the code in it
17:30 perturbation joined #perl6
17:30 mst similarly to in perl5, where I do 'mkdir lib/Module; cp \$(perldoc -l Module::Name) lib/Module/Name.pm; vi \$_'
17:31 ugexe just sha1 non-alpha numerics!
17:31 mst jnthn: those are good reasons to have the sha1 as *part* of the path, however in terms of various sorts of debugging having that be the only thing encoded in the path is flipping terrible
17:32 mst basically, (b) is not a reason to be actively hostile to people trying to debug dependency issues
17:32 jnthn MadcapJake: Tweaking installed things sounds like a really bad idea...
17:32 MadcapJake it'd be nice if there was a `panda develop Module::Name` that would download (or move from precomp) the module into a directory at the current location and symlink it into the precomp module dirs.
17:33 mst jnthn: yeah, it's an absolutely terrible idea at the moment. and frankly I'd rather make sure there are good alternatives so you don't ever want to do that, than make it less of a terrible idea :)
17:33 MadcapJake jnthn, i guess i'm coming from Node.js world where every package is placed in a node_modules dir and you can tweak to your hearts content, I really wish Perl 6 had some similar facility (tweaks on a per-project basis)
17:33 flussence what's the issue with just percent-encoding the non-alnum parts of what's currently hashed...?
17:33 mst oh gods please no let's not bikeshed this now
17:33 mst we want the hash *as well*
17:34 mst there's lots of useful reasons for this
17:34 mst the current design is academically elegant and has lots of useful properties
17:34 mst I just need to beat it with a shovel until it's also not actively hostile to sysadmins and operations staff
17:34 jnthn mst: To me having a unique identifier for the thing being loaded, so I can know exactly which one it is, is highly useful for dependency debugging. :-)
17:34 mst jnthn: WHICH IS WHY I WANT TO KEEP THE HASH AS WELL!
17:35 jnthn mst: Yeah, I know :)
17:35 mst sorry. every time I talk about this somebody assumes I want to get rid of the hashes
17:35 mst and, no, they're also useful
17:35 jnthn If you were trying to get rid of them I wouldn't be saying "I don't want to do it", I'd be saying "please don't do it". ;)
17:35 flussence erm, isn't the *input* to sha1 already a unique ID? that's what I'm saying
17:36 mst the last time I designed a system like this, what you basically got was DistributionName-1.23-sha1goeshere/File/Name.pm
17:36 MadcapJake so here's a common workflow that I have in the JS world, install a package, write up my code that uses it, notice something that needs fixing, fix it in my project's node_modules dir, run tests, test my project, then submit those fixes as a PR.
17:37 mst which gave you the unique identifier stuff nicely, while still also giving you sensible names on disk to find stuff using
17:37 hacst joined #perl6
17:37 jnthn Anyway, my (apparently wrong) assumption was storing the things under hashed names then buliding tooling around that would be a fine the way to go. But if having the stuff on disk more closely match the original file names is really valuable, I can go with us adding that too.
17:38 jnthn cooking needs attention; bbiab
17:39 mst jnthn: there's lots of stuff that relies on file names already out there, and lots of common debugging tricks that use them
17:39 mst as an example, if I get an error of "can't find Foo::Bar" or so
17:39 mst for perl5, I can find out if that's in a vendor package by running 'apt-file search Foo/Bar.pm'
17:39 alpha123 joined #perl6
17:40 mst it would seem quite sad to say "yeah, you can't do that for perl6, you'll have to make your sysadmin learn a complete new set of ways of working"
17:40 sjoshi joined #perl6
17:40 mst because what I'm willing to bet will happen in a bunch of cases is the response you'll get it "if you're going to be this hostile to basic systems stuff, I'm not deploying this in production because I don't want to deal with this if I get a 3am page"
17:40 mst and, honestly, I'm pretty sympathetic to that response
17:41 mst so I want to make it unnecessary, without losing any of the cool advantages of the current system :)
17:41 timotimo i'm glad we have mst working for us :3
17:41 * mst gets off his soap box
17:41 * mst still isn't expecting anybody else to do the legwork
17:41 flussence what timo said +1
17:42 mst if nothing else because if somebody else does it I'll probably only moan about their version
17:42 mst first weekend I don't have a frigging head cold, I swear I'll look at this properly
17:42 mst meanwhile, you're welcome to blame me for it not being done already :D
17:43 flussence (if anything I've said sounds idiotic, feel free to ignore. bit under the weather myself today)
17:44 mst percent encoding is a bit icky when you're trying to navigate around the filesystem
17:44 timotimo ugh, yes
17:44 mst we'll probably have to experiment a bit with what to do instead of that, it's not a terrible plan Z
17:45 mst a completely random thought would be: if you have something like Cote.pm where there's a circumflex over the o
17:46 mst you'd encode it to Cote-abcdef.pm where abcdef is the first 6 chars of the sha1, with code that'll use more characters if it somehow manages to collide within its target directory
17:46 mst note: just thought of that, idea not actually endorsed, meant as a thought to consider
17:46 mst but something in that direction would let us avoid the filesystem-character-restriction problem while still having reasonably ops-friendly names
17:47 mst (goal: let somebody, when paged at 3am, manage to debug the broken production service even if they're not awake enough to remember perl6 has a whole extra set of tools for interacting with this stuff)
17:48 mst MadcapJake: we need to enable some approach to hacking stuff up, but I'd rather think about it because once we make it even possible, people will do it all the time and it's effectively supported forever whether we meant that to happen or not :)
17:57 MadcapJake mst, yeah that's a good point! Better to have a well-engineered path that can stand the test of time.
18:00 apiw joined #perl6
18:01 sufrostico joined #perl6
18:01 sjoshi joined #perl6
18:02 sufrostico hi there
18:02 sufrostico somebody knows if there is a way to incorporate C code whitin a perl6 module ?
18:02 sufrostico other than the NativeCall library ?
18:03 mst "is there a way to do X, other than the way to do X?"
18:03 mst why do you need another way? :)
18:03 DrForr Why won't NativeCall work for you?
18:03 simcop2387 w 60
18:06 sufrostico there is some code that not exactly compiles to a shared library (.so)
18:07 hacst joined #perl6
18:07 sufrostico so, i was checking the options
18:41 ilbot3 joined #perl6
18:41 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!
18:42 jnthn mst: Thanks for the explanations; they make sense.
18:43 mst jnthn: ISTR you spend quite a bit of time in win32?
18:44 mst or am I wrong about that?
18:44 timotimo i think that's fair to say
18:45 mst I think if you don't live in unix full time you don't see the extent to which directory/path naming when done carefully is actually a massive part of the utility
18:45 jnthn mst: Yeah, quite a bit.
18:45 mst for you, needing special tools likely isn't a surprise or a problem so long as they're good
18:46 jnthn mst: And while I do increasingly more of my day to day development work on Linux, it's fair to say I've never had to admin anything much more than a server hosting a handful of simple websites. :)
18:46 mst for me, it would be a moment not unlike https://sungo.im/misc/fault-tolerance.png (swearing)
18:46 jnthn mst: Though curiously, my design inspiration for it was actually largely Git
18:47 jnthn mst: Which is just a big store of things addressable as SHA-1s. :)
18:47 mst if git used the shas in the *checkout* I'd want to murder it too
18:47 jnthn Yeah :)
18:47 jnthn Context, context, context... :)
18:47 mst oh, yeah, also - a very trivial example - grep gives you the file name and the matching line
18:47 mst grep -r 'use Foo' \$CURLI_PATH
18:48 flussence (git also has, according to my bash-completion, 170 frontend programs to that on disk format)
18:48 mst would produce rather useful output under the approach I'm thinking about
18:48 mst whereas currently you're a bit stuffed
18:49 jnthn *nod*
18:49 jnthn Yeah, I see why you'd miss it.
18:49 mst and, like, it's nice to have shiny thing-specific tools but if production just blew up I do not want to -have- to remember them
18:50 sufrostico timotimo, mst , ugexe : thanks
18:51 mst jnthn: excellent. if your POV is now "this isn't my itch, but I could understand why somebody else would want to scratch it, and that if it goes well the end result would be a net usability improvement" then I'm happy
18:51 jnthn mst: Yes, thanks for being patient enough to fill me in on what I was missing.
18:52 john51 joined #perl6
18:54 john51 joined #perl6
18:55 mst jnthn: thanks for being part of creating something with a developer experience nice enough for me to care :D
18:55 flussence .oO( oh this is neat, some of the git frontends are hardlinked by category: `ls -l /usr/libexec/git-core | sort -nk 2` groups them by functionality [loose ends, servers, net transports, user interface] )
18:55 mst cute!
18:56 stmuk_ I don't think anyone should cite git as an example of well designed front ends however neat the backends are :)
18:57 stmuk_ see https://git-man-page-generator.lokaltog.net/
18:58 mst well, I think it's a good example of "how to make something that's extremely powerful once you know it backwards, but the learning curve is steep and you need to keep it memorised"
18:58 mst jnthn: which is kinda what you did, and the one part of git I don't want us to accidentally steal :D
18:59 MadcapJake .tell perlpilot I got another email about GSoC from Mark Keating, they decided to hold off this year and start preparations in the fall to make for a stronger, more-organized effort for the 2017 GSoC
19:00 john51 joined #perl6
19:01 jnthn stmuk_: Agree, though a good backend can have another frontend put on, but a bad backend design is probably pretty hard to redeem with a better frontend. :)
19:03 mst MadcapJake: that sounds like an mdk sort of plan
19:05 MadcapJake mst, I don't know mdk but I do think that the redoubling should've happened 2015 Fall not 2016 Fall.
19:06 mst MadcapJake: remember I explained that the summer 2015 picks were basically inexplicable and put a lot of people off - we didn't have the available volunteer time+motivation to do that as a result
19:07 mst I do think it would've been nice if we could've done it in fall 2015, but you can't force people to be motivated, especially after they've just been shat on from a great height
19:07 awwaiid I don't have time myself... but just to throw it out there -- we could have our own (non-google-sponsored) internship type program if we could scrape together the time and \$\$
19:07 kid51 joined #perl6
19:07 awwaiid though maybe google puts a lot more \$\$ in this than I'm realizing
19:08 awwaiid labor-wise, they have the orgs put up details, find students, mentor students, evaluate students ...
19:08 MilkmanDan joined #perl6
19:09 mst hm. what might be interesting is to submit for 2017 ... and then if we get refused, open it up to companies to pledge to sponsor the students anyway
19:09 awwaiid exactly
19:09 awwaiid says here it is \$5500 per student that they get
19:09 mst MadcapJake: eventually, you discover that 'should' generally isn't a useful word for such things
19:10 MadcapJake mst, but skipping just seems kind of immature
19:10 mst because it's effectively complaining that other people didn't volunteer to do the things you wanted them to do
19:10 awwaiid (which... is about the size of the budget for the DC-Baltimore Perl Workshop... so maybe nontrivial)
19:10 MadcapJake i'm speaking entirely from the perspective of what I would expect a Foundation to be
19:11 stmuk_ I don't think Google give the same orgs money every year anyway .. they try and spread it around
19:11 mst it's still made of volunteers, and better to do it next year properly than to half ass it this year and waste all the time put in
19:12 MadcapJake mst, certainly a valid perspective, I'm not disagreeing, I just thinking from the perspective of those at Google deciding these things, for a well-recognized foundation to skip a year seems a bit "non-foundation-like"
19:12 mst people seem to have expectations of TPF that really don't match the reality of it being a non-profit run by volunteers in their spare time (and note also that on the occasions we've proposed fixing that by paying people, a whole different set of people have got up in arms about it)
19:13 mst and, as I said earlier, after the debacle last year quite a number of projects are skipping a year
19:13 mst I suspect some of them won't bother again full stop, if the process doesn't start making a bit more sense
19:14 MadcapJake mst, perhaps that's there intent :P
19:14 jnthn Don't ascribe malice to what could easily be disorganization :)
19:14 mst perhaps. but I don't expect anybody who's actually worked with OSS non-profits to be remotely surprised, either way
19:15 mst I think it's just that they completely changed the selection process, and forgot to tell anybody what they were doing or how
19:15 mst I mean, it's google. it's not like they haven't done that before.
19:15 jnthn :-)
19:16 mst MadcapJake: if it was six months ago and you were volunteering to help co-ordinate, this would be a different conversation - but as it is, all you're really achieving is bagging on volunteers for finding that google's behaviour killed their -Ofun for a bit
19:19 AlexDaniel joined #perl6
19:19 MadcapJake mst, not trying to bag on volunteers! Sorry! I wish I was involved six months ago to help!
19:20 john51 joined #perl6
19:21 mst MadcapJake: the trick is to remember that TPF itself is a legal vehicle which exists to hold and distribute money - and then everything else done under its auspices is done by volunteers
19:22 mst at which point, you end up with more accurate expectations of what's possible :)
19:26 MadcapJake mst, sure, however I do think that part of the responsibility of existing as a legal vehicle is recognizing that you are (uncontrollably) going to be a cultural vehicle for Perl efforts and others will look to you for the current health and vitality of Perl 5/6.
19:28 mst I'm sure the people involved are very much aware of that, but sadly knowing this fact does not magic volunteer time and motivation out of thin air
19:34 _dolmen_ joined #perl6
19:34 john51 joined #perl6
19:38 gtbjj joined #perl6
19:40 yqt joined #perl6
19:43 Ben_Goldberg joined #perl6
20:01 pmurias MadcapJake: re having a global %context I don't have a good proposal for a replacement, it just doesn't seem very useful and seems to be something that's not strictly necessary
20:01 yoleaux 17:16Z <MadcapJake> pmurias: the Ruby version has the helper method as a module, so the default_scientist_context lets you change the context for any time you use the science helper.  I thought the best reflection of that in P6 would be a module-scoped hash.
20:01 yoleaux 17:18Z <MadcapJake> pmurias: what would you see as a more Perl 6 reflection of that?  Check here for some context (pun intended): https://github.com/github/scientist#adding-context
20:02 MadcapJake pmurias, but what do you find not useful about it?
20:03 pmurias MadcapJake: in ruby you can have a set of per class defaults
20:04 pmurias if I wanted to pass context stuff in globals instead of using a global %context hash I would just use a global
20:04 Cabanossi joined #perl6
20:04 MadcapJake but the %Test::Lab::Context isn't global it's module-scoped
20:05 MadcapJake maybe another route would be to add a named argument `context`
20:05 donaldh joined #perl6
20:05 pmurias you mean to the dsl-free &lab version
20:06 pmurias for the dsl using lab version you can just send things using \$experiment.context
20:06 pmurias just like in ruby
20:08 pmurias what I mean about %Test::Labl::context being useless is that in ruby it's per class, so in CuteWidget you can add a bunch of context that's shared for all experiments on cute widgets
20:08 telex joined #perl6
20:08 MadcapJake oh i see, you mean that in ruby the science helper is added by mixing a module in
20:09 MadcapJake and that module has the context method that you can change
20:09 pmurias the class you are mixing things in can have a default_scientist_context
20:09 MadcapJake but in my Test::Lab, it's module-scoped but really, since my module isn't a role, it's just the same as being globally scoped. is that what you mean?
20:09 pmurias yes
20:10 pmurias if we had a role that we added it would make sense to also have a default_lab_context
20:11 MadcapJake ok i'm following, but i'm kind of against it being a role because unlike ruby, you'd have to call it as `self.lab`
20:12 pmurias role Test::Lab::UseLabAsMethod {method lab(*%args) {lab(:context(self.default_lab_context), |%args}; method default_lab_context {...}}
20:13 pmurias maybe with a few tweaks and a better name ;)
20:13 cdg joined #perl6
20:14 average joined #perl6
20:14 average http://blog.garage-coding.com/2016/02/05/bash-fifo-jobqueue.html
20:15 average anyone here want to skim through my blog post
20:15 pmurias I think it would be best to first simplify things and then maybe add frills latter
20:15 pmurias I have started working on a dsl-free lab, but wasn't sure how to deal with context
20:18 von_cheam joined #perl6
20:18 cdg joined #perl6
20:19 MadcapJake also, was thinking another route to take for `try`, instead of having a named `:name` argument, we could allow the user to pass a named sub `.try: sub candidate1 { ... }`
20:19 _mg_ joined #perl6
20:21 von_cheam Hello! Complete newbie question here. Is it possible to create a static-type array in Perl 6? I can't find anything online..
20:21 cdg joined #perl6
20:22 Skarsnik static type? you mean an umutable Array?
20:22 MadcapJake von_cheam, what do you mean by static-type?
20:22 Skarsnik List or Seq are unmutable
20:22 MadcapJake Skarsnik, do you mean immutable?
20:22 Skarsnik yes probably
20:23 von_cheam As in something like:
20:23 von_cheam my Int @value;
20:23 von_cheam That'll only accept Integers as elements.
20:23 MadcapJake that's exactly how you do it von_cheam
20:23 hippie1 m: my Int @foo; @foo.push("steve")
20:23 camelia rakudo-moar 7010f3: OUTPUT«Type check failed in assignment to @foo; expected Int but got Str ("steve")␤  in block <unit> at /tmp/_cGxzNDFjs line 1␤␤»
20:24 von_cheam Oh, okay, fantastic. Thanks very much!
20:24 hippie1 Perl 6 is so good, you know it without even knowing you know it.
20:25 von_cheam Haha!
20:25 von_cheam left #perl6
20:26 ely-se joined #perl6
20:28 Begi We have to wake up the #perl6 hashtag !
20:28 MadcapJake Begi, there's a light use of it already, but surely not enough!
20:29 Begi that's sure, not enough !
20:29 john51 joined #perl6
20:30 sufrostico joined #perl6
20:31 shadowpaste "pmurias" at 217.168.150.38 pasted "how a DSL free &lab would work" (7 lines) at http://fpaste.scsys.co.uk/505999
20:32 pmurias MadcapJake: ^^ how &lab works in my working copy
20:32 pmurias MadcapJake: instead of having a bunch of "cute" pseudo accessor we could have &lab for the suger and make Test::Lab::Experiment a normal object
20:33 rindolf joined #perl6
20:33 MadcapJake pmurias, i like that example, but there's no `use`, is that intentional?
20:34 MadcapJake pmurias, I think that's a great idea, do you have an example of what that would mean in practice?
20:34 pmurias I'll paste a version of use
20:34 pmurias s/of/with/
20:38 shadowpaste "pmurias" at 217.168.150.38 pasted "how a DSL free &lab would work" (23 lines) at http://fpaste.scsys.co.uk/506000
20:38 pmurias MadcapJake: ^^ a more complex example
20:38 MadcapJake part of me is still a bit hesitant to turn lab into a named-arg sub as the ruby version allows you to do anything you want inside the procedure block, while the named-arg perl6 routine would only allow you modify thing internal to each named arg or before called &lab.
20:40 pmurias can we do anything inside the procedure block other than set the named arguments?
20:40 Begi joined #perl6
20:41 MadcapJake pmurias, currently you could do anything you want but really only for preparation as none of the tests are run until after the procedure finishes.
20:42 pmurias you will be still be free to calculate the named arguments how you want outside the lab block
20:42 MadcapJake but maybe you wanted to dynamically generate something, then you'd have to add that outside of the lab or do it inside each use/try/run-if etc.
20:42 MadcapJake yeah true, the facility is still there but i can't decide what's a better interface
20:43 pmurias any use cases when you want to dynamically generate stuff inside the lab?
20:44 MadcapJake the benefit of the DSL are (to me): 1) simple wrapping 2) less typing 3) a block to run anything you want when declaring your experiments
20:46 MadcapJake the benefits of named-args are: 1) more perlish 2) more readable 3) less indenting (and in some cases less typing)
20:47 pmurias what do you mean for simple wrapping?
20:48 MadcapJake you only have to place one line before and a curly end after.  whereas with a named-args design you would need to rewrite the code inside of a call to &lab
20:52 pmurias don't you have to just type less to wrap? lab 'test', { .use: {...}} vs lab :name<test>, use => {...}
20:52 b2gills (backlogging) Why does everyone use ｢%hash.sort(*.key)｣ instead of just ｢%hash.sort｣?
20:52 pmurias and we could also use lab 'test', use => {...} in the DSL-free version
20:52 Skarsnik sort call %hash.flat.sort ?
20:54 pmurias so it would be lab 'test', { .use: {...}} vs lab 'test', use => {...}
20:56 MadcapJake yeah that certainly is pretty close :P
20:58 john51 joined #perl6
20:59 lizmat fg
20:59 musiKk joined #perl6
20:59 lizmat oops  :-)
21:00 spider-mario I see that we have the same kind of problem :)
21:00 b2gills I don't have that problem because my terminal is white on black, and Pidgin is by default black on white
21:00 spider-mario I occasionally type `ls` into my hangouts window with my “main” coworker
21:01 spider-mario promptly followed by “oops, sorry”
21:01 spider-mario to which she replies “np”
21:02 moritz :w
21:02 moritz no vim bot around :-)
21:02 spider-mario :x
21:08 geraud joined #perl6
21:09 dh7320 joined #perl6
21:17 nine timotimo: I guess the profiler just uses the <file> annotation of the MAST nodes? Those do now contain the requested module's name in parentheses in my branch. Should be somewhat trivial to extract that, shouldn't it?
21:22 timotimo oh. yeah, it uses that
21:38 firstdayonthejob joined #perl6
21:40 BenGoldberg b2gills, %hash.sort(*.key) merely happens to be what's in Hash.pod.
21:40 BenGoldberg m: my %vowels = 'a' => 1, 'e' => 2, 'i' => 3, 'o' => 4, 'u' => 5; for %vowels.sort -> (:key(\$vowel), :value(\$index)) { "\$vowel: \$index".say }
21:40 camelia rakudo-moar 7010f3: OUTPUT«a: 1␤e: 2␤i: 3␤o: 4␤u: 5␤»
21:42 Ben_Goldberg joined #perl6
21:44 ely-se joined #perl6
21:44 rpburkholder joined #perl6
21:45 Begi I'm a beginner with Perl 6 : is this code correct ?
21:45 Begi http://pastebin.com/GPzwzu1y
21:45 Begi Can I improve it ? Thanks !
21:46 MadcapJake prepare doesn't need to be a multi if there's only one sub
21:47 MadcapJake personally, i would just inline that if you're not planning on using `prepare` anywhere else
21:48 Begi Oh yes, why not.
21:48 Begi Hmm, I'm gonna use it ine the future in fact
21:49 MadcapJake also you don't need the `\$_ eq` as `when` automatically checks a string for `eq` against the topic variable
21:50 TEttinger joined #perl6
21:50 Begi so, I can do something like when 'dec' {} ?
21:50 MadcapJake instead of `say 'Invalid!'` maybe you want to use `die 'Invalid'` which will exit with an error code and a stack trace
21:50 SCHAAP137 joined #perl6
21:51 Begi nice idea ! and yes, that's it
21:51 Begi thanks !
21:55 MadcapJake also, the MAIN doesn't need multi, but you *could* separate the modes and do a different multi for each mode
21:56 MadcapJake e.g., «multi sub MAIN('enc', Int \$n, Str \$filename) { ... }»
21:59 MadcapJake multi is only needed where you plan on supporting multiple Signatures i.e., different parameters per routine
22:02 wamba joined #perl6
22:12 john51 joined #perl6
22:22 xnrand joined #perl6
22:23 john51 joined #perl6
22:29 john51_ joined #perl6
22:31 _dolmen_ joined #perl6
22:39 dalek ecosystem: 8b44800 | (Aurelio Sanabria)++ | META.list:
22:39 dalek ecosystem: Add RPI::Wiring::Pi to the ecosystem
22:39 dalek ecosystem:
22:39 dalek ecosystem: See https://github.com/Sufrostico/perl6-wiringpi/
22:39 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/8b44800ec9
22:39 dalek ecosystem: df996f8 | RabidGravy++ | META.list:
22:39 dalek ecosystem: Merge pull request #158 from Sufrostico/master
22:39 dalek ecosystem:
22:39 dalek ecosystem: Add RPI::Wiring::Pi to the ecosystem
22:39 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/df996f8054
22:40 RabidGravy There are a goodly few raspberry pi modules getting in there
22:40 RabidGravy this is a good thing
22:43 john51 joined #perl6
22:46 john51__ joined #perl6
22:50 AlexDaniel “(b) it makes it darn clear you're not meant to be messing with those things by hand” – eh, too bad the easiest way to fix a module sometimes is to open the goddamn file and edit it…
22:51 john51_ joined #perl6
22:51 AlexDaniel it is a bad idea, yeah, whatever. It works
22:52 AlexDaniel at least right now
22:59 neilb joined #perl6
23:04 john51 joined #perl6
23:05 AlexDaniel average: hi! So I skimmed through your blog post
23:05 MadcapJake AlexDaniel, that's why I wish for a «panda develop Module::Name» that would pull a module out of it's sha'd home for you to develop (but symlinked back into the sha'd dir)
23:06 AlexDaniel MadcapJake: yeah, that'd be great
23:06 AlexDaniel my biggest problem right now is that stacktraces don't make any sense to human beings
23:06 AlexDaniel so I'm glad that we have mst++
23:06 MadcapJake yep that's exactly where the discussion earlier came from
23:07 AlexDaniel that being said, when stacktraces are finally fixed I'll have other problems… :)
23:07 AlexDaniel average: ok, so, since it is about bash… prepare for bash pitfalls!
23:07 MadcapJake honestly my two grievances right now are 1) stacktraces are practically useless and 2) hacking on modules is discouraged and difficult
23:08 john51 joined #perl6
23:09 AlexDaniel average: a rule of thumb is to quote everything. E.g. here ｢. \$PWD/queue-samples/seq-stats.sh｣
23:09 AlexDaniel average: or here: echo "\$MESSAGE" >\$FIFO
23:09 AlexDaniel average: or here: rmdir \$CONSUMER_LOCK
23:10 AlexDaniel average: everywhere. Everything has to be quoted. Although unquoted things may work right now, there's no guarantee that a tiny space will never get in
23:10 MadcapJake what's the best way to run a p6 script in the background at intervals (on linux)?
23:11 AlexDaniel average: Okay, now this: ｢read line｣. read without -r does not make much sense
23:12 john51 joined #perl6
23:12 AlexDaniel average: ok, now this is probably not as safe as you might think: echo "\$MSG"
23:13 MadcapJake lol oops, meant to say «watch» works
23:13 AlexDaniel average: I have no idea what could possibly be inside "\$MSG" but try ｢MSG='-n'｣ and see how it breaks
23:15 AlexDaniel average: so yeah. In short: 1) always quote everything 2) always use read -r 3) use printf when printing arbitrary variables
23:16 john51_ joined #perl6
23:17 lichtkind joined #perl6
23:17 AlexDaniel average: I might take another look when you fix these things
23:17 lichtkind masak cheers
23:18 dh7320 joined #perl6
23:18 john51_ joined #perl6
23:19 AlexDaniel average: also, this page is extremely useful in such cases: http://mywiki.wooledge.org/BashPitfalls
23:25 dalek rakudo/nom: 77581b1 | lizmat++ | / (3 files):
23:25 dalek rakudo/nom: Make @a.chrs 3x as fast, chrs(@a) 9x as fast
23:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/77581b1c20
23:30 timotimo damn.
23:32 lizmat damn?
23:34 timotimo that's good savings
23:34 japhb lizmat++   # Lots of optimization commits
23:35 timotimo "damn those commits are good"
23:35 japhb Very nice things to see on return from vacation.  :-)
23:35 lizmat FWIW, I'll be glad to revert them once we have deeper optimizations making these obsolete
23:36 lizmat but I came across this one while working in the p5 pack/unpack module
23:36 lizmat which I hope to have ready by tomorrow
23:37 pierrot joined #perl6
23:38 japhb oooh, nice
23:40 lizmat https://github.com/lizmat/PackUnpack fwiw
23:41 lizmat preliminary set that will be supported: a A C h H I L n N Q S v V x Z
23:41 timotimo oh, was there anything you could steal from FROGGS' v5?
23:43 lizmat I've taken my inspiration from src/core/Buf
23:43 lizmat fwiw, I figured FROGGS would be using that in v5, was I wrong ?
23:44 timotimo no clue
23:44 timotimo i just guessed
23:46 lizmat hmmm... seems it is a different implementation altogether
23:46 lizmat will use that as further inspiration tomorrow  :-)
23:47 lizmat timotimo++ for reminding me, FROGGS++ for putting in the work so far
23:47 pierrot joined #perl6
23:50 timotimo cool :)