Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-02-26

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:29 gcole joined #perl6
00:32 benabik joined #perl6
00:44 hash_table joined #perl6
01:04 anuby joined #perl6
01:05 rjbs TimToady seemed to say the other day that [].splice(0,3) should be false, and that its truth in Rakudo is a bug.  Pm says "I'm not sure if this is correct" of my bug report.
01:06 rjbs Where can I find a citation to provide to Pm, other than chatlogs?
01:06 rjbs I think the last para of http://perlcabal.org/syn/S​32/Containers.html#splice is on point?
01:10 TimToady yup
01:10 rjbs Thanks.  I had worried that there would be some subtle nuance to the words used, to which I was not yet attuned.
01:11 TimToady and well motivated, insofar as it makes it much easier to write a loop with it
01:11 rjbs indeed
01:11 TimToady not to mention prior art in p5
01:20 hypolin joined #perl6
01:46 diakopter phenny: tell nothingmuch your XS-related modules on github are great! I'm using no less than 4 of them so far...  thanks!
01:46 phenny diakopter: I'll pass that on when nothingmuch is around.
02:10 lustlife joined #perl6
02:29 colomon r: constant &roundcents ::= &round.assuming(1/100); say roundcents(123.123141)
02:29 p6eval rakudo 0f9703: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in sub round at src/gen/CORE.setting:2831␤  in sub CURRIED at src/gen/CORE.setting:1962␤  in block  at /tmp/kAL3tN51tX:1␤␤»
02:30 colomon oh, right, sub round.
02:33 colomon r: sub roundcents($x) { round($x, 1/100); }; say roundcents(123.124123)
02:33 p6eval rakudo 0f9703: OUTPUT«123.12␤»
02:33 colomon shorter, actually works.  hrmph.
02:37 FROGGS_ joined #perl6
02:37 dalek specs: d6eae27 | (Solomon Foster)++ | S32-setting-library/Numeric.pod:
02:37 dalek specs: Get rid of the roundcents example, which no longer works and is longer than just writing a new sub anyway.
02:37 dalek specs: review: https://github.com/perl6/specs/commit/d6eae27a80
02:54 swarley- joined #perl6
03:20 Celelibi joined #perl6
03:21 orafu joined #perl6
03:41 rindolf joined #perl6
04:06 benabik joined #perl6
04:07 benabik joined #perl6
04:21 SamuraiJack joined #perl6
04:25 xinming_ joined #perl6
04:34 fgomez joined #perl6
04:39 preflex_ joined #perl6
05:27 pmichaud joined #perl6
05:34 kaleem joined #perl6
05:44 sjn joined #perl6
05:59 lue .oO(Apparently, ~/.perl6/<version>/bin is now /usr/local/lib/parrot/.../bin)
05:59 rindolf joined #perl6
06:01 sjn joined #perl6
06:06 rindolf joined #perl6
06:16 rindolf joined #perl6
06:26 TheVenetianMask joined #perl6
06:32 rindolf joined #perl6
06:37 kst` joined #perl6
06:48 thou joined #perl6
06:48 rindolf joined #perl6
07:13 FROGGS joined #perl6
07:16 rindolf joined #perl6
07:20 nebuchadnezzar joined #perl6
07:22 FROGGS jnthn: I'd like to experiment with masak's NFA C tutorial, but even if I got something working, that wouldn't be that portable
07:22 FROGGS it might just be useful for the Go port
07:22 quester left #perl6
07:22 FROGGS jnthn: happy cake btw ;o)
07:26 ObseLeTe joined #perl6
07:29 wk joined #perl6
07:29 diakopter FROGGS: what's masak's NFA C tutorial?
07:31 FROGGS diakopter: http://swtch.com/~rsc/regexp/regexp1.html - Regular Expression Matching Can Be Simple And Fast
07:32 FROGGS I'd like to do that for "normal" regexes, and add another codepath when using backtracking
07:33 FROGGS the diagrams are impressive, but I dont trust diagrams, so I'd like to experiment on my own to see if it would be promising
07:35 sqirrel joined #perl6
07:36 drKreso joined #perl6
07:36 drKreso Hi
07:38 diakopter FROGGS: probably it's worth compiling a regex to such a thing, if it doesn't need any features that regex engine doesn't provide
07:39 stevan_ joined #perl6
07:39 diakopter it's trivial to detect such compatability, I'm quite certain
07:39 diakopter drKreso: hi
07:39 FROGGS drKreso: hi
07:39 rindolf joined #perl6
07:40 drKreso All I can say about Perl6i is wow :)
07:40 diakopter what's Perl6i? :)
07:40 FROGGS drKreso: well, than it might be a quiet day *g*
07:41 mberends joined #perl6
07:42 Khisanth joined #perl6
07:42 drKreso Heh, Actually I am puzzled with difference of pointy block -> and =>
07:43 drKreso And their relation to Ruby blocks
07:48 sorear drKreso: what is perl6i ?
07:48 FROGGS sorear: that's the release name after perl6h :o)
07:49 sorear drKreso: I am going to assume the i was a typo and you meant Perl 6
07:49 drKreso It's begging of is
07:49 drKreso Perl6 is
07:50 sorear drKreso: the difference is that -> has something to do with blocks, and => doesn't.
07:50 drKreso I thoght perl doesn't care about whitespaces :)
07:50 sorear => is just a pair constructor
07:50 sorear foo => 3  means Pair.new(:key("foo"), :value(3))
07:50 sorear (perl 5 mostly doesn't care about whitespace.  perl 6 cares a bit more)
07:51 Patterner joined #perl6
07:51 mtk joined #perl6
07:51 Timbus joined #perl6
07:51 sorear n: 2 < 3 > .say
07:51 p6eval niecza v24-24-gbdc3343: OUTPUT«(Any)␤»
07:51 sorear n: 2<3>.say
07:51 p6eval niecza v24-24-gbdc3343: OUTPUT«Unhandled exception: Cannot use hash access on an object of type Int␤  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/ZYEyt8FsVg line 1 (mainlin…
07:54 drKreso sorear: Thanks, I was under wrong impression.
07:56 drKreso I am a bit lost with hyper operator.... If we say in Ruby (1..5).reduce(&:+), I know it can be written like [+] (1..5) (or similar), but how can I pass in higher order function (or block) via » (or am I missing the point of hyper)
07:56 sorear n: my $bl = -> $thing { say "hello $thing" }; $bl("world")
07:57 p6eval niecza v24-24-gbdc3343: OUTPUT«hello world␤»
07:57 drKreso For example (1..5).reduce { |x| x + rand }
08:00 sorear i am not sure how that works
08:01 sorear shouldn't reduce take two arguments?
08:01 drKreso Ruby part?
08:01 sorear yes
08:01 sorear can you explain what that ruby is doing?
08:01 FROGGS (&:+) <--- is like a guy with curly hair to me
08:02 drKreso (1..5).reduce { |x,sum| sum += x } #=> 15
08:02 drKreso (1..5).reduce(&:+)
08:02 sorear drKreso: does "reduce { |x| x + rand }" mean anything?
08:02 drKreso it means apply method + to all elements and pass result
08:02 sorear the lack of a comma in |x| is confusing me
08:03 sorear but I think I get where you're going with this
08:03 drKreso In perl it's  [+] (1..5)
08:03 sorear the answer was, until recently, no
08:04 drKreso I am interested in "reduce" with block counterpart in perl
08:04 sorear r: [1,2,3,4,5].reduce({ say "x=$^x y=$^y"; 5 })
08:04 p6eval rakudo 0f9703: OUTPUT«x=1 y=2␤x=5 y=3␤x=5 y=4␤x=5 y=5␤»
08:04 sorear that's the sane way
08:05 sorear the [x] syntax is only useful with named functions, not really with anonymous ones
08:05 sorear but you can use .reduce with anonymous functions
08:06 drKreso what is $^x?
08:06 sorear shorthand for a parameter
08:06 sorear r: [1,2,3,4,5].reduce(-> $x, $y { say "x=$x y=$y"; 5 })
08:06 p6eval rakudo 0f9703: OUTPUT«x=1 y=2␤x=5 y=3␤x=5 y=4␤x=5 y=5␤»
08:07 drKreso So this is "block" version of sum : [1,2,3,4,5].reduce({ $^x + $^y})
08:08 drKreso How would I inject starting value (1..5).reduce(8) { |x,sum| sum += x } #=> 23
08:08 brrt joined #perl6
08:09 drKreso sorear: Thanks, now I get it [1,2,3,4,5].reduce(-> $x, $y { say "x=$x y=$y"; 5 })  This way I can see it's block
08:09 drKreso I kinda like it
08:10 drKreso Btw. --the answer was, until recently, no-- how recently? I am curious?
08:11 sorear drKreso: that one was mostly just me being confused and forgetful
08:12 sorear n: say [1,2,3,4,5]>>[&( { $_ * $_ } )]
08:12 p6eval niecza v24-24-gbdc3343: OUTPUT«(Any) (Any) (Any) (Any) (Any)␤»
08:13 sorear n: say [1,2,3,4,5] Z[&( { $^a * $^b } )]  [10,100,1000,10000,100000]
08:13 p6eval niecza v24-24-gbdc3343: OUTPUT«25␤»
08:13 drKreso Z is zip right?
08:13 sorear yes
08:13 sorear there was a change a couple months ago to allow you to use anonymous functions with the metaoperators
08:14 drKreso that >> example is not working for me
08:14 sorear n: say (1,2,3,4,5 Z[&( { $^a * $^b } )] 10,100,1000,10000,100000)
08:14 p6eval niecza v24-24-gbdc3343: OUTPUT«10 200 3000 40000 500000␤»
08:14 sorear there we go
08:14 * arnsholt scrollbacks
08:14 sorear r: say (1,2,3,4,5 Z[&( { $^a * $^b } )] 10,100,1000,10000,100000)
08:14 drKreso What's the & for?
08:14 p6eval rakudo 0f9703: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse expression in bracketed infix; couldn't find final ']'�at /tmp/97TERKH2f2:1�------> [32msay (1,2,3,4,5 Z[&[33m�[31m( { $^a * $^b } )] 10,100,1000,10000,100[0m�»
08:14 sorear drKreso: Disambiguation, mostly
08:15 sorear SIGIL( FOO ) lets you use an expression in a syntactic spot that accepts a variable
08:15 drKreso say [1,2,3,4,5]>>[&( { $_ * $_ } )]
08:15 drKreso ok
08:15 arnsholt TimToady, jnthn: I've pondered NativeCall-JVM a bit, and I think it should be possible to implement more or less like NativeCall-Parrot
08:15 FROGGS arnsholt: time and day? :P
08:15 sorear you can use [VARIABLE] anywhere an infix operator is expected, in niecza only it seems
08:15 drKreso Index out of range. Is: 1, should be in 0..0
08:15 arnsholt Except that less code has to be in C, I think, and more in Java
08:16 arnsholt FROGGS: When, you mean?
08:16 FROGGS arnsholt: right :o)
08:16 sorear drKreso: the >>[] is wrong, wrong, wrong.  [&( EXPR )] is only for infixes, not postfixes
08:16 arnsholt My current plan is to wait until NQP-JVM is in the main NQP repo
08:16 FROGGS ya, that makes sense
08:17 arnsholt Also, I'd like to improve various parts of the API (Buffers, most notably) before going to backend #2
08:18 sorear drKreso: you've probably noticed that there's a difference betwen n: and r:, do you need me to elaborate on that?
08:18 FROGGS ohh yes, implementing an API that will change in near future is a waste of time
08:19 drKreso sorear: yes I don't have a clue what are you talking about
08:19 drKreso :(
08:20 domidumont joined #perl6
08:20 sorear ok, there are a few implementations of perl 6
08:20 sorear what you probably have installed on your computer is rakudo/parrot
08:20 sorear that has the largest development team at the moment
08:20 drKreso yes rakudo
08:21 sorear that's "r" in p6eval
08:21 FROGGS p6eval: help
08:21 p6eval FROGGS: Usage: <(star|pugs|nqp|b|std|niecza|rakudo|nom|npr|n|r​|perl6|prn|rn|p|rnp|nrp|pnr|rpn|p6|nr)(?^::\s) $perl6_program>
08:21 drKreso What is n:
08:22 sorear n = niecza, which runs on Mono/.net and has a different set of features
08:22 sorear also I wrote it
08:22 sorear when I'm doing examples, I send them to n because I can better predict how n will react
08:23 FROGGS drKreso: and there is nqp, which is a layer between parrot (a VM), and rakudo
08:23 sorear p is audreyt's pugs, which hasn't been touched in quite a while
08:24 drKreso Oh , wow.
08:24 sorear rpn, rp, rn, and all permutations thereof let you run something in the 3 most complete implem entations and compare output
08:24 sorear star runs a full rakudo star build, with modules
08:24 sorear perl6 and p6 are aliases for rpn
08:25 drKreso what is your motivation for implementing your version?
08:26 sorear because I didn't like the way Rakudo was going and I thought I could do better
08:26 drKreso Hehe, fair enough. I am .NET guy myself... so at least I can understand your version :)
08:27 sorear niecza was actually developed using mono on a linux machine
08:27 SamuraiJack joined #perl6
08:28 sorear niecza is no longer very actively developed.  times have changed, it's less needed now, and it's nowhere near as fun for me as it once was
08:28 FROGGS niecza is pretty cool and fast and has according to the daily spectests about 80% of rakudos features (in some areas niecza still beats rakudo)...
08:28 sorear most of my biggest gripes with everything rakudo were addressed in the most recent large rewrite
08:29 drKreso I meant C#... how long have you been developing it?
08:29 FROGGS what I dont like about rakudo is that there is this layer nqp, which is some sort of independent project
08:29 drKreso nqp is?
08:29 FROGGS not quiet perl
08:29 sorear drKreso: I started in mid-2010.  it's harder to put a concrete date on when I stopped
08:29 sorear c# is a pretty nice language :)
08:29 drKreso hehe
08:30 FROGGS drKreso: if you look at its syntax nqp almost looks like perl, but it isnt even a subset of it
08:30 drKreso a bit verbose... but all in all it's ok
08:31 drKreso I see the features matrix - it's a shame not to finish it :)
08:31 FROGGS it is, yes
08:32 drKreso I mean it's probably better than C when developing language
08:32 sorear are you talking about nqp or c#
08:33 drKreso c#
08:33 drKreso It evalated c after all :)
08:34 domidumont joined #perl6
08:35 drKreso FROGGGS: nqp - almost like perl5 or perl6
08:35 daxim joined #perl6
08:36 drKreso sorear : TimToday had commit 3 days ago on ? That's Larry right?
08:36 FROGGS drKreso: almost like perl 6
08:37 sorear drKreso: Yes
08:39 drKreso What is rakudo written in?
08:40 FROGGS nqp and perl 6, and a tiny bit pir (parrot language)
08:41 drKreso bootstrapping?
08:41 FROGGS but these tiny bits are fading away since it is ported to JVM
08:41 sorear also C
08:41 FROGGS drKreso: yes, but dont ask details, I can't answer these :o)
08:41 FROGGS right, parts of the multi dispatcher are C, and some other bits
08:42 sorear drKreso: The compiler is written in NQP, the low-level runtime support code is in C, and the standard library is in Perl 6
08:43 sorear The parts of the standard library that are so fundamental that they need to be in place before any Perl 6 can be parsed, are in NQP and bundled with the compiler
08:43 drKreso So when can I use rakudo in production :) What is main argument against? Speed? Stability? Memory?
08:44 drKreso Libraries? Btw. Can't I user perl5 CPAN libraries?
08:44 FROGGS drKreso: some day this year? Yes, No, No
08:44 drKreso great
08:44 sorear you can use it *now* if you're willing to accept the speed and memory
08:44 FROGGS drKreso: not yet, it is specced, but not supported right now
08:44 sorear can't use cpan libs transparently, but there's a p5 foreign call system that works occasionally
08:44 drKreso But it will be? Is it a big problem?
08:45 sorear I think that stability-wise rakudo is actually pretty good
08:45 FROGGS drKreso: my plan is to port a few modules from perl 5 to 6, to be able to so some production stuff with perl 6 this year
08:45 sorear some people are already using perl 6 in important systems
08:45 FROGGS no doubt, it is stable
08:45 sorear don't expect to handle 100 requests per second with a perl 6 web server
08:46 drKreso Exciting, I want to use it!
08:46 FROGGS well, then: git clone ...
08:46 drKreso It feels like ruby on stereoids, and I love ruby
08:46 drKreso Do any of you guys thinks  perl5 < ruby < perl6, or do you always prefere perl
08:46 hoelzro Ruby is quite nice
08:46 FROGGS I dont no any ruby
08:47 hoelzro I do most of my work in Perl 5, but I know a fair amount of Ruby
08:47 hoelzro I definitely think that Perl 6 incorporates the good things that Ruby added
08:47 drKreso hoelzro: Yes, same here
08:48 drKreso FROGGS: Oh, I have rakudo, I've been sleeping badly last three days from trying it out dead tired :)
08:48 sorear The problem we have with the "production ready" meme is that it lumps together too many applications that need to remain separate.  Languages and implementations must be evaluated on a case by case basis.
08:48 sorear Is Perl 5 ready to replace FORTRAN for big model runs at the National Weather Service?
08:50 sorear Ruby is probably the most widely used language that I cannot even read.
08:50 sorear I should fix that someday.
08:50 sorear It has to be easier than J.
08:52 drKreso Ruby has a lot of nice stuff that is taken directly from perl5, so you should feel right at home. Actually seeing so many ideas that I like stolen from perl5 made me look at perl... and than BANG perl6, wow
08:53 drKreso And I had no idea it's been cooking for 12 years, so I feel like a guy who falls asleep, and awakens at the end of 24h trip (that is supposed to last 2h) and ask passenger - "Oh we are already here" - And they all are pissed of at him since he was sleeping the whole time.
08:54 Timbus its probably better that way. many people gave up along the way
08:54 sorear the goal of perl6 has always been to design a language that people will still want to use in 2030
08:55 FROGGS drKreso: same for me, maybe I was under a rock but till last YAPC I didnt know that there is perl 6 :/
08:55 sorear FROGGS: you discovered p6 in frankfurt?
08:55 FROGGS right
08:55 sorear huh
08:56 drKreso FROGGS: You came in nice and fresh smelling like a rose :)
08:56 sorear I thought you were here longer than that
08:56 FROGGS I never went to YAPCs or workshops before, might be a reason
08:56 FROGGS drKreso: *g*
08:56 sorear yeah well you have so many of them near where you live ;)
08:56 FROGGS sorear: I'm active here since october
08:57 drKreso FROGGS: Is there any way I can help for rakudo? I feel it would be a good way to get to know the language better. How did you start?
08:59 kresike joined #perl6
08:59 kresike hello all you happy perl6 people
08:59 FROGGS the first thing I did (and timotimo too), is skimming through bg reports, and test if they are already done
08:59 drKreso at github?
08:59 FROGGS if they are done, add tests to roast (a test repository), and close the ticket
08:59 FROGGS no, rt
08:59 FROGGS perl6 queue
09:00 FROGGS after a few tickets I tried to fix one bug on my own, since it affected one of my modules
09:00 FROGGS this took quiet a while, like 50 hours within two months, but I get it done
09:01 FROGGS I enjoyed it so I took the next ticket :o)
09:01 sorear muahahahaha
09:01 FROGGS at work I do php webstuff to 80%, the rest perl jobs, so I can learn pretty much here
09:02 drKreso Ok, so check if bug is fixed, add test and then after a few - try fixing something?
09:02 FROGGS well, that was the right thing for me, yes
09:02 drKreso Sure, it was nice talking to you guys.
09:03 FROGGS drKreso: you're welcome!
09:03 sorear I started out here with the incredibly stupid idea to make an irc client using macros
09:03 FROGGS *g*
09:03 drKreso sorear: hehe
09:04 sorear that morphed into "implement macros"* and then into "start a whole new implementation"
09:04 FROGGS and then you did a much much cooler thing
09:04 FROGGS right
09:04 sorear * my version of macros frankly sucked and was never merged.  The macros you see in rakudo today are the work of masak++
09:04 drKreso Oh, btw. is Larry joking when he calls python a snakeoil or he means it? I am pissing off my python colegue :) with it.
09:05 sorear do not credit me for macros just because I worked on them
09:05 drKreso how close are they to "THE" macros (lisp)
09:06 sorear We've got most of your favorite features, hygiene and syntactic awareness
09:06 sorear Of course you can't directly compare it to lisp without homoiconicitty
09:06 drKreso Well I think macros are overrated :) anyways
09:09 jnthn morning, #perl6 o/
09:10 FROGGS morning jnthn
09:11 sorear morning jnthn
09:12 jnthn o/ FROGGS, sorear  :)
09:13 FROGGS jnthn: how long are you working in taht company yet? I'm going to have my 10th next year
09:14 jnthn FROGGS: About 3 years
09:14 jnthn I think my first day was one of the first days of March 3 years ago
09:14 jnthn The company formally started existing a several days before then :)
09:15 jnthn So I get the badge of first employee beyond the co-founders. :)
09:15 FROGGS you said something about an anniversary, no? 3 years doenst sound much in that context :o)
09:16 jnthn Hey, @boss decided it's an excuse for cake, I ain't complaining ;-)
09:16 ObseLeTe joined #perl6
09:16 FROGGS well, we dont need excuses, we regularly have cake (and job offers *g*)
09:17 * FROGGS whispers "cake, cake, cake ..."
09:17 jnthn :)
09:17 FROGGS *g*
09:18 FROGGS well, we dont have masak though :/
09:19 FROGGS and I dont know if I really can recommend this company
09:19 TimToady http://rosettacode.org/wiki/​Ray-casting_algorithm#Perl_6
09:19 TimToady drKreso: what makes you think Larry can't joke about something and mean it at the same time? :)
09:20 fhelmberger joined #perl6
09:21 drKreso TimToady: Yes I got that vibe. Btw. I think you are a genious :)
09:21 TimToady we all have our faults
09:24 donaldh joined #perl6
09:26 drKreso TimToady: Yeah whatever :) You still made my day...
09:27 robinsmidsrod joined #perl6
09:28 donaldh joined #perl6
09:29 jnthn FROGGS: Looking at your gits again, I think the problem seems to be that it's trying to infer +/- of the cclass element by looking at the tree up in the assertion:sym<[> action method. However, cclass_elem isn't very consistent about producing trees in the right shape...
09:30 jnthn *gist
09:30 FROGGS oaky
09:36 FROGGS it looks a bit redundant to me what the |@alts in cclass_elem and the stuff in the while loop in assertion:sym<[> are doing, but since I dont understand right whats going on it is more like a gut feeling
09:38 jnthn I'm not convincd your gut feeling ain't right :)
09:41 jnthn commute &
09:43 daxim this channel's about horsemeat, right?  http://boingboing.net/wp-content​/uploads/2013/02/horseating.jpg
09:47 nwc10 :-)
09:47 diakopter you're a delicacy
09:48 * TimToady delicately goes to bed &
09:54 dakkar joined #perl6
10:08 Tedd1 joined #perl6
10:36 bapa joined #perl6
10:40 nwc10 moritz: what defines the IRC logger's glossary? Because it thinks that RC is "Release Candidate", when TimToady was using it to mean "Rosetta Code" (and I suspect that the latter is now just as common here as a meaning of RC as the former)
10:40 nwc10 Sebastian Riedel
10:40 nwc10 ah. no, not that thing I was meaning to pate...
10:40 nwc10 http://irclog.perlgeek.de/​perl6/2013-02-25#i_6495672
10:40 nwc10 that
10:44 moritz nwc10: there's a glossary file in the ilbot repo
10:44 nwc10 aha
10:45 * moritz updates it
10:46 moritz done
10:46 nwc10 works on my machine. :-)
10:46 moritz note that pages for dates in the past have a long cache TTL
10:46 nwc10 sane
10:47 krunen joined #perl6
10:49 spider-mario joined #perl6
10:58 fhelmberger joined #perl6
11:02 FROGGS moritz: where can I find the code that is responsible for --target=past?
11:04 FROGGS ohh, maybe dumper in HLL::Compiler
11:25 moritz FROGGS: in HLL::Compiler, it calls .dump on the current object
11:25 moritz FROGGS: so there's a method dump in QAST::Node
11:27 FROGGS right, I was thinking about extending it to get more information about regexes, but now I'm not sure I need more info
11:55 proller joined #perl6
12:00 leprevost joined #perl6
12:09 raiph hi #perl6
12:09 tadzik hi raiph
12:10 raiph hey tadzik
12:10 moritz \o
12:17 raiph continuing my attempt to install the rakudo debugger on ubuntu. to recap, i got some errors from 'make rakudo-test': https://gist.github.com/raiph/5032649. i went ahead and did 'make install'. perl-debug says "bash: ./perl6-debug: No such file or directory" then i did 'make modules-test': https://gist.github.com/raiph/5038001 <--- would someone please help me debug getting the debugger running?
12:18 moritz raiph: stupid question, have you tried ./install/bin/perl6-debug ?
12:19 SmokeMachine joined #perl6
12:20 raiph moritz: \o/ that works! (you are dealing with me. no question is ever too stupid. :) )
12:21 raiph moritz++ # for patience
12:21 moritz raiph: the "proper" way to use Rakudo star is to put the install/bin dir in $PATH, and then call the binaries without qualified paths (e.g. just perl6-debug)
12:21 moritz the copy of the perl6 binary is just for convenience
12:21 colomon huh.  I thought I installed perl6-debug with panda the other day, but I have a install/lib/parrot/4.10.0-devel/lang​uages/perl6/site/bin/perl6-debug.nqp and no perl6-debug
12:22 raiph moritz: thanks
12:22 moritz raiph: and I've opened https://github.com/tadzik/Bailador/issues/5 for one of the test failures you found
12:22 moritz raiph: you're welcome
12:33 raiph has anyone else caught brian wisti's "Perl 6 adventures with Allen B. Downey's Think Python book"? http://blogs.perl.org/users/brian_wisti/perl-6/
12:38 * moritz hasn't so far, thanks for the hint
12:49 colomon raiph++
13:00 colomon rn: say foo(:$bar) { say $bar; }; foo(bar => "Hello!")
13:00 p6eval niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $bar is not predeclared at /tmp/w96seXHbkm line 1:�------> [32msay foo(:[33m�[31m$bar) { say $bar; }; foo(bar => "Hello!"[0m��Unexpected block in infix position (two terms in a row, or previous statement missing…
13:00 p6eval ..rakudo 0f9703: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$bar' is not declared�at /tmp/i9vXUubuae:1�------> [32msay foo(:$bar[33m�[31m) { say $bar; }; foo(bar => "Hello!")[0m�»
13:02 colomon rn: say foo(:$bar) { say $bar; };
13:02 timotimo rn: say sub foo(:$bar) { say $bar; }; foo(bar => "Hello!")
13:02 p6eval rakudo 0f9703: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$bar' is not declared�at /tmp/WpPJlbdT1E:1�------> [32msay foo(:$bar[33m�[31m) { say $bar; };[0m�»
13:02 p6eval ..niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $bar is not predeclared at /tmp/eRxADTh2ue line 1:�------> [32msay foo(:[33m�[31m$bar) { say $bar; };[0m��Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp…
13:02 colomon doh!
13:02 p6eval niecza v24-24-gbdc3343: OUTPUT«sub foo(Any :$bar) { ... }␤Hello!␤»
13:02 p6eval ..rakudo 0f9703: OUTPUT«sub foo(:bar(:$bar)) { ... }␤Hello!␤»
13:02 colomon rn: sub foo(:$bar) { say $bar; }; foo(bar => "Hello!")
13:02 p6eval rakudo 0f9703, niecza v24-24-gbdc3343: OUTPUT«Hello!␤»
13:25 [Coke] \o/ my google perl6 news alert hit something other than this chat again. :) briantwisti++
13:35 kaleem_ joined #perl6
13:49 timotimo "If Perl 5 is anything to go by, not using parens will occasionally have surprising results." - is this incorrect, though?
13:52 moritz timotimo: there can alyways be someone who is surprised by the precedence levels
13:52 * colomon has certainly been surprised more than once.  there are a lot of precedence levels in p6
13:52 moritz though I personally find perl 5 *with* parens even more surprising
13:52 moritz print (2 + 3) * 4; # 5
13:53 huf yes, but that's fairly simple and obvious :D
13:54 moritz only obvious if you know the rules. And only obvious when talking about precedence gone wrong
13:54 moritz if you actually debug code, it's something that's very easy to overlook
13:54 rhr joined #perl6
13:55 huf "only obvious if you know the rules." <- this is always true :)
13:55 huf well, unless it's even worse. but you always have to know the rules.
13:56 ponbiki joined #perl6
13:56 moritz sure
13:57 moritz but some of those rules are more universal than others
13:57 moritz for example * having a tighter precedence than + is much more common
14:04 timotimo raiph: your praise in the comments sections of the think perl6 posts is making me blush :3
14:05 timotimo hmm. with zavolaj, XCB bindings could possibly be made and with those, a turtle graphics module ... perhaps one day :)
14:06 timotimo hm, actually ... gtk is a C based libbary. maybe a minimal gtk binding could be made?
14:06 timotimo that would also be portable
14:06 [Coke] colomon: gentle reminder that niecza is still failing spectests. not sure if that's on your radar.
14:07 colomon [Coke]: last time I look got tangled up in a question of whether or not the spectests were correct.  but then it slipped off my radar...
14:07 [Coke] also, anyone looking for some relatively easy karma, keeping pugs fudged against roast is still somewhat helpful.
14:08 timotimo bbl
14:08 kaare_ joined #perl6
14:08 daxim explain how to do this
14:09 [Coke] aw, RC is down.
14:09 [Coke] daxim: that to me?
14:10 timotimo is creating a library that links against Qt and exposing a simple turtle interface from it to bind with perl6 considered "cheating"?
14:10 daxim yes.  but not here, write it down as documentation for fudgeall or where you see fit
14:11 moritz cheating is technique!
14:11 timotimo :D
14:11 timotimo anyway. bbl for realsies.
14:12 wk joined #perl6
14:13 PacoAir joined #perl6
14:15 robinsmidsrod joined #perl6
14:17 dalek perl6-roast-data: 5d182a4 | coke++ | README:
14:17 dalek perl6-roast-data: Add notes on how to fudge pugs for daxim++
14:17 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/5d182a44bc
14:18 bluescreen10 joined #perl6
14:18 [Coke] daxim: there you go. Feel free to ping me with any questions.
14:18 daxim ok, good
14:21 Psyche^ joined #perl6
14:24 [Coke] (or if there's not enough detail)
14:37 nebuchadnezzar joined #perl6
14:47 pmichaud good morning, #perl6
14:47 nwc10 good am pm
14:47 nwc10 what fun do you have planned for us today?
14:48 moritz nwc10: hey, that's my line :-)
14:48 moritz \o pmichaud
14:48 nwc10 sorry.
14:48 nwc10 I hadn't realised that it was just your line
14:48 moritz 's ok, don't take me seriously
14:48 pmichaud r: my $line = "good " ~ ('a'|'p') ~ "m pm";  say $line;
14:48 p6eval rakudo 0f9703: OUTPUT«any(good am pm, good pm pm)␤»
14:49 pmichaud alas, I have little #perl6 fun planned today... I'll be on phone all day
14:50 nwc10 that doesn't sound like it's going to be fun...
14:50 pmichaud mostly taxes and financial stuff.  nothing onerous, just time consuming.
14:51 robinsmidsrod joined #perl6
14:54 SunilJoshi joined #perl6
14:56 shlomif joined #perl6
14:57 skids joined #perl6
14:58 arnsholt sha
14:58 arnsholt Whoops. ENOFOCUSFOLLOWSGAZE
14:59 SunilJoshi joined #perl6
15:12 cogno joined #perl6
15:31 * colomon wishes he could get certain ($work, not p6) people to stop using #defines on words like CURVE and SURFACE.
15:33 timotimo raiph: sadly, the thing where the repl asks for additional lines seems quite a bit over my head ...
15:38 hash_table joined #perl6
15:44 SunilJoshi joined #perl6
15:56 thou joined #perl6
15:59 Liz_ joined #perl6
16:11 jdv79 joined #perl6
16:12 jdv79 how is now from the temporal core stuff "exported"?
16:13 * TimToady doesn't quite understand that
16:14 PerlJam .oO( how now brown cow? )
16:15 jdv79 sorry.  ./perl6 -e 'say now' <- how is "now" global?
16:15 nwc10 neigh?
16:15 awwaiid joined #perl6
16:16 TimToady it's just defined in the setting, as far as I know
16:16 TimToady r: say CORE::now
16:16 p6eval rakudo 0f9703: OUTPUT«(Any)␤»
16:16 arnsholt jdv79: It's defined in the setting, which is (roughly) a lexical scope enclosing your program
16:16 TimToady r: say now
16:16 p6eval rakudo 0f9703: OUTPUT«Instant:1361895425.365465␤»
16:16 TimToady n: say CORE::now
16:16 p6eval niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤        'CORE::now' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /h…
16:17 jdv79 so its not related to the one defined in the DateTime class (rakudo/src/core/Temporal.pm)?
16:17 TimToady no, DateTime is civil time
16:17 jdv79 ok
16:17 TimToady Instants are atomic time
16:17 TimToady (in theory)
16:18 FROGGS joined #perl6
16:18 TimToady there some bugs that can be tested only in the leapsecond of civil time, if the underlying machine is confused between civil time and atomic time
16:18 grondilu RC is down :(
16:19 timotimo down for me, too :(
16:19 TimToady just the web bits, though
16:19 TimToady site pings/sshes fine
16:19 kresike bye folks
16:21 * TimToady is very much in favor of doing away with leapseconds for civil time in favor of some larger correction less frequently, with more leadtime, like on century boundaries
16:22 * awwaiid agrees with TimToady, especially because the time adjustment parties would thus also be bigger
16:22 TimToady but who cares if civil time drifts off of astronomical midnight by a minute or two anyway, unless you're aiming a telescope somewhere?
16:23 awwaiid I know, right? and we live a lie more than half the year anyway with DST
16:23 Ulti which atomic time does perl6 use?
16:23 Ulti proper atomic time or UTC?
16:23 TimToady I mean, come on, each of our timezones has a ±7.5° slop in them already
16:23 TimToady TAI
16:23 Ulti yay
16:24 Ulti people should start correcting for the gravitational affects of different locations in the geoid
16:24 TimToady that's equivalent to ±half an hour off of local astronomical time
16:26 TimToady I know, let's have local leap attoseconds depending on how much your location is drifting from TAI :)
16:26 Ulti and my watch should correct for my mass accelerating too.. maybe predict the different times for my head and wrist
16:26 Ulti so that I know when I look at the femtoseconds on my watch its correct for when my mind sees it
16:27 zby_home joined #perl6
16:27 TimToady so we think faster standing than laying down, eh?  :)
16:28 TimToady and that's why people respect taller people, because they appear to think faster :)
16:28 Ulti I love that astronauts have measurably lived outside of our time, thats some good science
16:29 am0c joined #perl6
16:29 Ulti that and they can see slightly beyond your horizon so they see predators coming sooner
16:30 TimToady but can a predator actually get as high as an astronaut?
16:31 Ulti I only really got into how wacky time is as a concept when I had to process satellite data.. they should really teach it in schools more
16:31 Ulti TimToady I'm sure NASA will send a lion into space soon, they've done everything else
16:31 TimToady and you wonder why your GPS has to think so hard when you boot it up...
16:32 Ulti or even longer if you use GPS that doesn't rely on the time being broadcast but the phase changes of the carrier waves :)
16:33 TimToady well, we've had a dog in space already, and dogs are arguably predators; apes, of course, are pacifists, which is why the plaque on the moon reads "We came in peace for all Apekind."
16:33 Ulti lol!
16:33 Ulti all apekind except the russians
16:33 TimToady now be nice, some of my best friends are russians
16:34 Ulti really we need an Earth flag to avoid these problems
16:34 TimToady yes, but what does it mean when you burn it?
16:34 TimToady that you want to emigrate to Mars?
16:34 Ulti http://en.wikipedia.org/wiki/File:Earth_Flag.svg  <-- I think not
16:36 TimToady no, there should be, how many stripes is it today?  and who are you asking for the definition of "country"?
16:40 huf that's easy
16:41 huf tell them they arent. if they get angry and attack you, they were a country.
16:41 TimToady .oO("It's easy to come up with the wrong answer.")
16:42 huf it'd be a lot simpler if there were only one wrong answer :)
16:43 TimToady troo
16:49 GlitchMr There are no wrong answer. Just better and worse.
16:50 TimToady .oO("The robber shouts 'Worse answer!', pulls out a gun, and shoots you.  You are now deader.")
16:51 huf naturally. it was a robber. if you want plain dead, talk to rob.
16:51 TimToady huf++
16:52 SamuraiJack_ joined #perl6
17:03 Liz_ joined #perl6
17:08 TimToady Just figured out why I like bright colors: either I'm in a manic state, and they match my mood, or I'm in a depressive state, and they cheer me up.  :)
17:11 Ulti huf that's a good definition of a country.. but you'd have a lot of multi-countries with that definition
17:11 huf multi-countries?
17:11 Ulti yeah like multi dispatch... like I'm British<-English
17:12 huf oh that. yes.
17:14 djanatyn joined #perl6
17:17 bluescreen10 joined #perl6
17:32 jac50 joined #perl6
17:34 uvtc joined #perl6
17:37 uvtc Do you think [this analogy](http://www.perlmonks.org/?node_id=1020064) ("Perl is my cast iron pan") applies (or will apply, or should apply) to Perl 6?
17:38 jnthn evening o/
17:39 uvtc \o
17:39 uvtc Full disclojure: I love my real cast iron pan. :)
17:40 uvtc {gah!} s/disclojure/disclosure/.
17:40 huf :)
17:40 PerlJam uvtc: Perl is Perl is Perl is Perl.
17:40 PerlJam :-)
17:40 uvtc (Clojure puns: once I think I'm out, they keep pulling me back *in*!)
17:41 TimToady Perl on Java should be called either Perj or Perk :)
17:41 uvtc TimToady: Perl5?
17:41 uvtc TimToady: or *any* Perl?
17:42 huf why not jerl?
17:42 TimToady I suppose Perj would be Perl 4 on Java
17:42 * jnthn thinks Rakudo on the JVM is called Rakudo :P
17:42 huf rajudo
17:42 TimToady rakujo
17:42 Ulti TimToady: more like Pava http://en.wikipedia.org/wiki/Pava
17:42 jnthn agh! :P
17:43 jnthn .oO( jajujo )
17:43 Ulti "Mahavira had just died at Pava and his followers were divided by bitter wrangles" sounds about right
17:43 [Coke] Tcl:Jacl::Perl:Jarl
17:43 huf you mean http://hu.wikipedia.org/wiki/P%C3%A1va?
17:43 [Coke] alternatively, Ja Rule
17:43 uvtc Personally, I like the cast iron pan analogy. I wonder if folks consider Perl 6 in the same way.
17:44 Ulti huf: thats awesome, then we can have a camelia esk brightly coloured Pava bird :)
17:44 Ulti like each feather spot looks like camelia
17:44 TimToady Sure, Perl 5 is a cast iron pan.  But Perl 6 is the whole kitchen.
17:45 Ulti and the plumbing to the outside toilet
17:45 Ulti aka Java
17:45 uvtc TimToady: Good pun with "Perk" (incremented last letter, and also sounds like something to do with coffee = Java) :)
17:46 uvtc ooof. decremented. Hm.
17:46 Ulti I'm writing some examples of how to use a JSON webservice I made... two lines in Perl, over 100 in Java
17:46 huf please provide examples with curl(1) or something :D
17:46 huf that's what they always forget, and what is usually the most helpful
17:47 Ulti lol ok
17:47 Ulti I was planning on a perl5 and perl6 example since I want to promote perl6 for bioinformatics use
17:47 Ulti define a grammar for the JSON object :)
17:49 uvtc Heheh. "Rakujo". Was assuming "Jakudo".
17:50 Ulti Rakujo sounds like an 80s detective
17:50 spider-mario uvtc : that’s too easy, I guess
17:50 huf a bald one, by any chance?
17:50 Ulti heh yeah
17:50 spider-mario it’s no better than Jython or JRuby
17:50 uvtc Util: Cujo was a horror movie from a while back about an attack dog.
17:51 Util uvtc: I think you meant Ulti  :)
17:51 uvtc We've got an Util and an Util? :)
17:51 uvtc ahhh. Ulti
17:52 Ulti I should really stop sitting here looking like Util
17:52 huf "ulti" is not a card game in english, right?
17:52 Ulti dont think it has any real meaning in English
17:53 SmokeMachine joined #perl6
17:53 Ulti my real name is matt Ulti-matt ~ Ultimate, also its the best magic in a lot of RPGs I played back in the days when everyone picks their nicks
17:53 Ulti you know that time where you later regret everything you did online
17:54 huf yes. look at my nick. yes :D
17:54 Ulti but now people have facebook to keep accurate records
17:54 huf fb still hasnt suspended my obviously-fake-named account...
17:54 spider-mario I chose my nickname when I was ~11
17:54 huf wonder why
17:54 spider-mario I guess that’s not hard to believe. :p
17:54 Ulti haha
17:55 spider-mario (I’m 19 now)
17:55 uvtc TimToady: as long as the kitchen contains real stainless steel and ceramic appliances. I don't like plastic.
17:55 * Ulti feels old suddenly
17:55 uvtc Ulti: don't worry --- I was the one pulling out the old Cujo reference. :)
17:55 Ulti yeah
17:55 huf later years just extend 19
17:56 huf even if you're 82, you're still isa 19
17:56 arnsholt jnthn: Did you get a chance to read my nqp::buffer proposal?
17:56 [Coke] cujo++
17:56 Ulti I'm still isa 5 at heart
17:56 [Coke] people here Carrie on so with their puns.
17:56 Ulti heh
17:57 jnthn arnsholt: I've been pondering it a bit. I think buffers really just want to be arrays.
17:58 jnthn arnsholt: Something with VMArray REPR, with the type indicating the size, perhaps.
17:58 arnsholt Yeah, on JVM they'd correspond to byte[], short[], int[] and long[]
17:58 arnsholt And float[] and double[], I guess
17:59 arnsholt Merging it with VMArray makes a lot sense
17:59 * arnsholt ponders
17:59 domidumont joined #perl6
17:59 TimToady Buf[bit] might be (more than a bit) more work
18:00 jaldhar joined #perl6
18:00 arnsholt I've intentionally ignored that, for the time being =)
18:00 arnsholt jnthn: VMArray instances are created via nqp::list, right?
18:01 Ulti dont forget bytes are really 32bit signed integers in Java land...
18:01 jnthn arnsholt: On the JVM impl that makes a VMArray of objects.
18:02 * TimToady keeps vaguely wanting bit arrays for this and that
18:02 arnsholt Ulti: No, that's the char type, I'm pretty sure
18:02 jnthn arnsholt: The idea is that VMArray is a REPR that is composed appropriately.
18:02 arnsholt Ah, right
18:02 Ulti char is byte which is a 32bit integer iirc
18:03 TimToady RC's back up, btw
18:03 Ulti there is no such thing as unsigned in Java either
18:04 Ulti so if you want an insigned int you have to use half a long
18:04 arnsholt Parrot has the same lack of unsigned
18:04 Ulti yeah but Java it was a language decision based on the quotable phrase "developers dont understand unsigned arithmetic"
18:05 TimToady therefore the VM designers should also not bother to understand it :)
18:05 Ulti not that the VM implementation was somehow simpler, better, elegant
18:05 arnsholt The Java spec says byte is 8-bit signed two's-complement
18:05 Ulti orly
18:06 arnsholt And char is "16-bit unsigned integers representing UTF-16 code units", which makes me sad
18:06 jnthn arnsholt: I think that I'd like us to have ops that take a native string and some buffer (type object perhaps) and fill that buffer with the the Right Thing (e.g. utf8-encoding of the string)
18:07 skids .oO(how could unsigned (modular) arithmetic be considered harder than signed 2s compliment?)
18:07 huf i think the hard part is mixing them
18:07 huf that's what trips up c coders, iirc
18:08 arnsholt jnthn: Yeah, probably a good idea. Native string being STRING*/whatever JVM passes around, right?
18:08 jnthn Correct.
18:08 huf so java decided to throw out one of them, and they deemed negative integers more important than sane bitmagic
18:08 jnthn On the JVM that is currently String. In the future it'll be some NFG thing.
18:08 TimToady in the Cccp, abstractions leak you
18:09 jnthn *groan*
18:09 jnthn .u C
18:09 phenny U+0043 LATIN CAPITAL LETTER C (C)
18:09 jnthn Cheating :P
18:09 TimToady no, I didn't bother :)
18:09 tadzik :D
18:09 arnsholt jnthn: So the
18:10 jnthn arnsholt: yes, the.
18:10 TimToady cheating is technique--I learned that in the backlog
18:10 arnsholt Bah. Still not sued to new laptop keyboard >.<
18:10 arnsholt So, the main question is how we want to represent arrays of ints/floats of various sizes and make them play nice with arrays of objects
18:11 jnthn Well, the question of how you convey that to VMArray is spec'd as part of repr_compose...and I guess what CArray does.
18:11 skids r: class A { has int8 $.a; method BUILD { $!a = 127; }; method foo { $!a.say; $!a = 128; $!a.say } }; my A $a .= new(); $a.foo; # is this behavior of assignment-to-sized considered specced?
18:11 p6eval rakudo 0f9703: OUTPUT«127␤-128␤»
18:11 skids Or is there the chance that eventually that will be an out-of-range error.
18:12 arnsholt Oh, right, that's true. In that case I guess it's more a case of implementing the VMArray REPR and friends
18:13 jnthn Yeah. Well, on JVM there is no equivalent to the Parrot RPA.
18:13 TimToady skids: there are use cases for both behaviors
18:13 jnthn Everything that's an object is a 6model object of some kind.
18:14 jnthn So what RPA does on Parrot is handled on JVM by something of VMArray REPR.
18:14 jnthn I think that's the way things should go in general.
18:14 TimToady but it seems to me that overflow checking is a more useful default unless you're doing cryptography or otherwise looking for blazing speed
18:14 arnsholt Yeah, that's definitely a good idea
18:14 skids TimToady: yes, and one could get the usefulness of the current behavior with an explicit coercion e.g. int8(128)
18:15 TimToady I've always thought of native types as something like subset types
18:15 TimToady in fact, various subset types could be optimized to native types
18:15 TimToady Ada does this all over the place
18:16 _jaldhar joined #perl6
18:19 uvtc Why are there so many Synopses under the number 32?
18:19 skids But it would be best to explicitly spec the behavior of int8(Int|uint8|int16|...)
18:20 uvtc Also, how do you refer to them here, for ex, maybe S32:Str ?
18:21 uvtc S32::Str
18:21 skids In theory its because those are all part of the "Setting Library"
18:22 TimToady S32/Str  # another guess
18:22 uvtc What does "Setting Library" mean?
18:22 TimToady nope, I guess one just uses long links
18:23 TimToady the setting is the notional outer lexical scope of your compilation unit
18:23 TimToady r: say OUTER::.keys
18:23 p6eval rakudo 0f9703: OUTPUT«␤»
18:23 TimToady r: say OUTER::OUTER::.keys
18:23 p6eval rakudo 0f9703: OUTPUT«!UNIT_MARKER GLOBALish EXPORT $?PACKAGE ::?PACKAGE $_ $/ $! &restricted &open &unlink &shell &run &QX &mkdir &rmdir &rename &copy IO $=pod␤»
18:23 TimToady r: say OUTER::OUTER::OUTER::.keys
18:23 p6eval rakudo 0f9703: OUTPUT«␤»
18:23 TimToady r: say OUTER::OUTER::OUTER::OUTER::.keys
18:23 p6eval rakudo 0f9703: OUTPUT«&default-formatter DateTime-local-timezone EXPORTHOW Pod Set &set &infix:<(elem)> &infix:<(cont)> &infix:<(|)> &infix:<(&)> &infix:<(-)> &infix:<(^)> &infix:<(<=)> &infix:<(<)> &infix:<(>=)> &infix:<(>)> Baggy &bag &infix:<(.)> &infix:<(+)> Version Cursor &infix:<=…
18:24 TimToady say CORE::.keys
18:24 TimToady simon says...
18:24 TimToady r: say CORE::.keys
18:24 p6eval rakudo 0f9703: OUTPUT«&default-formatter DateTime-local-timezone EXPORTHOW Pod Set &set &infix:<(elem)> &infix:<(cont)> &infix:<(|)> &infix:<(&)> &infix:<(-)> &infix:<(^)> &infix:<(<=)> &infix:<(<)> &infix:<(>=)> &infix:<(>)> Baggy &bag &infix:<(.)> &infix:<(+)> Version Cursor &infix:<=…
18:24 uvtc "Settings library" == "Core library"?
18:24 uvtc s/Settings/Setting/
18:25 TimToady we don't like the term "core" for something that is "outside" of your program
18:25 TimToady "CORE" notwithstanding
18:25 TimToady it's the setting for your jewel of a compilation unit :)
18:25 uvtc Ah. As in jewelry. :)
18:25 uvtc Heh.
18:25 TimToady or the setting for the play
18:25 TimToady which might be either a tragedy or a comedy
18:28 uvtc Just tried "hello".length(). Given that it's incorrect, I'd expect the error message to say, "Maybe you meant `chars`?"
18:28 uvtc Or maybe half-expect?
18:29 uvtc Though, dunno how much P6 wants to dedicate itself to correcting P5isms.
18:30 TimToady std: length "hello";
18:30 p6eval std 52fe6d2: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'length' used at line 1�Check failed�FAILED 00:00 41m�»
18:30 uvtc n: length "hello"
18:30 TimToady I guess not
18:30 p6eval niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'length' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /h…
18:30 TimToady uvtc: it does a lot of them already, and some it can't really do because of overlap
18:31 TimToady we just need to install a short levenshtein distance between 'length' and 'chars' :)
18:31 TimToady won't help the method though
18:31 leprevost joined #perl6
18:31 PerlJam won't help if the user declared a length sub either :)
18:32 [Coke] r: say 3.Inx()
18:32 p6eval rakudo 0f9703: OUTPUT«No such method 'Inx' for invocant of type 'Int'␤  in block  at /tmp/NBKC303BQE:1␤␤»
18:32 TimToady one could fall through to something levenshteinian on failure, I suppose
18:32 uvtc 2nd try was "hello".size
18:32 skids (S02) "Lowercase types like int and num...do not promote to arbitrary precision, though larger representations are always allowed for temporary values." # curious as to the exact meaning of that.
18:33 TimToady "No class in this application declares a method named 'Inx'"
18:33 TimToady uvtc: Perl 6 is allergic to measuring lengths of things without specifying the units
18:34 uvtc ackn
18:34 TimToady hence .elems and .chars
18:35 uvtc TimToady: Ah. Well,  now .elems makes more sense. Goes with .chars. ;)
18:35 uvtc :)
18:36 TimToady or .bytes, when that makes sense
18:36 uvtc .barks is worse than .bytes
18:36 TimToady but .barques is better
18:36 [Coke] phenny: ask curtispoe why use "my $tree = Any;" instead of "my $tree" ? (RB blog post)
18:36 phenny [Coke]: I'll pass that on when curtispoe is around.
18:37 xalbo Create a method way up in the object hierarchy called "length" that always fails with an error message of "too long".
18:37 TimToady xalbo++
18:39 dalek nqp: aa73e78 | jnthn++ | src/HLL/Compiler.pm:
18:39 dalek nqp: Abstract out transcode handling.
18:39 dalek nqp:
18:39 dalek nqp: What's going on here assumes encoded strings, and probably wants a
18:39 dalek nqp: revisit at some point. This can be a no-op on JVM, I guess...
18:39 dalek nqp: review: https://github.com/perl6/nqp/commit/aa73e7848f
18:39 dalek nqp: 5df9fe9 | jnthn++ | src/HLL/Compiler.pm:
18:39 dalek nqp: We'll now call the past target simply "ast".
18:39 dalek nqp:
18:39 dalek nqp: This means you now do --target=ast. Referring to PAST, which is in the
18:39 dalek nqp: past, is kinda confusing in the age of QAST.
18:39 dalek nqp: review: https://github.com/perl6/nqp/commit/5df9fe952a
18:40 TimToady r: use MONKEY_TYPING; augment Mu { method length() { die (Bool.pick ?? "Too long" !! "Not long enough") } }; 'hello'.length
18:40 p6eval rakudo 0f9703: OUTPUT«[31m===[0mSORRY![31m===[0m�Type 'Mu' is not declared�at /tmp/4djV1Xad4t:1�------> [32muse MONKEY_TYPING; augment Mu [33m�[31m{ method length() { die (Bool.pick ?? "T[0m�Malformed augment�at /tmp/4djV1Xad4t:1�------> [32muse MONKEY_TYPING; augment Mu [33m�…
18:40 jnthn augment class ?
18:40 TimToady yes, but LTA error
18:41 TimToady r: use MONKEY_TYPING; augment class Mu { method length() { die (Bool.pick ?? "Too long" !! "Not long enough") } }; 'hello'.length
18:41 p6eval rakudo 0f9703: OUTPUT«No such method 'length' for invocant of type 'Str'␤  in block  at /tmp/MJkwSpPxqn:1␤␤»
18:41 jnthn std:  use MONKEY_TYPING; augment Mu {  }
18:41 p6eval std 52fe6d2: OUTPUT«Compiled lib/MONKEY_TYPING.pm6â�¤[31m===​[0mSORRY![31m===[0mâ�¤Multiple prefix constraints not yet supported at /tmp/SlwExflHxF line 1:â�¤------> [32muse MONKEY_TYPING; augment Mu [33mâ��[31m{  }[0mâ�¤Malformed augment at /tmp/SlwExflHxF line 1:â�¤------> [32muse MONKEY_…
18:41 TimToady so why dint that one work?
18:42 TimToady r: use MONKEY_TYPING; augment class Str { method length() { die (Bool.pick ?? "Too long" !! "Not long enough") } }; 'hello'.length
18:42 p6eval rakudo 0f9703: OUTPUT«Too long␤  in method length at /tmp/aRtXpcoLtt:1␤  in block  at /tmp/aRtXpcoLtt:1␤␤»
18:42 TimToady r: use MONKEY_TYPING; augment class Any { method length() { die (Bool.pick ?? "Too long" !! "Not long enough") } }; 'hello'.length
18:42 p6eval rakudo 0f9703: OUTPUT«No such method 'length' for invocant of type 'Str'␤  in block  at /tmp/Kpe6p2qY87:1␤␤»
18:42 moritz TimToady: known bug
18:42 TimToady r: use MONKEY_TYPING; augment class Cool { method length() { die (Bool.pick ?? "Too long" !! "Not long enough") } }; 'hello'.length
18:42 p6eval rakudo 0f9703: OUTPUT«No such method 'length' for invocant of type 'Str'␤  in block  at /tmp/I89Oi2z18o:1␤␤»
18:43 TimToady mkay
18:43 moritz basically adding methods to a class after compose time doesn't propagate them down the inheritance chain
18:43 jnthn TimToady: 'cus it ain't smart enough to invalidate the method caches of its subclasses yet.
18:43 timotimo r
18:43 jnthn TimToady: Which in turn is because doing so by it knowing about all of its subclasses would mean we can never GC anonymous subclasses.
18:44 jnthn Which given it's the way we create mixins would probably be a worse bustage than the current one...
18:44 TimToady well, p5 just keeps a generation count on its cache, and just increments it to invalidate all the caches
18:45 TimToady doesn't work too badly unless you are continually changing your classes
18:45 jnthn Yeah, but method cache publication is under the control of the meta-object in p6.
18:46 TimToady then the meta objects would just have to agree amongst themselves, seems
18:46 jnthn So it wants a more explicit change-notification approach.
18:48 TimToady the generation check would be where you actually use the cache, at which point you could ask to have it reissued
18:48 jnthn Which, of course, needs its details figuring out, and implementing...
18:48 jnthn Yeah, designs where the interpreter has to go and ask for stuff get icky and are the path to nested runloops and the like. They're a last implementation resort, not a property of a good design, imho.
18:48 TimToady just smells like a perfect-is-enemy-of-good things
18:49 jnthn I've enough first-hand experience with nested runloops to know they're not good. :)
18:49 TimToady but agree about baking if/else's into your runtime being badness too
18:49 [Coke] r: say Array.^parents>>.^parents;
18:49 census joined #perl6
18:50 p6eval rakudo 0f9703: OUTPUT«(timeout)»
18:50 skids .oO("all lengths expressed in kellicams")
18:50 jnthn Anyway, it's on my todo list. Like too much else...
18:50 [Coke] skids: yIDoghQo'
18:53 uvtc r: say "hello".tc
18:53 p6eval rakudo 0f9703: OUTPUT«No such method 'tc' for invocant of type 'Str'␤  in block  at /tmp/phqjc0gjR1:1␤␤»
18:53 uvtc Oh, I thought I'd read that had been added.
18:53 [Coke] r: "expr 3*8
18:53 p6eval rakudo 0f9703: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse expression in double quotes; couldn't find final '"'â�¤at /tmp/WIL_vNlrF_:1â�¤------> [32m"expr 3*8[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤   …
18:53 [Coke] r: "expr 3*8".tclc.say
18:53 p6eval rakudo 0f9703: OUTPUT«Expr 3*8␤»
18:54 [Coke] awwww, that's not a tcl compiler.
18:54 uvtc r: say "hi there".tclc  # No "Hi There"?
18:54 p6eval rakudo 0f9703: OUTPUT«Hi there␤»
18:56 uvtc Oh well, I see .tc documented in S32>>Str. Maybe will see it soon.
18:56 colomon rn: say "hello".tc
18:56 p6eval niecza v24-24-gbdc3343: OUTPUT«Hello␤»
18:56 p6eval ..rakudo 0f9703: OUTPUT«No such method 'tc' for invocant of type 'Str'␤  in block  at /tmp/O1cnhTrHUm:1␤␤»
18:56 dalek perl6-roast-data: f6f59b8 | coke++ | / (3 files):
18:56 dalek perl6-roast-data: today (automated commit)
18:56 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/f6f59b890f
18:56 uvtc Newman!
18:56 colomon rn: say "hello world".tclc
18:56 p6eval rakudo 0f9703, niecza v24-24-gbdc3343: OUTPUT«Hello world␤»
18:57 colomon rn: say "hello world".tc
18:57 p6eval rakudo 0f9703: OUTPUT«No such method 'tc' for invocant of type 'Str'␤  in block  at /tmp/OTbky9CgZ0:1␤␤»
18:57 p6eval ..niecza v24-24-gbdc3343: OUTPUT«Hello world␤»
18:57 colomon yeah, I thought I remembered something dodgy about all that...
18:57 * colomon is probably to blame
18:58 uvtc colomon: did you hear about the world series?
18:58 uvtc colomon: turns out it diverges!
18:59 colomon uvtc: no, .... argh, that's terrible
18:59 uvtc hhahaha
19:01 * uvtc wanted to cheer colomon after he wrote "colomon is prob to blame" :)
19:01 colomon uvtc++
19:01 TimToady but baseball doesn't have cheerleaders
19:02 TimToady well, maybe in college baseball
19:03 uvtc Somewhere there's a joke about quarterbacks and π/2 that would fit here...
19:04 colomon quarterbacks would never eat half a pie, that's more of an offensive lineman kind of thing.
19:08 TimToady I dunno, some linemen are pretty defensive about that
19:09 uvtc Ok, now you *both* get this :) http://www.youtube.com/watch?v=n6hOBVaMGFI
19:12 moritz http://www.perlmonks.org/?node_id=1020582
19:13 GlitchMr joined #perl6
19:13 * uvtc is looking forward to trying out Perl 6 + GTK at some point.
19:14 arnsholt uvtc: If you start hacking on a GTK wrapper, I'd be happy to help with any NativeCall problems =)
19:15 rindolf joined #perl6
19:16 rindolf Hi all.
19:16 rindolf TimToady: here?
19:16 arnsholt jnthn: Y'know, this is not the kind of hacking I was planning when I went to the Oslo hackathon, so in a sense this is all a great big yak shave =D
19:17 uvtc I'm somewhat curious to learn what the relationship is between Rakudo, Parrot, NativeCall, and ... what's the other piece... zavolaj?
19:17 arnsholt A very interesting yak shave, so I guess it doesn't quite qualify as a yak shave
19:17 arnsholt NativeCall is zavolaj (because reasons)
19:17 nwc10 jnthn: http://pasta.test-smoke.org/449 -- breaks on my machine :-( Sorry to saddle you with this problem.
19:17 arnsholt The module is called NativeCall, but the repo is jnthn/zavolaj
19:17 colomon uvtc: Niecza + GTK works fine today.
19:18 arnsholt Most of the functionality that powers NativeCall is implemented in NQP (which is what Rakudo is implemented in) and exposed in user-friendly terms from the NativeCall module
19:19 dalek nqp: fd6f6b4 | jnthn++ | / (4 files):
19:19 dalek nqp: First round of compilation stage refactoring.
19:19 dalek nqp:
19:19 dalek nqp: This separates the backend-independent stages from the backend-specific
19:19 dalek nqp: stages. The methods that relate to a backend's stages move into the
19:19 dalek nqp: Backend class.
19:19 dalek nqp:
19:19 dalek nqp: A new :from(...) parameter to .compile enables various places that did
19:19 dalek nqp: their own stage visiting, because they had a non-source start point, to
19:19 dalek nqp: just use .compile instead, which is a pleasant cleanup.
19:19 dalek nqp:
19:19 dalek nqp: Additionally, stage names are now properly validated.
19:19 dalek nqp: review: https://github.com/perl6/nqp/commit/fd6f6b473f
19:19 uvtc Does NativeCall currently require Parrot?
19:19 jnthn nwc10: Yes, nqp-jvm-cc.nqp currently knows a little bit too much. I'll fix it shortly - I'm almost there with the changes that let me write it cleanly.
19:20 nwc10 aha
19:20 arnsholt uvtc: In the sense that it's only implemented in NQP-on-Parrot, yeah
19:20 moritz but it doesn't ues parrot's NCI mechanism
19:20 arnsholt The basic architecture should be more general though, but noone's really tried to implement it anywhere else
19:20 uvtc arnsholt: Personally, I don't find that to be a problem. I like Parrot, from a user's point of view.
19:21 * moritz wonders how easy or hard it would be to write a REPR that does object-relational mapping
19:21 uvtc I'm not familiar with Parrot's NCI mechanism. I think there's been some discussion about recently though.
19:22 uvtc Oops. arnsholt ^^
19:22 jnthn General warning: what I just did in NQP requires Rakudo updates before Rakudo will work against NQP HEAD. I'll get there soon.
19:22 uvtc jnthn++ !
19:23 uvtc Ooh. Careful. Almost factorialed jnthn.
19:23 arnsholt uvtc: I have no idea about it either, to be honest. It's jnthn's idea, I'm just the caretaker =)
19:24 arnsholt But IIRC most of the #parrot discussions about the NCI has been how to throw out all that code, I think
19:26 uvtc Oh. Does NativeCall obviate the need for Parrot's NCI?
19:27 arnsholt As far as Rakudo and NQP is concerned, I pretty much think so, yeah
19:28 jnthn Aye, that's pretty much it :)
19:34 lichtkind_ joined #perl6
19:37 benabik joined #perl6
19:38 kaare_ joined #perl6
19:51 GlitchMr > 2.WHERE
19:51 GlitchMr -4591501378423672890
19:51 GlitchMr Just wondering, is WHERE supposed to be negative?
19:51 GlitchMr rn: say 2.WHERE
19:51 p6eval rakudo 0f9703: OUTPUT«74101107␤»
19:51 p6eval ..niecza v24-24-gbdc3343: OUTPUT«Unhandled exception: Unable to resolve method WHERE in type Int␤  at /tmp/FlfdkA6MB2 line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4234 (module-CORE @ 580) ␤  at /home/…
19:52 jnthn GlitchMr: Looks like an unsigned thing getting treated as signed.
19:53 GlitchMr That makes sense.
19:53 GlitchMr I have lots of memory.
19:53 GlitchMr And swap memory that is never used...
19:53 dalek nqp: 018ca15 | jnthn++ | src/HLL/Compiler.pm:
19:53 dalek nqp: Fix some thinkos.
19:53 dalek nqp: review: https://github.com/perl6/nqp/commit/018ca15ad6
19:53 dalek nqp: e557b41 | jnthn++ | src/HLL/Compiler.pm:
19:53 dalek nqp: Add a way to get/set the current backend.
19:53 dalek nqp: review: https://github.com/perl6/nqp/commit/e557b417e6
19:53 dalek nqp: 12de2c1 | jnthn++ | src/HLL/Compiler.pm:
19:53 dalek nqp: Punt "is it precomp"/"is it textual" to backend.
19:53 dalek nqp: review: https://github.com/perl6/nqp/commit/12de2c1785
19:55 stevan_ joined #perl6
20:09 dalek rakudo/nom: b10e2ba | jnthn++ | / (3 files):
20:09 dalek rakudo/nom: Updates to work with latest HLL::Compiler.
20:09 dalek rakudo/nom:
20:09 dalek rakudo/nom: Makes things a little cleaner, by not coupling to the backend stages
20:09 dalek rakudo/nom: at all. Should cut out one bit of what the --target=pbc support had
20:09 dalek rakudo/nom: to update.
20:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b10e2ba4d4
20:10 uvtc Is NativeCall (Zavolaj) primarily for C-library interop, or are there other compiled libraries with which it allows you to interoperate?
20:12 uvtc Whoops. N/m. Found S21.
20:14 TimToady the name "NativeCall" seems to presume that C calls are always "native"
20:14 benabik The C calling conventions is generally the "normal" way to call functions.
20:14 TimToady perhaps we could get them to rename C to Native
20:15 GlitchMr CeeCall?
20:15 TimToady it's not normal on a JVM :)
20:15 TimToady it's not normal on a Symbolics machine...
20:15 TimToady if it's calling by C conventions, it should really name C somehow
20:16 benabik I haven't seen anyone write C code that targets the JVM...
20:16 uvtc I get the impression that, on the JVM, the typical advice is, "erm, here, use this Java-equivalent".
20:17 GlitchMr Should it be even called NativeCall?
20:17 GlitchMr Interop is nice, but definitely not compatible between implementations.
20:17 bluescreen10 joined #perl6
20:17 TimToady I'm not suggesting feeding C to JVM, but I am suggesting that APIs should be named according to the thing they're APIing with
20:17 GlitchMr And the specification assumes it's interop with language like C or Fortran.
20:18 uvtc SeaCall, SeeCall (See Jane. See Jane run. See Jane call C-libraries.)
20:18 TimToady cc señor
20:18 uvtc hehe
20:19 GlitchMr The problem is that NativeCall claims to be portable when it isn't.
20:19 GlitchMr It should be CeeCall, or NativeCall(:lang<C>) or something.
20:19 skids I do occasionally get tempted to call a pure Perl6 implementation of something "native" based on the perspective that it's the native language of the program.
20:20 census_ joined #perl6
20:20 census_ joined #perl6
20:21 census_ joined #perl6
20:21 census_ joined #perl6
20:22 census_ joined #perl6
20:22 GlitchMr Also, remember the language could support more than one sort of native call.
20:23 skids "ForeignCall" ?
20:23 GlitchMr For example, let's say that Rakudo JVM implements JavaCall. In future it could implement CeeCall. Jython already can run C modules.
20:23 jnthn .oO( gee, you spend ages building people a nice library and all they do is whine about the darn name... )
20:23 skids haha
20:23 skids jnthn++
20:23 bruges joined #perl6
20:24 GlitchMr Don't people whine about graphics editor called GIMP because of its name?
20:25 * jnthn points out that the thing the JVM uses to call out to C libraries is called...Java *Native* Interface! :)
20:25 GlitchMr JavaNativeCall than
20:25 TimToady and anyway, there's supposed to be a syntax for importing from other languages that is none of these
20:25 TimToady see S11
20:26 GlitchMr Doesn't Rakudo have its nqp:: and pir::?
20:26 uvtc I do like the descriptive names for these, given that users may eventually be calling all sorts of compiled libs from Perl 6 (C, Go, Rust, Python extensions, whatever).
20:27 GlitchMr And Niecza CLR::?
20:27 jnthn GlitchMr: No the ENTIRE POINT of NativeCall is that modules can be written against it ONE TIME and then working on Rakudo on Parrot, Rakudo on JVM, etc. once NativeCall itself is ported.
20:28 jnthn If you go making it be called different things in different places we ruin that.
20:28 TimToady also, something feels factored wrong about specifying the shared lib name inside the native trait
20:29 skids It isn't a "language" thing so much as a "binary code object" thing -- what produced that code is beside the point.
20:29 jnthn skids: Exactly.
20:29 uvtc jnthn: (I'm clearly out of my depth here, but) would I then use NativeCall to call libs written in, say, Go?
20:29 TimToady I wasn't suggesting breaking that, only that if the point is to give an invariant access to the C ecosystem, it should have "C" somewhere in the name
20:30 GlitchMr Hmmm, but skids argument makes sense. GNU compiler collection can compile to lots of languages.
20:30 GlitchMr Most of them are already supported by NativeCall.
20:30 GlitchMr Like Fortran.
20:30 jnthn uvtc: Only if it produces things that match the ABI, which I think in the case of Go it does not.
20:30 GlitchMr compile lots of languages*
20:30 TimToady the fact that the C ecosystem of usually "native" is not guarateed to hold in the future
20:31 TimToady s/of/is/
20:31 uvtc jnthn: thanks.
20:31 TimToady anyway, "Native" is a bad name for an ABI
20:31 skids Really then we are talking about the syntax surrounding the interface.  What if we wanted a version of NativeCall with a Pascal-like look and feel versus C-like.
20:32 GlitchMr What about renaming NativeCall to FortranCall?
20:32 uvtc IndigenousCall  /ducks :)
20:33 GlitchMr But seriously, what about ExternalCall?
20:34 TimToady GlitchMr: you have no idea what is external
20:34 GlitchMr Probably.
20:34 skids external could mean many things.
20:34 TimToady what if you're running in GoLand?
20:35 TimToady at least with a language name, you can look up to see if there's some mapping from the language name to what is typically the calling protocol on this platform
20:35 TimToady you're only hosed if there are two different Java's with different conventions
20:37 skids But simply saying "C" doesn't convey "load a dl" versus, say, "interpret a C source file live"
20:38 diakopter CABICall
20:38 diakopter (as a backend for NativeCall)
20:39 TimToady skids: "C" could probably figure that out from the file extensions, if it needed to, but certainly pulling things out of libraries would tend to be the default, since C is customarily precompiled
20:39 uvtc diakopter: Heh. If you squint, looks a bit like "Cabbie Call". :)
20:40 TimToady it comes back to pattern matching with sufficent specificity/genericity to do what you want
20:40 TimToady which we already have to worry about with 'use' statements
20:40 * skids finds it amusing how "native" a-la "native code" and "foreign" a-la "foreign function interface" have managed to circle around to the same meaning.
20:41 TimToady 'use' is already (supposed to be) querying a database for official modules; adding search terms by language or ABI or library name is not a big stretch
20:41 TimToady skids: the question is who's to be master, that's all --Humpty Dumpty
20:43 * skids had wondered earlier if the proposals about the runtime versioning system could be leveraged to handle dependencies on non-perl things from separately installed packages.
20:43 TimToady that's why S11 just adds more adverbials to 'use' for that, after all
20:44 timotimo you may be mast, but there's always someone master than you!
20:45 TimToady instead of 'is native("libfoo.so")' we should have a way to refer back to a particular set of import criteria declared by a 'use'
20:45 timotimo jnthn: is rakudo HEAD with NQP HEAD known to work?
20:45 TimToady (if we can't deduce the signature from the use itself)
20:47 jnthn timotimo: yes, the commit I did to Rakudo a moment ago shoulda done that
20:48 timotimo great, thanks :)
20:48 * timotimo wants to catch up to recent developments
20:48 nwc10 jnthn: Rakudo builds and passes tests on my machine
20:59 domidumont joined #perl6
21:04 dalek nqp-jvm-prep: a04e5a6 | jnthn++ | nqp-jvm-cc.nqp:
21:04 dalek nqp-jvm-prep: Use new backend API to make cross-comp less hacky.
21:04 dalek nqp-jvm-prep:
21:04 dalek nqp-jvm-prep: This gets things working with the latest NQP; it also requires the
21:04 dalek nqp-jvm-prep: latest NQP.
21:04 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/a04e5a6678
21:05 jnthn nwc10: That should unbust stuff :)
21:05 nwc10 yes, just grabbed it
21:05 nwc10 I can report that it was bust before :-)
21:06 jnthn On the NativeCall naming, API, etc - here's a way forward, so we don't have to argue this again. The NativeCall module will retain its current name, and continue using the trait to specify the library name. At the point we have the infrastructure to hang some of what it does off "use", that's the point to revisit naming and other details of the API.
21:07 uvtc jnthn: just curious: are you targetting OpenJDK 6 or 7?
21:07 timotimo /home/timo/build/rakudo/install/bin/parrot: symbol lookup error: dynext/nqp_ops.so: undefined symbol: VMArray_initialize - i need a newer parrot, too? or just make clean?
21:08 jnthn That way, existing modules using NativeCall will go on working just fine, and there'll be a single migration step towards the "use" approach which existing modules can take as and when their authors have time.
21:09 jnthn timotimo: Probably nothing more than a make clean
21:11 jnthn uvtc: JDK 7
21:11 uvtc jnthn: thanks
21:14 timotimo huh. i can't build parrot because of this: src/call/context.c:21:27: fatal error: pmc/pmc_proxy.h: No such file or directory  -  this is the latest RELEASE_... tag
21:14 timotimo make clean didn't change anything. strange.
21:14 timotimo maybe i have to git clean something something
21:15 timotimo Use of uninitialized value $with_parrot in concatenation (.) or string at tools/lib/NQP/Configure.pm line 293.  -  whoops?
21:15 nwc10 jnthn: unbust
21:15 timotimo oh, it was probably a configure.pl that needed executing or something like that.
21:16 timotimo (at least for nqp)
21:16 jnthn nwc10: yay
21:17 TimToady jnthn: I'm fine with that for now
21:19 TimToady and I do appreciate having NativeCall available :)
21:25 timotimo is $𝕔 something in perl6, but not in nqp?
21:25 timotimo hm, ¢?
21:25 timotimo .u 𝕔¢
21:25 phenny U+1D554 MATHEMATICAL DOUBLE-STRUCK SMALL C (𝕔)
21:25 phenny U+00A2 CENT SIGN (¢)
21:36 timotimo hum. trying to implement the "block in infix position" warning would require porting the $*IN_META thing and arguments to almost every infixish call in the grammar - doesn't seem worth the hassle just yet.
21:37 uvtc So, I'd like to understand lists/arrays/parcels in Perl 6. The first thing that gets me off-balance is:
21:37 uvtc r: my @a = ('foo', 'bar', 'baz'); say @a.WHAT
21:37 p6eval rakudo b10e2b: OUTPUT«(Array)␤»
21:37 uvtc r: my @a = ['foo', 'bar', 'baz']; say @a.WHAT
21:37 p6eval rakudo b10e2b: OUTPUT«(Array)␤»
21:38 uvtc If the brackets don't get me an array ref, what do they do in Perl 6?
21:38 timotimo r: my @a = ('foo', 'bar', 'baz'), ('quux', 'fuux'); say @a.perl;
21:38 p6eval rakudo b10e2b: OUTPUT«Array.new("foo", "bar", "baz", "quux", "fuux")␤»
21:38 uvtc r: my $x = ['foo', 'bar', 'baz']; say @x.WHAT
21:38 p6eval rakudo b10e2b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '@x' is not declared. Did you mean '$x'?â�¤at /tmp/d2EFe9SPFA:1â�¤------> [32m $x = ['foo', 'bar', 'baz']; say @x.WHAT[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤Â»
21:38 uvtc r: my $x = ['foo', 'bar', 'baz']; say $x.WHAT
21:38 p6eval rakudo b10e2b: OUTPUT«(Array)␤»
21:38 timotimo r: my @a = ['foo', 'bar', 'baz'], ['quux', 'fuux']; say @a.perl;
21:39 p6eval rakudo b10e2b: OUTPUT«Array.new(["foo", "bar", "baz"], ["quux", "fuux"])␤»
21:39 jnthn r: my @a = ['foo', 'bar', 'baz']; say @a.perl
21:39 p6eval rakudo b10e2b: OUTPUT«Array.new(["foo", "bar", "baz"])␤»
21:39 jnthn = is doing assignment *into* the array @a
21:39 jnthn And you put assigned a single arrayref into @a
21:41 uvtc timotimo: Ok. Given your example, I'm remembering a bit from the last time I asked this. :) I think the brackets affect whether or not the thing gets flattened.
21:41 skids r: my @a = 'foo', 'bar', 'baz'; say @a.perl; # also and to make things clear, parens not needed.
21:41 p6eval rakudo b10e2b: OUTPUT«Array.new("foo", "bar", "baz")␤»
21:42 uvtc skids: Right. Though, if I leave off the parens, then parens are implicit, right? (as opposed to brackets)
21:42 timotimo uvtc: indeed, ['foo', 'bar', 'baz'] is a bit like ('foo', 'bar', 'baz').item
21:43 timotimo indeed, those parens are not syntax for something. it's just the , operator doing its thing
21:43 timotimo that's why (1, 2, 3), (4, 5) doesn't give you an array with two arrays in it
21:43 uvtc timotimo: I don't know what .item means.
21:43 skids r: my @a = ("foo", "bar", "baz").item; say @a.WHAT; say @a.perl;
21:43 p6eval rakudo b10e2b: OUTPUT«(Array)␤Array.new($("foo", "bar", "baz"))␤»
21:43 timotimo oh, it basically means "don't flatten me ,please"
21:44 labster joined #perl6
21:44 timotimo whoops, not the same thing!
21:44 timotimo i'm glad i said "a bit like" and not "exactly like"
21:45 skids r: my @a = ("foo", "bar", "baz").item; say @a[0].WHAT;
21:45 p6eval rakudo b10e2b: OUTPUT«(Parcel)␤»
21:45 timotimo rakudo: say [1,2] X~ <a b> # this is a very old bug. wonder how come it's not fixed yet?!
21:45 p6eval rakudo b10e2b: OUTPUT«1a 1b 2a 2b␤»
21:46 timotimo https://rt.perl.org/rt3/Ti​cket/Display.html?id=74072 - this being the bug in question
21:49 uvtc r: my @should-not-flatten = 'foo', ['bar', 'baz'], 'moo'; say @should-not-flatten
21:49 p6eval rakudo b10e2b: OUTPUT«foo bar baz moo␤»
21:50 uvtc It flattened though.
21:50 skids no, it say'd.
21:50 PacoAir joined #perl6
21:50 timotimo r: my @should-not-flatten = 'foo', ['bar', 'baz'], 'moo'; say @should-not-flatten.perl
21:50 p6eval rakudo b10e2b: OUTPUT«Array.new("foo", ["bar", "baz"], "moo")␤»
21:52 uvtc Ah. I see. `say` is being tricksy with me. :)
21:53 dalek roast: 906a054 | (Timo Paulssen)++ | S02-types/subset.t:
21:53 dalek roast: test for #74352
21:53 dalek roast: review: https://github.com/perl6/roast/commit/906a054d43
21:54 timotimo one more obsolete bug resolved
21:54 uvtc thanks, skids .
21:56 uvtc What are the differences between arrays and lists in Perl 6? In Perl 5, I recall that lists are the runtime values, and arrays are those compile-time things with an at-sign sigil. And comma expressions can evaluate to a list in list context.
21:57 * [Coke] wonders if there is a place to read about list, flattening etc. yet?
21:59 uvtc [Coke]: well, I'm working on writing up some "baby Perl 6" notes on it: http://www.unexpected-vortices.com/​perl-6/compact-perl6-tut/lists.html , but I need to learn it first. :)
21:59 drKreso joined #perl6
22:00 timotimo r: class Foo { method bar { Quux.parse('OH HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar;
22:00 p6eval rakudo b10e2b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Illegally post-declared type:â�¤    Quux used at line 1â�¤â�¤Â»
22:00 timotimo r: eval q{class Foo { method bar { Quux.parse('OH HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar;}
22:00 p6eval rakudo b10e2b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Illegally post-declared type:â�¤    Quux used at line 1â�¤â�¤Â»
22:01 timotimo r: try eval q{class Foo { method bar { Quux.parse('OH HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar;}; say $!
22:01 p6eval rakudo b10e2b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Illegally post-declared type:â�¤    Quux used at line 1â�¤â�¤Â»
22:01 timotimo r: try eval q{class Foo { method bar { Quux.parse('OH HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar;}; say $!.WHAT
22:01 p6eval rakudo b10e2b: OUTPUT«Cannot look up attributes in a type object␤  in method <anon> at src/gen/CORE.setting:1868␤  in method message at src/gen/CORE.setting:9777␤  in method gist at src/gen/CORE.setting:9767␤  in sub say at src/gen/CORE.setting:7602␤  in block  at /tmp/yjtRXu9Zga:1␤␤»…
22:01 timotimo what am i doing wrong?
22:01 timotimo it seemed like $! was Nil after that
22:03 skids r: grammar Quux {...}; class Foo { method bar { Quux.parse("OH HAI"); } }; grammar Quux { rule TOP { .* } }; Foo.bar.say;
22:03 p6eval rakudo b10e2b: OUTPUT«「OH HAI」␤␤»
22:04 timotimo i'm trying to make a test for the illegally post-declared type error message for roast, not trying to make this work :)
22:04 [Coke] uvtc: Danke.
22:04 skids Oh!
22:04 skids :-)
22:13 timotimo my Hash $x; $x[1] = 5; # is this supposed to blow up in this way?
22:14 timotimo r: my Hash $x; $x[1] = 5; # is this supposed to blow up in this way?
22:14 p6eval rakudo b10e2b: OUTPUT«Type check failed in assignment to '$x'; expected 'Hash' but got 'Array'␤  in sub infix:<=> at src/gen/CORE.setting:12495␤  in block  at src/gen/CORE.setting:1533␤  in block  at /tmp/KqFXY2kQRc:1␤␤»
22:16 timotimo try eval ...; say $!.WHAT should be the right way, no?
22:16 timotimo r: try eval q{say $undef}; say $!.WHAT;
22:16 p6eval rakudo b10e2b: OUTPUT«(X::Undeclared)␤»
22:16 timotimo r: try eval q{my $undef = 5; my $undef = 10;}; say $!.WHAT;
22:16 p6eval rakudo b10e2b: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol $undefâ�¤    at eval_0:1â�¤    ------> [32mmy $undef = 5; my $undef [33mâ��[31m= 10;[0mâ�¤(Any)â�¤Â»
22:19 timotimo std: say <1 2 3>.>>.perl
22:19 p6eval std 52fe6d2: OUTPUT«ok 00:00 42m␤»
22:21 toebu joined #perl6
22:22 [Coke] timotimo: what what would expect that to blow up?
22:22 [Coke] r: my Hash $x $x<1> = 5;
22:22 p6eval rakudo b10e2b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/HkGEBiBvy2:1â�¤------> [32mmy Hash $x [33mâ��[31m$x<1> = 5;[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤        constraintâ�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        sta…
22:22 [Coke] r: my Hash $x; $x<1> = 5;
22:22 p6eval rakudo b10e2b:  ( no output )
22:23 stevan__ joined #perl6
22:25 timotimo huh?
22:26 Entonian joined #perl6
22:27 timotimo anyway, i think i'll go to bed now :)
22:27 benabik $x[] autovivs a array, $x{} autovivs a hash
22:29 uvtc Is this the customary way to write an array/list of arrays/lists: `[<a b c>], [<d e f>], [<g h i>]`? It seemed the Perl5ish way, but it works.
22:31 fgomez joined #perl6
22:35 xinming joined #perl6
22:58 uvtc left #perl6
23:16 Liz_ joined #perl6
23:22 TimToady r: say (<a b c>, <d e f>, <g h i>).tree.perl
23:22 p6eval rakudo b10e2b: OUTPUT«LoL.new($("a", "b", "c"), $("d", "e", "f"), $("g", "h", "i"))␤»
23:23 TimToady r: say (<a b c>, (<d e f>, <g h i>)).tree.perl
23:23 p6eval rakudo b10e2b: OUTPUT«LoL.new($("a", "b", "c"), $(("d", "e", "f"), ("g", "h", "i")))␤»
23:23 TimToady that's not right
23:24 TimToady .tree is supposed to recurse, not pretend to be .lol
23:25 TimToady well, I guess the spec defaults it to 1 level
23:25 TimToady r: say (<a b c>, (<d e f>, <g h i>)).tree(2).perl
23:25 p6eval rakudo b10e2b: OUTPUT«(LoL.new("a", "b", "c").item, LoL.new($("d", "e", "f"), $("g", "h", "i")).item).list␤»
23:26 TimToady r: say (<a b c>, (<d e f>, <g h i>)).tree(*).perl
23:26 p6eval rakudo b10e2b: OUTPUT«Cannot call 'tree'; none of these signatures match:␤:(Any:U : Mu *%_)␤:(Any:D : Mu *%_)␤:(Any:D : &c, Mu *%_)␤:(Any:D : Cool $count, Mu *%_)␤␤  in method tree at src/gen/CORE.setting:1366␤  in block  at /tmp/cr8jgh4asB:1␤␤»
23:26 TimToady r: say (<a b c>, (<d e f>, <g h i>)).tree(*.Array).perl
23:26 p6eval rakudo b10e2b: OUTPUT«(["a", "b", "c"], ["d", "e", "f", "g", "h", "i"]).list␤»
23:27 TimToady r: say (<a b c>, (<d e f>, <g h i>)).tree(*.Array xx *).perl
23:27 p6eval rakudo b10e2b: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤␤  in method Real at src/gen/CORE.setting:873␤  in sub infix:<>> at src/gen/CORE.setting:2902␤  in method tree at src/gen/CORE.setting:1370␤  in block  at src/gen/CORE.setting:1371␤  in method r…
23:27 TimToady r: say (<a b c>, (<d e f>, <g h i>)).tree(*.Array, *.Array).perl
23:27 p6eval rakudo b10e2b: OUTPUT«Cannot call 'tree'; none of these signatures match:␤:(Any:U : Mu *%_)␤:(Any:D : Mu *%_)␤:(Any:D : &c, Mu *%_)␤:(Any:D : Cool $count, Mu *%_)␤␤  in method tree at src/gen/CORE.setting:1366␤  in block  at /tmp/wVxzZTyTzm:1␤␤»
23:28 TimToady I guess it's still partly NYI
23:36 fgomez joined #perl6
23:46 skids joined #perl6
23:48 _daniel-s__ joined #perl6
23:57 dalek specs: 12b6d9f | diakopter++ | S04-control.pod:
23:57 dalek specs: typo in S04
23:57 dalek specs: review: https://github.com/perl6/specs/commit/12b6d9f6ea

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

Perl 6 | Reference Documentation | Rakudo