»ö« 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:01 [particle]1 joined 00:02 [particle] left 00:03 Limbic_Region joined
TimToady starcoder: googletown 00:10
starcoder lol
TimToady: NEIN
00:18 dayangkun left 00:32 cognominal left 00:33 cognominal joined 00:41 lichtkind joined 00:42 colomon joined, risou joined
Tene I didn't feel it, but I think I was napping at the time. 00:46
00:49 wooden joined 01:08 woosley joined, Moukeddar left 01:09 cdarroch left 01:20 [particle]1 left 01:25 whiteknight left 01:44 risou_ joined 01:47 risou left 01:49 rdesfo joined 02:01 ymasory_ joined 02:03 Lorn left 02:07 Lorn joined
starcoder perl6: nein; 02:10
lol
p6eval: nein;
p6eval pugs: OUTPUT«*** No such subroutine: "&nein"␤ at /tmp/ZxTXVypWbz line 1, column 1-5␤»
..rakudo 887bb5: OUTPUT«Could not find sub &nein␤ in main program body at line 22:/tmp/i4ytm9Prur␤»
..niecza v4-66-g11b04b4: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'nein' used at line Any()1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 388 (CORE die @ 2)␤ at /home/p6eval/niecza/src/STD.pm6 line 1141 (STD P6.comp_unit @ 75)␤ at
../home/p6eval/niecza…
starcoder :|
p6eval: rakudo: nein; 02:11
p6eval starcoder: rakudo 887bb5: OUTPUT«Could not find sub &nein␤ in main program body at line 22:/tmp/yLUvwv5sic␤»
starcoder lol
02:12 Tedd1 left, Tedd1 joined 02:15 cognominal left 02:18 rdesfo left
starcoder p6eval: say foo; 02:21
p6eval: rakudo: say 'foo;
p6eval: rakudo: say 'foo';
p6eval starcoder: rakudo 887bb5: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'foo;"␤»
starcoder: rakudo 887bb5: OUTPUT«foo␤»
starcoder p6eval: rakudo: for (1..3) { say 'foo' } 02:22
p6eval starcoder: rakudo 887bb5: OUTPUT«foo␤foo␤foo␤» 02:23
starcoder heh
02:24 cognominal joined 02:27 nymacro joined 02:35 mtk left 02:39 Alias_ joined 02:41 mtk joined 02:42 Alias left 02:48 mfollett joined
mfollett moritz: Are you around? 02:49
02:51 tyatpi joined 02:57 [particle] joined 03:03 ymasory_ left 03:07 hudnix left 03:26 lichtkind left 03:27 Limbic_Region left 03:34 tyatpi left 03:37 shachaf joined 03:45 cheenomatic joined 03:47 molaf joined 03:55 satyavvd joined 04:02 ymasory left 04:17 araujo left 04:18 orafu left, orafu joined 04:21 araujo joined 04:32 molaf left 04:43 Alias joined, araujo left 04:45 Alias_ left 04:48 donri joined 04:50 birdwindupbird joined 04:56 Alias left 04:57 cheenomatic left 04:59 agentzh joined 05:01 risou_ left, araujo joined 05:19 yves_ left 05:20 sivoais joined 05:29 yves_ joined 05:37 Zapelius_ left 05:40 yves_ left 05:42 yves_ joined 05:47 mberends left 05:48 wtw joined 05:49 mfollett left 05:56 birdwindupbird left 05:57 birdwindupbird joined
moritz good morning 05:59
06:06 stkowski left
birdwindupbird moritz: good morning! 06:09
06:10 wooden left 06:13 kjeldahl joined
woosley \o, good afternoon^^ 06:19
miso2217_ morning o/ 06:32
tadzik good morning 06:42
06:58 justatheory left
woosley std: {sub f(){}} f(); 06:58
p6eval std 3468e14: OUTPUT«===SORRY!===␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/sCiXIMzUQl line 1:␤------> {sub f(){}}⏏ f();␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Other
..potential difficult…
woosley std: {sub f(){}}; f(); 06:59
p6eval std 3468e14: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'f' used at line 1␤Potential difficulties:␤ &f is declared but not used at /tmp/SsbR54oiqK line 1:␤------> {sub f⏏(){}}; f();␤Check failed␤FAILED 00:01 120m␤»
06:59 cosimo joined
woosley perl6: {sub x{say "x"}}; x(); 07:00
p6eval pugs: OUTPUT«x␤»
..rakudo 887bb5: OUTPUT«Could not find sub &x␤ in main program body at line 22:/tmp/JhKnxG_zqa␤»
..niecza v4-66-g11b04b4: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'x' used at line Any()1␤␤Potential difficulties:␤ &x is declared but not used at /tmp/xC72mFSDs1 line 1:␤------> {sub x⏏{say "x"}}; x();␤␤Unhandled exception: Check failed␤␤ at
../home/p6eval/niecza/boot/lib/CO…
woosley std: {sub x{say "x"}}; x(); 07:01
p6eval std 3468e14: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'x' used at line 1␤Potential difficulties:␤ &x is declared but not used at /tmp/HcINxqh5tH line 1:␤------> {sub x⏏{say "x"}}; x();␤Check failed␤FAILED 00:01 119m␤»
sorear woosley: subs are lexically scoped
woosley it is different from perl5 07:02
07:09 wtw left 07:13 bacek joined
moritz you can get the old behavior with 'our sub x { ... }' 07:19
07:21 kst left
jnthn morning o/ 07:21
moritz \o 07:22
moritz just found a cool open source project he might be able to use for $work
optilux.sourceforge.net/
07:23 mj41 joined
moritz ever wanted to simulate a coherent optical communication system? :-) 07:23
jnthn Oddly, I've never felt a need to do that.
Maybe I'm just uncultured. :) 07:24
07:29 cognominal left
moritz jnthn: it's the beard :-) 07:30
07:31 cognominal joined
jnthn :P 07:32
07:35 Mowah joined 07:39 __rnddim__ joined 07:43 wtw joined 07:44 colomon_ joined 07:45 cosimo left, colomon left, s1n left, lue left, colomon_ is now known as colomon 07:52 s1n joined 08:01 kjeldahl left, kjeldahl joined 08:05 Axius joined, domidumont left, domidumont joined 08:07 JimmyZ joined 08:24 dakkar joined
miso2217 hello, is there some documentation on error reporting for perl6 grammars? I found only the paragraph on the ~ in S05 but there must be more options available. Any pointers? 08:30
moritz miso2217: STD.pm6 has lots of examples 08:31
miso2217 git clonned sdt, thx 08:34
08:44 JimmyZ left 08:50 s1n left 09:03 s1n joined
dalek href="https://modules.perl6.org:">modules.perl6.org: 3d9c018 | tadzik++ | web/build-project-list.pl:
Add README.mkd to a readme detection (fixes Text-Tabs-Wrap and possibly some others
09:04
09:05 fhelmberger joined
flussence :D 09:05
09:19 Rotwang joined
woosley perl6: sub f{ return sub {say @_}}; my $a = f(1); $a.(1); 09:19
p6eval pugs, niecza v4-66-g11b04b4: OUTPUT«1␤»
..rakudo 887bb5: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in 'f' at line 1:/tmp/m410tbtu0Z␤ in main program body at line 22:/tmp/m410tbtu0Z␤»
woosley rakudo: sub f{ return sub {say @_}}; my $a = f(); $a.(1); 09:20
p6eval rakudo 887bb5: OUTPUT«1␤»
moritz woosley: you should really start to use whitespaces before parens/brackets 09:21
jnthn agrees with Rakudo here - the @_ that gives an inner sub a *@_ signature shouldn't really be giving the outer sub one also.
moritz woosley: otherwise there'll be cases where it's misparsed as a postcircumfix, and you'll spend hours searching for it
09:22 Axius left
woosley perl6: sub f { say @_; return sub { say 1 }}; my $a = f(1); say $a.(1); 09:32
p6eval niecza v4-66-g11b04b4: OUTPUT«1␤1␤Bool::True␤»
..pugs: OUTPUT«1␤1␤1␤»
..rakudo 887bb5: OUTPUT«1␤Too many positional parameters passed; got 1 but expected 0␤ in <anon> at line 22:/tmp/5vNTyYQlQr␤ in main program body at line 22:/tmp/5vNTyYQlQr␤»
jnthn niecza: sub f { }; sub g() { }; f(1,2,3); g(1,2,3); 09:33
p6eval niecza v4-66-g11b04b4: OUTPUT«Unhandled exception: Excess arguments to MAIN f, used 1 of 3 positionals␤ at /tmp/l8s0sR2At9 line 0 (MAIN f @ 0)␤ at /tmp/l8s0sR2At9 line 1 (MAIN mainline @ 1)␤ at /home/p6eval/niecza/lib/CORE.setting line 1311 (CORE C552_ANON @ 2)␤ at
../home/p6eval/niecza/lib/CORE.setting line …
jnthn pugs: sub f { }; sub g() { }; f(1,2,3); g(1,2,3);
p6eval pugs: OUTPUT«*** No compatible multi variant found: "&g"␤ at /tmp/6zLz6w4d2o line 1, column 35-43␤»
jnthn Ah, so Pugs dates back to when no signature != empty signature. 09:34
moritz niecza: sub f { say @_; return sub () { say 1 }}; my $a = f(1); say $a.(1);
p6eval niecza v4-66-g11b04b4: OUTPUT«1␤Unhandled exception: Excess arguments to MAIN C2_ANON, used 0 of 1 positionals␤ at /tmp/8Fo0WuOIfM line 0 (MAIN C2_ANON @ 0)␤ at /tmp/8Fo0WuOIfM line 1 (MAIN mainline @ 3)␤ at /home/p6eval/niecza/lib/CORE.setting line 1311 (CORE C552_ANON @ 2)␤ at
../home/p6eval/niecza/lib/CORE…
moritz jnthn: back then, empty signature was (*@_, *%_)
jnthn moritz: *nod*
moritz now it only includes @_ or %_ if it's mentioned in the routine body 09:35
jnthn aye
woosley moritz: I think rakudo should be smart enough, requiring a space before brace dosen't sound reasonable to me
moritz agress with rakudo and jnthn too btw 09:36
woosley: it doesn't require it in that case, but there are a lot of other cases where there might be an ambiguty
woosley: which is why it's a good habit to put spaces between identifiers and punctuation whenever that is allowed
rakudo: say 1 < 2 09:37
p6eval rakudo 887bb5: OUTPUT«Bool::True␤»
moritz rakudo: say 1<2
p6eval rakudo 887bb5: OUTPUT«Bool::True␤»
moritz huh?
std: say 1<2
p6eval std 3468e14: OUTPUT«===SORRY!===␤Whitespace required before < operator at /tmp/OVg08EZicz line 1:␤------> say 1<⏏2␤ expecting escape␤Parse failed␤FAILED 00:01 119m␤»
moritz rakudo is even too permissive :-)
jnthn Think Rakudo is less strict than STD still.
woosley \o
moritz 1<2 should be parsed as the beginning of 1<2>, which is a valid subscript
09:38 PZt left
woosley so, basically, in perl6, no signature means empty sigature? 09:42
moritz no 09:43
11:35 < moritz> now it only includes @_ or %_ if it's mentioned in the routine body
see S06 for details
woosley rakudo: sub f { say @_, return sub { say @_ }}; my $a = f(1); say $a.(1); 09:48
p6eval rakudo 887bb5: OUTPUT«1␤Bool::True␤»
woosley :-D
oh, no, it dosen't print the @_ in sub f{} 09:56
rakudo: sub f { say @_, return sub { say 5, @_}}; my $a = f(1); $a.(1,2,4); 09:57
p6eval rakudo 887bb5: OUTPUT«5124␤»
woosley rakudo: sub f { say 5, @_; return sub { say @_}}; my $a = f(1); $a.(1,2,3);
p6eval rakudo 887bb5: OUTPUT«51␤123␤»
woosley O:-) 09:58
10:02 woosley left
tadzik flussence: btw, why isn't that Text::Tabs::Wrap? 10:17
10:20 mtk left
flussence historical reasons, I think. 10:22
and I didn't want to change it because they're 2 separate modules and it doesn't quite look right
10:25 Rotwang left, MayDaniel joined 10:26 pmurias joined 10:27 kjeldahl left
pmurias what's the state of editor/ide support for writting Perl6? 10:27
10:28 mtk joined
moritz perl6.vim is decent 10:29
flussence vim-perl supports perl6 about as well as rakudo itself, I'd say
moritz padre is supposed to work too
flussence (it works, but it's glacially slow sometimes :)
(to be fair vimscript isn't exactly optimised for speed... or readability) 10:30
arnsholt It's when I contemplate vimscript I really want to get my CL-vimlike project off the ground 10:32
pmurias CL-vimlike being vim in commmon lisp? 10:33
arnsholt Something like that, yeah
10:33 MayDaniel left
arnsholt It's not exactly a fully thought-out idea, but a vim (or similar) programmable in a less insane language would be cool 10:34
pmurias moritz: perl6.vim only provides syntax highlighting
arnsholt: vim can be compiled to embed perl
arnsholt Yeah, I should probably look into that first =) 10:35
10:41 kjeldahl joined
miso2217 pmurias: I have pre-alfa perl6 highlighting definition file for kate 10:47
10:55 coldhead left
tadzik oh, Text::Tabs and Text::Wrap, I see 11:05
11:15 agentzh left 11:19 kjeldahl left
dalek ecza: 1f44650 | pmurias++ | hoopl/ (4 files):
[hoopl] added a dead register store elimination pass
11:23
11:36 pernatiy left 11:54 barika left, hatseflats left, revdiablo left, eternaleye left, szbalint left
colomon o/ 11:54
phenny colomon: 17 Apr 19:09Z <tadzik> tell colomon IO::Prompter's META.info has a missing dep (Testing), mind adding it?
11:54 Patterner left 11:56 Psyche^ joined, Psyche^ is now known as Patterner
colomon tadzik: done 11:57
tadzik thanks
11:58 szbalint joined
jnthn o/ colomon 11:59
colomon jnthn! \o/
moritz ~~o/\o~~ 12:00
12:00 kjeldahl joined, shi joined, barika joined, hatseflats joined, revdiablo joined, eternaleye joined
colomon how are things going? I spent the last five days at Ambercon, and while I had #perl6 open, I almost completely ignored it. :) 12:00
12:00 kjeldahl left, kjeldahl joined
jnthn colomon: I've been busy but my tuit supply is recovering. 12:01
Curerntly I have all Thursday just for Perl 6. :) And some time over Easter break. :)
colomon \o/
12:01 hudnix joined
jnthn Was in Taiwan, then rescuing a project that got messed up, then teaching... :) 12:02
12:03 satyavvd left 12:05 meswami joined 12:11 meswami left 12:25 PZt joined 12:26 meswami joined 12:28 shi left 12:32 pernatiy joined 12:37 shi joined
pmichaud good morning, #perl6 12:47
moritz \o pmichaud
tadzik hello pmichaud 12:48
jnthn o/ pmichaud 12:49
12:50 Holy_Cow joined 13:03 kaare_ left 13:05 Axius joined 13:06 meswami left
colomon pmichaud! \o/ 13:07
13:19 am0c joined
PerlJam greetings #perl6 13:33
tadzik greetings 13:34
colomon \o 13:35
moritz wow, we're ultra polite, spent the last 3/4 hour just with greetings :-) 13:36
pmichaud buzz off.
(is that better?)
BinGOs Like the Waltons on Acid.
moritz now we're at least meta-discussing. That's better :-) 13:37
13:37 Moukeddar joined
mathw is a Walton :) 13:38
moritz :-)
13:38 nadim left
jnthn mathw: But are you on acid? 13:38
mathw No
13:38 kaare__ joined
mathw I'm on Java today, but it's not like acid 13:38
I don't hallucinate, I get angry instead
Moukeddar lol 13:39
and you pull your hair
mathw Although I may have had a minor hallucination earlier when I thought my code actually worked
pmichaud I'm frequently on carbonic acid -- does that count?
moritz mathw: sulphuric asid would have the same effect - like acid :-)
*acid
Moukeddar hate the java JAR thingy
mathw Moukeddar: I can't pull my hair at the moment, I had it neatened up for a wedding and there's not enough of it to grip :(
13:39 JimmyZ_ joined
mathw Moukeddar: I hate a lot of things about Java. I'm well-known among my colleagues for it. Still have to do the occasional bit of Java coding though. 13:40
Moukeddar hehe
occasional
i delivered my java homework in C#
and the teacher laughed his ars out 13:41
mathw That's a strange kind of Java homework
C# is preferable to Java though
Moukeddar i love C#
mathw I can tolerate it
It's got some nice bits
Moukeddar exactly
you code with style
jnthn I much prefer C# to Java. You can actually do higher order programming... :)
Moukeddar especially with LINQ :)
mathw yeah that's what I like about it
anonymous delegates
Moukeddar anonymous types 13:42
mathw wonderful, wonderful things to have around
jnthn Well, and actual syntax for lambdas.
mathw especially in a multithreaded program
Moukeddar i'm in love
mathw heh I've never used lambda syntax
last time I used C# it was 2.0
Moukeddar it's sweet
for fast functions :)
mathw but it's just sugar for anonymous delegates as I understand it
Moukeddar C# 2.0 didn't have lambda
mathw so functionality-wise I had the same stuff
Moukeddar i'm thinking about learning F# i heard good things about it 13:43
it's like a Perl for .NET
:)
13:43 hanekomu joined
pmichaud remembers when PerlJam++ turned in his COBOL assignments written in Perl :-) 13:44
Moukeddar lol 13:45
so you do it too ?
PerlJam They still teach COBOL too. 13:46
Moukeddar holy moly
really ?
pmichaud I didn't realize that. :-)
Moukeddar here they still do pascal :)
PerlJam pmichaud: Had a talk with one of my student workers about it just the other day. Binkerd is still teaching it even! 13:47
pmichaud well, I would expect it to be Binkerd or Busch, yes. :-)
PerlJam I don't think it's part of the core curriculum anymore though 13:48
Moukeddar dinosaurs :)
pmichaud they probably offer it for the CIS majors
moritz is that like C minor or something? :-) 13:49
colomon More like B major. :p 13:50
Moukeddar lol
pmichaud colomon++
Moukeddar damn it i'll have an exam in 16 subject in 8 weeks :p 13:51
13:53 mtk left
sorear good * #perl6 13:57
mathw well people still need to maintain COBOL code
so I suppose we need at least a trickle of new COBOL programmers
F# does look quite interesting, since it's a possible sign of functional paradigms getting more mainstream 13:58
13:58 mtk joined
mathw it's still not Haskell though 13:58
sorear well we need new programmers
any programmer who can't learn a new language on the job isn't worthy of the name 13:59
Moukeddar mathw, hipsters won't be happy about it :p
sorear, what if he was a student :p 14:00
?
mathw students should be learning new languages on a regular basis anyway 14:01
I always thought it was wrong that my uni had Prolog and C++ modules but they weren't compulsory
Moukeddar i find it easy to learn new stuff 14:02
programmer have different mind workflow :)
for example when i see a game or a science fiction UI
moritz mathw: making thing compulsory isn't a solution most of the time
Moukeddar all i think of is : how did they achieve that :)
PerlJam learning a language isn't so important as learning the "big concepts" that a language makes use of. 14:03
mathw moritz: I suppose not, you have to teach people why it's important too or you just get a repetition of my Functional Programming module
moritz mathw: aye. Some comparison of the strengths and weaknesses of the different paradigms might be good teaching material
Moukeddar PerlJam, that's it :) 14:04
mathw moritz: Oh, that was included, they just didn't pay attention
moritz mathw: but that would require that the teachers be well-versed in all major paradigms :-)
mathw: IME that's not always the case
mathw I think someone must've already fed most of them the Java propaganda at that point
14:04 mfollett joined, mfollett left
mathw the FP lecturer was of course well-versed in what strengths and weaknesses functional has over broken OOP 14:05
Moukeddar broken oop ?
mathw yes, the kind Java does :)
Moukeddar lol
how about C#'s
?
mathw that's also kind of broken IMO
moritz much less horrible though 14:06
pmichaud PerlJam: I disagree somewhat. I think it's important to learn at least one language very well, and _then_ look a bit more at the bigger concepts.
moritz Eiffel has quite a nice object model
pity it makes it hard to do easy things
PerlJam pmichaud: Aye, I really meant to say "learning a _new_ language" with the presumption that you know at least one
Moukeddar i'll stick with C#
and mess with perl :) 14:07
mathw There are definite advantages to knowing one language really really well
in that you can actually be very productive in it and be very useful 14:08
Moukeddar gtg
later guys
PerlJam mathw: especially if that language is Perl ;)
14:08 Moukeddar left
mathw PerlJam: not around here unfortunately - you have to be a C++ or Java expert 14:08
moritz mathw: it's also a trap. It makes it easy to say "he, I know $lang so well that it will take me far too long to learn $other_lang to the same level", and stop learning other language 14:09
mathw yes, one should ideally also be reasonably capable of using other languages 14:10
although I wouldn't expect anybody to know the libraries of more than one or two languages inside-out
14:11 sji joined, eternaleye_ joined 14:14 hatsefla1s joined, orevdiabl joined, barika_ joined 14:15 Arcus joined, justatheory joined, Moukeddar joined 14:16 shi left, eternaleye left, hatseflats left, revdiablo left, Axius left, barika left, Moukeddar left 14:18 wtw left 14:21 Arcus left 14:22 wooden joined 14:23 hillu_ is now known as hillu, am0c left 14:24 hanekomu left 14:26 pmurias left 14:36 am0c joined 14:43 icwiener joined, JimmyZ_ left 14:45 am0c left 14:54 barika_ is now known as barika, domidumont left 15:05 kjeldahl left 15:10 kjeldahl joined 15:11 pyrimidine joined 15:12 domidumont joined 15:14 ymasory joined 15:16 hercynium joined 15:24 alester joined 15:30 spq joined 15:31 donri left 15:33 eternaleye_ is now known as eternaleye, Khisanth left 15:51 Khisanth joined 16:00 Moukeddar joined 16:04 sji left 16:06 takadonet left, Moukeddar left 16:07 isBEKaml joined 16:10 mberends joined
mberends begins trying all the 2010 Perl 6 Coding Contest entries on Niecza 16:12
16:18 cdarroch joined, cdarroch left, cdarroch joined 16:23 risou joined 16:24 MayDaniel_ joined
isBEKaml (backlogging) heh, there was someone here complaining about long compilation times on a PIII? I'm on one too and I compile only once in about 6 months! :P 16:24
isBEKaml ducks
mberends isBEKaml: is that because the it takes you 5 months to compile Rakudo? 16:26
isBEKaml mberends: Possibly. Never checked! :D 16:27
16:28 Khisanth left
colomon mberends++ 16:29
isBEKaml mberends: how goes you? and, your java bytes? :) 16:30
tadzik I suppose it's just an infinite loop compiling it, and it turns out to iterate every 6 months :)
isBEKaml whoa, tadzik.. I think you're talking about core.. :) 16:31
mberends isBEKaml: low on tuits because of $work, so Java has not bytten me in the last month :( 16:32
isBEKaml mberends: Oh.. :( so, is 6model on hold?
(the jvm port) 16:33
mberends 6model/jvm is on a quantum hold, but may in fact be moving invisibly slowly ;-) 16:34
isBEKaml multistrate quantum hold! mberends++
jnthn guesses the current 6model transition to jasmin is trickyish 16:35
isBEKaml jnthn: if you're using jasmin, why not use asm?
jnthn er, 6model on jvm
mberends this may be Niecza LHF: Unable to find lexical &infix:<xor> (in p6cc2010-p2-fox.pl6)
16:35 [Coke] left
jnthn isBEKaml: Jasmin is an assembler to Java bytecode 16:36
isBEKaml jnthn: IIRC, asm has a smaller overhead than jasmin.
jnthn isBEKaml: Oh...where does one find that?
isBEKaml jnthn: I understood that.
jnthn OK, I'd never heard of this "asm" thing you speak of :)
isBEKaml jnthn: asm.ow2.org/
jnthn Ah, good to know there's another way to do it :) 16:37
isBEKaml jnthn: hmmm, I could use this as a learning exercise (beware, my code might then be sphagetti soup) :)
jnthn ooh ;)
16:37 MayDaniel_ left 16:38 [Coke] joined
isBEKaml ah, you're making me want to do it... 16:38
jnthn Commit bit? :)
isBEKaml jnthn: I have a fork of your repo lying around, I think (though I never pushed anything onto it)
I think I'll use that and see what I can come up with. 16:39
mberends isBEKaml++
16:41 donri joined
tadzik #phasers is in 2:20 hours? 16:41
moritz won't be able to attend 16:42
sorear jnthn: asm is what I'm planning to use for JNiecza
16:43 Chillance joined
sorear mberends: LHF, but less than it sounds - <xor> shortcircuits, so it has to be a macro, which means modifying the compiler since BEGIN isn't available for real macros 16:43
mberends sorear: does shortcircuit definitely imply macro? 16:44
mikemol I do not. 16:45
tadzik seen shortcircuit 16:46
aloha shortcircuit was last seen in #perl6 15 days 13 hours ago joining the channel.
sorear mberends: for loose definitions of "macro", yes. It definitely can't be a function.
mikemol is shortcircuit
Changed my nick.
16:48 pernatiy left
mberends mikemol: sorry for stomping on your ex-nick like that, in theory it could happen to anyone ;) 16:48
mikemol mberends: np. I play it for laughs.
I changed my FN nick to correspond to the username I use more widely than 'shortcircuit' or 'Short Circuit' on the Internet in general. 16:49
16:49 birdwindupbird left
isBEKaml does anybody know how I can colourise my git log? 16:49
jnthn isBEKaml: Nice :)
isBEKaml core.pager?
sorear git config --global ui.color true
er, color.ui
16:49 [Coke] left
isBEKaml sorear: heh. doesn't work on xterm. :/ 16:50
jnthn, mberends: thanks! I'm currently updating my fork to your HEAD. :) 16:51
16:51 [Coke] joined
tadzik oh, the pun 16:54
please don't commit your fork to jnthn's HEAD
mberends and don't push the fork into my HEAD 16:55
isBEKaml p6punners, EVAR! :D
16:57 mj41 left
isBEKaml mberends: You still use a makefile for compiling java classes? Ant? :O 17:03
mberends isBEKaml: I chose make because on average, it requires newbies to install fewer external dependencies. I'm quite keen to reduce toolchain requirements to the absolute minimum, because I have often felt the pain of barriers to entry. 17:05
isBEKaml mberends: I vaguely remember discussing this with you when 6model was nascent.
mberends If I could replace make with a cute bash script I would be even happier. 17:06
jnthn oh no, not a bash script...
At least I can build with the makefile. :) 17:07
isBEKaml mberends: not a problem at all, we can simply add ant.jar and wrap this into a shell script. :)
or a batch file.
mberends jnthn: oops, lol, I forgot about Our Leader's choice of OS.
17:07 Hyper-Core joined
jnthn :P 17:07
At least I keep us cross-platform. :P
isBEKaml I think I'll add that too and send a pull-request. :D 17:08
ant is under ASF license. So, I think there should be no problem distributing the binary along with the project(though I'd prefer keeping the binary jars out of the codebase, using dependency management tools instead) 17:09
mberends sounds ok
17:15 Hyper-Core left
jnthn So long as building doesn't become a pain in the jars... :) 17:16
diakopter or ass[embly] 17:21
mberends groan. groan.
17:27 kjeldahl left
isBEKaml mberends,jnthn: Do I have to get the latest parrot built to use parrot-nqp? 17:36
17:37 mj41 joined
mberends isBEKaml: not 100% sure, but it sounds dangerous not to. 17:37
17:37 dakkar left
jnthn isBEKaml: parrot-nqp ships with Parrot, and 6model's clr and jvm backends use it. 17:38
They won't work with new nqp yet.
isBEKaml ok. I'll just use what I have then.
It seems to be going through fine...
ouch. Method 'blocktype' not found for invocant of class 'Undef' 17:39
17:40 masak joined
masak ahojte, zebras. 17:40
jnthn ahoj, masak
isBEKaml: ...ouch.
isBEKaml jnthn: pastebin.com/Mvs44Lpk
sorear hello masak 17:41
isBEKaml masak!
jnthn isBEKaml: That sounds familiar-ish...it happened to me I think when a build failed, then I fixed whatever the problem was but there was a file left around.
sorear #phasers in 20?
masak ooh. sorear++ for reminding.
jnthn 80, no?
sorear Probably
jnthn has it as 80
sorear yes, 80
jnthn It woulda been 20 if daylight hadn't been saved.
sorear stupid timechange
isBEKaml jnthn++ # vague as usual. :)
jnthn isBEKaml: Are there any 0-byte files in your build directory? 17:42
masak I think daylight savings is an antiquated concept.
jnthn
.oO( why do we have to save daylight every year? hasn't it learned to save itself yet? )
isBEKaml jnthn: classes dir is empty.
sorear wonders if the European #perl6-ers just live on UTC and forget about these stupid time zones 17:43
masak anyone else using private gists as a sort of Google Docs? :)
jnthn masak: ;)
isBEKaml: iirc, you need to do make in the runtime directory, and then make afterwards in the compiler one.
masak sorear: no... here in CET, we're one hour removed in the winters, and two in the summers. :( 17:44
isBEKaml jnthn: there are no empty files in runtime but classes dir in compiler is empty.
jnthn OK
isBEKaml jnthn: find runtime -type f -empty turned nothing.
jnthn No empty .pir files in the compiler directory?
isBEKaml gen_actions.pir is empty 17:45
jnthn isBEKaml: rm it, and try make again.
isBEKaml and NQPSetting.java (but that's intentional, I guess)
jnthn: trying now.. 17:46
17:48 nymacro left
isBEKaml jnthn: I think it went through, though it wound up complaining about p6source. :D 17:49
jnthn: didn't realise this was nqp.
jnthn isBEKaml: It uses Parrot's NQP to cross-compile code to the CLR or JVM.
isBEKaml: That way, one day it'll be able to compile itself and them WORLD DOMINATION! 17:50
Er, I mean, bootstrapping...
tadzik sorear: close; I just never know what time it is, and assume it's "something around 20"
isBEKaml jnthn: pastebin.com/y73YXDFG 17:51
jnthn: nice. 6model-wtop? :) 17:52
jnthn isBEKaml: That's valid Perl 6 but not valid NQP, which is a Perl 6 subset. :)
isBEKaml jnthn: yessir. that's what I figured when I said it complained. :)
jnthn oh, now I see that :) 17:53
Sorry :)
I don't know that a great deal works on the JVM version of NQP just yet. make test probably gives some indication.
isBEKaml Oh, I'm just poking around. :) 17:54
Do you know where I can find nqp examples in the parrot dir?
jnthn t :) 17:55
isBEKaml found it. though not sure if they are runnable.
jnthn: ah! 17:57
jnthn Note that the NQP tests ain't really in Parrot's repo :)
Parrot just ships PIR files that are built from stuff in the NQP repo.
isBEKaml nqp: say('1...8') 17:58
p6eval nqp: OUTPUT«1...8␤»
isBEKaml nqp: say('1..8') 17:59
p6eval nqp: OUTPUT«1..8␤»
isBEKaml er, no range expansion?
jnthn Not in NQP
tadzik nqp: say(1..8)
p6eval nqp: OUTPUT«Confused at line 1, near "say(1..8)"␤current instr.: 'nqp;HLL;Grammar;panic' pc 17577 (gen/hllgrammar-grammar.pir:5028)␤»
jnthn It's a *small* subset
tadzik perl6: say('1..8')
isBEKaml jnthn: I found that in the first test file.
p6eval pugs, rakudo 887bb5, niecza v4-67-g1f44650: OUTPUT«1..8␤»
tadzik isBEKaml: that's for TAP
isBEKaml tadzik: 6model/t
tadzik *, that's the disired TAP out put 18:00
bleh, this cast
isBEKaml hugme: hug tadzik
hugme hugs tadzik
tadzik isBEKaml: thanks :) 18:01
18:02 takadonet joined
isBEKaml tadzik: how's your arm coming along? 18:05
18:08 mtk left, mtk joined
tadzik isBEKaml: not bad, I stopped taking painkillers like yesterday 18:08
isBEKaml tadzik: then, I suppose recovery should be fast? take good rest. :) 18:09
tadzik isBEKaml: I hope so :) I hope they'll take the cast off on friday and I'll be fully functional again :) 18:10
jnthn
.oO( healed = (better)broken; /* how casts work... ;-) */ )
18:11
mathw you might not be quite fully functional after the cast comes off 18:12
but it's a good step in that direction :D
18:12 thp left
isBEKaml punners all. fie on you! :P 18:12
.oO(first time I actually understood an FP pun)
18:13
masak punners all, φ on you! 18:16
isBEKaml punners all, * on you! 18:17
masak meh. whatever.
isBEKaml exactly!
jnthn: I'm looking over the generated java file from the compilation. I reckon you want to remove this step from the compilation and directly generate bytecodes? 18:18
mathw: I suppose Epigram is decidedly functional enough to catch you napping! :) 18:19
mathw isBEKaml: Epigram makes my head hurt, but it was quite entertaining at the time 18:23
18:23 plobsing left
jnthn isBEKaml: Yes, that's the end goal. 18:24
isBEKaml: The Java (and C#) was just a stepping stone. Java not having goto made it a...less than awesome...stepping stone.
18:25 lichtkind joined, kjeldahl joined
isBEKaml jnthn: goto ? err... 18:25
jnthn: if you're talking about the infamous goto - yes, java doesn't have it. but the jvm has a form of goto. 18:26
jnthn: goto, invoke* kind of instructions are part of the jvm bytecode instruction set. 18:27
masak after lerning the switch trick, I don't see any language's lack of goto as a limitation any more.
isBEKaml masak: you've just started. :)
sorear lack of goto is a major annoyance 18:28
18:28 cggoebel left
jnthn isBEKaml: Yes, I know the JVM has it. But generating Java means it's not available. 18:28
masak: Patches welcome ;)
sorear it of course doesn't actually limit power
masak right.
I agree it makes some easy things harder than they could be.
isBEKaml masak: switch + some form of typechecking leads to delegates. :) 18:29
masak but, case in point. PGE used lots of gotos in the code it generated. GGE generates goto-less Perl 6 with the same semantics.
isBEKaml: yes, I realized that the other day. you're fast!
(in the context of replacing gotos, I mean.)
isBEKaml masak: nah, I just have been at it for longer than I should. :)
masak if I had to do it again (and I just might do that), I'd use method dispatch rather than given/when. 18:30
18:30 fhelmberger left
isBEKaml method dispatch in java? visitors, i guess. 18:31
18:31 justatheory left 18:32 cggoebel joined
isBEKaml jnthn: in the context of gotos in the jvm, they are not actual goto instructions. The instructions are just jumping about in the sand castle. 18:33
tadzik twitter.com/mcmire/statuses/60179396560039936 --well, yeah
18:34 saaki left
tadzik I know about 4 :) 18:35
masak isBEKaml: "jumping about in the sand castle"? apart from the sand castle, that sounds like what a goto is.
18:35 risou left 18:36 saaki joined
isBEKaml masak: I was referring to the sandboxed portion. They are not actual code as far as the jvm stack is concerned. 18:36
more specifically, goto in other languages != goto in the jvm. 18:37
tadzik: lemme guess, you ran 3! :) 18:38
tadzik isBEKaml: 2 :)
masak: ran the other 2
s/://
isBEKaml ufo ? :) 18:39
tadzik that's not a manager
if we count the build systems, then I know about 7, and then 3 are mine :)
masak Perl 6 "getting a new package manager every month" is good PR in my book :) 18:40
that means we have packages.
tadzik 96 of them actually 18:41
those known :)
pmichaud (from phasers): there's a good chance I'll have some perl6 tuits in the new couple of days... if there's a specific area ripe for me to hack (especially in nqp) let me know
afk
s/new/next/
isBEKaml tadzik: I counted neutro as a build manager. 18:43
tadzik that's a package manager
it used ufo, and later Module::Build, which was a part of Module::tools, which included mbuild, which was basically a pure-perl6 ufo :) 18:44
isBEKaml ah, java world clubs both into one. :) 18:47
pyrimidine wow, that was a short #phasers
isBEKaml build manager would be tools/frontends like continuous integration systems, while there's essentially no concept of a package manager. though we do have archives [wje]ars. 18:48
isBEKaml thinks he should stop yapping javagese. 18:49
tadzik pyrimidine: it hasn't started yet
pyrimidine ah
pyrimidine forgot
isBEKaml how much until phasers? 18:51
*time
tadzik 9 mins
18:53 [Coke] left
isBEKaml ooh 18:53
18:54 [Coke] joined 18:55 icwiener left 19:01 [Coke] left 19:02 yegor left 19:03 donri left, [Coke] joined 19:11 yegor joined, nadim joined 19:15 Khisanth joined
masak Khisanth! \o/ 19:16
std: my $tadzik; ++$tadzik++
p6eval std 3468e14: OUTPUT«===SORRY!===␤"++" and "++" are not associative at /tmp/vuDIVkY9rt line 1:␤------> my $tadzik; ++$tadzik++⏏<EOL>␤"++" and "++" are not associative at /tmp/vuDIVkY9rt line 1:␤------> my $tadzik; ++$tadzik++⏏<EOL>␤FAILED 00:01
..11…
Khisanth ?
19:17 justatheory joined
tadzik I'd go for "our $tadzik" :) 19:17
masak Khisanth: just saying hi :)
tadzik: ;) wouldn't help, though.
tadzik aye, probably not
19:18 noganex joined
isBEKaml jnthn: I'd need some help around compiler build steps.I've just done getting the ant build config file done for runtime and am in the middle of doing it for compiler. Take this over PM? 19:18
19:20 noganex_ left 19:26 birdwindupbird joined 19:28 birdwindupbird left, donri joined 19:29 birdwindupbird joined 19:33 birdwindupbird left 19:34 pernatiy joined 19:36 justatheory left, justatheory joined, birdwindupbird joined 19:41 justatheory left
jnthn isBEKaml: sorry, was afk for a moment 19:42
isBEKaml: The compiler build is just calling Parrot to produce some PIR files at the moment. 19:43
isBEKaml: Then it uses that compiler to compile a setting 19:44
That's about it. :)
isBEKaml jnthn: Sure. I was wondering about make specifically. It uses parrot-nqp --target=pir foo.pm > gen_foo.pir. Does IO redirection (>) work on windows?
moritz it does 19:45
jnthn Yes
That makefile works fine on Windows, fwiw
isBEKaml Oh, ok. :)
jnthn So if you see something in there it's probably fine to assume it's OK on Windows :)
isBEKaml Then, I think I have a way of making the build config file for compiler steps too. 19:46
I'm just doing the easy bits first. :)
19:47 justatheory joined
isBEKaml jnthn: One more question. Why do you have to create two jar files in compiler phase? NQPSettings.jar and P6Objects.jar? 19:49
19:50 ymasory left
isBEKaml why not package them into a single jar? the JRE knows only classes at runtime. It doesn't matter which classes are present in specific jars, but package names and classpath has to be correct. 19:50
jnthn isBEKaml: mberends++ probably knows that better
isBEKaml: Part of it is almost certainly dynamic loading though
We may want one and not the other.
isBEKaml mberends: ? 19:51
jnthn Oh, it may well de a dependency thing 19:52
We need the setting in order to build the library
isBEKaml mberends,jnthn: Just a bit of info. I pushed the build config file for runtime to my forked repo. You can have a look. :)
moritz hugme: list projects
hugme moritz: I know about Math-Model, Math-RungeKutta, MiniDBI, bench-scripts, book, gge, hugme, ilbot, java2perl6, json, modules.perl6.org, november, nqp-rx, nqpbook, perl6, perl6-examples, perl6-wtop, proto, pugs, rakudo, star, svg-matchdumper, svg-plot, tardis, try.rakudo.org, tufte, ufo, web, yapsi
isBEKaml jnthn: Even if that were a dependency, you can always have those classes available for compiling P6Objects.
masak isn't hugme a "project manager" as well? :P 19:53
moritz it's self aware
isBEKaml jnthn: anyway, I'll get the compiler build config too, in a bit and let you know.
tadzik :) 19:54
mberends isBEKaml: there is no reason to have two jar files when one will do, as jnthn said it is probably only for bootstrapping reasons. 19:55
isBEKaml mberends: Ok. I'll take that into build.xml. :) 19:56
20:04 TiMBuS left
miso2217_ hi all 20:12
20:12 birdwindupbird left
lichtkind hai miso2217 20:12
miso2217_ I need some help with the error context in grammars: 20:13
rakudo: grammar test_g_1 { token a { a }; rule TOP { <a>* | <.sorry('Only matching aaaaa s')> }; method sorry(Str $s) { say $s; self; }; }; if test_g_1.parse('aaaaab') { say 'match ', $/.perl; } else { say 'no match'; };
p6eval rakudo 887bb5: OUTPUT«Only matching aaaaa s␤no match␤»
miso2217_ how do I find the substring where the parse failed?
flussence miso2217_: have you tried <?DEBUG(1)> ? 20:14
miso2217_ I looked on STD.pm6 for some time but still didn't understand enough the mechanism to be anle to reusi it
lichtkind i dont know the details of the match object
masak miso2217_: the only thing that comes to mind is assigning $/.CURSOR.pos to a variable near the <.sorry>, and then using that. 20:15
miso2217_ flussence where? in palce of the <.sorry('Only matching aaaaa s')> ?
moritz isBEKaml: in methos sorry, self.CURSOR.pos
sorry, meant miso2217_
flussence put it at the start of a rule, it'll print out what the grammar engine is doing
20:16 kst joined
moritz rakudo: grammar test_g_1 { token a { a }; rule TOP { <a>* | <.sorry('Only matching aaaaa s')> }; method sorry(Str $s) { say $s; say self.CURSOR.pos; self } }; test_g_1.parse('ab') 20:16
p6eval rakudo 887bb5: OUTPUT«Only matching aaaaa s␤Method 'CURSOR' not found for invocant of class 'test_g_1'␤ in 'test_g_1::sorry' at line 22:/tmp/k517PnCpXw␤ in 'test_g_1::TOP' at line 22:/tmp/k517PnCpXw␤ in 'Grammar::parse' at line 6402:CORE.setting␤ in main program body at line
..22:/tmp/k517PnCpXw␤»
miso2217_ moritz: ah! I wasn't too far wos trying trough the $¢
moritz rakudo: grammar test_g_1 { token a { a }; rule TOP { <a>* | <.sorry('Only matching aaaaa s')> }; method sorry(Str $s) { say $s; say self..pos; self } }; test_g_1.parse('ab') 20:17
p6eval rakudo 887bb5: OUTPUT«Only matching aaaaa s␤Could not find sub &pos␤ in 'test_g_1::sorry' at line 22:/tmp/fgkvlA0Mw4␤ in 'test_g_1::TOP' at line 22:/tmp/fgkvlA0Mw4␤ in 'Grammar::parse' at line 6402:CORE.setting␤ in main program body at line 22:/tmp/fgkvlA0Mw4␤»
moritz rakudo: grammar test_g_1 { token a { a }; rule TOP { <a>* | <.sorry('Only matching aaaaa s')> }; method sorry(Str $s) { say $s; say self.pos; self } }; test_g_1.parse('ab')
p6eval rakudo 887bb5: OUTPUT«Only matching aaaaa s␤0␤»
masak I sometimes get 'stat failed: No such file or directory' when running tote.
I presume this is when things coincide exactly with vim doing some switching-around with files during saving. 20:18
20:18 stkowski joined
masak anyway, it's not nice. 20:18
moritz rakudo: grammar test_g_1 { token a { a }; rule TOP { ^ <a>* [ $ || <.sorry('Only matching aaaaa s')> ] }; method sorry(Str $s) { say $s; say self.pos; self } }; test_g_1.parse('ab')
p6eval rakudo 887bb5: ( no output )
moritz miso2217_: I think it's self.pos... experiment with it :-) 20:19
masak moritz: I'm guessing the sorry method goes on the Cursor.
isBEKaml mberends: I don't understand one thing about the makefile, actually. I'm in the process of wiring up the build script and was stuck here at this step.
moritz rakudo: say Grammar ~~Regex::Cursor
p6eval rakudo 887bb5: OUTPUT«Bool::True␤»
moritz masak: the grammar *is* a cursor :-)
miso2217_ moritz: ok, I'll try it
isBEKaml mberends: P6Objects.java lists that NQPSettings.jar must have been generated. Am I right in thinking that this is redundant since we are not using it, unless some magic occurs in --no-core-libs switch. :) 20:20
?
moritz miso2217_: remember to use || instead of |, otherwise your code will horribly break in the future when rakudo does LTM
miso2217_ moritz: I dinn't quite get tthe difference between | and ||
mberends isBEKaml: give me a few minutes to take a look 20:21
masak moritz: oh, right.
moritz miso2217_: in rakudo, but do the same. In good perl 6, || tries the left side first, then the right side. | matches the longer alternative
isBEKaml mberends: it's in compiler/Makefile
moritz s/but/both/
jnthn suspects those get loaded dynamically rather than statically linked in
moritz miso2217_: niecza implements that correctly
isBEKaml jnthn: --no-core-libs ? 20:22
jnthn --no-core-libs means "don't make us load P6Objects.jar"
isBEKaml jnthn: AFAICT, java has no concept of dynamic libraries.
jnthn isBEKaml: Class loader :)
isBEKaml jnthn: unless they are already provided.
jnthn: yeah, <provided>
jnthn mberends++ has done the actual work there, so I don't know quite how it looks :) 20:23
20:24 MayDaniel joined
mberends isBEKaml: I'm just flushing the p6cc/niecza info from my mental buffers, before coming over to the 6model/jvm side 20:26
isBEKaml mberends: :) 20:27
masak today's mini-challenge: write a sub that (1) takes any number of parameters, (2) knows the difference between getting '1, 2, 3' and getting '1..3'. 20:34
I've made one attempt already, and I *almost* got it to work.
20:34 ymasory joined
masak the difficulty is getting at the parameters without flattening them on the way. flattening destroys the Range. 20:35
moritz rakudo: multi a ($x) { $x.WHAT }; multi a (*@x) { @x[0].WHAT }; say a(1..3);
p6eval rakudo 887bb5: OUTPUT«Range()␤»
moritz rakudo: multi a ($x) { $x.WHAT }; multi a (*@x) { @x[0].WHAT }; say a();
p6eval rakudo 887bb5: OUTPUT«Any()␤»
moritz rakudo: multi a ($x) { $x.WHAT }; multi a (*@x) { @x[0].WHAT }; say a(0);
p6eval rakudo 887bb5: OUTPUT«Int()␤»
moritz rakudo: multi a ($x) { $x.WHAT }; multi a (*@x) { @x[0].WHAT }; say a(0, 1, 2);
p6eval rakudo 887bb5: OUTPUT«Int()␤» 20:36
moritz masak: I thikn I've succeeded
tadzik have a cookie
moritz rakudo: sub a (\|$x) { say $x[0].WHAT }; a 1..3; a 1, 2, 3
p6eval rakudo 887bb5: OUTPUT«===SORRY!===␤Malformed parameter at line 22, near "\\|$x) { sa"␤»
moritz rakudo: sub a (|$x) { say $x[0].WHAT }; a 1..3; a 1, 2, 3
p6eval rakudo 887bb5: OUTPUT«Range()␤Int()␤»
moritz even in a single routine 20:37
moritz pads himself on his back
jnthn rakudo: sub foo(|$_) { when :(Range) { say "range!" }; default { say "other" } }; foo(1..2); foo(1,2);
masak :)
p6eval rakudo 887bb5: OUTPUT«range!␤other␤»
masak moritz++
masak tries
jnthn masak: ^^ ;)
Anyway, yes, playing with the capture is the way to do such trixy things :) 20:38
masak hm. looking closer at those, I see it might not be what I want. 20:39
see, my Range might be anywhere among the parameters. it need not be just a solitary Range. 20:40
it could be 1, 2, 3..7, 8, 9.
moritz so iterate the capture
masak right.
moritz see if any is a Range
masak rakudo: sub foo(|$_) { for .list { .say } }
p6eval rakudo 887bb5: ( no output )
masak rakudo: sub foo(|$_) { for .list { .say } }; foo(1, 2, 3..7, 8, 9)
p6eval rakudo 887bb5: OUTPUT«1 2 3 4 5 6 7 8 9␤»
masak er. how do I iterate the capture? :P 20:41
moritz sub foo(|$_) { for .list { say .WHAT } }; foo(1, 2, 3..7, 8, 9)
masak rakudo: sub foo(|$_) { say .elems }; foo(1, 2, 3..7, 8, 9)
tadzik rakudo: sub foo(|$_) { for .list { .perl.say } }; foo(1, 2, 3..7, 8, 9)
p6eval rakudo 887bb5: OUTPUT«5␤»
rakudo 887bb5: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
masak rakudo: sub foo(|$_) { say .[$_] for .keys }; foo(1, 2, 3..7, 8, 9) 20:42
p6eval rakudo 887bb5: OUTPUT«0␤»
masak rakudo: sub foo(|$a) { say $a.[$_] for $a.keys }; foo(1, 2, 3..7, 8, 9)
p6eval rakudo 887bb5: OUTPUT«1␤»
moritz rakudo: sub f(|$_) { say $_.perl }; foo(1, 2, 3..5, 6)
p6eval rakudo 887bb5: OUTPUT«Could not find sub &foo␤ in main program body at line 22:/tmp/fQWR3lB6Mj␤»
moritz rakudo: sub f(|$_) { say $_.perl }; f(1, 2, 3..5, 6)
p6eval rakudo 887bb5: OUTPUT«\(1, 2, 3, 4, 5, 6)␤»
masak see? it's hard :)
masak .oO( yeah, yeah, twss... ) 20:43
tadzik hmm
masak I'm sure I can get a rakudobug out of this somehow...
tadzik oh come on!
jnthn masak: Seems it is hard to get it out the way it went it... :P 20:46
masak jnthn: shouldn't you be busy with your slides? :P 20:47
tylercurtis rakudo: sub f(|$cap) { loop (my $i = 0; $i < $cap.elems; $i++) { .WHAT.say; } } # excessively ugly
jnthn masak: If you *iterate* over the capture, you're going to put it into (flattening) list context
p6eval rakudo 887bb5: ( no output )
jnthn masak: And we don't have lol context yet to do the other thing
tylercurtis rakudo: sub f(|$cap) { loop (my $i = 0; $i < $cap.elems; $i++) { .WHAT.say; } } f 1, 2, 3..7, 8, 9 # excessively ugly
jnthn masak: So you probably need to loop
p6eval rakudo 887bb5: OUTPUT«===SORRY!===␤Confused at line 22, near "sub f(|$ca"␤»
tylercurtis rakudo: sub f(|$cap) { loop (my $i = 0; $i < $cap.elems; $i++) { .WHAT.say; } }; f 1, 2, 3..7, 8, 9 # excessively ugly
p6eval rakudo 887bb5: OUTPUT«Any()␤Any()␤Any()␤Any()␤Any()␤»
masak tylercurtis++! 20:48
jnthn Like that
tylercurtis oops
masak that's what I need. :)
jnthn But $cap[$i].WHAT.say :)
tylercurtis rakudo: sub f(|$cap) { loop (my $i = 0; $i < $cap.elems; $i++) { $cap[$i].WHAT.say; } }; f 1, 2, 3..7, 8, 9 # excessively ugly
p6eval rakudo 887bb5: OUTPUT«Int()␤Int()␤Range()␤Int()␤Int()␤»
masak \o/ \o/
masak celebrates
20:48 ymasory left 20:57 dorlamm joined
masak thanks, tylercurtis, jnthn, tadzik, moritz. the advice helped, eventually. :) 20:57
20:58 Holy_Cow left, jdhore left
masak the real issue was me being bitten by the lack of real distinction between a list of element and an item. in my test, the range kept flattening because that was the thing I was iterating on. X-/ 21:00
Tene masak: I've been repeatedly uncomfortable with the conflation between an item and a list of one item in Perl 6. 21:01
21:02 jdhore joined
masak Tene: yes, I know. 21:06
21:06 jcrigby joined
masak I'm also not convinced it entirely pulls its weight anymore. 21:06
it's starting to look like an odd beast amongst all the type checking and lack of parameter flattening. 21:07
21:08 franek joined 21:11 dorlamm left, y3llow_ joined, franek left, pothos_ joined 21:12 dorlamm joined 21:13 pothos left, pothos_ is now known as pothos, y3llow left 21:14 y3llow_ is now known as y3llow
masak can I return a capture from a subroutine? 21:17
21:18 donaldh joined
masak rakudo: sub foo { \(1, 2, 3) }; say foo.WHAT 21:18
p6eval rakudo 887bb5: OUTPUT«Capture()␤»
masak \o/
jnthn Sure 21:19
The default return data structure is a parcel. 21:20
masak I'm definitely onto something now. getting Null PMC accesses :P 21:24
mberends loliblogged: blogs.perl.org/users/martin_berends...ntest.html 21:25
21:25 jaldhar_ is now known as jaldhar
masak \o/ 21:25
mberends++ # a very good read. and encouraging, despite the results. 21:28
oh, I can't help going through the first few errors :) 21:30
mberends
.oO( the plan worked! )
21:30 mj41 left
masak p1-colomon: line 5: the export isn't needed. line 22: 'is rw' is kinda fundamental. lines 35/32. errors related. STD (or Niecza?) at fault. 21:31
21:31 justatheory left
masak p1-fox: someone needs to implement 'max'. LHF. 21:31
sorear what is 'is rw' being applied to?
niecza makes attributes and functions implicitly rw :< 21:32
21:32 justatheory joined
masak it's being applied to a public array attribute. 21:32
p1-matthias: exception seemingly unrelated. my guess it's the *-1 in the second indexing. still, not good. 21:33
21:33 MayDaniel left
masak sorear: Niecza doesn't have Int? 21:33
sorear correct
masak ah. that explains it. 21:34
so, the p1-colomon errors at lines 32/35 are actually quite understandable.
Niecza parsed 'Int' as a sub call.
p1-util: exception probably caused by the » on line 47. definitely workaroundable. 21:35
I'll stop there for now. 21:36
I'd say that these errors look fairly benign, most of them. and often easy to analyze.
someone with tuits and enthusiasm is very welcome to catalogue them somewhere :)
lets make Niecza start running the p6cc entries! \o/ 21:37
let's*
miso2217_ rakudo: say Cursor.^methods(); 21:38
p6eval rakudo 887bb5: OUTPUT«Method 'methods' not found for invocant of class 'P6metaclass'␤ in main program body at line 22:/tmp/VWWhwcoF6F␤»
21:38 kjeldahl left
miso2217_ rakudo: say Str.^methods(); 21:38
p6eval rakudo 887bb5:
..OUTPUT«ACCEPTSperlpredsuccWHICHBoolStrencodeindentNumericRealIntRatNumabsconjugateexploglog10sqrtrootsto-radiansfrom-radiansfloorceilingroundtruncatesigncisunpolarchrchrsrandsincostanseccoseccotansinhcoshtanhsechcosechcotanhasinacosatanatan2asecacosecacotanasinhacoshatanhasechacosechacota…
masak 'night, #perl6.
21:38 masak left
miso2217_ o/ 21:39
does the introspection work for the Cursor type? say Cursor.^methods();
jnthn nqp: for Regex::Cursor.HOW.methods(Regex::Cursor) { say(~$_) }
p6eval nqp: OUTPUT«too few named arguments: no argument for required parameter 'local'␤current instr.: 'nqp;NQPClassHOW;methods' pc 5951 (gen/nqp-how.pir:2264)␤»
jnthn nqp: for Regex::Cursor.HOW.methods(Regex::Cursor, :local(1)) { say(~$_) } 21:40
p6eval nqp: OUTPUT«new_match␤new_array␤MATCH␤parse␤next␤pos␤from␤!cursor_init␤!cursor_start␤!cursor_fail␤!cursor_pass␤!cursor_backtrack␤!cursor_next␤!cursor_caparray␤!cursor_names␤!cursor_pos␤!cursor_debug␤!mark_push␤!mark_peek␤!mark_fail␤!mark_commit␤!reduce␤!BACKREF␤!INTERPOLATE␤!INTERPOLATE_REGEX␤…
jnthn miso2217_: Will be fixed in 6model.
miso2217_: Well, kinda already is :)
miso2217_: But Rakudo isn't updated to use that yet.
Anyway, yes, it certainly should work.
And it'll work in the not too distant future. 21:41
miso2217_ jnthn: ok thx, for now I need more the result than have it working :) 21:42
isBEKaml jnthn: do you recognise this error? 21:52
pastebin.com/qUdqecKT
21:54 Rotwang joined
jnthn isBEKaml: no :( 22:00
Did you edit the Grammar.pm?
isBEKaml jnthn: No. 22:01
jnthn: I was pretty surprised when I saw errors in gen_grammar.pir. :(
jnthn huh :/
isBEKaml jnthn: and compile.pir just disappears off. :/ 22:02
jnthn Does gen_grammar.pir look OK?
isBEKaml make: *** No rule to make target `compile.pir', needed by `NQPSetting.java'. Stop.
jnthn Yeah, we leave that as is
isBEKaml jnthn: that's what. It doesn't look ok. :(
jnthn And invoke it with parrot
huh, compile.pir shoudl just exist
isBEKaml jnthn: I just git checkout compile.pir.
jnthn It's not generated
it's checked in.
isBEKaml it just disappears.
jnthn huh.
isBEKaml huh.. what task does that? 22:03
jnthn .gitignore oddness?
I'm surprised you'd just be seeing that though.
isBEKaml I don't think it's .gitignore.
one of the tasks wipes it.
more strangeness. make generates gen_grammar.pir fine. ant exec doesn't. What's strange is ant's exec invokes RuntimeExec equivalent to shell's backticks. 22:06
22:07 coldhead joined 22:10 donaldh left
isBEKaml jnthn: ah, make clean shouldn't be deleting all thos jars. 22:14
especially not jasmin.jar. :) 22:15
22:16 stkowski left 22:24 whiteknight joined
jnthn phew, finished the talk I have to deliver at 9am tomorrow JIT! 22:24
oh my...9am *today*
isBEKaml Oh, today. :) 22:26
I have to rush back to work in 2 hours-ish. 22:27
and ant's exec is driving me nuts. Familiar? :)
and I had vim segfault twice. Poor editor, how many swap files will it see in its own lifetime? 22:29
jnthn No, I've never used ant :)
So far, you've not sold it to me ;)
isBEKaml \o/ build ran fine! :) 22:30
jnthn \o/
isBEKaml now, all i have to do is compile those class files and push!
one more thing, when running try.sh/try.bat, do you need all those .pir files? Mind if I clean them up? 22:31
:)
jnthn All what .pir files? 22:33
compile.pir just .include's a bunch of them so you can't clear those up
The whole thing is pretty makeshift because it's meant to go away in the end.
22:33 kaare__ left
jnthn e.g. I've generally built it to be "just enough" for us to make it to the point when we can get NQP to compile itself on JVM / CLR. 22:34
And thus it's bootstrapped and we eliminate the parrot-nqp dependency.
isBEKaml gen*.pir
22:35 Rotwang left
jnthn See compile.pir. If it's mentioned on a .include line in there, it has to stay 22:35
Unless you compile compile.pir to a PBC
Which you may do if you wish.
lichtkind good night
jnthn o/ lichtkind
isBEKaml Oh...
o/ lichtkind
lichtkind your great 22:36
22:36 lichtkind left
isBEKaml I'll look into PBC tonight.. 22:36
jnthn: I noticed a copy of NQPSetting.pm in common/NQP/. Intentional? 22:37
and another in java/compiler.
jnthn isBEKaml: That's meant to be the canonical one. 22:38
But java/compiler can't handle it yet
So the copy in java/compiler is a trimmed down version.
isBEKaml I see.
jnthn So the one in common/NQP/ is the "target", as it were
isBEKaml but not for now, I suppose. 22:39
jnthn Yeah, not yet.
nqpclr runs the one in common already
OK, sleep 22:41
night o/
TimToady o/
isBEKaml jnthn: g'night.
jnthn isBEKaml++ # 6model/jvm hacking :)
isBEKaml phenny: tell jnthn, if you've got time later - please look into this and let me know. Thanks. pastebin.com/zpXKTMGd 22:43
phenny isBEKaml: I'll pass that on when jnthn is around.
22:43 Chillance left
isBEKaml jnthn: Oh, I'm not hacking anything yet. It's nothing anyway. :) 22:43
22:45 grai joined 22:46 mtk left 22:47 donri left 22:50 alester left
isBEKaml phenny: tell jnthn, you can have a look at the changes so far here: github.com/svatsan/6model. Let me know what you see in P6Objects issue that I pointed earlier. 23:02
phenny isBEKaml: I'll pass that on when jnthn is around.
23:03 hercynium left
isBEKaml phenny: tell mberends: You can have a look at 6model/jvm build changes so far here: github.com/svatsan/6model. 23:03
phenny isBEKaml: I'll pass that on when mberends is around.
isBEKaml anyway, I'm off to bed.
g'night #perl6! :)
23:04 isBEKaml left 23:05 dorlamm left 23:07 sftp left
colomon tadzik: ping? 23:13
23:16 plobsing joined 23:20 leprevost joined 23:25 plobsing left 23:29 cdarroch left 23:42 justatheory left
tylercurtis sorear: ping 23:42
sorear tylercurtis: pong 23:46
tylercurtis sorear: Do you have some time in which you'd be willing to discuss ways of avoiding creating Captures in Bennu (in the hypothetical situation in which I eventually start working on it again)? 23:50
sorear tylercurtis: remember that Capture is an immutable value type 23:52
you logically have "has Capture $.args", but because two Captures with the same content are indistinguishable, it can just be the unboxed contents
you don't need to create the actual P6opaque capture unless |$foo or my $foo = callframe.args is used 23:53
tylercurtis sorear: I thought so. My main reason for wanting to discuss it was to find out if there's some reason why not creating actual Captures is a bad idea. 23:55
23:56 jcrigby left
sorear tylercurtis: the spec is insane in a lot of places, the only way it will become less insane is by implementers making decisions and cutting the corners that need to be cut 23:56
23:58 ponbiki left
tylercurtis rakudo: sub foo(\|$parcel) { say $parcel.perl; }; foo 5, :a<6>, 7 23:58
p6eval rakudo 887bb5: OUTPUT«===SORRY!===␤Malformed parameter at line 22, near "\\|$parcel)"␤»
tylercurtis niecza: sub foo(\|$parcel) { say $parcel.perl; }; foo 5, :a<6>, 7 23:59
p6eval niecza v4-67-g1f44650: OUTPUT«Unhandled exception: Excess arguments to MAIN foo, unused named a␤ at /tmp/tvUX8GYM_R line 0 (MAIN foo @ 0)␤ at /tmp/tvUX8GYM_R line 1 (MAIN mainline @ 1)␤ at /home/p6eval/niecza/lib/CORE.setting line 1311 (CORE C552_ANON @ 2)␤ at
../home/p6eval/niecza/lib/CORE.setting line 1312 …
23:59 ponbiki joined
sorear \| in Niecza means something possibly closer to ** 23:59
tylercurtis niecza: sub foo(\|$parcel) { say $parcel.perl; }; foo 5, 7
p6eval niecza v4-67-g1f44650: OUTPUT«5 7␤»