Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-04-10

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:29 japhb timotimo: Is JSON::Fast now 100% correct?  If so, can you replace the Rakudo built-in JSON parser with it?
00:48 laouji joined #perl6
00:52 Sqirrel joined #perl6
01:11 skids joined #perl6
01:13 TimToady JVM very unhappy tonight, seems
01:15 aborazmeh joined #perl6
01:15 aborazmeh joined #perl6
01:16 TimToady 67 test files failing
01:18 TimToady https://gist.github.com/anonymous/9dc73118674e46248155 is the boringly repetitious error message
01:20 TimToady --ll-exception is no help
01:21 tinyblak joined #perl6
01:27 yeahnoob joined #perl6
01:44 ugexe its the range operator i believe
01:45 ugexe my @encoding-chars = 'A'..'Z','a'..'z','0'..'9','+','/'; <-- exception on jvm... reason for MIME::Base64 failing on jvm
01:45 fhelmberger joined #perl6
01:47 adu joined #perl6
01:47 ugexe replaced with an array of explicitly declared characters it works
01:48 colomon joined #perl6
01:50 Sqirrel joined #perl6
01:52 ugexe unless you are looking for why/where... cant help you there :)
01:55 ugexe although it will happen if you try to run that code, or just precompile it
01:58 TimToady probably my fault somehow then :)
01:58 TimToady since ranges turn into sequences, and I was just mucking with sequences
01:59 ugexe the only reason i caught that was because i saw you all talking about them earlier
01:59 TimToady well, despite the terrible lack of info, I can probably hunt it down through divide-and-conquer
02:00 TimToady yeah, say 1...5 blows it up
02:01 TimToady well, I shoulda figgered it out myself, but thanks
02:02 laouji_ joined #perl6
02:06 dwarring joined #perl6
02:14 aborazmeh joined #perl6
02:14 aborazmeh joined #perl6
02:14 tinyblak joined #perl6
02:28 Sqirrel joined #perl6
02:30 noganex_ joined #perl6
02:41 kaare_ joined #perl6
02:48 muraiki joined #perl6
02:55 adu joined #perl6
03:11 laouji joined #perl6
03:18 anaeem1 joined #perl6
03:32 dalek rakudo/nom: 0354bb6 | TimToady++ | src/core/operators.pm:
03:32 dalek rakudo/nom: avoid last in loop in gather that blows up jvm
03:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0354bb6606
03:33 TimToady .tell jnthn any idea why the lasts I removed in 0354bb6 cause the JVM to puke?
03:33 yoleaux TimToady: I'll pass your message to jnthn.
03:34 awwaiid Can I do something like: sub MAIN(IO $filename ~~ :f); to say the param must be a file?
03:34 TimToady use where intead of ~~ maybe
03:35 TimToady but you might also need IO() to coerce it
03:35 awwaiid ah yes, where! I was looking for that but didn't search right
03:36 awwaiid ub MAIN(IO() $filename where { $filename ~~ :f }); # works perfectly, thanks!
03:37 TimToady where :f oughta work
03:37 TimToady it's just a smartmatch
03:37 skids m: { .say; succeed 43.say; }(1).perl.say # I can see no use for succeed hitting bottom without finding a when or topicalizer (?), so it should probably warn, at least.
03:37 camelia rakudo-moar 5a3f38: OUTPUT«1␤43␤»
03:38 TimToady a bare block topicalizes $_, in fact, you used the top in .say
03:38 TimToady *topic
03:38 awwaiid it does! neat
03:39 skids Yes, and because there was no when { }, succeed did not stop there.  It went a the way to the outermost scope.
03:39 skids *all
03:39 skids m: (when * { succeed 43.say; }).perl.say
03:39 camelia rakudo-moar 5a3f38: OUTPUT«43␤»
03:40 skids That found the when but no topicalizer.
03:41 TimToady yeah, seems a bit rinky-tink yet
03:41 skids Unless there is a use case, I think if a succeed control exception hits the bottom, it shold just throw.
03:42 skids (something other than a succeed control exception :-)
03:43 TimToady most of the lexotics in rakudo are still a bit rinky-tink
03:44 skids Well, to be fair I don't think the behavior is addressed in spec.
03:46 TimToady S04:952 is pretty detailed, but doesn't say how it should fail to be sure
03:48 TimToady m: { when * -> $_ { succeed .say }; say "Oops" }(42).say
03:48 camelia rakudo-moar 0354bb: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block  at /tmp/Iz6taeDCrn:1␤  in block <unit> at /tmp/Iz6taeDCrn:1␤␤»
03:49 TimToady I guess when -> isn't implemented yet, but would be interesting to see if it is merely scanning for a topicalizer and ignoring the when
03:50 * TimToady wonders if there are tests written...
03:51 skids If a bare block topicalizes, is there an example of a non-topicalizing block?
03:57 TimToady m: say "Here { $_ } is a non-topicalizing block" given 42
03:57 camelia rakudo-moar 0354bb: OUTPUT«Here  is a non-topicalizing block␤»
03:58 TimToady m: say "Here { $^a } is a non-topicalizing block" given 42
03:58 camelia rakudo-moar 0354bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DvN6528gib␤Placeholder variable $^a may not be used here because the surrounding block takes no signature␤at /tmp/DvN6528gib:1␤------> 3say "Here { $^a }7⏏5 is a non-topicalizing block" given 42␤ …»
03:59 skids m: (given 1 { -> $a { when * { succeed 43 }; }(1).say; 42; }).say; 41.say # Is a pointy considered topicalizing?
03:59 camelia rakudo-moar 0354bb: OUTPUT«43␤42␤41␤»
03:59 TimToady only if it declares $_ in the siggie
04:01 anaeem1_ joined #perl6
04:04 FROGGS_ joined #perl6
04:16 anaeem1__ joined #perl6
04:17 tinyblak joined #perl6
04:18 gcole_ joined #perl6
04:35 dalek doc: 49755ef | skids++ | lib/Language/control.pod:
04:35 dalek doc: Split up some long lines and go OCD on the code sample spacing
04:35 dalek doc: Polish a phrase here or there
04:35 dalek doc: review: https://github.com/perl6/doc/commit/49755efbef
04:35 dalek doc: ade043f | skids++ | lib/Language/control.pod:
04:35 dalek doc: Subdivide the given/when/default/proceed/succeed section
04:35 dalek doc: Elaborate on when/default/proceed/succeed
04:35 dalek doc: Show a few examples of when/default without given
04:35 dalek doc: For now, avoided giving examples with non-topicalized blocks (rakudo NYI)
04:35 dalek doc: review: https://github.com/perl6/doc/commit/ade043f151
04:35 skids Now I wait to see how badly I screwed up markup.
04:44 sjn question. is it meaningful/correct to talk about "sigilless variables" as constants?
04:45 skids m: my \d = 1; d = 2; d.say;
04:45 camelia rakudo-moar 0354bb: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/VlcXiG8pVX:1␤␤»
04:46 skids hrm.
04:47 skids m: sub foo (\d is rw) { d++ }; my $a = 1; foo($a); $a.say;
04:47 camelia rakudo-moar 0354bb: OUTPUT«2␤»
04:48 laouji joined #perl6
04:49 skids m: my (\d); d++; d++; d.say;
04:49 camelia rakudo-moar 0354bb: OUTPUT«2␤»
04:55 dalek doc/sjn-twigil-1: 0949009 | (Salve J. Nilsen)++ | lib/Language/variables.pod:
04:55 dalek doc/sjn-twigil-1: Update variables.pod
04:55 dalek doc/sjn-twigil-1:
04:55 dalek doc/sjn-twigil-1: Example should use $.b to demonstrate method calls to $.a
04:55 dalek doc/sjn-twigil-1: review: https://github.com/perl6/doc/commit/09490092c9
05:02 dalek doc: 0949009 | (Salve J. Nilsen)++ | lib/Language/variables.pod:
05:02 dalek doc: Update variables.pod
05:02 dalek doc:
05:02 dalek doc: Example should use $.b to demonstrate method calls to $.a
05:02 dalek doc: review: https://github.com/perl6/doc/commit/09490092c9
05:02 dalek doc: 796181f | paultcochrane++ | lib/Language/variables.pod:
05:02 dalek doc: Merge pull request #73 from perl6/sjn-twigil-1
05:02 dalek doc:
05:02 dalek doc: Update variables.pod
05:02 dalek doc: review: https://github.com/perl6/doc/commit/796181f146
05:07 [ptc] skids++  # doc corrections
05:24 anaeem1 joined #perl6
05:32 TimToady we try to reserve the term "constant" for things that can never be rebound.  at best \d would be a readonly since it can be rebound next time through, and it looks like sometimes it's bound to a container
05:33 TimToady m: my (\d); say VAR(d).WHAT;
05:33 camelia rakudo-moar 0354bb: OUTPUT«(Scalar)␤»
05:33 TimToady m: my (\d) ::= 42; say VAR(d).WHAT;
05:33 camelia rakudo-moar 0354bb: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at /tmp/e7a60IHhI6:1␤␤»
05:33 TimToady m: my (\d) = 42; say VAR(d).WHAT;
05:33 camelia rakudo-moar 0354bb: OUTPUT«(Scalar)␤»
05:33 TimToady well, is arguably buggy anyway
05:34 TimToady m: my \d = 42; say VAR(d).WHAT;
05:34 camelia rakudo-moar 0354bb: OUTPUT«(Int)␤»
05:34 TimToady that one is definitely readonly
05:34 TimToady m: my \d = 42.item; say VAR(d).WHAT;
05:34 camelia rakudo-moar 0354bb: OUTPUT«(Int)␤»
05:34 TimToady m: my \d = $(42); say VAR(d).WHAT;
05:34 camelia rakudo-moar 0354bb: OUTPUT«(Int)␤»
05:34 TimToady m: my \d = Scalar.new(42); say VAR(d).WHAT;
05:35 camelia rakudo-moar 0354bb: OUTPUT«Default constructor for 'Scalar' only takes named arguments␤  in method new at src/gen/m-CORE.setting:974␤  in block <unit> at /tmp/PWXfh1bu46:1␤␤»
05:35 TimToady m: my \d = Scalar.new; say VAR(d).WHAT;
05:35 camelia rakudo-moar 0354bb: OUTPUT«Cannot call method 'BUILDALL' on a null object␤  in method bless at src/gen/m-CORE.setting:985␤  in method new at src/gen/m-CORE.setting:971␤  in block <unit> at /tmp/x7Ep31OViP:1␤␤»
05:39 lizmat joined #perl6
05:40 labster m: =begin pod␤    =for pod :number(42) :zebras :!sheep␤=end pod␤ say $=pod[0];
05:40 camelia rakudo-moar 0354bb: OUTPUT«Pod::Block::Named{:name("pod")}<>␤  Pod::Block::Named{:config("\{:number(\"42\"), :sheep(\"0\"), :zebras(\"1\")}"), :name("pod")}<>␤␤»
05:41 labster shouldn't those be :sheep(False) and :zebras(True)?
05:43 skids [ptc]++ docs in the first place
05:45 Psyche^ joined #perl6
05:45 fhelmberger joined #perl6
05:47 anaeem1_ joined #perl6
05:52 lizmat NLPW&
06:04 anaeem1 joined #perl6
06:26 tinyblak joined #perl6
06:30 Sqirrel joined #perl6
06:42 diana_olhovik_ joined #perl6
06:46 RabidGravy joined #perl6
06:56 Ven joined #perl6
06:56 Rounin joined #perl6
07:02 _mg_ joined #perl6
07:06 lizmat joined #perl6
07:06 lizmat good morning from the NLPW in the lovely town of Utrecht
07:09 lizmat m: m: =begin pod␤    =for pod :number(42) :zebras :!sheep␤=end pod␤ say $=pod[0];  # labster: feels to me that should be False/True rather than 0/1
07:09 camelia rakudo-moar 0354bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/z1sBA2C2PV␤Preceding context expects a term, but found infix = instead␤at /tmp/z1sBA2C2PV:1␤------> 3m: =7⏏5begin pod␤»
07:09 lizmat m: =begin pod␤    =for pod :number(42) :zebras :!sheep␤=end pod␤ say $=pod[0];  # labster: feels to me that should be False/True rather than 0/1
07:09 camelia rakudo-moar 0354bb: OUTPUT«Pod::Block::Named{:name("pod")}<>␤  Pod::Block::Named{:config("\{:number(\"42\"), :sheep(\"0\"), :zebras(\"1\")}"), :name("pod")}<>␤␤»
07:09 lizmat perhaps a missing nqp::p6bool() wrapper ?
07:14 FROGGS joined #perl6
07:14 Ven https://github.com/Microsoft/openssl/blob/0c9ac1b79ca5e0d57c0c73b1f20631042d923375/ms/do_vsproject.pl microsoft totally uses perl as well
07:20 telex joined #perl6
07:29 RabidGravy Ven, if my memory serves me they actually paid for the first port of Perl 5 to windows
07:32 brrt joined #perl6
07:33 FROGGS RabidGravy: they supported ActivePerl IIRC
07:39 RabidGravy yeah but there was a truly horrible port of 5.000m that was on the Windows NT resource kit CD that pre-dated ActivePerl
07:40 FROGGS aye
07:43 cschwenz joined #perl6
07:43 lizmat joined #perl6
07:47 diana_olhovik_ joined #perl6
07:47 lizmat .tell timotimo no, I didn't see your fast JSON parser yet, something to put in core ?
07:47 yoleaux lizmat: I'll pass your message to timotimo.
07:50 bjz joined #perl6
07:51 yvan1 joined #perl6
07:53 abraxxa joined #perl6
07:56 brrt lizmat: https://github.com/timo/json_fast
07:58 lizmat cool!
07:58 brrt yeah
07:59 lizmat .tell timotimo feels to me it could use a few native arrays and native str in some places still
07:59 yoleaux lizmat: I'll pass your message to timotimo.
08:01 dalek Heuristic branch merge: pushed 26 commits to rakudo/newio by lizmat
08:02 brrt .tell timotimo Fast.pm L66:L82 can be a hash?
08:02 yoleaux brrt: I'll pass your message to timotimo.
08:02 dalek Heuristic branch merge: pushed 34 commits to roast/newio by lizmat
08:04 zakharyas joined #perl6
08:04 mr-foobar joined #perl6
08:05 timotimo yeah, i think a hash would be good, just not sure how to handle the \u case well
08:05 yoleaux 07:47Z <lizmat> timotimo: no, I didn't see your fast JSON parser yet, something to put in core ?
08:05 yoleaux 07:59Z <lizmat> timotimo: feels to me it could use a few native arrays and native str in some places still
08:05 yoleaux 08:02Z <brrt> timotimo: Fast.pm L66:L82 can be a hash?
08:07 timotimo i thought a few more native things would be better, too. i have to do precise timings to see what is worth it and what isn't
08:07 timotimo it seems like there's a sort of trade-off between "my int $ord = nqp::ordat($text, $pos)" vs "my $ord := nqp::ordat($text, $pos)"
08:08 timotimo and i don't have to use parenthesis notation everywhere for nqp "sub" calls, either
08:08 21WABVHN9 joined #perl6
08:08 aborazmeh joined #perl6
08:08 aborazmeh joined #perl6
08:08 timotimo at least with regards to allocations, it seems waterbeddy at the moment
08:09 timotimo as in: either you get Scalar allocations or Str/Int allocations
08:09 timotimo and there's a LOT of those allocations
08:09 timotimo and while $pos++ would work now, it still turns into a full sub call, if i saw correctly
08:09 timotimo that's why i put $pos = $pos + 1 everywhere
08:10 brrt kill all the allocations!
08:10 timotimo i'd like to
08:10 brrt but yeah, looks pretty good timo :-)
08:10 timotimo no, it looks ugly :)
08:10 brrt you are not a true C programmer
08:10 brrt then :-P
08:10 timotimo :D
08:11 brrt why are most subs prefixed with my? don't want to expose them?
08:11 timotimo correct
08:11 timotimo their interface isn't exactly user-friendly
08:11 brrt also... i don't agree that a json string ought to start with a { or [
08:11 timotimo blame the JSON::Tiny test suite
08:12 timotimo i was looking for that in the ecma spec for json, too
08:12 brrt i think you can have totally valid numbers and strings
08:12 timotimo and couldn't find it
08:12 brrt as in "foo" is perfectly valid json imho
08:12 brrt but timotimo++
08:12 timotimo # stolen from JSON::XS, 18_json_checker.t
08:12 timotimo Q<<"A JSON payload should be an object or array, not a string.">>,
08:13 timotimo possibly stolen from there before that was changed in the spec or something like that?
08:13 timotimo JSON::Tiny is pretty old already
08:17 laouji joined #perl6
08:17 darutoko joined #perl6
08:17 lizmat joined #perl6
08:18 RabidGravy fwiw, Node.js won't parse a plain atom either
08:18 timotimo the json checker test file from JSON::XS still seems to want the outermost value having to be an object or array
08:18 RabidGravy > var foo = JSON.parse('hshsh');
08:18 RabidGravy SyntaxError: Unexpected token h
08:19 eli-se joined #perl6
08:20 RabidGravy no I'm talking shit
08:20 RabidGravy omitted the ""
08:20 timotimo ah
08:21 RabidGravy > var foo = JSON.parse('"hshsh"');
08:21 RabidGravy undefined
08:21 timotimo ... undefined?
08:22 RabidGravy the Node.js REPL does that for any object
08:22 timotimo that's weird. is it just so that it doesn't print a thousand lines of output for everything?
08:23 RabidGravy console.log(JSON.parse('{}'));
08:23 RabidGravy {}
08:23 RabidGravy undefined
08:23 RabidGravy > console.log(JSON.parse('"foooo"'));
08:23 RabidGravy foooo
08:23 RabidGravy undefined
08:23 timotimo OK
08:24 RabidGravy never been sufficiently curious to find out *why* it prints "undefined"
08:26 Ven joined #perl6
08:27 bobkare I seem to recall something about non-array/object json documents being a new thing in the new json standard last year
08:29 timotimo i read the 2013 standard and it didn't have any restriction on that
08:32 labster lizmat: Actually I'm pretty sure that it's in Perl6::Pod that's causing that pod error earlier, right under this comment: # and this is the worst hack of them all.  # Hide your kids, hide your wife!
08:33 timotimo oh tadzik %)
08:33 FROGGS :D
08:33 labster much more entertaining that TODO FIXME
08:33 labster *than
08:35 diana_olhovik joined #perl6
08:37 FROGGS m: try use Flubber;
08:37 camelia rakudo-moar 0354bb: OUTPUT«===SORRY!===␤Could not find Flubber in any of: /home/camelia/.perl6/2015.03-223-g0354bb6/lib, /home/camelia/.perl6/2015.03-223-g0354bb6, /home/camelia/rakudo-inst-2/share/perl6/lib, /home/camelia/rakudo-inst-2/share/perl6/vendor/lib, /home/camelia/rakudo…»
08:39 dakkar joined #perl6
08:41 RabidGravy I'm trying to remember what software it was where it documented that it *extends* JSON to allow the atoms at the top level
08:42 rurban_ joined #perl6
08:44 nwc10 "YAML?" :-)
08:46 Ven json5 probably
08:48 fhelmberger joined #perl6
08:48 RabidGravy no, no some actual software that uses JSON, I thought it was CouchDB but I can't find what I thought I read in the docs
08:51 RabidGravy though it does have a useful round up of real world json parser behaviour in http://docs.couchdb.org/en/1.6.1/api/basics.html#json-basics
08:51 andreoss joined #perl6
08:52 jnthn timotimo: "my" is the defualt for subs
08:52 yoleaux 9 Apr 2015 22:12Z <lizmat> jnthn: that's what b6bc4ecd08b4792d73ab0ee9da01edac60a909c0 did (well, checking, not throwing, not sure what would be best in this case)
08:52 yoleaux 9 Apr 2015 22:13Z <lizmat> jnthn: perhaps an X::OutOfRange exception would be best, to stay in line with .substr
08:52 yoleaux 03:33Z <TimToady> jnthn: any idea why the lasts I removed in 0354bb6 cause the JVM to puke?
08:53 andreoss` joined #perl6
08:54 eli-se .botsnack
08:54 yoleaux :D
08:54 jnthn .tell TimToady Not immediately, no... :(
08:54 yoleaux jnthn: I'll pass your message to TimToady.
08:55 eli-se I think yoleaux likes bones. "bot" is Dutch for "bone"
08:57 diana_olhovik_ joined #perl6
08:59 nine I think we should end calling modules ::Tiny or ::Fast. Tiny things never stay tiny. And fast things get superseeded by things that are even faster. Why not just name it after what it does? It's a JSON::Parser, nothing more, nothing less. And in Perl 6, both JSON::Tiny and JSON::Fast could be called JSON::Parser, just by two different authorities. The one even is a reimplementation of the other.
08:59 yoleaux 9 Apr 2015 22:11Z <lizmat> nine: the solution is simple: Inline::Perl6 -> Inline::Perl5 -> other version  :-)
09:00 nine .tell lizmat shame on me for not thinking about using Inline::Perl6 :)
09:00 yoleaux nine: I'll pass your message to lizmat.
09:05 espadrine joined #perl6
09:05 diana_olhovik joined #perl6
09:06 dalek roast: e35d2cf | labster++ | S (3 files):
09:06 dalek roast: test that "0" is now True, fix tests for non-string pod options
09:06 dalek roast: review: https://github.com/perl6/roast/commit/e35d2cf45a
09:07 dalek rakudo/nom: 82a1811 | labster++ | src/core/Str.pm:
09:07 dalek rakudo/nom: ?"0" is now True per spec change
09:07 dalek rakudo/nom:
09:07 dalek rakudo/nom: In particular perl6/specs@befb20c3b
09:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/82a18113aa
09:08 noganex joined #perl6
09:10 bjz joined #perl6
09:11 moritz labster: do you have some assessment of the ecosystem fallout caused by that change?
09:11 labster not really, though it only broke 4 spectests (and some wrong tests).  If you want to revert, go ahead.
09:11 FROGGS no, we can measure the fallout
09:12 moritz labster: I don't want to revert right now
09:12 moritz only if it turns out to be a disaster :-)
09:12 labster FROGGS: how do we measure now?
09:13 FROGGS run a panda smoke, copy the share/panda/reports.<compiler-version>, checkout to the commit before the change, smoke again, and compare both report files
09:13 moritz then we can prepare branches for modules, and do the change right after a release
09:13 FROGGS ahh, and you've got to set PANDA_SUBMIT_TESTREPORTS=1
09:13 labster :)
09:18 lizmat joined #perl6
09:20 andreoss` left #perl6
09:22 grondilu joined #perl6
09:25 RabidGravy right off to the seaside to escape the pollution and pollen
09:34 diana_olhovik_ joined #perl6
09:39 diana_olhovik joined #perl6
09:40 fhelmberger joined #perl6
09:42 dalek perl6-examples: 533535f | paultcochrane++ | categories/wsg/advanced-2008/event (2 files):
09:42 dalek perl6-examples: Use consistent filename for event010-dwhipp.p6
09:42 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/533535f69e
09:42 dalek perl6-examples: a294ef5 | paultcochrane++ | categories/wsg/ (8 files):
09:42 dalek perl6-examples: Document examples for wsg category
09:42 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/a294ef5918
09:44 fhelmberger joined #perl6
09:45 bjz joined #perl6
09:46 oetiker joined #perl6
09:47 [ptc]_ joined #perl6
09:51 noganex_ joined #perl6
09:53 [ptc]_ lizmat: does slurp still append a newline?
09:54 lizmat not sure why it would, does it?
09:54 yoleaux 09:00Z <nine> lizmat: shame on me for not thinking about using Inline::Perl6 :)
09:54 [ptc]_ lizmat: just found it mentioned in tests in the perl6-examples project, and after Tux' comment, wondered if it had been changed
09:55 lizmat is you look at the result of a slurp with say, it will have a \n after it  :-)
09:55 [ptc]_ lizmat: aha, it's still there.  Thanks :-)
10:05 diana_olhovik_ joined #perl6
10:06 lichtkind joined #perl6
10:08 chenryn joined #perl6
10:09 lizmat std: [42]<>
10:09 camelia std 28329a7: OUTPUT«ok 00:00 137m␤»
10:09 lizmat m: say [42]<>.perl   # did I miss a memo on that syntax?
10:09 camelia rakudo-moar 82a181: OUTPUT«[42]<>␤»
10:10 lizmat m: say [42].perl   # did I miss a memo on that syntax?
10:10 camelia rakudo-moar 82a181: OUTPUT«[42]␤»
10:10 psch m: say [42].flat.perl
10:10 camelia rakudo-moar 82a181: OUTPUT«[42]<>␤»
10:11 psch lizmat: i understood it as a container-independant zen slice
10:11 masak good noon, #perl6
10:11 psch lizmat: i think TimToady++ had some rational about a week back, let me see if i can find it
10:11 lizmat "switch to .<> as more visually distinct decont"
10:11 molaf joined #perl6
10:11 masak lizmat: there's a bit of discussion about it in the backlog.
10:11 lizmat ok
10:11 masak lizmat: I can't say I'm overly pleased with it.
10:12 masak to me, .<> still rings of "hash access"
10:12 psch right, decont it was
10:12 psch http://irclog.perlgeek.de/perl6/2015-04-02#i_10382903
10:12 eli-se I want to add the <> operator as a slang exercise.
10:13 masak why a slang? it's just a normal non-magical operator, sugar for `.decont()` or whatever
10:14 eli-se I mean the Perl 5 operator, like <$fh>
10:15 masak oh!
10:15 moritz that's a postcircumfix operator
10:15 masak no, it's a circumfix operator
10:15 eli-se normal circumfix operator
10:15 moritz erm
10:15 moritz sorry
10:15 moritz yes
10:15 masak we don't often talk about those :)
10:15 eli-se m: sub circumfix:<< < > >>($fh) { say $fh }; <'foo'>
10:15 camelia rakudo-moar 82a181: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XmiRRzxwHJ␤Missing required term after infix␤at /tmp/XmiRRzxwHJ:1␤------> 3mfix:<< < > >>($fh) { say $fh }; <'foo'>7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
10:16 eli-se lolwat
10:16 psch i don't think the rakudo parser is there yet
10:16 psch quote ops are parsed special
10:16 psch m: &circumfix:«< >».perl.say
10:16 camelia rakudo-moar 82a181: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QQME8pOr4Z␤Undeclared routine:␤    &circumfix:<< >> used at line 1. Did you mean '&circumfix:<:{ }>', '&circumfix:<[ ]>', '&circumfix:<{ }>'?␤␤»
10:18 psch m: &circumfix:«[ ]».perl.say
10:18 camelia rakudo-moar 82a181: OUTPUT«sub circumfix:<[ ]> (*@elems) { #`(Sub|36386456) ... }␤»
10:18 eli-se What does #` mean?
10:18 psch eli-se: delimited comment
10:18 eli-se ok
10:18 psch m: say #`[ not this ] "this"
10:18 camelia rakudo-moar 82a181: OUTPUT«this␤»
10:20 * psch wonders how in the world overriding infix:<;> is going to word
10:20 18VAAEMUL joined #perl6
10:20 psch *work
10:20 masak psch: doing the overriding will work, but the operator will be of limited use.
10:21 masak psch: as it will be picked up by other rules, like statement-ending rules.
10:21 psch masak: oh, so it'd only get picked up as overridden where it would work as LoL delimiter otherwise?
10:22 psch that's less weird i suppose
10:22 psch (or maybe "that'd be")
10:24 rindolf joined #perl6
10:32 lizmat lunch&
10:41 chenryn joined #perl6
10:53 davido_ joined #perl6
10:54 chenryn joined #perl6
11:01 chenryn joined #perl6
11:06 _mg_ joined #perl6
11:09 chenryn joined #perl6
11:10 fhelmberger joined #perl6
11:11 raiph joined #perl6
11:13 chenryn joined #perl6
11:23 diana_olhovik_ joined #perl6
11:33 timotimo yo flussence
11:34 timotimo 6.49user 0.05system 0:06.58elapsed 99%CPU (0avgtext+0avgdata 150996maxresident)k
11:34 timotimo 3.23user 0.04system 0:03.29elapsed 99%CPU (0avgtext+0avgdata 114532maxresident)k
11:34 timotimo this is JSON::Tiny and then JSON::Fast
11:35 moritz timotimo: is JSON::Fast a reimplementation from the ground up?
11:35 moritz timotimo: or incremental updates to JSON::Tiny?
11:35 FROGGS and without a grammar
11:36 timotimo reimplementation
11:36 FROGGS moritz: https://github.com/timo/json_fast/blob/master/lib/JSON/Fast.pm
11:36 timotimo the code is "butt-ugly"
11:36 timotimo and if i uncomment the to-json proto and such, i get Redeclaration of routine to-json
11:36 timotimo :(
11:36 FROGGS timotimo: nobody forces you to cuddle else :o)
11:36 moritz wow, it seems you *can* write Pascal in any language :-)
11:36 timotimo thanks
11:37 FROGGS m: sub to-json ($s) { }
11:37 camelia rakudo-moar 82a181: ( no output )
11:37 FROGGS m: proto to-json ($s) { }
11:37 camelia rakudo-moar 82a181: ( no output )
11:37 FROGGS hmmm
11:37 timotimo moritz: i can make it prettier still, but the recent MoarVM and rakudo "regressions" make a few things a bit worse, performance-wise
11:37 FROGGS m: proto to-json is export {*}
11:37 camelia rakudo-moar 82a181: ( no output )
11:37 timotimo it ought to be faster in general, but lots of blocks that could be inlined don't get inlined at the moment
11:38 timotimo and we end up allocating a gigantic crapton of BOOTCode objects, for example
11:38 FROGGS m: proto to-json($) is export {*}; multi to-json(Real:D $d) { ~$d }
11:38 camelia rakudo-moar 82a181: ( no output )
11:38 timotimo and $foo++ doesn't get optimized properly yet, either
11:38 FROGGS why don't I get that?
11:38 timotimo m: module JSON::Fast; proto to-json($) is export {*}
11:38 camelia rakudo-moar 82a181: ( no output )
11:38 timotimo i have no clue
11:39 FROGGS timotimo: would be awesome to optimize the heck out of it...
11:39 timotimo yes
11:39 FROGGS so that it can be inlined etc
11:39 timotimo at the moment, a few things are more or less waterbeddy
11:39 FROGGS though I don't understand nothing about that :o(
11:39 timotimo i tried to make nom-ws not allocate any Scalar or Int objects, but at the moment it has to do either one or the other
11:39 diana_olhovik joined #perl6
11:45 FROGGS it would be also nice of course to get JSON::Tiny faster by smartifying spesh and the jit
11:45 lizmat joined #perl6
11:46 FROGGS but I see that this might not be trivial
11:47 timotimo not only spesh and the jit, but also our regex compiler and optimizer need some love
11:51 FROGGS yeah
11:52 FROGGS though, one needs a good profile to see what exactly needs love
11:54 brrt true enough
11:55 FROGGS I dunno if JSON::Tiny is too big or not for that task.... minimizing it might just make it unreal
11:56 FROGGS I hope we will have some sort of feature freeze in Q4 this year, and only care about fixing bugs and speedup things
11:56 nwc10 I don't think that you can have a proper Christmas without snow
11:57 FROGGS umm, WAT?
11:57 nwc10 (or, less obtusely, I don't think it will be possible to make a release without some sort of observance of a freeze)
11:57 FROGGS ahh
11:57 FROGGS yeah
11:57 FROGGS :o=)
11:57 FROGGS err
11:57 FROGGS :o)
11:59 [ptc]_ joined #perl6
12:02 grondilu joined #perl6
12:10 grondilu hum weird.  Now that ?"0" is True I thought I could remove the C<'' ne> in http://rosettacode.org/wiki/Temperature_conversion#Perl_6, but it does not work as I'd expect.
12:10 moritz m: say so '0'
12:10 camelia rakudo-moar 82a181: OUTPUT«True␤»
12:11 moritz shouldn't that be False now?
12:11 psch star-m: say so '0'
12:11 camelia star-m 2013.03: OUTPUT«False␤»
12:11 moritz erm
12:11 moritz yes
12:11 moritz I'm confused
12:11 FROGGS ===CONFUSED!===
12:11 grondilu no it was concluded that it should be true
12:12 moritz right
12:12 grondilu https://github.com/perl6/specs/issues/87
12:12 moritz I just mis-remembered the direction of the change
12:12 moritz high time for the weekend
12:12 grondilu but strangly when I enter 0 the loop stops
12:13 FROGGS grondilu: what type is it for the 0 case?
12:13 Ven joined #perl6
12:13 dalek rakudo/nom: 5a38b21 | lizmat++ | src/core/ (2 files):
12:13 dalek rakudo/nom: Make "say/note" look at .nl setting
12:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a38b21098
12:13 FROGGS m: my $i; while '0' && $i++ < 10 { }; say $i
12:13 camelia rakudo-moar 82a181: OUTPUT«(Any)␤»
12:14 grondilu it comes from prompt so it should be Str
12:14 grondilu try this: while my $ = prompt "value? " { say "ok" }
12:14 FROGGS m: my $i; while '0e0' && $i++ < 10 { }; say $i
12:14 camelia rakudo-moar 82a181: OUTPUT«11␤»
12:14 FROGGS :/
12:14 n0vacane joined #perl6
12:14 FROGGS m: say '0'.Bool
12:14 camelia rakudo-moar 82a181: OUTPUT«True␤»
12:14 FROGGS m: my $i; while '0'.Bool && $i++ < 10 { }; say $i
12:14 camelia rakudo-moar 82a181: OUTPUT«11␤»
12:14 FROGGS so, what does while there?
12:14 psch m: say '0'.Stringy.Bool
12:14 camelia rakudo-moar 82a181: OUTPUT«True␤»
12:15 FROGGS the while op does not seem to call .Bool it seems
12:15 FROGGS m: say nqp::p6bool('0')
12:15 camelia rakudo-moar 82a181: OUTPUT«False␤»
12:15 FROGGS ahh
12:15 grondilu well spotted
12:16 awwaiid Is there a way to do ruby-style "DSL" blocks called like "myfun $p1, $p2 { ... }" (with no comma between the params and the block). Doing it with the comma is easy with just a last &thing param for myfun. Just wondering.
12:16 FROGGS m: say nqp::istrue_s('0')
12:16 camelia rakudo-moar 82a181: OUTPUT«===SORRY!===␤No registered operation handler for 'istrue_s'␤»
12:16 FROGGS hmmm, that's a MAST::Op
12:17 psch awwaiid: i think that's slang or macro territory
12:17 awwaiid I can do a nested sub and then call it as myfun($p1, $p2){ ... } . The lack of space between the ")" and the "{" seems really important
12:17 FROGGS MVM_string_get_grapheme_at_nocheck(tc, str, 0) == 48)
12:17 FROGGS m: say '0'.ord
12:17 camelia rakudo-moar 82a181: OUTPUT«48␤»
12:17 psch j: my $i; while '0'.Bool && $i++ < 10 { }; say $i
12:17 camelia rakudo-jvm 82a181: OUTPUT«cannot connect to eval server: Connection refused␤»
12:17 psch grml
12:18 awwaiid I mean, the lack of space is important to p6, and makes me unhappy :)
12:18 * psch .oO( nobody wants the unspace )
12:18 awwaiid ah, ok :)
12:19 fhelmberger joined #perl6
12:19 awwaiid alright well I should go to $work anyway :)
12:20 psch anyway, nqp-j also special cases "0" in istrue_s and isfalse_s
12:20 masak awwaiid: didn't quite get your nested sub syntax point above.
12:21 masak awwaiid: `myfun($p1, $p2){ ... }` means "call the sub myfun with those two arguments, then hash-index the result with the expression ..."
12:21 masak awwaiid: and yes, in that case, the lack of whitespace is significant.
12:22 moritz masak: but why are we even trying to parse a generic expression in a declaration?
12:22 masak moritz: awwaiid said "and then call it"
12:23 moritz masak: oh
12:23 masak moritz: so I got the impression that he was talking about a callsite, not a declaration.
12:23 moritz m: sub f(){ say 42 }
12:23 camelia rakudo-moar 82a181: ( no output )
12:23 moritz right
12:23 moritz not an error in the declaration
12:23 * moritz should go to bed right now
12:23 * masak hugs moritz :)
12:24 * moritz hugs back
12:25 * masak wishes he had an image readily available from the Scandinavia and the World webcomic, of Sweden and Norway hugging :)
12:28 FROGGS labster: are you going to smoke the '0'.Bool change? if not, I'll do it
12:28 FROGGS labster: because of the nqp::p6bool glitch we found just now
12:29 FROGGS I already have a patch, but still need to spectest and ecosystemtest it...
12:31 * [Coke] wonders why it's VAR(d) and not d.VAR
12:31 masak [Coke]: isn't it both?
12:31 FROGGS [Coke]: where?
12:31 FROGGS I've only seen d.VAR so far fwiw
12:32 zakharyas joined #perl6
12:41 chenryn joined #perl6
12:43 Sqirrel joined #perl6
12:43 [Coke] TT was using VAR() in backscroll
12:43 [Coke] VAR(d).WHAT looked weird to me. :)
12:44 moritz VAT
12:46 [Coke] ugh, I work in tax, that's a dirty word. :P
12:50 * timotimo is AFK until the evening
12:55 diana_olhovik_ joined #perl6
12:55 koo5 joined #perl6
12:58 noganex joined #perl6
12:59 dalek specs/newio: 0cd0cde | (Carl Masak)++ | S16-io.pod:
12:59 dalek specs/newio: rephrase slightly for clarity
12:59 dalek specs/newio: review: https://github.com/perl6/specs/commit/0cd0cde781
13:01 masak -  eof            file pointer reached end of file
13:01 masak +  eof            file pointer reached end of information
13:01 lizmat joined #perl6
13:01 masak "end of information" is not a concept I'm familiar with.
13:01 masak the change also breaks the nice implicit expansion/explanation of the acronym "eof"
13:02 masak yes, I know that not all of the things we reach the end of are files
13:02 masak but for better or for worse, "eof" means "end of file" even when it's not a file
13:03 moritz also, not all data carries information
13:03 masak it's like with `get`, we still say `get next line`. even though the record separator might have been altered to something other than "\n" and it's not actually a line.
13:04 FROGGS well, if it still states "file pointer" we can also say "end of file", no?
13:04 masak the total sum of all the possibilities is just too general to sensibly talk about.
13:04 masak all these notions, "file", "line", "end of file" end up being metasyntactic variables standing in for their general equivalents.
13:05 FROGGS aye
13:05 masak but we use the simple terms with a shared understanding with the reader that it's more general than that.
13:05 masak I'd much prefer if S16 did the same, perhaps with an early note that such is the case.
13:06 moritz .oO( let's call it .eos, which means "end of stream", and when that's not general enough, it could mean "end of something" )
13:06 masak :P
13:06 masak -  opened         is the file open?
13:06 masak +  opened         is it not closed?
13:06 masak here, too, I see that the intent was a good one. but the result (IMO) is worse.
13:07 moritz masak: I think I agree
13:07 masak we go from clarifying a concept that's fairly clear already, to defining it in terms of its opposite, without clearly defining the opposite.
13:08 FROGGS yeah, add a disclaimer and then we stick to file/line
13:08 masak also, I'm reading this as "hasn't it been closed yet?" -- and I'm not 100% sure that's all it takes for something to be opened.
13:09 masak for example, if I just do "foo".IO, what I have is not something opened.
13:09 masak (I think)
13:09 masak so besides being less clear, the new explanation is actually wrong.
13:14 nbdsp joined #perl6
13:14 masak (by the way, I know writing these one-line blurbs about methods is quite hard. and easy to critique afterwards. I'll see if I can improve some of them myself.)
13:15 Ven joined #perl6
13:16 nbdsp Greetings! Could someone advise please the proper way to declare multiline strings with interpolation? Here-docs AFAIK don't interpolate?
13:16 n0vacane joined #perl6
13:16 psch nbdsp: heredocs can interpolate
13:16 psch nbdsp: if you start them with an interpolating quote construct
13:16 psch e.g. qq:to/END/ instead of q:to/END/
13:17 nbdsp ohh - qq! thanks!
13:17 masak nbdsp: also, ordinary strings can be multiline (but it might not look so nice)
13:18 lizmat joined #perl6
13:19 nbdsp masak: Should ordinary strings be ended with quote on each line, or backslash should be used?
13:19 masak m: say "foo bar"
13:19 camelia rakudo-moar 5a38b2: OUTPUT«foo bar␤»
13:19 masak m: say "foo␤␤␤bar"
13:19 camelia rakudo-moar 5a38b2: OUTPUT«foo␤␤␤bar␤»
13:19 masak nbdsp: just newlines works fine.
13:20 nbdsp masak: thanks!
13:20 masak nbdsp: but (as opposed to heredocs), you don't get any indentation benefits.
13:20 vytas joined #perl6
13:22 FROGGS nbdsp: as masak said you can indent heredocs, and the common indentation level will be removed from the string, so to say
13:23 FROGGS which makes the actually nice :o)
13:23 masak heredocs are awesome
13:24 arnsholt Indeed. I've used them for SQL code (in Perl 5, admittedly) recently
13:24 arnsholt Very nice way to separate code and (verbose) data
13:24 PerlJam good morning #perl6!
13:24 FROGGS ours are more awesome then P5's though :o)
13:24 FROGGS hi PerlJam
13:24 arnsholt Yes, they are =)
13:25 masak FROGGS: I used to think that Perl 6's improvements were just bloat/bells and whistles. but I'm completely on-board with them now, after having used heredocs for a while.
13:25 PerlJam The heredoc discussion makes me wonder if heredocs have supplanted formats for most of the simpler uses of formats.
13:25 arnsholt But writing my webapp in Perl 6 was a bit more of an adventure than I felt comfortable with ATM
13:26 FROGGS masak: yeah... it is very nice to see here that we taken given things, and put that one little extra on top that is for one very sane make makes the thing twice as powerful
13:26 FROGGS like I love P6's enums
13:26 masak Perl 6 enums turned out really nice too.
13:27 masak it took ~3 tries, but we finally did it.
13:27 masak well, TimToady++ did it, mostly.
13:27 masak -  unlink         remove as file
13:27 masak +  unlink         remove as local entity
13:27 PerlJam masak: Energy and persistence conquer all things.  --Ben Franklin
13:27 masak what non-file case are we considering here that merits this change?
13:28 Ven masak: what were the 2 previous ones?
13:28 masak Ven: just iterations towards what we have now. they were decidedly less good.
13:29 moritz I don't remember much about them, but I do remember being frustrated by them
13:29 masak Ven: I remember at one point throwing a bunch of use cases towards TimToady, which (I think) made him go off and ponder, and come back with a new better model for enums.
13:29 masak Ven: it's all there in the spec commit log if you're really curious.
13:29 moritz however, I'm also frustrated when I try to hack at the current enum implementation, because I simply can't figure out how it all fits together
13:29 masak moritz: anything in particular?
13:30 moritz m: enum A <b c>; say A ~~ Enumeration
13:30 camelia rakudo-moar 5a38b2: OUTPUT«False␤»
13:30 moritz m: enum A <b c>; say b ~~ Enumeration
13:30 camelia rakudo-moar 5a38b2: OUTPUT«False␤»
13:30 moritz masak: what's that role for?
13:31 masak individual key/value pairs, it seems.
13:31 rmgk_ joined #perl6
13:32 moritz so it's an EnumItem or so
13:32 Ven_ joined #perl6
13:32 masak right.
13:32 moritz but, isn't b in the example that?
13:32 PerlJam moritz: I'd go with "nothing" right now.  It's not used anywhere that I can see
13:32 moritz or if not, how do I get one?
13:32 masak moritz: no, b is just one of the halves. the value, I'd say.
13:32 masak m: enum A <b c>; say A.enums
13:32 camelia rakudo-moar 5a38b2: OUTPUT«b => 0, c => 1␤»
13:32 masak m: enum A <b c>; say A.enums.WHAT
13:32 moritz m: enum A <b c>; say b.name
13:32 camelia rakudo-moar 5a38b2: OUTPUT«(Hash)␤»
13:32 camelia rakudo-moar 5a38b2: OUTPUT«No such method 'name' for invocant of type 'A'␤  in block <unit> at /tmp/s13kdhDz0U:1␤␤»
13:33 masak m: enum A <b c>; say A.enums.list[0].WHAT
13:33 camelia rakudo-moar 5a38b2: OUTPUT«(Pair)␤»
13:33 masak hm.
13:33 masak I see that Actions.nqp goes about creating Enumeration objects and (I think) stuffing them into the enum thing it's creating.
13:34 masak but that doesn't tell us how to get them out.
13:34 moritz m: enum A <b c>; A ~~ Enum
13:34 camelia rakudo-moar 5a38b2: ( no output )
13:34 moritz m: enum A <b c>; say A ~~ Enum
13:34 camelia rakudo-moar 5a38b2: OUTPUT«False␤»
13:35 moritz masak: second mystery: what's Enum?
13:35 masak hehe
13:35 moritz cause class Enum { has $.key; has $.value }
13:35 masak waitaminute
13:35 moritz that *also* looks like an EnumItem to me
13:35 masak it does
13:35 masak something is rotten in the state of enums
13:36 PerlJam moritz++  maybe enums aren't quite as nice as masak thinks  ;)
13:36 masak to be fair, none of the above has hindered me in *using* enums in nice ways ;)
13:36 masak but it's still an indication that something is... off
13:36 PerlJam yeah, same here
13:36 masak in the implementation
13:36 moritz so, we have two types that I can't figure out, but seem to represent a single enum item (k/v pair)
13:36 Perl6_newbee joined #perl6
13:36 moritz oh
13:36 moritz m: say Pair.^mro
13:36 camelia rakudo-moar 5a38b2: OUTPUT«(Pair) (Enum) (Any) (Mu)␤»
13:36 moritz right, Enum is simply an immutable Pair
13:37 moritz the comment about role Enumeration says: # Method that we have on enumeration types
13:38 moritz and it has methods pick and roll
13:38 moritz m: enum A <b c>; say A.^roles
13:38 camelia rakudo-moar 5a38b2: OUTPUT«No such method 'roles' for invocant of type 'Perl6::Metamodel::EnumHOW'␤  in block <unit> at /tmp/4ovsaGqH8a:1␤␤»
13:38 masak when I become dictator, the act of using inheritance to create a new mutable type from an immutable one is going to be a punishable crime.
13:39 kinslayer I have a problem figuring out why this code fails http://lpaste.net/130484
13:39 moritz masak: what's your approach?
13:39 kinslayer it only fails at the last line.
13:39 masak m: role R { method foo { say "OH HAI" } }; enum A does R <b c>; b.foo
13:39 camelia rakudo-moar 5a38b2: OUTPUT«OH HAI␤»
13:40 masak moritz: at the very least, wrap and delegate.
13:40 masak moritz: that way, the new class is a "mutable wrapper" for the old one.
13:40 moritz kinslayer: what do you mean by "fail"?
13:40 moritz m: role R { method foo { say "OH HAI" } }; enum A does R <b c>; say A ~~ R
13:40 camelia rakudo-moar 5a38b2: OUTPUT«False␤»
13:40 moritz oh
13:41 moritz maybe it's just type-checking enums against roles that's broken
13:41 kinslayer moritz: that it does do what I want that is giving me a hash I can do stuff with.
13:41 masak moritz: without fail, immutability will have been part of the contract/invariants of the old class. inheriting and adding mutability means breaking Liskov.
13:41 moritz masak: yes, I know
13:41 kinslayer It just says that postcircumfix {} not defined for array
13:41 masak m: role R { method foo { say "OH HAI" } }; enum A does R <b c>; A.foo
13:41 camelia rakudo-moar 5a38b2: OUTPUT«OH HAI␤»
13:41 moritz kinslayer: no line number?
13:41 masak yeah, something is off there too.
13:42 masak how can A.foo work if A ~~ R is false?
13:42 kinslayer moritz 15 31
13:43 moritz http://lpaste.net/130484#line11 seems to be the problem
13:43 moritz no dereferencing going on
13:43 moritz either   my @rooms := $json<rooms>   or my @rooms = @( $json<rooms> )
13:44 moritz kinslayer: also, %room-graph<"$i.north"> probably wants to be %room-graph{"$i.north"}
13:44 kinslayer yeah the last one I would fix by myself, just found the other syntax but the other things seems more natural
13:46 PerlJam kinslayer: you could also have used $rooms rather than @rooms
13:46 moritz PerlJam: @rooms is more idiomatic
13:46 kinslayer moritz so what does := do spefically just so I can remember.
13:46 moritz and the iterate with   for @rooms.kv -> $idx, $oom { ... }
13:47 moritz kinslayer: binding
13:47 moritz http://doc.perl6.org/language/containers
13:47 kinslayer okay I might remember now that I now. :D
13:47 rurban_ joined #perl6
13:47 kinslayer now to test whether this works.
13:47 PerlJam I dunno.  Part of the benefit of Perl6 was supposed to be that you didn't have to be concerned about arrays versus array references; either would Just Work.
13:49 kinslayer now to test whether this works.
13:49 kinslayer sorry wrong window.
13:51 kinslayer so now it works at least on a small scale.
13:59 aborazmeh joined #perl6
13:59 aborazmeh joined #perl6
14:00 lucasb joined #perl6
14:04 lizmat joined #perl6
14:06 koo5 joined #perl6
14:09 chenryn joined #perl6
14:15 diana_olhovik_ joined #perl6
14:15 brrt joined #perl6
14:15 lucasb While reading the source, I thought about decreasing the indentation level of reify methods in GatherIter, HashIter, ListIter, MapIter and native_array. Unfortunately, the whitespace changes are messing with the diff output. :(
14:15 lucasb Maybe it is not worth it, but if you want to take a look, it is here:
14:15 lucasb https://gist.github.com/lucasbuchala/2879564510ed951663fa
14:17 inokenty joined #perl6
14:18 moritz lucasb: those methods are *carefully* optimized, and explicit returns are kinda slow
14:18 moritz (because return is just a code object to be called)
14:19 moritz lucasb: so don't change anything unless you have also carefully benchmarked them
14:19 diana_olhovik__ joined #perl6
14:22 dalek perl6-examples: d326a14 | paultcochrane++ | lib/ (26 files):
14:22 dalek perl6-examples: Purge old library code and tests
14:22 dalek perl6-examples:
14:22 dalek perl6-examples: After discussing this code with mberends++ at NLPW2015 it was decided that
14:22 dalek perl6-examples: it was no longer current and could be removed.
14:22 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/d326a146da
14:22 dalek perl6-examples: 8fe55f9 | paultcochrane++ | t/categories/99-problems.t:
14:22 dalek perl6-examples: [99-problems] Correct test filename after rename
14:22 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/8fe55f961f
14:22 dalek perl6-examples: 5171ca4 | paultcochrane++ | categories/shootout/fasta.p6.pl:
14:22 dalek perl6-examples: Document the FASTA shootout example
14:22 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/5171ca4218
14:22 dalek perl6-examples: 120c653 | paultcochrane++ | categories/shootout/revcomp.p6-v2.pl:
14:22 dalek perl6-examples: Add author to revcomp-v2 example
14:22 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/120c653381
14:22 dalek perl6-examples: e8dfb31 | paultcochrane++ | categories/shootout/n-body.p6-v2.pl:
14:22 dalek perl6-examples: Add author info for nbody-v2
14:22 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/e8dfb31e43
14:22 dalek perl6-examples: d0ad0ef | paultcochrane++ | categories/shootout/ (14 files):
14:22 dalek perl6-examples: [shootout] simplify shootout example filenames
14:22 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/d0ad0ef78a
14:22 dalek perl6-examples: aa6eb51 | paultcochrane++ | lib/Pod/Htmlify.pm6:
14:22 dalek perl6-examples: Match .pl/.p6 at the end of the filename
14:22 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/aa6eb5148a
14:22 lizmat hmmm... [ptc]++
14:23 lizmat hmmm...  seems that my spec change of line-input-separator to nl has struck back
14:23 diana_olhovik_ joined #perl6
14:24 lizmat .nl doesn't say whether it is input or output
14:24 lizmat my last patch makes uses it for output
14:24 lizmat but what if you want different separators for input and output ?
14:25 lucasb I thought that maybe an explicit return could be less costly than having an if block, but I didn't think about optimization really, just code layout. Thanks for the tip, moritz++
14:26 [ptc]_ moritz: I'd like to reserve "examples.perl6.org" if I may (just so you know, you don't have to do anything at this stage)
14:26 [ptc]_ moritz: btw: should I set up the examples.perl6.org site for you?  Is there any way I can help reduce the admin load?
14:26 moritz [ptc]_: yes, do it :-)
14:27 moritz [ptc]_: do you have access to www.p6c.org?
14:28 [ptc]_ no, was just about to ask
14:28 [ptc]_ I'll make the examples.perl6.org user and then set up an rsync in much the same way doc.perl6.org works
14:28 [ptc]_ only have access to hack
14:29 moritz [ptc]_: +1
14:29 lizmat m: sub a { 42 }; for ^1000000 { a }; say now - INIT now  # lucasb
14:29 camelia rakudo-moar 5a38b2: OUTPUT«0.2423389␤»
14:29 lizmat m: sub a { return 42 }; for ^1000000 { a }; say now - INIT now  # lucasb
14:29 camelia rakudo-moar 5a38b2: OUTPUT«1.3662083␤»
14:29 moritz [ptc]_: and skim https://github.com/perl6/infrastructure-doc/blob/master/hosts/www.p6c.org.pod if you haven't already
14:30 moritz (and update it to add yourself to the sudo list)
14:36 lizmat joined #perl6
14:39 RabidGravy joined #perl6
14:39 lucasb lizmat: Thanks for the return tip. I hope this thing can get optimized in the future.
14:40 lizmat it's on the radar, afaik
14:47 zakharyas joined #perl6
14:50 telex joined #perl6
14:52 [ptc]_ moritz: ok, thanks for the link
14:53 molaf_ joined #perl6
14:55 davido_ joined #perl6
14:58 anaeem___ joined #perl6
15:01 masak am I missing something, or do the synopses not mention heredoc semantics at all?
15:01 lolisa joined #perl6
15:02 masak (I mean the thing where the string from the heredoc gets de-indented to the level of the terminator)
15:04 lizmat S02:4468
15:04 masak thank you.
15:04 lizmat "Leading whitespace equivalent to the indentation of the delimiter will be removed from all preceding lines."
15:05 masak that's exactly what I was looking for. some very specific type of blindness made me miss it, apparently.
15:06 lizmat we've all been there  :-)
15:15 lizmat m: say +""  # didn't this used to warn / should it not warn ?
15:15 camelia rakudo-moar 5a38b2: OUTPUT«0␤»
15:17 masak it should most definitely, without any hesitation or doubt, warn.
15:17 masak "" is not a number
15:17 [Coke] m: say ?+"0" == ?"0"
15:17 camelia rakudo-moar 5a38b2: OUTPUT«False␤»
15:17 [Coke] whee.
15:18 masak I'm fine with that one :)
15:19 [Coke] m: :m
15:19 camelia rakudo-moar 5a38b2: ( no output )
15:19 [Coke] m: say.say :m
15:19 camelia rakudo-moar 5a38b2: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/MzvwgzT6Wi:1␤------> 3say7⏏5.say :m␤Other potential difficulties:␤    Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant o…»
15:25 yvan1 joined #perl6
15:29 awwaiid m: sub wrap($p1){ sub with(&f) { say "$p1 wrap"; &f() }}; wrap("hello"){ say "yep" }
15:29 camelia rakudo-moar 5a38b2: OUTPUT«yep␤Unhandled exception: postcircumfix:<{ }> not defined for type Sub␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15991  (/home/camelia/rakudo-inst-2/share/per…»
15:35 awwaiid ohhh.... I see. "works" in the REPL but not in -e. Interesting.
15:36 synopsebot joined #perl6
15:41 masak psch: even with the current '*' continuation on the REPL, heredocs still don't work :(
15:41 masak which means it's annoying *and* not useful enough
15:42 masak (I'm not saying I think heredocs should work on the REPL. but with the '*' continuation in place by default, I kind of expected them to)
15:44 gfldex joined #perl6
15:48 Ven joined #perl6
15:48 raydiak morning o/
15:51 n0vacane good morning sir and/or madam
15:51 masak good morning radiant raydiak
15:52 masak may your bright light shine on the antipode
15:52 raydiak wow thanks masak :)  hello n0vacane
16:02 raydiak masak: a few days ago, I decided to see what interesting thing I could do in the span of time you were asleep...a lot of mental circles and 80 lines later I had the cheesiest cheatingest self-compiling compiler ever, which targets P6
16:03 btyler raydiak: github link? :D
16:04 raydiak btyler: I have a habit of not putting things out there that will embarass me more than I do already :)  but gimme a sec I'll gist it
16:08 raydiak https://gist.github.com/raydiak/b6497a9641a6e53ce831
16:08 raydiak so many cheatings I can't even tell you...but I just wanted to see what the result would look like and what ideas the exercise gave me
16:09 Ven raydiak: lol. that's pretty amazing
16:12 raydiak heh thanks :)  it'll be interesting to see how a real version turns out some day
16:16 masak raydiak: wow
16:17 raydiak if it had a little more structure and a little less brain-damage, it'd be simple to get it to target numerous languages...of course that's because it doesn't do much of anything else, but still...
16:29 cschwenz left #perl6
16:32 gcole joined #perl6
16:34 raydiak one of the things I found interesting to think about is the way you have to develop in "generations" once you throw away the bootstrap implementation...e.g. I can add any feature I want just by writing it in itself, but you have to add the feature using existing features, then recompile before you can actually make use of that feature in the *following* iteration
16:34 raydiak which totally makes sense, but nevertheless feels like walking down a hall of mirrors...
16:36 masak raydiak: at this point you would do yourself a great favor by googling "reflections on trusting trust ken thompson"
16:36 masak it's a not-too-long read, but very effective.
16:37 masak raydiak: also, I guess, "I am a strange loop" by Hofstadter comes warmly recommended :)
16:39 raydiak masak: thanks!  reading the first one now...the other one sounds familiar, I think I have it on a list somewhere...maybe even one of the list items I got from you :)
16:41 eli-se joined #perl6
16:41 psch masak: actually, heredoc is to me the strongest argument yet against a multiline REPL in core
16:42 psch maybe inline documentation is another
16:43 psch 'cause it feels a bit too special-cased to me to react to a q:to with a continuation prompt even if the line ended on ;
16:47 20WAA1PER joined #perl6
16:47 ugexe is precompiling without reinvoking $*EXECUTABLE_NAME --target for each module something that could done? or is there a reason why it should be that way? i'm wondering if its worthwhile to add such functionality to reduce the time required to install a bunch of modules under JVM (which I assume is getting the startup penalty each time .precomp is called)
16:51 _mg_ joined #perl6
16:54 aborazmeh joined #perl6
16:54 aborazmeh joined #perl6
16:59 Sqirrel joined #perl6
17:03 mr-foobar joined #perl6
17:25 masak psch: note how that problem, too, completely goes away if Enter is restored to meaning "execute" and something like Shift+Enter means "one more line"
17:25 masak fewer heuristics, fewer special cases, more predictability.
17:26 masak raydiak: heh, I don't think I've recommended you (or anyone) "trusting trust" before. though it is a classic.
17:26 TimToady timotimo: 'my sub' is redundant, since subs are already 'my' by default
17:26 yoleaux 08:55Z <jnthn> TimToady: Not immediately, no... :(
17:28 robinsmidsrod joined #perl6
17:29 _mg_ joined #perl6
17:31 TimToady oh, jnthn++ pointed it out already
17:31 rurban joined #perl6
17:34 psch masak: «my $s = q:to/END/;» and then enter can never compile succesfully then, and always needs shift+enter
17:35 psch which still strikes me as inconsistent
17:37 masak not me. the Enter keystroke under my model signifies "what I have here is a program unto itself"
17:37 psch ah
17:37 masak not including the heredoc terminator will fail under that model, becuase it *should* fail
17:38 psch i had a misconception then, i realize
17:38 eli-se I want to make a video game.
17:38 masak again, this is just basically copying Chrome Devtools
17:39 TimToady imo, shift+enter just puts the blame onto the user when things go wrong; a good parser should always know when it has all its ducks in a row
17:40 TimToady and a heredoc is just another duck that can get out of line
17:40 masak I can buy that argument, too. it's consistent.
17:40 masak there's always a well-defined, detectable "end-of-statement" point
17:41 masak but both TimToady's semantics and mine are better than the current semicolon/double-Enter semantics that's currently in place
17:41 masak either one would be an improvement
17:41 masak mine has prior art :)
17:41 TimToady so does mine, if you don't count parser complexity :)
17:42 psch fwiw, i've been trying to improve it during the last week, it's just hard :P
17:43 psch i've definitely merged too early, sorry about that
17:43 masak no, it's good
17:43 masak gives us something concrete to discuss
17:43 masak things are allowed to get worse for a bit before they get better
17:44 masak on the Internet, if you want to arrive at the correct answer, you should start by claiming something outrageous and disprovable :)
17:44 * TimToady would have fun working on that, if he didn't have eⁿ things on his plate already
17:45 rurban_ joined #perl6
17:48 psch well, the current implementation cheats (and breaks) for <blockoid>
17:48 psch the next implementation i could arrive at never meets the closing bracket
17:48 psch which confuses me to no end, and points at some oversight
17:49 TimToady how are you counting "ducks in a row" currently?
17:49 * TimToady would probably try a dynvar first, since those automatically clear at the appropriate moment
17:49 psch TimToady: i wanted to try checking !highexpect next, because i evidently need something to know if the parser can stop
17:50 * TimToady thinks relying on highexpect would be fraught
17:50 psch TimToady: currently there's a $*MOREINPUT_BLOCK_DEPTH, but that's not granular enough
17:50 psch (i'm not sure granular is the right word there...)
17:51 psch in any case, blocks aren't the only thing left to expect, but many other things seem to work out fine on their own
17:51 psch e.g. «1 +\n1» works with just calling readlineintfh in _ws
17:51 psch (basically)
17:52 psch the different ways to signify end-of-statement aren't quite transparent to me yet either
17:53 psch e.g. the first <?before> in eat_terminator doesn't actually *eat* the terminator
17:53 psch and it can't because the last statement in a block doesn't need a ;
17:54 TimToady well, inside a block you'll never want to eval anyway
17:54 dalek ecosystem: 72f9a4a | tony-o++ | META.list:
17:54 dalek ecosystem: Extendable JS style 'Events'
17:54 dalek ecosystem:
17:54 dalek ecosystem: Can use regex, callable, or whatever to pick up events.  Can use supplies or channels out of the box.  Neat.
17:54 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/72f9a4a5db
17:55 TimToady the final decision probably needs to be in the reduction of <statement>
17:56 TimToady though I don't know offhand whether that includes the heredoc
17:57 TimToady ah well, now here I am working on it; told you it'd be fun for me :)
17:57 TimToady back to backlogging...
17:57 raydiak masak: trusting trust definitely brings up one or two things I hadn't considered...apparently your recommendation rattling around in my memory was "books by Hofstadter" a couple months ago
17:59 * psch is bound to learn loads about CURSOR it seems
17:59 psch dinner &
18:00 FROGGS joined #perl6
18:00 baest joined #perl6
18:02 [Coke] m: 3.123456789 ~~ 3.123456788
18:02 camelia rakudo-moar 5a38b2: ( no output )
18:02 cschwenz joined #perl6
18:02 [Coke] m: say 3.123456789 ~~ 3.123456788
18:02 camelia rakudo-moar 5a38b2: OUTPUT«False␤»
18:04 masak raydiak: well, now that you've been delighted by Thompson, maybe Hofstadter is next ;)
18:04 TimToady so, is there a backdoor hidden in our bootstrap yet?
18:04 masak ssssssh!
18:04 masak I mean, um, no. of course not.
18:05 * masak glances around furtively
18:06 cschwenz is there a perl6 equivalent of starman?
18:07 TimToady no, we only do et and independenceday
18:08 cschwenz :-P
18:09 _mg_ joined #perl6
18:09 cschwenz okay, so what is needed to make something in perl6 approximating the functionality of starman?
18:10 colomon “Starman? Why the cute name instead of more descriptive namespace? Are you on drugs?”  Ah, CPAN.
18:10 tadzik :)
18:10 tadzik NO FUN ALLOWED
18:10 raydiak masak: sounds like it...though I'd s/delighted/more appropriately terrified and interested/ :)
18:10 * colomon hopes tadzik can answer cschwenz’s question
18:11 TimToady the first N pages of Google have nothing about a starman
18:11 TimToady except mostly the movie
18:11 oyse joined #perl6
18:11 cschwenz https://metacpan.org/pod/Starman
18:11 raydiak it's a psgi thing iirc
18:11 TimToady ah
18:11 colomon TimToady: I got http://search.cpan.org/~miyagawa/Starman-0.4011/lib/Starman.pm on the first page of my Google search
18:12 TimToady hmm, personalization strikes again...
18:12 colomon Very last thing on the first page.
18:12 cschwenz or, first, is there a perl6 webserver?
18:12 colomon TimToady: you must really love the movie, eh?  ;)
18:12 TimToady ah, there it is, I just dintseeyit
18:13 zakharyas joined #perl6
18:13 TimToady I thought someone did something P6ish with PSGI...
18:13 TimToady or PSGIish with P6...
18:14 tony-o timotimo: that IO::Socket::INET gist i posted seems to work now, do you know of any changes
18:14 beastd joined #perl6
18:14 TimToady modules.perl6.org lists 3 modules that mention PSGI
18:15 cschwenz Hmm, okay.  I'll have a look there.  :-)
18:16 cschwenz Is modules.perl6.org the extent of CPAN for Perl6?
18:16 raydiak yep there are some http servers and psgi things listed there, though no idea what the state of any of them is precisely atm
18:17 raydiak yes
18:17 cschwenz okay thanks!  :-)
18:17 raydiak holy ssh lag batman
18:17 raydiak you're welcome :)
18:17 * TimToady blames the microwave oven
18:18 TimToady our new one is very leaky at 2.4Ghz
18:18 TimToady maybe we should wrap it with tin foil...
18:18 raydiak well it does sit about 5 feet away, but that's how I know it's not running
18:18 TimToady neighbors?
18:19 oyse I have a problem building Rakudo for the JVM. I get jvm::runtime.jars value not available from <my path here>/rakudo/install/bin/nqp-j --show-config when doing  perl Configure.pl --gen-nqp --backends=jvm
18:19 raydiak roommates more likely...every time they walk around in the wrong places or play their MMOs it gets sluggish :)
18:19 oyse Is this a know problem?
18:19 TimToady where we live, sometimes it's the president flying into moffat jamming everything, and sometimes its someone arc-welding in their garage...
18:20 oyse I am on Ubuntu 14.04 with openjdk-7 and gcc installed
18:20 * raydiak imagines his stimulant-addictied neighboars playing with arc welders
18:21 * timotimo is back on-line
18:21 timotimo tony-o: i don't know of any changes :(
18:22 raydiak wb timo o/
18:22 timotimo o/
18:22 tony-o timotimo: really strange, i can curl from that HTTP::Server::Threaded without any issues now
18:22 TimToady oyse: on Ubuntu I succeed in building both backends with: /usr/bin/perl Configure.pl --backends=ALL --gen-nqp --gen-moar
18:22 timotimo super weird.
18:22 tony-o timotimo: nevermind, i'm silly
18:23 timotimo so it's still b0rken? :(
18:23 tony-o yea
18:23 TimToady oyse: are you using the latest git version?
18:23 TimToady that came out wrong
18:23 TimToady are you cloning the nom branch, or using some brewer?
18:24 tadzik cschwenz, colomon we don't have any good webservers afaik :(
18:24 tony-o cschwenz: i'm working on a couple but have some bugs
18:25 oyse timtoady: I just started with the instructions from INSTALL.txt on Github: https://github.com/rakudo/rakudo/blob/nom/INSTALL.txt
18:25 oyse timtoady: I am trying the command you suggested now
18:26 FROGGS oyse: what's your exact javac version?
18:26 FROGGS --> javac -version
18:26 oyse FROGGS: javac 1.7.0_75
18:26 FROGGS that's new enough
18:27 kaare_ joined #perl6
18:27 oyse timtoady: The --backends=ALL when worse than the other command: Perl API version v5.14.0 of Encode does not match v5.18.0 at /usr/share/perl/5.18/XSLoader.pm line 92.
18:27 TimToady I'm using that one, as well as javac 1.7.0_51
18:27 ugexe modules are failing to install due to 'No such method print-nl' on a fresh build
18:28 FROGGS oyse: what rakudo version do you try to build?
18:28 FROGGS oyse: because just recently I applied a build fix for jvm...
18:28 TimToady that sounds like perl5 versions fighting each other
18:28 oyse FROGGS: I just started with a git clone git://github.com/rakudo/rakudo.git
18:29 TimToady try just perl instead of /usr/bin/perl
18:29 oyse git branch says I am on nom
18:29 FROGGS oyse: hmmm, that really should do... my patch is six days old
18:29 TimToady you probably have a newer perl than the system perl in your path
18:29 dalek perl6-roast-data: 25845ff | coke++ | / (9 files):
18:29 dalek perl6-roast-data: today (automated commit)
18:29 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/25845ff516
18:30 FROGGS oyse: that's the patch btw: https://github.com/perl6/nqp/commit/52b83479cdca58c4c4a1fff3b13b547f73210fc3
18:30 FROGGS oyse: it touches the jar's you've got problems with
18:30 [Coke] raydiak - are you killing hack?
18:31 raydiak [Coke]: running a rakudobrew build
18:31 oyse TimToady: quite possible I have installed something a while back. I will check
18:31 masak lol, I blogged! http://strangelyconsistent.org/blog/here-be-heredocs
18:31 raydiak [Coke]: nothing important, can kill it if you need the resources for something meaningful :)
18:32 [Coke] running an awful lot of java processes.
18:32 raydiak just a single rakudobrew build
18:32 raydiak just finisheds
18:32 raydiak s/s$//
18:34 FROGGS oyse: if nothing helps, please nopaste your entire build output
18:35 yvan1 joined #perl6
18:37 raydiak [Coke]: if you're still seeing sluggishness, I see a stuck module build maxing out a core and taking 8 gigs+ of ram with over 4 cpu hours under its belt so far :)
18:40 dalek doc: a2b0e77 | moritz++ | lib/Type/Str.pod:
18:40 dalek doc: Str.starts-with
18:40 dalek doc: review: https://github.com/perl6/doc/commit/a2b0e77927
18:41 ugexe m: class IO::Capture::Simple { sub capture_stderr(Callable $code) is export { my $result; my $*ERR = class { method print(*@args) { $result ~= @args.join; }; }; $code.(); $result; }; }; import IO::Capture::Simple; capture_stderr { note "blah" }
18:41 camelia rakudo-moar 5a38b2: OUTPUT«No such method 'print-nl' for invocant of type '<anon>'␤  in sub note at src/gen/m-CORE.setting:18840␤  in block <unit> at /tmp/guUOFRYET7:1␤␤»
18:45 synbot6 joined #perl6
18:45 oyse timtoady: --backends=ALL worked better after I had delete some old stuff in the perl path. At least I could start make now :)
18:46 raydiak m: class IO::Capture::Simple { sub capture_stderr(Callable $code) is export { my $result; my $*ERR = class { method print(*@args) { $result ~= @args.join; }; method print-nl(*@args) { $result ~= @args.join ~ "\n" }; }; $code.(); $result; }; }; import IO::Capture::Simple; capture_stderr { note "blah" } # ugexe
18:46 camelia rakudo-moar 5a38b2: ( no output )
18:47 raydiak m: class IO::Capture::Simple { sub capture_stderr(Callable $code) is export { my $result; my $*ERR = class { method print(*@args) { $result ~= @args.join; }; method print-nl(*@args) { $result ~= @args.join ~ "\n" }; }; $code.(); $result; }; }; import IO::Capture::Simple; say capture_stderr { note "blah" }
18:47 camelia rakudo-moar 5a38b2: OUTPUT«blah␤␤»
18:48 PerlJam S99:WIP
18:48 synbot6 Link: http://design.perl6.org/S99.html#WIP
18:49 PerlJam S99:Weekly_Changes
18:49 synbot6 Link: http://design.perl6.org/S99.html#Weekly_Changes
18:49 PerlJam S02:2345
18:49 synbot6 Link: http://design.perl6.org/S02.html#line_2345
18:50 ugexe raydiak: is that because STDOUT/ERR/etc use print-nl now?
18:51 raydiak ugexe: yeah looking at it now, it changed just hours ago...and that isn't what print-nl should do (my example is wrong I mean)
18:51 raydiak ugexe: https://github.com/rakudo/rakudo/commit/5a38b210988e90f3b5053f3e3c5aaf65c12dc6c1
18:51 oyse FROGGS: seems like the JVM build worked with --backends=ALL. At least I have a perl6-j now. I assume that is the jvm version
18:52 FROGGS oyse: aye
18:52 FROGGS oyse: also check if you got a perl6-m
18:53 FROGGS that's the MoarVM version which starts up way faster
18:53 oyse FROGGS: it is there
18:53 oyse yes, it seems more responsive
18:53 oyse In the JVM version is there an API into the VM for doing introspection from Java? Could I for instance ask for all class, their methods etc?
18:54 FROGGS you'd have to ask psch++ for JVM interop
18:54 FROGGS but in Perl 6 land it would be:
18:55 FROGGS m: say Int.^methods
18:55 camelia rakudo-moar 5a38b2: OUTPUT«Int Num Rat FatRat abs Bridge chr sqrt base polymod expmod is-prime floor ceiling round lsb msb narrow Range sign conj rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotan…»
18:55 FROGGS or:
18:55 FROGGS m: say Int.HOW.methods(Int)
18:55 camelia rakudo-moar 5a38b2: OUTPUT«Int Num Rat FatRat abs Bridge chr sqrt base polymod expmod is-prime floor ceiling round lsb msb narrow Range sign conj rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotan…»
18:55 ugexe raydiak: i see. yeah s/print/print-nl/ in the actual IO::Capture::Simple module then complains about method print
18:55 FROGGS oyse: perhaps you can call the latter from Java somehow
18:56 raydiak ugexe: yeah looks like print-nl is supposed to literally just print a newline
18:57 oyse FROGGS: that seems like a good starting point at least. I have to poke around I bit I guess.
18:57 oyse When are the Java people usually here?
18:57 psch oyse: check src/vm/jvm/runtime/org/perl6/rakudo/RakudoEvalServer.java
18:57 psch oyse: and ./perl6-eval-server
18:58 psch both of those relative to the git root
18:58 FROGGS oyse: here is the opposite way as an example: https://github.com/rakudo/rakudo/blob/nom/t/03-jvm/01-interop.t
18:59 cdc Hello #perl6
18:59 raydiak m: class IO::Capture::Simple { sub capture_stderr(Callable $code) is export { my $result; temp $*ERR = $*ERR but role { method print(*@args) { $result ~= @args.join; }; }; $code.(); $result; }; }; import IO::Capture::Simple; say capture_stderr { note "blah" } # ugexe you could do something like this too if you wanted
18:59 camelia rakudo-moar 5a38b2: OUTPUT«␤blah␤»
18:59 psch o/ cdc
18:59 cdc psch: \o
18:59 raydiak hello cdc
18:59 psch cdc: did you get somewhere with that typed exception of your?  i have to admit i forgot what exactly it was about...
18:59 psch *yours
19:00 TimToady ⌽  <-- samurai about to attack
19:00 tony-o looks like the info symbol to me
19:00 tony-o i with a circle
19:01 TimToady fontfeyl
19:01 TimToady .u ⌽
19:01 yoleaux U+233D APL FUNCTIONAL SYMBOL CIRCLE STILE [So] (⌽)
19:01 cdc psch: No, I failed to get a correct patch.  That was about getting typed execeptions for yada operators, like X::CodeStub::Executed
19:01 masak looks like "this is as high as the waterline gets" on a ship that's been tilted 90 degrees
19:01 raydiak looks like phi to me but I suggest dodging instead of examining when a samurai is about to attack :)
19:02 labster FROGGS: go ahead, I was very asleep when you asked about smoketesting (and still backlogging)
19:03 TimToady but the "don't be there" defense only works after he's committed to where "there" is
19:03 FROGGS labster: k
19:03 oyse psch, FROGGS: thanks!
19:03 ugexe raydiak: i went with method print-nl { nextsame };
19:03 TimToady or she, if we're in the universe that admits female samurai...
19:05 cdc FROGGS (or anyone having commit bit on panda), please could you take a look at this patch (I need it to get Panda working @work): https://github.com/tadzik/panda/pull/147
19:07 FROGGS cdc: you do we get our hands at MIME::Base64 there?
19:07 psch cdc: do you want guidance wrt X::CodeStub::Executed? (although i'd prefer a shorter name)
19:09 raydiak ugexe: nice
19:09 FROGGS cdc: beside the problem with MIME::Base64 I like it
19:11 cdc FROGGS: sorry I don't understand.  What's the problem with MIME::Base64?
19:12 ugexe how do you install it before panda
19:12 ugexe and, at that point, you may as well pull in http::useragent and/or uri
19:13 raydiak TimToady: can I hold my action for a dodge until after he's committed, then?  or maybe just dodge with every action until another party member handles him/her? :)
19:14 cschwenz joined #perl6
19:14 * raydiak usually ends up laying in a pool of his own hit points (all three of them)
19:15 cdc ugexe: right, I installed it with a previous version of panda + a trick to bypass proxy authentication.  Do I have to borrow code from the module/rosettacode instead?
19:15 robinsmidsrod joined #perl6
19:15 TimToady raydiak: that depends totally on whether the sword is an it, or a him/her...
19:16 cdc psch: with pleasure!  Maybe next week?
19:17 cdc psch: OK for a shorter name.
19:17 psch cdc: sure, i'll be around at times like now during the next week
19:18 psch cdc: ISTR the first name idea was "X::Stub", but i might be making that up
19:20 cdc FROGGS, ugexe: is it possible to use the bootstrap mechanism to get MIME::Base64?
19:20 FROGGS cdc: we'd have to put it in panda/ext
19:20 ugexe and you'd probably want to make it optional
19:21 FROGGS hmmm, I guess it is fine to put it in there
19:21 FROGGS I'd like to know what tadzik thinks about that though
19:25 cdc no problem
19:25 FROGGS hmmm, the p6bool change breaks the rakudo build :o(
19:25 TimToady we have a file named 0?!?
19:27 masak who's "we"? the rakudo repo? no.
19:27 virtualsue joined #perl6
19:27 ugexe wouldnt the first module that gets built be installed to site as 0?
19:28 FROGGS TimToady: we have, but that's not my current problem...
19:30 FROGGS ahh, I can just dump a backtrace when p6bool gets a "0"
19:42 _mg_ joined #perl6
19:48 tadzik cdc: looking
19:48 tadzik oh, hmm
19:50 tadzik we seem to desperately need HTTP::Tiny of sorts
19:50 tadzik everyone is reimplementing this
19:51 FROGGS I'd prefer HTTP::UserAgent though
19:51 tadzik we have one
19:51 tadzik it's very dependency-heavy tohugh
19:51 tadzik which is the reason why I didn't pull it into panda
19:51 FROGGS ohh yeah :/
19:51 tadzik anyway, if it helps you cdc I'm all for it :)
19:52 RabidGravy only URI and Mime::Base64
19:52 TimToady r: gather loop { take my $foo; last; }
19:52 camelia rakudo-moar 5a38b2: ( no output )
19:52 camelia ..rakudo-jvm 5a38b2: OUTPUT«cannot connect to eval server: Connection refused␤»
19:52 FROGGS let's just pull in MIME::Base64 for now
19:52 RabidGravy isn't it?
19:52 FROGGS and yeah, perhaps URI
19:52 FROGGS though, that will kill the jvm, right?
19:53 FROGGS ahh no, I fixed it :o)
19:53 TimToady masak: ^^^ there's a minimal test case to blow up perl6-j
19:53 tadzik cdc: your patch seems to use MIME::Base64 but it's not 'use'-ing it
19:53 tadzik oh, it is
19:53 tadzik but it is now a dependency of panda, can you make it 'require' so it's optional?
19:54 FROGGS try require*
19:54 TimToady masak: (that produces the error at https://gist.github.com/anonymous/9dc73118674e46248155)
19:54 FROGGS and then check for ::('MIME::Base64') being true or so
19:55 * masak submits rakudobug
19:55 FROGGS masak: hold on
19:55 FROGGS might be the same as https://rt.perl.org/Ticket/Display.html?id=122134
19:56 TimToady it might at that
19:56 TimToady otoh, if I remove the gather, it passes
19:57 TimToady so maybe not
19:57 oyse left #perl6
19:58 masak TimToady: re "why do people keep thinkingI'm not in favor of this change" -- I like how many people are surprised that Perl 6 still keeps the hash key auto-quoting syntax. it's almost as if they'd expect the higher standard set by Perl 6 to somehow exclude the sinning committed by using "barewords" in hash key position.
19:59 masak not sure why one sin reminded me of the other. anyway, I'm glad you're on board with the rest of the community on ?"0" ;)
20:00 TimToady say wot?  we don't privilege hash keys anymore...pair keys maybe...
20:00 masak meant pair keys.
20:00 masak I just keep thinking of them as hash keys.
20:00 masak right, foo => 42, not .{foo}
20:01 masak ooh, maybe it's because one has to do .<foo> nowadays that people are surprised foo => 42 still works
20:01 masak maybe they connect one with the other, subconsciously
20:01 davido_ joined #perl6
20:01 TimToady .oO( <foo=> 42 )
20:01 masak aughr
20:01 TimToady :D
20:02 masak -me .oO( this is the guy we put in charge!? ) :P
20:02 * masak .oO( this is the guy we put in charge!? ) :P
20:02 masak /msg fail
20:03 masak er, /me fail
20:04 TimToady .oO( the light brigade is in charge )
20:04 masak TimToady: #124279
20:04 synbot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=124279
20:05 TimToady excellent!
20:05 TimToady gah, got so interested in minimizing that test case that I minimized my lunch as well...
20:06 masak that happens to me more often than it should
20:06 dalek nqp: 4409a04 | FROGGS++ | src/HLL/sprintf.nqp:
20:06 dalek nqp: check string explicitly for not containing zero
20:06 dalek nqp:
20:06 dalek nqp: ...since "0" if now true.
20:06 dalek nqp: review: https://github.com/perl6/nqp/commit/4409a04df1
20:06 dalek nqp: d7b8b06 | FROGGS++ | src/how/NQPClassHOW.nqp:
20:06 dalek nqp: pass integer 0 instead of string "0" along to mean falseness
20:06 dalek nqp: review: https://github.com/perl6/nqp/commit/d7b8b0685d
20:07 masak wow, so there's nqp fallout for making "0" true? FROGGS++ for fixing it!
20:07 * masak reviews those places
20:07 FROGGS module Digest suffers from "0" change
20:07 FROGGS masak: aye
20:08 FROGGS and about 15 spectests...
20:08 TimToady I suppose many of the failures are inadvertent Str/Int confusion
20:08 masak ok, first one. I don't have much sympathy for a variable $int that contains a string :)
20:09 masak second one looks like it wanted to be (0) all along
20:09 FROGGS TimToady: aye
20:09 masak ok, good.
20:09 masak in other words, we didn't ruin someone's day. we just taught them to be a bit more careful with types.
20:09 masak I think that's a win both short-term and long-term
20:10 virtualsue joined #perl6
20:10 dalek rakudo/nom: 0b20921 | FROGGS++ | src/Perl6/Grammar.nqp:
20:10 dalek rakudo/nom: check for "1" to mean truth in method can_meta
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0b2092156d
20:10 TimToady we'll make a pythonista of you yet
20:11 masak Perl is about stealing the best from other languages. some of those good things just happen to have been in Python first :)
20:14 masak we're not above stealing them anyway
20:17 eli-se can we make an exception for Ruby?
20:17 PerlJam what sort of exception?
20:18 masak I'm not sure Ruby is distinct enough from Perl to be worth stealing from ;)
20:19 PerlJam we already stole monkey patching from ruby  ;)
20:20 TimToady we already stole the Ruby sigils and turned them into twigils
20:21 eli-se Sigils are good.
20:21 TimToady other than that, hmm....
20:21 avuserow joined #perl6
20:22 TimToady (that is, we stole the idea of including "weird scoping" in our mandatory hungarian notation)
20:22 PerlJam TimToady: we already stole "stealing ideas from Perl" from ruby  :)
20:22 masak I think we should top rather than steal outright the way Ruby can do cute DSLs.
20:22 masak heh, Ruby was not alone in stealing ideas from Perl :)
20:23 eli-se I steal ideas from Perl!
20:23 sjn One might consider renaming the language to "Thief" :-P
20:24 avuserow Hi all. I was just chatting with a coworker who was amused about the various ways to spell elsif/elif/elseif, and I was wondering if anyone knew why Perl went with elsif initially
20:24 TimToady we even stole P5 regular expressions, just like everyone else
20:25 TimToady though they're kinda bolted on the side...
20:25 PerlJam no, we stole them better!
20:30 nbdsp joined #perl6
20:32 itz nlpw++ # good perl6 presence
20:33 nbdsp Greetings! Could someone advise please the proper way to specify ranges in Str? For example in Python "abcdefghij"[3:-3] returns "defg". How to to it in Perl 6?
20:34 masak m: say "abcdefghij".comb[3..*-4].join
20:34 camelia rakudo-moar 5a38b2: OUTPUT«defg␤»
20:34 masak m: say "abcdefghij".comb[3 ..^ *-3].join
20:34 camelia rakudo-moar 5a38b2: OUTPUT«defg␤»
20:34 masak closenuff
20:35 dalek rakudo-star-daily: 63912bd | coke++ | log/ (2 files):
20:35 dalek rakudo-star-daily: today (automated commit)
20:35 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/63912bda93
20:36 nbdsp masak: thanks!
20:36 flussence m: say 'abcdefghij'.substr(3, *-3);
20:36 camelia rakudo-moar 5a38b2: OUTPUT«defg␤»
20:37 psch m: say "abcdefghij".substr(3, *-3)
20:37 camelia rakudo-moar 5a38b2: OUTPUT«defg␤»
20:37 psch flussence++
20:38 masak oh, right
20:39 nbdsp psch: that's more neat!
20:40 psch although my braino surprised me there
20:41 psch m: say "abcdefghij".substr(*+3, *-3)
20:41 camelia rakudo-moar 5a38b2: OUTPUT«Failure.new(exception => X::OutOfRange.new(what => ("Start", "argument", "to", "substr"), got => 13, range => "0..10", comment => "use *13 if you want to index relative to the end"))␤»
20:41 psch but maybe that's actually sensible, cause substr doesn't know it could throw there
20:41 psch and say just .gists
20:41 [Coke] m: say 0.deadbeefp2;
20:41 camelia rakudo-moar 5a38b2: OUTPUT«No such method 'deadbeefp2' for invocant of type 'Int'␤  in block <unit> at /tmp/2GIiY2QMD0:1␤␤»
20:41 masak "use *13"?
20:42 psch masak: ... i didn't even see that
20:42 nwc10 why do I see 9 spectest failures? eg
20:42 nwc10 $ ./perl6-m -Ilib t/spec/integration/advent2012-day23.t
20:42 nwc10 1..2
20:42 nwc10 No such method 'print-nl' for invocant of type '<anon>' in sub say at src/gen/m-CORE.setting:18817
20:43 psch m: say "abcdefghij".substr(*13, *-3)
20:43 camelia rakudo-moar 5a38b2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/D5DwX5BY3B␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/D5DwX5BY3B:1␤------> 3say "abcdefghij".substr(*7⏏13, *-3)␤    expecting any of:␤        infix␤       …»
20:45 [Coke] 9 failing -files-, causing 31 failures across the board. (jvm, moar, moar-jit). jvm has an additional few failures.
20:51 flussence it looks like say no longer simply calls $*OUT.say? Did whoever made that change document the "new and improved" way to redirect $*OUT? I kinda need that functionality too.
20:53 vendethiel joined #perl6
20:54 espadrine joined #perl6
20:59 nwc10 flussence: I think that it's commit 5a38b210988e90f3b5053f3e3c5aaf65c12dc6c1
20:59 nwc10 (not checked this)
20:59 nwc10 and the fun seems to be because say now assumes that $out.print-nl exists and is usable
20:59 nwc10 and that's not the case in what (appear to be) (now) partial overrides
21:00 nwc10 and it's not clear to me if the more elegant solution is to declare the overrides wrong (and change them) or make say a bit more robust and default to a "\n" if $out.print-nl is not found
21:01 aindilis joined #perl6
21:02 flussence I guess I'll just stop hand-coding it and switch my code to IO::Capture::Simple. Once *that's* fixed...
21:04 telex joined #perl6
21:04 laouji joined #perl6
21:05 masak nwc10: I think it's wrong to assume that a new method should suddenly be there, and die if it isn't.
21:06 [ptc] masak++   # heredoc blog post
21:06 dalek nqp: 7238985 | FROGGS++ | src/HLL/sprintf.nqp:
21:06 dalek nqp: track more int/str confusion when checking truthness in sprintf
21:06 dalek nqp: review: https://github.com/perl6/nqp/commit/7238985f6d
21:07 caymanboy is it true that P6 will make me more well endowed?
21:09 TimToady is your name Stanford or Harvard?
21:10 TimToady the proper way to require a set of methods is to put them in a role
21:10 lucasb joined #perl6
21:11 FROGGS I need to fix istrue in parrot :o(
21:11 vendethiel .oO( or do you? )
21:12 lucasb In rakudo's source, is there any rule for knowing when to use P6 methods/ops and when to use nqp ops directly? Is one preferred over another?
21:12 flussence masak, can you please add a "background: #fff" somewhere on your site so I can continue using unreasonable default fg/bg colours? :)
21:13 masak flussence: oh, it doesn't have that? will fix, immediately.
21:16 masak flussence: fixed. might require you to do a hard reload on main.css
21:16 masak flussence: thanks for reporting
21:17 flussence much better, thank you :)
21:17 flussence masak++
21:17 masak \o/
21:41 yqt joined #perl6
21:44 dalek perl6-examples: c2bc065 | paultcochrane++ | util/ (2 files):
21:44 dalek perl6-examples: Add scripts to sync examples.perl6.org with repo build
21:44 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/c2bc0654ff
21:45 dalek nqp: d2d27cc | FROGGS++ | / (6 files):
21:45 dalek nqp: tweak istrue_s on jvm, every non-empty string is true now
21:45 dalek nqp:
21:45 dalek nqp: We also bump MoarVM to get the very same fix in. For Parrot we have
21:45 dalek nqp: to tweak Parrot_str_boolean, that means pull requesting the change
21:45 dalek nqp: and bumping its version.
21:45 dalek nqp: review: https://github.com/perl6/nqp/commit/d2d27ccc7f
21:46 dalek rakudo/nom: fd3a7a8 | FROGGS++ | tools/build/NQP_REVISION:
21:46 dalek rakudo/nom: bump nqp version, to get ?"0" fix for moar/jvm
21:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fd3a7a8d9a
21:47 dalek perl6-examples: 70de7ff | paultcochrane++ | util/update-and-sync:
21:47 dalek perl6-examples: Use "make html" instead of htmlify
21:47 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/70de7ff170
21:47 dalek perl6-examples: 2feb1c8 | paultcochrane++ | util/sync-build-log:
21:47 dalek perl6-examples: Add the missing sync-build-log script
21:47 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/2feb1c800a
21:48 masak a small report.
21:48 masak http://irclog.perlgeek.de/perl6/2014-10-13#i_9500806
21:48 dalek modules.perl6.org: a57bc71 | (Anthony Parsons)++ | web/index.tmpl:
21:48 dalek modules.perl6.org: Ensure text contrast with odd browser colours
21:48 dalek modules.perl6.org:
21:48 dalek modules.perl6.org: (and add some minor polish on nearby CSS lines)
21:48 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/a57bc711ba
21:48 masak apparently, back in October, it took 12 and a half seconds to run my blogging software.
21:49 virtualsue joined #perl6
21:49 masak nowadays, it takes around 10 seconds.
21:50 flussence is that for the whole site?
21:50 masak no, only things that are dirty.
21:50 masak I don't have old numbers for whole-site, but let me check what it comes down to.
21:51 masak 24.5 seconds.
21:51 masak http://i0.kym-cdn.com/photos/images/newsfeed/000/138/244/funny-barack-michelle-obama-face.jpg
21:52 masak now there's a lot of shelling out there to Gruber's Perl 5 Markdown module.
21:52 masak I'm hoping to eventually replace that, and to be faster than it.
21:52 flussence that's... about 15 pages per second. wow.
21:52 flussence (going by $$('.entry').length in /list-of-posts)
21:52 kinslayer masak: what are your blog ?
21:53 masak http://strangelyconsistent.org/
21:53 masak flussence: yes, you got that right. plus the list-of-posts page itself and the main page.
21:54 kinslayer masak oh it seems I have been by that site before. :D
21:54 masak hehe
21:54 flussence I remember being impressed about 5 years ago when I got a php-fcgi site to handle 30 pages/s, and that was with some horribly hacky caching.
21:54 kinslayer I think perhaps from a video from a talk or a google search :D
21:58 TimToady masak: testing a fix for cheating heredocs
21:58 masak \o/
21:58 vendethiel TimToady++ :-)
21:59 TimToady works on constant, doesn't work on blorsts yet
22:00 masak constants is quite enough
22:00 * masak ponders printing up a community membership badge for himself with the title "The Squeakiest Wheel" :P
22:05 dalek roast: e4816ad | FROGGS++ | S0 (2 files):
22:05 dalek roast: adjust tests for "0" being true
22:05 dalek roast: review: https://github.com/perl6/roast/commit/e4816ad343
22:07 masak well, truthy. :)
22:07 FROGGS btw, fixing Parrot's istrue explodes quite spectacular: https://gist.github.com/FROGGS/f81a925bc8f5b6d72ddf
22:07 FROGGS masak: I'm tired :o)
22:08 masak anyway, FROGGS++
22:10 vendethiel FROGGS++ !
22:10 FROGGS the other spectest fails seem to be about that print-nl thingy
22:12 FROGGS gnight
22:12 vendethiel say I wanted to write a "low-level VM" (whatever that means) in C, and have maybe a native array
22:13 vendethiel of u8 (with fixed size). is there everything that needs to be done, say, to read 4 bytes into an int or something?
22:13 vendethiel night FROGGS!
22:14 dalek rakudo/nom: d5e2d1e | TimToady++ | src/Perl6/Grammar.nqp:
22:14 dalek rakudo/nom: cheat on constant heredocs that have nothing after
22:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d5e2d1e9dc
22:14 FROGGS you can cast the position you care about to an int*, and then deref it
22:14 dalek perl6-examples: eaed7b7 | paultcochrane++ | lib/Pod/Htmlify.pm6:
22:14 dalek perl6-examples: Correct the url in pod-links
22:14 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/eaed7b70d6
22:15 FROGGS like: int foo = *(int*)(array_ptr + idx);
22:15 vendethiel FROGGS: my VM version has a `char tmp[sizeof(T)];`, I read byte by byte, and then casts the tmp to void* then T* then dereferences it
22:15 FROGGS though, the array must of course be idx + 3 bytes long
22:16 dalek infrastructure-doc: 3b5890d | paultcochrane++ | hosts/hack.p6c.org.pod:
22:16 dalek infrastructure-doc: Mention the examples.perl6.org rebuild
22:16 dalek infrastructure-doc: review: https://github.com/perl6/infrastructure-doc/commit/3b5890d73e
22:16 dalek infrastructure-doc: aa1857a | paultcochrane++ | hosts/www.p6c.org.pod:
22:16 dalek infrastructure-doc: Mention where cron job runs for examples.perl6.org
22:16 dalek infrastructure-doc: review: https://github.com/perl6/infrastructure-doc/commit/aa1857a680
22:16 FROGGS you have to cast it to a char ptr first...
22:16 FROGGS like: int foo = *(int*)(((char *)array_ptr) + idx);
22:17 FROGGS otherwise the idx would not be about bytes
22:17 vendethiel FROGGS: that works fine: https://github.com/vendethiel/worldofcore.c/blob/master/shared/read_helpers.c#L3-12 I'm just wondering how i'm supposed to do that in perl6 :-)
22:19 [ptc] yay!  examples.perl6.org just went online.  Thanks for your help moritz++!
22:20 FROGGS m: use NativeCall; my $a = CArray[int8].new; $a[$_] = $_ for ^32; say my $ap = nativecast(Pointer, $a); say nativecast(int32, Pointer.new($ap + 4))
22:20 camelia rakudo-moar 0b2092: OUTPUT«Pointer<0x316ac90>␤117835012␤»
22:20 FROGGS vendethiel: ^^
22:20 vendethiel FROGGS: amazing, thanks :)
22:20 FROGGS :o)
22:21 vendethiel but I guess I'll get astray from the school's pdf and have an int @array instead. no reason to follow the stupid stuff
22:21 FROGGS that might also make it endian unaware then...
22:22 vendethiel haah
22:23 flussence this is interesting - http://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html - it looks like in Rust, function arguments get "used up" if they don't explicitly return them to the caller
22:25 flussence (it explains there's other ways around that, but still, kinda a surprising default)
22:25 skids joined #perl6
22:26 timotimo please explain?
22:26 timotimo you mean after you pass something to a function you're not allowed to re-use it?
22:26 flussence exactly! weird, huh?
22:27 timotimo interesting idea
22:31 masak flussence: yes, this is known as "linear types". and it is very, very interesting.
22:32 masak basically, you get the type system to track ownership. the type system makes sure, statically, that there are never two simultaneous references to some value.
22:34 masak I also find it interesting that there are parallels here to quantum computing, where this relation holds all the time due to the way qubits work. (if you measure them, you "destroy" them in some sense.) QC calls it the "no-cloning theorem".
22:37 vendethiel it's like they forked c++ value/references/foo before xvalues were added. (I'm just kidding)
22:38 masak http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.55.5439&amp;rep=rep1&amp;type=pdf seems relevant, and approachable
22:38 vendethiel philip wadler, can recommend
22:39 flussence it does sound like they've put a ton of thought into making concurrency stuff good, rather than just accepting that the state of the art is that
22:39 masak yeah, rust is exciting
22:39 vendethiel "shared memory" stuff :-). lifetimes, etc
22:40 vendethiel (that's a problem in general in C++ without having to add concurrency stuff. see move and all that... eh)
22:41 masak gonna go to bed now, but I want to leave you with a parting challenge-oid
22:41 masak I just took this line https://gist.github.com/masak/db655cb7ab27454cf15c#file-01-mazes-p6-L26
22:41 masak and rewrote it to work on ints instead
22:41 masak https://gist.github.com/masak/e54c64fc2d51cdd1a0b7
22:42 masak the resulting script runs in 10s if I turn off the `say` instructions
22:42 masak which is exhiliratingly fast
22:42 masak can you make it faster? :)
22:42 masak I'm sure I've overlooked something -- it is my first attempt.
22:42 masak I have verified that it's a correct replica of the original logic, though.
22:43 andreoss joined #perl6
22:43 masak it outputs the exact same set of solutions.
22:43 andreoss m: my @x := do 2 for 1..*; say @x[^10];
22:43 andreoss m: my @x := gather take 2 for 1..*; say @x[^10];
22:43 camelia rakudo-moar 0b2092: OUTPUT«(timeout)»
22:43 camelia rakudo-moar 0b2092: OUTPUT«2 2 2 2 2 2 2 2 2 2␤»
22:44 * masak is not sure he has seen `gather take` together before
22:44 masak andreoss++
22:44 masak anyway, 'night, #perl6
22:44 dalek rakudo/nom: 53593e5 | TimToady++ | src/Perl6/Grammar.nqp:
22:44 dalek rakudo/nom: heredoc cheating on blocks and on use as well
22:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/53593e5ba4
22:45 masak TimToady++
22:45 tony-o can arrays not be applied to regex subtraction?
22:46 tony-o m: @a = qw<a b>; say "abc".subst(/ <[.] - [@a]> /, '');
22:46 camelia rakudo-moar 0b2092: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ByLm01N8Zl␤Variable '@a' is not declared␤at /tmp/ByLm01N8Zl:1␤------> 3@a7⏏5 = qw<a b>; say "abc".subst(/ <[.] - [@a␤    expecting any of:␤        postfix␤»
22:46 tony-o m: my @a = qw<a b>; say "abc".subst(/ <[.] - [@a]> /, '');
22:46 camelia rakudo-moar 0b2092: OUTPUT«abc␤»
22:47 vendethiel [.]?
22:47 tony-o i'd guess it should be 'ab' after the subst
22:47 vendethiel that's a literal one, right?
22:47 tony-o it isn't a literal '.'
22:48 vendethiel isn't it? i'm fairly sure it's a literal one in this context :o
22:48 tony-o ah maybe it is,
22:48 vendethiel m: my @a = qw<a b>; say "abc".subst(/ <[a..z] - [@a]> /, '');
22:48 camelia rakudo-moar 0b2092: OUTPUT«ac␤»
22:48 tony-o m: my @a = qw<a b>; say "abc".subst(/ <-[@a]> /, '');
22:48 camelia rakudo-moar 0b2092: OUTPUT«ac␤»
22:48 vendethiel does seem to be a literal one ;-)
22:49 tony-o i stand corrected
22:49 tony-o why is it getting rid of the b instead of the c though?
22:49 tony-o m: my @a = qw<a b>; say "abc".subst(/ <-[@a]> /, '');
22:49 camelia rakudo-moar 0b2092: OUTPUT«ac␤»
22:49 vendethiel no idea, I don't know if @a is correct
22:50 vendethiel I just knew the . was literal because 'foo' warns for duplicated ' :)
22:50 tony-o ah :-)
22:50 tony-o m: my @a = qw<a b>; say "abc".subst(/ [@a] /, '');
22:50 camelia rakudo-moar 0b2092: OUTPUT«bc␤»
22:50 tony-o m: my @a = qw<a b>; say "abc".subst(/ @a /, '');
22:50 camelia rakudo-moar 0b2092: OUTPUT«bc␤»
22:50 dalek specs: 6fa2d87 | TimToady++ | S02-bits.pod:
22:50 dalek specs: doc new heredoc cheating
22:50 dalek specs: review: https://github.com/perl6/specs/commit/6fa2d87695
22:51 tony-o maybe it's the sinus infection but none of those seem correct to me
22:52 vendethiel spec say / @a / is the same as / [ $(@a[0]) | $(@a[1]) | ... ]
22:52 * TimToady notes that the 'my @herestub_queue;' in the STD role is essentially a global variable, however
22:53 vendethiel i'll just go to bed and read backlog tomorrow :). good night, #perl6!
22:53 TimToady o/
22:54 TimToady those all look correct to me
22:54 tony-o vendethiel: seems like [ 'a' | 'b' ] should match the "ab" section ?
22:54 tony-o not the "bc" part?..
22:55 TimToady there's no quantifier, so no way to match the b after a
22:55 TimToady or did you think it was gonna intuit a :g for you?
22:55 * TimToady knows about them sinus infections...
22:55 tony-o sacramento is terrible with it
22:56 TimToady just because @a is "plural" doesn't mean it matches more than one thing...
22:56 tony-o m: my @a = qw<a b>; say "abc".subst(:g/ @a /, '');
22:56 camelia rakudo-moar 0b2092: OUTPUT«5===SORRY!5=== Error while compiling /tmp/O8wCyXvpPQ␤Preceding context expects a term, but found infix , instead␤at /tmp/O8wCyXvpPQ:1␤------> 3 @a = qw<a b>; say "abc".subst(:g/ @a /,7⏏5 '');␤»
22:56 tony-o m: my @a = qw<a b>; say "abc".subst(r:g/ @a /, '');
22:56 camelia rakudo-moar 0b2092: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZqKQLeT6_3␤Preceding context expects a term, but found infix , instead␤at /tmp/ZqKQLeT6_3:1␤------> 3@a = qw<a b>; say "abc".subst(r:g/ @a /,7⏏5 '');␤»
22:56 tony-o gah
22:56 tony-o TimToady: i'll look at it some more if those are right, or just take a break - thanks ^
22:56 TimToady m: my @a = qw<a b>; say "abc".subst(:g, / @a /, '')
22:56 camelia rakudo-moar 0b2092: OUTPUT«c␤»
22:57 TimToady m: my @a = qw<a b>; say "abc".subst(/ @a+ /, '')
22:57 camelia rakudo-moar 0b2092: OUTPUT«c␤»
22:59 labster FROGGS++ for fixing all of the "0" things I didn't see
23:03 dalek rakudo/nom: be225ce | TimToady++ | src/Perl6/Grammar.nqp:
23:03 dalek rakudo/nom: don't cheat without a newline coming
23:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/be225cec50
23:04 labster http://design.perl6.org/S26.html#Delimited_blocks mentions that :key<1 2 3> make a list, but right below it looks like it's trying to use :caption<Table of Contents> as a string.
23:05 TimToady well, if you stringify the list, that's what you get
23:05 TimToady m: say :caption<Table of Contents>.value.WHAT
23:05 camelia rakudo-moar 0b2092: OUTPUT«(Parcel)␤»
23:05 TimToady m: say :caption<Table of Contents>.Str
23:05 camelia rakudo-moar 0b2092: OUTPUT«caption      Table of Contents␤»
23:06 TimToady m: say :caption< Table      of      Contents>.value.Str
23:06 camelia rakudo-moar 0b2092: OUTPUT«Table of Contents␤»
23:06 labster true enough.  Now I just need to convince rakudo that all colonpairs in pod aren't strings.
23:14 skids class B { method foo { "" } }; class A is B { method foo { 0 || nextsame } }; A.new.foo.perl.say;
23:14 skids m: class B { method foo { "" } }; class A is B { method foo { 0 || nextsame } }; A.new.foo.perl.say;
23:14 camelia rakudo-moar 0b2092: OUTPUT«""␤»
23:15 skids m: class B { }; class A is B { method foo { 0 || nextsame } }; A.new.foo.perl.say; # Nil is as good as anything I guess
23:15 camelia rakudo-moar 0b2092: OUTPUT«Nil␤»
23:15 skids But maybe nextsame should take an arg for use if it finds itself with no recourse.
23:16 eli-se GitHub thinks my Perl 5 code is Perl 6 code.
23:16 eli-se My Perl 5 code must be really good!
23:23 TimToady the nqp jvm build appears to be busticated
23:24 TimToady at least on my downstream server; trying again on my laptop
23:24 eli-se What happens if you next $label; on a different thread than the one the loop is running on?
23:25 sorear joined #perl6
23:28 TimToady yep, kerblooey there too
23:28 TimToady hopefully the thread catches the control exception trying to escape, and punishes it for being desirous of freedom
23:31 TimToady https://gist.github.com/anonymous/2d3e3d6de54f621af69e is the jvm build fale
23:44 caymanboy nick caymanboy

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

Perl 6 | Reference Documentation | Rakudo