»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:10
benabik left
00:17
cognominal left
00:29
gcole joined
00:32
benabik joined
00:44
hash_table joined
00:51
benabik left
01:04
anuby joined
|
|||
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:05 | |
Where can I find a citation to provide to Pm, other than chatlogs? | 01:06 | ||
I think the last para of perlcabal.org/syn/S32/Containers.html#splice is on point? | |||
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. | ||
TimToady | and well motivated, insofar as it makes it much easier to write a loop with it | 01:11 | |
rjbs | indeed | ||
TimToady | not to mention prior art in p5 | ||
01:16
spider-mario left
01:20
hypolin joined
|
|||
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. | ||
01:57
japhb_ left
02:10
lustlife joined
02:16
hash_table left
|
|||
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» | ||
colomon | oh, right, sub round. | 02:30 | |
r: sub roundcents($x) { round($x, 1/100); }; say roundcents(123.124123) | 02:33 | ||
p6eval | rakudo 0f9703: OUTPUT«123.12» | ||
colomon | shorter, actually works. hrmph. | ||
02:37
FROGGS_ joined
|
|||
dalek | ecs: d6eae27 | (Solomon Foster)++ | S32-setting-library/Numeric.pod: Get rid of the roundcents example, which no longer works and is longer than just writing a new sub anyway. |
02:37 | |
02:40
FROGGS left
02:46
census left
02:54
swarley- joined
02:57
swarley| left
02:59
swarley- left
03:20
Celelibi joined
03:21
orafu left,
orafu joined
03:41
rindolf joined
04:06
benabik joined
04:07
benabik left,
benabik joined
04:21
SamuraiJack joined,
grondilu_ is now known as grondilu
04:25
xinming_ joined,
fgomez left
04:29
xinming left
04:34
fgomez joined
04:39
preflex left,
preflex_ joined
04:40
preflex_ is now known as preflex
05:03
SamuraiJack left
05:27
pmichaud joined
05:34
kaleem joined
05:44
sjn left,
sjn joined
05:50
Chillance left
05:58
rindolf left
|
|||
lue | .oO(Apparently, ~/.perl6/<version>/bin is now /usr/local/lib/parrot/.../bin) |
05:59 | |
05:59
rindolf joined
06:01
sjn left,
sjn joined
06:06
rindolf left,
rindolf joined
06:14
TheVenetianMask left
06:15
rindolf left
06:16
rindolf joined
06:26
TheVenetianMask joined
06:27
TheVenetianMask is now known as Guest76750
06:31
rindolf left
06:32
rindolf joined
06:37
kst` joined
06:41
FROGGS_ left
06:44
thou left
06:48
rindolf left,
thou joined,
rindolf joined
07:00
thou left
07:13
FROGGS joined
07:15
nebuchadnezzar left,
rindolf left
07:16
rindolf joined
07:20
nebuchadnezzar joined
|
|||
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 | |
it might just be useful for the Go port | |||
07:22
quester left
|
|||
FROGGS | jnthn: happy cake btw ;o) | 07:22 | |
07:26
ObseLeTe joined
07:29
wk joined
|
|||
diakopter | FROGGS: what's masak's NFA C tutorial? | 07:29 | |
FROGGS | diakopter: swtch.com/~rsc/regexp/regexp1.html - Regular Expression Matching Can Be Simple And Fast | 07:31 | |
I'd like to do that for "normal" regexes, and add another codepath when using backtracking | 07:32 | ||
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:33 | ||
07:33
aindilis left
07:35
sqirrel joined
07:36
drKreso joined
|
|||
drKreso | Hi | 07:36 | |
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:38 | |
07:39
stevan_ joined,
rindolf left
|
|||
diakopter | it's trivial to detect such compatability, I'm quite certain | 07:39 | |
07:39
stevan__ left,
Patterner left,
mtk left,
Khisanth left,
mberends left
|
|||
diakopter | drKreso: hi | 07:39 | |
FROGGS | drKreso: hi | ||
07:39
rindolf joined
|
|||
drKreso | All I can say about Perl6i is wow :) | 07:40 | |
diakopter | what's Perl6i? :) | ||
FROGGS | drKreso: well, than it might be a quiet day *g* | ||
07:41
mberends joined
07:42
Khisanth joined
|
|||
drKreso | Heh, Actually I am puzzled with difference of pointy block -> and => | 07:43 | |
And their relation to Ruby blocks | |||
sorear | drKreso: what is perl6i ? | 07:48 | |
FROGGS | sorear: that's the release name after perl6h :o) | ||
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 | ||
Perl6 is | |||
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 :) | ||
sorear | => is just a pair constructor | ||
foo => 3 means Pair.new(:key("foo"), :value(3)) | |||
(perl 5 mostly doesn't care about whitespace. perl 6 cares a bit more) | |||
07:51
Patterner joined,
mtk joined,
Timbus joined
|
|||
sorear | n: 2 < 3 > .say | 07:51 | |
p6eval | niecza v24-24-gbdc3343: OUTPUT«(Any)» | ||
sorear | n: 2<3>.say | ||
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… | ||
drKreso | sorear: Thanks, I was under wrong impression. | 07:54 | |
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") | ||
p6eval | niecza v24-24-gbdc3343: OUTPUT«hello world» | 07:57 | |
drKreso | For example (1..5).reduce { |x| x + rand } | ||
sorear | i am not sure how that works | 08:00 | |
shouldn't reduce take two arguments? | 08:01 | ||
drKreso | Ruby part? | ||
sorear | yes | ||
can you explain what that ruby is doing? | |||
FROGGS | (&:+) <--- is like a guy with curly hair to me | ||
drKreso | (1..5).reduce { |x,sum| sum += x } #=> 15 | 08:02 | |
(1..5).reduce(&:+) | |||
sorear | drKreso: does "reduce { |x| x + rand }" mean anything? | ||
drKreso | it means apply method + to all elements and pass result | ||
sorear | the lack of a comma in |x| is confusing me | ||
but I think I get where you're going with this | 08:03 | ||
drKreso | In perl it's [+] (1..5) | ||
sorear | the answer was, until recently, no | ||
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 }) | ||
p6eval | rakudo 0f9703: OUTPUT«x=1 y=2x=5 y=3x=5 y=4x=5 y=5» | ||
sorear | that's the sane way | ||
the [x] syntax is only useful with named functions, not really with anonymous ones | 08:05 | ||
but you can use .reduce with anonymous functions | |||
drKreso | what is $^x? | 08:06 | |
sorear | shorthand for a parameter | ||
r: [1,2,3,4,5].reduce(-> $x, $y { say "x=$x y=$y"; 5 }) | |||
p6eval | rakudo 0f9703: OUTPUT«x=1 y=2x=5 y=3x=5 y=4x=5 y=5» | ||
drKreso | So this is "block" version of sum : [1,2,3,4,5].reduce({ $^x + $^y}) | 08:07 | |
How would I inject starting value (1..5).reduce(8) { |x,sum| sum += x } #=> 23 | 08:08 | ||
08:08
brrt joined
|
|||
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 | |
I kinda like it | |||
08:09
brrt left
|
|||
drKreso | Btw. --the answer was, until recently, no-- how recently? I am curious? | 08:10 | |
sorear | drKreso: that one was mostly just me being confused and forgetful | 08:11 | |
n: say [1,2,3,4,5]>>[&( { $_ * $_ } )] | 08:12 | ||
p6eval | niecza v24-24-gbdc3343: OUTPUT«(Any) (Any) (Any) (Any) (Any)» | ||
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» | ||
drKreso | Z is zip right? | ||
sorear | yes | ||
there was a change a couple months ago to allow you to use anonymous functions with the metaoperators | |||
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) | ||
p6eval | niecza v24-24-gbdc3343: OUTPUT«10 200 3000 40000 500000» | ||
sorear | there we go | ||
arnsholt scrollbacks | |||
sorear | r: say (1,2,3,4,5 Z[&( { $^a * $^b } )] 10,100,1000,10000,100000) | ||
drKreso | What's the & for? | ||
p6eval | rakudo 0f9703: OUTPUT«===SORRY!===Unable to parse expression in bracketed infix; couldn't find final ']'at /tmp/97TERKH2f2:1------> say (1,2,3,4,5 Z[&⏏( { $^a * $^b } )] 10,100,1000,10000,100» | ||
sorear | drKreso: Disambiguation, mostly | ||
SIGIL( FOO ) lets you use an expression in a syntactic spot that accepts a variable | 08:15 | ||
drKreso | say [1,2,3,4,5]>>[&( { $_ * $_ } )] | ||
ok | |||
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 | ||
FROGGS | arnsholt: time and day? :P | ||
sorear | you can use [VARIABLE] anywhere an infix operator is expected, in niecza only it seems | ||
drKreso | Index out of range. Is: 1, should be in 0..0 | ||
arnsholt | Except that less code has to be in C, I think, and more in Java | ||
FROGGS: When, you mean? | 08:16 | ||
FROGGS | arnsholt: right :o) | ||
sorear | drKreso: the >>[] is wrong, wrong, wrong. [&( EXPR )] is only for infixes, not postfixes | ||
arnsholt | My current plan is to wait until NQP-JVM is in the main NQP repo | ||
FROGGS | ya, that makes sense | ||
arnsholt | Also, I'd like to improve various parts of the API (Buffers, most notably) before going to backend #2 | 08:17 | |
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 | ||
drKreso | sorear: yes I don't have a clue what are you talking about | 08:19 | |
:( | |||
08:20
domidumont joined
|
|||
sorear | ok, there are a few implementations of perl 6 | 08:20 | |
what you probably have installed on your computer is rakudo/parrot | |||
that has the largest development team at the moment | |||
drKreso | yes rakudo | ||
sorear | that's "r" in p6eval | 08:21 | |
FROGGS | p6eval: help | ||
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> | ||
drKreso | What is n: | ||
sorear | n = niecza, which runs on Mono/.net and has a different set of features | 08:22 | |
also I wrote it | |||
when I'm doing examples, I send them to n because I can better predict how n will react | |||
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 | ||
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 | ||
star runs a full rakudo star build, with modules | |||
perl6 and p6 are aliases for rpn | |||
drKreso | what is your motivation for implementing your version? | 08:25 | |
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 :) | ||
sorear | niecza was actually developed using mono on a linux machine | 08:27 | |
08:27
SamuraiJack joined
|
|||
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)... | ||
sorear | most of my biggest gripes with everything rakudo were addressed in the most recent large rewrite | ||
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 | ||
drKreso | nqp is? | ||
08:29
rindolf left
|
|||
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 | ||
c# is a pretty nice language :) | |||
drKreso | hehe | ||
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 | ||
I see the features matrix - it's a shame not to finish it :) | 08:31 | ||
FROGGS | it is, yes | ||
drKreso | I mean it's probably better than C when developing language | 08:32 | |
sorear | are you talking about nqp or c# | ||
drKreso | c# | 08:33 | |
08:33
domidumont left
|
|||
drKreso | It evalated c after all :) | 08:33 | |
08:34
domidumont joined
|
|||
drKreso | FROGGGS: nqp - almost like perl5 or perl6 | 08:35 | |
08:35
daxim joined
|
|||
drKreso | sorear : TimToday had commit 3 days ago on ? That's Larry right? | 08:36 | |
FROGGS | drKreso: almost like perl 6 | ||
sorear | drKreso: Yes | 08:37 | |
drKreso | What is rakudo written in? | 08:39 | |
FROGGS | nqp and perl 6, and a tiny bit pir (parrot language) | 08:40 | |
drKreso | bootstrapping? | 08:41 | |
FROGGS | but these tiny bits are fading away since it is ported to JVM | ||
sorear | also C | ||
FROGGS | drKreso: yes, but dont ask details, I can't answer these :o) | ||
right, parts of the multi dispatcher are C, and some other bits | |||
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:42 | |
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? | ||
Libraries? Btw. Can't I user perl5 CPAN libraries? | 08:44 | ||
FROGGS | drKreso: some day this year? Yes, No, No | ||
drKreso | great | ||
sorear | you can use it *now* if you're willing to accept the speed and memory | ||
FROGGS | drKreso: not yet, it is specced, but not supported right now | ||
sorear | can't use cpan libs transparently, but there's a p5 foreign call system that works occasionally | ||
drKreso | But it will be? Is it a big problem? | ||
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 | ||
sorear | some people are already using perl 6 in important systems | ||
FROGGS | no doubt, it is stable | ||
sorear | don't expect to handle 100 requests per second with a perl 6 web server | ||
drKreso | Exciting, I want to use it! | 08:46 | |
FROGGS | well, then: git clone ... | ||
drKreso | It feels like ruby on stereoids, and I love ruby | ||
Do any of you guys thinks perl5 < ruby < perl6, or do you always prefere perl | |||
hoelzro | Ruby is quite nice | ||
FROGGS | I dont no any ruby | ||
hoelzro | I do most of my work in Perl 5, but I know a fair amount of Ruby | 08:47 | |
I definitely think that Perl 6 incorporates the good things that Ruby added | |||
drKreso | hoelzro: Yes, same here | ||
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. | ||
Is Perl 5 ready to replace FORTRAN for big model runs at the National Weather Service? | |||
Ruby is probably the most widely used language that I cannot even read. | 08:50 | ||
I should fix that someday. | |||
It has to be easier than J. | |||
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:52 | |
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:53 | ||
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 | ||
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? | ||
FROGGS | right | ||
sorear | huh | ||
drKreso | FROGGS: You came in nice and fresh smelling like a rose :) | 08:56 | |
sorear | I thought you were here longer than that | ||
FROGGS | I never went to YAPCs or workshops before, might be a reason | ||
drKreso: *g* | |||
sorear | yeah well you have so many of them near where you live ;) | ||
FROGGS | sorear: I'm active here since october | ||
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:57 | |
08:59
kresike joined
|
|||
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 | ||
drKreso | at github? | ||
FROGGS | if they are done, add tests to roast (a test repository), and close the ticket | ||
no, rt | |||
perl6 queue | |||
after a few tickets I tried to fix one bug on my own, since it affected one of my modules | 09:00 | ||
this took quiet a while, like 50 hours within two months, but I get it done | |||
I enjoyed it so I took the next ticket :o) | 09:01 | ||
sorear | muahahahaha | ||
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? | ||
FROGGS | well, that was the right thing for me, yes | ||
drKreso | Sure, it was nice talking to you guys. | 09:03 | |
FROGGS | drKreso: you're welcome! | ||
sorear | I started out here with the incredibly stupid idea to make an irc client using macros | ||
FROGGS | *g* | ||
drKreso | sorear: hehe | ||
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 | ||
right | |||
sorear | * my version of macros frankly sucked and was never merged. The macros you see in rakudo today are the work of masak++ | ||
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. | ||
sorear | do not credit me for macros just because I worked on them | 09:05 | |
drKreso | how close are they to "THE" macros (lisp) | ||
sorear | We've got most of your favorite features, hygiene and syntactic awareness | 09:06 | |
Of course you can't directly compare it to lisp without homoiconicitty | |||
drKreso | Well I think macros are overrated :) anyways | ||
jnthn | morning, #perl6 o/ | 09:09 | |
FROGGS | morning jnthn | 09:10 | |
sorear | morning jnthn | 09:11 | |
jnthn | o/ FROGGS, sorear :) | 09:12 | |
FROGGS | jnthn: how long are you working in taht company yet? I'm going to have my 10th next year | 09:13 | |
09:13
ObseLeTe left
|
|||
jnthn | FROGGS: About 3 years | 09:14 | |
I think my first day was one of the first days of March 3 years ago | |||
The company formally started existing a several days before then :) | |||
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) | ||
jnthn | Hey, @boss decided it's an excuse for cake, I ain't complaining ;-) | 09:16 | |
09:16
ObseLeTe joined
|
|||
FROGGS | well, we dont need excuses, we regularly have cake (and job offers *g*) | 09:16 | |
FROGGS whispers "cake, cake, cake ..." | 09:17 | ||
jnthn | :) | ||
FROGGS | *g* | 09:18 | |
well, we dont have masak though :/ | |||
and I dont know if I really can recommend this company | 09:19 | ||
TimToady | rosettacode.org/wiki/Ray-casting_al...thm#Perl_6 | ||
drKreso: what makes you think Larry can't joke about something and mean it at the same time? :) | |||
09:20
fhelmberger joined
|
|||
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
09:25
donaldh left
|
|||
drKreso | TimToady: Yeah whatever :) You still made my day... | 09:26 | |
09:26
robinsmidsrod left
09:27
robinsmidsrod joined
09:28
donaldh joined
|
|||
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:29 | |
09:29
drKreso left
|
|||
jnthn | *gist | 09:30 | |
FROGGS | oaky | ||
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:36 | ||
jnthn | I'm not convincd your gut feeling ain't right :) | 09:38 | |
commute & | 09:41 | ||
09:43
wk left
|
|||
daxim | this channel's about horsemeat, right? boingboing.net/wp-content/uploads/2...eating.jpg | 09:43 | |
nwc10 | :-) | 09:47 | |
diakopter | you're a delicacy | ||
TimToady delicately goes to bed & | 09:48 | ||
09:49
fhelmberger left
09:54
dakkar joined
10:06
Tedd1^ left
10:09
Tedd1 joined
10:11
hypolin left
10:16
anuby left
10:36
bapa joined
10:39
lizmat left
|
|||
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 | |
Sebastian Riedel | |||
ah. no, not that thing I was meaning to pate... | |||
irclog.perlgeek.de/perl6/2013-02-25#i_6495672 | |||
that | |||
moritz | nwc10: there's a glossary file in the ilbot repo | 10:44 | |
nwc10 | aha | ||
moritz updates it | 10:45 | ||
done | 10:46 | ||
nwc10 | works on my machine. :-) | ||
moritz | note that pages for dates in the past have a long cache TTL | ||
nwc10 | sane | ||
10:47
krunen joined
10:49
spider-mario joined
10:56
sweet_kid left
10:58
fhelmberger joined
|
|||
FROGGS | moritz: where can I find the code that is responsible for --target=past? | 11:02 | |
ohh, maybe dumper in HLL::Compiler | 11:04 | ||
moritz | FROGGS: in HLL::Compiler, it calls .dump on the current object | 11:25 | |
FROGGS: so there's a method dump in QAST::Node | |||
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:27 | |
11:32
ObseLeTe left
11:55
proller joined
12:00
leprevost joined
|
|||
raiph | hi #perl6 | 12:09 | |
tadzik | hi raiph | ||
raiph | hey tadzik | 12:10 | |
moritz | \o | ||
raiph | continuing my attempt to install the rakudo debugger on ubuntu. to recap, i got some errors from 'make rakudo-test': 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': gist.github.com/raiph/5038001 <--- would someone please help me debug getting the debugger running? | 12:17 | |
moritz | raiph: stupid question, have you tried ./install/bin/perl6-debug ? | 12:18 | |
12:19
SmokeMachine joined
|
|||
raiph | moritz: \o/ that works! (you are dealing with me. no question is ever too stupid. :) ) | 12:20 | |
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) | ||
the copy of the perl6 binary is just for convenience | |||
colomon | huh. I thought I installed perl6-debug with panda the other day, but I have a install/lib/parrot/4.10.0-devel/languages/perl6/site/bin/perl6-debug.nqp and no perl6-debug | 12:22 | |
raiph | moritz: thanks | ||
moritz | raiph: and I've opened github.com/tadzik/Bailador/issues/5 for one of the test failures you found | ||
raiph: you're welcome | |||
12:28
benabik left
|
|||
raiph | has anyone else caught brian wisti's "Perl 6 adventures with Allen B. Downey's Think Python book"? blogs.perl.org/users/brian_wisti/perl-6/ | 12:33 | |
moritz hasn't so far, thanks for the hint | 12:38 | ||
12:47
rhr left
|
|||
colomon | raiph++ | 12:49 | |
12:51
proller left
12:55
leprevost left
|
|||
colomon | rn: say foo(:$bar) { say $bar; }; foo(bar => "Hello!") | 13:00 | |
p6eval | niecza v24-24-gbdc3343: OUTPUT«===SORRY!===Variable $bar is not predeclared at /tmp/w96seXHbkm line 1:------> say foo(:⏏$bar) { say $bar; }; foo(bar => "Hello!"Unexpected block in infix position (two terms in a row, or previous statement missing… | ||
..rakudo 0f9703: OUTPUT«===SORRY!===Variable '$bar' is not declaredat /tmp/i9vXUubuae:1------> say foo(:$bar⏏) { say $bar; }; foo(bar => "Hello!")» | |||
colomon | rn: say foo(:$bar) { say $bar; }; | 13:02 | |
timotimo | rn: say sub foo(:$bar) { say $bar; }; foo(bar => "Hello!") | ||
p6eval | rakudo 0f9703: OUTPUT«===SORRY!===Variable '$bar' is not declaredat /tmp/WpPJlbdT1E:1------> say foo(:$bar⏏) { say $bar; };» | ||
..niecza v24-24-gbdc3343: OUTPUT«===SORRY!===Variable $bar is not predeclared at /tmp/eRxADTh2ue line 1:------> say foo(:⏏$bar) { say $bar; };Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp… | |||
colomon | doh! | ||
p6eval | niecza v24-24-gbdc3343: OUTPUT«sub foo(Any :$bar) { ... }Hello!» | ||
..rakudo 0f9703: OUTPUT«sub foo(:bar(:$bar)) { ... }Hello!» | |||
colomon | rn: sub foo(:$bar) { say $bar; }; foo(bar => "Hello!") | ||
p6eval | rakudo 0f9703, niecza v24-24-gbdc3343: OUTPUT«Hello!» | ||
13:14
Guest76750 is now known as TheVenetianMask
|
|||
[Coke] | \o/ my google perl6 news alert hit something other than this chat again. :) briantwisti++ | 13:25 | |
13:32
skids left
13:35
kaleem_ joined
13:38
kaleem left
|
|||
timotimo | "If Perl 5 is anything to go by, not using parens will occasionally have surprising results." - is this incorrect, though? | 13:49 | |
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 | |||
moritz | though I personally find perl 5 *with* parens even more surprising | ||
print (2 + 3) * 4; # 5 | |||
huf | yes, but that's fairly simple and obvious :D | 13:53 | |
moritz | only obvious if you know the rules. And only obvious when talking about precedence gone wrong | 13:54 | |
if you actually debug code, it's something that's very easy to overlook | |||
13:54
rhr joined
|
|||
huf | "only obvious if you know the rules." <- this is always true :) | 13:55 | |
well, unless it's even worse. but you always have to know the rules. | |||
13:56
ponbiki joined
|
|||
moritz | sure | 13:56 | |
13:56
ponbiki is now known as Guest10382
|
|||
moritz | but some of those rules are more universal than others | 13:57 | |
for example * having a tighter precedence than + is much more common | |||
timotimo | raiph: your praise in the comments sections of the think perl6 posts is making me blush :3 | 14:04 | |
hmm. with zavolaj, XCB bindings could possibly be made and with those, a turtle graphics module ... perhaps one day :) | 14:05 | ||
hm, actually ... gtk is a C based libbary. maybe a minimal gtk binding could be made? | 14:06 | ||
that would also be portable | |||
[Coke] | colomon: gentle reminder that niecza is still failing spectests. not sure if that's on your radar. | ||
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. | ||
timotimo | bbl | 14:08 | |
14:08
kaare_ joined
|
|||
daxim | explain how to do this | 14:08 | |
[Coke] | aw, RC is down. | 14:09 | |
daxim: that to me? | |||
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 | ||
moritz | cheating is technique! | 14:11 | |
timotimo | :D | ||
anyway. bbl for realsies. | |||
14:12
wk joined
14:13
PacoAir joined
14:15
robinsmidsrod left,
robinsmidsrod joined
|
|||
dalek | rl6-roast-data: 5d182a4 | coke++ | README: Add notes on how to fudge pugs for daxim++ |
14:17 | |
14:18
bluescreen10 joined
|
|||
[Coke] | daxim: there you go. Feel free to ping me with any questions. | 14:18 | |
daxim | ok, good | ||
14:21
Psyche^ joined
14:23
Patterner left,
Psyche^ is now known as Patterner
|
|||
[Coke] | (or if there's not enough detail) | 14:24 | |
14:36
nebuchadnezzar left
14:37
nebuchadnezzar joined
|
|||
pmichaud | good morning, #perl6 | 14:47 | |
nwc10 | good am pm | ||
what fun do you have planned for us today? | |||
moritz | nwc10: hey, that's my line :-) | 14:48 | |
\o pmichaud | |||
nwc10 | sorry. | ||
I hadn't realised that it was just your line | |||
moritz | 's ok, don't take me seriously | ||
pmichaud | r: my $line = "good " ~ ('a'|'p') ~ "m pm"; say $line; | ||
p6eval | rakudo 0f9703: OUTPUT«any(good am pm, good pm pm)» | ||
14:49
robinsmidsrod left
|
|||
pmichaud | alas, I have little #perl6 fun planned today... I'll be on phone all day | 14:49 | |
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
14:54
SunilJoshi joined
14:56
shlomif joined
14:57
skids joined
|
|||
arnsholt | sha | 14:58 | |
Whoops. ENOFOCUSFOLLOWSGAZE | |||
14:59
SunilJoshi left,
SunilJoshi joined
15:12
cogno joined
15:22
cogno left
15:23
kaare_ left
15:27
shlomif is now known as rindolf
15:30
SunilJoshi left
|
|||
colomon wishes he could get certain ($work, not p6) people to stop using #defines on words like CURVE and SURFACE. | 15:31 | ||
timotimo | raiph: sadly, the thing where the repl asks for additional lines seems quite a bit over my head ... | 15:33 | |
15:36
rindolf left
15:38
hash_table joined
15:41
FROGGS left
15:42
kaleem_ left
15:44
SunilJoshi joined
15:56
thou joined,
kst left,
kst` is now known as kst
15:59
Liz_ joined
16:08
Liz_ is now known as lizmat
16:11
jdv79 joined
|
|||
jdv79 | how is now from the temporal core stuff "exported"? | 16:12 | |
TimToady doesn't quite understand that | 16:13 | ||
PerlJam | .oO( how now brown cow? ) |
16:14 | |
16:14
bluescreen10 left
|
|||
jdv79 | sorry. ./perl6 -e 'say now' <- how is "now" global? | 16:15 | |
nwc10 | neigh? | ||
16:15
awwaiid joined
|
|||
TimToady | it's just defined in the setting, as far as I know | 16:16 | |
r: say CORE::now | |||
p6eval | rakudo 0f9703: OUTPUT«(Any)» | ||
arnsholt | jdv79: It's defined in the setting, which is (roughly) a lexical scope enclosing your program | ||
TimToady | r: say now | ||
p6eval | rakudo 0f9703: OUTPUT«Instant:1361895425.365465» | ||
TimToady | n: say CORE::now | ||
p6eval | niecza v24-24-gbdc3343: OUTPUT«===SORRY!===Undeclared name: 'CORE::now' used at line 1Unhandled 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… | ||
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 | ||
jdv79 | ok | ||
TimToady | Instants are atomic time | ||
(in theory) | |||
16:18
FROGGS joined
|
|||
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 :( | ||
timotimo | down for me, too :( | 16:19 | |
TimToady | just the web bits, though | ||
site pings/sshes fine | |||
kresike | bye folks | ||
16:19
kresike left
|
|||
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:21 | ||
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? | ||
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? | ||
proper atomic time or UTC? | |||
TimToady | I mean, come on, each of our timezones has a ±7.5° slop in them already | ||
TAI | |||
Ulti | yay | ||
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 | ||
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 | ||
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
|
|||
TimToady | so we think faster standing than laying down, eh? :) | 16:27 | |
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
|
|||
Ulti | that and they can see slightly beyond your horizon so they see predators coming sooner | 16:29 | |
TimToady | but can a predator actually get as high as an astronaut? | 16:30 | |
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 | |
TimToady I'm sure NASA will send a lion into space soon, they've done everything else | |||
TimToady | and you wonder why your GPS has to think so hard when you boot it up... | ||
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:32 | |
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! | ||
all apekind except the russians | |||
TimToady | now be nice, some of my best friends are russians | ||
Ulti | really we need an Earth flag to avoid these problems | 16:34 | |
TimToady | yes, but what does it mean when you burn it? | ||
that you want to emigrate to Mars? | |||
Ulti | en.wikipedia.org/wiki/File:Earth_Flag.svg <-- I think not | ||
TimToady | no, there should be, how many stripes is it today? and who are you asking for the definition of "country"? | 16:36 | |
huf | that's easy | 16:40 | |
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.") |
||
huf | it'd be a lot simpler if there were only one wrong answer :) | 16:42 | |
TimToady | troo | 16:43 | |
GlitchMr | There are no wrong answer. Just better and worse. | 16:49 | |
TimToady | .oO("The robber shouts 'Worse answer!', pulls out a gun, and shoots you. You are now deader.") |
16:50 | |
huf | naturally. it was a robber. if you want plain dead, talk to rob. | 16:51 | |
TimToady | huf++ | ||
16:52
SamuraiJack_ joined
16:53
SamuraiJack left
17:02
lizmat left
17:03
Liz_ joined
17:04
Liz_ left
17:05
salv0 left
17:07
daxim left
|
|||
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:08 | |
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
hash_table left
|
|||
Ulti | yeah like multi dispatch... like I'm British<-English | 17:11 | |
17:12
domidumont left
|
|||
huf | oh that. yes. | 17:12 | |
17:14
djanatyn left,
djanatyn joined
17:17
bluescreen10 joined
17:32
jac50 joined
17:34
uvtc joined
|
|||
uvtc | Do you think [this analogy](www.perlmonks.org/?node_id=1020064) ("Perl is my cast iron pan") applies (or will apply, or should apply) to Perl 6? | 17:37 | |
jnthn | evening o/ | 17:38 | |
uvtc | \o | 17:39 | |
Full disclojure: I love my real cast iron pan. :) | |||
{gah!} s/disclojure/disclosure/. | 17:40 | ||
huf | :) | ||
PerlJam | uvtc: Perl is Perl is Perl is Perl. | ||
:-) | |||
uvtc | (Clojure puns: once I think I'm out, they keep pulling me back *in*!) | ||
TimToady | Perl on Java should be called either Perj or Perk :) | 17:41 | |
uvtc | TimToady: Perl5? | ||
TimToady: or *any* Perl? | |||
huf | why not jerl? | 17:42 | |
TimToady | I suppose Perj would be Perl 4 on Java | ||
jnthn thinks Rakudo on the JVM is called Rakudo :P | |||
huf | rajudo | ||
TimToady | rakujo | ||
Ulti | TimToady: more like Pava en.wikipedia.org/wiki/Pava | ||
jnthn | agh! :P | ||
.oO( jajujo ) |
17:43 | ||
Ulti | "Mahavira had just died at Pava and his followers were divided by bitter wrangles" sounds about right | ||
[Coke] | Tcl:Jacl::Perl:Jarl | ||
huf | you mean hu.wikipedia.org/wiki/P%C3%A1va? | ||
[Coke] | alternatively, Ja Rule | ||
uvtc | Personally, I like the cast iron pan analogy. I wonder if folks consider Perl 6 in the same way. | ||
Ulti | huf: thats awesome, then we can have a camelia esk brightly coloured Pava bird :) | 17:44 | |
like each feather spot looks like camelia | |||
TimToady | Sure, Perl 5 is a cast iron pan. But Perl 6 is the whole kitchen. | ||
Ulti | and the plumbing to the outside toilet | 17:45 | |
aka Java | |||
uvtc | TimToady: Good pun with "Perk" (incremented last letter, and also sounds like something to do with coffee = Java) :) | ||
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 | ||
huf | please provide examples with curl(1) or something :D | ||
that's what they always forget, and what is usually the most helpful | |||
Ulti | lol ok | 17:47 | |
I was planning on a perl5 and perl6 example since I want to promote perl6 for bioinformatics use | |||
define a grammar for the JSON object :) | |||
uvtc | Heheh. "Rakujo". Was assuming "Jakudo". | 17:49 | |
Ulti | Rakujo sounds like an 80s detective | 17:50 | |
spider-mario | uvtc : that’s too easy, I guess | ||
huf | a bald one, by any chance? | ||
Ulti | heh yeah | ||
spider-mario | it’s no better than Jython or JRuby | ||
uvtc | Util: Cujo was a horror movie from a while back about an attack dog. | ||
Util | uvtc: I think you meant Ulti :) | 17:51 | |
uvtc | We've got an Util and an Util? :) | ||
ahhh. Ulti | 17:52 | ||
Ulti | I should really stop sitting here looking like Util | ||
huf | "ulti" is not a card game in english, right? | ||
17:52
SmokeMachine left
|
|||
Ulti | dont think it has any real meaning in English | 17:52 | |
17:53
SmokeMachine joined
|
|||
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 | |
you know that time where you later regret everything you did online | |||
huf | yes. look at my nick. yes :D | 17:54 | |
Ulti | but now people have facebook to keep accurate records | ||
huf | fb still hasnt suspended my obviously-fake-named account... | ||
spider-mario | I chose my nickname when I was ~11 | ||
huf | wonder why | ||
spider-mario | I guess that’s not hard to believe. :p | ||
Ulti | haha | ||
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. | ||
Ulti feels old suddenly | |||
uvtc | Ulti: don't worry --- I was the one pulling out the old Cujo reference. :) | ||
Ulti | yeah | ||
huf | later years just extend 19 | ||
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? | ||
[Coke] | cujo++ | ||
Ulti | I'm still isa 5 at heart | ||
[Coke] | people here Carrie on so with their puns. | ||
Ulti | heh | ||
17:57
dakkar left
|
|||
jnthn | arnsholt: I've been pondering it a bit. I think buffers really just want to be arrays. | 17:57 | |
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[] | ||
And float[] and double[], I guess | |||
17:58
jaldhar left
|
|||
arnsholt | Merging it with VMArray makes a lot sense | 17:59 | |
arnsholt ponders | |||
17:59
domidumont joined
|
|||
TimToady | Buf[bit] might be (more than a bit) more work | 17:59 | |
18:00
jaldhar joined
|
|||
arnsholt | I've intentionally ignored that, for the time being =) | 18:00 | |
jnthn: VMArray instances are created via nqp::list, right? | |||
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. | ||
TimToady keeps vaguely wanting bit arrays for this and that | 18:02 | ||
arnsholt | Ulti: No, that's the char type, I'm pretty sure | ||
jnthn | arnsholt: The idea is that VMArray is a REPR that is composed appropriately. | ||
arnsholt | Ah, right | ||
Ulti | char is byte which is a 32bit integer iirc | ||
TimToady | RC's back up, btw | 18:03 | |
Ulti | there is no such thing as unsigned in Java either | ||
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
zby_home left
|
|||
Ulti | yeah but Java it was a language decision based on the quotable phrase "developers dont understand unsigned arithmetic" | 18:04 | |
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 | ||
arnsholt | The Java spec says byte is 8-bit signed two's-complement | ||
Ulti | orly | ||
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?) |
||
huf | i think the hard part is mixing them | ||
that's what trips up c coders, iirc | |||
arnsholt | jnthn: Yeah, probably a good idea. Native string being STRING*/whatever JVM passes around, right? | 18:08 | |
jnthn | Correct. | ||
huf | so java decided to throw out one of them, and they deemed negative integers more important than sane bitmagic | ||
jnthn | On the JVM that is currently String. In the future it'll be some NFG thing. | ||
TimToady | in the Cccp, abstractions leak you | ||
jnthn | *groan* | 18:09 | |
.u C | |||
phenny | U+0043 LATIN CAPITAL LETTER C (C) | ||
jnthn | Cheating :P | ||
TimToady | no, I didn't bother :) | ||
tadzik | :D | ||
arnsholt | jnthn: So the | ||
jnthn | arnsholt: yes, the. | 18:10 | |
TimToady | cheating is technique--I learned that in the backlog | ||
arnsholt | Bah. Still not sued to new laptop keyboard >.< | ||
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 | |||
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? | ||
p6eval | rakudo 0f9703: OUTPUT«127-128» | ||
skids | Or is there the chance that eventually that will be an out-of-range error. | ||
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. | ||
TimToady | skids: there are use cases for both behaviors | ||
jnthn | Everything that's an object is a 6model object of some kind. | ||
So what RPA does on Parrot is handled on JVM by something of VMArray REPR. | 18:14 | ||
I think that's the way things should go in general. | |||
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 | ||
arnsholt | Yeah, that's definitely a good idea | ||
skids | TimToady: yes, and one could get the usefulness of the current behavior with an explicit coercion e.g. int8(128) | ||
TimToady | I've always thought of native types as something like subset types | 18:15 | |
in fact, various subset types could be optimized to native types | |||
Ada does this all over the place | |||
18:16
_jaldhar joined
18:17
jaldhar left
|
|||
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|...) | ||
uvtc | Also, how do you refer to them here, for ex, maybe S32:Str ? | 18:20 | |
S32::Str | 18:21 | ||
skids | In theory its because those are all part of the "Setting Library" | ||
TimToady | S32/Str # another guess | 18:22 | |
uvtc | What does "Setting Library" mean? | ||
TimToady | nope, I guess one just uses long links | ||
the setting is the notional outer lexical scope of your compilation unit | 18:23 | ||
r: say OUTER::.keys | |||
p6eval | rakudo 0f9703: OUTPUT«» | ||
TimToady | r: say OUTER::OUTER::.keys | ||
p6eval | rakudo 0f9703: OUTPUT«!UNIT_MARKER GLOBALish EXPORT $?PACKAGE ::?PACKAGE $_ $/ $! &restricted &open &unlink &shell &run &QX &mkdir &rmdir &rename © IO $=pod» | ||
TimToady | r: say OUTER::OUTER::OUTER::.keys | ||
p6eval | rakudo 0f9703: OUTPUT«» | ||
TimToady | r: say OUTER::OUTER::OUTER::OUTER::.keys | ||
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 | ||
simon says... | |||
r: say CORE::.keys | |||
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:<=… | ||
uvtc | "Settings library" == "Core library"? | ||
s/Settings/Setting/ | |||
TimToady | we don't like the term "core" for something that is "outside" of your program | 18:25 | |
"CORE" notwithstanding | |||
it's the setting for your jewel of a compilation unit :) | |||
uvtc | Ah. As in jewelry. :) | ||
Heh. | |||
TimToady | or the setting for the play | ||
which might be either a tragedy or a comedy | |||
uvtc | Just tried "hello".length(). Given that it's incorrect, I'd expect the error message to say, "Maybe you meant `chars`?" | 18:28 | |
Or maybe half-expect? | |||
Though, dunno how much P6 wants to dedicate itself to correcting P5isms. | 18:29 | ||
TimToady | std: length "hello"; | 18:30 | |
p6eval | std 52fe6d2: OUTPUT«===SORRY!===Undeclared routine: 'length' used at line 1Check failedFAILED 00:00 41m» | ||
uvtc | n: length "hello" | ||
TimToady | I guess not | ||
p6eval | niecza v24-24-gbdc3343: OUTPUT«===SORRY!===Undeclared routine: 'length' used at line 1Unhandled 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
SunilJoshi left
|
|||
TimToady | uvtc: it does a lot of them already, and some it can't really do because of overlap | 18:30 | |
we just need to install a short levenshtein distance between 'length' and 'chars' :) | 18:31 | ||
won't help the method though | |||
18:31
leprevost joined
|
|||
PerlJam | won't help if the user declared a length sub either :) | 18:31 | |
[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» | ||
TimToady | one could fall through to something levenshteinian on failure, I suppose | ||
uvtc | 2nd try was "hello".size | ||
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. | ||
TimToady | "No class in this application declares a method named 'Inx'" | 18:33 | |
uvtc: Perl 6 is allergic to measuring lengths of things without specifying the units | |||
uvtc | ackn | 18:34 | |
TimToady | hence .elems and .chars | ||
uvtc | TimToady: Ah. Well, now .elems makes more sense. Goes with .chars. ;) | 18:35 | |
:) | |||
TimToady | or .bytes, when that makes sense | 18:36 | |
uvtc | .barks is worse than .bytes | ||
TimToady | but .barques is better | ||
[Coke] | phenny: ask curtispoe why use "my $tree = Any;" instead of "my $tree" ? (RB blog post) | ||
phenny | [Coke]: I'll pass that on when curtispoe is around. | ||
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++ | ||
dalek | p: aa73e78 | jnthn++ | src/HLL/Compiler.pm: Abstract out transcode handling. What's going on here assumes encoded strings, and probably wants a revisit at some point. This can be a no-op on JVM, I guess... |
18:39 | |
p: 5df9fe9 | jnthn++ | src/HLL/Compiler.pm: We'll now call the past target simply "ast". This means you now do --target=ast. Referring to PAST, which is in the past, is kinda confusing in the age of QAST. |
|||
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«===SORRY!===Type 'Mu' is not declaredat /tmp/4djV1Xad4t:1------> use MONKEY_TYPING; augment Mu ⏏{ method length() { die (Bool.pick ?? "TMalformed augmentat /tmp/4djV1Xad4t:1------> use MONKEY_TYPING; augment Mu ⏏… | ||
jnthn | augment class ? | ||
TimToady | yes, but LTA error | ||
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» | ||
jnthn | std: use MONKEY_TYPING; augment Mu { } | ||
p6eval | std 52fe6d2: OUTPUT«Compiled lib/MONKEY_TYPING.pm6===SORRY!===Multiple prefix constraints not yet supported at /tmp/SlwExflHxF line 1:------> use MONKEY_TYPING; augment Mu ⏏{ }Malformed augment at /tmp/SlwExflHxF line 1:------> use MONKEY_… | ||
TimToady | so why dint that one work? | ||
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» | ||
TimToady | r: use MONKEY_TYPING; augment class Any { method length() { die (Bool.pick ?? "Too long" !! "Not long enough") } }; 'hello'.length | ||
p6eval | rakudo 0f9703: OUTPUT«No such method 'length' for invocant of type 'Str' in block at /tmp/Kpe6p2qY87:1» | ||
moritz | TimToady: known bug | ||
TimToady | r: use MONKEY_TYPING; augment class Cool { method length() { die (Bool.pick ?? "Too long" !! "Not long enough") } }; 'hello'.length | ||
p6eval | rakudo 0f9703: OUTPUT«No such method 'length' for invocant of type 'Str' in block at /tmp/I89Oi2z18o:1» | ||
TimToady | mkay | 18:43 | |
moritz | basically adding methods to a class after compose time doesn't propagate them down the inheritance chain | ||
jnthn | TimToady: 'cus it ain't smart enough to invalidate the method caches of its subclasses yet. | ||
timotimo | r | ||
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. | ||
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 | ||
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. | ||
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. | ||
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
thou left
|
|||
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 | ||
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 | ||
[Coke] | r: say Array.^parents>>.^parents; | ||
18:50
census joined
|
|||
p6eval | rakudo 0f9703: OUTPUT«(timeout)» | 18:50 | |
skids | .oO("all lengths expressed in kellicams") |
||
jnthn | Anyway, it's on my todo list. Like too much else... | ||
[Coke] | skids: yIDoghQo' | ||
18:52
bbkr left
|
|||
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» | ||
uvtc | Oh, I thought I'd read that had been added. | ||
[Coke] | r: "expr 3*8 | ||
p6eval | rakudo 0f9703: OUTPUT«===SORRY!===Unable to parse expression in double quotes; couldn't find final '"'at /tmp/WIL_vNlrF_:1------> "expr 3*8⏏<EOL> expecting any of: statement list prefix or term prefix or meta-prefix … | ||
[Coke] | r: "expr 3*8".tclc.say | ||
p6eval | rakudo 0f9703: OUTPUT«Expr 3*8» | ||
[Coke] | awwww, that's not a tcl compiler. | 18:54 | |
uvtc | r: say "hi there".tclc # No "Hi There"? | ||
p6eval | rakudo 0f9703: OUTPUT«Hi there» | ||
18:55
SamuraiJack_ left
|
|||
uvtc | Oh well, I see .tc documented in S32>>Str. Maybe will see it soon. | 18:56 | |
colomon | rn: say "hello".tc | ||
p6eval | niecza v24-24-gbdc3343: OUTPUT«Hello» | ||
..rakudo 0f9703: OUTPUT«No such method 'tc' for invocant of type 'Str' in block at /tmp/O1cnhTrHUm:1» | |||
dalek | rl6-roast-data: f6f59b8 | coke++ | / (3 files): today (automated commit) |
||
uvtc | Newman! | ||
colomon | rn: say "hello world".tclc | ||
p6eval | rakudo 0f9703, niecza v24-24-gbdc3343: OUTPUT«Hello world» | ||
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» | ||
..niecza v24-24-gbdc3343: OUTPUT«Hello world» | |||
colomon | yeah, I thought I remembered something dodgy about all that... | ||
colomon is probably to blame | |||
uvtc | colomon: did you hear about the world series? | 18:58 | |
colomon: turns out it diverges! | |||
colomon | uvtc: no, .... argh, that's terrible | 18:59 | |
uvtc | hhahaha | ||
uvtc wanted to cheer colomon after he wrote "colomon is prob to blame" :) | 19:01 | ||
colomon | uvtc++ | ||
TimToady | but baseball doesn't have cheerleaders | ||
well, maybe in college baseball | 19:02 | ||
uvtc | Somewhere there's a joke about quarterbacks and π/2 that would fit here... | 19:03 | |
colomon | quarterbacks would never eat half a pie, that's more of an offensive lineman kind of thing. | 19:04 | |
19:07
sqirrel left
|
|||
TimToady | I dunno, some linemen are pretty defensive about that | 19:08 | |
uvtc | Ok, now you *both* get this :) www.youtube.com/watch?v=n6hOBVaMGFI | 19:09 | |
moritz | www.perlmonks.org/?node_id=1020582 | 19:12 | |
19:13
GlitchMr joined
|
|||
uvtc is looking forward to trying out Perl 6 + GTK at some point. | 19:13 | ||
arnsholt | uvtc: If you start hacking on a GTK wrapper, I'd be happy to help with any NativeCall problems =) | 19:14 | |
19:15
rindolf joined
|
|||
rindolf | Hi all. | 19:16 | |
TimToady: here? | |||
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 | ||
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 | ||
NativeCall is zavolaj (because reasons) | |||
nwc10 | jnthn: pasta.test-smoke.org/449 -- breaks on my machine :-( Sorry to saddle you with this problem. | ||
arnsholt | The module is called NativeCall, but the repo is jnthn/zavolaj | ||
colomon | uvtc: Niecza + GTK works fine today. | ||
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:18 | |
dalek | p: fd6f6b4 | jnthn++ | / (4 files): First round of compilation stage refactoring. This separates the backend-independent stages from the backend-specific stages. The methods that relate to a backend's stages move into the Backend class. A new :from(...) parameter to .compile enables various places that did their own stage visiting, because they had a non-source start point, to just use .compile instead, which is a pleasant cleanup. Additionally, stage names are now properly validated. |
19:19 | |
19:19
domidumont left
|
|||
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. | ||
nwc10 | aha | 19:20 | |
arnsholt | uvtc: In the sense that it's only implemented in NQP-on-Parrot, yeah | ||
moritz | but it doesn't ues parrot's NCI mechanism | ||
arnsholt | The basic architecture should be more general though, but noone's really tried to implement it anywhere else | ||
uvtc | arnsholt: Personally, I don't find that to be a problem. I like Parrot, from a user's point of view. | ||
19:21
lichtkind_ left
|
|||
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 | |
Oops. arnsholt ^^ | |||
jnthn | General warning: what I just did in NQP requires Rakudo updates before Rakudo will work against NQP HEAD. I'll get there soon. | ||
uvtc | jnthn++ ! | ||
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 =) | ||
But IIRC most of the #parrot discussions about the NCI has been how to throw out all that code, I think | 19:24 | ||
uvtc | Oh. Does NativeCall obviate the need for Parrot's NCI? | 19:26 | |
arnsholt | As far as Rakudo and NQP is concerned, I pretty much think so, yeah | 19:27 | |
jnthn | Aye, that's pretty much it :) | 19:28 | |
19:34
lichtkind_ joined
19:37
benabik joined
19:38
kaare_ joined
19:40
fhelmberger left
|
|||
GlitchMr | > 2.WHERE | 19:51 | |
-4591501378423672890 | |||
Just wondering, is WHERE supposed to be negative? | |||
rn: say 2.WHERE | |||
p6eval | rakudo 0f9703: OUTPUT«74101107» | ||
..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/… | |||
jnthn | GlitchMr: Looks like an unsigned thing getting treated as signed. | 19:52 | |
GlitchMr | That makes sense. | 19:53 | |
I have lots of memory. | |||
And swap memory that is never used... | |||
dalek | p: 018ca15 | jnthn++ | src/HLL/Compiler.pm: Fix some thinkos. |
||
p: e557b41 | jnthn++ | src/HLL/Compiler.pm: Add a way to get/set the current backend. |
|||
p: 12de2c1 | jnthn++ | src/HLL/Compiler.pm: Punt "is it precomp"/"is it textual" to backend. |
|||
19:55
stevan_ left,
stevan_ joined
|
|||
dalek | kudo/nom: b10e2ba | jnthn++ | / (3 files): Updates to work with latest HLL::Compiler. Makes things a little cleaner, by not coupling to the backend stages at all. Should cut out one bit of what the --target=pbc support had to update. |
20:09 | |
uvtc | Is NativeCall (Zavolaj) primarily for C-library interop, or are there other compiled libraries with which it allows you to interoperate? | 20:10 | |
Whoops. N/m. Found S21. | 20:12 | ||
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. | ||
TimToady | perhaps we could get them to rename C to Native | ||
GlitchMr | CeeCall? | 20:15 | |
TimToady | it's not normal on a JVM :) | ||
it's not normal on a Symbolics machine... | |||
if it's calling by C conventions, it should really name C somehow | |||
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". | ||
GlitchMr | Should it be even called NativeCall? | 20:17 | |
20:17
bluescreen10 left
|
|||
GlitchMr | Interop is nice, but definitely not compatible between implementations. | 20:17 | |
20:17
bluescreen10 joined
|
|||
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. | ||
uvtc | SeaCall, SeeCall (See Jane. See Jane run. See Jane call C-libraries.) | 20:18 | |
TimToady | cc señor | ||
uvtc | hehe | ||
GlitchMr | The problem is that NativeCall claims to be portable when it isn't. | 20:19 | |
It should be CeeCall, or NativeCall(:lang<C>) or something. | |||
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,
census_ left,
census_ joined
20:21
census_ left,
census_ joined,
census_ left,
bruges left,
census_ joined,
census_ left
20:22
census_ joined,
census_ left
|
|||
GlitchMr | Also, remember the language could support more than one sort of native call. | 20:22 | |
20:22
census left
|
|||
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. | ||
jnthn | .oO( gee, you spend ages building people a nice library and all they do is whine about the darn name... ) |
||
skids | haha | ||
jnthn++ | |||
20:23
bruges joined
|
|||
GlitchMr | Don't people whine about graphics editor called GIMP because of its name? | 20:24 | |
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 | ||
TimToady | and anyway, there's supposed to be a syntax for importing from other languages that is none of these | ||
see S11 | |||
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). | ||
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. | ||
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 | ||
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. | ||
uvtc | jnthn: (I'm clearly out of my depth here, but) would I then use NativeCall to call libs written in, say, Go? | ||
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 | ||
GlitchMr | Hmmm, but skids argument makes sense. GNU compiler collection can compile to lots of languages. | 20:30 | |
Most of them are already supported by NativeCall. | |||
Like Fortran. | |||
jnthn | uvtc: Only if it produces things that match the ABI, which I think in the case of Go it does not. | ||
GlitchMr | compile lots of languages* | ||
TimToady | the fact that the C ecosystem of usually "native" is not guarateed to hold in the future | ||
s/of/is/ | 20:31 | ||
uvtc | jnthn: thanks. | ||
TimToady | anyway, "Native" is a bad name for an ABI | ||
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. | ||
GlitchMr | What about renaming NativeCall to FortranCall? | 20:32 | |
uvtc | IndigenousCall /ducks :) | ||
GlitchMr | But seriously, what about ExternalCall? | 20:33 | |
TimToady | GlitchMr: you have no idea what is external | 20:34 | |
GlitchMr | Probably. | ||
skids | external could mean many things. | ||
TimToady | what if you're running in GoLand? | ||
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 | ||
you're only hosed if there are two different Java's with different conventions | |||
skids | But simply saying "C" doesn't convey "load a dl" versus, say, "interpret a C source file live" | 20:37 | |
diakopter | CABICall | 20:38 | |
(as a backend for NativeCall) | |||
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". :) | ||
TimToady | it comes back to pattern matching with sufficent specificity/genericity to do what you want | 20:40 | |
which we already have to worry about with 'use' statements | |||
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. | |||
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 | |
skids: the question is who's to be master, that's all --Humpty Dumpty | |||
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 | ||
timotimo | you may be mast, but there's always someone master than you! | 20:44 | |
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? | ||
TimToady | (if we can't deduce the signature from the use itself) | ||
jnthn | timotimo: yes, the commit I did to Rakudo a moment ago shoulda done that | 20:47 | |
timotimo | great, thanks :) | 20:48 | |
timotimo wants to catch up to recent developments | |||
nwc10 | jnthn: Rakudo builds and passes tests on my machine | ||
20:51
bluescreen10 left
20:59
domidumont joined
|
|||
dalek | p-jvm-prep: a04e5a6 | jnthn++ | nqp-jvm-cc.nqp: Use new backend API to make cross-comp less hacky. This gets things working with the latest NQP; it also requires the latest NQP. |
21:04 | |
jnthn | nwc10: That should unbust stuff :) | 21:05 | |
nwc10 | yes, just grabbed it | ||
I can report that it was bust before :-) | |||
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? | ||
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? | ||
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:08 | |
timotimo: Probably nothing more than a make clean | 21:09 | ||
uvtc: JDK 7 | 21:11 | ||
uvtc | jnthn: thanks | ||
21:13
jac50 left
|
|||
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 | |
make clean didn't change anything. strange. | |||
maybe i have to git clean something something | |||
Use of uninitialized value $with_parrot in concatenation (.) or string at tools/lib/NQP/Configure.pm line 293. - whoops? | 21:15 | ||
nwc10 | jnthn: unbust | ||
timotimo | oh, it was probably a configure.pl that needed executing or something like that. | ||
(at least for nqp) | 21:16 | ||
jnthn | nwc10: yay | ||
TimToady | jnthn: I'm fine with that for now | 21:17 | |
and I do appreciate having NativeCall available :) | 21:19 | ||
timotimo | is $𝕔 something in perl6, but not in nqp? | 21:25 | |
hm, ¢? | |||
.u 𝕔¢ | |||
phenny | U+1D554 MATHEMATICAL DOUBLE-STRUCK SMALL C (𝕔) | ||
U+00A2 CENT SIGN (¢) | |||
21:29
domidumont left
|
|||
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:36 | |
uvtc | So, I'd like to understand lists/arrays/parcels in Perl 6. The first thing that gets me off-balance is: | 21:37 | |
r: my @a = ('foo', 'bar', 'baz'); say @a.WHAT | |||
p6eval | rakudo b10e2b: OUTPUT«(Array)» | ||
uvtc | r: my @a = ['foo', 'bar', 'baz']; say @a.WHAT | ||
p6eval | rakudo b10e2b: OUTPUT«(Array)» | ||
uvtc | If the brackets don't get me an array ref, what do they do in Perl 6? | 21:38 | |
21:38
am0c left
|
|||
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")» | ||
uvtc | r: my $x = ['foo', 'bar', 'baz']; say @x.WHAT | ||
p6eval | rakudo b10e2b: OUTPUT«===SORRY!===Variable '@x' is not declared. Did you mean '$x'?at /tmp/d2EFe9SPFA:1------> $x = ['foo', 'bar', 'baz']; say @x.WHAT⏏<EOL> expecting any of: method arguments postfix» | ||
uvtc | r: my $x = ['foo', 'bar', 'baz']; say $x.WHAT | ||
p6eval | rakudo b10e2b: OUTPUT«(Array)» | ||
timotimo | r: my @a = ['foo', 'bar', 'baz'], ['quux', 'fuux']; say @a.perl; | ||
p6eval | rakudo b10e2b: OUTPUT«Array.new(["foo", "bar", "baz"], ["quux", "fuux"])» | 21:39 | |
jnthn | r: my @a = ['foo', 'bar', 'baz']; say @a.perl | ||
p6eval | rakudo b10e2b: OUTPUT«Array.new(["foo", "bar", "baz"])» | ||
jnthn | = is doing assignment *into* the array @a | ||
And you put assigned a single arrayref into @a | |||
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. | ||
p6eval | rakudo b10e2b: OUTPUT«Array.new("foo", "bar", "baz")» | ||
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 | ||
indeed, those parens are not syntax for something. it's just the , operator doing its thing | 21:43 | ||
that's why (1, 2, 3), (4, 5) doesn't give you an array with two arrays in it | |||
uvtc | timotimo: I don't know what .item means. | ||
skids | r: my @a = ("foo", "bar", "baz").item; say @a.WHAT; say @a.perl; | ||
p6eval | rakudo b10e2b: OUTPUT«(Array)Array.new($("foo", "bar", "baz"))» | ||
timotimo | oh, it basically means "don't flatten me ,please" | 21:44 | |
21:44
labster joined
|
|||
timotimo | whoops, not the same thing! | 21:44 | |
i'm glad i said "a bit like" and not "exactly like" | |||
skids | r: my @a = ("foo", "bar", "baz").item; say @a[0].WHAT; | 21:45 | |
p6eval | rakudo b10e2b: OUTPUT«(Parcel)» | ||
timotimo | rakudo: say [1,2] X~ <a b> # this is a very old bug. wonder how come it's not fixed yet?! | ||
p6eval | rakudo b10e2b: OUTPUT«1a 1b 2a 2b» | ||
21:45
PacoAir left
|
|||
timotimo | rt.perl.org/rt3/Ticket/Display.html?id=74072 - this being the bug in question | 21:46 | |
21:46
rindolf left
|
|||
uvtc | r: my @should-not-flatten = 'foo', ['bar', 'baz'], 'moo'; say @should-not-flatten | 21:49 | |
p6eval | rakudo b10e2b: OUTPUT«foo bar baz moo» | ||
uvtc | It flattened though. | 21:50 | |
skids | no, it say'd. | ||
21:50
PacoAir joined
|
|||
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")» | ||
uvtc | Ah. I see. `say` is being tricksy with me. :) | 21:52 | |
21:53
SmokeMachine left
|
|||
dalek | ast: 906a054 | (Timo Paulssen)++ | S02-types/subset.t: test for #74352 |
21:53 | |
timotimo | one more obsolete bug resolved | 21:54 | |
uvtc | thanks, skids . | ||
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:56 | ||
[Coke] wonders if there is a place to read about list, flattening etc. yet? | 21:57 | ||
uvtc | [Coke]: well, I'm working on writing up some "baby Perl 6" notes on it: www.unexpected-vortices.com/perl-6/...lists.html , but I need to learn it first. :) | 21:59 | |
21:59
drKreso joined
|
|||
timotimo | r: class Foo { method bar { Quux.parse('OH HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar; | 22:00 | |
p6eval | rakudo b10e2b: OUTPUT«===SORRY!===Illegally post-declared type: Quux used at line 1» | ||
timotimo | r: eval q{class Foo { method bar { Quux.parse('OH HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar;} | ||
p6eval | rakudo b10e2b: OUTPUT«===SORRY!===Illegally post-declared type: Quux used at line 1» | ||
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«===SORRY!===Illegally post-declared type: Quux used at line 1» | ||
timotimo | r: try eval q{class Foo { method bar { Quux.parse('OH HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar;}; say $!.WHAT | ||
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»… | ||
timotimo | what am i doing wrong? | ||
it seemed like $! was Nil after that | |||
22:02
kaare_ left
|
|||
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」» | ||
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. | ||
skids | Oh! | ||
:-) | |||
22:04
lustlife left
22:07
leprevost left
22:08
drKreso left
22:09
wk left
22:10
PacoAir left
|
|||
timotimo | my Hash $x; $x[1] = 5; # is this supposed to blow up in this way? | 22:13 | |
22:13
skids left,
FROGGS left
|
|||
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:15
fgomez left
|
|||
timotimo | try eval ...; say $!.WHAT should be the right way, no? | 22:16 | |
r: try eval q{say $undef}; say $!.WHAT; | |||
p6eval | rakudo b10e2b: OUTPUT«(X::Undeclared)» | ||
timotimo | r: try eval q{my $undef = 5; my $undef = 10;}; say $!.WHAT; | ||
p6eval | rakudo b10e2b: OUTPUT«Potential difficulties: Redeclaration of symbol $undef at eval_0:1 ------> my $undef = 5; my $undef ⏏= 10;(Any)» | ||
timotimo | std: say <1 2 3>.>>.perl | 22:19 | |
p6eval | std 52fe6d2: OUTPUT«ok 00:00 42m» | ||
22:21
toebu joined
|
|||
[Coke] | timotimo: what what would expect that to blow up? | 22:22 | |
r: my Hash $x $x<1> = 5; | |||
p6eval | rakudo b10e2b: OUTPUT«===SORRY!===Two terms in a rowat /tmp/HkGEBiBvy2:1------> my Hash $x ⏏$x<1> = 5; expecting any of: scoped declarator constraint postfix infix or meta-infix infix stopper sta… | ||
[Coke] | r: my Hash $x; $x<1> = 5; | ||
p6eval | rakudo b10e2b: ( no output ) | ||
22:23
stevan__ joined
|
|||
timotimo | huh? | 22:25 | |
22:26
stevan_ left,
Entonian joined
|
|||
timotimo | anyway, i think i'll go to bed now :) | 22:27 | |
benabik | $x[] autovivs a array, $x{} autovivs a hash | ||
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:29 | |
22:31
fgomez joined
22:32
Entonian left
22:34
xinming_ left
22:35
xinming joined
22:58
uvtc left
23:13
fgomez left
23:16
Liz_ joined
23:17
Liz_ is now known as lizmat
|
|||
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"))» | ||
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")))» | ||
TimToady | that's not right | ||
.tree is supposed to recurse, not pretend to be .lol | 23:24 | ||
well, I guess the spec defaults it to 1 level | 23:25 | ||
r: say (<a b c>, (<d e f>, <g h i>)).tree(2).perl | |||
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 | ||
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» | ||
TimToady | r: say (<a b c>, (<d e f>, <g h i>)).tree(*.Array).perl | ||
p6eval | rakudo b10e2b: OUTPUT«(["a", "b", "c"], ["d", "e", "f", "g", "h", "i"]).list» | ||
23:27
benabik left
|
|||
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… | ||
TimToady | r: say (<a b c>, (<d e f>, <g h i>)).tree(*.Array, *.Array).perl | ||
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» | ||
TimToady | I guess it's still partly NYI | 23:28 | |
23:36
fgomez joined
23:42
spider-mario left
23:46
skids joined
23:48
_daniel-s__ joined
23:51
daniel-s__ left
|
|||
dalek | ecs: 12b6d9f | diakopter++ | S04-control.pod: typo in S04 |
23:57 |