»ö« | perl6-projects.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moritz_ on 30 July 2009.
eternaleye I'm very tempted to write a Vim clone in Perl 6 now that Tene++ has Parrot's ncurses module handling colored output 00:01
For one thing, syntax hilighting would be very, very nice 00:02
00:08 gigabo left
cognominal I bet so, and if you do so, make sure to support dynamic highlighting, means when you click on an operator. it displays the operator token(s) in read and the operand in blue. With Perl 6 supporting an indefinite level of precedence, one need that to avoid defensive parentheses 00:11
s/level of precedence/number of precedence levels/ 00:12
00:16 pmurias_ left 00:19 hsb joined 00:41 rafl left 00:53 ingyfoo is now known as ingy
Tene eternaleye: colored output has worked in rakudo vim for months. 00:54
eternaleye Tene: Do you mean rakudo ncurses? 00:56
Tene Yes.
eternaleye Also, there was something you fixed in there lately. If it wasn't color, was it unicode?
00:56 rafl joined
Tene No, unicode still doesn't work. 00:56
I have some thoughts, but haven't experimented. 00:57
eternaleye hm
Tene What I mentioned was figuring out how to use 256 colors in it.
eternaleye Ah
pugs_svn r27995 | kyle++ | [t/spec] Change "is also" to "augment" (and skip) 01:17
dukeleto i know about the perl6 do { .. }, is there something like perl 5's do 'file.pl' ? 01:28
01:32 tann_ left
TimToady evalfile 01:32
dukeleto TimToady++ 01:34
01:35 Khisanth joined 01:39 eternaleye left
ewilhelm echo 'my $x ||= 8; $x++; say "hello $x";' > hello.pl; ./perl6 -e 'for 1..5 { evalfile("hello.pl") }' # alternates between printing 1 and 9 01:45
the ||= is obviously silly with 'my', but odd behavior 01:46
is evalfile() supposed to have the same lexical semantics as do 'file' ? 01:48
TimToady rakudo is still working out the kinks in their lexicals 01:49
diakopter the lexicals are kinky
ewilhelm I suppose Symbol '$x' not predeclared in <anonymous> (hello.pl:1) will ruin my bad idea there anyway 01:51
better to read a snippet of code into a string and compile that into a sub probably 01:52
01:56 sri_kraih left
KyleHa Is there anything Perl 6 outputs that's not an error message or warning? 02:05
I guess its version info... 02:06
I'm thinking that if we created a tree of exception classes, that would be a good place to go all i18n since that's the bulk of the program's self-created output.
meppl good night 02:29
02:31 satrac joined 02:32 meppl left
KyleHa phenny tell pmichaud I'm curious to know whether pugs r27987 and r27994 are work in the right direction. 02:33
@seen phenny 02:34
lambdabot phenny is in #perl6. I last heard phenny speak 10h 32m 19s ago.
02:58 KatrinaTheLamia left 03:00 flipr joined, flipr left 03:02 KatrinaTheLamia joined, _jaldhar left 03:03 _jaldhar joined 03:05 KyleHa left 03:08 wknight8111 left 03:10 zarko joined
s1n @seen pmichaud 03:13
lambdabot pmichaud is in #perl6. I last heard pmichaud speak 1d 6h 18m 24s ago.
03:15 tak11 left 03:18 TimToady_ joined
s1n pmichaud: here's the tentative idea behind the mini-hackathon: s1n.dyndns.org/index.php/2009/08/13...hackathon/ 03:18
pmichaud: i'm going to talk with frew and try to schedule it early next week
03:19 kane_ left 03:20 TimToady left 03:34 satrac left 03:47 bionoid left, tak11 joined
pugs_svn r27996 | lwall++ | [STD] improve message after map {} @a 03:53
04:07 carlin joined 04:20 tann joined 04:22 tann left 04:33 ingy left 04:40 ingy joined 04:58 carlin left 05:00 hsb left 05:18 tak11 left 05:19 zarko left 05:20 zarko joined 05:27 kane_ joined 05:29 tak11 joined 05:45 orafu left, orafu joined
pugs_svn r27997 | kyle++ | [t/spec] autounfudge 05:51
r27998 | kyle++ | [t/spec] Adjust some skip fudges 05:52
05:58 guest_007 left 06:01 zarko left 06:40 carlin joined 06:47 molaf joined 06:59 zamolxes joined 07:04 Lorn left 07:07 molaf left, elmex left 07:09 tak11 left 07:12 morensel joined
morensel any regex gurus?:P 07:17
07:18 elmex joined
morensel rather long regex though 07:19
07:28 tak11 joined 07:46 finanalyst joined 07:53 |theJackal| is now known as kent\n 07:55 morensel left 08:10 meppl joined 08:11 zloyrusskiy joined 08:12 iblechbot joined 08:37 xinming_ joined, xinming_ left, xinming_ joined 08:40 xinming left, kane_ left, xinming_ is now known as xinming 08:54 finanalyst left 08:57 meteorjay left, meteorjay joined 08:58 zloyrusskiy left 09:01 zloyrusskiy joined 09:06 rafl_ joined, rafl left 09:07 rafl_ is now known as rafl 09:11 zloyrusskiy left, zloyrusskiy joined, zloyrusskiy left 09:12 zloyrusskiy joined, xomas left 09:24 jan_ left 09:31 tak11 left 09:32 xinming_ joined 09:49 Testlamp joined 09:50 xinming left 09:52 jan_ joined 09:58 Testlamp left 10:07 xinming joined 10:09 sri_kraih joined 10:12 xinming left, xinming joined 10:18 eMaX joined 10:19 molaf joined 10:23 xinming__ joined, xinming left 10:24 xinming_ left 10:35 xinming__ is now known as xinming
jnthn hi all 10:38
mberends hi jnthn, it's quiet here 10:39
phenny mberends: 14 Aug 15:35Z <masak> tell mberends t/01-simple.t in the HTTP::Daemon repo says `undef( $daemon )`, but that's a perl5ism, and Rakudo dies on it.
mberends: 14 Aug 16:02Z <masak> tell mberends HTTP::Daemon crashes when trying to GET /favicon.ico -- gist.github.com/167912 -- apparently Parrot has gotten stricter of late with decoding UTF-8.
jnthn Trust masak to provide delayed-action un-quiet. :-) 10:40
mberends from the backlog I knew this one was pending :) 10:41
10:43 beggars joined
mberends phenny, tell masak thanks for the warning, I had hit the problem too, the slurp() in send_file needs a :bin<True> argument to fix it 10:47
phenny mberends: I'll pass that on when masak is around.
mberends masak++ # Destroyer of my complacency this time 10:48
10:53 iblechbot left
mberends phenny, tell masak for the Web.pm webserver API, the abstraction design follows almost automatically from developing implementations for HTTP::Daemon and an external web server (Apache, Lighttpd etc) side by side. If you have a generic API for the URL dispatcher, then for callbacks construct a Dispatcher object to pass to the web server. 10:54
phenny mberends: I'll pass that on when masak is around.
10:57 sri_kraih_ joined 11:07 M_o_C joined 11:13 sri_kraih left
pugs_svn r27999 | wayland++ | [S02,S16,S32/IO] Added special quoting that creates IO::FSNode objects. 11:19
r27999 | wayland++ | This could still be controversial, but I've gone with the
r27999 | wayland++ | "Forgiveness/Permission" thing. If no-one fights it, I'll revise the
r27999 | wayland++ | Draft IO specs (S16 and S32/IO) to refer to IO::FSNode objects in
r27999 | wayland++ | appropriate places instead of strings.
wayland76 Cool, I'm in the top 15 for karma :) 11:20
11:24 pmurias joined
pmurias wayland76: how can one see the ranking? 11:24
11:39 xomas joined
wayland76 lambdabot: @karma-all 11:53
lambdabot "ethanbot2" 1454
"moritz" 946
"pmichaud" 624
"lwall" 574
"jnthn" 524
[1847 @more lines]
wayland76 lambdabot: @more
lambdabot "pmurias" 452
"masak" 304
"kyle" 247
"azawawi" 241
"ruoso" 168
[1842 @more lines]
wayland76 lambdabot: @more 11:54
lambdabot "putter" 149
"C/C" 144
"moritz_" 121
"TimToady" 101
"wayland" 97
[1837 @more lines]
wayland76 You can also do it via private message: /msg lambdabot etc
frettled Weird that TimToady++ doesn't have a higher ranking. 11:55
(I know, I know, his alter ego is way up there)
wayland76 frettled: Add TimToady + TimToady_ + lwall and you get more
11:55 finanalyst joined
frettled wayland76: perhaps lambdabot should learn nick aliases? 11:55
wayland76 pmurias is in the top 5 (assuming we don't count ethanbot -- I'm sure that wasn't there recently :) ) 11:56
Well, it would be nice if it would do that, and also learn that C/C-- should not get more karma :)
frettled hehe 11:59
For instance, nick equality for \$nick[_]* 12:00
12:01 zamolxes left, shachaf left, PZt left, Tene left, nicomen left, PerlJam left, shachaf_ joined 12:02 nicomen joined, Tene joined 12:03 zamolxes joined, PerlJam joined
wayland76 While it doesn't show here, it'd be nice if it'd also learn to properly karma eg. (Moritz Lenz)++ :) 12:03
frettled mm 12:06
Who is maintaining the bot? 12:07
12:11 masak joined
masak rakudo: ((Temporal::DateTime.new(:date(Temporal::Date.new(:year(2010), :month(4))), :time(Temporal::Time.new)).epoch - time) / 86400).ceiling.fmt("%d days left until April!").say 12:12
phenny masak: 10:47Z <mberends> tell masak thanks for the warning, I had hit the problem too, the slurp() in send_file needs a :bin<True> argument to fix it
masak: 10:54Z <mberends> tell masak for the Web.pm webserver API, the abstraction design follows almost automatically from developing implementations for HTTP::Daemon and an external web server (Apache, Lighttpd etc) side by side. If you have a generic API for the URL dispatcher, then for callbacks construct a Dispatcher object to pass to the web server.
p6eval rakudo 0d4fe0: OUTPUT«229 days left until April!␤»
masak ack.
&
12:14 Whiteknight joined
jnthn Uff. I wish you could write that more like Temporal::Date.new(:year(2010), :month(4)).subtract(Temporal::Date.Today).days or similar. 12:19
frettled jnthn: or just (Temporal::DAte.new(:year(1020),:month(4)) - Temporal::Date.Today).days ;) 12:22
jnthn Yes, or that. 12:24
In fact, preferably that.
frettled My typos are interesting.
jnthn: btw, my brain struggles a bit every time I see you typing «uff» :D 12:25
frettled isn't used to seeing that in English-language fora.
masak my current vision spells (Temporal::DateTime('2010-04-01') - now()).days() 12:28
jnthn frettled: It's not very English-language. :-)
frettled jnthn: I know, i'ts Norwegian. :D
jnthn orly?
frettled Yet another interesting typo. Hmm. 12:29
masak: that works, too.
jnthn That wasn't the language I stole it from. :-)
Does it carry the same kind of meaning? (Like, "ouch"-ish"?)
masak I'd say it means the person is deflated in some way. 12:30
jnthn Yeah, sounds about right.
It's in Swedish too?
frettled It's a complaining onomatopoetic. 12:31
s/ti/i/
masak jnthn: I think so.
frettled It's in Danish as well, I think.
jnthn Heh
frettled Very Nordic.
jnthn It's used with similar sentiment in Slovak also.
frettled But it's also in American English, from the Norwegian immigrants. :)
masak but the register of the word seems to be in Donald Duck comics or similar.
12:32 iblechbot joined
jnthn Though by now has just slipped into my "probably works language-independent" bunch of vocab. ;-) 12:32
masak: BTW, not sure if I mentioned this before, but Slovak has loaned the Swedish word "skanzen". 12:33
It's the first Swedish loanword I've discovered. :-)
(I'm not sure it's spelt the same though in Swedish.)
masak "Skansen".
but that's originally a German word. 12:34
arnsholt jnthn: What does it mean in Slovak?
masak meaning "fortification" or some such.
jnthn In Slovak it means "open air museum".
masak: It means fortification in Swedish too? 12:35
masak jnthn: originally, yes. but nowadays it's mostly a famous open scene in Stockholm.
jnthn Ah, OK.
masak it's also a specific part on sailing boats. 12:36
jnthn So maybe a case of "take the name of something and generalize it while loaning it"
wayland76 And not to be confused with "Nansen" :)
jnthn More than a direct borrowing.
arnsholt Or, "loan something without knowing what it really means"
Surprisingly common phenomenon I think 12:37
jnthn Yes, I think so.
masak cargo culting.
12:38 adhoc is now known as lucychili
jnthn Along the lines of e.g. en.wikipedia.org/wiki/Vauxhall#Vaux...nd_Pushkin 12:38
arnsholt Yah. Unfortunately my etymological dictionary didn't have "skanse" in it, so I couldn't find any aditionaly info on the word
12:53 antiphase left 12:54 antiphase joined 12:59 antiphase left 13:00 antiphase joined 13:06 lucs_ joined 13:07 frew left 13:14 JimmyZ joined 13:16 lucs left, lucs_ is now known as lucs 13:19 carlin left 13:21 JimmyZ left 13:30 molaf left 13:35 masak left 13:38 cyocum joined, PZt joined
cyocum rakudo: (rand() * 100) % 6; 13:38
p6eval rakudo 0d4fe0: ( no output )
cyocum hummm.. 13:39
rakudo: rand() * 100;
p6eval rakudo 0d4fe0: ( no output )
cyocum rakudo: rand(); 13:41
p6eval rakudo 0d4fe0: ( no output )
cyocum exit 13:42
lol
13:42 cyocum left
jnthn cyocum didn't say much ;-) 13:43
diakopter rakudo: say rand 13:44
p6eval rakudo 0d4fe0: OUTPUT«0.730659864683734␤»
13:49 frew joined 13:50 finanalyst left 13:53 frew left, frew joined
frettled rakudo: say rand * 10..15 14:01
p6eval rakudo 0d4fe0: OUTPUT«7.526539508990068.526539508990069.5265395089900610.526539508990111.526539508990112.526539508990113.526539508990114.5265395089901␤»
frettled (shouldn't work?)
blimey, it does.
<3 Perl 6 14:02
rakudo: say (rand * 10..15).perl
14:02 masak joined
p6eval rakudo 0d4fe0: OUTPUT«9.67210940159024..15␤» 14:02
frettled That was a bit more surprising. 14:03
masak not more surprising than the other one, I'd say. 14:04
infix:<..> has relatively loose priority. 14:05
frettled Hrm, so what did I do wrong in .perl-ing that one, then?
14:06 iblechbot left
masak nothing. 14:06
that's what it returns.
wayland76 Maybe you wanted the .ast or something? 14:15
masak hm, any particular reason is returns got/expected diagnostics, and is_deeply doesn't?
wayland76 Anyway, 'night all :)
masak wayland76: o/
sleep well!
wayland76 Well, I try, but I usually make a few mistakes :) 14:16
afk &
14:32 lucs left 14:46 TimToady_ is now known as TimToady 14:47 Psyche^ joined, Patterner left, Psyche^ is now known as Patterner
masak I'm getting an error in t/spec/S12-methods/indirect_notation.rakudo. 14:54
anyone else get that?
dalek kudo: ada2b41 | masak++ | Test.pm:
[Test.pm] added diagnostics to is_deeply

to $got and $expected, in line with how &is does it. Also removed one multi variant in favor of a default parameter value.
14:58
15:05 zloyrusskiy left
TimToady wayland76: I really dislike IO::FSNode as a name. Is there any reason it the notion can't be combined with IO 15:06
masak TimToady: he just went to bed, to make mistakes. 15:07
TimToady ah, so I see. 15:08
15:08 beggars left
TimToady I just have an irrational hatred for names containing the (usually) meaningless word Node 15:08
masak I can empathise with that. 15:09
TimToady and I think IO::FSNode is popping out all over, and ought to huffmanize to IO
masak I don't know why exactly, but I feel that the current File IO spec is uncharacteristically heavy-weight.
TimToady "Beware the Turing Tarpit, where everything is possible, and nothing is easy." 15:10
masak right. 15:11
TimToady thought I suspect that is referring more to oversimplified designs than to overcomplexified
15:12 FCO joined, eiro joined, eiro left 15:13 eiro joined
masak looking at something like IO::FileSystems and how it's defined, I find myself mentally giving off about one 'WTF?' per line. 15:13
eiro hello all
masak s/FileSystems/FileSystem/
eiro: helo 15:14
rakudo: class A { sub foo() {} }; class B { my sub foo() {} } 15:16
p6eval rakudo 0d4fe0: ( no output )
masak what's the difference between the &foo in A and the &foo in B?
15:19 eiro_ joined, FCO left
jnthn masak: What kind of error gives t/spec/S12-methods/indirect_notation.rakudo? 15:29
15:29 SmokeMachine left
jnthn masak: Difference is in scoping. 15:30
rakudo: class A { sub foo() {1} }; class B { my sub foo() {2} }; say &A::foo(); say &B::foo();
p6eval rakudo 0d4fe0: OUTPUT«1␤invoke() not implemented in class 'Undef'␤in Main (/tmp/ynFZwCVfNv:2)␤»
masak jnthn: Cannot use .* when method is a code ref at line 126, near ".sort, 'm-" 15:31
jnthn masak: I think you need to pull.
masak ok.
jnthn I only implemented support for that last night.
15:32 Lorn joined 15:33 jaldhar_ joined
masak ah. I had run make, but not make install. :) 15:33
will take a while to get used to that...
15:34 _jaldhar left 15:35 FCO joined
masak can I use .comb on a string to extract [all occurrences of the apostrophe character, followed by an even number of backslashes]? 15:39
s/followed/preceded/, sorry :)
TimToady yes, but that almost certainly means you should be parsing the string left-to-right instead :) 15:43
masak isn't that what .comb does? 15:44
masak arrives at /<!before \>[\\]*'/ 15:45
TimToady anything with an implied .*? isn't really parsing, in my book 15:46
but you can get away with it if there are no other escapes
as soon as you introduce, say, quotes, you're hosed 15:47
gotta run
afk &
masak TimToady: I'm writing a CSV parser. this particular regex is just to forbid quotes mid-value.
this is exactly at the point where I introduce quotes. 15:48
15:48 nihiliad joined 15:59 FCO left 16:00 SmokeMachine joined 16:02 FCO joined 16:06 SmokeMachine left 16:12 frew left 16:14 jferrero joined, kane_ joined 16:26 Gothmog_ joined 16:27 Whiteknight left 16:34 kane_ left
TimToady that probably fits into my definition of parsing then 16:39
16:39 molaf joined
masak TimToady: it might please you to know that I've now refactored my CSV parser to use a grammar. 16:39
thanks for the grumpy feedback. :)
(it now looks much nicer, and can already tell commas inside of quotes from commas outside) 16:40
jnthn: how hard would it be to implement FIRST {} ? 16:44
jnthn masak: Is that meant to run on the first iteration of a loop only? 16:49
masak jnthn: aye. 16:52
rakudo: class A { method slurp($file) { slurp($file) } }; A.slurp("Test.pm") # Parrot bug? :(
p6eval rakudo 0d4fe0: OUTPUT«too few arguments passed (1) - 3 params expected␤in method A::slurp (/tmp/uNXpXyyyOS:2)␤called from method A::slurp (/tmp/uNXpXyyyOS:2)␤called from Main (/tmp/uNXpXyyyOS:2)␤»
masak in the interests of release-early, here's a simple CSV parser: github.com/masak/cvs/ 17:01
I'll add it to proto's projects.list, so that people can download it from there.
jnthn masak: Maybe Parrot bug, if methods are "has"-scoped by default (that is, they don't make a namespace entry). 17:24
masak jnthn: you mean one can call methods that way too? 17:25
I thoughts methods were always called with a dot.
s/s//
jnthn Hmm. I'm not sure that sub dispatch lookup completely ignores Routines in the namespace, be they Method or Sub. 17:26
It may well be spec'd one way or the other. I forget.
masak seems I have yet to mentally encompass all the intricacies of dispatch. 17:27
jnthn Same. ;-) 17:28
17:28 zloyrusskiy joined 17:29 zloyrusskiy left
masak food & 17:34
17:47 Avada left 17:50 jisom joined
dukeleto parrot: new 'Random' 17:57
good localtime()
just a heads up, the latest Parrot no longer has the Random PMC, so currently Rakudo's src/builtins/any-(num|list).pir are failing to compile with r40560 18:00
18:00 dduncan joined 18:10 ZuLuuuuuu joined 18:21 iblechbot joined 18:25 kane_ joined
jnthn dukeleto: Any guidance on what Rakudo should do? 18:49
What replaced Random PMC for getting random numbers?
dukeleto jnthn: yes, I was attempting to get rakudo to try to use the new parrot revision, but I am running into roadblocks
jhnthn: there is now a rand() and srand() opcode 18:50
so you do ' .loadlib "math_ops" ' at the top of any file that wants to use rand/srand (they are dynops)
jnthn Ah, dynops? 18:51
OK.
dukeleto for example, rand $N0 sets $N0 to a random number between 0 and 1 and rand $I0 sets $I0 to a random integer between -2^31 and 2^31
jnthn: dynamically loadable opcodes, i.e. they can be modified without recompiling parrot
jnthn: I have modified the examples/ directory in parrot to use the new dynops, check out examples/opengsl/shapes.pir for a good example 18:52
there are also a few other calling conventions, like giving a range: rand $N0, 5, 25 sets $N0 to a float between 5 and 25 18:53
it should be a trivial fix in rakudo, but I am trying to get rakudo to use my new parrot without complaining, how do y'all test new versions of parrot with rakudo? 18:54
jnthn Few ways - once is to just svn up the checkout of Parrot that Rakudo makes for you if you, and make sure it installs to the right place etc. 18:55
You need an installed Parrot to build Rakudo. 18:56
If you have built/installed an updated version, then it's something like
dukeleto jnthn: that is what I didn't know
jnthn perl Configure.pl --parrot-config=path/to/parrot_config
dukeleto jnthn: you may be interested in looking at this diff to see what changed: trac.parrot.org/parrot/changeset/40557/
jnthn: i was trying that incantation and I was getting weird errors, will try make realcleaning everything and trying again 18:57
jnthn: this is what I got when I tried the --parrot-config option: gmake: *** No rule to make target `/usr/local/lib/parrot/1.4.0-devel/library/PGE/Perl6Grammar.pbc', needed by `src/gen_grammar.pir'. Stop.
so it looks like it is still trying to use the installed version. i may just rm -rf it
jnthn You need to install the Parrot you want to build against. 18:58
dukeleto jnthn: gotcha 18:59
dduncan so, I'm in the process of build/installing the packaged parrot 1.4.0 ... if, since it is more rapidly changing, I use Rakudo from version control, will it run on that parrot or do I need parrot from version control too? 19:06
19:07 KyleHa joined
dduncan or I could just use July's Rakudo release, but I'm writing a relatively large (over 100K) Perl 6 module now and I'm not sure which Rakudo version has all the features it would want 19:07
and if none, presumably working on the dev is the most effective
KyleHa rakudo: try { 1/0 }; say $!.WHAT;
p6eval rakudo 0d4fe0: ( no output )
dukeleto dduncan: a new parrot will be out on tuesday and a new rakudo will be out thursday, so if you wait a bit you may get a bunch more features/bugfixes and you won't be behind an extra deprecation point 19:08
dduncan okay
I thought it wouldn't be another 1-2 weeks 19:09
19:09 shachaf_ is now known as shachaf
dduncan anyway, I have a goal to port my Set::Relation Perl 5 module to Perl 6 within a week, so you can use all the DBMS-relational operators in Perl 6 apps 19:10
jnthn dduncan: You'll probably run into some issues using current Rakudo on Parrot 1.4.
dduncan so I'll try packaged Rakudo first perhaps and then upgrade both next week
jnthn dduncan: I'd either do as dukeleto suggests, or just grab current Rakudo, do perl Configure.pl --gen-parrot, then mame.
erm, make
And it will probably do the Right Thing and build a Parrot that's known to work with Rakudo for you. 19:11
But yes, sticking wiht the packaged ones should work too. :-)
dduncan on a tangent, short-term my plan is to distribute the Perl 6 version on CPAN in the same distro as the Perl 5 version, sort of like a fat-source project ... the Perl 5 version would be in the usual place, and the p6v in a perl6 subdir with its own lib/ and t/ 19:12
dukeleto dduncan: perl Configure.pl --gen-parrot will have the least yak holes for you to fall into
dduncan dukeleto, okay so I'll try that rather than building parrot separately first
right at the moment I'm build/installing ICU 19:13
then I'll try that
19:13 frew joined
dukeleto dduncan: I can assure you that the latest rakudo does not work with the latest parrot, 'cause I am the one that removed the Random PMC which makes things go *boom* :) 19:13
jnthn Aye, but --gen-parrot doesn't build latest Parrot. It builds a Parrot revision that we know that Rakudo worked under. :-) 19:14
dduncan jnthn, that's good
dukeleto jnthn: yes, that is what I was trying to get at
dduncan: don't attempt to "svn up" your parrot directory in your rakudo source directory, it won't work. That is what I was trying to get across 19:15
dduncan okay
I understood
jnthn dukeleto: Thanks for working on patching up Rakudo after the Parrot changes, btw. :-)
dukeleto jnthn: no prob, i will hopefully have something working once I get past my installed parrot hurdles 19:16
19:17 gdickie joined
gdickie perl6: say 50; 19:18
p6eval elf 27999, pugs, rakudo 0d4fe0: OUTPUT«50␤»
19:20 mzedeler joined
mzedeler Hi everyone. 19:20
jnthn mzedeler: hi 19:21
mzedeler rakudo: my @a; @a.push 1 => 2;
p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near "1 => 2;"␤in Main (src/gen_setting.pm:3390)␤»
mzedeler I want to push a pair in a list like so, but its not working. Any ideas why?
Tene rakudo: my @a; @a.push(1 => 2); 19:22
p6eval rakudo 0d4fe0: ( no output )
Tene rakudo: my @a; @a.push: 1 => 2;
p6eval rakudo 0d4fe0: ( no output )
Tene you need to use one of those. You can't just use whitespace.
jnthn std: my @a; @a.push 1 => 2;
p6eval std 27999: OUTPUT«===SORRY!===␤Confused (two terms in a row?) at /tmp/ajd1Vw8BXX line 1:␤------> my @a; @a.push ⏏1 => 2;␤ expecting any of:␤ bracketed infix␤ infix stopper␤ standard stopper␤ statement modifier loop␤ terminator␤FAILED 00:02 38m␤»
mzedeler It seems to work with parens...
jnthn mzedeler: Yes, parens required.
Tene mzedeler: yes, like I said. Parens or a colon.
mzedeler rakudo: my @a; @a.push(1 => 2); say @a.perl
p6eval rakudo 0d4fe0: OUTPUT«[1 => 2]␤»
mzedeler ...but is that because the 1 then becomes interpreted as a named parameter? 19:23
Tene std: my @a; @a.push 1;
p6eval std 27999: OUTPUT«===SORRY!===␤Confused (two terms in a row?) at /tmp/PHsy7kxIFp line 1:␤------> my @a; @a.push ⏏1;␤ expecting any of:␤ bracketed infix␤ infix stopper␤ standard stopper␤ statement modifier loop␤ terminator␤FAILED 00:02 38m␤»
Tene No, it isn't.
You need parens or a colon for method calls. 19:24
jnthn No, it's just because Perl 6 syntax requires arguments to method calls to follow a colon or be in parens.
mzedeler Sorry. That was really basic. Hmmm. Still lots to learn.
Thanks!
I'll go back to my code now.
Tene That's fine. No problems. :)
I do that all the time.
mzedeler There is a lot to learn. Really. 19:25
jnthn For sure.
19:26 ZuLuuuuuu left 19:28 gdickie left
dukeleto jnthn: mind taking a gander at this? gist.github.com/168433 19:29
jnthn: I am having trouble building rakudo with an installed parrot
jnthn That's...odd. :-/ 19:41
masak mzedeler: I'm picking up expecant vibes from people who have heard that you're going to send an email to p6l about nextsame et al. 19:42
mzedeler: I'm looking forward to it also.
mzedeler Hehe. Yes. Will do. Right now I am just writing code to get a better idea about the whole thing.
But I am reading S12 on the side.
jnthn dukeleto: Does /usr/local/lib/parrot/1.4.0-devel/library/PCT/HLLCompiler.pbc 19:43
exist?
(nextsame) Eek, best get my grant final report in before the spec moves! ;-)
masak mzedeler: goodie.
mzedeler jnthn: I am happy with nextsame and friends, but .*, .+ and some other wierd invocation rites really has me scared. 19:44
jnthn mzedeler: .*, .+ and .? do not really interact with nextsame and friends.
masak jnthn: they don't? o_O
mzedeler Sounds somewhat strange to me too. 19:45
jnthn masak: $foo.@candidates and $foo.*@things_to_call mean different things.
masak jnthn: oh, I look forward to understanding in what way. :)
dukeleto jnthn: no it does not. /usr/local/lib/parrot/1.4.0-devel/library/PCT does not seem to exist
jnthn The first means "instead of the dispatcher computing the candidate list that we can defer through on nextsame et al, here is the list to use". 19:46
The second means "I want you to call all of these methods on $foo"
If you have $foo.bar and in bar it does a nextsame, that works out just fine. It just defers to the next candidate that the dispatcher finds. 19:47
$foo.*bar walks through all candidates and individually invokes them.
mzedeler But what about interactions between $foo.*bar and nextsame?
jnthn A nextsame in an individual invocation does not influence the outer "todo list".
Also, if you're using $foo.*bar and $foo.+bar you really should have written classes that expect to be invoked that way. 19:48
mzedeler Yes, but I guess it will result in many calls to the parent class.
jnthn Right.
mzedeler Why do we want that?
jnthn Hell knows, I didn't spec it, I just implement this stuff. ;-)
$foo.?bar is *the* really useful one, IMO.
mzedeler Sure. I think its a good attitude.
Agreed.
jnthn .+ and .* to be honest I have yet to find a really good use-case for. 19:49
mzedeler Same here.
masak but doesn't BUILDALL call BUILD with .* ?
mzedeler Something much more mundane: I guess this autoextension of arrays is not intended?
rakudo: my @a; say @a.perl; say "Not defined" if not @a[10]; say @a.perl 19:50
p6eval rakudo 0d4fe0: OUTPUT«[]␤Not defined␤[undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef]␤»
jnthn mzedeler: No, known rakudo bug.
mzedeler Okay. Thanks.
19:50 KyleHa left
mzedeler I'll go back to my binary tree :-) 19:50
jnthn masak: Maybe you could implement it that way *but* it'd be a .*@foo form, since BUILD is descendent, and .* by default is ascendent. 19:51
Oh
And also it's meant to work a bit more like a subcall. 19:52
dukeleto jnthn: chromatic learned me. i wasn't doing a "make install-dev", only "make install"
jnthn dukeleto: OH!
chromatic++
:-)
mzedeler: I guess with .+ and .* I'd be more convinced of them if I saw a use-case. 19:53
I guess there's some argument that since we have .? they follow on logically.
mzedeler I can see that, but just like the eq= operator, some tuples in such logical "cross products" may better be left unimplemented. 19:54
jnthn Aye. 19:55
mzedeler But I understand I have to appeal to higher authorities to change it :-)
jnthn That's fine, I think it's a discussion very much worth having. 19:56
20:07 avi2702 left, avi2702 joined 20:09 unitxt_ left 20:10 unitxt joined 20:14 molaf left
mzedeler Have to go. Thanks for the chat. 20:15
20:15 mzedeler left 20:16 molaf joined 20:20 tak11 joined 20:35 ZuLuuuuuu joined 20:38 takadonet1 joined 20:39 takadonet1 left 20:41 jferrero left
masak ok, overriding .new: 20:47
rakudo: class A { has $.foo; multi method new($foo) { self.new(:$foo) } }; say A.new("OH HAI").foo
p6eval rakudo 0d4fe0: OUTPUT«Use of uninitialized value␤␤» 20:48
masak I'd have expected the output to be "OH HAI".
jnthn rakudo: class A { has $.foo; multi method new($foo) { say "here"; self.new(:$foo) } }; say A.new("OH HAI").foo 20:51
p6eval rakudo 0d4fe0: OUTPUT«here␤Use of uninitialized value␤␤»
masak I smell a bug.
TimToady masak's looks like an infinite regress to me 20:52
masak oh!
jnthn I'm not sure why it *doesn't* infinitely recurse in fact...
TimToady generally a new method should call bless
masak because of the implicit *%_ ?
jnthn masak: Right.
masak TimToady: yes, but I thought I was delgating to Object.new...
TimToady if you want to do that really, then use nextwith() 20:53
masak ah.
jnthn rakudo: class A { has $.foo; method new($foo) { nextwith(:$foo) } }; say A.new("OH HAI").foo
p6eval rakudo 0d4fe0: OUTPUT«too many named arguments - 'foo' not expected␤in method A::new (/tmp/jzORENr8ct:2)␤called from Main (/tmp/jzORENr8ct:2)␤»
masak jnthn: should that have worked?
jnthn Hmm 20:54
rakudo: class A { has $.foo; method new($foo) { say "ok" } }; say A.new("OH HAI")
p6eval rakudo 0d4fe0: OUTPUT«ok␤1␤»
20:54 zamolxes left
jnthn I think so. I'm not quite sure what in tried to call. :-/ 20:55
masak submits rakudobug
jnthn rakudo: class A { has $.foo; method new($foo) { callwith(:$foo) } }; say A.new("OH HAI").foo
p6eval rakudo 0d4fe0: OUTPUT«too many named arguments - 'foo' not expected␤in method A::new (/tmp/XsEak2AokJ:2)␤called from Main (/tmp/XsEak2AokJ:2)␤»
jnthn rakudo: class A { has $.foo; method new($foo) { callwith($foo) } }; say A.new("OH HAI").foo
p6eval rakudo 0d4fe0: OUTPUT«Method 'foo' not found for invocant of class 'Str'␤» 20:56
jnthn Oh! :-/
masak seems to be something to do with the invocant...
jnthn Well
Kinda.
Hmm. I'm not sure off-hand why that doesn't work. 20:57
masak but it should, so it goes on the RT pile.
jnthn One of the annoyances of implementing callwith and nextwith is that in the case of them being used to defer to another method, they need to find and pass on the invocant. 20:58
Whereas in the case of a wrap, they maybe don't.
masak ah. tricky. 20:59
jnthn Yeah.
It'd not surprise me if we have bugs there.
21:04 sri_kraih_ left 21:05 sri_kraih joined 21:06 masak left 21:12 arthur-_ left, sri_kraih_ joined, arthur-_ joined 21:13 sri_kraih left 21:15 jaldhar_ left 21:23 iblechbot left 21:24 mzedeler joined
mzedeler rakudo: my $i = "abc"^.. "def"; print $i.ACCEPTS("abc") 21:25
p6eval rakudo 0d4fe0: OUTPUT«0»
mzedeler Thats really nice. The range operator is a range constructor and it supports open as well as closed intervals. Wow.
jnthn :-)
21:27 molaf left
mzedeler I found that the spec mentions eqv and cmp /subs/ (not infix operators) taking a third canonization closure. They seem to be missing? 21:27
jnthn didn't know about those. 21:39
Where in the spec are they? S03?
mzedeler Yes. See "Comparison semantics". 21:40
perlcabal.org/syn/S03.html#Comparison_semantics
It may also be me who (again) didn't get the invocation syntax right. 21:41
rakudo: say eqv({+$^a}, 1, 2) 21:42
p6eval rakudo 0d4fe0: OUTPUT«Could not find non-existent sub eqv␤»
mzedeler By the way, I have a somewhat unrelated question: how do I put a range object in an array, and retrieve the range object again? I don't want it to expand. 21:53
rakudo: my $i = 1 ^.. 10; print $i ~~ 1; my @a; @a.push($i); say @a.perl; 21:54
21:54 pmurias left
p6eval rakudo 0d4fe0: OUTPUT«0[2, 3, 4, 5, 6, 7, 8, 9, 10]␤» 21:54
mzedeler Expected: [1^..10]
22:01 ZuLuuuuuu left
jnthn mzedeler: Ah, I think those functions are just not yet implemented in Rakudo. 22:03
If you can work out how to write implementations for them in Perl 6, then we can always add them to the setting. :-)
mzedeler I came to the same conclusion. It seems that I may be able to write them. 22:04
Will look into that.
jnthn mzedeler: You can enclose it as a nested array perhaps
rakudo: my $i = 1 ^.. 10; print $i ~~ 1; my @a; @a.push([$i]); say @a.perl;
p6eval rakudo 0d4fe0: OUTPUT«0[[2, 3, 4, 5, 6, 7, 8, 9, 10]]␤»
jnthn heh, nope.
mzedeler But the nested arrays would still expand... 22:05
jnthn yeah
So I see.
mzedeler :-)
jnthn Maybe something capture-ish...
mzedeler I can always put them in some kind of opaque container object, but that is a hack.
jnthn Though I fear that may do the same...
rakudo: my $i = 1 ^.. 10; print $i ~~ 1; my @a; @a.push(\($i)); say @a.perl;
p6eval rakudo 0d4fe0: OUTPUT«0[1^..10]␤»
mzedeler Wow!
Nice.
A reference? 22:06
jnthn Captures are kinda reference-ish, yes.
But a bit more than that.
mzedeler I have a lot to learn. Thanks for your time.
jnthn No problem. 22:07
22:21 mzedeler left 22:32 lucychili is now known as adhoc 22:34 sri_kraih_ left, carlin joined 23:08 szabgab_ joined 23:14 tak11 left 23:18 szabgab left 23:22 libnoon joined 23:24 M_o_C left 23:58 Limbic_Region joined