Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-01-20

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:09 timotimo that was too easy, it can't be right
00:11 * timotimo builds all the things
00:29 timotimo it wasn't right :)
00:37 timotimo i think i made it work!
00:39 timotimo and of course i forget to name the copied method "spurt" instead of "slurp"
00:45 timotimo Method 'jast' not found for invocant of class 'NQPMu'
00:45 timotimo ..... so ... ?!
00:45 timotimo ah, of course
00:48 jnap joined #perl6
01:06 timotimo https://gist.github.com/timo/4134cd44443420e1d512    :\
01:15 jnap joined #perl6
01:16 dayangkun joined #perl6
01:42 hypolin joined #perl6
01:47 dayangkun joined #perl6
02:58 lue p: my $a = (1,2,3,2,2,2,2).BagHash; say $a.perl;
02:58 camelia rakudo-parrot 0bdc76: OUTPUT«(1=>1,2=>5,3=>1).BagHash␤»
02:59 lue p: my $a = (1,2,3,2,2,2,2).BagHash; say $a.keys.perl; say $a.values.perl;
02:59 camelia rakudo-parrot 0bdc76: OUTPUT«(1, 2, 3).list␤(1, 5, 1).list␤»
02:59 lue p: my $a = (1,2,3,2,2,2,2).BagHash; say $a.kv.perl;
02:59 camelia rakudo-parrot 0bdc76: OUTPUT«((0, 1), (1, 2), (2, 3)).list␤»
02:59 lue BagHash.kv is completely useless, at least based on what I was expecting.
03:07 colomon p: my $a = (1,2,3,2,2,2,2).BagHash; say $a.pairs.perl
03:07 camelia rakudo-parrot 0bdc76: OUTPUT«(1 => 1, 2 => 5, 3 => 1).list␤»
03:13 lue Yeah, I ended up using .pairs :) . I still would like to know why .kv does that though.
03:24 colomon lue: I think it's doing $a.keys.kv
03:24 colomon there is not .kv method in Baggy
03:25 lue That's interesting.
03:26 colomon same in niecza
03:27 lue Is there any reason for it, or is it just oversight?
03:27 colomon dunno
03:34 colomon certainly seems like if you have keys and values, you ought to have equivalent kv
03:35 lue I'd understand more if it just plain didn't work, but I fail to see how the way it currently works is ever helpful.
03:37 colomon current version is clearly useless, cause the ordering is random
03:39 benabik ...  What is .kv doing?
03:39 colomon trying a fix here.
03:40 colomon benabik: I believe it's converting to a list and the doing .kv on the list
03:40 go|dfish joined #perl6
03:40 dayangkun joined #perl6
03:43 colomon lue: I need to go to bed soon, you're going to have to add tests to roast for these.  ;)
03:44 lue :)
03:46 colomon > my $a = (1,2,3,2,2,2,2).BagHash; say $a.kv.perl;
03:46 colomon ((2, 5), (1, 1), (3, 1)).list
03:48 * colomon is compiling both JVM and Parrot here, which is slowing things down a bit
03:49 benabik colomon: Not Moar?
03:50 colomon benabik: Moar didn't work on OS X last time I ran Configure.pl here.
03:50 colomon my linux box has a rakudo build with all three
03:51 benabik colomon: Benabik/rakudo nom has a fix.  Don't have commit bit to merge it myself.
03:51 colomon is it one pull and everything should work?
03:52 colomon I'd really like to go to bed in then next ten minutes.  ;)
03:52 benabik It should.  But no need to stay up late.  ;-)
03:53 diakopter I can push it
03:53 diakopter benabik: ^
03:54 colomon > my $a = (1,2,3,2,2,2,2).Set; say $a.kv.perl;
03:54 colomon ((2, Bool::True), (1, Bool::True), (3, Bool::True)).list
03:55 chirkov joined #perl6
03:55 benabik diakopter: Feel free, if you'd like.  Opened a PR, just waiting for someone to do it.
03:56 diakopter ohh
03:56 diakopter I can test on mac too
03:57 benabik Might want a Windows test, but I'm pretty confident on moving a build flag Rakudo's Configure was removing.  :-D
03:58 dalek rakudo/nom: 909c76a | (Solomon Foster)++ | src/core/ (2 files):
03:58 dalek rakudo/nom: Add Setty.kv and Baggy.kv.
03:58 dalek rakudo/nom:
03:58 dalek rakudo/nom: lue++ pointed out that calling these on Sets and Bags returned silly results,
03:58 dalek rakudo/nom: so I implemented proper versions.
03:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/909c76aaba
03:59 lue I'll write the tests for them later, colomon.
03:59 btyler joined #perl6
03:59 colomon k
03:59 colomon I think the patch will make MixHash.kv work properly too.
04:03 xilo joined #perl6
04:05 colomon it is extremely lightly tested.  ;)
04:08 preflex_ joined #perl6
04:11 jeffreykegler left #perl6
04:20 kaleem joined #perl6
04:21 colomon p: my $a = (1,2,3,2,2,2,2).BagHash; say $a.kv.perl;
04:21 camelia rakudo-parrot 0bdc76: OUTPUT«((0, 1), (1, 2), (2, 3)).list␤»
04:26 ldthien0 joined #perl6
04:47 lue I add the tests to S02-types/{set,bag,mix}hash.t , correct?
05:03 lue Hrm... I don't know where I should put the .kv tests actually.
05:23 bjz joined #perl6
05:33 SamuraiJack joined #perl6
05:54 moritz good morning
05:54 dalek rakudo/nom: b7548b5 | benabik++ | Configure.pl:
05:54 dalek rakudo/nom: Fix build on OS X
05:54 dalek rakudo/nom:
05:54 dalek rakudo/nom: OS X's linker seems to be more strict than Linux's and requires you
05:54 dalek rakudo/nom: actually tell it to link against the moar library.  Re-use the
05:54 dalek rakudo/nom: previously Windows specific @moarimplib@ to add that flag.
05:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b7548b5cc9
05:54 dalek rakudo/nom: 2860b2a | benabik++ | .gitignore:
05:54 dalek rakudo/nom: Ignore OS X shared libraries
05:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2860b2a6b1
05:54 dalek rakudo/nom: f60851e | benabik++ | Configure.pl:
05:54 dalek rakudo/nom: Remove unneeded Windows tweak
05:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f60851e840
05:54 dalek rakudo/nom: 69dfd90 | benabik++ | tools/build/Makefile-Moar.in:
05:54 dalek rakudo/nom: Add DESTDIR to m-install
05:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/69dfd90bce
05:54 dalek rakudo/nom: 8f4edac | moritz++ | / (3 files):
05:54 dalek rakudo/nom: Merge pull request #238 from Benabik/nom
05:54 dalek rakudo/nom:
05:54 dalek rakudo/nom: Fix build on OS X
05:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8f4edacb3a
06:01 benabik joined #perl6
06:02 diakopter moritz: should DESTDIR be added to the create-moar-runner.pl line?
06:02 dalek Net--IRC/concurrency: e1fbbc9 | (Geoffrey Broadwell)++ | lib/Net/IRC/Logger.pm:
06:02 dalek Net--IRC/concurrency: Various small Logger improvements
06:02 dalek Net--IRC/concurrency:
06:02 dalek Net--IRC/concurrency: * Add a .close method (which delegates to closing the log channel)
06:02 dalek Net--IRC/concurrency: * Log the $*Thread.id as part of the log message prefix
06:02 dalek Net--IRC/concurrency: * Log the start and end of the log itself
06:02 dalek Net--IRC/concurrency: review: https://github.com/TiMBuS/Net--IRC/commit/e1fbbc957d
06:02 dalek Net--IRC/concurrency: acccb8f | (Geoffrey Broadwell)++ | lib/Net/IRC/SocketConnection.pm:
06:02 dalek Net--IRC/concurrency: Switch SocketConnection to use supplies instead of channels for receiving data from the socket; include both recv (raw buffer data) and get (chomped lines) supply variants
06:02 dalek Net--IRC/concurrency: review: https://github.com/TiMBuS/Net--IRC/commit/acccb8fc4d
06:03 dmol joined #perl6
06:06 japhb j: my $s := Supply.new; $s.tap({ die "oops" }); $s.more("checking ..."); say "alive!";
06:06 benabik diakopter: IIRC create-moar-runner creates the file in the current directory.  And DESTDIR shouldn't be in the paths it stores.  (It's usually used to package into a temp directory, the final path is just prefix.)
06:06 camelia rakudo-jvm 909c76: OUTPUT«oops␤  in block  at /tmp/b2G7cqdQLX:1␤␤»
06:09 kaleem joined #perl6
06:10 darutoko joined #perl6
06:24 [Sno] joined #perl6
06:28 markov joined #perl6
06:34 bjz joined #perl6
06:35 [Coke] joined #perl6
06:39 diakopter benabik: ah ok
06:42 Shellcat joined #perl6
06:51 Mouq joined #perl6
07:05 dalek roast: 57b69f5 | lue++ | S02-types/ (3 files):
07:05 dalek roast: [S02-types] Add tests for (Bag&Mix&Set)Hash.kv
07:05 dalek roast: review: https://github.com/perl6/roast/commit/57b69f59ad
07:05 Mouq benabik+++ \o/ I can finally build and run Rakudo Moar! Woo!
07:09 Mouq and it's pretty great
07:20 peteretep left #perl6
07:25 dmol joined #perl6
07:27 dmol joined #perl6
07:38 berekuk joined #perl6
07:41 filly joined #perl6
07:51 bjz joined #perl6
07:51 FROGGS joined #perl6
08:00 berekuk joined #perl6
08:18 apejens joined #perl6
08:29 zakharyas joined #perl6
08:59 hoelzro morning #perl6
08:59 FROGGS o/
09:00 dalek nqp: c59f144 | (Arne Skjærholt)++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/CArrayInstance.java:
09:00 dalek nqp: Update outdated error message.
09:00 dalek nqp: review: https://github.com/perl6/nqp/commit/c59f1443a1
09:00 dalek nqp: 5af4c0b | (Arne Skjærholt)++ | src/vm/jvm/runtime/org/perl6/nqp/ (5 files):
09:00 dalek nqp: Basic CStructs on JVM.
09:00 dalek nqp:
09:00 dalek nqp: Only support native (num, int) attributes so far, but objects are on their
09:00 dalek nqp: way. Also still to be done is CArrays of CStruct.
09:00 dalek nqp: review: https://github.com/perl6/nqp/commit/5af4c0bb7a
09:01 tadzik arnsholt++
09:04 FROGGS arnsholt++ # :o)
09:19 nwc10 arnsholt++
09:28 denis_boyun joined #perl6
09:41 dakkar joined #perl6
09:42 pecastro joined #perl6
09:46 jnthn morning o/
09:47 jnthn yay, NativeCall on JVM commits! arnsholt++
09:47 moritz \o jnthn, *
09:53 yves_ joined #perl6
09:54 hoelzro ahoy jnthn
09:57 daniel-s_ joined #perl6
09:59 sqirrel joined #perl6
10:00 nwc10 how are the spectest passes looking this "week"? :-)
10:04 * hoelzro .oO( spec-tacular? )
10:09 jnthn nwc10: r-m is >98%, not yet 99% afaik
10:10 FROGGS jnthn: I bet it is >=99%
10:11 FROGGS for today I mean... because I guess that yesterday's run started before the patch flood
10:14 jnthn We'll see :)
10:15 jnthn Hitting 99% by release would be cool
10:16 masak right, this week is release week.
10:17 masak antenoon, #perl6
10:17 hoelzro greetings masak
10:18 FROGGS meh, I wanna run the v5 m-spectest and wanna know how long it takes :(
10:24 jnthn FROGGS: That's the NYI serialization conflict resolution issue blocking you?
10:24 FROGGS jnthn: exactly
10:25 FROGGS jnthn: it is not pressing, I am just eager to see it running :o)
10:25 FROGGS dunno if I could fix it, I guess not
10:26 jnthn FROGGS: Well, that one is slightly pressing to me in that it blocks JSON::Tiny, which is critical path for Panda, which is critical path for Moar Star :)
10:26 FROGGS true
10:26 FROGGS jnthn: do you have a simple test case already?
10:27 jnthn FROGGS: No, but I don't think I need one.
10:27 FROGGS k
10:27 FROGGS :o)
10:27 jnthn FROGGS: I know where the NYI is 'cus I remember leaving it as a todo a couple of months back.
10:28 FROGGS ... and I can't even remember what last week happened
10:38 * nwc10 wants Moar stars
10:38 moritz just needs panda and nativecall :-)
10:38 nwc10 (but just saying that doesn't help)
10:39 jnthn nwc10: No, but the number of bugs you've hunted/fixed/helped fix does help :)
10:42 kaare_ joined #perl6
10:54 timotimo jnthn: i'm not sure how to turn bindattr and getattr into $! vars without pessimizing all of them into making object registers :(
10:54 woolfy Hi all, there will be a DBIx::Class hackathon in April in Swindon: https://github.com/castaway/DBIx-Class-Hackathon/blob/master/README.md
10:55 woolfy I have seen in DBIish ( https://github.com/perl6/DBIish/blob/master/CREDITS ) that some of you have been busy with DBI-stuff for Perl 6.
10:55 jnthn timotimo: Oh, the _i thing? Just set :returns(int) on the QAST::var.
10:55 jnthn And n => num, s => str
10:55 timotimo oh!
10:55 woolfy This seems to be a nice opportunity for Perl 6 people to try to convince the DBIx::Class people to make some more DBI-stuff for Perl 6.
10:55 jnthn Simples!
10:56 timotimo also, i think the reason why my spurt implementation does nothing is that i forgot to flip the buffer
10:56 woolfy Like, to come to the hackathon and work with mst and ribasushi to make a DBIx::Class for Perl 6.
10:56 woolfy I hope somebody is interested.
10:57 timotimo nope, that wasn't it :/
10:58 woolfy Anyway, Liz and I are invited to come over (and we are thinking of coming).  And now, you are invited too (and we hope some of you will come, so we will not be the only Perl 6 afficionados).
10:59 moritz since April is ETA of my second daughter, I'm not going to come :(
10:59 moritz though it does sound very tempting
10:59 woolfy Ow, of course not.  moritz++  for enhancing the gene pool with more potention Perl 6 people.
10:59 moritz and $wife has told me about Swindon before
11:02 woolfy So, pregnant wife indicated that you might be OK to go to Swindon.  That's cool.
11:07 timotimo so, flipping the buffer wasn't right, but rewinding it was also not correct ... huh?!
11:08 pat_js joined #perl6
11:13 timotimo yay, i made it work \o/
11:15 dalek nqp: 7922bca | (Timo Paulssen)++ | src/vm/jvm/ (4 files):
11:15 dalek nqp: implement nqp::spurtasync.
11:15 dalek nqp: review: https://github.com/perl6/nqp/commit/7922bca617
11:16 dalek rakudo/nom: b708436 | (Timo Paulssen)++ | src/vm/jvm/core/IOAsyncFile.pm:
11:16 dalek rakudo/nom: use nqp::spurtasync for IO::Async::File.spurt
11:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b708436e33
11:18 colomon moritz++!  # yay news!
11:19 timotimo actually, the way i implemented spurt there is more like a "append to file" rather than "replace entire file" operation
11:27 colomon timotimo: should you have bumped nqp version or somesuch?
11:27 fhelmberger joined #perl6
11:28 * colomon is trying to rebuild, and Configure.pl didn't run anything, which is kind of worrying
11:28 timotimo oh, whoops
11:28 odoacre joined #perl6
11:28 timotimo good point
11:28 * colomon doesn't yet not if the build works or not
11:29 timotimo it's going to fail with "no registered blah for spurtasync"
11:30 colomon actually failed with
11:30 colomon Method 'jast' not found for invocant of class 'NQPMu'
11:30 colomon in  (gen/jvm/stage2/QAST.nqp:3790)
11:30 colomon for me
11:32 timotimo ah, yes
11:32 timotimo that's the even less helpful error message you get when you didn't register the op with the Operations
11:34 * colomon is not awake enough to figure out how to fix this
11:34 timotimo just pull again?
11:34 timotimo oh, oops
11:34 timotimo i didn't succeed in pushing
11:35 timotimo sorry
11:36 dalek rakudo/nom: aa88102 | (Timo Paulssen)++ | tools/build/NQP_REVISION:
11:36 dalek rakudo/nom: bump NQP_REVISION to get nqp::spurtasync on jvm
11:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aa88102702
11:36 denis_boyun joined #perl6
11:37 colomon timotimo++
11:37 lue joined #perl6
11:38 timotimo though i must admit the api for spurt is kind of weird
11:38 timotimo IO::Async::File.new.open("foobar", :w).spurt("hello world")
11:39 * FROGGS .oO( "foobar".IO.spurt("hello world", :async) )
11:47 colomon building rakudo-moar on OS X just failed for me.  :()
11:47 colomon :(
11:47 FROGGS how/where?
11:48 colomon clang  -dynamiclib -O1 -Wl,-rpath,/Users/colomon/sol/temp/rakudo/install/lib  -O1 -lpthread -o dynext/libperl6_ops_moar.dylib dynext/perl6_ops.o dynext/container.o -lmoar
11:48 colomon ld: library not found for -lmoar
11:48 colomon clang: error: linker command failed with exit code 1 (use -v to see invocation)
11:48 colomon make: *** [dynext/libperl6_ops_moar.dylib] Error 1
11:58 rindolf joined #perl6
11:58 nwc10 This might be stating the obvious, but it only occurred to me yesterday
11:59 nwc10 doing reads of UTF-8 is messy, because you can get code points split across buffer boundaries
11:59 nwc10 and IIRC Parrot doesn't cope well with that. (Nor does bits of Perl 5, but hey)
11:59 nwc10 but at least you know you have a partial code point
12:00 nwc10 for NFG, you can't know that you have a complete grapheme until you have fully read the next code point too
12:00 nwc10 which, I suspsect, is going to be a gotcha.
12:01 jnthn nwc10: Yes, that one has been worrying me for a while.
12:01 nwc10 I'd not seen anyone note it as a gotcha. Hence the bold :-)
12:02 jnthn nwc10: I figured it means that on socket stuff, you can't hand back a grapheme until the next packet arrives.
12:02 jnthn Since the next packet may bring along a combiner.
12:03 diakopter it's a matter of acting as if you haven't received some codepoints until you receive one from the next grapheme or eof. And then act as if you haven't received that next thing yet necessarily
12:03 jnthn Aye
12:04 jnthn colomon: Hm, there's a PR that may not be merged yet...
12:04 diakopter nwc10: TimToady, jnthn, and I did mention it to each other, but off channel
12:04 jnthn colomon: Oh no, it has been
12:04 jnthn colomon: But maybe needs a later Moar / NQP?
12:05 jnthn oh, the bumps happened in NQP and I guess you got the one timo pushed for the async stuff, though. So, hm.
12:06 colomon right
12:07 colomon I did just get a complete build of all three on Linux, timotimo++
12:10 timotimo jnthn: i should make sure to reset the position of the IO::Async::File before spurting data into it, right?
12:10 djanatyn joined #perl6
12:11 jnthn timotimo: Guess so
12:11 jnthn timotimo: The API there is all rather preliminary
12:12 timotimo should there also be an async write like my spurt implementation currently behaves?
12:12 jnthn Well, that's just be .print I guess...
12:12 timotimo actually, i could rename asyncspurt to asyncwrite, expose a "rewind file pointer" op and combine the two into .spurt and .print on IO::Async::File
12:13 Tene joined #perl6
12:13 Tene joined #perl6
12:13 jnthn timotimo: um, wait...isn't this really about whether you open it :w or :a?
12:14 timotimo oh?
12:14 timotimo *could* be. let me test it
12:14 jnthn Well, not saying it works that way, but that it probably should.
12:20 timotimo will have a complete build of all backends soon, then i'll experiment some more
12:20 atroxaper joined #perl6
12:29 Ulti colomon failed at the same place for me too
12:30 Ulti ^ re: OSX build of moar Rakudo
12:30 Ulti I did a make clean but am now trying after a completely fresh repo
12:32 FROGGS nwc10: at least parrot does not bail out anymore when it reads a chunk that ends with a partial utf8 sequence
12:38 colomon Ulti: I was trying from a fresh repo too
12:40 FROGGS colomon: is there a moar lib in -rpath,/Users/colomon/sol/temp/rakudo/install/lib ?
12:41 FROGGS s/-rpath,//
12:41 sqirrel joined #perl6
12:42 timotimo jnthn: should i be able to .spurt on the same IO::Async::File twice in a row? iow, should .spurt .close after success?
12:44 Ulti 'ld: library not found for -lmoar' that looks like the same problem that was reported as fixed, so maybe its just not been merged yet
12:45 Ulti < benabik> colomon: Benabik/rakudo nom has a fix.  Don't have commit bit to merge it myself.
12:46 Celelibi joined #perl6
12:47 colomon Ulti: I thought that was already merged?
12:47 jnthn Yeah, I see it as merged too
12:47 Ulti yeah I just did a pull and it said up to date from benabik's stuff
12:47 Ulti so it is merged
12:47 jnthn timotimo: Take same semantics as non-async, I think.
12:47 timotimo i think non-async spurt will close after writing
12:48 colomon FROGGS: there is a libmoar.dylib
12:48 timotimo i think $iofile.close should set .closed
12:48 timotimo er, opened
12:48 moritz to "Maybe" :-)
12:48 timotimo it does close the file handler, but it doesn't make it be False apparently?
12:49 FROGGS colomon: that is not too bad... do we need to set LD_RUN_PATH or LD_LIBRARY_PATH?
12:49 timotimo i suppose AsyncFileHandle needs a custom boolification spec
12:50 timotimo not that i know how to set that
12:51 colomon FROGGS: I dunno.  looking at env, the only likely thing I see set is DYLD_FALLBACK_LIBRARY_PATH
12:51 colomon (in my default env)
12:51 FROGGS no, these two are not set by default....
12:52 FROGGS you can try to set LD_LIBRARY_PATH to the path pasted above and try again to compile it
12:53 FROGGS colomon: if it does not care about that var, you could look a man dyld
12:53 FROGGS at*
12:53 FROGGS it should state how to specify a search path for libs at compile time
12:53 FROGGS (which should mbed that search path for runtime later)
12:54 * FROGGS reads http://www.eyrie.org/~eagle/notes/rpath.html
12:54 * timotimo hunts after HLLConfig.ioType
12:54 jeffreykegler joined #perl6
12:54 colomon hmm, I see I do have DYLD_LIBRARY_PATH=:/usr/local/netpbm/lib:/Users/colomon/tools/rakudo/install/lib in the env
12:55 jeffreykegler left #perl6
12:55 * timotimo found something, yay
12:57 FROGGS ahh, LD_RUN_PATH=<path_here> would be a choice or passing -R /your/path/here
12:57 bjz_ joined #perl6
12:58 kbaker joined #perl6
12:59 colomon FROGGS: I've tried adding it to DYLD_LIBRARY_PATH, LD_LIBRARY_PATH, and LD_RUN_PATH.  None of them help
12:59 FROGGS :/
12:59 FROGGS but not at the same time, right?
12:59 timotimo hm. i set Ops.setboolspec(tc.gc.BOOTIO, BoolificationSpec.MODE_METHOD, Ops.findmethod(tc, tc.gc.BOOTIO, "boolify"), tc);
13:00 timotimo but i'm not sure where to put that exact method for it to work properly
13:00 colomon I've used either LD_LIBRARY_PATH and LD_RUN_PATH each with DYLD_LIBRARY_PATH, but not all at once
13:00 timotimo just into class IOHandle inside reprs/?
13:04 kivutar joined #perl6
13:05 btyler joined #perl6
13:07 colomon FROGGS: all three at once also fails
13:08 FROGGS k, I just wanted to make sure that LD_RUN_PATH alone fails too
13:08 SamuraiJack joined #perl6
13:08 colomon FROGGS: can try
13:08 FROGGS I really need to get my osx vm up and running again :/
13:09 colomon still fails
13:14 nwc10 colomon: I suggest (and I can't do better than this) - build Perl 5 from source, passing -Duseshrplib to its Configure. Install that perl. Use it to build and install an XS module (eg DBI)
13:15 nwc10 see what compiler and linker flags it uses
13:15 nwc10 steal that.
13:15 colomon that's a bit complicated for the level of attention I can give this today, alas.  :(
13:15 * colomon doesn't really need moar OS X working today, but wanted to try
13:27 btyler for folks who just want r-m to build on OSX, you can get it going by removing "-lmoar" and "-install_name" from 291 of the makefile. I haven't learned enough to say -why- that fixes it, or why benabik++'s tweaks didn't resolve the build failure in all cases
13:30 colomon btyler: I don't seem to have an -install_name in mine?  removing -lmoar gets me past the failure I was seeing above, but then the link fails with undefined symbols, starting with _MVM_6model_add_container_config
13:31 * colomon is completely breaking his $work build
13:33 btyler colomon: I'll try again with a fresh rakudo clone. I just had it with --backends=moar --gen-moar, but maybe there was something left over from a previous build
13:34 colomon btyler: thanks
13:37 kaleem joined #perl6
13:38 ajr joined #perl6
13:48 btyler colomon: hm, yeah, with a totally fresh copy I have the same thing. here's a gist with my (working just a minute ago) makefile from before the new clone: https://gist.github.com/kanatohodets/330342ca48277dfd3fbc#file-gistfile1-mak-L290
13:51 btyler same thing being 'no build'. it works if you put the path to libmoar.dynlib and remove -lmoar, which ends up looking just like the line in that ^ gist
13:55 uon joined #perl6
13:55 colomon btyler++ # trying now
13:55 uon left #perl6
13:56 cognominal joined #perl6
13:57 colomon write error?
13:58 colomon huh, that stopped make, but then make install seemed to work
13:58 btyler I've seen that too. just on the last step, cp-ing perl6-m to perl6
13:58 colomon Woot!
13:58 colomon working perl6-m!
13:58 colomon btyler++ !
13:59 kbaker joined #perl6
13:59 btyler woohoo! glad it worked for someone besides me :)
14:03 Alula Hey all
14:04 colomon btyler: now if you can just figure out how to modify the setup to make it happen automatically… ;)
14:06 FROGGS hi Alula
14:06 btyler colomon: short of hackery in configure.pl, I'm unfortunately pretty ignorant of how to do that. benabik made some changes just yesterday with that aim, not sure why they didn't work out for us
14:14 masak oh hai Alula
14:34 jnap joined #perl6
14:34 bluescreen10 joined #perl6
14:34 Alula Hi
14:35 dalek perl6-roast-data: e0fae9a | coke++ | / (6 files):
14:35 dalek perl6-roast-data: today (automated commit)
14:35 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/e0fae9a166
14:35 Alula Are there any good OAuth modules for p6 yet?
14:35 dalek rakudo-star-daily: 9665b9c | coke++ | log/ (5 files):
14:35 dalek rakudo-star-daily: today (automated commit)
14:35 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/9665b9c3b6
14:36 [Coke] moritz++
14:37 FROGGS Alula: look at modules.perl6.org
14:37 moritz [Coke]: what did I do?
14:37 FROGGS multiply?
14:38 moritz oh. Not yet :-)
14:38 Alula FROGGS: That's a no :) New project time :D
14:39 FROGGS Alula: have fun :o)
14:41 masak ++Alula
14:41 Alula So projects are Net::OAuth (or should that be HTTP::OAuth)?
14:41 Alula and Net::Twitter :P
14:43 FROGGS I'd prefer Net::, but I dunno why
14:44 benabik colomon: I've been seeing `make: write error`, and actually occasional segfaults.  NO idea where it's coming from.  A little searching around has told me the write error is probably spurious, there's a patch for make to fix it.
14:45 hoelzro I wish that Firefox and other tools enabled some sort of stemming algorithm when searching on a page
14:46 hoelzro so searching for "package" would bring up "packaging"
14:47 Alula Is there a CPAN-like for p6 yet? I havent played with modules yet
14:47 colomon Alula: it's called panda.
14:47 Alula Can it install prereq modules?
14:47 colomon yes
14:47 huf pandaring to the masses
14:47 Alula Nice
14:48 colomon well, only on rakudo parrot so far
14:48 huf is that why it's called panda?
14:48 colomon the jvm and moar versions should be up and running pretty soon, but as far as I know neither works as of today.
14:48 jnthn I'm pretty sure Panda works on JVM?
14:48 preflex jnthn: you have 3 new messages. '/msg preflex messages' to read them.
14:50 moritz aye, it did last I tried
14:50 * colomon is trying
14:52 Alula I may torture myself and implement SOAP at some point :/
14:53 colomon moritz, jnthn: JSON::Tiny doesn't seem to work for me under JVM?
14:56 BenGoldberg joined #perl6
14:56 masak Alula: that would be interesting. try to implement it without any injection attack vulnerabilities ;)
14:56 moritz colomon: how does it not work?
14:57 colomon t/03-unicode.t .... Cannot unbox a type object
14:57 colomon Error while creating backtrace: Cannot unbox a type object
14:57 colomon same for t/04-roundtrip.t
14:58 moritz colomon: works for me here (no precompilation though)
15:00 colomon moritz: it fails in there during panda bootstrap here.
15:01 prevost joined #perl6
15:01 colomon (here being my linux box)
15:01 moritz ah, I tried the current version from the json repo
15:01 moritz colomon: if you cd into the json submodule, do a  'git pull origin master' there, does the error go away?
15:07 colomon moritz: yes, but you have to override the git submodule bits of bootstrap.pl else it will just overwrite with the incorrect version
15:14 moritz or simply commit :-)
15:15 mtk joined #perl6
15:16 moritz testing here now; if it works, I'll push
15:18 colomon moritz++
15:18 dalek panda: 8b6040b | moritz++ | ext/JSON__Tiny:
15:18 dalek panda: Update to newest JSON::Tiny
15:18 dalek panda:
15:18 dalek panda: should fix the bootstrap on perl6-j
15:18 dalek panda: review: https://github.com/tadzik/panda/commit/8b6040b0c5
15:21 hoelzro diakopter++ jnthn++ # talking at FOSDEM
15:21 moritz funny thing is, the last few JSON::Tiny changes that this pulled in weren't even meant as fixes; they were meant as performance optimizations :-)
15:22 moritz one of them by FROGGS++
15:22 colomon well, making it work is quite the performance optimization, no?  ;)
15:27 bjz joined #perl6
15:31 japhb nwc10: re: http://irclog.perlgeek.de/perl6/2014-01-20#i_8144068 -- that's the reason for the crazy starting at https://github.com/TiMBuS/Net--IRC/blob/concurrency/lib/Net/IRC/SocketConnection.pm#L32 through line 57.  I figured the only thing that couldn't be modified, or partially encoded, or what have you, was the input line separator.
15:32 japhb So to get lines out of socket recv'd chunks, it keeps a buffer that it loops doing (append new chunk, decode, split on line separator, if there are any complete lines emit them, then reencode the emitted portion to determine how much of the buffer can be dropped and pull that off the front)
15:33 japhb Messy and does a lot of work I'd love not to do, but I'm not sure of a better solution in Perl 6 space (as opposed to VM space)
15:36 japhb Oh, FWIW, at least on JVM, sockets don't like having their input record separator changed while open.  I wrote the referenced code on the assumption people might try to do that (like changing from CRLF to LF after HTTP headers have been read), but changing the length of the IRS seems to pretty much confuse the heck out of the socket.
15:37 dmol joined #perl6
15:38 japhb timotimo: Your spurt commits seem to still contain a fair amount of debugging output.
15:39 colomon joined #perl6
15:39 ajr joined #perl6
15:42 hangglider joined #perl6
15:51 japhb my $s := Supply.new; $s.tap({ .say }); my $t := on -> $out { $s => { more => sub ($val) { die "oops" }, quit => sub ($error) { say "Caught in on-quit: $error" } } }; $t.tap({ say "More in final tap" }, quit => { say "Quit in final tap" }); start { $s.more("checking ..."); say "Alive in second thread" }; say "Alive in first thread"; sleep 1; say "sleeping again"; sleep 5
15:51 japhb j: my $s := Supply.new; $s.tap({ .say }); my $t := on -> $out { $s => { more => sub ($val) { die "oops" }, quit => sub ($error) { say "Caught in on-quit: $error" } } }; $t.tap({ say "More in final tap" }, quit => { say "Quit in final tap" }); start { $s.more("checking ..."); say "Alive in second thread" }; say "Alive in first thread"; sleep 1; say "sleeping again"; sleep 5
15:51 camelia rakudo-jvm aa8810: OUTPUT«(timeout)Alive in first thread␤checking ...␤Quit in final tap␤»
15:51 japhb jnthn: Why does the above ^^ never say "Alive in second thread"?
15:53 japhb It's like after capturing the exception in $t.tap:quit it still doesn't continue with the second thread any more.
15:53 japhb Although I should say that locally, it does say "sleeping again" before exiting.
16:00 jnthn japhb: I'm not immediately sure. The on implementation has a CATCH in the right place...
16:00 jnthn japhb: Can you add a CATCH inside the start and see if it fires?
16:00 jnthn Or throw a try before the "on"
16:00 jnthn uh, sorry
16:00 jnthn Before the $s.more
16:04 Psyche^ joined #perl6
16:04 japhb jnthn: OK, hold on a sec
16:05 japhb j: my $s := Supply.new; $s.tap({ .say }); my $t := on -> $out { $s => { more => sub ($val) { die "oops" }, quit => sub ($error) { say "Caught in on-quit: $error" } } }; $t.tap({ say "More in final tap" }, quit => { say "Quit in final tap" }); start { try $s.more("checking ..."); say "Alive in second thread" }; say "Alive in first thread"; sleep 1; say "sleeping again"; sleep 5
16:05 camelia rakudo-jvm aa8810: OUTPUT«checking ...Alive in first thread␤␤Quit in final tap␤Alive in second thread␤sleeping again␤»
16:05 japhb Huh.
16:06 japhb So the exception is getting all the way back to the $s.more().
16:06 japhb And while you're ruminating on that, I've got another one for the crowd:
16:06 japhb r: sub foo { say(++( state $ )) }; BEGIN foo(); BEGIN foo(); foo(); foo()
16:06 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«1␤2␤1␤2␤»
16:06 jnthn Well, remember that .more is synchronous and pushes stuff throughthe pipeline...
16:06 japhb Why is that 1-2-1-2 instead of 1-2-3-4?
16:07 japhb jnthn: I knew that, I mean, why is the exception not caught by the quit "handler"?
16:07 jnthn japhb: Well, why is it not caught by the CATCH at Supply.pm:130 is what I'm wondering.
16:08 jnthn Can you see what's in $! after the try?
16:09 jnthn It's 1-2-1-2 'cus state is per closure and BEGIN operates on the static code object, while foo is closure-cloned on entry to the scope.
16:09 jnthn (the cope being the program mainline)
16:09 jnthn *scope
16:09 japhb j: my $s := Supply.new; $s.tap({ .say }); my $t := on -> $out { $s => { more => sub ($val) { die "oops" }, quit => sub ($error) { say "Caught in on-quit: $error" } } }; $t.tap({ say "More in final tap" }, quit => { say "Quit in final tap" }); start { try $s.more("checking ..."); say "Caught error: $!" if $!; say "Alive in second thread" }; say "Alive in first thread"; sleep 1; say "sleeping again"; sleep 5
16:09 camelia rakudo-jvm aa8810: OUTPUT«Alive in first thread␤checking ...␤Quit in final tap␤Caught error: oops␤Alive in second thread␤sleeping again␤»
16:10 jnthn If it wasn't that way then sub counter() { return { ++( state $ ) } } wouldn't work.
16:10 jnthn japhb: ooooh...it doesn't work 'cus I fail it
16:11 jnthn japhb: Try applying https://gist.github.com/jnthn/8523025
16:11 masak japhb: 1-2-1-2 has the same cause as my latest blog post.
16:12 jnthn Yeah! It's 1-2-1-2 'cus of masak!
16:12 japhb jnthn: OK, that will take me a bit, but thank you.
16:12 japhb masak: link?
16:12 masak http://strangelyconsistent.org/blog/lexpads-and-why-roles-need-fixups
16:12 masak japhb: it's a minor point in that post, but it's there.
16:14 grondilu joined #perl6
16:14 grondilu r: https://gist.github.com/grondilu/8523064
16:14 camelia rakudo-moar aa8810: OUTPUT«2 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15␤»
16:14 camelia ..rakudo-parrot aa8810, rakudo-jvm aa8810: OUTPUT«2 15 825 725 1925 2275 425 390 330 290 770 910 170 156 132 116 308 364 68 4␤»
16:15 grondilu ^ see http://rosettacode.org/wiki/Fractran
16:15 japhb masak: Why doesn't calling a sub at BEGIN time trigger the fixup?  Because it's runtime from the point of view of foo().
16:26 japhb .oO( Apparently I ask the hard questions ... )
16:27 japhb jnthn: patch applied; building a new r-j
16:29 japhb jnthn: Yep, that fixes it locally.
16:37 dalek nqp: 8157139 | (Tobias Leich)++ | / (2 files):
16:37 dalek nqp: do not increment position for zerowidths
16:37 dalek nqp: review: https://github.com/perl6/nqp/commit/8157139da8
16:39 dalek rakudo/nom: 0e11f5f | (Tobias Leich)++ | tools/build/NQP_REVISION:
16:39 dalek rakudo/nom: bump nqp rev to get unicode fixes
16:39 dalek rakudo/nom:
16:39 dalek rakudo/nom: both S05-mass/properties-block.t and S05-mass/properties-script.t
16:39 dalek rakudo/nom: pass now
16:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0e11f5faca
16:40 jeffreykegler joined #perl6
16:40 FROGGS[mobile] joined #perl6
16:40 grondilu r: say .[^2] given 2, -> \n { first Int, map (* *n).narrow, <3/2>; } ... *;
16:40 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«2 3␤»
16:40 grondilu r: say .[^2] given 2, -> \n { first Int, map (* *n).narrow, <3/2>; } ... Nil;
16:40 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«2␤»
16:41 grondilu r: say 1, 2 ... Nil
16:41 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«1␤»
16:42 grondilu :/
16:42 diakopter FROGGS[mobile]++ FROGGS++ # nice job!
16:44 grondilu r: say 1, { rand < .1 ?? Nil !! '#' }  ... { $_ ~~ Nil }
16:45 grondilu Can't I use Nil as a criterium for ending a sequence?
16:45 grondilu r: say so Nil
16:45 colomon Nil is always false, isn't it?
16:45 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«(timeout)»
16:45 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«False␤»
16:46 grondilu r: say Int, Rat, Num, Bool ... Num
16:47 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«(Int) (Rat) (Num)␤»
16:47 woolfy left #perl6
16:47 grondilu r: say Int, Rat, Num, Nil, Bool,  ... Nil
16:47 camelia rakudo-moar aa8810: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/GrmLvid7f4â�¤Comma found before apparent series operator; please remove comma (or put parensâ�¤    around the ... listop, or use 'fail' instead of ...)â�¤at /tmp/GrmLvid7f4:1â�¤------> [32msay Int,…»
16:47 camelia ..rakudo-jvm aa8810: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2GeP5yVEuhâ�¤Comma found before apparent series operator; please remove comma (or put parensâ�¤    around the ... listop, or use 'fail' instead of ...)â�¤at /tmp/2GeP5yVEuh:1â�¤------> [32msay Int, …»
16:47 camelia ..rakudo-parrot aa8810: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/3sc_shjIbjâ�¤Comma found before apparent series operator; please remove comma (or put parensâ�¤    around the ... listop, or use 'fail' instead of ...)â�¤at /tmp/3sc_shjIbj:1â�¤------> [32msay In…»
16:47 grondilu r: say Int, Rat, Num, Nil, Bool  ... Nil
16:48 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«(Int)␤»
16:48 grondilu colomon: it's always False but not when it's supposed to smartmatch, is it?
16:48 grondilu n: say Int, Rat, Num, Nil, Bool  ... Nil
16:48 camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Need something on the RHS␤  at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3484 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3489 (series-listop @ 18…»
16:48 colomon r: say Nil ~~ Nil
16:48 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«True␤»
16:49 colomon hmmm, guess not
16:49 colomon p: my @a := 1, { rand < .1 ?? Nil !! '#' }  ... { $_ ~~ Nil }; say @a[^10]
16:49 woolfy joined #perl6
16:49 camelia rakudo-parrot aa8810: OUTPUT«1 # # # # # # # # #␤»
16:49 colomon p: my @a := 1, { rand < .1 ?? Nil !! '#' }  ... { $_ ~~ Nil }; say @a[^30]
16:49 camelia rakudo-parrot aa8810: OUTPUT«1 # # # # # # # # # # # # # # # # # # # # # # # # # # # # #␤»
16:50 colomon your problem may be that the Nils are actually disappearing
16:50 grondilu oh
16:50 colomon probably depends on how infix:<…> is implemented
16:50 grondilu r: say my @ =  1, Nil, Nil, 2
16:50 camelia rakudo-jvm aa8810: OUTPUT«(timeout)»
16:50 camelia ..rakudo-parrot aa8810, rakudo-moar aa8810: OUTPUT«1 2␤»
16:51 grondilu r: say .perl given my @ =  1, Nil, Nil, 2
16:51 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«Array.new(1, 2)␤»
16:51 grondilu I see.  Nil is ignored in lists.  Good to know.
16:51 colomon the iterating code block can return any number of values, right?  so would returning Nil be the same as returning no value?
16:51 BenGoldberg Nil is a bit like () in perl5
16:52 grondilu how could I stop a sequence when it reaches Nil, then?
16:52 psch joined #perl6
16:52 BenGoldberg I don't think that you can detect a Nil in list context
16:52 * BenGoldberg could be wrong, of course.
16:52 psch hi #perl6
16:52 BenGoldberg Hello
16:53 colomon grondilu: if BenGoldberg and I are thinking correctly, you can't
16:53 colomon because it cannot ever "reach a Nil"
16:54 benabik Nil isn't a value so much as a lack of one.
16:54 BenGoldberg If you had perl5 code: my @a = map { rand < .5 ? () : $_ } 0..100; how would you detect the () values?
16:55 grondilu r: say 1, { rand < .5 ?? Mu !! '#' }  ... Mu
16:55 camelia rakudo-moar aa8810: OUTPUT«Nominal type check failed for parameter '<anon>'; expected Any but got Mu␤  in sub infix:<===> at src/gen/m-CORE.setting:1739␤  in sub SEQUENCE at src/gen/m-CORE.setting:16095␤  in sub infix:<...> at src/gen/m-CORE.setting:16218␤  in sub infix:<...…»
16:55 camelia ..rakudo-jvm aa8810: OUTPUT«Nominal type check failed for parameter 'null'␤  in sub infix:<===> at gen/jvm/CORE.setting:1739␤  in sub SEQUENCE at gen/jvm/CORE.setting:16098␤  in sub infix:<...> at gen/jvm/CORE.setting:16221␤  in sub infix:<...> at gen/jvm/CORE.setting:16220␤…»
16:55 camelia ..rakudo-parrot aa8810: OUTPUT«Nominal type check failed for parameter ''; expected Any but got Mu instead␤  in sub infix:<===> at gen/parrot/CORE.setting:1743␤  in sub SEQUENCE at gen/parrot/CORE.setting:16365␤  in sub infix:<...> at gen/parrot/CORE.setting:16488␤  in sub inf…»
16:55 grondilu r: say 1, { rand < .5 ?? Num !! '#' }  ... Num
16:55 camelia rakudo-parrot aa8810, rakudo-jvm aa8810, rakudo-moar aa8810: OUTPUT«1 (Num)␤»
16:55 BenGoldberg p: my @a := 1, { rand < .1 ?? Mu !! '#' }  ... { $_ ~~ Mu }; say @a[^30]
16:56 camelia rakudo-parrot aa8810: OUTPUT«1␤»
16:56 BenGoldberg p: my @a := 1, { rand < .01 ?? Mu !! '#' }  ... { $_ ~~ Mu }; say @a[^30]
16:56 camelia rakudo-parrot aa8810: OUTPUT«1␤»
16:56 BenGoldberg p: my @a := 1, { rand < .01 ?? '@' !! '#' }  ... { $_ eq '@' }; say @a[^30]
16:56 camelia rakudo-parrot aa8810: OUTPUT«1 # # # # # # # # # # # # # # # # # # # # # # # # # # # # #␤»
16:57 BenGoldberg p: my $sentinel; my @a := 1, { rand < .01 ?? $sentinel !! '#' }  ... { $_ === $sentinel }; say @a[^30]
16:57 camelia rakudo-parrot aa8810: OUTPUT«1 # # # # # # # (Any)␤»
16:57 Reub joined #perl6
16:57 Reub Hey
16:57 grondilu ok, got it:
16:57 grondilu r: say .[^10] given 2, -> \n { Num R[//] first Int, map (* *n).narrow, <3/2>; } ... Num
16:57 camelia rakudo-parrot aa8810, rakudo-jvm aa8810: OUTPUT«2 3 (Num)␤»
16:57 camelia ..rakudo-moar aa8810: OUTPUT«2 3 3 3 3 3 3 3 3 3␤»
16:58 grondilu or maybe clearer:
16:58 grondilu r: say .[^10] given 2, -> \n { 'STOP' R[//] first Int, map (* *n).narrow, <3/2>; } ... 'STOP'
16:58 camelia rakudo-parrot aa8810, rakudo-jvm aa8810: OUTPUT«2 3 STOP␤»
16:58 camelia ..rakudo-moar aa8810: OUTPUT«2 3 3 3 3 3 3 3 3 3␤»
16:58 grondilu not pretty, but it works
16:59 grondilu I whish I could use Mu here, instead of 'STOP'
16:59 BenGoldberg Odd that moar gets it wrong
16:59 BenGoldberg n: say .[^10] given 2, -> \n { 'STOP' R[//] first Int, map (* *n).narrow, <3/2>; } ... 'STOP'
16:59 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0m��This macro cannot be used as a function at /tmp/PdBqzEk4uB line 1:�------> [32msay .[^10] given 2, -> \n { 'STOP' R[//][33m�[31m first Int, map (* *n).narrow, <3/2>; } [0m��Unhandled exception: Check fai…»
17:00 BenGoldberg Huh
17:00 Reub i know this is the wrong place, but im currently researching server side languages for Apache. Could anyone spare a couple minutes?
17:00 colomon BenGoldberg: that's the R[//] causing trouble, I think
17:01 colomon (in niecza)
17:01 grondilu doubt it
17:01 grondilu oh in niecza, then ye
17:01 grondilu s
17:01 BenGoldberg Reub, You mean like mod_parrot and mod_perl6?
17:06 grondilu r: say .[^10] given 2, -> \n { ~first Int, map (* *n).narrow, <3/2>; } ... ''
17:06 camelia rakudo-moar aa8810: OUTPUT«2 3 3 3 3 3 3 3 3 3␤»
17:06 camelia ..rakudo-parrot aa8810, rakudo-jvm aa8810: OUTPUT«2 3 ␤»
17:08 BenGoldberg m: say (2 * <3/2).narrow.perl
17:08 camelia rakudo-moar aa8810: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zIieHbRcO2â�¤Unable to parse expression in quote words; couldn't find final '>'â�¤        â�¤at /tmp/zIieHbRcO2:1â�¤------> [32msay (2 * <3/2).narrow.perl[33mâ��[31m<EOL>[0mâ�¤    expecting any …»
17:08 BenGoldberg m: say (2 * <3/2>).narrow.perl
17:08 camelia rakudo-moar aa8810: OUTPUT«3␤»
17:08 BenGoldberg m: say Int ~~ (2 * <3/2>).narrow.perl
17:08 camelia rakudo-moar aa8810: OUTPUT«use of uninitialized value of type Int in string context␤False␤»
17:08 BenGoldberg m: say Int ~~ (2 * <3/2>).narrow
17:08 camelia rakudo-moar aa8810: OUTPUT«Invocant requires an instance, but a type object was passed␤  in method Bridge at src/gen/m-CORE.setting:4284␤  in sub infix:<==> at src/gen/m-CORE.setting:4201␤  in sub infix:<==> at src/gen/m-CORE.setting:4041␤  in method ACCEPTS at src/gen/m-COR…»
17:11 kaleem joined #perl6
17:12 grondilu m: (2 * <3/2>).narrow ~~ Int
17:12 camelia rakudo-moar aa8810: ( no output )
17:12 grondilu m: say (2 * <3/2>).narrow ~~ Int
17:12 camelia rakudo-moar aa8810: OUTPUT«True␤»
17:12 moritz m: say (2 * <3/2>).narrow.^name
17:12 camelia rakudo-moar aa8810: OUTPUT«Int␤»
17:13 rjbs joined #perl6
17:14 grondilu m: say grep Int, (1/3, 2/3 ... 10/3)
17:14 camelia rakudo-moar aa8810: OUTPUT«␤»
17:14 grondilu p: say grep Int, (1/3, 2/3 ... 10/3)
17:14 camelia rakudo-parrot aa8810: OUTPUT«␤»
17:14 grondilu p: say grep Int, (1/3, 2/3 ... 10/3)».narrow
17:14 camelia rakudo-parrot aa8810: OUTPUT«1 2 3␤»
17:14 grondilu m: say grep Int, (1/3, 2/3 ... 10/3)».narrow
17:14 camelia rakudo-moar aa8810: OUTPUT«1 2 3␤»
17:14 grondilu r: say first Int, (1/3, 2/3 ... 10/3)».narrow
17:15 camelia rakudo-jvm aa8810: OUTPUT«(timeout)»
17:15 camelia ..rakudo-parrot aa8810, rakudo-moar aa8810: OUTPUT«1␤»
17:15 SamuraiJack joined #perl6
17:23 timotimo japhb: it does? it does! >_<
17:23 denis_boyun joined #perl6
17:24 dalek nqp: baf106c | (Timo Paulssen)++ | src/vm/jvm/runtime/org/perl6/nqp/io/AsyncFileHandle.java:
17:24 dalek nqp: this debug output does not belong here.
17:24 dalek nqp: review: https://github.com/perl6/nqp/commit/baf106c910
17:24 dalek rakudo/nom: 619a35d | (Timo Paulssen)++ | src/vm/jvm/core/IOAsyncFile.pm:
17:24 dalek rakudo/nom: kill more debug output
17:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/619a35d47d
17:28 atta joined #perl6
17:28 Biohazard joined #perl6
17:28 japhb timotimo: heh.
17:33 [Sno] joined #perl6
17:35 dalek rakudo/nom: 7e829df | (Geoffrey Broadwell)++ | src/vm/jvm/core/Supply.pm:
17:35 dalek rakudo/nom: Pushing patch by jnthn++ to fix error handling in on()
17:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7e829dfb2f
17:35 dalek rakudo/nom: 972ac86 | (Geoffrey Broadwell)++ | / (2 files):
17:35 dalek rakudo/nom: Merge branch 'nom' of https://github.com/rakudo/rakudo into nom
17:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/972ac866a5
17:35 japhb jnthn: I pushed the patch so it wouldn't be lost.
17:35 japhb Gah, I hate accidental merge commits.
17:35 timotimo colomon, grondilu: Nil isn't supposed to disappear in list context any more, we now have () to fill that role, but it's NYI :(
17:36 jnthn japhb: ah, thanks...I was gonna get to it after $dayjob tasks, but now I just need to write a test. :)
17:36 jnthn japhb: Or you could always do that also ;)
17:37 japhb jnthn: May or may not get a chance -- herding cats today.  :-)
17:37 grondilu timotimo: ok, good to know.
17:38 grondilu (the code for fractran will be much more elegant when Nil won't disappear in list context)
17:39 grondilu s/won't/doesn't/
17:39 djanatyn joined #perl6
17:39 ajr joined #perl6
17:40 timotimo grondilu: unfortunately, that may take a while; people are waiting for the list synopsis overhaul before trying to fix that
17:41 timotimo r: say (28479 * 0.99) - 28079
17:41 grondilu no problem, there's no rush
17:41 camelia rakudo-jvm aa8810: OUTPUT«(timeout)»
17:41 camelia ..rakudo-parrot aa8810, rakudo-moar aa8810: OUTPUT«115.21␤»
17:41 japhb Does anyone object to me fixing the default socket.recv size (and changing the default to 64K to contain a max-size IP datagram)?
17:42 timotimo that's how many tests are to go before moar reachen 99% of jvm
17:42 timotimo japhb: that would be good
17:42 timotimo and froggs said the latest unicode fix would give us about 50
17:43 japhb Excellent.
17:44 TimToady japhb: does it trim it back down to the actual size after?  Or does that waste 64k per datagram?
17:44 timotimo i don't think it will
17:44 timotimo er, i mean, i don't think it will waste the space
17:44 timotimo AFK
17:45 japhb TimToady: I'm looking at the nqp source now
17:49 TimToady seems like, if you have sole control of a nursery, you could say "reserve me this much, but be ready to reclaim some of it because I'll know almost immediately how much I really want"
17:49 TimToady alternately, you could split an allocation in gen2
17:51 TimToady or maybe you just don't worry about it because of nursery copying
17:51 TimToady that seems likeliest to me, so nevermind :)
17:51 japhb TimToady: In the JVM implementation, it reads into a full-length buffer, then copies into a correctly-sized byte array, and lets the full-length buffer go out of scope.
17:52 TimToady just thinking about ways to save a copy on IO
17:53 TimToady especially if we're also going to do NFG processing anyway, and toss the buffer
17:54 jnthn We could do with APIs that push the NFG stuff off into async land too, if you're already doing async...
17:54 japhb Yeah, I think we'll need to do a lot of optimization of the IO pathways at some point soon.  I'm having to do some less-than-ideal things for a server (like breaking proper log rotation) in order to get decent performance.
17:55 japhb Still, I'm looking at it as "(optimization) target-rich environment".  :-)
17:56 TimToady on the NFG grapheme wraparound issue, we have to handle that anyway for any kind of concatenation
17:56 TimToady so a Cat string might need to do a lookahead to be correct
17:57 TimToady I don't think a Cat needs to be strictly lazy
17:58 TimToady and reading from a text filehandle is essentially Cat semantics
17:58 TimToady might need to make exceptions for newlines and such
17:59 jnap joined #perl6
17:59 * bibifuc_ thinks Cats are lazy pets
17:59 TimToady we might usefully assume that nobody is going to put a combiner after a newline
18:00 jnap joined #perl6
18:01 atta joined #perl6
18:01 japhb TimToady: TBH, I'm hoping that newlines act as sequence points of a sort within any reasonable text input.  Because if that's not a sequence point we can count on, I'm not sure what is.  :-/
18:01 TimToady p: say "\xa\x308";
18:01 camelia rakudo-parrot 0e11f5: OUTPUT«␤̈␤»
18:01 TimToady heh
18:02 japhb Wat
18:02 TimToady as far as I know, it's legal in Unicode, which is why I said "assume" :)
18:02 japhb DIHWIDT?
18:03 TimToady Doctor, why are you pointing that gun at me?
18:04 TimToady A: I took the hypocritic oath.
18:05 japhb breakfast &
18:06 timotimo we need to make sure, though, that crafted input can't kill every single program written in perl6 ever
18:08 TimToady presumably the worst would be that, assuming newline is autochomped, you'd end up with a string with a combiner on the front, which if concatenated to something else would misplace the mark
18:08 TimToady I don't see how that would kill the program
18:08 timotimo who knows! :)
18:09 TimToady we should find someone paranoid to write the tests
18:10 diakopter or a test generator
18:11 timotimo fuzz the crap outta that :3
18:12 TimToady someone paranoid should write the fuzzer :)
18:12 lue How come I've never heard of this Cat type?
18:12 zby_home_ joined #perl6
18:13 jnthn Those who spent a few moments pondering how it might interact with the regex engine fear to speak of it :P
18:13 diakopter in a non-angelic language anyway
18:14 TimToady well, it's only mentioned in four spec files
18:16 timotimo TimToady: are we going to get a spec for streaming matches? :3
18:17 TimToady Oddly, it's not mentioned in S15...  :)
18:17 TimToady timotimo: well, that's kinda what Cat is supposed to be for...
18:17 timotimo mhm
18:17 jnthn Cat is one of the things I really, really want to be a 6.1 thing.
18:17 lue Well, from what I can tell it's an array that acts kinda like hash keys, rather than a type of string...
18:18 timotimo what does the result of such a match look like?
18:18 timotimo i would like semantics like the reifying of a list with an iterator
18:18 timotimo if the match hits eos and the user didn't set the "eos is actually the eos" bit, it would bop out using continuations
18:19 timotimo and the object would perhaps contain info on where exactly the matching currently is and access to the partial match object tree
18:19 FROGGS joined #perl6
18:19 TimToady that's what a Cat with a plan is supposed to allow, lazy string generation, as long as you don't ask for the length of the string
18:21 TimToady lue: has nothing to do with hash keys
18:21 lue TimToady: I know, it just reminds me of the auto-stringing that happens by default in things like    A => 1
18:21 TimToady has nothing to do with that either, that I can see...
18:22 timotimo "a cat with a plan" %)
18:22 lue "... a Cat object. In string context this coerces each of its elements to strings lazily, ..."  from S03
18:22 timotimo commit and cut are not implemented, aye?
18:23 TimToady your typical Cat will consist of pre-existing strings in a lazy array
18:23 lue (I was trying to think of something else in Perl 6 that did the "coerce all its elements" thing, and string hash keys came to mind)
18:24 TimToady timotimo: cut is not, but I think commit is, at least on niecza
18:25 lue TimToady: could Cat become a role, allowing for example Cat[Uni], Cat[NFD], etc. ?
18:28 timotimo do we have a mechanism on moar to allow for the beginning of a string to be cut off and garbage collected somehow?
18:28 timotimo i suppose one could move the begin pointer and on the next nursery copy discard the rest?
18:28 timotimo not so sure about gen2 space
18:28 TimToady timotimo: if it's in an array, you can shift it
18:28 TimToady that's one of the nice things about Cat
18:29 timotimo good point
18:29 timotimo AFK
18:30 jnthn Any time you propose a language solution that involves monkeying with the GC, you're doing it wrong.
18:31 jnthn For one 'cus we can't go fiddling with the JVM's one...
18:31 jnthn For two 'cus special cases in GCs are really not desirable.
18:33 japhb "This is perl6 version 2013.12-330-g972ac86 built on MoarVM version 2013.10-401-gf959b0a"  Hee-hee, I just can't get over how nice that is to see.  :-)
18:35 colomon +1
18:35 TimToady jnthn: you'll note I nevermindeded that :)
18:36 jnthn TimToady: Yes, I was thinking of the timotimo++ suggestion as much as your neverminded one :)
18:37 btyler japhb: that message is precisely why I spent a few hours mucking with linker flags on osx :)
18:37 btyler saw it in my linux vm, which was just tantalizing enough to want to make it work
18:38 ajr joined #perl6
18:38 xfix I'm trying to solve http://codegolf.stackexchange.com/questions/18925/hello-world-with-no-repetition
18:38 xfix I'm currently on say(<H>~q:b{eL\x6CO woRld!}.lc)
18:38 xfix The problem is that "l" is used twice...
18:38 xfix Any suggestions to remove identical characters from code somehow?
18:39 xfix I cannot use double quotes or qq. q:c duplicates with lc.
18:40 jnthn xfix: Can you come up with two strings that have no dupes and string bitwise to hello world? :)
18:40 xfix qb:c could work...
18:40 xfix (why I didn't think of it)
18:40 xfix jnthn, ASCII only, but interesting idea.
18:40 xfix (I think it even could work with ASCII only)
18:41 grondilu can't you get rid of the parenthesis?
18:41 grondilu r: say <H>~q:b{eL\x6CO woRld!}.lc
18:41 grondilu oh no, two spaces
18:41 xfix Now I have space inside "eL\x6CO woRld!"
18:41 camelia rakudo-jvm 0e11f5: OUTPUT«(timeout)»
18:41 camelia ..rakudo-parrot 0e11f5, rakudo-moar 0e11f5: OUTPUT«Hello world!␤»
18:41 moritz .say
18:42 moritz gets you rid of the space after say
18:42 moritz oh, but then you need parens for grouping
18:42 xfix This is an interesting puzzle, to be honest.
18:42 xfix I'm close, but not quite.
18:42 grondilu kind of insane though
18:42 xfix People make solutions in Befunge, because nothing else works, lol.
18:43 grondilu r: say(<H>~q:b{eL\x6CO woR1d!}.lc)   # almost :-)
18:43 camelia rakudo-parrot 0e11f5, rakudo-jvm 0e11f5, rakudo-moar 0e11f5: OUTPUT«Hello wor1d!␤»
18:43 xfix heh, no
18:44 Pleiades` joined #perl6
18:44 lue r: say(<H>~q:b{eL\x6CO woR1d!}.tc)
18:44 camelia rakudo-parrot 0e11f5, rakudo-jvm 0e11f5, rakudo-moar 0e11f5: OUTPUT«HELlO woR1d!␤»
18:44 lue r: say(<H>~q:b{eL\x6CO woRld!}.tc)
18:45 camelia rakudo-parrot 0e11f5, rakudo-jvm 0e11f5, rakudo-moar 0e11f5: OUTPUT«HELlO woRld!␤»
18:45 xfix I would need tclc.
18:45 xfix Except this requires two "c".
18:46 xfix Besides, I don't think that <H>~ is an issue, unless it uses any of needed characters (but I doubt that)
18:47 xfix (in <> blocks you cannot use backslashes, so it's almost useless)
18:47 xfix <<>> would work, but ASCII only.
18:48 FROGGS it is ascii, no?
18:48 FROGGS r: say '»'.ord
18:48 camelia rakudo-parrot 0e11f5, rakudo-jvm 0e11f5, rakudo-moar 0e11f5: OUTPUT«187␤»
18:48 FROGGS ohh
18:48 FROGGS :/
18:48 xfix Yes, but duplicates. And «» is not ASCII.
18:48 xfix I know, I'm trying to do completely crazy stuff in Perl 6, but this is fun.
18:49 jnap joined #perl6
18:49 colomon hmmm, ABC compile broken in JVM.  (works in rakudo.)
18:49 FROGGS it is yes :o)
18:49 jnap joined #perl6
18:50 grondilu .oO(  say first { try { EVAL $_ } eq 'Hello world!' }, @lazy-list-of-all-asciistring-with-no-char-repetition )
18:50 xfix say(<H>~qb:c[eL\x6CO woR{chr 108}d!].lc)
18:51 xfix Here I have issue with a space.
18:51 grondilu 108.chr
18:51 grondilu ?
18:51 grondilu oh no, .
18:51 xfix Then again, if I replace second space with tab...
18:51 xfix Somewhat of rule abuse, but...
18:51 Util p: my $a = (1,2,3,2,2,2,2).BagHash; say $a.perl;
18:51 camelia rakudo-parrot 972ac8: OUTPUT«(1=>1,2=>5,3=>1).BagHash␤»
18:51 lue xfix: how is that rule abuse? Different characters after all. :)
18:52 xfix :)
18:52 Rotwang joined #perl6
18:52 timotimo jnthn: i wasn't thinking of adding a feature to the gc that does it, merely of a way of implementing it so that it happens automatically
18:52 grondilu the second space with tab is fine.
18:52 xfix Argh, chr has "c".
18:52 grondilu no rule abuse indeed.
18:53 Util p: my $a = (1,2,3,2,2,2,2).BagHash; say [$a.kv].perl;
18:53 xfix And there is ":c".
18:53 camelia rakudo-parrot 972ac8: OUTPUT«[1, 1, 2, 5, 3, 1]␤»
18:53 spider-mario joined #perl6
18:53 xfix :s, perhaps.
18:54 xfix Except $() requires parens which cost.
18:54 xfix Time to use a new line?
18:55 xfix Except "chr" and "lc" cannot coexist.
18:55 xfix 'say'\n'<H>~qb:s[eL\x6CO woR$(chr'\t'108)d!].lc'
18:55 xfix Not quite, but close.
18:56 xfix Any way to possibly avoid chr here?
18:56 FROGGS \c108... but.. the c and the backslash again
18:57 xfix Backslash is an issue.
18:57 xfix I have just one.
18:58 FROGGS r: printf "%L2s", o
18:58 xfix (then again, I like how I use space, new line, and tab)
18:58 grondilu is extended ASCII allowed?
18:58 FROGGS r: printf "%L2s", "o"
18:58 xfix grondilu, no
18:58 camelia rakudo-jvm 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Kjz19lk84yâ�¤Undeclared routine:â�¤    o used at line 1â�¤â�¤Â»
18:58 camelia ..rakudo-moar 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/3AxzjhhQaKâ�¤Undeclared routine:â�¤    o used at line 1â�¤â�¤Â»
18:58 camelia ..rakudo-parrot 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/P5y6jXVVSmâ�¤Undeclared routine:â�¤    o used at line 1â�¤â�¤Â»
18:58 grondilu so 0..128?
18:58 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«'L2s' is not valid in sprintf format sequence '%L2s'␤␤»
18:58 xfix printf...
18:59 grondilu r: say "there are only {[*] 2..127} possibilities"
18:59 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«there are only 30126600184576595448099770775270596923241649186736217990533469005966672076184808090678606920977137619846097799457727839655638510333007723262977730878518699825002706617912441225976217600000000000000000…»
18:59 xfix Or pred, perhaps...
19:00 timotimo iterate through all possibilities and find the one that matches some checksum? :P
19:00 lue grondilu: I don't think that number takes into account strings with less than all ASCII characters. :)
19:00 timotimo that's fantastic
19:00 grondilu or maybe a genetic algorithm.  You'd start from 'say "Hello word!"' and you make it evalove.
19:01 grondilu *evolve
19:01 timotimo :D
19:01 xfix r: say <H>~lc qb:s{eL\x6CO woR$(Q[m].pred)d!}
19:01 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«Hello world!␤»
19:01 raiph joined #perl6
19:01 timotimo wow, <H>~lc looks funny
19:01 jnthn Repeats e
19:01 jnthn And d
19:01 Ayiko and space?
19:01 timotimo twice is allowed
19:02 timotimo (i thought?)
19:02 jnthn Oh...
19:02 jnthn I thought not
19:02 grondilu you guys realize there might be no solution at all, right?
19:02 FROGGS grondilu: gah!
19:02 Ayiko that would be unfortunate
19:02 timotimo wow
19:02 timotimo "should not use any character more than once (including whitespace)"
19:02 BenGoldberg Both strings have to be ascii, due to the rules; if you xor two ascii strings, the results will definitely not be ascii :P  However, if you or two ascii strings, the result will be ascii
19:03 FROGGS try that in PHP, lol!
19:03 xfix Argh, say.
19:03 xfix And :s don't like themselves
19:03 FROGGS xfix: we can fix rakudo if we need to :o)
19:03 xfix say <H>~lc qb:s{eL\x6CO woR$(Q[m].pred)d!}
19:03 * grondilu thinks it's not healthy to try too hard to solve a problem when we're not even sure a solution exists.
19:03 xfix FROGGS, no, thanks.
19:05 * colomon wonders if adding a few  moreoperators to p6 might help.  ;)
19:05 lue r: say "You can do it, there are {[+] ([*] $_..127 for ^128)} possible strings."
19:05 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«You can do it, there are 8189258983498547755301136726331018182795341082989472417800294638981943850974416517674504393522298820068493412557445147820427301212765815466137359501584796845232882984212354973723008236769314…»
19:05 xfix I also tried :a, but "say" also contains "a"...
19:05 grondilu lue: I'm not sure about your counting
19:06 xfix say <H>~lc qb:a{EL\x6CO woR@(Q[m].pred)[]D!}
19:06 lue r: say [+] ([*] $_..3 for ^4)
19:06 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«15␤»
19:06 xfix I'm so close, yet so far.
19:06 lue That's the right number for three characters to play with.
19:07 * grondilu is confused
19:07 lue I confirmed one data point, therefore the formula is right :P
19:07 lue r: say <A B C AB AC BA BC CA CB ABC ACB BAC BCA CAB CBA>.elems
19:08 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«15␤»
19:08 grondilu oh
19:08 * grondilu got it
19:08 xfix :h is not fine, because hashes have to have pairs.
19:10 lue r: say ([+] ([*] $_..$OUTER::_ for ^($_+1))) for ^10; # probably some superstitious parens here, but *
19:10 camelia rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«use of uninitialized value of type Nil in numeric context␤0␤use of uninitialized value of type Nil in numeric context␤use of uninitialized value of type Nil in numeric context␤1␤use of uninitialized value of type Nil in numeric…»
19:10 camelia ..rakudo-parrot 972ac8: OUTPUT«0␤1␤4␤15␤64␤325␤1956␤13699␤109600␤986409␤»
19:12 molaf joined #perl6
19:13 * TimToady is not sure that should work without brackets
19:13 timotimo xfix++ # carrying perl6 to its syntactical limits
19:13 FROGGS xfix: say <H>~lc qb:s{EL\x6CO woR$(Q[m].pred)D!} # you need a newline at the end right?
19:14 xfix FROGGS, yes
19:14 xfix (not that "print" would help me)
19:14 lue Number of possible strings for n characters is  A007526(n)  http://oeis.org/A007526
19:15 berekuk joined #perl6
19:15 TimToady a statement in parens is not really supposed to introduce a new lexical scope
19:16 LLamaRider joined #perl6
19:16 TimToady so OUTER should be bogus there
19:16 Ayiko FixedPMCArray: Can't resize! <- that's a fancy way of saying out of memory?
19:16 lue TimToady: it's the for loops I believe
19:16 japhb r: my $try = 'say <H>~lc qb:s{EL\x6CO woR$(Q[m].pred)D!}'; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep: *.value > 1;
19:16 benabik Ayiko: That's a fancy way to say that the array is being used wrong.
19:16 camelia rakudo-parrot 972ac8, rakudo-moar 972ac8: OUTPUT«"s" => 2␤" " => 3␤»
19:16 camelia ..rakudo-jvm 972ac8: OUTPUT«" " => 3␤"s" => 2␤»
19:16 TimToady the for loops should be temporizing $_ rather than making a new scope
19:16 grondilu two s
19:16 jnthn TimToady: At this point we make no real attempt to distinguish significant scopes...
19:17 japhb r: my $try = 'say <H>~lc qb:s{EL\x6CO woR$(Q[m].pred)D!}'; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep(*.value > 1).sort(-*.value);
19:17 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«" " => 3␤"s" => 2␤»
19:17 lue TimToady: How would I access both $_ in that case? $CALLER::_ ? $SOMEOTHERSCOPETHATSNOTCOMINGTOMIND::_ ?
19:17 jnthn TimToady: Since for is actually map, the thing is thunked
19:17 grondilu ok, who wants to bet there is no actuall solution?
19:17 jnthn TimToady: You'll see the same happen with the thunking xx does.
19:18 TimToady but a thunk is supposed to parisitize it's scope
19:18 jnthn TimToady: I guess we will need to distinguish VM view vs OUTER/CALLER view at some point.
19:18 TimToady not generate a new scope
19:18 jnap joined #perl6
19:18 jeffreykegler left #perl6
19:18 TimToady I don't know how many people I've promised over the years that P6's scoping rules were much simpler than P5's...
19:19 TimToady this breaks that promise...
19:19 jnthn You're confusing the compiler's view with the runtime view.
19:19 TimToady OUTER should not work there
19:19 jnthn A thunk is obviously a different thingy from the runtime's perspctive
19:19 TimToady OUTER has nothing to do with runtime
19:20 jnthn At the moment it decidedly does.
19:20 TimToady (in the definitional sense)
19:20 jnthn Right, but at the moment OUTER is simply done in terms of "whatever call frames the underlying VM is aware of"
19:20 jnthn Which won't hold up in the long run.
19:21 jnthn But is a decent approximation most of the time.
19:21 jnthn I agree with thunks it's a bad one.
19:21 * lue likes using $OUTER::_ though...
19:21 jnthn And that this should be invisible to OUTER here.
19:22 TimToady if you want an outer, there's the brace form of nesting for modifiers
19:22 jnap joined #perl6
19:23 TimToady but in general, by the time you start nesting loops, you should really be putting the loops as normal statements
19:23 TimToady or using real maps
19:24 jnthn OK, enough $dayjob...time for dinner, then some Perl 6 stuff...
19:24 colomon \o/
19:27 * colomon is kind of awed at all the progress rakudo has made so far this year.
19:31 xfix <japhb> r: my $try = 'say <H>~lc qb:s{EL\x6CO woR$(Q[m].pred)D!}'; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep: *.value > 1;
19:31 xfix thanks
19:31 xfix (also, back)
19:31 xfix I already made a script to do so in Perl 5, but thanks. The spaces are fine, as I replace them in final script with tab and newline.
19:32 xfix r: say <H>~lc qb:s{EL\x6CO woR$(Q[m].pred)D!}
19:32 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«Hello world!␤»
19:32 xfix The problem is say and :s.
19:32 xfix :a won't work too.
19:33 xfix (because of say)
19:33 xfix :c won't work because of lc.
19:33 xfix As for other adverbs, they seem useless in this case.
19:36 xfix :qq would be great, but it's... double!
19:36 * hugme hugs xfix, good vi(m) user!
19:36 xfix lolvim
19:36 xfix (I don't even use vim)
19:38 xfix r: my $try = ''print <H>~lc Qb:c[EL\x6CO woR{Q[m].pred}D!]'; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep(*.value > 1).sort(-*.value);
19:38 camelia rakudo-moar 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/16AgqXaJ8mâ�¤Two terms in a rowâ�¤at /tmp/16AgqXaJ8m:1â�¤------> [32mmy $try = ''[33mâ��[31mprint <H>~lc Qb:c[EL\x6CO woR{Q[m].pred}[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix …»
19:38 camelia ..rakudo-jvm 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/8mjPwJe8iXâ�¤Two terms in a rowâ�¤at /tmp/8mjPwJe8iX:1â�¤------> [32mmy $try = ''[33mâ��[31mprint <H>~lc Qb:c[EL\x6CO woR{Q[m].pred}[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix s…»
19:38 camelia ..rakudo-parrot 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Dujughpqbiâ�¤Two terms in a rowâ�¤at /tmp/Dujughpqbi:1â�¤------> [32mmy $try = ''[33mâ��[31mprint <H>~lc Qb:c[EL\x6CO woR{Q[m].pred}[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infi…»
19:38 xfix r: my $try = 'print <H>~lc Qb:c[EL\x6CO woR{Q[m].pred}D!]'; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep(*.value > 1).sort(-*.value);
19:38 camelia rakudo-jvm 972ac8: OUTPUT«" " => 3␤"Q" => 2␤"[" => 2␤"]" => 2␤"c" => 2␤"r" => 2␤"p" => 2␤»
19:38 camelia ..rakudo-parrot 972ac8, rakudo-moar 972ac8: OUTPUT«" " => 3␤"p" => 2␤"r" => 2␤"c" => 2␤"Q" => 2␤"[" => 2␤"]" => 2␤»
19:39 xfix pred annoys with print.
19:39 xfix And succ has two 'c'.
19:40 xfix But what about printf...
19:41 xfix .u l
19:41 yoleaux U+006C LATIN SMALL LETTER L [Ll] (l)
19:42 xfix lc, and %c... I cannot use %c then
19:42 xfix This is almost useless then.
19:44 Mouq joined #perl6
19:44 xfix %C works. Great.
19:45 xfix (this may be a bug, but whatever)
19:45 * TimToady wonders if it helps that EVAL is now spelled uppercase...
19:46 xfix r: my $try = 'printf <H>~qb[EL\c108O woR%CD!].lc,222'; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep(*.value > 1).sort(-*.value);
19:46 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«"2" => 3␤" " => 2␤"c" => 2␤»
19:46 xfix (just to check if I'm on right track)
19:47 xfix sorta
19:47 xfix .u L
19:47 yoleaux U+004C LATIN CAPITAL LETTER L [Lu] (L)
19:48 xfix r: my $try = 'printf <H>~qb[EL\x4CO woR%CD!].lc,108'; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep(*.value > 1).sort(-*.value);
19:48 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«" " => 2␤"C" => 2␤»
19:48 xfix asdf
19:50 moritz jklö
19:51 xfix Something like \l from Perl 5 would be nice...
19:52 sojuzupak joined #perl6
19:54 TimToady that's spelled {lc ...} in Perl 6
19:54 psch what about \o instead of \x
19:54 psch oh nvm
19:54 psch there's an o of course
19:54 psch although, maybe you can still shuffle it around, do the second l with \o, do the o with \x
19:55 grondilu xfix: check this out: https://gist.github.com/grondilu/8527805
19:55 grondilu inspired from http://rosettacode.org/wiki/Evolutionary_algorithm#Perl_6
19:55 leninist joined #perl6
19:55 Ayiko psch: 2 times backslash :)
19:55 xfix r: my $try = 'printf Q{H}~qb[EL\o154O woR%CD!].lc,:29<3l>'; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep(*.value > 1).sort(-*.value);
19:55 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«" " => 2␤"o" => 2␤"l" => 2␤»
19:56 psch Ayiko: right... i knew why i kept quiet all the time up to now :)
19:56 xfix Different base is needed, but close.
19:56 xfix I'm out of bases...
20:00 preflex_ joined #perl6
20:00 xfix But what if I do math...
20:00 xfix Nope, not an option
20:00 xfix \o, \x, \c require characters I need.
20:00 xfix (well, \x needs for number itself)
20:01 xfix 0x4C or 0x6C.
20:01 berekuk joined #perl6
20:01 TimToady .chrs can make multiple characters
20:01 psch r: say \x$(4B+1)
20:01 camelia rakudo-moar 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/H2AGF6JgvCâ�¤Two terms in a rowâ�¤at /tmp/H2AGF6JgvC:1â�¤------> [32msay \x[33mâ��[31m$(4B+1)[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix stopperâ�¤     …»
20:01 camelia ..rakudo-jvm 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/s6MGTdDvEkâ�¤Two terms in a rowâ�¤at /tmp/s6MGTdDvEk:1â�¤------> [32msay \x[33mâ��[31m$(4B+1)[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix stopperâ�¤      â€¦Â»
20:01 camelia ..rakudo-parrot 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/AHMmj5TrW3â�¤Two terms in a rowâ�¤at /tmp/AHMmj5TrW3:1â�¤------> [32msay \x[33mâ��[31m$(4B+1)[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix stopperâ�¤   …»
20:02 xfix .u l
20:02 yoleaux U+006C LATIN SMALL LETTER L [Ll] (l)
20:02 xfix .r say 0x6C
20:02 FROGGS p: say 0x6C
20:02 camelia rakudo-parrot 972ac8: OUTPUT«108␤»
20:03 xfix .u o
20:03 yoleaux U+006F LATIN SMALL LETTER O [Ll] (o)
20:03 xfix .r say 0x6F
20:03 FROGGS p: say 0x6F
20:03 camelia rakudo-parrot 972ac8: OUTPUT«111␤»
20:03 FROGGS :o)
20:03 xfix I fail
20:03 FROGGS take a break?
20:03 xfix r: say 111
20:03 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«111␤»
20:04 xfix <TimToady> .chrs can make multiple characters
20:04 xfix I'm experimenting
20:05 xfix r: say qc[He{chrs <0x6C 108>,111} world!]
20:05 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«Hello world!␤»
20:05 xfix Something like this could work, if I would deal with 111 somehow.
20:05 xfix (or 0x6C)
20:05 moritz r: say 111.base(8)
20:05 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«157␤»
20:05 FROGGS good thinking
20:05 moritz r: say 111.base(7)
20:05 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«216␤»
20:06 moritz :7(216)
20:06 xfix r: say 111.base(21)
20:06 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«56␤»
20:06 xfix r: say 111.base(23)
20:06 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«4J␤»
20:06 moritz :23<4J>
20:06 FROGGS chrs + print|say does not mix very well
20:06 moritz and use «...» for the quotes
20:06 FROGGS only ascii
20:06 xfix Oh, right.
20:07 moritz dammit
20:07 xfix chrs has "s".
20:07 xfix I haven't noticed.
20:07 FROGGS and r
20:07 xfix "r" is an in issue in my current code.
20:07 xfix Oh wait, it is.
20:08 moritz did you discard the string xor approach?
20:09 xfix I didn't.
20:09 xfix Perhaps this could work
20:09 xfix .u h
20:09 yoleaux U+0068 LATIN SMALL LETTER H [Ll] (h)
20:10 xfix 0x48
20:11 djanatyn joined #perl6
20:14 zakharyas joined #perl6
20:15 bjz_ joined #perl6
20:18 xfix r: my $try = ''say Q[@A`dO world!]~|q{HeLhg}''; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep(*.value > 1).sort(-*.value);
20:18 camelia rakudo-moar 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/AKih8kxW7Câ�¤Two terms in a rowâ�¤at /tmp/AKih8kxW7C:1â�¤------> [32mmy $try = ''[33mâ��[31msay Q[@A`dO world!]~|q{HeLhg}''; my $bh [0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix …»
20:18 camelia ..rakudo-parrot 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ABxHl5YTZYâ�¤Two terms in a rowâ�¤at /tmp/ABxHl5YTZY:1â�¤------> [32mmy $try = ''[33mâ��[31msay Q[@A`dO world!]~|q{HeLhg}''; my $bh [0mâ�¤    expecting any of:â�¤        postfixâ�¤        infi…»
20:18 camelia ..rakudo-jvm 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/25pIDWrxesâ�¤Two terms in a rowâ�¤at /tmp/25pIDWrxes:1â�¤------> [32mmy $try = ''[33mâ��[31msay Q[@A`dO world!]~|q{HeLhg}''; my $bh [0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix s…»
20:18 xfix r: my $try = 'say Q[@A`dO world!]~|q{HeLhg}'; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep(*.value > 1).sort(-*.value);
20:18 camelia rakudo-jvm 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UT9d4AIhu2â�¤Bogus statementâ�¤at /tmp/UT9d4AIhu2:1â�¤------> [32m.pairs.grep(*.value > 1).sort(-*.value);[33mâ��[31m[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        prefix or te…»
20:18 camelia ..rakudo-moar 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/h6MsMh8COzâ�¤Bogus statementâ�¤at /tmp/h6MsMh8COz:1â�¤------> [32m.pairs.grep(*.value > 1).sort(-*.value);[33mâ��[31m[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        prefix or t…»
20:18 camelia ..rakudo-parrot 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/PFh3mQZLUsâ�¤Bogus statementâ�¤at /tmp/PFh3mQZLUs:1â�¤------> [32m.pairs.grep(*.value > 1).sort(-*.value);[33mâ��[31m[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        prefix or…»
20:19 xfix r: say Q[@A`DO world!]~|q{HeLhg}
20:19 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«Hello world!␤»
20:20 xfix rp: my $try = 'say Q[@A`DO world!]~|q{HeLhg}'; my $bh = $try.comb.BagHash; .say for $bh.pairs.grep(*.value > 1).sort(-*.value);
20:20 camelia rakudo-parrot 972ac8: OUTPUT«" " => 2␤»
20:20 xfix YES!
20:20 xfix YES!!!!
20:20 psch xfix++ # no-repeat hello world
20:21 psch it does look like line noise though... :)
20:21 * BenGoldberg congradulates xfix
20:21 xfix There is one repeat, but that one can be fixed by replacing " " with line break.
20:22 arnsholt jnthn: When doing run-time class generation on JVM, did you ever run into a problem where the JVM threw an exception when you tried to _instantiate_ a class?
20:22 BenGoldberg tybalt89 on #perl came up with print+q(*TY_[A@]Dld!)^b1534a726,$/
20:23 BenGoldberg By instantiate, you mean the eqivilant of new ClassThatWasJustGenerated() ?
20:23 arnsholt Pretty much
20:23 arnsholt classObject.newInstance()
20:24 BenGoldberg same difference.... but anyway, I personally haven't
20:24 arnsholt It says "java.lang.NoClassDefFoundError: __CStruct_2 (wrong name: __CStruct_4)"
20:24 arnsholt Googling the error message doesn't turn up any useful hits right away
20:27 grondilu xfix++ for persverance
20:28 * grondilu genuinely think it was impossible
20:28 grondilu *thought
20:29 xfix http://codegolf.stackexchange.com/a/18961/3103
20:29 xfix Submitted!
20:29 FROGGS xfix++
20:30 kaare__ joined #perl6
20:35 timotimo i need more reputation to upvote you
20:35 timotimo better start building some cool golfs myself
20:36 xfix timotimo, make practically anything acceptable, and I'm sure that advanced users will notice you in review panel, in "first posts" section.
20:36 xfix It's easy to get first reputation on codegolf.se.
20:37 xfix To upvote, you need 15 points, which would be 2 upvotes.
20:37 timotimo oke :)
20:37 timotimo i thought it'd be about 15 upvotes
20:37 xfix Nope.
20:37 timotimo fair enough
20:37 xfix One upvote for answer is 10 points.
20:37 xfix You start with 1 point.
20:38 moritz xfix++
20:39 dalek roast: a7aecc1 | (Tobias Leich)++ | S05-mass/properties-derived.t:
20:39 dalek roast: use a char that actually is a <:GraphemeLink>
20:39 dalek roast: review: https://github.com/perl6/roast/commit/a7aecc1273
20:39 xfix And well, I upvote anything I think I couldn't golf further, so I don't think it's hard to get upvote from me :-).
20:40 xfix (also, I already got 2 upvotes :-))
20:41 FROGGS .u 8AB0
20:41 yoleaux No characters found
20:41 FROGGS .u U+8AB0
20:41 yoleaux No characters found
20:41 FROGGS .u 誰
20:41 yoleaux No characters found
20:41 FROGGS gah
20:44 jnthn arnsholt: No, don't recall that. But it looks like you tried to class load it with one name and gave the class file another one...
20:46 xfix I shortened my program by ONE character.
20:46 xfix http://codegolf.stackexchange.com/a/18961/3103
20:46 xfix (not that it matters or anything)
20:51 moritz ah, with <>
20:53 xfix Also, Perl 6 is a huge language, so I was sure this task was possible.
20:53 xfix Somehow.
20:53 colomon xfix++
20:54 xfix I'm not sure why I even like that. C++ is completely awful in my opinion.
20:54 xfix But perhaps it's because Perl 6 is consistent.
20:55 Ayiko xfix, why not use tab instead of newline? makes it easier to cp in REPL
20:55 xfix That's because codegolf.se doesn't support tabs, so I would have to mention this in instructions.
20:55 xfix This makes it easier to copy paste in my opinion.
20:56 Ayiko oh, ok then
20:56 beastd joined #perl6
20:56 xfix It replaces tabs with spaces.
20:58 Ayiko now for the hard part: getting the most votes...
20:59 xfix That won't be difficult, I think.
20:59 xfix I already got 3 upvotes in 30 minutes.
20:59 grondilu the P5 solution will be hard to beat
21:00 trservis joined #perl6
21:00 cognominal joined #perl6
21:00 xfix Perl 5? It has 44 bytes.
21:00 xfix Dunno, my solution is shorter :-). But well, people vote on originality too :-).
21:01 xfix http://codegolf.stackexchange.com/a/17103/3103
21:01 grondilu it's just that doing it in P5 is kind of impressive, imho
21:01 xfix Yeah.
21:01 xfix I upvoted this.
21:01 xfix http://codegolf.stackexchange.com/a/17103/3103 has many upvotes, but can be way shorter.
21:01 xfix (and this is codegolf)
21:01 xfix print sum(ord(c) for c in 'Happy new year to you!')
21:02 xfix This is supposed to print 2014 without any numbers in code.
21:02 xfix I only have 43 upvotes with my solution in 9 bytes.
21:05 psch jnthn: https://gist.github.com/peschwa/8528991 seems to fix &trial_bind for the case i had problems with
21:05 psch the replacement of " for ' in l43 obviously isn't neccessary... :)
21:06 psch also i'll be running spectest in a bit, my machine is a bit slow though so it'll be a while, maybe there's something obviously wrong there anyway
21:07 pecastro joined #perl6
21:07 cognominal libmoar.dylib is not found on my mac    To be found I had to copy it in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib
21:10 sftp joined #perl6
21:10 cognominal the invocation does not seem suspicious to my naive eyes though :   clang  -dynamiclib -O1 -Wl,-rpath,/Users/cog/git/rakudo/install/lib  -O1 -lpthread -o dynext/libperl6_ops_moar.dylib dynext/perl6_ops.o dynext/container.o -lmoar
21:10 xfix Hm, I wonder how hard would be to make something like 'make golf' from Ruby in Perl 6.
21:10 xfix (in case you are wondering what 'make golf' is, see http://ruby.janlelis.de/34-do-you-know-the-official-ruby-interpreter-goruby)
21:17 jnthn psch: Why the commented out line at the end?
21:18 cognominal jnthn, ^^  problems compiling rakudo with moarvm on a mac
21:19 jnthn cognominal: Yes, known, I'm not the person to fix that.
21:19 cognominal ok, thx.
21:20 psch that's blindly adopted from the java binder, in the same scoping depths it doesn't return anything there either
21:21 jnthn psch: Well, remove it, don't comment it out...
21:21 psch oh, right
21:21 jnthn Tehre's version control for that :)
21:21 jnthn Anyway, looks good...
21:21 jnthn Will apply it and spectest
21:21 jnthn With the commented out line gone :)
21:21 psch the masking of $flags inside the body was what threw me off yesterday
21:22 psch anyway, yeah, i've been running spectests for at least 10 minutes an i'm somewhere in S02-types... :)
21:23 moritz if anybody feels like hacking the build system: rakudo on parrot has this nice thing that if you rebuild and install nqp, you just have to type 'make' in rakudo and it works fine
21:24 moritz whereas the other two backends die with "missing or wrong version of ..."
21:24 moritz if you don't clean out rakudo first
21:24 moritz that's kinda annoying
21:25 jnthn psch: Oh, my whole run is about 6 minutes :)
21:26 moritz it helps to have a few fast cores and enough RAM to use them all at the same time :-)
21:27 jnthn I run --jobs=6 and memory used by the 6 never tops 1 gig, it seems... :)
21:30 arnsholt jnthn: Yeah, that's the weird thing. I generate it like P6Opaque does, so shouldn't happen...
21:30 cognominal joined #perl6
21:30 psch moritz: can you spare a moment to look at PR#237 and roastPR#36? those should work for all backends as soon as jnthn merged the change to &trial_bind
21:30 psch where "those" = the test cases
21:32 moritz psch: I took a quick look yesterday, and decided that I need to allocate more time to read through it, because the diff is more than a few lines
21:32 moritz psch: sadly right now I'm off to bed, but I hope to review it tomorrow
21:32 psch alright, no worries
21:32 psch i fully expect potential difficulties :)
21:32 lue r: my @a = <z z z>; for ^+@a { if @a[$_] eq 'z' { @a.splice($_,1,<y y>); } }; say @a.perl
21:32 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«Array.new("y", "y", "y", "y", "z")␤»
21:33 berekuk joined #perl6
21:33 lue That fails locally for me, somehow...
21:33 lue Ah, I know what it was :)
21:35 dalek rakudo/nom: 1c37f3e | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
21:35 dalek rakudo/nom: Fix trial bind analysis on Moar backend.
21:35 dalek rakudo/nom:
21:35 dalek rakudo/nom: Patch courtesy of psch++.
21:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1c37f3e855
21:35 jeffreykegler joined #perl6
21:35 dalek roast: 38a792c | (Tobias Leich)++ | S05-mass/properties-derived.t:
21:35 dalek roast: choose a char that is outside the Ideographic range
21:35 dalek roast: review: https://github.com/perl6/roast/commit/38a792ce61
21:35 psch yay my first patch in rakduo :)
21:36 jnthn psch++ # contributing to Rakudo \o/
21:44 berekuk joined #perl6
21:47 colomon psch++
21:52 lue How can I check if there's anything in $*IN ? $*IN.slurp hangs if there's nothing in standard in.
21:53 jnthn lue: On all backends, or just on Moar?
21:53 lue just parrot, actually
21:54 lue (maybe it's actually waiting to get standard input)
21:54 ribasushi joined #perl6
21:54 lue Well, I've only tested parrot so far, to be clear.
21:56 grondilu you mean reading $*IN without consuming it?
21:56 lue No, I find that $*IN.slurp just sits there if I didn't do something like    echo "HELLO" | perl6
21:57 Juerd No select or IO::Select?
21:57 johnmilton joined #perl6
21:57 Juerd slurp blocking until eof is exactly what I'd expect to happen :)
21:58 lue Well, if I type <something>\n^D then it continues.
21:59 geekosaur yes, so it's reading from the terminal as I would expect
21:59 geekosaur maybe you want to test if stdin is a terminal
22:00 lue Well, I'm doing the expand(1) golf on that site from earlier, and I just discovered that expand(1) handles stdin-from-a-terminal, so I guess it's expected behavior.
22:01 grondilu r u talking about the expand unix filter?
22:01 Mouq lue: why not just use $*IN.lines?
22:01 Mouq lue: expand(1) is a line-based program
22:02 lue Because slurp is what comes to mind when I think "get text from file" :)
22:02 lue (And I don't expect .lines to be more than .split("\n") actually)
22:03 grondilu you need to lose this thought pattern.  slurp is usually not the best way to open a text file.  Because it puts it all in memory, for one.
22:03 grondilu use .lines for reading lines, .get for reading characters
22:04 lue grondilu: I would think .lines is worse than .slurp for memory, actually. One string vs. multi-element array.
22:04 grondilu .lines is lazy
22:05 Mouq lue: thus the while(<>){…} Perl 5 idiom, which is equivalent AFAIK to for $*IN.lines {…}
22:06 lue grondilu: I'll use $*IN.lines for this since it's golf, but I will not be discarding any thought patterns today, thank you :) slurp's just fine with me.
22:07 lue I kinda wish .split(" "|",") DWIMmed...
22:07 grondilu also, you usually don't have to be explicit about using $*IN.  for lines {...} is equivalent to for $*IN.lines {...}
22:09 lue Eh. I still say "lines" doesn't convey any sense of IO, just a convenience for split("\n").
22:09 masak 'night, #perl6
22:10 lue ♞ masak o/
22:11 grondilu lines makes sense also when stdin is a stream.  Which is to be expected if you want to make a proper unix filter.  You're not supposed to see the end of the input.
22:13 grondilu that's also why slurp is usually not nice.  It blocks until EOF, while lines blocks until EOL
22:14 grondilu lue: lemme guess, you're more a Windows user than a unix user, aren't you?
22:14 lue grondilu: What? Why? Idun....
22:14 lue Is there something *so wrong* with me liking slurp or something?
22:15 grondilu well, kind of.  I mean, there's a reason why this command does not exist in P5.
22:16 grondilu it's just not quite the unix philosophy, where a good program is a text filter.  It's not supposed to swallow it all at once.
22:17 lue grondilu: Usually reasons for something being bad are based on them appearing in P5 but not in P6, not the inverse. You'll have to ask whoever came up with slurp on why that's better than P5.
22:17 colomon slurp is great if you just want to feed what you're reading to a grammar
22:18 lue (and it case it wasn't clear: I'm not in the slightest of ways a Windows user. I'd /love/ to know how my wanting to use .slurp would indicate that.)
22:20 Ayiko not the ^D in any case, you need ^Z<enter> on windows
22:20 Mouq colomon: well... i'd love to be able to match IO streams. makes working with giant xml files in P6 more viable
22:21 colomon Mouq: absolutely
22:21 lue "for lines {" doesn't actually work, I have to use $*IN
22:22 grondilu really?   I must be missing something.  As been working for ages.   We may not be talking about the same thing.
22:23 colomon actually, it needs to be "for lines() {"
22:23 grondilu oh
22:23 grondilu yeah
22:23 grondilu that's kind of annoying btw
22:24 Mouq n: .say for lines
22:24 camelia niecza v24-109-g48a8de3: OUTPUT«Stille Nacht! Heilige Nacht!␤Alles schläft; einsam wacht␤Nur das traute heilige Paar.␤Holder Knab im lockigem Haar,␤Schlafe in himmlischer Ruh!␤Schlafe in himmlischer Ruh!␤␤Stille Nacht! Heilige Nacht!␤Gottes Sohn! O wie lacht␤Lieb…»
22:24 Mouq r: .say for lines
22:24 camelia rakudo-jvm 972ac8: ( no output )
22:24 camelia ..rakudo-moar 972ac8: OUTPUT«(signal SEGV)»
22:24 camelia ..rakudo-parrot 972ac8: OUTPUT«Stille Nacht! Heilige Nacht!␤Alles schläft; einsam wacht␤Nur das traute heilige Paar.␤Holder Knab im lockigem Haar,␤Schlafe in himmlischer Ruh!␤Schlafe in himmlischer Ruh!␤␤Stille Nacht! Heilige Nacht!␤Gottes Sohn! O wie lacht␤Lieb´ a…»
22:24 Mouq hm
22:25 lue I'm guessing "for lines { ... } " is seen as "for lines({ ... })"
22:25 Ayiko m: for (lines) { .say }
22:25 camelia rakudo-moar 972ac8: OUTPUT«(signal SEGV)»
22:25 Mouq std: for lines { .say }
22:25 colomon what lue said
22:25 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�Function 'lines' needs parens to avoid gobbling block at /tmp/0VwsOIAOU_ line 1:�------> [32mfor lines[33m�[31m { .say }[0m�Missing block (apparently gobbled by 'lines') at /tmp/0VwsOIAOU_ line 1:�------> [32mfor line…»
22:25 * Mouq &
22:26 grondilu r: sub foo { ^5 }; for foo { .say }
22:26 camelia rakudo-parrot 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/QISobf1iemâ�¤Missing blockâ�¤at /tmp/QISobf1iem:1â�¤------> [32msub foo { ^5 }; for foo { .say }[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤     …»
22:26 camelia ..rakudo-moar 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tWocwwsd5zâ�¤Missing blockâ�¤at /tmp/tWocwwsd5z:1â�¤------> [32msub foo { ^5 }; for foo { .say }[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤       …»
22:26 camelia ..rakudo-jvm 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/sRlCyJZtmGâ�¤Missing blockâ�¤at /tmp/sRlCyJZtmG:1â�¤------> [32msub foo { ^5 }; for foo { .say }[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        â€¦Â»
22:26 grondilu r: sub foo { ^5 }; for foo() { .say }
22:26 camelia rakudo-parrot 972ac8, rakudo-jvm 972ac8, rakudo-moar 972ac8: OUTPUT«0␤1␤2␤3␤4␤»
22:26 colomon gobbling blocks is really handy if you're trying to write functions that take blocks
22:26 grondilu oh come on, that's silly
22:26 grondilu r: sub foo() { ^5 }; for foo { .say }
22:26 camelia rakudo-parrot 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nya1FUc7uJâ�¤Missing blockâ�¤at /tmp/nya1FUc7uJ:1â�¤------> [32msub foo() { ^5 }; for foo { .say }[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤   …»
22:26 camelia ..rakudo-moar 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/L8ww1xWKwtâ�¤Missing blockâ�¤at /tmp/L8ww1xWKwt:1â�¤------> [32msub foo() { ^5 }; for foo { .say }[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤     …»
22:26 camelia ..rakudo-jvm 972ac8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7CWSmiibphâ�¤Missing blockâ�¤at /tmp/7CWSmiibph:1â�¤------> [32msub foo() { ^5 }; for foo { .say }[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤      â€¦Â»
22:27 grondilu if foo doesn't take any argument, the parser should accept for foo {...}
22:27 grondilu no?
22:27 jnthn grondilu: What if foo is defined later?
22:27 lue grondilu: I don't think P6 is into special-casing various Signatures. Could be wrong though.
22:27 colomon how is the parser supposed to know if foo takes an argument?
22:28 colomon or what if it takes any number of arguments?
22:28 grondilu because signature?
22:28 lue Here's what I have so far (could use a lot more golfing I'm sure): https://gist.github.com/lue/b497d0196060f2b591ff
22:29 grondilu r: sub term:<foo> { ^5 }; for foo { .say }
22:29 camelia rakudo-moar 972ac8: OUTPUT«===SORRY!===␤Cannot find method 'flat'␤»
22:29 camelia ..rakudo-parrot 972ac8, rakudo-jvm 972ac8: OUTPUT«0␤1␤2␤3␤4␤»
22:30 grondilu it works with terms.  I don't see why it could not work with functions with a zero argument signature.
22:30 grondilu (unless it's a multi, that is)
22:31 colomon note carefully what jnthn++ said: what if foo is defined later?
22:32 grondilu I don't understand what he means.
22:32 grondilu oh
22:33 grondilu I dunno.  I guess if jnthn says it's not possible, he must have good reasons.
22:34 colomon grondilu: you can call to a function defined later in a file, right?
22:35 grondilu but it seems to me that if the compiler knows that foo is a function when it compiles 'for foo {...}', then it knows a thing or two about foo.  Including its signature.  Even if it is defined later?
22:35 colomon no
22:35 colomon or rather, it parses then it compiles.
22:35 colomon you're asking it to change the parse based on things that happen later in the file.
22:36 grondilu ok, I think I get it
22:36 colomon but p6 is always parsed in one pass.  that's a design goal.
22:37 colomon when you define a term, you are changing the p6 grammar for your program.  you couldn't call that term before you defined it.  but you can call a sub.
22:38 * colomon wishes TimToady or jnthn were available to explain, as they'd probably do it better and more accurately.
22:38 Mouq r: multi foo () { say "mmh" }; foo { say "hmm" }; multi foo (&c) { c() }
22:38 camelia rakudo-parrot 1c37f3, rakudo-jvm 1c37f3, rakudo-moar 1c37f3: OUTPUT«hmm␤»
22:39 diakopter Mouq: you need a multi
22:39 colomon and sub calls gobbling blocks is really awesome for things like Damian's io-prompter.
22:40 diakopter on the middle one
22:40 grondilu ok, signatures do not affect syntax in anyway, IIUC
22:40 psch r: sub term:<foo> { ^bar() }; sub bar { 5 }; say foo;
22:40 camelia rakudo-moar 1c37f3: OUTPUT«===SORRY!===␤Cannot find method 'flat'␤»
22:40 camelia ..rakudo-parrot 1c37f3, rakudo-jvm 1c37f3: OUTPUT«0..^5␤»
22:40 diakopter o_O
22:40 Mouq r: #`[diakopter:] multi foo () { say "mmh" }; for foo { say "hmm" }; multi foo (&c) { c() } # was more what i was going for
22:40 camelia rakudo-jvm 1c37f3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/QiltiAjwJWâ�¤Missing blockâ�¤at /tmp/QiltiAjwJW:1â�¤------> [32m () { say "mmh" }; for foo { say "hmm" }[33mâ��[31m; multi foo (&c) { c() } # was more what[0mâ�¤    expecting any of:â�¤        po…»
22:40 camelia ..rakudo-moar 1c37f3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/dwbDgFAMZWâ�¤Missing blockâ�¤at /tmp/dwbDgFAMZW:1â�¤------> [32m () { say "mmh" }; for foo { say "hmm" }[33mâ��[31m; multi foo (&c) { c() } # was more what[0mâ�¤    expecting any of:â�¤        p…»
22:40 camelia ..rakudo-parrot 1c37f3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/X8EHNv8j1Zâ�¤Missing blockâ�¤at /tmp/X8EHNv8j1Z:1â�¤------> [32m () { say "mmh" }; for foo { say "hmm" }[33mâ��[31m; multi foo (&c) { c() } # was more what[0mâ�¤    expecting any of:â�¤       …»
22:41 Mouq ah, spam, sorry
22:43 psch for reference, spectest finished just now
22:43 psch but then i'm running on 1 core inside a vm...
22:43 psch not that'd mean it'd be much faster otherwise
22:45 lue Any obvious non-golfy things in the gist I pasted (aside from the copious amounts of whitespace)?
22:46 Mouq non-golfy?
22:46 psch with my optimizer patch and the &trial_bind patch i get these results: https://gist.github.com/peschwa/8530900 - i guess i'll compare which of those fail without my patches and which don't, in addition to the one jnthn++ linked in the PR
22:46 psch but for now i'll go to sleep, gnight #perl6
22:47 lue Mouq: can be golfed further.
22:47 * lue & for a bit
22:53 btyler cognominal: still around?
22:55 Mouq lue: I'd use `get` instead of `$t` and put everything in the mainline
22:55 xenoterracide joined #perl6
22:55 Mouq *instead of `MAIN`
22:56 Mouq that's still golfing, i suppose
22:58 lue Mouq: that's an idea, though I was trying to replicate the original `expand` program, which uses -t for the tablist.
23:03 Mouq lue: ahh
23:03 Mouq lue: i don't know how you'd get spaces (`/","|" "/`) in $t though
23:03 lue Granted, the application doesn't say that's what you have to do, and I'm pretty sure the C solution doesn't do that, but I'd like to stick to the inspiration for the puzzle :)
23:04 lue s/application/puzzle/
23:04 lue Mouq: -t="4 8 16"
23:05 Mouq ohhh
23:06 Mouq lue: i'd have a golfed version that only does the basics of the spec
23:06 Mouq nerm, the application
23:06 Mouq lue: but that's your decision :P
23:07 lue Mouq: a basic version is an idea, though I'm not interested in working on this any more for now :P .
23:09 kivutar joined #perl6
23:33 rjbs There's no synopsis 23.  Does p6 have a taint-like mechanism?
23:33 rjbs or is it just "types"? :)
23:44 Mouq rjbs: i've never seen anything about a taint mode in p6
23:44 Mouq or something similar
23:44 clsn There's supposed to be a Taint enum, which is the only reference I remember.
23:45 thou joined #perl6
23:47 Mouq i could imagine something like a class Tainted is Str { } and sub infix<~> (Tainted $a, Str $b) { Tainted.new($a.Str~$b) } or something
23:47 Mouq *infix:<~>
23:47 Mouq vOv
23:48 Mouq rjbs: I'm sure there are other people not on right now who could tell you more
23:48 * geekosaur would expect it to be a trait...
23:50 Mouq yeah…
23:50 Mouq a role?
23:52 clsn S12 speaks of an our enum Taint does Tainting <Untainted Tainted>;
23:52 clsn I don't know if it's mentioned anyplace else.
23:52 raiph joined #perl6
23:53 Mouq ohh, "Note that Bool and Taint are not role names themselves but imply roles"
23:54 clsn Anyone get to try my Signature matching yet?  If I commit the new tests I have to roast, the current suite will fail most of them.
23:55 jnthn clsn: I left a comment earlier on the PR
23:56 clsn Not seeing it.  I might not be using github right.
23:57 clsn Should I be looking at https://github.com/rakudo/rakudo/pull/235 ?
23:58 jnthn wtf...
23:58 clsn Or do you mean PR 237 ?
23:59 jnthn argh
23:59 jnthn I menat to comment on yours, but left to comment on 237

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

Perl 6 | Reference Documentation | Rakudo