Camelia, the Perl 6 bug

IRC log for #perl6, 2012-09-09

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:01 MikeFair [Coke]: Drop the pir in pirop
00:02 [Coke] MikeFair++
00:02 MikeFair [Coke]: the math stuff seems have an _n
00:02 [Coke] sorear++
00:03 MikeFair token infix:sym<*>  { <sym> <O('%multiplicative, :op<mul_n>')> }
00:03 MikeFair add_n, sub_n, div_n
00:03 MikeFair I'm asuming _n means number, but i could be gravely mistaken
00:04 sorear MikeFair... that's not a pirop
00:05 sorear that's nqp::add_n
00:05 sorear pirops look like add__NNN
00:06 benabik add_n is an nqp op, I think.
00:08 * [Coke] wonders what :isdecl used to mean. also :viviself
00:08 MikeFair isn't that what [Coke] was asking for?
00:09 MikeFair What's the NQP way of saying the equivalent pirop
00:09 MikeFair ?
00:09 sorear MikeFair: 16:56  * [Coke] wonders what the replacement for PAST::Op(:pirop) is.
00:09 [Coke] so I used :op<pir::long_pir_op__PPS>
00:10 sorear and it worked?
00:10 [Coke] I'm just getting through the initial QAST errors here. Hopefully anyone using nqp for reals wouldn't have this old legacy code to update.
00:10 [Coke] sorear: for some value of "worked", yes.
00:11 [Coke] it started complaining about something else.
00:12 MikeFair [Coke]: Though they'd likely be looking at PAST based tutorials ;)
00:12 [Coke] (complained about using :isdecl on QAST::Var)
00:13 sorear [Coke]: I can tell you what :isdecl and :viviself used to mean
00:13 sorear I don't know what the replacements are, though
00:13 sorear :isdecl in PAST was how you declared variables.  essentially, 'my $x' compiled to PAST::Var.new(:isdecl(1), :name('$x'), :scope('lexical'))
00:14 sorear :viviself was part of the autoviv mechanism.  not sure exactly how it worked, but it helped make hash accesses autovivify.
00:15 * sorear recalls thinking that :isdecl was completely insane, hopes QAST has something better
00:20 [Coke] viviself looks a little too complicated to just rip out. I'll wait for pmichaud or jnthn to help on that one, I guess.
00:21 [Coke] in the meantime, most of the old code at least now /compiles/. (except the pointy blocks).
00:21 [Coke] s/old/updated/
00:21 [Coke] so, point blocks, then remaining PAST->QAST updates.
00:22 [Coke] sorear++
00:24 MikeFair how do you stage a "deleted" status?
00:25 MikeFair err "not staged for commit" of "deleted"
00:25 MikeFair There's no file to add/stage
00:25 sorear you can do it with git add -a
00:26 sorear which stages all unstaged changes
00:26 MikeFair ahh
00:26 sorear you might also be able to do it with git add -p (piecemeal)
00:28 MikeFair well I seem to have -A (staged and untracked (I don't want not tracked stuff)) and -i interactive
00:28 MikeFair so I'm thinking about trying -A -i
00:28 MikeFair and if I bork it manually unstaging the not tracked stuff
00:31 sorear git reset HEAD # unstage everything
00:32 MikeFair -i got me into something that worked
00:32 sorear do not confuse git reset with git reset --hard, they are significantly different and you can lose work by mixing them up
00:32 MikeFair sorear: Well I still need to start getting into the practice of using branches instead of developing straight on master
00:33 sivoais joined #perl6
00:38 fgomez joined #perl6
00:43 fgomez joined #perl6
00:47 MikeFair YAY!! ./installable_safire -e 'say 1+1'
00:47 MikeFair 2
00:51 xinming joined #perl6
00:57 sorear MikeFair: yay!!
00:58 MikeFair At the moment it's the simple things
00:58 MikeFair For now I'll just accept that I kind of get why I was able to make that work :)
01:05 thou joined #perl6
01:05 MikeFair joined #perl6
01:08 diakopter sorear: as of a few weeks ago, QAST still has isdecl
01:09 FROGGS__ joined #perl6
01:14 bluescreen10 joined #perl6
01:17 rk joined #perl6
01:19 gongyiliao joined #perl6
01:19 rk wow all these people working on perl6... :)
01:20 TimToady some of us are just playing :)
01:21 TimToady do you wanna work in it? :D
01:21 TimToady or play with it?
01:21 rk maybe...
01:21 FROGGS joined #perl6
01:21 rk what's it current state?
01:22 TimToady hmm, I can think of one person with the initials rk...
01:22 TimToady it's getting into late early adopter phase
01:22 TimToady rosettacode.org has over 450 working examples of common tasks
01:22 araujo joined #perl6
01:23 TimToady we can run on either .NET or on Parrot
01:24 TimToady rn: say "hi rk!"
01:24 p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b: OUTPUT«hi rk!␤»
01:24 diakopter TimToady: btw, an index of those entries with short descriptions of the features each demonstrates would be cool - "infinite lists; on-demand calculation"
01:24 TimToady we put some description on some of 'em, but sometimes we get lazy
01:24 TimToady (royal we)
01:26 diakopter I was thinking of a page with a list of links to them with those descrptions, so someone could browse P6 features by example
01:26 diakopter sorta like a cookbook I suppose
01:26 rk nice.
01:27 TimToady diakopter: should really have a mouseover for "explain this"
01:27 diakopter s/.NET/CLR (.NET or mono)/
01:27 TimToady right
01:30 rk ok, I downloading... let's see what I can do...
01:32 TimToady you can also play with small examples here on the channel
01:32 rk is that the '+p6eval ?
01:33 TimToady n: constant @fib = 1, 1, *+* ... *; say @fib[^20]
01:33 p6eval niecza v21-1-ga8aa70b: OUTPUT«1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765␤»
01:33 TimToady yes
01:33 rk nice...
01:34 rk perl6 say 3
01:36 TimToady needs a colon
01:38 sorear welcome to #perl6
01:38 rk perl6: say 3
01:38 p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b: OUTPUT«3␤»
01:43 flussence joined #perl6
01:57 rk perl6: say '1..24';
01:57 p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b: OUTPUT«1..24␤»
01:58 cognominal joined #perl6
01:58 rk perl6: say 1..24 ;
01:58 p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b: OUTPUT«1..24␤»
02:00 TimToady ranges act more like interval objects in Perl 6
02:00 TimToady perl6: say 1...24;
02:00 p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24␤»
02:00 jaldhar joined #perl6
02:01 TimToady perl6: say 1..24.list;
02:01 p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b: OUTPUT«1..1␤»
02:01 TimToady perl6: say (1..24).list;
02:01 p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24␤»
02:01 sftp joined #perl6
02:01 TimToady they only expand if forced into list context
02:01 TimToady perl6: say join ' ', 1..24
02:01 p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24␤»
02:02 diakopter perl6: say -1...-1...-1;
02:02 p6eval rakudo 0ead9e: OUTPUT«Cannot call 'infix:<...>'; none of these signatures match:␤:($a, $b)␤␤  in block  at /tmp/YDMWO6GGZ6:1␤␤»
02:02 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«-1␤»
02:02 rk oh.
02:03 TimToady a range will behave like a sequence if you force it to, but often you just want to use the ... sequence operator
02:03 sorear rk: more questions would be nice :D
02:07 rk is this going to be a drop in replace for 5? will I just be able to update my '/usr/bin/perl' link to point to a perl6 executable?
02:08 diakopter maybe someday
02:09 diakopter oh hm, the Synopses are down :-(
02:09 diakopter this explains a bunch: https://github.com/perl6/specs​/blob/master/S01-overview.pod
02:09 rk how closely is this tied to the Parrot VM?
02:09 MikeFair diakopter: Happened yesterday actually
02:10 diakopter rakudo is currently pretty tightly tied to Parrot. Niecza doesn't use Parrot
02:10 MikeFair rk: Think of Parrot and Common Language Runtime as equivalent to Intel CPU and ARM CPU
02:10 MikeFair rk: Rakudo runs on Parrot, Niecza runs on CLR
02:10 MikeFair rk: Both implement Perl6
02:10 geekosaur rk, the work you may have noticed going on here on QAST is partly about making it more possible to retarget Rakudo to other VMs.  but it's only a first step, I think
02:12 rk I see,
02:13 rk Jrakudo too ?
02:13 MikeFair rk: It's best at this point I think to think of Parrot as some other project that P6 happens to be using -- though given the nature of how the stack got built and the common set of people involved there's a lot of "cross-talk" that happens -- usually by me I think
02:13 diakopter rk: I don't think anyone's working on a JRakudo
02:13 MikeFair :)
02:14 MikeFair though I've seen some others do it too :)
02:15 TimToady hope to have a jakudo in a year or so
02:16 rk so when we try something here it's being run on both rakudo and niecza ?
02:17 diakopter p6: die 1
02:17 p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: 1␤  at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5) ␤  at /tmp/P8fViLwzsy line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-COR…
02:17 p6eval ..rakudo 0ead9e: OUTPUT«1␤  in block  at /tmp/5lTd5XMdrn:1␤␤»
02:17 diakopter see, two outputs
02:17 rk yep...
02:17 geekosaur hm, when did pugs get taken back out?
02:19 TimToady when we got tired of seeing error messages a couple months ago
02:19 TimToady feel free to bring pugs back up to snuff :)
02:19 rk perl6: say 3.+(4);
02:19 p6eval rakudo 0ead9e: OUTPUT«===SORRY!===␤Cannot use .+ on a non-identifier method call at line 2, near ";"␤»
02:19 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Modified method calls can only be used with actual methods at /tmp/DEEm2v6ow5 line 1:â�¤------> [32msay 3.+(4)[33mâ��[31m;[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1435 (die @…
02:20 sorear geekosaur: fwiw, there is 'rpn:' if you want to test all three.
02:20 sorear all permutations are good
02:21 rk rpn: say 1;
02:21 p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b, pugs: OUTPUT«1␤»
02:21 * geekosaur wishes :(
02:21 rk r: say "Hello";
02:21 p6eval rakudo 0ead9e: OUTPUT«Hello␤»
02:21 rk p: say "Hello";
02:21 p6eval pugs: OUTPUT«Hello␤»
02:21 rk n: say "Hello";
02:21 p6eval niecza v21-1-ga8aa70b: OUTPUT«Hello␤»
02:22 rk rpn: say 'ok ', "\x31\x38";
02:22 p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b, pugs: OUTPUT«ok 18␤»
02:22 cognominal joined #perl6
02:23 TimToady r: 3.
02:23 p6eval rakudo 0ead9e: OUTPUT«===SORRY!===␤Confused␤at /tmp/YIdHYzOhN_:1␤»
02:23 TimToady n: 3.
02:23 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0m��Confused at /tmp/SxIsYqtKNJ line 1:�------> [32m3[33m�[31m.[0m��Parse failed��»
02:23 TimToady n: 3.;
02:23 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0m��Decimal point must be followed by digit at /tmp/WsWNCm7Zpc line 1:�------> [32m3.[33m�[31m;[0m��Confused at /tmp/WsWNCm7Zpc line 1:�------> [32m3[33m�[31m.;[0m��Parse failed��»
02:24 TimToady r: 3.;
02:24 p6eval rakudo 0ead9e: OUTPUT«===SORRY!===␤Confused␤at /tmp/e6VQpN_Ofe:1␤»
02:24 sorear geekosaur: for what do you wish?
02:25 geekosaur tht I were in a position to hack on pugs :(
02:25 sorear s/f/F/
02:31 doy joined #perl6
02:36 sorear o/ doy
02:39 doy \o
02:41 Circlepuller joined #perl6
02:42 rk r: 1;
02:42 p6eval rakudo 0ead9e:  ( no output )
02:43 rk r: say '1';
02:43 p6eval rakudo 0ead9e: OUTPUT«1␤»
02:45 rk r: say "Hello World $ENV{PATH}"
02:45 p6eval rakudo 0ead9e: OUTPUT«===SORRY!===␤Variable $ENV is not declared␤at /tmp/X6VQlyf9Eg:1␤»
02:45 TimToady r: say "Hello World %*ENV<PATH>"
02:45 p6eval rakudo 0ead9e: OUTPUT«Hello World /home/p6eval/perl5/perlbrew/bin:/home/p6e​val/perl5/perlbrew/perls/perl-5.14.1/bin:​/usr/local/bin:/usr/bin:/bin:/usr/games␤»
02:46 TimToady globals have a * twigil
02:46 rk r: a = 1 + 1 ; say "$a";
02:46 p6eval rakudo 0ead9e: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix = instead␤at /tmp/53Ag2gfMJT:1␤»
02:46 TimToady and P6 doesn't do magic inside {}, but uses <> instead for literals
02:46 rk Ok.
02:46 TimToady and you need a 'my $' there
02:48 diakopter std: say $().$()
02:48 p6eval std b87ea13: OUTPUT«ok 00:00 44m␤»
02:48 diakopter n: say $().$()
02:48 doy TimToady: i'm curious what your thoughts are on MAD these days
02:48 p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method ast in type Any␤  at /tmp/EZ6TF2nnAD line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571) ␤  at /home/p6e…
02:48 doy is that still something you want to pursue?
02:48 rk r: my $a = 1 + 1 ;  say "$a";
02:48 p6eval rakudo 0ead9e: OUTPUT«2␤»
02:49 diakopter TimToady: what does $().$() mean
02:49 diakopter and it breaks niecza's ocmpiler
02:49 TimToady doy: at the moment I'm mostly working on P5 in P6
02:49 TimToady MAD has the potential to more accurately reflect exactly what P5 is thinking for translation purposes though
02:50 TimToady the P5 that P6 parses is kind of a cleaned up version at the moment
02:50 TimToady so it's not bug compatible
02:50 cognominal joined #perl6
02:50 TimToady diakopter: $() is supposed to mean $($/) or so
02:51 TimToady foo.$var means a hard ref in $var
02:51 TimToady so you're unlikely to get an appropriate hard ref to call from $()
02:51 diakopter ah, so it's not breaking niecza's compiler; the .ast thing is at runtime
02:52 TimToady well, it's not certain that niecza implements $() as $($/) in any case
02:52 TimToady it looks like it's trying to return undefined
02:52 diakopter n: say %(%7)
02:52 p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unmatched key in Hash.LISTSTORE␤  at /home/p6eval/niecza/lib/CORE.setting line 388 (Any.hash @ 3) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/n40PMrLLkt line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 …
02:53 diakopter o_O
02:53 TimToady n: %7
02:53 p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unmatched key in Hash.LISTSTORE␤  at /home/p6eval/niecza/lib/CORE.setting line 388 (Any.hash @ 3) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/m_3K7FSszg line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 …
02:53 TimToady r: %7
02:53 p6eval rakudo 0ead9e:  ( no output )
02:56 doy TimToady: so there's still value to keeping it in there then?
02:56 doy (:
02:59 TimToady seems to me someone else was using it too for some translator or compiler
03:00 diakopter what's MAD
03:02 TimToady miscellaneous attribute decorations on p5 parser nodes
03:02 doy really?
03:02 doy who?
03:04 TimToady if I remembered I'd've said rather than being vague :)
03:04 doy (:
03:31 cognominal joined #perl6
03:58 thou joined #perl6
04:16 daniel-s_ joined #perl6
04:17 daniel-s__ joined #perl6
04:26 popl joined #perl6
04:31 bonsaikitten joined #perl6
05:00 cognominal joined #perl6
06:20 cognominal joined #perl6
06:26 cognominal what is the way to get the signature of a method, or a metamethods given its name?
06:33 moritz r: say Int.^find_method('sqrt').signature
06:33 p6eval rakudo 0ead9e: OUTPUT«:(Int:D , Mu *%_)␤»
06:34 moritz that should be Int:D:
06:34 moritz Signature.perl is still less than perfect
06:42 kaare__ joined #perl6
06:42 cognominal thx
06:43 cognominal that's not wrong either, only too verbose
06:49 dalek rakudo/nom: 1374a97 | moritz++ | src/core/Signature.pm:
06:49 dalek rakudo/nom: use : as invocant marker in Signature.perl
06:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1374a977d5
07:07 cognominal is there a convention in the shell to denote the value previously evaluated?
07:15 GlitchMr joined #perl6
07:24 sorear no.
07:29 daniel-s joined #perl6
07:31 cognominal r:  say IO.gist.defined
07:31 p6eval rakudo 1374a9: OUTPUT«True␤»
07:32 cognominal r: say IO.defined
07:32 p6eval rakudo 1374a9: OUTPUT«False␤»
07:33 cognominal r: say (eval "IO.gist").defined
07:33 p6eval rakudo 1374a9: OUTPUT«True␤»
07:33 cognominal oops
07:33 cognominal r: say (eval O.gist).defined
07:33 p6eval rakudo 1374a9: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&O' called (line 1)␤»
07:33 cognominal r: say (eval IO.gist).defined
07:33 p6eval rakudo 1374a9: 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:2317␤  in any find_method_fallback at src/gen/Metamodel.pm:2305␤  in any find_method at src/gen/Metamodel.p…
07:34 cognominal sorry for the noise, I was utterly confused
07:41 cognominal r: "toto".gist
07:41 p6eval rakudo 1374a9:  ( no output )
07:41 cognominal r:  say "toto".gist
07:41 p6eval rakudo 1374a9: OUTPUT«toto␤»
07:43 cognominal r: say "toto"
07:43 p6eval rakudo 1374a9: OUTPUT«toto␤»
07:44 cognominal ho, I am confusing .perl and .gist
07:46 cognominal I always confuse .Str, .perl and .gist :(
07:47 cognominal so .perl.eval is a noop. But what's the difference between .Str and .gist?
07:48 GlitchMr /usr/bin/ld: cannot find crt1.o: No such file or directory
07:48 GlitchMr Clang probably wants to annoy me
07:49 GlitchMr perl6: my %hash; %hash<future> = %hash; %hash.perl.say;
07:49 p6eval rakudo 1374a9, niecza v21-1-ga8aa70b: OUTPUT«(timeout)»
07:50 GlitchMr But I guess that infinite loop is better than something that doesn't do what you want (like in Python)
07:50 GlitchMr >>> a
07:50 GlitchMr {'future': {...}}
07:50 yarp joined #perl6
07:51 GlitchMr {...} is set containg one element (in Python 3) - ...
08:06 xinming joined #perl6
08:14 FROGGS good morning
08:16 FROGGS jnthn, arnsholt: if I have a pointer address stored in an int, how do I get a OpaquePointer from it?
08:18 jlaire pointers can be larger than ints :|
08:19 Psyche^ joined #perl6
08:19 cognominal joined #perl6
08:20 FROGGS well, depends on the system
08:20 FROGGS if I have int64 than my pointer shouldn't be longer, right?
08:20 FROGGS talking about unsigned ints of course
08:21 sorear there is at least one system that used 128-bit pointers
08:22 FROGGS which one?
08:22 sorear AS/40
08:22 yarp I can't install panda or use panda in simplifiy chinese win xp.
08:22 yarp i am key in >perl6 bootstrap.pl
08:23 FROGGS sorear: and there are no integers of that size? thats weird somehow
08:23 yarp the output is :
08:23 yarp ==> Bootstrapping Panda
08:23 sorear yarp: do you have spaces or non-ascii characters in the full name of the folder you're trying to install panda from?
08:23 sorear FROGGS: intmax_t and intptr_t are guaranteed to be large enough to hold a pointer.
08:24 sorear FROGGS: int64_t is not.
08:24 yarp 'p' is not a system or outer command...
08:25 yarp no space
08:25 FROGGS sorear: that int64 was an example for my amd64 system
08:26 FROGGS sorear: if I use int, it should be either int32, int64 or even int128, whatever is there
08:26 sorear FROGGS: what do you mean?
08:26 yarp so size_t should be ok
08:27 sorear FROGGS: in what context are you using "int"?
08:27 sorear yarp: not so, on segmented architectures the address space can be much larger than the maximum size of a single object
08:27 FROGGS in perl6, not in
08:27 FROGGS C
08:27 sorear eg, 286 with the large memory model
08:28 yarp ohhh
08:28 FROGGS sorear: I get a packed C-structure as a CArray[int] in perl6, then I unpack it to get its members
08:29 FROGGS sorear: some of them a like Sint16, some of them are pointer to other structures
08:29 FROGGS sorear: these other structures I need to access
08:30 FROGGS sorear: so I need a (nice) way to get a OpaquePointer instead an int, so I can call NativeCall on it
08:31 sorear yarp: now if you want to assume memory is a flat array of bytes possibly with holes... go for it.  every processor made in the last ~20 years has supported that, true segmentation is dead, word-addressed architectures are dead, split I/D architectures are dead (for non-embedded systems)
08:32 sorear FROGGS: there should be a way to do that, I'm not zavolaj-savvy enough to know it
08:32 sorear but on amd64 linux I would expect CArray[int] to contain 32-bit elements, not 64-bit
08:33 sorear even if Rakudo currently gets that wrong because of Parrot's deep-seated limitation of a single INTVAL type
08:36 FROGGS sorear: I am sure that more than 4-byte long ints
08:36 sorear Perl 6 has an int64 type which I would expect to represent an 8-byte int
08:37 sorear amd64 gets a performance advantage for 4-byte ints, so int defaults to 4-byte on Linux
08:37 FROGGS see https://github.com/jnthn/zavolaj/
08:38 FROGGS search for int32 in the readme
08:38 FROGGS there is a table
08:39 sorear I'm in ... mode right now, trying to help you for the future without any regard for current implementations
08:45 masak morning, #perl6
08:47 sorear o/ masak
08:48 FROGGS sorear: its just a workaround for now, I basically expect in the future a better way to access and unpack structs from plain pointers
08:52 FROGGS the main problem right now is that it cant handle sized ints, when that is done I guess the other stuff is done pretty fast
08:52 FROGGS and I hope to be able to help them at this point
08:54 FROGGS can I somehow get the list of named arguments a constructor expects?
08:59 sorear r: say DateTime.^attributes>>.name
08:59 p6eval rakudo 1374a9: OUTPUT«$!year $!month $!day $!hour $!minute $!second $!timezone &!formatter $!saved-offset␤»
08:59 FROGGS awesome!
08:59 sorear r: say DateTime.^attributes.grep(*.public)>>.name
08:59 p6eval rakudo 1374a9: OUTPUT«No such method 'public' for invocant of type 'Attribute'␤  in block  at /tmp/CJ1vZ3qYPM:1␤␤»
08:59 sorear r: say DateTime.^attributes[0].^methods(:local)>>.name
08:59 p6eval rakudo 1374a9: OUTPUT«Unmarshallable foreign language value passed for parameter 'obj'␤  in method dispatch:<hyper> at src/gen/CORE.setting:895␤  in block  at /tmp/bBifaNvlzi:1␤␤»
09:00 sorear r: say DateTime.^attributes[0].^m​ethods(:local).map(*.name)
09:00 p6eval rakudo 1374a9: OUTPUT«Unmarshallable foreign language value passed for parameter '$x0'␤  in block  at /tmp/ftkrEQNBGR:1␤␤»
09:00 sorear r: say DateTime.^attributes[0].^methods(:local)
09:00 p6eval rakudo 1374a9: OUTPUT«No such method 'gist' for invocant of type 'Sub'␤  in method gist at src/gen/CORE.setting:4730␤  in sub say at src/gen/CORE.setting:7143␤  in block  at /tmp/NVLzSf86rl:1␤␤»
09:00 sorear mumble
09:00 FROGGS hmmm, doing it on OpaquePointer gives me nothing :/
09:01 sorear what happens if you do nqp::unbox_i() on an OpaquePointer?
09:01 FROGGS hold on
09:03 FROGGS CPointer cannot unbox to a native int
09:06 FROGGS I guess I'm going another crappy way and pass my int to a C-function, that gives me this as a pointer back
09:08 moritz r: r: say DateTime.^attributes.grep(*.has_accessor)
09:08 p6eval rakudo 1374a9: OUTPUT«===SORRY!===␤Confused␤at /tmp/QDcjvZsVcm:1␤»
09:08 moritz r: say DateTime.^attributes.grep(*.has_accessor)
09:08 p6eval rakudo 1374a9: OUTPUT«$!year $!month $!day $!hour $!minute $!second $!timezone &!formatter␤»
09:08 sorear r: for Attribute.^methods { say $_ }
09:08 p6eval rakudo 1374a9: OUTPUT«Unmarshallable foreign language value passed for parameter '$_'␤  in block  at /tmp/w9X5f18tHo:1␤␤»
09:08 FROGGS no output for opaquepointer :/
09:09 sorear r: for Attribute.^methods -> Mu $x { say $x }
09:09 p6eval rakudo 1374a9: OUTPUT«Unmarshallable foreign language value passed for parameter '$x'␤  in block  at /tmp/bw3cIBTURg:1␤␤»
09:09 sorear what, I can't even bind it to Mu?
09:09 sorear r: for Attribute.^methods -> Mu $x is rw { say $x }
09:09 p6eval rakudo 1374a9: OUTPUT«Unmarshallable foreign language value passed for parameter '$x'␤  in block  at /tmp/vrW5r_WT_A:1␤␤»
09:13 yarp joined #perl6
09:18 vsmid joined #perl6
09:40 leont joined #perl6
10:11 b_jonas left #perl6
10:15 spider-mario joined #perl6
10:23 MayDaniel joined #perl6
10:56 colomon joined #perl6
11:05 Su-Shee_ joined #perl6
11:09 spacebat I'm wondering about perl6 support in cperl-mode for emacs
11:11 spacebat renormalist wrote a cperl6-mode that was supposed to have been merged into cperl-mode proper, his website links to the page on github I already use for cperl-mode, but I don't see any support specific to perl6
11:11 masak I don't think there is specific support for it, no.
11:11 masak but what little I've used cperl-mode, I feel it does Perl 6 quite well.
11:11 masak its design is based on recovering from confusion, unlike many other highlighters.
11:12 masak and so it treats Perl 6 as confusion to be routed around :)
11:12 spacebat oh wait, there's a perl6-pugs branch there
11:13 spacebat defining things like cperl-looks-like-perl6
11:13 spacebat https://github.com/jrockway/cperl-​mode/blob/perl6-pugs/cperl-mode.el
11:14 spacebat I'll try that - always the way that I figure it out just after asking
11:16 masak ;)
11:16 masak best of luck.
11:17 masak feel free to report your findings, and we'll be able to answer better next time.
11:23 spacebat thanks, cperl-mode is a bit of a beast but if I'm ever to really become familiar with perl6, it'll be using emacs and cperl is the best perl mode out there
11:30 cognominal joined #perl6
11:31 __sri if i write a little non-blocking web server benchmark comparing perl6 and perl5, would that be useful to anyone?
11:31 tokuhiro_ joined #perl6
11:32 __sri (initially perl6 would of course look pretty terrible due to the poll implementation)
11:32 masak tadzik has made similar benchmarks, ISTR.
11:32 masak not sure if they were non-blocking.
11:42 xdbr joined #perl6
11:48 xinming joined #perl6
12:05 tadzik hm?
12:05 tadzik oh, you mean apache benchmark vs bailador?
12:30 tadzik hm. Any idea how to display RT tickets assigned to me?
12:31 moritz https://rt.perl.org/rt3/ shows "50 highest priority tickets I own"
12:32 moritz if you have more than 50, you can click on the heading to get a "more" link
12:32 tadzik found 0 tickets. bah, I thought there are some Pod ones
12:32 moritz tadzik: should I assign them to you? :-)
12:33 tadzik moritz: that'd be good, thanks :)
12:33 moritz tadzik: what's your RT ID?
12:33 tadzik 'tadzik' I think
12:33 tadzik the only one I remember that with arbitrary <'s and >'s
12:33 tadzik in formatting codes
12:33 moritz hm, there's no tadzik there in the list of people to assign to
12:33 moritz https://rt.perl.org/rt3/Tic​ket/Display.html?id=114510
12:34 moritz https://rt.perl.org/rt3/Tic​ket/Display.html?id=114482
12:34 moritz https://rt.perl.org/rt3/Tic​ket/Display.html?id=114480
12:34 tadzik Logged in as tadzik
12:34 moritz https://rt.perl.org/rt3/Tic​ket/Display.html?id=114478
12:34 moritz tadzik: can you take such a ticket?
12:35 moritz maybe if you own a ticket, your name appears there (/me clings to straws)
12:35 tadzik I don't see a way to do this
12:35 moritz in the second horizontal bar I have those links on the right: "Open
12:35 moritz · Take
12:35 moritz ···
12:35 moritz Mark Spam
12:35 moritz ···
12:36 moritz Comment
12:36 moritz · Reply
12:36 moritz · Resolve
12:36 moritz eeks, c&p fail
12:36 tadzik I don't
12:36 * tadzik shakes fist at RT
12:36 tadzik I'll just bookmark them :)
12:36 moritz you don't happen to be on the "public" view of those tickets?
12:37 tadzik I don't think so. I'm logged in at least
12:37 moritz well, you can get the "public" view when logged in too
12:37 moritz those the links I gave you should be fine (ie not public)
12:38 moritz [Coke], pmichaud: can you please check if tadzik has fewer permissions in RT than me, and if yes, fix it? (RT login names are also 'tadzik' and 'moritz')
12:38 moritz tadzik: more: https://rt.perl.org/rt3/Tic​ket/Display.html?id=113924
12:42 JimmyZ joined #perl6
12:47 whiteknight joined #perl6
12:51 GlitchMr joined #perl6
13:14 xinming joined #perl6
13:23 tokuhiro_ joined #perl6
13:27 yarp joined #perl6
13:32 [Coke] moritz: sure.
13:32 jnthn hello o/
13:32 * jnthn is on le train
13:33 FROGGS hi jnthn
13:33 [Coke] login "tadzik" is not a p6bugadmin.
13:33 [Coke] jnthn: how you feeling?
13:33 leont Le train tends to be faster than the train, though
13:34 jnthn [Coke]: Like a bucket whose purpose is to transport phlegm around Sweden :/
13:34 jnthn Albeit, I'm a bit better for the weekend's sleep
13:34 [Coke] tadzik: You are now a perl6 bugadmin.
13:34 jnthn We'll see what two days of teaching and 3 days of keynoting does to me. :)
13:34 [Coke] jnthn: ewwwwwww.
13:35 jnthn [Coke]: Yeah :/
13:35 [Coke] moritz, tadzik: this might date from the "parrot" cleanup.
13:42 moritz [Coke]++ thanks!
13:44 orafu joined #perl6
14:04 scottdwaer joined #perl6
14:12 cognominal in France, what will happen fast is 'le train de rigueur' :(
14:12 cognominal Socialism means taxes
14:13 jnthn Taxes are fine if they use them to do decent stuffs.
14:14 cognominal well, you know european taxes today is paying wall street betting against the euro, and interest to private bank who got the money with zero interest from central banks
14:15 cognominal people say economy has become a casino, it's more like a mondial three card monte.
14:17 cognominal And we got the capitalist version of socialism. More taxes for the middle class to avoid taxing the 1%
14:19 cognominal They are talking of 75% taxes for the upper bracket… but only for revenues from work. What a joke.
14:20 mst capital gains taxes are complicated
14:21 cognominal taxing the rich is complicated.
14:21 mst "congratulations, your stocks gained 50% ... now you have to sell 25% of them to cover the taxes" doesn't improve the incentives to invest
14:21 mst and sufficiently rich people can fairly easily move a lot of their money out of your reach if they feel over-taxed
14:22 mst so, yeah
14:22 mst liveware problems abound in this space :)
14:22 moritz well, one could always take takes only on *wins* from stock market
14:22 moritz agree about the liveware problems
14:23 benabik joined #perl6
14:31 guarra6969 joined #perl6
14:44 gfldex there used to be a time without a capital gain tax. It was all included in income tax.
14:44 gfldex folk still bought shares on the stock exchange
14:44 jnthn Finally managed to scribble a block post: http://6guts.wordpress.com/2012/09/09/the-​moving-to-moose-hackathon-and-nqp-on-qast/
14:45 gfldex jnthn++ # for scribbleing
14:48 moritz jnthn++ # blogging
14:48 moritz jnthn++ # hacking
14:48 jnthn Suspect I'll struggle for hacking time this next week.
14:49 moritz I seem to remember that it took about 200s to parse the setting on my laptop, the latest number is 163
14:49 jnthn Unless I get lots better. We'll see.
14:49 moritz that's ok, it's much more important that you recover than you hack
14:50 fgomez joined #perl6
14:55 tadzik jnthn: s/nteresting/interesting/ probably
14:56 jnthn probably :)
14:57 tadzik nice block post too, jnthn++ :)
14:57 jnthn fixed
15:01 jnthn moritz: Whe n was the 200s, ooc?
15:01 jnthn moritz: That is, was the improvement when we switched to the QAST based NQP, or more a longer improvement over time with many changes?
15:02 jnthn Seems a bit big for the first.
15:05 moritz jnthn: I don't know exactly, maybe two or three weeks ago
15:05 yeltzooo joined #perl6
15:05 jnthn ok :)
15:05 moritz or it might be that may memory is simply buggy :-)
15:05 jnthn Well, nice improvement :)
15:05 moritz or I'm confusing machines
15:05 moritz or it actually did get faster :-)
15:06 jnthn Just need several more of them... :)
15:07 moritz jnthn: if you brain is not too squashy, I'd remind you that I'm still waiting for some review of the export-constant branch
15:08 jnthn moritz: I had forgotten. Thanks for the reminder.
15:08 moritz it's only one patch with 16 lines :-)
15:11 jnthn ah, we pass the symbol as an extra named arg
15:11 moritz aye
15:11 jnthn The patch looks fine, provided the extra named arg approach is fine.
15:11 moritz seemed to me "the simplest way that could possibly work"
15:12 jnthn Right. And I'm still not entirely convinced the "constants sorta kinda pretend to be types" approach can work.
15:12 moritz me neither
15:13 moritz it would take some extra work to make   constant a = 3; a === 3   return True
15:13 jnthn Anyway, I'm not too worried. People will write code that uses the trait. Less people will write traits themselves.
15:13 jnthn So if we change the implementation of the trait down the line, it won't affect much.
15:13 jnthn So I think I'm fine with it.
15:14 jnthn Shouldn't let the perfect be the enemy of the works fine.
15:15 moritz ok, then I'll cherry-pick tthat patch into nom
15:15 moritz no need for a merge commit for one commit :-)
15:15 jnthn aye
15:16 jnthn Hm, build time is the best I've seen in a while on my laptop too :)
15:17 dalek rakudo/nom: f488677 | moritz++ | / (3 files):
15:17 dalek rakudo/nom: export trait for constants
15:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f4886770b6
15:19 moritz jnthn: fwiw I've tried the same approach to exporting variables
15:19 moritz jnthn: and it sort of works, the variable and its type constraint make it into the code that does the importing
15:19 moritz but the value isn't shared between the module and the importing location
15:20 moritz any idea what might be going on?
15:21 moritz https://gist.github.com/3685011 # that's the patch
15:23 moritz and the code paths through the export traits up to $*W.install_package_symbol all use binding / no decontainerization
15:23 jnthn I've not much idea how that's gonna work
15:23 jnthn I mean, every time we enter a lexical scpoe, we get a new variable
15:23 jnthn If it's our-scoped we rebind what's in the package.
15:23 moritz hm, right
15:24 jnthn You end up exporting the thing in the proto-lexpad.
15:24 moritz that makes a lot of sense
15:24 jnthn Which is kinda fine if your trait does stuff to it that will be reflected in the clone of it we get per lexpad entry
15:24 moritz (from an implementation point of view)
15:24 jnthn But for exporting...hm
15:25 moritz well, one problem is that traits are run at compile time
15:25 jnthn I've no immediate idea how to make export do something sensible there.
15:25 jnthn Right.
15:25 moritz so   my $x is export = 'foo' can only ever see the proto lexpad
15:25 jnthn That's not a problem, that's just how traits work.
15:25 jnthn Correct.
15:25 moritz well, in this case it's a problem, if I want variable exports to DWIM :-)
15:25 moritz normally it's great :-)
15:26 moritz ok, I don't want to do any hard design work on that
15:26 jnthn Maybe it should attach a LEAVE trait to the block the thing is declared in somehow.
15:26 moritz I just thought it might be a LHF, and tried it
15:26 jnthn And htat binds into EXPORT somehow
15:26 jnthn Dunno
15:26 moritz and after it didn't work, I wanted to know why
15:26 * jnthn leaves it for somebody with a workinger brain :)
15:28 jnthn ooh, not far from Stockholm...
15:30 pmurias joined #perl6
15:31 * masak leaves for another train to Stockholm ;)
15:31 masak &
15:32 jnthn .oO( We must travel on separate trains, for corporate continuity )
15:33 jnthn detrain &
15:34 pmurias is perlcabal.org/syn broken?
15:34 diakopter yes
15:37 pmurias how can I call a method from a parent class in nqp?
15:37 * diakopter tries to fix apache on feather
15:40 diakopter there, fixed :)
15:40 diakopter pmurias: it's back up
15:44 xinming joined #perl6
15:46 cognominal joined #perl6
15:50 diakopter nqp: class A { method c() { self.d }; method d() { say(4) } }; class B is A { method d() { say(5) } }; B.new.c;
15:50 p6eval nqp: OUTPUT«5␤»
15:54 pmurias diakopter: I want something like SUPER in perl5
15:55 diakopter ah, by "from" you meant "of"
15:55 pmurias yes
15:57 diakopter I think I remember people discussing how to do that, but I don't remember how
15:57 diakopter afk&
15:58 GlitchMr Just wondering, does Perl 6 have something like http://golang.org/pkg/math/#Nextafter?
16:07 JimmyZ joined #perl6
16:07 JimmyZ pmurias: https://github.com/jnthn/rakudo-debugg​er/blob/master/bin/perl6-debug.nqp#L45
16:08 JimmyZ pmurias: or https://github.com/jnthn/rakudo-debugg​er/blob/master/bin/perl6-debug.nqp#L55 ?
16:09 * JimmyZ doesn't know what's the difference
16:13 cognominal joined #perl6
16:35 raiph joined #perl6
16:39 raiph I just posted "Tracking Perl 6 development" http://perlmonks.org/?node_id=992603 # would someone plz reddit this for me?
16:39 thou joined #perl6
16:49 masak oh hai from a train! \o/
16:51 masak GlitchMr: no. not that I know.
16:51 masak GlitchMr: ooc, what's a use case for such a function?
16:51 masak iterating through the floating-point values very slowly? :)
16:55 masak nqp: class A {}; class B is A {}; .say for B.HOW.parents(:local)
16:55 p6eval nqp: OUTPUT«Confused at line 2, near ".say for B"␤current instr.: 'panic' pc 19998 (src/stage2/gen/NQPHLL.pir:7314) (src/stage2/gen/NQPHLL.pm:325)␤»
16:56 masak nqp: class A {}; class B is A {}; $_.say for B.HOW.parents(:local)
16:56 p6eval nqp: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤current instr.: 'parents' pc 11291 (src/stage2/gen/nqp-mo.pir:4972) (src/stage2/gen/nqp-mo.pm:1100)␤»
16:56 masak nqp: class A {}; class B is A {}; $_.say for B.HOW.parents(B, :local)
16:56 p6eval nqp: OUTPUT«Method 'say' not found for invocant of class 'A'␤current instr.: '' pc 223 ((file unknown):151941468) (/tmp/sQwtbotxGf:1)␤»
16:56 masak :)
16:56 masak nqp: class A {}; class B is A {}; say($_) for B.HOW.parents(B, :local)
16:56 p6eval nqp: OUTPUT«␤»
16:57 masak pmurias: something like that might give you access to the superclass. it's a bit... manual... but it works.
17:00 fgomez joined #perl6
17:01 benabik joined #perl6
17:02 GlitchMr masak: checking if value is close enough
17:03 GlitchMr But I guess it isn't really needed with rational numbers
17:03 Chillance joined #perl6
17:03 masak right.
17:04 masak how the heck would you use Nextafter to check if a value is close enough? I don't get it.
17:05 geekosaur I can see it, kinda automated error bars on floating point calculations thing
17:08 GlitchMr perl6: ${1}
17:08 p6eval rakudo f48867: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name␤at /tmp/OQQeKCU1zl:1␤»
17:08 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of ${1}; in Perl 6 please use $0 at /tmp/2HChVBghus line 1 (EOF):â�¤------> [32m${1}[33mâ��[31m<EOL>[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
17:08 GlitchMr "Unsupported use of ${1}; in Perl 6 please use $0"
17:08 GlitchMr What?
17:09 GlitchMr That is... nice feature
17:10 masak yeah. STD (and therefore Niecza) are good at informative error messages.
17:10 GlitchMr I was surprised to even see $0
17:10 GlitchMr But...
17:10 GlitchMr perl6: ${0}
17:10 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of ${0}; in Perl 6 please use $(-1) at /tmp/L_0_1wZBFe line 1 (EOF):â�¤------> [32m${0}[33mâ��[31m<EOL>[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
17:10 p6eval ..rakudo f48867: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name␤at /tmp/SvdiBPujoa:1␤»
17:10 GlitchMr $(-1) is not correct
17:11 tokuhiro_ joined #perl6
17:11 GlitchMr -1 means simply -1
17:12 GlitchMr Perhaps $*PROGRAM_NAME, but I'm not sure
17:14 masak n: ${0x10}
17:14 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of ${0x10}; in Perl 6 please use $0x10 at /tmp/ztWrT3PQJQ line 1 (EOF):â�¤------> [32m${0x10}[33mâ��[31m<EOL>[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
17:14 masak n: ${1e3}
17:14 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of ${1e3}; in Perl 6 please use $1e3 at /tmp/rv_GDbB3Z4 line 1 (EOF):â�¤------> [32m${1e3}[33mâ��[31m<EOL>[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
17:15 GlitchMr This looks like some sort of bug
17:15 masak yeah, but not a very serious one.
17:15 GlitchMr But, it doesn't matter much
17:15 GlitchMr ${0x10} is invalid with use strict
17:16 GlitchMr niecza: $`
17:16 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m​===[0mâ�¤â�¤Non-declarative sigil is missing its name at /tmp/7jwQ2yEiU8 line 1:â�¤------> [32m<BOL>[33mâ��[31m$`[0mâ�¤â�¤Confused at /tmp/7jwQ2yEiU8 line 1:â�¤------> [32m<BOL>[33mâ��[31m$`[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
17:16 GlitchMr std: $`
17:16 p6eval std b87ea13: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $` variable; in Perl 6 please use explicit pattern before <( at /tmp/xyENMCge8K line 1:�------> [32m$`[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 41m�»
17:16 GlitchMr std: ${0x10}
17:16 p6eval std b87ea13: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of ${0x10}; in Perl 6 please use $0x10 at /tmp/j7U_e9edMh line 1:�------> [32m${0x10}[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 41m�»
17:17 GlitchMr But if STD proposes you to do something weird, it's a bug, isn't it?
17:19 masak arguably, yes.
17:20 GlitchMr std: @{$hello}{'world', 'is', 'nice'}
17:20 p6eval std b87ea13: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of @{$hello}; in Perl 6 please use @($hello) at /tmp/AnxTkDh_eB line 1:�------> [32m@{$hello}[33m�[31m{'world', 'is', 'nice'}[0m�Parse failed�FAILED 00:00 41m�»
17:22 GlitchMr I guess that if "std" says you to convert hash reference slice to array hash reference slice something is wrong
17:26 masak no, that one looks OK to me.
17:35 cognominal joined #perl6
18:00 marmay joined #perl6
18:03 Guest3957 joined #perl6
18:13 dfaure joined #perl6
18:17 masak it's funny. I feel that both jQuery and Java's Collections Framework approach a really nice way to handle collections, but they don't go the whole way.
18:19 masak specifically, JCF's sublists are really powerful. Perl 6 does something similar.
18:20 Juerd Nobody ever goes the whole way. Those who do in one area, fail to finish the product.
18:20 masak r: my @a = 1..20; @a[4..14] .= reverse; say @a.perl
18:20 p6eval rakudo f48867: OUTPUT«Array.new(1, 2, 3, 4, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 16, 17, 18, 19, 20)␤»
18:21 masak stuff like this is what I'm talking about.
18:21 Juerd <3 .=
18:29 sorear good * #perl6
18:30 masak what jQuery gets right is a really natural way to make selections on trees.
18:30 pmichaud good afternoon, #perl6
18:30 masak sorear! \o/
18:30 masak pmichaud! \o/
18:30 sorear au! \o/
18:31 GlitchMr perl6: my @a = set 1..20; say @a[0]; # I know it won't work
18:31 p6eval rakudo f48867: OUTPUT«1␤»
18:31 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«set(16, 15, 14, 13, 20, 19, 18, 17, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)␤»
18:31 GlitchMr wait...
18:31 GlitchMr Sets are ordered?
18:35 masak they are not.
18:35 masak I prefer Niecza's answer there.
18:35 vs-midi joined #perl6
18:36 GlitchMr Yeah, I was surprised to see that sets are Positional
18:36 thou joined #perl6
18:36 GlitchMr I know that sets are Associative... but Positional?
18:37 GlitchMr perl6: my @a = set 1..20; say @a{2};
18:37 p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Cannot use hash access on an object of type Array␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 352 (Any.at_key @ 9) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/tfK22ttjI3 line 1 (mainli…
18:37 p6eval ..rakudo f48867: OUTPUT«postcircumfix:<{ }> not defined for type Array␤  in method gist at src/gen/CORE.setting:9820␤  in sub say at src/gen/CORE.setting:7150␤  in block  at /tmp/OIKzdnfA8Y:1␤␤»
18:37 GlitchMr perl6: my $a = set 1..20; say $a{2};
18:37 p6eval rakudo f48867, niecza v21-1-ga8aa70b: OUTPUT«True␤»
18:37 GlitchMr perl6: my $a = set 1..20; say $a[0];
18:37 p6eval rakudo f48867: OUTPUT«set(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)␤»
18:37 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«16␤»
18:37 GlitchMr Why sets are positional, anyways?
18:38 masak sets are not Positional.
18:38 masak r: say Set ~~ Positional
18:38 p6eval rakudo f48867: OUTPUT«False␤»
18:40 GlitchMr n: say Set ~~ Positional
18:40 p6eval niecza v21-1-ga8aa70b: OUTPUT«False␤»
18:40 GlitchMr But they act like positional, in Niecza
18:40 GlitchMr n: my $a = set 1..20; @a[4..8].join(' ').say
18:40 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable @a is not predeclared at /tmp/dssWbWjOg_ line 1:â�¤------> [32mmy $a = set 1..20; [33mâ��[31m@a[4..8].join(' ').say[0mâ�¤â�¤Potential difficulties:â�¤  $a is declared but not used at /tmp/dssWbWjOg_ line 1:â�¤------> [32mmy…
18:40 GlitchMr n: my $a = set 1..20; $a[4..8].join(' ').say
18:41 p6eval niecza v21-1-ga8aa70b: OUTPUT«20 19 18 17 1␤»
18:41 GlitchMr n: my $a = set 1..20; $a.join(' ').say
18:41 p6eval niecza v21-1-ga8aa70b: OUTPUT«16 15 14 13 20 19 18 17 1 2 3 4 5 6 7 8 9 10 11 12␤»
18:41 sorear r: my $a = set 1..20; $a[4..8].join(' ').say
18:41 p6eval rakudo f48867: OUTPUT«Index out of range. Is: 4, should be in 0..0␤  in method Str at src/gen/CORE.setting:9819␤  in method Stringy at src/gen/CORE.setting:742␤  in method join at src/gen/CORE.setting:1141␤  in block  at /tmp/d69OV4i7iq:1␤␤»
18:41 sorear r: my $a = set 1..20; $a.list.[4..8].join(' ').say
18:41 p6eval rakudo f48867: OUTPUT«5 6 7 8 9␤»
18:41 sorear when I was learning perl 6, .[foo] was supposed to always act as if it were really .list.[foo]
18:42 pmichaud o_O
18:42 sorear dwim here: if an object isn't positional but you try to pretend it is, coerce it
18:42 GlitchMr That would make sense
18:43 GlitchMr In Python, I can do that too - it's just more explicit
18:43 GlitchMr >>> list({5, 1, 2, 8})
18:43 GlitchMr [8, 1, 2, 5]
18:43 pmichaud it's explicit in rakudo too, as sorear++ demonstrated above
19:08 leont joined #perl6
19:10 marmay Does IO::Handle's .getc() method return a certain number of characters or bytes?
19:11 FROGGS should be one char/byte, no?
19:12 FROGGS I believe there is a.getstring or so that returns everything till \0
19:13 * masak can't find an IO::Handle in Rakudo's source
19:14 masak r: say !so IO::Handle
19:14 p6eval rakudo f48867: OUTPUT«Could not find symbol '&Handle'␤  in method <anon> at src/gen/CORE.setting:9825␤  in  at src/gen/Metamodel.pm:2317␤  in any find_method_fallback at src/gen/Metamodel.pm:2305␤  in any find_method at src/gen/Metamodel.pm:859␤  in  at src/gen/BOOTSTRAP.pm:826␤  in any…
19:14 pmurias why does nqp always have those horribly long stack traces on compiling errors?
19:14 FROGGS getting more info isnt bad IMO
19:15 masak those stacktraces add very little information.
19:15 masak they add text.
19:16 pmurias and I have to scroll a few screens
19:18 jnthn pmurias: It shows you the stack trace from the parse, which can be fairly deep.
19:19 jnthn In Rakudo, folks have invested time in making the developer experience here nicer.
19:19 jnthn moritz++ especially
19:19 jnthn NQP is fairly unloved there.
19:19 FROGGS thats true, tell me another language where you get hints what you might do to fix the problem
19:20 geekosaur ghc has been gettig better about such hints
19:24 sorear masak: they add information when you're trying to debug the parser
19:24 masak conceded.
19:24 jnthn Yeah
19:24 masak which most end users aren't.
19:24 jnthn Which, let's face it, I have been plenty of times in the last year's NQP work :)
19:24 jnthn masak: I'm probably NQP's biggest end user. :)
19:25 masak heh.
19:25 * masak avoids making a "biggest end" joke
19:26 * masak .oO( big-endian users )
19:27 jnthn :P
19:27 jnthn Anyway, I agree it's not optimal. Patches to make it better are welcome.
19:27 jnthn I hope I won't always be NQP's biggest (end user). :P
19:32 masak :P
19:32 masak srsly, nqp seems to be a fine piece of tech.
19:32 jnthn I agree.
19:32 masak I could easily imagine implementing large systems in it.
19:33 masak something like, I dunno, a compiler.
19:33 jnthn But, as I said in le blog post earlier, Rakudo tends to get the majority of the tuits.
19:33 masak aye.
19:33 masak it's a matter of priorities.
19:36 pmurias jnthn: does NQP have a intended use besides faster Perl6 dialect for writing Rakudo?
19:37 masak compiler toolkit.
19:39 jnthn What masak said.
19:45 jnthn .u heart
19:45 phenny U+2766 FLORAL HEART (❦)
19:45 jnthn wat
19:46 masak .u heartsuit
19:46 phenny masak: Sorry, no results for 'heartsuit'.
19:46 jnthn .u brokenheart
19:46 phenny jnthn: Sorry, no results for 'brokenheart'.
19:47 masak .u heart suit
19:47 phenny U+2661 WHITE HEART SUIT (♡)
19:47 masak .u black heart suit
19:47 phenny U+2665 BLACK HEART SUIT (♥)
19:47 tadzik .u perl
19:47 phenny tadzik: Sorry, no results for 'perl'.
19:47 masak .u heart bullet
19:47 phenny U+2767 ROTATED FLORAL HEART BULLET (❧)
19:47 masak .u heavy heart
19:47 phenny U+2764 HEAVY BLACK HEART (❤)
19:48 masak :)
19:48 tadzik .u heavy metal
19:48 phenny tadzik: Sorry, no results for 'heavy metal'.
19:49 jnthn .oO( mercury, aluminum, iron... )
19:59 leont .u camel
19:59 phenny leont: Sorry, no results for 'camel'.
20:00 leont What version of unicode is that running?
20:02 pmurias masak: what are it's advantages over Perl6 besides speed?
20:05 moritz the compiler toolikit
20:06 arnsholt One of the goals is to be simpler (particularly in terms of implementation) than full Perl 6, IIRC
20:07 moritz another thing is that you can easily pass non-Perl 6 objects into nqp subroutines, but not into Perl 6
20:25 Moukeddar joined #perl6
20:27 Circlepuller_ joined #perl6
20:30 Circlepuller__ joined #perl6
20:32 pmurias jnthn: any ideas when dumping QAST for a given code snippet will be supported?
20:33 jnthn pmurias: When somebody implements it. It ain't hard to do, but I'm gonna be mostly tuitless for the next week or so :(
20:34 pmurias wouldn't having nqp add a .perl method to each class (or some metaclass trickery) solve that?
20:34 jnthn Well, thing is, we already can dump NQPMatch, afaik.
20:34 jnthn So I guess looking at how that works is a good start.
20:36 * mst grins
20:36 mst switched to my own packaging tools, now going to end up with a better Rakudo::Star
20:38 pmurias mst: you are taking over packaging Rakudo::Star? ;)
20:38 * leont would have done that too, but his packaging tools are very different from mst's
20:38 mst pmurias: I'm building Rakudo::Star as a cpan module
20:38 mst pmurias: because it's funny
20:41 * jnthn likes mst++'s sense of humor :)
20:41 mst jnthn: http://trout.me.uk/perl/Rak​udo-Star-2012.08002.tar.gz
20:42 mst I'm checking that builds on my machine, then I'll cpan it
20:42 mst gah
20:42 mst wait
20:42 mst no, I am right
20:42 mst I did remember to start at 000
20:42 * mst unpanics
20:44 mst leont: mine are grumpy and minimalist ... go figure :)
20:45 Moukeddar left #perl6
20:45 * leont can sympathize with that, my first Build.PL involvement started with a script that responded to the build test and install commands, because handrolling that seemed easier than taming Module::Build
20:46 mst Distar: just enough release automation people stop asking me to use dzil
20:47 moritz masak: IO::Handle is still just called IO in Rakudo
20:48 * leont will write his own authoring tool when he's done writing his install tool. He does think he can do better than dzil though.
20:48 moritz if leaner is better, you probably can :-)
20:49 leont Well, that's certainly a factor
20:50 leont But the whole plugin system it uses is fundamentally broken too
20:50 moritz fwiw I decided to try Mojolicious while waiting for 'cpanm Catalyst' to finish :-)
20:51 leont The one thing make got right and everyone who does it differently is inversion of control. Make's dependencies are IoC in their own unique way, dzil's phases are no replacement for that.
20:51 ifim joined #perl6
20:51 mst leont: also, 'make -n'
20:51 mst leont: which I guess flows from that
20:51 leont That flows more from separating planning from execution, which is another good idea
20:52 mst right
20:52 mst those two things are what nothing else I've used has provided well enough to keep me from going back to make
20:52 leont It's something surprisingly difficult to do right
20:54 mst right, and for everything about make that drives me insane ... those two are addictive
21:02 masak detrain &
21:12 pmurias there's a bug in rakudo's Test.pm
21:13 pmurias if I set the PERL6_TEST_TIMES env variable and don't call plan a variable doesn't get initialised
21:22 cognominal What is the overhead of gc in rakudo?
21:29 Liz joined #perl6
21:38 Circlepuller__ joined #perl6
21:38 jnthn sleep &
21:38 benabik joined #perl6
21:39 whiteknight joined #perl6
21:46 pmurias joined #perl6
21:59 * [Coke] waves at pmichaud
22:08 crab2313 joined #perl6
22:57 tokuhiro_ joined #perl6
23:14 BlueT_ joined #perl6
23:14 Pleiades` joined #perl6
23:14 Khisanth joined #perl6
23:15 pmurias joined #perl6
23:15 araujo joined #perl6
23:15 phenny joined #perl6
23:15 Util joined #perl6
23:15 [Coke] joined #perl6
23:22 thou rn: https://gist.github.com/3687899
23:22 p6eval rakudo f48867, niecza v21-1-ga8aa70b: OUTPUT«(timeout)Before .perl␤»
23:23 thou is that a known behavior? (.perl doesn't handle recursive structures)
23:26 sorear yes.
23:44 araujo joined #perl6
23:45 integral joined #perl6
23:45 integral joined #perl6
23:47 benabik joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs