Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-01-29

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:00 timotimo oh, it's probably not enough to just give the full path to javac
00:01 timotimo how do i properly do that? i have a 1.7 in my home
00:04 timotimo ah, in the middle of the program it has run("java")
00:04 * timotimo made a java symlink to 1.7
00:05 felher timotimo: maybe its enough to set JAVA_HOME via export to /your/path/to/java/1.7
00:06 felher Well, /me has to sleep now.
00:06 felher timotimo: good luck :)
00:06 timotimo thank you! :)
00:08 timotimo well, the tests run now
00:08 timotimo that's good
00:10 timotimo the nqp tests seem somewhat slow, but maybe that's because it spins up a whole jvm every time?
00:10 FROGGS you could monitor java's pid
00:11 timotimo well, prove runs one executable per test file at least
00:11 timotimo probably not one whole jvm per test case, though, that wouldn't make any sense
00:11 timotimo Files=15, Tests=95, 39 wallclock secs  -  Files=77, Tests=1699, 48 wallclock secs
00:11 timotimo guess which one is jvm-nqp and which is parrot-nqp
00:12 FROGGS thats easy :o)
00:12 FROGGS so the startup time is a major impact
00:12 timotimo would like to see the microbenchmark
00:12 timotimo probably
00:12 FROGGS s/is/has/
00:12 FROGGS https://gist.github.com/4659741
00:13 timotimo thanks :)
00:13 FROGGS dunno where timecmd comes from
00:13 timotimo i don't like this benchmark at all
00:14 FROGGS change it
00:14 diakopter try the increment in the sub
00:14 FROGGS thats what I want to ask you too, change the sub so it does something
00:15 timotimo hm, doesn't work in my nqp
00:15 timotimo maybe have to update again
00:15 timotimo although all the tests had passed
00:15 FROGGS not that JVM has an optimizer which gets rid of sub calls to no-ops
00:15 timotimo yes
00:15 timotimo er, maybe
00:15 diakopter FROGGS: sure it does
00:16 diakopter it might even inline that call even if you put the increment in the sub
00:16 FROGGS ya...
00:17 FROGGS well, after all what matters is time, not how slow it would be without its optimizer
00:17 amedeo009 joined #perl6
00:17 FROGGS a real world app would be a better benchmark
00:18 timotimo indeed. not terribly much to make yet, no?
00:18 jerome joined #perl6
00:18 amedeo009 left #perl6
00:19 japhb_ FROGGS, perhaps, say, compiling Rakudo's setting ...?  :-)
00:19 timotimo oh, indeed, lots of changes i didn't have yet
00:19 FROGGS japhb++
00:19 FROGGS would like to see rakudo recompiled within 10 sekonds ;o)
00:19 timotimo rakudo's setting is nqp?
00:20 FROGGS there are severaal stages, but yes, I believe it is somehow nqp-y
00:20 timotimo i thought it was perl6, but the closer to the beginning you are the fewer classes you can use
00:21 japhb_ timotimo, I meant, that will be one of the first big benchmarks we'll have, and will also be a major milestone for the JVM port
00:21 FROGGS right, so the main grammar and action should be nqp, the modules afterwards could have some pieces more then
00:22 timotimo ah, yes.
00:23 timotimo putting $i++ into the sub makes it marginally faster (i believe it's only noise though)
00:24 timotimo er, wait, wouldn't nqp itself be the first big benchmark?
00:24 timotimo or maybe nqp's setting?
00:25 japhb_ timotimo, I suppose you could do "Time to perform the full NQP bootstrap cycle" as a benchmark.
00:26 timotimo one of the nqp tests still has #!parrot nqp.pbc
00:27 japhb_ Is it one of the parrot-specific tests (in content, I mean)?
00:28 timotimo no, these are tests from the nqp test suite only, and they are already copied over to nqp-jvm-prep
00:28 timotimo trying to figure out about how much already works in nqp-jvm
00:28 timotimo so, do i understand correctly, that nqp could be compiled even to C?
00:29 diakopter well
00:30 diakopter or Perl 5?
00:30 diakopter why C?
00:31 diakopter you'll have to roll your own Garbage Truck if you do C
00:32 japhb_ And you get the joy of implementing eval ...
00:33 timotimo hm, right.
00:33 * FROGGS .oO( I dont care, I have 8gigs mem :o) )
00:33 diakopter ha
00:33 timotimo i mean, rpython (from the pypy project) compiles down to C normally and it's got some restrictions that remind me of nqp
00:36 timotimo i wonder if i can pull the levenshtein implementation i wrote for rakudo to nqp-jvm already
00:37 FROGGS this might already work, yes
00:38 timotimo ah, No registered operation handler for 'join'
00:38 timotimo in this case i can just use ~ instead
00:39 timotimo it runtime-errors, though, doesn't seem to abort properly
00:44 timotimo oh, i think i know what's going on. && isn't short-circuiting
00:45 timotimo no, it is
00:49 timotimo aaaah i don't know what's going on
00:50 timotimo why does this break/work?! >_<
00:51 timotimo aaaaaah
00:52 timotimo nqp-jvm is harsher when it come to nqp::substr than parrot-nqp is
00:52 timotimo and there's an off by one in my levenshtein code!
00:53 japhb_ (porting as a way to find bugs)++
00:55 timotimo the parrot version is quite a bit faster
00:55 timotimo 100 x 4 levenshteins: parrot: 2.68user 0.18system 0:02.89elapsed 99%CPU (0avgtext+0avgdata 196616maxresident)k
00:55 timotimo jvm: 6.69user 0.37system 0:05.66elapsed 124%CPU (0avgtext+0avgdata 145320maxresident)k
00:56 japhb_ Are you still including the time to use Parrot to cross-compile, and then Java to build the class, before you get to "real" runtime?
00:56 timotimo 300x4, parrot: 7.33user 0.17system 0:07.53elapsed 99%CPU  -  10.02user 0.40system 0:09.04elapsed 115%CPU  jvm
00:57 timotimo it only compiles once, the code itself contains the for loop
00:58 timotimo 22.49user 1000x4 on parrot
00:58 timotimo 21.78user 1000x4 on jvm
01:00 japhb_ So the JVM is marginally faster, and he hasn't even been optimizing yet.  :-)
01:00 timotimo right. takes longer to compile, though, it seems
01:00 timotimo which makes sense
01:02 timotimo i was hoping it'd be ridiculously much faster
01:03 timotimo the microbenchmark put my hopes up quite high
01:03 * diakopter knows the feeling
01:03 diakopter java can do no-ops quite fast!
01:09 timotimo on the other hand: hey, it can run some real-world code (almost) without modification!
01:11 anuby joined #perl6
01:15 hypolin joined #perl6
01:49 xinming joined #perl6
01:50 anuby joined #perl6
01:52 betterwo1ld joined #perl6
02:08 TimToady http://rosettacode.org/wiki/Numeric_error_propagation#Perl_6  # interesting translation of the Perl 5 code
02:21 timotimo Because Perl 6 does not yet have a longest-zip metaoperator - is this still true? huh.
02:21 perigrin ziiiiiiiiiip <-- longest zip metaoperator?
02:23 timotimo more like ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ+
02:23 timotimo because ziiiiiiiiiiiiiip isn't metaop yet
02:26 dayangkun_ joined #perl6
02:41 FROGGS_ joined #perl6
02:41 timotimo would that kind of mmetaop actually work?
02:41 timotimo zip lists of lists of lists of lists?
02:43 timotimo kind of a hard thing to type on a phone keyboard
02:45 diakopter haha
02:45 diakopter timotimo: isn't it late where you are?
02:51 flussence rn: say 1 XZZXZXZXZXZZZXXXZXXXXZXXZXZXXXXZXZXZXZ 2; # .oO( I wonder if this still crashes )
02:51 p6eval rakudo 9c9d79, niecza v24-18-gaf64300: OUTPUT«1 2␤»
02:51 flussence nice
02:53 diakopter &
02:57 dalek perl6-roast-data: 0db2bc8 | coke++ | / (3 files):
02:57 dalek perl6-roast-data: today (automated commit)
02:57 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/0db2bc8b04
03:00 timotimo diakopter: how observant of you :)
03:01 timotimo i noticed 5 minutes too late that it was time to go when the previous tram would have brought me home
03:01 timotimo would have been home 1 hour ago, but now it's 4am :|
03:02 timotimo r: say [[[0, 1], [10, 11]], [[100, 101], [110, 111]]] ZXZ+ [[[0, 2], [20, 22]], [[200, 202], [220, 222]]]
03:02 p6eval rakudo 9c9d79: OUTPUT«0 3 20 23 10 13 30 33 300 303 320 323 310 313 330 333␤»
03:02 timotimo i really have no way to figure out if this is what i'd expect right now :D
03:03 timotimo r: say [[[0, 1], [10, 11]], [[100, 101], [110, 111]]] XXZ+ [[[0, 2], [20, 22]], [[200, 202], [220, 222]]]
03:03 p6eval rakudo 9c9d79: OUTPUT«0 3 20 23 10 13 30 33 200 203 220 223 210 213 230 233 100 103 120 123 110 113 130 133 300 303 320 323 310 313 330 333␤»
03:03 timotimo r: say [[[0, 1], [10, 11]], [[100, 101], [110, 111]]] ZZX+ [[[0, 2], [20, 22]], [[200, 202], [220, 222]]]
03:03 p6eval rakudo 9c9d79: OUTPUT«0 2 1 3 30 32 31 33 300 302 301 303 330 332 331 333␤»
03:03 timotimo okay, bedtime now.
03:28 kaleem joined #perl6
03:47 sevin joined #perl6
03:57 balders_1od joined #perl6
04:02 fhelmberger_ joined #perl6
04:02 drbean_ joined #perl6
04:13 preflex_ joined #perl6
04:18 jerome joined #perl6
04:21 raiph r: say DateTime.new('2013-06-03') - DateTime.new('2013-02-01');
04:21 p6eval rakudo 9c9d79: OUTPUT«Invalid DateTime string '2013-06-03'; use an ISO 8601 timestamp (yyyy-mm-ddThh::mm::ssZ or yyyy-mm-ddThh::mm::ss+0100) instead␤  in method new at src/gen/CORE.setting:11552␤  in block  at /tmp/JenIGe_KOt:1␤␤»
04:26 araym joined #perl6
04:30 xinming joined #perl6
04:42 alec__ joined #perl6
04:43 jerome joined #perl6
04:45 sevin joined #perl6
05:17 telex joined #perl6
05:17 tokuhiro_ joined #perl6
05:19 fhelmberger joined #perl6
05:27 xinming joined #perl6
05:36 telex joined #perl6
06:06 b1rkh0ff joined #perl6
06:21 erkan joined #perl6
06:21 erkan joined #perl6
06:38 raiph joined #perl6
06:52 TimToady http://rosettacode.org/wiki/Greyscale_bars/Display#Perl_6
06:53 jnthn .oO( Does a greyscale bar serve greyscale beer? )
07:15 arnsholt jnthn: So, the repr_at_pos_{int,num} calls out to the REPR of the element type to munge the pointer returned from the array, but repr_get_attr_* does the unmunging on its own
07:16 arnsholt Perhaps the easiest way to implement sized ints in repr_at_pos would be to make at_pos like get_attr
07:17 arnsholt But the at_pos way seems like a better way to do it, and it would eliminate the need for the inout parameter solution I have today
07:17 arnsholt Thoughts?
07:27 arnsholt OTOH, the latter solution will require a new attribute REPROps, and some tweaks to P6int and P6num as well
07:28 arnsholt On the gripping hand, I think those P6{int,num} tweaks would save a few bytes of memory on numbers smaller than the word size (and no more bytes with a value of 1024)
07:33 odoacre joined #perl6
07:38 kaleem joined #perl6
07:54 jnthn arnsholt: On the JVM for native attrs I end up passing down a struct with a value and a flag saying what kind of primitive it is for a bind, or in the case of a read just setting the flag and allowing the REPR to place a value in the appropriate slot if things match up. It can throw in either case
07:55 jnthn arnsholt: Something like this could work, particularly as that struct can just sit on the stack and have tis address passed, meaning it's allocation free.
07:56 jnthn arnsholt: Then the REPR always knows it's being given a full-width slot to grab the thing to bind from or write into, and it can handle the size munging.
07:56 arnsholt Yeah, that's probably a better way
07:56 jnthn Yeah, it's where I was thinking of going after pondering it for a while
07:56 arnsholt But then we're talking about using the P6int/P6num REPR doing the setting, right?
07:57 jnthn Yeah
07:57 jnthn It actually reads/writes the object body.
07:57 jnthn So this way we never touch the object body from the outside.
07:57 arnsholt Right. Then I'll look into refactoring the attribute REPROps appropriately
07:58 jnthn I think it beats the "REPR returns a reference that something on the outside derefs" thing.
07:58 jnthn Sure. See the JVM native attributes handling.
07:58 arnsholt Yeah, that's kinda hacky in the end
07:58 jnthn We don't need to do it quite like it does because in C we can stack allocate and pass a pointer.
07:59 jnthn But I think the overall approach (both bind and get have the same kinda thing passed on down) is sane.
07:59 arnsholt Excellent
07:59 jnthn Yeah. My original design in this area was Not Awesome...
08:00 jnthn OK, time for teaching, I guess...
08:00 arnsholt I've some thoughts on refactoring P6int/P6num as well, but we're leaving for work in a moment, so we can talk about that later
08:00 arnsholt Good timing =)
08:00 jnthn ;)
08:00 * jnthn bbl
08:13 brrt joined #perl6
08:17 imarcusthis joined #perl6
08:37 FROGGS joined #perl6
08:37 diakopter dum dee dum
08:38 FROGGS morning
08:38 diakopter short sleep
08:38 FROGGS indeed
08:38 FROGGS 4 hours for me
08:39 tadzik it's 7 here and I don't find it quite enough :)
08:43 arnsholt Veit ikke hvordan Eman sine planer er
08:43 moritz arnsholt: ECHANNEL?
08:43 tadzik orkka
08:44 moritz phenny: nb en "planer"?
08:44 phenny moritz: "plans" (no to en, translate.google.com)
08:45 FROGGS ohh, sekrit plans they make
08:45 FROGGS ... and somebody called Eman is the victim
08:46 cog joined #perl6
08:46 moritz if my Norwegian serves me well, it meant roughly "Don't know where Eman's plans are"
08:46 FROGGS ahh
08:46 FROGGS well, that explains it
08:48 arnsholt Whoops, that was destined for window 4, not window 3 >.<
08:49 nwc10 this isn't window 6?
08:49 arnsholt But yeah, "I don't know what Eman's plans are" =)
08:49 arnsholt (hvordan = how, hvor = where)
08:49 diakopter I'm on windows 8
08:50 arnsholt diakopter: Heehee =D
08:50 FROGGS I'm sitting in front of several windows, airport that it
08:54 cog joined #perl6
08:54 kresike joined #perl6
08:55 kresike hello all you happy perl6 people
08:55 nwc10 I guess right now I'm more a happy subset-of-NQP person.
09:02 sorear hello kresike
09:03 sftp joined #perl6
09:05 moritz arnsholt: ah yes, I always mix up those /^hv/ words
09:08 kresike sorear, o/
09:09 moritz what's the order of entries in p5's @INC? qw/site vendor perl/ ?
09:09 moritz or qw/vendor site perl/?
09:10 moritz the ones I'm looking right now seem only to have site and perl
09:10 moritz probably because the vendor packages perl too
09:11 nwc10 order changed. In 5.12.0, I think
09:11 nwc10 but only to put site before perl
09:11 nwc10 I forget where vendor sits
09:11 moritz ok, what's the order I should imitate in rakudo?
09:11 nwc10 oh, site, vendor, perl
09:11 nwc10 that's what blead has
09:11 nwc10 we believe that that order is sane.
09:12 moritz ok, I'll adopt that for rakudo then
09:12 nwc10 key is that site is before vendor, so that you can easily upgrade a "dual life" package without needing to overwrite your site install
09:12 nwc10 and, logically, that should also apply to upgrading something that the vendor shipped
09:13 moritz sounds surprisingly sane :-)
09:13 nwc10 architecture-specific site, architecture independant site, arch-vendor, vendor, arch-"perl", "perl", .
09:14 nwc10 it might be sane to say that "." isn't there
09:14 nwc10 Actually, question
09:14 nwc10 perl6 with -e has different rules for running the code?
09:14 moritz it should have
09:14 moritz "no strict vars" by default
09:14 moritz but it doesn't, in rakudo
09:14 nwc10 that's the one that I thought
09:15 nwc10 crazy thought - add "." to @INC (or whatever it's called) for -e, but not for running from a file
09:15 nwc10 (or stdin)
09:15 nwc10 is that a useful trade off?
09:15 moritz no, IMHO. I often use short -e scripts to debug @INC related trouble
09:16 moritz if -e has different rules, that becomes totally confusing
09:16 nwc10 OK. thanks for a quick reason to shoot it donw
09:17 moritz oh, but that gives me an idea
09:17 moritz Perl 5 has -E for using modern features
09:17 jnthn The levenstein code is most probably slow due to "return" being, uh, suboptimally implemented.
09:17 * jnthn will do the obvious 2 minute improvement tonight and see how it helps
09:18 moritz maybe we should steal that in Perl 6 for having strict vars on the command line
09:18 jnthn Maybe -E should uppercase the output automatically.
09:18 nwc10 moritz: yes, seems a sane idea
09:19 nwc10 EVEN VMS DOESN'T DO THAT
09:19 moritz jnthn: OH GOOD IDEA!
09:19 jnthn :d
09:19 jnthn uh, :D even. How ironic...
09:19 moritz :-)
09:19 tadzik :_)
09:20 tadzik well, there's no upper-dash that I know of...
09:20 jnthn .oO( oh noes )
09:20 jnthn *nose
09:20 jnthn gah
09:20 tadzik double-pun
09:20 jnthn This keyboard. I'm not used to it...
09:21 nwc10 what are you used to? UK? US?
09:21 nwc10 and this is, um, native?
09:21 jnthn UK
09:21 jnthn This one is Swedish
09:22 nwc10 that must be fun. I'm sort of good enough with German layouts to be able to log in, and find things slowly. But, um, die die die. I have real keyboards to plug in
09:22 moritz somehow "native keyboard" triggered the question "did they have keyboards in the 15/16th century?" :-)
09:23 moritz at $work I have a two keyboards in front of me, one with German layout, one with US layout (but the keys have UK layout labels on them)
09:23 nwc10 Harpsichords, I guess
09:24 diakopter My nops are faster than your nops
09:39 balders_dod joined #perl6
09:43 Psyche^ joined #perl6
09:45 dalek rakudo/nom: 92c30bc | moritz++ | src/core/terms.pm:
09:45 dalek rakudo/nom: reverse order of <perl vendor site> dirs in @*INC
09:45 dalek rakudo/nom:
09:45 dalek rakudo/nom: we do not have to repeat all of the mistakes Perl 5 has made.
09:45 dalek rakudo/nom: nwc10++
09:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/92c30bc341
09:46 cog where a construct like   IO('/')  is documented? it is not a constructor, nor a method or a regular function call…
09:47 tadzik where did you get that from?
09:48 cog r: IO('/').WHAT
09:48 p6eval rakudo 9c9d79: OUTPUT«IO is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in block  at src/RESTRICTED.setting:18␤  in  at src/gen/Metamodel.pm:2483␤  in any find_method_fallback at src/gen/Metamodel.pm:2471␤  in any find_method at src/gen/Metamodel.p…
09:49 moritz cog: it's coercion syntax. S02 I think.
09:49 cog r: Int('2').WHAT
09:49 p6eval rakudo 9c9d79:  ( no output )
09:49 cog moritz, thx
09:57 dakkar joined #perl6
09:59 cog seems that coercion is very much an overloaded term
10:02 * moritz coerces cog to believe otherwise
10:05 cog S13:171 seems to answer my question
10:08 brrt joined #perl6
10:26 sqirrel joined #perl6
10:46 FROGGS joined #perl6
10:51 FROGGS jnthn / moritz: how can I inject print statements in the ASTs? QAST::Stmt.new( QAST::Op( :op('callmethod'), :name('print'), :node($/), QAST:Val( ...) )
10:51 FROGGS will something like that work?
10:52 moritz yes
10:52 moritz though note that the print will eat up the value
10:53 FROGGS I just wanna print the method name I'm currently in
10:53 moritz (in the same sense that the .print in (2 + 3).print "eats" the 5, which isn't available anywhere else in the program)
10:53 FROGGS k
10:53 FROGGS thats fine
10:57 FROGGS I have the feeling that /$( 1 )/ shouldnt call postcircumfix:sym<( )>(( 1 )), since $( 1 ) just calls circumfix:sym<sigil>($( 1 ))
10:57 cog joined #perl6
10:58 moritz well, the $() shouldn't call postcircumfix:sym<( )>
10:58 moritz but the regex engine needs something callable to invoke
10:59 SmokeMachine joined #perl6
10:59 FROGGS so you would say that it is right this way?
11:00 moritz I don't know which "this way" you are talking about
11:00 moritz afaict / $( 1) / should call 1.item
11:01 moritz and the result should be interpolated the same way as variable interpolation works
11:01 moritz and the variable interpolation code should take to turn the 1 into a regex that matches a '1'
11:05 Su-Shee_ joined #perl6
11:06 moritz FROGGS: does that sound sane to you?
11:07 FROGGS it does
11:18 jaldhar joined #perl6
11:19 FROGGS moritz: if you have a look at this: https://gist.github.com/9307c7681cfb9ff34de0#file-compare_code_q_regex-txt
11:19 FROGGS you'll see that -e '"$( 1 )"' behaves similar to -e '$( 1 )'
11:19 FROGGS but within a regex it doesnt
11:20 FROGGS thats what I meant
11:20 FROGGS it is clear to me that it has to get the value of the block within ( ), and then has to interpolate it to actually match something
11:24 FROGGS or I have to fiddle with $*IN_REGEX_ASSERTION, since it gets set within the grammar token arglist, but isnt used within the actions
11:33 FROGGS well, I currently try the addition of metachar:sym<sigil>, with parses a codeblock
11:33 FROGGS s/with/which/
11:39 tadzik Rakudo on Instacode: http://instacode.linology.info/14541
11:44 mtymula joined #perl6
11:44 FROGGS tadzik: whats that site for? just commenting pieces of code, or more?
11:45 tadzik FROGGS: it's Instagram for Code
11:47 FROGGS ahh, thanks
11:47 mtymula hello
11:48 jnthn tadzik: lol :P
11:48 mtymula i am using www::app::MethodHandler to build a site in perl6
11:48 mtymula anyone know how to make it work with redy *.html files??
11:49 mtymula or maybe there is other way to do it?
11:49 kaleem joined #perl6
11:51 * jnthn didn't know about that module
11:52 jnthn mtymula: supernovus++ who wrote it is most likely to know, but isn't here at the moment.
11:53 jnthn At a quick glance at the docs I guess you could just $context.send(slurp('file.html')) or so
11:54 jnthn oh, further downt here's
11:54 jnthn ## A slurp handler.
11:54 jnthn $app.add(:path</slurp>, :slurp<./webroot/hello.text>);
11:54 jnthn (as part of example 2)
11:54 mtymula jnthn: thx, will try, what codex are you refering to?
11:54 jnthn mebbe that's what you want :)
11:54 mtymula o crap... i missed this....
11:55 mtymula thx
11:55 jnthn mtymula: examples in https://github.com/supernovus/perl6-www-app/blob/master/README.md
12:07 kaleem joined #perl6
12:35 SmokeMachine joined #perl6
12:41 SmokeMachine joined #perl6
12:46 SmokeMachine joined #perl6
13:24 cog joined #perl6
13:35 pmurias joined #perl6
13:35 pmurias jnthn: did you change how serialization context work in nqp?
13:36 jnthn pmurias: I put a bunch of stuff behind nqp ops
13:36 jnthn pmurias: Rather than using pir ops.
13:36 jnthn pmurias: No deep changes, just API.
13:45 kaleem joined #perl6
13:59 kaleem joined #perl6
14:04 kaleem joined #perl6
14:07 PacoAir joined #perl6
14:17 bluescreen10 joined #perl6
14:20 kaleem joined #perl6
14:23 arnsholt jnthn: Do you have any objections to adding a member_types array to P6opaque like CStruct has?
14:24 pmurias jnthn: Can I change the "Cannot fetch object from non-existent serialization context" msg to mention which ones are present?
14:25 atrodo joined #perl6
14:28 nnunley joined #perl6
14:36 silug joined #perl6
14:39 timotimo http://t.h8.lv/0001-fix-an-off-by-one-replace-join-of-two-elements-with.patch - could someone be so kind and apply this to nom? i don't feel like making a pull request for two lines
14:44 moritz timotimo: spectesting now, will push if successful
14:44 timotimo thank you :)
14:48 nnunley joined #perl6
14:56 arnsholt Derp. Half an hour debugging a stupid error again =D
14:57 arnsholt A stupig segfault bug this time though. so I guess not all segfaults are easier than stupid errors ^_^
14:58 mtk joined #perl6
14:59 kresike arnsholt, a segfault means "something is starting to work" :)
15:00 arnsholt Exactly!
15:00 arnsholt That's mostly my experience with C as well
15:01 arnsholt Especially since when I'm doing C I'm working on NativeCall
15:01 arnsholt Which is a lot of fun, as it turns out. Sixmodel is really nice to work with
15:01 arnsholt jnthn++ for that
15:02 stopbit joined #perl6
15:03 moritz arnsholt: fwiw I've re-created my dev environment for that project where DBIish segfaulted, and now it doesn't anymore
15:03 moritz at least not for the example that I checked into the repo :-)
15:03 moritz so when I'm home, I'll see if I have further, uncommitted stuff
15:03 moritz or start do develop more
15:03 moritz and tell you if something segfaults :-)
15:04 arnsholt Excellent!
15:04 arnsholt I'm hoping that I'll be able to land sized ints in master within this week or next, so more NativeCall usage would be awesome!
15:05 arnsholt Next on my hitlist is the long-standing (and incredibly annoying) lack of containers in structs
15:06 timotimo arnsholt: how much of the blocking parts for p6-zeromq are removed when the first part lands?
15:06 arlinius joined #perl6
15:07 arnsholt Most of it I think
15:08 arnsholt I can't remember how much of an obstacle the container stuff is, but I think that's a pretty small part of it
15:08 timotimo doesn't that just mean you're forced to use := instead of = when working with those structs?
15:09 arnsholt Yeah, and you have to bind directly to the private attributes ($!attr) rather than using the public accessor stuff
15:10 timotimo OK
15:11 timotimo does that also fix native ints in classes requiring those binds?
15:11 timotimo r: class A { has int $.foo is rw }; A.new.foo++;
15:11 p6eval rakudo 92c30b: OUTPUT«===SORRY!===␤Cannot create rw-accessors for natively typed attribute '$!foo'␤»
15:11 timotimo r: class A { has int $.foo }; A.new.foo++;
15:11 p6eval rakudo 92c30b: OUTPUT«Cannot assign to a non-container␤  in sub postfix:<++> at src/gen/CORE.setting:3148␤  in block  at /tmp/MJzilx4I1K:1␤␤»
15:11 timotimo is that the error i wanted?
15:11 arnsholt Nope, that's something else entirely
15:12 timotimo r: class A { has int $.foo; method bar { $!foo++ } }; A.new.bar;
15:12 p6eval rakudo 92c30b: OUTPUT«Cannot assign to a non-container␤  in sub postfix:<++> at src/gen/CORE.setting:3148␤  in method bar at /tmp/MA3cKU_NAf:1␤  in block  at /tmp/MA3cKU_NAf:1␤␤»
15:12 timotimo OK
15:12 arnsholt In fact, I wasn't even aware of that particular problem =)
15:12 arnsholt Hmm..
15:12 arnsholt r: class A { has int $.foo; }; my A $x .= new; $x.foo = 3; say $x.foo
15:12 p6eval rakudo 92c30b: OUTPUT«Cannot assign to a non-container␤  in block  at /tmp/mEMnWhAj9v:1␤␤»
15:13 arnsholt Actually, it might go away =)
15:13 timotimo that would be neat, but no pressure
15:13 arnsholt Oooh, Rakudo based on my hacked NQP even passes its own testsuite =D
15:13 * arnsholt spectests
15:17 skids joined #perl6
15:26 kresike bye folks
15:29 timotimo jnthn: i wonder if i should use a dynamic variable instead of return to make levenshtein faster on jvm? :P
15:29 timotimo (in one place i can even use a lexical)
15:30 timotimo nqp: sub changer($a) { $a := 10 }; my $b := 5; changer($b); say($b);
15:30 p6eval nqp: OUTPUT«5␤»
15:30 timotimo mhm.
15:30 jnthn phenny: tell pmurias you could mention which one it was looking for I guess but the IDs are pretty meaningless from a user perspective. Maybe as a debugging option it makes sense...
15:30 phenny jnthn: I'll pass that on when pmurias is around.
15:32 bluescreen10 joined #perl6
15:32 jnthn timotimo: No, I will fix the hideous return performance tonight, with soem luck
15:33 jnthn timotimo: I did a quick check on how slow return is before I left for $dayjob today and...yeah, it's awful. I think I know why and how to fix it.
15:33 jnthn arnsholt: I don't think P6opaque should get the member_types...why does CStruct need it anyway?
15:34 jnthn Oh...I guess in repr data it does
15:34 jnthn But I don't think P6opaque should need it.
15:35 jnthn On fixing things like $native_int++, I have a good idea how to do it but I need to think it through a little more...it'll tie into refactoring container spec a bit.
15:40 hash_table joined #perl6
15:41 arnsholt Right. I'll hold off on that
15:42 arnsholt And in the end, I think we don't have to add the member_types after all
15:42 jnthn OK :)
15:42 arnsholt Or, maybe we do
15:42 arnsholt I've got some failing spectests
15:42 jnthn Remember that any nested natives already have flattened_stables.
15:45 arnsholt Oh, these specfails might be because I'm not at nom/HEAD
15:46 arnsholt Lemme try to merge master
15:46 arnsholt Er, nom, that is =)
15:48 arnsholt jnthn: Oh, speaking of the member_types thing. The way it's implemented ATM, repr_get_attr_int is going to throw an exception if the attribute isn't a flattened one. Is that OK, or something I should fix?
15:48 arnsholt (Not doing that is why I wanted member_types in the REPR data)
15:50 benabik joined #perl6
15:51 cog joined #perl6
15:53 jnthn arnsholt: it's OK
15:53 jnthn arnsholt: It should be like that.
15:54 arnsholt Right. Then I should bring CStruct in line with that as well, I guess
15:54 arnsholt It sends it off to the STable of the type object, since that readily at hand anyways
15:59 SmokeMac_ joined #perl6
15:59 benabik_ joined #perl6
16:00 benabik joined #perl6
16:04 jnthn decommute &
16:19 arnsholt I've got a specfail, but not entirely sure it really is a failure
16:19 arnsholt S16-filehandles/filestat.t test 8 is: "IO.accessed should be updated when contents of file is read", but I don't think that can be guaranteed in the general case
16:20 arnsholt For example, it's not entirely on uncommon on Linux systems to disable atime on many disks, so that timestamps only are updated after modifications, and not on simple reads
16:20 timotimo oh, yes, noatime is not very uncommon
16:20 timotimo good catch
16:21 timotimo don't know how to fix the test, though
16:21 timotimo if it fails, skip it instead? >_<
16:21 arnsholt Me neither =)
16:23 balders_dod joined #perl6
16:30 MayDaniel joined #perl6
16:34 telex joined #perl6
16:44 * TimToady gets a cold grue at the notion of including either site or vendor into @*INC, since S11's opinion is unequivocally that putting either there is the main mistake that P5 made, not just the order of them
16:46 TimToady viewing it as a sort term in a database query allows us to prefer particular authorities or components without artificial categories
16:47 nwc10 I didn't know that. Also, the S11 that I find as the top hit for a search on google doesn't even mention /site/ or /INC/
16:47 TimToady I'm just a little afraid that this is one of those temporary expedients that never can be taken out and shot
16:47 nwc10 so I'm a bit confused.
16:48 TimToady @*INC is supposed to only be for current development prior to registration in the official library, according to S11
16:49 TimToady and the official library is a site concept
16:49 TimToady @*INC shouldn't be used to pull in anything shared on the site, in my opinion
16:49 nnunley joined #perl6
16:50 TimToady as soon as things are shared, you must be clear about the complete identity and immutability of each component
16:51 TimToady otherwise you cannot depend on the meaning of any component staying the same
16:55 moritz well, not having implemented identities yet, @*INC is as good as we can get
16:55 TimToady to the extent that official site library's directories are mentioned in @*INC, that can at best describe the default sort order in the absence of other query guidance
16:55 TimToady and certainly NYI is an absence :)
16:56 TimToady I just don't want us to get painted into a corner by expediency here
16:58 TimToady I suppose the order of official libraries in @*INC could be used also to say whose policy overrides
16:58 timotimo hm. last tweet by @rakudoperl was august 2011. should it be removed from rakudos README?
16:59 TimToady in this case, an earlier mention in @*INC means the policies override later mentions
16:59 benabik joined #perl6
16:59 benabik joined #perl6
17:00 TimToady so a site policy to prefer auth-A over auth-B would override a vendor's preference for auth-B over auth-A, for instance
17:01 TimToady obviously overrides of generic policy should be as specific as possible, so it's probably better if a site or user specifies the specific components for which auth-A overrides auth-B, and let the vendor choose the rest
17:02 fullmetalpride joined #perl6
17:03 fullmetalpride hello
17:03 * nwc10 hopes that moritz is digesting this, because I didn't feel that it was my itch to scratch
17:03 TimToady there are some hazy intermediate specificities related to bundling, so we'll probably need a way to select all the components in a bundle and talk about them as well
17:03 nwc10 which could just mean "erk, my brain is full. I don't have space to think about this as well as everything else"
17:04 * TimToady has been thinking of bundles as a kind of auth override
17:04 TimToady so we might end up with a list of auths for any given component
17:04 nwc10 (sorry, I'm not a very useful contributor to this, as it's not something I've been thinking about)
17:05 nwc10 timotimo: do we know which human runs the account?
17:05 TimToady nwc10: that's fine, just trying to think about scaling issues that only come into play with really large systems
17:05 TimToady but that was one of P5's issues, scaling only to medium-size
17:05 kaleem joined #perl6
17:07 TimToady big companies need ways to take a bunch of conflicting policies and smushing them together into something vaguely coherent, and @*INC is not going to cut it for them
17:07 timotimo nwc10: this one doesn't
17:07 nwc10 OK, I think I have a bit of handle on the problem space now - it's the Perl 5 problem that there is only one @INC tree for the interpreter, yet different things you want to run with it want different (conflicting) versions of modules installed
17:08 nwc10 (that's before you get to the "oh, and I want to run with them in the same process too")
17:08 TimToady nodnod
17:08 nwc10 gotcha. Yes. I see why "site" sucks for that, at one level
17:08 TimToady we don't entirely understand the solution yet, but we have some understanding of the problem
17:08 nwc10 "perl" and "site" matter to the OS packaging system.
17:08 nwc10 who owns the files
17:09 nwc10 (effectively, faking up a union directory)
17:09 nwc10 but, yes, that's orthogonal to which module(s) does the program want to load
17:10 TimToady this relates to the policies that a bundle's preferred versions could override the file's preferred versions, since they've been tested together
17:10 TimToady but that's effectively mutating the file, so the bundle needs its own auth of the file in that case, I think
17:10 nwc10 ah yes. Right, thanks, yes, that's now making more sense.
17:11 TimToady (but we don't really want to lose track of the original auth of the file either, hence maybe a list of auths)
17:12 nwc10 it's the problem that everyone "mega distros" need to remember. Integration testing. And this desire of everyone to externalise that onto someone else :-)
17:12 cog joined #perl6
17:13 TimToady :)
17:14 TimToady sorry if /me sounds snippy this morning, but we're about to leave for home, and so /me is probably overcompressing his utterances...
17:15 nwc10 I think you've said enough now to clarify what you are thinking, to me at least
17:15 nwc10 this does not mean that I have any idea on a good way to solve it
17:15 nwc10 but I think I understand which Perl 5 scaling problems you are keen to avoid repeating
17:16 * moritz understands TimToady's of painting us into a corner, but is less afraid of it than having nothing that users can work with
17:16 GlitchMr joined #perl6
17:16 TimToady to me we can solve that at much the same level as trying to make the filesystem transparent to Unicode
17:17 moritz which we haven't done either
17:17 TimToady both of those problems involve mapping indirections from identities to things out on the filesystem somewhere
17:17 TimToady so I hope for some unification there
17:17 moritz yes, makes sense to me
17:18 moritz in fact, that's pretty much what we discussed 2010 in Copenhagen
17:18 TimToady just don't want to stop at @*INC as our only extensible API for this
17:18 Chillance joined #perl6
17:33 TimToady timotimo: re http://irclog.perlgeek.de/perl6/2013-01-29#i_6388556 it always bothers me when people use the word "bind" in the same sentence as "native", since to my C brane assignment is the only native operation, and so-called "binding" is just assignment of native pointers without indirecting through them
17:33 TimToady or is that what is being "fixed" there?
17:34 timotimo i don't really know, to be honest
17:35 TimToady we just had an inversion of the primitive-ness of binding vs assignment once in rakudoland, and I'd just as soon not go through that again, so I'm probably barking at the moon again
17:35 [Coke] nwc10: official SYN at https://github.com/perl6/specs | http://perlcabal.org/syn/
17:35 [Coke] ;(depending on if you want source or formatted/annotated)
17:35 TimToady but what's the good of PTSD if not to avoid additional trauma in the future :)
17:35 timotimo all i know is i can't $foo++ on a native attribute ;)
17:36 perigrin Post Traumatic Daylight Savings Time.
17:36 TimToady whereas we all know C can do that with assignment on native types easily enough
17:37 TimToady well, having sniped my backlog bullets, I should probably hit the road; will be offline for most of a day or two
17:39 timotimo i might spend a few more tuits on ipython-perl6-integration throughout the rest of the day
17:39 * timotimo commutes
17:39 [Coke] timotimo: safe travels.
17:39 [Coke] oops.
17:39 [Coke] TimToady: safe travels.
17:40 TimToady well, timotimo too :)
17:40 TimToady afk &
17:51 balders_1od joined #perl6
17:51 cog joined #perl6
17:59 masak salutations, #perl6
18:01 moritz \o masak
18:05 b1rkh0ff joined #perl6
18:07 * jnthn back :)
18:10 moritz welcome back jnthn
18:10 FROGGS joined #perl6
18:11 FROGGS olá
18:13 * timotimo will try to understand exactly how the perl6 debugger CLI module works
18:14 jnthn timotimo: If you figure it out, let me know ;)
18:14 FROGGS hehe
18:16 timotimo hah
18:18 moritz "with magic"
18:26 masak I will go to FOSDEM, Bruxelles, this weekend! \o/ gonna talk about Perl 6 for 20 whole minutes.
18:26 timotimo i only need to know a little bit about it
18:26 timotimo oh, neat! a thunder-talk?
18:26 masak only if I give it in a booming voice.
18:33 masak I'm reading http://rosettacode.org/wiki/Carmichael_3_strong_pseudoprimes,_or_Miller_Rabin%27s_nemesis#Perl_6 and thinking "so, TimToady doesn't like sigils anymore?" :P
18:33 sftp joined #perl6
18:34 jnthn r: say 20.1 / 144
18:34 p6eval rakudo 92c30b: OUTPUT«0.139583␤»
18:34 atrodo joined #perl6
18:35 jnthn OK, lexotic performance ain't what I want yet, but going from "takes a bit longer than NQP on Parrot" to "runs in 14% of the time of NQP on Parrot" will do for now...
18:35 japhb w00t
18:35 masak jnthn++
18:36 * jnthn prods dalek
18:36 dalek nqp-jvm-prep: e4718ec | jnthn++ | src/org/perl6/nqp/runtime/ (3 files):
18:36 dalek nqp-jvm-prep: Improve lexotic performance.
18:36 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/e4718ec78e
18:36 jnthn timotimo: May be worth retrying levenstein with latest.
18:37 nwc10 \o/
18:37 [Coke] jnthn++
18:37 nwc10 but, it still takes positive time? And finishes after you start it? That's, um, not good enough :-)
18:37 jnthn timotimo: Thanks for trying it before; I'm happy knowing you got the code to run with few modifications. If you've a moment to tell me what you had to change to make it run it'd be nice to put on my todo list :)
18:38 nwc10 I thought that the point of using a VM was that the clock was shot, and time was unreliable :-)
18:39 [Coke] (no sigils) yah, 'sweird.
18:40 jnthn Dinner...more hacking later, hopefully :)
18:41 [Coke] is ^..^ the neko?
18:47 FROGGS phenny: tell sorear that there is a typo at: https://github.com/sorear/niecza/blob/master/src/NieczaActions.pm6#L2171
18:47 phenny FROGGS: I'll pass that on when sorear is around.
18:48 nwc10 moritz: I *think* that I'd conclude that the idea of 'perl', 'vendor' and 'site' are useful to fake up the idea of a union directory across parts of the filesystem controlled by the OS packaging system, and the end user
18:49 * arnsholt is finally decommuted
18:49 nwc10 moritz: but that's really all they solve. What's needed to be built (properly) is a way within the (union) directory to store multiple versions of the "same" module, with different versions, and different "owners" (in the sense of forks, patched, etc)
18:49 arnsholt Forgot my keys on my desk, and didn't discover it until it was time to unlock my door >.<
18:50 nwc10 moritz: you "need" 'perl' and 'vendor' to cope with certain inferior packaging systems which don't permit a second package to override/update files owned by a first package
19:06 kaare_ joined #perl6
19:14 timotimo jnthn: nqp::join was missing, that is all.
19:14 timotimo also, nqp::substr does an index check on jvm, but not on parrot and i did it wrong
19:14 moritz nwc10: like dpkg/apt?
19:15 jnthn timotimo: ah, ok, thanks.
19:16 nwc10 dpkg has a concept of "diversions", or something like that. It doesn't need 'vendor'. In Perl 5 terms, a .deb that updates a dual life module can replace the files in /usr/lib/* owned by the 'perl' package no problem
19:16 nwc10 er F<vendor> and C<perl>
19:16 nwc10 It's RPM that needs help.
19:17 benabik dpkg++
19:17 nwc10 Ian Jackson is a very thorough smart cookie
19:17 arnsholt Right. Let's see if this P6int refactor works
19:17 nwc10 I don't know whom one blames for RPM
19:17 [Coke] I have never had any luck with packaged perl modules, and am so glad I can live on perlbrew.
19:18 nwc10 (or which pub to find him/her/it in)
19:18 * benabik rather likes rubygem & bundler
19:18 benabik For dealing with dependency issues
19:19 moritz [Coke]: me neither, but at $work we use packaged perl modules on Debian exclusively
19:19 [Coke] what do you do when you want a module that isn't packaged?
19:19 japhb Sadly, while bundler is indeed necessary, it is only necessary because of scary disregard for backward compatibility.  I'm not sure which came first.
19:20 benabik It's difficult to ensure that every gem packager will care about backward compatibility.
19:20 * skids remembers hacking ExtUtils::MakeMaker to autogen deb packages, and then the response to that seemed to be "meh".  Somewhat disenheartening.
19:21 japhb benabik, I think it's cultural.  Perl module culture treats backwards compatibility as important, a mark of good module maintainership.  Yes, it gets broken, but the better modules only do it when they have to, and usually with a major version bump.
19:22 japhb In the Ruby world, flagship packages will be painfully incompatible with third-level rev bumps, and no apologies: "Just update the bundle!"
19:23 benabik Ruby is still a little wild west, with high rate of change in too many things.  :-/
19:23 japhb As a person steeped in Perl culture, the latter makes me >.< but my Ruby-centric friends don't see what bothers me, and in fact see the Perl way as painful drag.
19:23 moritz [Coke]: package it, avoid it
19:23 benabik But the base gem system is pretty simple to work with, and is flexible enough for bundler to not have been too much of a pain.
19:23 moritz erm, package it or avoid it
19:24 japhb .oO( package it then avoid it )
19:24 nwc10 for a straw poll of one sysadmin who expressed a preference (or is that a rant) the Ruby way is really annoying
19:24 nwc10 and I know that it doesn't fit with how Debian wants to package stuff
19:24 nwc10 not sure if this is a general sysadmin thing
19:25 [Coke] If I'm installing apps in production now, I carry a copy of everything with me anyway. (of course, I'm doing this in java, but it seems reasonable to have the same approach in perl)
19:25 [Coke] rather than expecting the system perl to be the one with the specific app module I want.
19:25 [Coke] (or, in my case, the system classpath.)
19:26 japhb Oh, the sysadmins at my $day_job loathe that about Ruby. But I count them as biased since they all speak Perl somewhere between the "baby talk" and "decent app programmer" level.
19:26 nwc10 I think that the sysadmin frustration is "package X which I know that we use just got a CVE. How many places do I need to look to find it and fix it?"
19:26 nwc10 it strikes me that it's the filesystem equivalent of copy-paste
19:27 nwc10 a DRY violation
19:28 [Coke] think of the "on the disk" as "compiled" with your build process as the source. fix it once in the source and then recompile.
19:28 moritz if you have an automated process for that (and one that runs the tests to ensure nothing is broken), that's fine
19:28 nwc10 that's reasonable if your "gem"-like thing's upstream is a local private mirror, I guess.
19:28 moritz and that automated process tends to be a packaging system
19:28 japhb Yup.  In production we system-package our Perl modules (even the ones we write ourselves), both to solve the CVE problem by just updating our local package repo, and so that replacing a system that just went sideways is a lot easier and faster for the poor junior sysadmin stuck doing the recovery.
19:29 nwc10 but, actually, we're back to TimToady's issue - having a way to have more than one version of the same "thing"
19:29 [Coke] (and with java, at least, it's not horrible, because we're all running inside containers, so it's easy to find who is using what even if we didn't have a decent build process. ... which, honestly, we don't. :)
19:29 nwc10 There is also this crazy irony that Java was brought to us by the firm who were fantastically reliable at API compability on their OS
19:29 [Coke] nwc10: well, I only ever see my copy.
19:30 nwc10 somehow that clue didn't rub off on the part that did Java
19:30 moritz eeks. So if a Perl 6 module depends on an exact version of another module, and that has a security hole, just providing a newer, fixed module doesn't solve the problem
19:30 japhb YES
19:31 japhb That has been bugging me for a while.
19:31 nwc10 moritz: mmm yes, good point, it won't
19:31 nwc10 not thought of it like that
19:31 japhb One of the nice things about Ruby bundles is the ability to basically mask a version requirement, almost like CIDR with IP addresses.
19:31 nwc10 seems that you also need a "diverts" mechanism on your INC tree/database
19:31 japhb So you can say "Any 2.4.x will work", and then CVE fixes just bump the .x.
19:32 nwc10 or at least some way to "rescind" particular versions
19:33 [Coke] assuming that fixing the CVE doesn't introduce some other breakage. seems like you'd still need to test that out before pulling the trigger.
19:34 moritz but that kind of testing is done with a staging environment, and not part of the package manager
19:35 japhb [Coke], sure, but then we're back to culture: If Ruby module maintainers followed the compatibility strictures implied by the bundles version mask feature, it would be no problem.
19:35 japhb Problem is, the Rails guys REALLY DON'T FOLLOW THAT.
19:35 benabik Fortunitely the gem system exists separate from its usage.  :-/
19:36 masak today's relaxing programming on a train: Sieve of Eratosthenes, using streams. https://gist.github.com/4666979
19:36 japhb Yes.  The only reason I'm semi-ranting now is I want the Perl 6 ecosystem to have a design at least as good as gems/bundler, but still with the culture of Perl and a dollop of scales-to-a-thousand-systems
19:38 moritz masak: very nice. Though I'd try to express the final loop { } as a sequence
19:38 moritz repeatedly doing $obj = $obj.method  usually calls for  $obj , *.method ... *
19:39 moritz r: https://gist.github.com/4666979
19:39 masak moritz: ooh.
19:39 p6eval rakudo 92c30b: OUTPUT«(timeout)2â�¤3â�¤5â�¤7â�¤11â�¤13â�¤17â�¤19â�¤23â�¤29â�¤31â�¤37â�¤41â�¤43â�¤47â�¤53â�¤59â�¤61â�¤67â�¤71â�¤73â�¤79â�¤83â�¤89â�¤97â�¤101â�¤103â�¤107â�¤109â�¤113â�¤127â�¤131â�¤137â�¤139â�¤149â�¤151â�¤157â�¤163â�¤167â�¤173â�¤179â�¤181â�¤191â�¤193â�¤197â�¤199â�¤211â�¤223â�¤227â�¤229â�¤233â�¤239â�¤241â�¤251â�¤257â�¤263â�¤269â�¤271â�¤277â�¤281â�¤283â�¤293â�¤307â�¤311â�¤313â�¤317â�¤331â�¤337â�¤347â�¤349â�¤353â�
19:39 moritz nr: say 353.is-prime
19:39 p6eval rakudo 92c30b, niecza v24-18-gaf64300: OUTPUT«True␤»
19:40 masak my solution is longer than any of the ones on RC: http://rosettacode.org/wiki/Sieve_of_Eratosthenes#Perl_6 -- though I still wonder if I shouldn't add it.
19:40 moritz yes, please do
19:42 masak just gonna try to figure out the infix:<...> thingy first.
19:43 masak my $i;
19:43 masak say $i = .next for $stream, *.filter($i) ... *;
19:43 masak that's... probably the weirdest series I've ever written.
19:44 timotimo jnthn: i don't understand why the debugger cli is invoked at all :(
19:44 masak it's very pretzely. :) but it works.
19:44 moritz it does? :-)
19:44 masak oh, and of course $i should be $prime
19:44 masak moyes, I tested it.
19:45 masak moritz*
19:45 timotimo i see that "handle-exception" is wrapped, but is that all? how do the debug hooks go from the p6 code to the nqp code?
19:45 * moritz has inherited his love for pretzely things to his daughter
19:45 masak say my $prime = .next for $stream, *.filter($prime) ... *;
19:45 masak lovely.
19:46 masak it... it iterates over a strem that it keeps wrapping in new streams with each iteration...
19:46 * masak 's head asplodes
19:47 moritz another idea would be to iterate over [$stream, $prime] pairs
19:47 japhb moritz, Well, IIRC mothers become micro-chimeric.  I have yet to see a similar result for fathers, though certainly non-human cells will transfer ....
19:48 * moritz wonders if japhb misread the 'to' as a 'from'
19:48 japhb Yes, I did, because 'has inherited ... to' doesn't compute.  :-)
19:49 japhb 'has passed on ... to' or 'has inherited ... from'
19:49 moritz ok, passed on to, then :-)
19:49 japhb And it appears you meant the former and I read the latter.  ;-)
19:49 moritz though IMHO "passed on to" doesn't imply genetics; there are other ways to pass on stuff
19:50 japhb English is fuzzy about that.
19:50 masak memetics is very in anyway.
19:50 moritz though, come to think of it, "inherit" isn't necessarily genetic either
19:50 moritz and neither is its German translation
19:50 japhb For example, you can say "bequeathed to" and mean "assigned inheritance in a will", or more metaphorically "passed down from generation to generation somehow"
19:51 moritz I guess those words are just older than genetics
19:51 japhb nodnod
19:51 dalek nqp/dyncall-sized-num: d09685a | (Arne Skjærholt)++ | src/ops/nqp.ops:
19:51 dalek nqp/dyncall-sized-num: Refactor get_attr_{int,num} (which comes in two variants).
19:51 dalek nqp/dyncall-sized-num:
19:51 dalek nqp/dyncall-sized-num: They shared some code that takes a pointer and a number of bits and
19:51 dalek nqp/dyncall-sized-num: dereferences the pointer as an appropriately sized int/num, so refactor those
19:52 arnsholt Whoops. I keep killing dalek these days
19:52 dalek joined #perl6
19:52 moritz if that means getting commits, go right ahead and kill it again :-)
19:53 japhb Need to tune dalek to whatever the Freenode admins lowered the limits to, I guess.
19:53 spider-mario joined #perl6
19:54 masak added streams solution: http://rosettacode.org/wiki/Sieve_of_Eratosthenes#Perl_6
19:54 moritz masak: fwiw it would be less pretzely if your stream role would separate stepping to the next number, and retrieving that number
19:54 larks joined #perl6
19:54 moritz then it would just be .say for map *.value, StreamOfIntegers.new, *.next ... *;
19:54 arnsholt jnthn: Could you review my changes in nqp/dyncall-sized-num? I think this is a good point to make sure it's good before moving P6num over to the new scheme
19:55 masak moritz: or even say .value
19:55 masak moritz: yes, I will try for that.
19:55 moritz masak: right
19:55 masak moritz: thanks for your feedback. it is well taken.
19:55 masak :)
19:55 * masak always endeavours to be less confusing and (preferably) less pretzel-y
19:57 moritz masak: funny enough, separating comands from queries is one of the principles of DDD, which, IIRC, you (and not me) are the expert for :-)
19:57 masak moritz: no, I don't see how that'd work. because the next value *feeds back* into filtering the stream.
19:57 masak hence the pretzel.
19:57 masak so, no-go.
19:58 masak that was present even in the loop. but maybe not so obvious.
19:59 masak oh! I guess I could `say .value for StreamOfIntegers.new, { .filter(.value) } ... *`
19:59 masak yes, that'd work.
20:00 cog joined #perl6
20:00 moritz well, if .filter and .value are on the same object, .filter could read the .value directly
20:00 timotimo well, instacode is obviously not hosted in the cloud. seems like it's having major problems keeping up with interest
20:00 moritz timotimo: or maybe the cloud is too thin
20:01 masak moritz: ooh
20:01 moritz but my head it too cloudy to implement it right now
20:06 jnthn arnsholt: In https://github.com/perl6/nqp/commit/8d3eb1156947e85577e90289cae2af3298af7ff6 there's a TODO but also compose time may be a better time to check for bit counts we can't handle.
20:07 masak new version: https://gist.github.com/4666979
20:07 masak yes, this is obviously much nicer. moritz++
20:07 * masak re-uploads to RC, too
20:13 jnthn arnsholt: About the union in P6int - if we actually use this flattened into a P6opaque, are all the 64 bits actually available?
20:13 jnthn arnsholt: If not, initialize and copy_to look like they'll scribble over memory they should not.
20:13 nwc10 moritz: thinking about this a bit more in the bath. If we were redoing @INC in Perl 5 now, I think we'd have 5 locations
20:13 arnsholt jnthn: I'm pretty sure they are
20:14 nwc10 'perl', 'vendor', 'site', 'user', 'project'
20:14 arnsholt A union type is the size of its largest member, so it should be pretty similar to struct { INTVAL value }, except it's exlicitly able to be accessed as different types
20:14 nwc10 in *nix terms, 'perl' and 'vendor' map into /usr/ and are for files owned by the packaging system
20:14 nwc10 'site' is /usr/local and is owned by root
20:14 nwc10 'user' is local::lib, probably in ~/
20:15 nwc10 and 'project' (or 'project' ...) is the tree within a particular project
20:15 arnsholt Or, that's how I remember unions working, at least. I can check with my K&R at work in the morning
20:15 jnthn arnsholt: Yes, I meant when it's inlined.
20:15 nwc10 these are effectively treated as a union directory of "installed files"
20:15 nwc10 which version you load from where is then layered atop that union directory
20:15 jnthn arnsholt: If P6opaque sees something that needs 16 bits and gives it 16 bits, then P6int tries to act as if there's 64 bits there, we'll get problems.
20:16 arnsholt Oh, right!
20:16 mst nwc10: I did to have 'platform' plus 'project'
20:16 mst nwc10: and my 'user' env is separate
20:16 nwc10 (oh, and command line options such as -I and env variables such as PERL5LIB add to it. It would also be useful to have two sorts of -I, one to push to @INC, one to unshift)
20:17 arnsholt jnthn: That's a very good point, and may very well lead to terrible, terrible consequences
20:18 timotimo is perl6-users@ interesting?
20:18 mst nwc10: my ~/perl5 is generally only for me, at a shell prompt
20:18 mst nwc10: anything 'deployed' doesn't depend on that
20:18 nwc10 ah OK.
20:19 mst then again, 'deployed' stuff isn't deployed as a user with a ~/perl5 generally in setups I've built
20:19 mst there's a per-deployment local::lib
20:19 mst and -sometimes- we have a 'platform' local::lib that underlies N deployments
20:19 mst and then site and vendor stay empty
20:19 timotimo huh, there isn't even a mailing list by that name
20:19 dalek nqp-jvm-prep: 0cf93d3 | jnthn++ | lib/QAST/JASTCompiler.nqp:
20:19 dalek nqp-jvm-prep: Fix thinko spotted by diakopter++.
20:19 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/0cf93d36a7
20:20 nwc10 mst: ah OK. I think the key thing is that there's need for more than 3 layers of places to install files
20:20 mst nwc10: I'm not saying that's "best practice" though, just "how I do stuff"
20:20 nwc10 and that different installers own different ones
20:20 nwc10 OS, root, user
20:20 mst yes, that's definitely true
20:21 nwc10 also, would be useful to have a clear idea of a diretory where the user's processes can cache stuff
20:21 nwc10 such as generated bytecode.
20:21 nwc10 but in Perl 5 terms, where Inline would like to write to
20:21 nwc10 becaus the user's process might not have write access to the directory containing the library files that it is reading from
20:23 timotimo phenny: tell hoelzro if you had pushed the first work on perl6 for pygments to pygments-master, instacode would have perl6 support already :D
20:23 phenny timotimo: I'll pass that on when hoelzro is around.
20:25 dalek nqp-jvm-prep: b5490db | jnthn++ | nqp-jvm-cc.nqp:
20:25 dalek nqp-jvm-prep: Fix stupid !$obj thinko.
20:25 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/b5490db9c8
20:25 dalek nqp-jvm-prep: ebaafd3 | jnthn++ | t/nqp/12-logical.t:
20:25 dalek nqp-jvm-prep: Pass 12-logical.t.
20:25 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/ebaafd39ab
20:33 tadzik oh hai
20:33 tadzik jnthn: what are you doing in May 25-26?
20:34 jnthn tadzik: Lemme check schedule
20:34 jnthn tadzik: I'm free
20:34 tadzik not anymore
20:35 jnthn ok
20:35 jnthn What am I going to be doing? :)
20:35 tadzik I'm inviting everyone brave enough to Polish Perl Workshop
20:35 jnthn BEER AT SANE PRICES
20:35 tadzik That's right
20:35 masak \o/
20:35 masak tadzik++
20:36 jnthn It's added to my schedule.
20:36 tadzik The plan is for one talk day, and possibly one workshop-hackathony day
20:36 masak seems to be added to my schedule too now ;)
20:36 tadzik awesome
20:37 masak no, *you're* the awesome!
20:37 tadzik I need to talk with Book about ACT, I think
20:37 * masak .oO( get your ACT together )
20:37 jnthn tadzik++
20:38 tadzik I had to wait for beer to kick in before Warsaw.pm stopped doing "Perl is dead" jokes :P
20:39 masak "Perl is dead" jokes are so dead.
20:39 timotimo jnthn: can you briefly explain what the mechanism is that allows the debugger commandline to access $*DEBUG_HOOKS, when it's apparently defined in the nqp portion?
20:40 tadzik masak: I had an idea for a motto to be "Dead Perl", like "Modern Perl", "Future Perl etc"
20:41 [Coke] tadzik: We might have too much of a skeleton crew to pull that off.
20:41 jnthn timotimo: Line 463
20:42 jnthn timotimo: Just dynamic scoping
20:44 masak [Coke]: haven't you watched "Pirates of the Caribbean"? skeleton crews can do all kinds of stuff!
20:45 timotimo why do dynamic variables leak into the compiler itself? well it makes sense in practice to make that possible, but ... o_O
20:45 arnsholt tadzik++ # Workshop
20:45 jnthn timotimo: It's all the same callstack
20:46 timotimo amazing
20:46 jnthn We'd have to make a bunch of effort to have it *not* happen :)
20:46 [Coke] masak++
20:46 timotimo ok, i'll see how i can properly use that same method to make the ipython message format be in perl6 code and the REPL in nqp. seems pretty easy to do :)
20:47 tadzik niice
21:04 timotimo there's no uuids in perl6, right?
21:05 jnthn timotimo: Not aware of a uuid module
21:05 nwc10 every Python object has a UUID?
21:06 dalek nqp-jvm-prep: 50434ff | jnthn++ | / (2 files):
21:06 dalek nqp-jvm-prep: Initial isinvokable implementation.
21:06 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/50434ff037
21:06 dalek nqp-jvm-prep: 54d7664 | jnthn++ | t/nqp/11-sub.t:
21:06 dalek nqp-jvm-prep: Pass 11-sub.t.
21:06 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/54d7664a7f
21:06 dalek nqp-jvm-prep: 986536a | jnthn++ | lib/QAST/JASTCompiler.nqp:
21:06 dalek nqp-jvm-prep: Fix mixed positional/named passing.
21:06 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/986536a126
21:06 dalek nqp-jvm-prep: a22c3ce | jnthn++ | t/nqp/23-named-args.t:
21:06 dalek nqp-jvm-prep: Pass 23-named-args.t.
21:06 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/a22c3cebb9
21:06 timotimo could apparently somewhat easily build one with NativeCall
21:07 * nwc10 thinks you may be misunderstanding the question. Hence the clarification question
21:07 nwc10 no, maybe I am
21:09 nwc10 jnthn: that's 28 test files now passing?
21:10 timotimo i think uuidgen is good enough for now.
21:10 jnthn Files=28, Tests=231
21:12 nwc10 cool
21:12 tadzik awesome
21:12 Su-Shee joined #perl6
21:12 timotimo hm, when i have a my $*foo before i invoke the compiler and i $*foo = 10 in the perl6 code, will that change be propagated upwards, rather than shadowed? i believe it should
21:20 [Coke] jnthn: are you going to get nqp to 100% before trying a rakudo?
21:21 jnthn timotimo: Note that if it's an NQP thing you can't assign to it though
21:21 jnthn [Coke]: I'm going to get NQP able to compile itself before I try a Rakudo.
21:22 jnthn If it can't do that, it ain't gonna handle Rakudo's grammar/actions anyway
21:28 timotimo jnthn: how do you suggest i do things? i'd like to organise my functions in a class and somehow pass that, because i'd like some state. can i then create such an object and perhaps pass it outwards by calling $*GATEWAY.set_instance($my-instance)?
21:29 timotimo or can i perhaps only register functions like you did in the debugger?
21:29 jnthn timotimo: Something like that should work.
21:29 timotimo the first one? cool.
21:30 timotimo panda is not installing :(
21:30 jnthn timotimo: Yeah, just install some object in that contextual
21:30 jnthn Should work
21:30 tadzik timotimo: looking at it
21:32 timotimo When pre-compiling a module, its dependencies must be pre-compiled first.
21:32 timotimo Please pre-compile /home/timo/build/rakudo/install/lib/parrot/5.0.0-devel/languages/perl6/site/lib/Shell/Command.pm
21:32 timotimo i don't know what i'm doing wrong
21:32 tadzik duh
21:32 timotimo i'll just remove the lib folder, i guess?
21:32 tadzik rebootstrap?
21:32 timotimo i can try that, too
21:32 tadzik that's what you ought to do after rakudo updaet
21:33 timotimo that makes sense
21:43 sorear FROGGS: so there is
21:43 phenny sorear: 18:47Z <FROGGS> tell sorear that there is a typo at: https://github.com/sorear/niecza/blob/master/src/NieczaActions.pm6#L2171
21:43 sorear FROGGS: want a commit bit?
21:46 timotimo how to best read one line from $*IN in perl6?
21:46 jnthn $*IN.get
21:46 tadzik r: say $*IN.get
21:46 p6eval rakudo 92c30b: OUTPUT«Land der Berge, Land am Strome,␤»
21:47 timotimo well, that's easier than i thought
21:47 masak Land der Äcker, Land der Do-o-o-o-me!
21:47 tadzik timotimo: does panda work alright?
21:47 timotimo yes, it does :)
21:47 tadzik good :)
21:47 timotimo thanks for your ongoing work
21:47 tadzik *relief*
21:47 tadzik it's mostly my guard duty these days :)
21:48 tadzik maybe I'll do a Panda hackathon on PLPW
21:48 timotimo should i put my levenshtein implementation into panda so that panda will suggest packages if they don't exist? :)
21:48 tadzik YEEES
21:48 tadzik casing is difficult
21:48 timotimo maybe later :)
21:50 * masak .oO( in Soviet #perl6, it's tadzik's job to guard Panda )
21:50 * tadzik giggles
21:50 tadzik in Soviet #perl6 I'm good at slides, not so good at rocking horses
21:51 timotimo ... horses rock you ...?
21:51 tadzik WHEEEE will rock you!
21:51 timotimo neigh will rock you?
21:51 tadzik yeah, this :)
21:52 masak I always figure I'll be good at slides as soon as I make me the presentation framework I envision in my mind.
21:52 tadzik haha
21:52 cosimo procrastination FTW
21:53 tadzik cosimo! \o/
21:53 cosimo :)
21:53 masak no no you don't understand :P
21:53 tadzik coming to the Polish Perl Workshop?
21:53 masak cosimo! \o/
21:53 benabik joined #perl6
21:57 sorear o/
21:57 tadzik sorear! \o/
21:57 cosimo hey
22:03 masak sorear! \o/
22:08 sorear masak!
22:14 timotimo is it enough to set $*IN and $*OUT to something so that print, say and friends will end up in a variable and such? is there a class like a C++ StringStream or Python StringIO?
22:14 jnthn timotimo: I think there's an IO::Capture module
22:15 [Coke] timotimo: see t/spec/rosetta* for an example of tying IN/OUT
22:16 timotimo thanks
22:17 timotimo that's so simple, how can it work?
22:17 tadzik haha
22:17 tadzik magic
22:19 [Coke] It may in fact be too simple. I'm not doing much in that code to trap.
22:19 masak timotimo: things are that simple when there's a good design underneath.
22:21 dalek nqp-jvm-prep: f8e9edc | jnthn++ | lib/QAST/JASTCompiler.nqp:
22:21 dalek nqp-jvm-prep: Implement indirect method lookup.
22:21 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/f8e9edc129
22:21 dalek nqp-jvm-prep: 6e4f0d6 | jnthn++ | t/nqp/26-methodops.t:
22:21 dalek nqp-jvm-prep: We pass 26-methodops.t.
22:21 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/6e4f0d6a71
22:21 dalek nqp-jvm-prep: c666246 | jnthn++ | src/org/perl6/nqp/sixmodel/reprs/P6Opaque (3 files):
22:21 dalek nqp-jvm-prep: Implement auto_viv_container support.
22:21 dalek nqp-jvm-prep:
22:21 dalek nqp-jvm-prep: Or at least, as much of it as NQP needs. It'll need a small addition,
22:21 dalek nqp-jvm-prep: but probably not until we get to porting Rakudo.
22:21 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/c666246b54
22:21 dalek nqp-jvm-prep: 0eb4634 | jnthn++ | t/nqp/ (4 files):
22:21 dalek nqp-jvm-prep: Four more passing test files.
22:21 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/0eb46344e8
22:24 [Coke] jnthn++
22:26 timotimo jnthn: will you get the return tuit invested today?
22:28 timotimo what do i need to override in $*IN so that i can properly handle prompt() and such?
22:28 timotimo probably read($num)?
22:29 jnthn timotimo: I committed the return improvement earlier
22:29 timotimo oh, neat!
22:29 timotimo i'll try the benchmark again then :)
22:29 jnthn Didn't fix the substr thing or add join yet
22:30 jnthn But there's test coverage for both.
22:30 jnthn So will get to them.
22:30 jnthn Not today though :)
22:30 timotimo that's totally okay!
22:30 timotimo the join was a bad idea anyway
22:31 timotimo nqp::join(":", ($a, $b)), why have a join if i can have a ~ instead?
22:31 jnthn aye :)
22:33 timotimo wow
22:33 timotimo 8.17user 0.46system 0:07.32elapsed 117%CPU  <- jvm | parrot ->  22.46user 0.30system 0:22.84elapsed 99%CPU
22:34 timotimo jnthn++
22:35 jnthn Not spectacularly faster, but faster :)
22:38 timotimo okay, try getting parrot that fast with the same amount of work and then i'll allow you to call that "not spectacular"
22:49 masak "relatively impressive", perhaps. :P
22:50 jnthn D e lagom :P
22:53 jnthn sleep, 'night o/
22:54 timotimo good night jnthn!
22:59 pmurias joined #perl6
22:59 pmurias tadzik: when is the Polish perl workshop?
22:59 phenny pmurias: 15:30Z <jnthn> tell pmurias you could mention which one it was looking for I guess but the IDs are pretty meaningless from a user perspective. Maybe as a debugging option it makes sense...
23:01 nwc10 \o/
23:02 pmurias nwc10: \o/
23:02 nwc10 timotimo: are those times for compiling and running, for the code which runs stuff 4 times?
23:03 tadzik pmurias: May 27-28th
23:04 jlaire joined #perl6
23:04 timotimo nwc10: it runs the stuff 1000 times and does 6 calls (not 4, i made a mistake) of levenshtein in a for loop
23:04 timotimo and yes, the compile time is part of that
23:04 timotimo both compiling the cc and the levenshtein
23:05 pmurias tadzik: in Warsaw?
23:08 timotimo any way to get subsecond time in DateTime?
23:08 pmurias tadzik: any link?
23:09 benabik joined #perl6
23:12 pmurias timotimo: hmm, the Perl6 version of that seems to be missing the nanosecond argument
23:13 timotimo i can probably just create dummy values until then. i'll have to munge the .Str anyway, because the other side probably doesn't expect the timezone part. at least it doesn't create that in the "reference implementation"
23:13 timotimo no clue if it would be tripped up if it's there
23:14 tadzik pmurias: yes; not yet
23:14 * pmurias hopes to have rakudo-js ready to present by then ;)
23:15 pmurias or at least a nicely working nqp-js ;)
23:15 tadzik that'd be super-awesome
23:16 pmurias timotimo: .second should return the second with the subsecond part
23:16 nwc10 so, roughly, for "moderate sized chunk of code which does stuff", the NQP-JVM prototype can cross-compile it, shell out the the JVM to complete the compilation, and shell out to the JVM again to run it. In about one third of the time that NQP on Parrot takes to compile and run it?
23:17 jlaire joined #perl6
23:17 pmurias nwc10: for a long numeric task, yes
23:19 timotimo pmurias: but it doesn't
23:19 timotimo r: DateTime.now().second.say
23:19 p6eval rakudo 92c30b: OUTPUT«12␤»
23:19 pmurias timotimo: so it's a bug
23:19 timotimo there are apparently no tests for that :)
23:20 pmurias DateTime has a whole-seconds method, so that implies .seconds dosn't return whole seconds
23:28 masak it doesn't, it returns fractional seconds.
23:28 masak so, I rewrote the Sieve of Eratosthenes with streams, but using only lambdas: https://gist.github.com/4668987
23:28 masak it's wonderfully short.
23:28 masak it doesn't work, though -- something is wrong with it. I can't figure out what :/
23:29 masak it feels like some routine is wrongly cloned somewhere.
23:29 masak too tired to figure it out now, I fear.
23:29 masak 'night, #perl6
23:31 timotimo night masak!
23:31 timotimo wow, wat
23:36 skids joined #perl6
23:37 swarley r: say Q/%q~hello~/ ~~ /'%q' <-alnum + ws>/ # Honestly, I don't think this is how it works but no harm in trying
23:37 p6eval rakudo 92c30b: OUTPUT«「%q~」␤␤»
23:37 swarley Oh, sweet it does
23:39 timotimo something that annoys me is i can't do something like my $username = q:x{whoami} || "camilla"
23:39 timotimo because q:x doesn't have any way to get the return value
23:39 swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<-alnum + ws>) ~ $0 [ <-[$0\\]> | \\ . ]/
23:39 p6eval rakudo 92c30b: OUTPUT«Unable to parse expression in ; couldn't find final $0␤  in any FAILGOAL at src/stage2/QRegex.nqp:1038␤  in regex  at /tmp/pYNcSh9Aw8:1␤  in method ACCEPTS at src/gen/CORE.setting:10738␤  in block  at /tmp/pYNcSh9Aw8:1␤␤»
23:39 swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<-alnum + ws>) ~ $1 [ <-[$1\\]> | \\ . ]/
23:39 p6eval rakudo 92c30b: OUTPUT«Unable to parse expression in ; couldn't find final $1␤  in any FAILGOAL at src/stage2/QRegex.nqp:1038␤  in regex  at /tmp/D0FMQ0Yjaf:1␤  in method ACCEPTS at src/gen/CORE.setting:10738␤  in block  at /tmp/D0FMQ0Yjaf:1␤␤»
23:40 swarley r: say Q/%q~hello\~~/ ~~ /'%q' $delim=<-alnum + ws> ~ $delim [ <-[$delim\\]> | \\ . ]/
23:40 p6eval rakudo 92c30b: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$delim' is not declared�at /tmp/gBNU_X9GWb:1�------> [32msay Q/%q~hello\~~/ ~~ /'%q' $delim[33m�[31m=<-alnum + ws> ~ $delim [ <-[$delim\\]> [0m�»
23:40 swarley r: say Q/%q~hello\~~/ ~~ /'%q' $< $delim >=<-alnum + ws> ~ $< $delim > [ <-[$< $delim >\\]> | \\ . ]/
23:40 p6eval rakudo 92c30b: OUTPUT«Unable to parse expression in ; couldn't find final $< $delim >␤  in any FAILGOAL at src/stage2/QRegex.nqp:1038␤  in regex  at /tmp/puwR8GxRhD:1␤  in method ACCEPTS at src/gen/CORE.setting:10738␤  in block  at /tmp/puwR8GxRhD:1␤␤»
23:41 timotimo i guess i *could* match the output of whoami against <[a..zA..Z0-9_-]>
23:41 swarley r: say Q/%q~hello\~~/ ~~ /'%q' $< $delim >=<-alnum + ws> ~ $< $delim > [ <-$< $delim > | \\ > | \\ . ]/
23:41 p6eval rakudo 92c30b: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter < (must be quoted to match literally)�at /tmp/KcIRiNd4Yv:1�------> [32mdelim >=<-alnum + ws> ~ $< $delim > [ <-[33m�[31m$< $delim > | \\ > | \\ . ]/[0m�Unrecognized regex metacharacter ~ (must be q…
23:42 swarley r: say Q/%q~hello\~~/ ~~ /'%q' $< $delim >=<-alnum + ws> ~ $< $delim > [ <-$delim | \\ > | \\ . ]/
23:42 p6eval rakudo 92c30b: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter < (must be quoted to match literally)�at /tmp/lpGnh3cVvc:1�------> [32mdelim >=<-alnum + ws> ~ $< $delim > [ <-[33m�[31m$delim | \\ > | \\ . ]/[0m�Unrecognized regex metacharacter ~ (must be quoted…
23:42 swarley hrm
23:42 swarley I thought I remembered doing something with that
23:42 * swarley reads S05 again
23:43 swarley r: say Q/%q~hello\~~/ ~~ /'%q' [ $0 = <-alnum + ws> ] ~ $0 [ <-$0 | \\ > | \\ . ]/
23:43 p6eval rakudo 92c30b: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter < (must be quoted to match literally)�at /tmp/BCl2t1jnu5:1�------> [32m~ /'%q' [ $0 = <-alnum + ws> ] ~ $0 [ <-[33m�[31m$0 | \\ > | \\ . ]/[0m�Unrecognized regex metacharacter ~ (must be quoted to …
23:44 swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<-alnum + ws>) [ <-$1 | \\ > | \\ . ]* $1/
23:44 p6eval rakudo 92c30b: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter < (must be quoted to match literally)�at /tmp/5cJW6xF0oo:1�------> [32m~hello\~~/ ~~ /'%q' (<-alnum + ws>) [ <-[33m�[31m$1 | \\ > | \\ . ]* $1/[0m�Unrecognized regex metacharacter [ (must be quoted…
23:45 swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<-alnum + ws>) [ <-[\1\\]> | \\ . ]* $1/
23:45 p6eval rakudo 92c30b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unrecognized backslash sequence: '\1'â�¤at /tmp/J5L6oQPTFc:1â�¤------> [32mello\~~/ ~~ /'%q' (<-alnum + ws>) [ <-[\[33mâ��[31m1\\]> | \\ . ]* $1/[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopper…
23:45 swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<-alnum + ws>) [ <-[$1\\]> | \\ . ]* $1/
23:45 p6eval rakudo 92c30b: OUTPUT«#<failed match>␤»
23:47 jlaire joined #perl6
23:48 swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<foo=-alnum + ws>) [ <-[$<foo>\\]> | \\ . ]* $<foo>/
23:48 p6eval rakudo 92c30b: OUTPUT«#<failed match>␤»
23:48 swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<foo=-alnum + ws>)/
23:48 p6eval rakudo 92c30b: OUTPUT«「%q~」␤ 0 => 「~」␤␤»
23:49 swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<foo=-alnum + ws>) [ <-[$<foo>\\]> | \\ . ]/
23:49 p6eval rakudo 92c30b: OUTPUT«「%q~h」␤ 0 => 「~」␤␤»
23:49 swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<foo=-alnum + ws>) [ <-[$<foo>\\]> | \\ . ]*/
23:49 p6eval rakudo 92c30b: OUTPUT«「%q~hell」␤ 0 => 「~」␤␤»
23:49 swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<foo=-alnum + ws>) [ <-[$<foo>\\]> | \\ . ]* $<foo>/
23:49 p6eval rakudo 92c30b: OUTPUT«#<failed match>␤»
23:50 swarley r: say Q/%q~hello\~~/ ~~ /'%q' <foo=-alnum + ws> [ <-[<~~foo>\\]> | \\ . ]* <~~foo>/
23:50 p6eval rakudo 92c30b: OUTPUT«[31m===[0mSORRY![31m===[0m�Sorry, ~~ regex assertion with a capture is not yet implemented�at /tmp/VqpnoJwVOa:1�------> [32m + ws> [ <-[<~~foo>\\]> | \\ . ]* <~~foo[33m�[31m>/[0m�»
23:52 swarley r: say Q/%q~hello\~~/ ~~ /'%q' <foo=-alnum + ws> [ <-[<{ $<foo> }>\\]> | \\ . ]* <{ $<foo> }>/
23:52 p6eval rakudo 92c30b: OUTPUT«use of uninitialized value of type Any in string context  in regex  at /tmp/7Qd5FjsPHJ:1␤␤Unexpected named parameter 'value' passed␤  in sub infix:<does> at src/gen/CORE.setting:12450␤  in sub MAKE_REGEX at src/gen/CORE.setting:10713␤  in regex  at /tmp/7Qd5FjsPHJ:…
23:52 swarley blah
23:52 hash_table joined #perl6
23:53 swarley r: say Q/%q~~/ ~~ /'%q' <foo=-alnum + ws> [ <-[$<foo>\\]> | \\ . ]* $<foo>/
23:53 p6eval rakudo 92c30b: OUTPUT«#<failed match>␤»
23:54 swarley r: say Q/%q~~/ ~~ /'%q' <foo=-alnum + ws> $<foo>/
23:54 p6eval rakudo 92c30b: OUTPUT«#<failed match>␤»
23:54 swarley r: say Q/%q~~/ ~~ /'%q' <foo=-alnum + ws> <{ say $<foo> }>/
23:54 p6eval rakudo 92c30b: OUTPUT«Any()␤Any()␤#<failed match>␤»
23:55 lue joined #perl6
23:56 swarley r: say Q/%q~~/ ~~ /'%q' (<-alnum + ws>) <{ say $0 }>/
23:56 p6eval rakudo 92c30b: OUTPUT«「~」␤␤「」␤␤#<failed match>␤»
23:57 swarley r: say Q/%q~~/ ~~ /'%q' (<-alnum + ws>) $0/
23:57 p6eval rakudo 92c30b: OUTPUT«「%q~~」␤ 0 => 「~」␤␤»
23:57 swarley r: say Q/%q~~/ ~~ /'%q' (<-alnum + ws>) [ <-[$0\\]> | \\ . ]* $0/
23:57 p6eval rakudo 92c30b: OUTPUT«「%q~~」␤ 0 => 「~」␤␤»

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

Perl 6 | Reference Documentation | Rakudo