»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
felher timotimo: this may happen if you try to run java 1.7 bytecode or compile to java 1.7 byte code using a java 1.6 JDK 00:00
timotimo oh, it's probably not enough to just give the full path to javac 00:01
how do i properly do that? i have a 1.7 in my home 00:02
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 jerome left
felher Well, /me has to sleep now. 00:06
timotimo: good luck :) 00:07
timotimo thank you! :)
well, the tests run now 00:08
that's good 00:09
the nqp tests seem somewhat slow, but maybe that's because it spins up a whole jvm every time? 00:11
FROGGS you could monitor java's pid
timotimo well, prove runs one executable per test file at least 00:12
probably not one whole jvm per test case, though, that wouldn't make any sense
Files=15, Tests=95, 39 wallclock secs - Files=77, Tests=1699, 48 wallclock secs
guess which one is jvm-nqp and which is parrot-nqp
FROGGS thats easy :o)
so the startup time is a major impact 00:13
timotimo would like to see the microbenchmark
probably
FROGGS s/is/has/
gist.github.com/4659741
timotimo thanks :)
FROGGS dunno where timecmd comes from
timotimo i don't like this benchmark at all 00:14
FROGGS change it
diakopter try the increment in the sub 00:15
FROGGS thats what I want to ask you too, change the sub so it does something
timotimo hm, doesn't work in my nqp
maybe have to update again
although all the tests had passed
FROGGS not that JVM has an optimizer which gets rid of sub calls to no-ops 00:16
timotimo yes
er, maybe
diakopter FROGGS: sure it does
it might even inline that call even if you put the increment in the sub 00:17
FROGGS ya...
well, after all what matters is time, not how slow it would be without its optimizer 00:18
00:18 amedeo009 joined
FROGGS a real world app would be a better benchmark 00:18
00:18 arlinius left
timotimo indeed. not terribly much to make yet, no? 00:18
00:19 jerome joined, amedeo009 left
japhb_ FROGGS, perhaps, say, compiling Rakudo's setting ...? :-) 00:20
timotimo oh, indeed, lots of changes i didn't have yet
FROGGS japhb++
would like to see rakudo recompiled within 10 sekonds ;o)
timotimo rakudo's setting is nqp?
FROGGS there are severaal stages, but yes, I believe it is somehow nqp-y 00:21
timotimo i thought it was perl6, but the closer to the beginning you are the fewer classes you can use
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
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.
putting $i++ into the sub makes it marginally faster (i believe it's only noise though) 00:24
er, wait, wouldn't nqp itself be the first big benchmark?
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)?
timotimo no, these are tests from the nqp test suite only, and they are already copied over to nqp-jvm-prep 00:28
trying to figure out about how much already works in nqp-jvm 00:29
so, do i understand correctly, that nqp could be compiled even to C?
diakopter well 00:30
or Perl 5? 00:31
why C?
you'll have to roll your own Garbage Truck if you do C
japhb_ And you get the joy of implementing eval ... 00:33
timotimo hm, right.
FROGGS .oO( I dont care, I have 8gigs mem :o) )
diakopter ha 00:34
timotimo i mean, rpython (from the pypy project) compiles down to C normally and it's got some restrictions that remind me of nqp
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:39
in this case i can just use ~ instead
it runtime-errors, though, doesn't seem to abort properly 00:40
oh, i think i know what's going on. && isn't short-circuiting 00:45
no, it is 00:46
aaaah i don't know what's going on 00:50
00:51 Chillance left
timotimo why does this break/work?! >_< 00:51
aaaaaah 00:52
nqp-jvm is harsher when it come to nqp::substr than parrot-nqp is
and there's an off by one in my levenshtein code! 00:53
japhb_ (porting as a way to find bugs)++
timotimo the parrot version is quite a bit faster 00:56
100 x 4 levenshteins: parrot: 2.68user 0.18system 0:02.89elapsed 99%CPU (0avgtext+0avgdata 196616maxresident)k
jvm: 6.69user 0.37system 0:05.66elapsed 124%CPU (0avgtext+0avgdata 145320maxresident)k
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:57
timotimo 300x4, parrot: 7.33user 0.17system 0:07.53elapsed 99%CPU - 10.02user 0.40system 0:09.04elapsed 115%CPU jvm
it only compiles once, the code itself contains the for loop
22.49user 1000x4 on parrot 00:58
21.78user 1000x4 on jvm 00:59
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:01
which makes sense
i was hoping it'd be ridiculously much faster 01:03
the microbenchmark put my hopes up quite high
diakopter knows the feeling 01:04
java can do no-ops quite fast!
timotimo on the other hand: hey, it can run some real-world code (almost) without modification! 01:10
01:10 sftp left 01:11 anuby joined 01:13 atrodo left 01:16 hypolin joined 01:48 xinming left 01:50 xinming joined 01:51 anuby left, anuby joined 01:53 betterwo1ld joined
TimToady rosettacode.org/wiki/Numeric_error_...ion#Perl_6 # interesting translation of the Perl 5 code 02:09
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:22
timotimo more like ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ+ 02:24
because ziiiiiiiiiiiiiip isn't metaop yet
02:27 dayangkun_ joined 02:31 dayangkun left 02:41 FROGGS_ joined
timotimo would that kind of mmetaop actually work? 02:42
zip lists of lists of lists of lists?
kind of a hard thing to type on a phone keyboard 02:44
02:45 FROGGS left
diakopter haha 02:45
timotimo: isn't it late where you are? 02:46
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␤»
flussence nice
diakopter & 02:53
dalek rl6-roast-data: 0db2bc8 | coke++ | / (3 files):
today (automated commit)
02:58
timotimo diakopter: how observant of you :) 03:01
i noticed 5 minutes too late that it was time to go when the previous tram would have brought me home
would have been home 1 hour ago, but now it's 4am :| 03:02
r: say [[[0, 1], [10, 11]], [[100, 101], [110, 111]]] ZXZ+ [[[0, 2], [20, 22]], [[200, 202], [220, 222]]] 03:03
p6eval rakudo 9c9d79: OUTPUT«0 3 20 23 10 13 30 33 300 303 320 323 310 313 330 333␤»
timotimo i really have no way to figure out if this is what i'd expect right now :D
r: say [[[0, 1], [10, 11]], [[100, 101], [110, 111]]] XXZ+ [[[0, 2], [20, 22]], [[200, 202], [220, 222]]]
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␤»
timotimo r: say [[[0, 1], [10, 11]], [[100, 101], [110, 111]]] ZZX+ [[[0, 2], [20, 22]], [[200, 202], [220, 222]]] 03:04
p6eval rakudo 9c9d79: OUTPUT«0 2 1 3 30 32 31 33 300 302 301 303 330 332 331 333␤»
timotimo okay, bedtime now.
03:12 daniel-s_ is now known as daniel-s 03:29 kaleem joined 03:35 japhb_ left 03:40 hypolin left 03:47 sevin joined 03:58 balders_1od joined 04:00 balders_dod left 04:02 fhelmberger_ joined 04:03 jerome left, drbean_ joined 04:06 drbean left, drbean_ is now known as drbean 04:14 preflex_ joined 04:15 preflex left, preflex_ is now known as preflex 04:19 jerome joined
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:22 alec__ left 04:27 araym joined 04:30 xinming left 04:31 jerome left, xinming joined 04:34 araym left 04:37 sevin left 04:43 alec__ joined 04:44 jerome joined 04:46 sevin joined 04:54 fhelmberger_ left 05:15 telex left 05:18 telex joined, tokuhiro_ joined 05:20 fhelmberger joined 05:27 xinming left 05:28 xinming joined, telex left 05:36 skids left 05:37 telex joined 05:38 tokuhiro_ left 05:57 Targen left 05:58 raiph left 06:03 FROGGS_ left 06:05 b1rkh0ff left 06:06 b1rkh0ff joined 06:13 nnunley left 06:22 erkan joined, erkan left, erkan joined 06:39 raiph joined
TimToady rosettacode.org/wiki/Greyscale_bars...lay#Perl_6 06:53
jnthn
.oO( Does a greyscale bar serve greyscale beer? )
06:54
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
Perhaps the easiest way to implement sized ints in repr_at_pos would be to make at_pos like get_attr 07:17
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
Thoughts? 07:18
OTOH, the latter solution will require a new attribute REPROps, and some tweaks to P6int and P6num as well 07:27
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:29
07:31 odoacre left 07:34 odoacre joined 07:38 kaleem left, kaleem joined 07:44 alec__ is now known as ohrmazd
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
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
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.
arnsholt Yeah, that's probably a better way 07:57
jnthn Yeah, it's where I was thinking of going after pondering it for a while
arnsholt But then we're talking about using the P6int/P6num REPR doing the setting, right?
jnthn Yeah
It actually reads/writes the object body. 07:58
So this way we never touch the object body from the outside.
arnsholt Right. Then I'll look into refactoring the attribute REPROps appropriately
jnthn I think it beats the "REPR returns a reference that something on the outside derefs" thing.
Sure. See the JVM native attributes handling. 07:59
arnsholt Yeah, that's kinda hacky in the end
jnthn We don't need to do it quite like it does because in C we can stack allocate and pass a pointer.
But I think the overall approach (both bind and get have the same kinda thing passed on down) is sane.
arnsholt Excellent 08:00
jnthn Yeah. My original design in this area was Not Awesome...
OK, time for teaching, I guess...
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
Good timing =) 08:01
jnthn ;)
jnthn bbl
08:14 brrt joined, imarcusthis left 08:18 imarcusthis joined 08:37 hoelzro|away is now known as hoelzro 08:38 FROGGS joined
diakopter dum dee dum 08:38
FROGGS morning
diakopter short sleep
FROGGS indeed 08:39
4 hours for me
tadzik it's 7 here and I don't find it quite enough :)
arnsholt Veit ikke hvordan Eman sine planer er 08:44
moritz arnsholt: ECHANNEL?
tadzik orkka
moritz phenny: nb en "planer"? 08:45
phenny moritz: "plans" (no to en, translate.google.com)
FROGGS ohh, sekrit plans they make 08:46
... and somebody called Eman is the victim
08:46 cog joined
moritz if my Norwegian serves me well, it meant roughly "Don't know where Eman's plans are" 08:47
FROGGS ahh
well, that explains it
08:49 cog left
arnsholt Whoops, that was destined for window 4, not window 3 >.< 08:49
08:49 sevin left
nwc10 this isn't window 6? 08:49
arnsholt But yeah, "I don't know what Eman's plans are" =) 08:50
(hvordan = how, hvor = where)
diakopter I'm on windows 8
arnsholt diakopter: Heehee =D
FROGGS I'm sitting in front of several windows, airport that it
08:54 FROGGS left 08:55 cog joined, kresike joined
kresike hello all you happy perl6 people 08:55
nwc10 I guess right now I'm more a happy subset-of-NQP person. 08:56
sorear hello kresike 09:03
09:04 sftp joined
moritz arnsholt: ah yes, I always mix up those /^hv/ words 09:05
kresike sorear, o/ 09:08
moritz what's the order of entries in p5's @INC? qw/site vendor perl/ ? 09:10
or qw/vendor site perl/?
the ones I'm looking right now seem only to have site and perl 09:11
probably because the vendor packages perl too
nwc10 order changed. In 5.12.0, I think
but only to put site before perl 09:12
I forget where vendor sits
moritz ok, what's the order I should imitate in rakudo?
nwc10 oh, site, vendor, perl
that's what blead has
we believe that that order is sane.
moritz ok, I'll adopt that for rakudo then
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:13
and, logically, that should also apply to upgrading something that the vendor shipped
moritz sounds surprisingly sane :-)
nwc10 architecture-specific site, architecture independant site, arch-vendor, vendor, arch-"perl", "perl", . 09:14
it might be sane to say that "." isn't there
Actually, question
perl6 with -e has different rules for running the code? 09:15
moritz it should have
"no strict vars" by default
but it doesn't, in rakudo
nwc10 that's the one that I thought
crazy thought - add "." to @INC (or whatever it's called) for -e, but not for running from a file 09:16
(or stdin)
is that a useful trade off?
moritz no, IMHO. I often use short -e scripts to debug @INC related trouble
if -e has different rules, that becomes totally confusing
nwc10 OK. thanks for a quick reason to shoot it donw
moritz oh, but that gives me an idea 09:18
Perl 5 has -E for using modern features
jnthn The levenstein code is most probably slow due to "return" being, uh, suboptimally implemented.
jnthn will do the obvious 2 minute improvement tonight and see how it helps
moritz maybe we should steal that in Perl 6 for having strict vars on the command line 09:19
jnthn Maybe -E should uppercase the output automatically.
nwc10 moritz: yes, seems a sane idea
EVEN VMS DOESN'T DO THAT
moritz jnthn: OH GOOD IDEA!
jnthn :d
uh, :D even. How ironic... 09:20
moritz :-)
tadzik :_)
well, there's no upper-dash that I know of...
jnthn
.oO( oh noes )
*nose
gah 09:21
tadzik double-pun
jnthn This keyboard. I'm not used to it...
nwc10 what are you used to? UK? US?
and this is, um, native?
jnthn UK 09:22
This one is Swedish
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
moritz somehow "native keyboard" triggered the question "did they have keyboards in the 15/16th century?" :-) 09:23
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:24
nwc10 Harpsichords, I guess
diakopter My nops are faster than your nops 09:25
09:34 brrt left 09:36 balders_1od left 09:39 balders_dod joined 09:44 Psyche^ joined
dalek kudo/nom: 92c30bc | moritz++ | src/core/terms.pm:
reverse order of <perl vendor site> dirs in @*INC

we do not have to repeat all of the mistakes Perl 5 has made.
  nwc10++
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:47 Patterner left, Psyche^ is now known as Patterner
cog r: IO('/').WHAT 09:49
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…
moritz cog: it's coercion syntax. S02 I think. 09:50
cog r: Int('2').WHAT
p6eval rakudo 9c9d79: ( no output )
cog moritz, thx
09:57 balders_dod left, dakkar joined
cog seems that coercion is very much an overloaded term 10:00
moritz coerces cog to believe otherwise 10:03
cog S13:171 seems to answer my question 10:06
10:08 brrt joined 10:20 dayangkun_ left 10:26 sqirrel joined 10:47 FROGGS joined
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
will something like that work?
10:52 cog left
moritz yes 10:53
though note that the print will eat up the value
FROGGS I just wanna print the method name I'm currently in 10:54
moritz (in the same sense that the .print in (2 + 3).print "eats" the 5, which isn't available anywhere else in the program)
FROGGS k
thats fine
I have the feeling that /$( 1 )/ shouldnt call postcircumfix:sym<( )>(( 1 )), since $( 1 ) just calls circumfix:sym<sigil>($( 1 )) 10:57
10:58 brrt left, cog joined
moritz well, the $() shouldn't call postcircumfix:sym<( )> 10:59
but the regex engine needs something callable to invoke
10:59 SmokeMachine joined
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
afaict / $( 1) / should call 1.item 11:01
and the result should be interpolated the same way as variable interpolation works
and the variable interpolation code should take to turn the 1 into a regex that matches a '1' 11:02
11:06 Su-Shee_ joined
moritz FROGGS: does that sound sane to you? 11:07
FROGGS it does
11:10 Su-Shee left 11:16 Su-Shee_ is now known as Su-Shee 11:19 jaldhar joined
FROGGS moritz: if you have a look at this: gist.github.com/9307c7681cfb9ff34d..._regex-txt 11:20
you'll see that -e '"$( 1 )"' behaves similar to -e '$( 1 )'
but within a regex it doesnt
thats what I meant
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:21
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:25
11:33 kaleem left
FROGGS well, I currently try the addition of metachar:sym<sigil>, with parses a codeblock 11:34
s/with/which/
tadzik Rakudo on Instacode: instacode.linology.info/14541 11:40
11:44 mtymula joined
FROGGS tadzik: whats that site for? just commenting pieces of code, or more? 11:45
tadzik FROGGS: it's Instagram for Code 11:46
FROGGS ahh, thanks 11:47
mtymula hello 11:48
jnthn tadzik: lol :P
mtymula i am using www::app::MethodHandler to build a site in perl6 11:49
anyone know how to make it work with redy *.html files??
or maybe there is other way to do it?
11:50 kaleem joined
jnthn didn't know about that module 11:52
mtymula: supernovus++ who wrote it is most likely to know, but isn't here at the moment.
At a quick glance at the docs I guess you could just $context.send(slurp('file.html')) or so 11:54
oh, further downt here's 11:55
## A slurp handler.
$app.add(:path</slurp>, :slurp<./webroot/hello.text>);
(as part of example 2)
mtymula jnthn: thx, will try, what codex are you refering to?
jnthn mebbe that's what you want :)
mtymula o crap... i missed this....
thx
jnthn mtymula: examples in github.com/supernovus/perl6-www-ap.../README.md
12:02 anuby left 12:06 kaleem left 12:07 kaleem joined 12:22 SmokeMachine left 12:36 SmokeMachine joined 12:40 SmokeMachine left 12:41 SmokeMachine joined 12:42 benabik left 12:44 SmokeMachine left 12:47 SmokeMachine joined 12:52 hoelzro is now known as hoelzro|away 13:14 cog left 13:25 cog joined 13:32 FROGGS left 13:36 pmurias joined
pmurias jnthn: did you change how serialization context work in nqp? 13:37
jnthn pmurias: I put a bunch of stuff behind nqp ops
pmurias: Rather than using pir ops.
pmurias: No deep changes, just API.
13:44 kaleem left 13:46 kaleem joined 13:51 raiph left 13:56 kaleem left 13:59 cog left, kaleem joined 14:05 kaleem left, kaleem joined 14:08 PacoAir joined, kaleem left 14:18 bluescreen10 joined 14:20 kaleem joined
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
14:26 atrodo joined 14:29 nnunley joined 14:37 silug joined
timotimo t.h8.lv/0001-fix-an-off-by-one-repl...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:39
14:43 nnunley left
moritz timotimo: spectesting now, will push if successful 14:44
timotimo thank you :) 14:45
14:48 nnunley joined 14:55 pmurias left
arnsholt Derp. Half an hour debugging a stupid error again =D 14:57
A stupig segfault bug this time though. so I guess not all segfaults are easier than stupid errors ^_^ 14:58
14:58 mtk joined
kresike arnsholt, a segfault means "something is starting to work" :) 15:00
arnsholt Exactly! 15:01
That's mostly my experience with C as well
Especially since when I'm doing C I'm working on NativeCall
Which is a lot of fun, as it turns out. Sixmodel is really nice to work with 15:02
jnthn++ for that
15:03 stopbit joined
moritz arnsholt: fwiw I've re-created my dev environment for that project where DBIish segfaulted, and now it doesn't anymore 15:03
at least not for the example that I checked into the repo :-) 15:04
so when I'm home, I'll see if I have further, uncommitted stuff
or start do develop more
and tell you if something segfaults :-)
arnsholt Excellent!
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
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:07
15:07 arlinius joined
arnsholt Most of it I think 15:08
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:09
timotimo doesn't that just mean you're forced to use := instead of = when working with those structs?
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
does that also fix native ints in classes requiring those binds? 15:12
r: class A { has int $.foo is rw }; A.new.foo++;
p6eval rakudo 92c30b: OUTPUT«===SORRY!===␤Cannot create rw-accessors for natively typed attribute '$!foo'␤»
timotimo r: class A { has int $.foo }; A.new.foo++;
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:12 nnunley left
timotimo is that the error i wanted? 15:12
arnsholt Nope, that's something else entirely
timotimo r: class A { has int $.foo; method bar { $!foo++ } }; A.new.bar;
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␤␤»
timotimo OK
arnsholt In fact, I wasn't even aware of that particular problem =)
Hmm.. 15:13
r: class A { has int $.foo; }; my A $x .= new; $x.foo = 3; say $x.foo
p6eval rakudo 92c30b: OUTPUT«Cannot assign to a non-container␤ in block at /tmp/mEMnWhAj9v:1␤␤»
arnsholt Actually, it might go away =) 15:14
timotimo that would be neat, but no pressure
arnsholt Oooh, Rakudo based on my hacked NQP even passes its own testsuite =D
arnsholt spectests
15:18 skids joined
kresike bye folks 15:27
15:27 kresike left, kaleem left
timotimo jnthn: i wonder if i should use a dynamic variable instead of return to make levenshtein faster on jvm? :P 15:30
15:30 bluescreen10 left
timotimo (in one place i can even use a lexical) 15:30
nqp: sub changer($a) { $a := 10 }; my $b := 5; changer($b); say($b); 15:31
p6eval nqp: OUTPUT«5␤»
timotimo mhm.
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...
phenny jnthn: I'll pass that on when pmurias is around.
15:33 bluescreen10 joined
jnthn timotimo: No, I will fix the hideous return performance tonight, with soem luck 15:33
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:34
arnsholt: I don't think P6opaque should get the member_types...why does CStruct need it anyway?
Oh...I guess in repr data it does 15:35
But I don't think P6opaque should need it.
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:36
15:40 hash_table joined
arnsholt Right. I'll hold off on that 15:42
And in the end, I think we don't have to add the member_types after all 15:43
jnthn OK :)
arnsholt Or, maybe we do
I've got some failing spectests
jnthn Remember that any nested natives already have flattened_stables.
arnsholt Oh, these specfails might be because I'm not at nom/HEAD 15:46
Lemme try to merge master 15:47
Er, nom, that is =)
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:49
(Not doing that is why I wanted member_types in the REPR data)
15:51 benabik joined 15:52 cog joined
jnthn arnsholt: it's OK 15:54
arnsholt: It should be like that.
arnsholt Right. Then I should bring CStruct in line with that as well, I guess 15:55
It sends it off to the STable of the type object, since that readily at hand anyways
15:59 SmokeMachine left, benabik left, SmokeMac_ joined, benabik_ joined 16:01 benabik joined, benabik_ left
jnthn decommute & 16:05
16:09 telex left 16:13 GlitchMr left
arnsholt I've got a specfail, but not entirely sure it really is a failure 16:20
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
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:21
timotimo oh, yes, noatime is not very uncommon
good catch
don't know how to fix the test, though 16:22
if it fails, skip it instead? >_<
arnsholt Me neither =)
16:23 balders_dod joined 16:31 MayDaniel joined 16:35 telex joined
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:45
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/
TimToady I'm just a little afraid that this is one of those temporary expedients that never can be taken out and shot 16:48
nwc10 so I'm a bit confused.
TimToady @*INC is supposed to only be for current development prior to registration in the official library, according to S11 16:49
and the official library is a site concept
@*INC shouldn't be used to pull in anything shared on the site, in my opinion 16:50
16:50 nnunley joined
TimToady as soon as things are shared, you must be clear about the complete identity and immutability of each component 16:51
otherwise you cannot depend on the meaning of any component staying the same
moritz well, not having implemented identities yet, @*INC is as good as we can get 16:56
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
and certainly NYI is an absence :)
I just don't want us to get painted into a corner by expediency here
I suppose the order of official libraries in @*INC could be used also to say whose policy overrides 16:59
timotimo hm. last tweet by @rakudoperl was august 2011. should it be removed from rakudos README?
16:59 benabik left
TimToady in this case, an earlier mention in @*INC means the policies override later mentions 16:59
17:00 benabik joined, benabik left, benabik joined
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
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
17:03 fullmetalpride joined
fullmetalpride hello 17:03
nwc10 hopes that moritz is digesting this, because I didn't feel that it was my itch to scratch 17:04
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
nwc10 which could just mean "erk, my brain is full. I don't have space to think about this as well as everything else"
TimToady has been thinking of bundles as a kind of auth override
so we might end up with a list of auths for any given component 17:05
nwc10 (sorry, I'm not a very useful contributor to this, as it's not something I've been thinking about)
timotimo: do we know which human runs the account? 17:06
TimToady nwc10: that's fine, just trying to think about scaling issues that only come into play with really large systems
but that was one of P5's issues, scaling only to medium-size
17:06 fullmetalpride left, kaleem joined
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:08
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
(that's before you get to the "oh, and I want to run with them in the same process too")
TimToady nodnod 17:09
nwc10 gotcha. Yes. I see why "site" sucks for that, at one level
TimToady we don't entirely understand the solution yet, but we have some understanding of the problem
nwc10 "perl" and "site" matter to the OS packaging system.
who owns the files
(effectively, faking up a union directory) 17:10
but, yes, that's orthogonal to which module(s) does the program want to load
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
but that's effectively mutating the file, so the bundle needs its own auth of the file in that case, I think 17:11
17:11 cog left
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:13 cog joined
TimToady :) 17:14
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
this does not mean that I have any idea on a good way to solve it 17:16
but I think I understand which Perl 5 scaling problems you are keen to avoid repeating
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
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
TimToady both of those problems involve mapping indirections from identities to things out on the filesystem somewhere
so I hope for some unification there 17:18
moritz yes, makes sense to me
in fact, that's pretty much what we discussed 2010 in Copenhagen
TimToady just don't want to stop at @*INC as our only extensible API for this 17:19
17:19 Chillance joined
TimToady timotimo: re 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:34
or is that what is being "fixed" there?
timotimo i don't really know, to be honest
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 github.com/perl6/specs | perlcabal.org/syn/ 17:36
;(depending on if you want source or formatted/annotated)
TimToady but what's the good of PTSD if not to avoid additional trauma in the future :)
timotimo all i know is i can't $foo++ on a native attribute ;)
perigrin Post Traumatic Daylight Savings Time.
TimToady whereas we all know C can do that with assignment on native types easily enough 17:37
well, having sniped my backlog bullets, I should probably hit the road; will be offline for most of a day or two 17:38
timotimo i might spend a few more tuits on ipython-perl6-integration throughout the rest of the day 17:40
timotimo commutes
[Coke] timotimo: safe travels.
oops.
TimToady: safe travels.
TimToady well, timotimo too :) 17:41
afk &
17:43 cog left 17:51 balders_1od joined, cog joined 17:55 balders_dod left
masak salutations, #perl6 18:00
moritz \o masak 18:02
18:03 cog left 18:05 b1rkh0ff left, dakkar left, b1rkh0ff joined
jnthn back :) 18:08
moritz welcome back jnthn 18:10
18:11 FROGGS joined
FROGGS olá 18:12
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:15
FROGGS hehe
timotimo hah 18:17
moritz "with magic" 18:19
masak I will go to FOSDEM, Bruxelles, this weekend! \o/ gonna talk about Perl 6 for 20 whole minutes. 18:27
timotimo i only need to know a little bit about it
oh, neat! a thunder-talk?
masak only if I give it in a booming voice.
18:31 sftp left 18:33 atrodo left 18:34 jas left
masak I'm reading rosettacode.org/wiki/Carmichael_3_s...sis#Perl_6 and thinking "so, TimToady doesn't like sigils anymore?" :P 18:34
18:34 sftp joined
jnthn r: say 20.1 / 144 18:35
p6eval rakudo 92c30b: OUTPUT«0.139583␤»
18:35 atrodo joined
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:36
masak jnthn++
jnthn prods dalek
dalek p-jvm-prep: e4718ec | jnthn++ | src/org/perl6/nqp/runtime/ (3 files):
Improve lexotic performance.
18:37
jnthn timotimo: May be worth retrying levenstein with latest.
18:37 kaleem left
nwc10 \o/ 18:38
[Coke] jnthn++
nwc10 but, it still takes positive time? And finishes after you start it? That's, um, not good enough :-)
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 :)
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:42
FROGGS phenny: tell sorear that there is a typo at: github.com/sorear/niecza/blob/mast....pm6#L2171 18:48
phenny FROGGS: I'll pass that on when sorear is around.
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
18:49 werwerwer left
arnsholt is finally decommuted 18:50
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)
arnsholt Forgot my keys on my desk, and didn't discover it until it was time to unlock my door >.<
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 18:51
18:53 fhelmberger left 19:07 kaare_ joined
timotimo jnthn: nqp::join was missing, that is all. 19:14
also, nqp::substr does an index check on jvm, but not on parrot and i did it wrong 19:15
moritz nwc10: like dpkg/apt?
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
er F<vendor> and C<perl> 19:17
It's RPM that needs help.
benabik dpkg++
nwc10 Ian Jackson is a very thorough smart cookie 19:18
arnsholt Right. Let's see if this P6int refactor works
nwc10 I don't know whom one blames for RPM
[Coke] I have never had any luck with packaged perl modules, and am so glad I can live on perlbrew.
nwc10 (or which pub to find him/her/it in)
benabik rather likes rubygem & bundler 19:19
For dealing with dependency issues
moritz [Coke]: me neither, but at $work we use packaged perl modules on Debian exclusively 19:20
[Coke] what do you do when you want a module that isn't packaged?
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.
benabik It's difficult to ensure that every gem packager will care about backward compatibility. 19:21
skids remembers hacking ExtUtils::MakeMaker to autogen deb packages, and then the response to that seemed to be "meh". Somewhat disenheartening.
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
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. :-/
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:24
moritz [Coke]: package it, avoid it
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.
moritz erm, package it or avoid it
japhb
.oO( package it then avoid it )
nwc10 for a straw poll of one sysadmin who expressed a preference (or is that a rant) the Ruby way is really annoying 19:25
and I know that it doesn't fit with how Debian wants to package stuff
not sure if this is a general sysadmin thing
[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)
rather than expecting the system perl to be the one with the specific app module I want. 19:26
(or, in my case, the system classpath.)
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.
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:27
it strikes me that it's the filesystem equivalent of copy-paste
a DRY violation
[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:29
nwc10 that's reasonable if your "gem"-like thing's upstream is a local private mirror, I guess.
moritz and that automated process tends to be a packaging system
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.
nwc10 but, actually, we're back to TimToady's issue - having a way to have more than one version of the same "thing"
[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:30
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
[Coke] nwc10: well, I only ever see my copy.
nwc10 somehow that clue didn't rub off on the part that did Java
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:31
japhb YES
That has been bugging me for a while.
nwc10 moritz: mmm yes, good point, it won't
not thought of it like that
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:32
nwc10 seems that you also need a "diverts" mechanism on your INC tree/database
japhb So you can say "Any 2.4.x will work", and then CVE fixes just bump the .x.
nwc10 or at least some way to "rescind" particular versions
[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:33
moritz but that kind of testing is done with a staging environment, and not part of the package manager 19:34
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
Problem is, the Rails guys REALLY DON'T FOLLOW THAT.
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. gist.github.com/4666979 19:37
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
moritz masak: very nice. Though I'd try to express the final loop { } as a sequence 19:39
repeatedly doing $obj = $obj.method usually calls for $obj , *.method ... *
r: gist.github.com/4666979
masak moritz: ooh. 19:40
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􏿽xE2􏿽x90
moritz nr: say 353.is-prime
p6eval rakudo 92c30b, niecza v24-18-gaf64300: OUTPUT«True␤»
masak my solution is longer than any of the ones on RC: rosettacode.org/wiki/Sieve_of_Erato...nes#Perl_6 -- though I still wonder if I shouldn't add it. 19:41
moritz yes, please do
masak just gonna try to figure out the infix:<...> thingy first. 19:43
my $i; 19:44
say $i = .next for $stream, *.filter($i) ... *;
that's... probably the weirdest series I've ever written.
timotimo jnthn: i don't understand why the debugger cli is invoked at all :( 19:45
masak it's very pretzely. :) but it works.
moritz it does? :-)
masak oh, and of course $i should be $prime
moyes, I tested it.
moritz*
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:46
moritz has inherited his love for pretzely things to his daughter
masak say my $prime = .next for $stream, *.filter($prime) ... *;
lovely.
it... it iterates over a strem that it keeps wrapping in new streams with each iteration... 19:47
masak 's head asplodes
moritz another idea would be to iterate over [$stream, $prime] pairs 19:48
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 ....
moritz wonders if japhb misread the 'to' as a 'from' 19:49
japhb Yes, I did, because 'has inherited ... to' doesn't compute. :-)
'has passed on ... to' or 'has inherited ... from'
moritz ok, passed on to, then :-) 19:50
japhb And it appears you meant the former and I read the latter. ;-)
moritz though IMHO "passed on to" doesn't imply genetics; there are other ways to pass on stuff
japhb English is fuzzy about that.
masak memetics is very in anyway. 19:51
moritz though, come to think of it, "inherit" isn't necessarily genetic either
and neither is its German translation
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"
moritz I guess those words are just older than genetics
japhb nodnod 19:52
dalek nqp/dyncall-sized-num: d09685a | (Arne Skjærholt)++ | src/ops/nqp.ops:
nqp/dyncall-sized-num: Refactor get_attr_{int,num} (which comes in two variants).
nqp/dyncall-sized-num:
nqp/dyncall-sized-num: They shared some code that takes a pointer and a number of bits and
nqp/dyncall-sized-num: dereferences the pointer as an appropriately sized int/num, so refactor those
19:52 dalek left
arnsholt Whoops. I keep killing dalek these days 19:53
19:53 dalek joined, ChanServ sets mode: +v dalek
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
masak added streams solution: rosettacode.org/wiki/Sieve_of_Erato...nes#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:55 larks joined
moritz then it would just be .say for map *.value, StreamOfIntegers.new, *.next ... *; 19:55
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
masak moritz: or even say .value
moritz: yes, I will try for that. 19:56
moritz masak: right
masak moritz: thanks for your feedback. it is well taken.
:)
masak always endeavours to be less confusing and (preferably) less pretzel-y
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.
hence the pretzel. 19:58
so, no-go.
that was present even in the loop. but maybe not so obvious.
oh! I guess I could `say .value for StreamOfIntegers.new, { .filter(.value) } ... *` 20:00
yes, that'd work.
20:00 cog joined
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:01
moritz timotimo: or maybe the cloud is too thin
masak moritz: ooh 20:02
moritz but my head it too cloudy to implement it right now
jnthn arnsholt: In github.com/perl6/nqp/commit/8d3eb1...3298af7ff6 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: gist.github.com/4666979 20:08
yes, this is obviously much nicer. moritz++
masak re-uploads to RC, too
jnthn arnsholt: About the union in P6int - if we actually use this flattened into a P6opaque, are all the 64 bits actually available? 20:14
20:14 SmokeMac_ left
jnthn arnsholt: If not, initialize and copy_to look like they'll scribble over memory they should not. 20:14
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
arnsholt jnthn: I'm pretty sure they are
nwc10 'perl', 'vendor', 'site', 'user', 'project'
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:15
nwc10 in *nix terms, 'perl' and 'vendor' map into /usr/ and are for files owned by the packaging system
'site' is /usr/local and is owned by root
'user' is local::lib, probably in ~/
and 'project' (or 'project' ...) is the tree within a particular project 20:16
arnsholt Or, that's how I remember unions working, at least. I can check with my K&R at work in the morning
jnthn arnsholt: Yes, I meant when it's inlined.
nwc10 these are effectively treated as a union directory of "installed files"
which version you load from where is then layered atop that union directory
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.
arnsholt Oh, right!
mst nwc10: I did to have 'platform' plus 'project'
nwc10: and my 'user' env is separate
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
timotimo is perl6-users@ interesting? 20:19
mst nwc10: my ~/perl5 is generally only for me, at a shell prompt
nwc10: anything 'deployed' doesn't depend on that
nwc10 ah OK.
mst then again, 'deployed' stuff isn't deployed as a user with a ~/perl5 generally in setups I've built
there's a per-deployment local::lib
and -sometimes- we have a 'platform' local::lib that underlies N deployments 20:20
and then site and vendor stay empty
timotimo huh, there isn't even a mailing list by that name
dalek p-jvm-prep: 0cf93d3 | jnthn++ | lib/QAST/JASTCompiler.nqp:
Fix thinko spotted by diakopter++.
nwc10 mst: ah OK. I think the key thing is that there's need for more than 3 layers of places to install files
mst nwc10: I'm not saying that's "best practice" though, just "how I do stuff" 20:21
nwc10 and that different installers own different ones
OS, root, user
mst yes, that's definitely true
nwc10 also, would be useful to have a clear idea of a diretory where the user's processes can cache stuff
such as generated bytecode. 20:22
but in Perl 5 terms, where Inline would like to write to
becaus the user's process might not have write access to the directory containing the library files that it is reading from
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:24
phenny timotimo: I'll pass that on when hoelzro is around.
20:24 benabik left 20:26 cog left
dalek p-jvm-prep: b5490db | jnthn++ | nqp-jvm-cc.nqp:
Fix stupid !$obj thinko.
20:26
p-jvm-prep: ebaafd3 | jnthn++ | t/nqp/12-logical.t:
Pass 12-logical.t.
20:28 sqirrel left
tadzik oh hai 20:34
jnthn: what are you doing in May 25-26?
jnthn tadzik: Lemme check schedule 20:35
tadzik: I'm free
tadzik not anymore
jnthn ok
What am I going to be doing? :)
tadzik I'm inviting everyone brave enough to Polish Perl Workshop 20:36
jnthn BEER AT SANE PRICES
tadzik That's right
masak \o/
tadzik++
jnthn It's added to my schedule.
tadzik The plan is for one talk day, and possibly one workshop-hackathony day 20:37
masak seems to be added to my schedule too now ;)
tadzik awesome
masak no, *you're* the awesome!
tadzik I need to talk with Book about ACT, I think
masak .oO( get your ACT together ) 20:38
jnthn tadzik++
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.
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:42
jnthn timotimo: Line 463
timotimo: Just dynamic scoping
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:46
arnsholt tadzik++ # Workshop
jnthn timotimo: It's all the same callstack
timotimo amazing
jnthn We'd have to make a bunch of effort to have it *not* happen :) 20:47
[Coke] masak++
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 :)
tadzik niice 20:48
21:00 kaare_ left 21:01 hash_table left
timotimo there's no uuids in perl6, right? 21:05
jnthn timotimo: Not aware of a uuid module 21:06
nwc10 every Python object has a UUID?
dalek p-jvm-prep: 50434ff | jnthn++ | / (2 files):
Initial isinvokable implementation.
21:07
p-jvm-prep: 54d7664 | jnthn++ | t/nqp/11-sub.t:
Pass 11-sub.t.
p-jvm-prep: 986536a | jnthn++ | lib/QAST/JASTCompiler.nqp:
Fix mixed positional/named passing.
p-jvm-prep: a22c3ce | jnthn++ | t/nqp/23-named-args.t:
Pass 23-named-args.t.
timotimo could apparently somewhat easily build one with NativeCall
nwc10 thinks you may be misunderstanding the question. Hence the clarification question 21:08
no, maybe I am
jnthn: that's 28 test files now passing? 21:10
timotimo i think uuidgen is good enough for now. 21:11
21:11 Su-Shee left
jnthn Files=28, Tests=231 21:11
nwc10 cool 21:12
tadzik awesome 21:13
21:13 Su-Shee joined
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:13
[Coke] jnthn: are you going to get nqp to 100% before trying a rakudo? 21:20
jnthn timotimo: Note that if it's an NQP thing you can't assign to it though 21:22
[Coke]: I'm going to get NQP able to compile itself before I try a Rakudo.
If it can't do that, it ain't gonna handle Rakudo's grammar/actions anyway 21:23
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
or can i perhaps only register functions like you did in the debugger?
jnthn timotimo: Something like that should work. 21:30
timotimo the first one? cool.
panda is not installing :(
jnthn timotimo: Yeah, just install some object in that contextual 21:31
Should work
tadzik timotimo: looking at it
timotimo When pre-compiling a module, its dependencies must be pre-compiled first. 21:32
Please pre-compile /home/timo/build/rakudo/install/lib/parrot/5.0.0-devel/languages/perl6/site/lib/Shell/Command.pm
i don't know what i'm doing wrong 21:33
tadzik duh
timotimo i'll just remove the lib folder, i guess?
tadzik rebootstrap?
timotimo i can try that, too
tadzik that's what you ought to do after rakudo updaet
timotimo that makes sense 21:34
sorear FROGGS: so there is 21:43
phenny sorear: 18:47Z <FROGGS> tell sorear that there is a typo at: github.com/sorear/niecza/blob/mast....pm6#L2171
sorear FROGGS: want a commit bit? 21:44
timotimo how to best read one line from $*IN in perl6? 21:47
jnthn $*IN.get
tadzik r: say $*IN.get
p6eval rakudo 92c30b: OUTPUT«Land der Berge, Land am Strome,␤»
timotimo well, that's easier than i thought
masak Land der Äcker, Land der Do-o-o-o-me! 21:48
tadzik timotimo: does panda work alright?
timotimo yes, it does :)
tadzik good :)
timotimo thanks for your ongoing work
tadzik *relief*
it's mostly my guard duty these days :)
maybe I'll do a Panda hackathon on PLPW
timotimo should i put my levenshtein implementation into panda so that panda will suggest packages if they don't exist? :) 21:49
tadzik YEEES
casing is difficult
timotimo maybe later :)
masak .oO( in Soviet #perl6, it's tadzik's job to guard Panda ) 21:50
tadzik giggles 21:51
in Soviet #perl6 I'm good at slides, not so good at rocking horses
timotimo ... horses rock you ...?
tadzik WHEEEE will rock you! 21:52
timotimo neigh will rock you?
tadzik yeah, this :)
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:53
tadzik haha
cosimo procrastination FTW
tadzik cosimo! \o/
cosimo :)
masak no no you don't understand :P
tadzik coming to the Polish Perl Workshop? 21:54
masak cosimo! \o/
21:54 benabik joined
sorear o/ 21:57
tadzik sorear! \o/ 21:58
cosimo hey
21:59 skids left 22:04 spider-mario left
masak sorear! \o/ 22:04
sorear masak! 22:09
22:10 bluescreen10 left 22:13 PacoAir left
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
that's so simple, how can it work?
tadzik haha 22:18
magic
[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:20
dalek p-jvm-prep: f8e9edc | jnthn++ | lib/QAST/JASTCompiler.nqp:
Implement indirect method lookup.
22:22
p-jvm-prep: 6e4f0d6 | jnthn++ | t/nqp/26-methodops.t:
We pass 26-methodops.t.
p-jvm-prep: c666246 | jnthn++ | src/org/perl6/nqp/sixmodel/reprs/P6Opaque (3 files):
Implement auto_viv_container support.

Or at least, as much of it as NQP needs. It'll need a small addition, but probably not until we get to porting Rakudo.
p-jvm-prep: 0eb4634 | jnthn++ | t/nqp/ (4 files):
Four more passing test files.
[Coke] jnthn++ 22:25
timotimo jnthn: will you get the return tuit invested today? 22:27
what do i need to override in $*IN so that i can properly handle prompt() and such? 22:28
probably read($num)? 22:29
jnthn timotimo: I committed the return improvement earlier 22:30
timotimo oh, neat!
i'll try the benchmark again then :)
jnthn Didn't fix the substr thing or add join yet
But there's test coverage for both.
So will get to them.
Not today though :) 22:31
timotimo that's totally okay!
the join was a bad idea anyway
nqp::join(":", ($a, $b)), why have a join if i can have a ~ instead?
jnthn aye :) 22:32
timotimo wow 22:34
8.17user 0.46system 0:07.32elapsed 117%CPU <- jvm | parrot -> 22.46user 0.30system 0:22.84elapsed 99%CPU
jnthn++ 22:35
jnthn Not spectacularly faster, but faster :) 22:36
22:37 MayDaniel left
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:39
22:43 erkan left
masak "relatively impressive", perhaps. :P 22:50
jnthn D e lagom :P
sleep, 'night o/ 22:54
timotimo good night jnthn! 22:55
22:59 jlaire left 23:00 benabik left, pmurias joined
pmurias tadzik: when is the Polish perl workshop? 23:00
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...
nwc10 \o/ 23:01
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:05 jlaire joined
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:05
and yes, the compile time is part of that
both compiling the cc and the levenshtein
23:06 FROGGS left
pmurias tadzik: in Warsaw? 23:06
timotimo any way to get subsecond time in DateTime? 23:08
pmurias tadzik: any link? 23:09
23:10 benabik joined, jlaire left
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:14
no clue if it would be tripped up if it's there
tadzik pmurias: yes; not yet 23:15
pmurias hopes to have rakudo-js ready to present by then ;)
or at least a nicely working nqp-js ;)
tadzik that'd be super-awesome 23:16
pmurias timotimo: .second should return the second with the subsecond part 23:17
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:18 jlaire joined
pmurias nwc10: for a long numeric task, yes 23:18
timotimo pmurias: but it doesn't 23:19
r: DateTime.now().second.say
p6eval rakudo 92c30b: OUTPUT«12␤»
pmurias timotimo: so it's a bug 23:20
timotimo there are apparently no tests for that :)
pmurias DateTime has a whole-seconds method, so that implies .seconds dosn't return whole seconds 23:21
23:23 nnunley left 23:24 jlaire left
masak it doesn't, it returns fractional seconds. 23:28
so, I rewrote the Sieve of Eratosthenes with streams, but using only lambdas: gist.github.com/4668987 23:29
it's wonderfully short.
it doesn't work, though -- something is wrong with it. I can't figure out what :/
23:29 stopbit left
masak it feels like some routine is wrongly cloned somewhere. 23:29
too tired to figure it out now, I fear. 23:30
'night, #perl6
23:30 arlinius left
timotimo night masak! 23:31
wow, wat 23:32
23:35 benabik left 23:37 skids joined
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:38
p6eval rakudo 92c30b: OUTPUT«「%q~」␤␤»
swarley Oh, sweet it does
timotimo something that annoys me is i can't do something like my $username = q:x{whoami} || "camilla" 23:39
because q:x doesn't have any way to get the return value
swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<-alnum + ws>) ~ $0 [ <-[$0\\]> | \\ . ]/ 23:40
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␤␤»
swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<-alnum + ws>) ~ $1 [ <-[$1\\]> | \\ . ]/
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␤␤»
swarley r: say Q/%q~hello\~~/ ~~ /'%q' $delim=<-alnum + ws> ~ $delim [ <-[$delim\\]> | \\ . ]/ 23:41
p6eval rakudo 92c30b: OUTPUT«===SORRY!===␤Variable '$delim' is not declared␤at /tmp/gBNU_X9GWb:1␤------> say Q/%q~hello\~~/ ~~ /'%q' $delim⏏=<-alnum + ws> ~ $delim [ <-[$delim\\]> ␤»
swarley r: say Q/%q~hello\~~/ ~~ /'%q' $< $delim >=<-alnum + ws> ~ $< $delim > [ <-[$< $delim >\\]> | \\ . ]/
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␤␤»
timotimo i guess i *could* match the output of whoami against <[a..zA..Z0-9_-]> 23:42
swarley r: say Q/%q~hello\~~/ ~~ /'%q' $< $delim >=<-alnum + ws> ~ $< $delim > [ <-$< $delim > | \\ > | \\ . ]/
p6eval rakudo 92c30b: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/KcIRiNd4Yv:1␤------> delim >=<-alnum + ws> ~ $< $delim > [ <-⏏$< $delim > | \\ > | \\ . ]/␤Unrecognized regex metacharacter ~ (must be q…
swarley r: say Q/%q~hello\~~/ ~~ /'%q' $< $delim >=<-alnum + ws> ~ $< $delim > [ <-$delim | \\ > | \\ . ]/
p6eval rakudo 92c30b: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/lpGnh3cVvc:1␤------> delim >=<-alnum + ws> ~ $< $delim > [ <-⏏$delim | \\ > | \\ . ]/␤Unrecognized regex metacharacter ~ (must be quoted…
swarley hrm
I thought I remembered doing something with that
swarley reads S05 again 23:43
r: say Q/%q~hello\~~/ ~~ /'%q' [ $0 = <-alnum + ws> ] ~ $0 [ <-$0 | \\ > | \\ . ]/ 23:44
p6eval rakudo 92c30b: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/BCl2t1jnu5:1␤------> ~ /'%q' [ $0 = <-alnum + ws> ] ~ $0 [ <-⏏$0 | \\ > | \\ . ]/␤Unrecognized regex metacharacter ~ (must be quoted to …
swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<-alnum + ws>) [ <-$1 | \\ > | \\ . ]* $1/ 23:45
p6eval rakudo 92c30b: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/5cJW6xF0oo:1␤------> ~hello\~~/ ~~ /'%q' (<-alnum + ws>) [ <-⏏$1 | \\ > | \\ . ]* $1/␤Unrecognized regex metacharacter [ (must be quoted…
swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<-alnum + ws>) [ <-[\1\\]> | \\ . ]* $1/
p6eval rakudo 92c30b: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\1'␤at /tmp/J5L6oQPTFc:1␤------> ello\~~/ ~~ /'%q' (<-alnum + ws>) [ <-[\⏏1\\]> | \\ . ]* $1/␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper…
swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<-alnum + ws>) [ <-[$1\\]> | \\ . ]* $1/
p6eval rakudo 92c30b: OUTPUT«#<failed match>␤» 23:46
23:47 jlaire joined 23:48 pmurias left
swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<foo=-alnum + ws>) [ <-[$<foo>\\]> | \\ . ]* $<foo>/ 23:49
p6eval rakudo 92c30b: OUTPUT«#<failed match>␤»
swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<foo=-alnum + ws>)/
p6eval rakudo 92c30b: OUTPUT«「%q~」␤ 0 => 「~」␤␤»
swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<foo=-alnum + ws>) [ <-[$<foo>\\]> | \\ . ]/ 23:50
p6eval rakudo 92c30b: OUTPUT«「%q~h」␤ 0 => 「~」␤␤»
swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<foo=-alnum + ws>) [ <-[$<foo>\\]> | \\ . ]*/
p6eval rakudo 92c30b: OUTPUT«「%q~hell」␤ 0 => 「~」␤␤»
swarley r: say Q/%q~hello\~~/ ~~ /'%q' (<foo=-alnum + ws>) [ <-[$<foo>\\]> | \\ . ]* $<foo>/
p6eval rakudo 92c30b: OUTPUT«#<failed match>␤»
swarley r: say Q/%q~hello\~~/ ~~ /'%q' <foo=-alnum + ws> [ <-[<~~foo>\\]> | \\ . ]* <~~foo>/ 23:51
p6eval rakudo 92c30b: OUTPUT«===SORRY!===␤Sorry, ~~ regex assertion with a capture is not yet implemented␤at /tmp/VqpnoJwVOa:1␤------> + ws> [ <-[<~~foo>\\]> | \\ . ]* <~~foo⏏>/␤»
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:…
swarley blah
23:53 hash_table joined
swarley r: say Q/%q~~/ ~~ /'%q' <foo=-alnum + ws> [ <-[$<foo>\\]> | \\ . ]* $<foo>/ 23:54
p6eval rakudo 92c30b: OUTPUT«#<failed match>␤»
swarley r: say Q/%q~~/ ~~ /'%q' <foo=-alnum + ws> $<foo>/ 23:55
p6eval rakudo 92c30b: OUTPUT«#<failed match>␤»
swarley r: say Q/%q~~/ ~~ /'%q' <foo=-alnum + ws> <{ say $<foo> }>/
p6eval rakudo 92c30b: OUTPUT«Any()␤Any()␤#<failed match>␤»
23:55 lue joined
swarley r: say Q/%q~~/ ~~ /'%q' (<-alnum + ws>) <{ say $0 }>/ 23:57
p6eval rakudo 92c30b: OUTPUT«「~」␤␤「」␤␤#<failed match>␤»
swarley r: say Q/%q~~/ ~~ /'%q' (<-alnum + ws>) $0/
p6eval rakudo 92c30b: OUTPUT«「%q~~」␤ 0 => 「~」␤␤»
swarley r: say Q/%q~~/ ~~ /'%q' (<-alnum + ws>) [ <-[$0\\]> | \\ . ]* $0/ 23:58
p6eval rakudo 92c30b: OUTPUT«「%q~~」␤ 0 => 「~」␤␤»