»ö« 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.
jnthn SSTable :P 00:00
I'm not so hot on putting it an extra pointer away though...
Tene where the metamodel secret polcie eat? 00:01
jnthn sorear: If anything I'd hang it off the S-Table and also hang the HOW directly off the STable. Maybe.
masak Tene: nitpick: the SS weren't the secret police, they were part of the military. 00:03
sorear phenny: tell pmurias ehspan takes labels for start/end because that was the simplest way in the C# age, and there's no in principle reason to forbid overlapping 00:04
phenny sorear: I'll pass that on when pmurias is around.
masak Tene: you might be thinking about the Stasi.
sorear phenny: tell pmurias Is there correct JSON for 1/0? If so, I'll fix JSYNC.cs, either way niecza should not be generating Inf in nam trees 00:05
phenny sorear: I'll pass that on when pmurias is around.
Tene masak: I'm insufficiently-informed about that, actually. There was a really good book I started reading about it, though... I wonder which it was...
TimToady proposes that if DHS is going to go after copyright infringers, it should rename itself to DHAA. 00:06
00:06 dukeleto left
Tene AA? 00:06
TimToady as in RIAA and MPAA :)
00:07 dukeleto joined
Tene department of homeland association of america? 00:08
TimToady
.oO("Hello, my name is Walt D. and I'm addicted to movie receipts.")
00:09
masak
.oO("Walt, what are you doing up in the middle of the next century? Get back in the canister of liquid nitrogen, right now!")
00:14
jnthn phenny: tell pmichaud I'll probably branch Rakudo tomorrow. Can mostly ignore $dayjob tomorrow and hack on Perl 6 stuff. \o/ 00:15
phenny jnthn: I'll pass that on when pmichaud is around.
sorear pmichaud: When you figure out the semantics of ? again, I'd like to hear them 00:17
TimToady we discussed it earlier today 00:18
if you mean the ? I think you mean
dalek p-rx/nom: 6e82a8e | jonathan++ | / (4 files):
First cut at role summation, so a class can do multiple roles (and if this works then probably so does roles doing roles). Took a couple of liberties since NQP doesn't have roles with anything other than $?CLASS being generic. Can beat my brane up with the harder case when doing Rakudo's meta-objects.
00:19
00:19 rgrau left
jnthn Think I got most of what I need to dig into Rakudo changes now. \o/ 00:22
Modulo loads of little improvements to nqp here and there.
masak jnthn++
++jnthn
:)
jnthn But think my blockers are cleared. :)
dalek p-rx/nom: 2b9c270 | jonathan++ | t/nqp/56-role.t:
Some basic tests for roles, especially $?CLASS genericity.
00:29
sorear eagerly anticipates jnthn++ clearing sorear's own blockers 00:30
jnthn sorear: Well, I've got the roles bit done. I'll have to think about subset etc soon :) 00:31
tadzik oh oh oh, rakudo branch tomorrow?
jnthn: when is tomorrow in your TZ? :)
jnthn tadzik: We're in the same TZ :)
tadzik ...crap :)
jnthn tadzik: I meant pmichaud's tomorrow ;)
It's actually our today :) 00:32
tadzik \o/
shame I should be sleeping now
Tene pmichaud's time will be 00:00 in about 7.5 hours
jnthn While I don't ahve to get up tomorrow too early, I will every day for the rest of the week.
Tene iirc
jnthn So if I stay up late hacking I'll hate myself for the rest of the week. :)
tadzik :P 00:33
dalek p-rx/nom: 67623b5 | jonathan++ | t/nqp/56-role.t:
Few more tests.
tadzik I had this during my holidays. Hacking later and later at night, to eventually hack all night long and not sleep at all so I'll sleep on some sensemaking hour the next day
...if you know what I mean :) 00:34
jnthn :) 00:35
masak yeah. I do that sometimes too.
jnthn Here in summer it barely bothers to get dark anyway
Tene those are some of my favorite holidays
jnthn So there's less incentive to sleep at "normal times" :) 00:36
00:36 cdarroch left
Tene almost all of the code I've written that's worth anything was written after midnight. 00:38
TimToady it's always after midnight
sorear doubts he'll get any significant hacking done this month except on weekends 00:39
coldhead "Because Perl 6 is rapidly changing, we'll publish a revised edition of the book every year until Perl 6.0.0 is released." -- The Forward to Perl 6 And Parrot Essentials, 2004 :(
masak coldhead: that got revised, too. :/ 00:40
TimToady never promise anything in a book
sorear as time permits, my agenda for this week is Z, X, SSTables 00:41
flussence rakudo: 1 ZXZXZXZXZXZXZ 2 00:52
p6eval rakudo a37640: OUTPUT«(timeout)»
flussence hopefully niecza is faster than that :)
sorear What's the correct output? 00:53
flussence IIRC, for 1 item each side, everything after the first metaop is a no-op
so (1 Z 2)
TimToady rakudo: 1 ZXZ 2 00:54
p6eval rakudo a37640: ( no output )
TimToady rakudo: say 1 ZXZ 2
p6eval rakudo a37640: OUTPUT«12␤»
TimToady rakudo: say 1 ZXZXZ 2
p6eval rakudo a37640: OUTPUT«12␤»
TimToady rakudo: say 1 ZXZX 2
p6eval rakudo a37640: OUTPUT«12␤»
sorear flussence: niecza starts up so slow that a cold cache is enough to make p6eval time out and you need to retry stuff :/ 00:55
flussence ouch
sorear niecza: my $x = 0; $x++ until $x == 1_000_000; say $x;
p6eval niecza v2-27-g1829f46: OUTPUT«1000000␤»
jnthn rakudo: my $x = 0; $x++ until $x == 1_000_000; say $x; # curious, does it make it... 00:56
TimToady doubtful
p6eval rakudo a37640: OUTPUT«(timeout)»
jnthn FAIL
flussence aww
sorear niecza: my $x = 0; $x++ until $x = 2_000_000_000; say $x;
p6eval niecza v2-27-g1829f46: OUTPUT«2000000000␤»
TimToady O_o
flussence oh come on, now you're just showing off! 00:57
TimToady oh wait
heh
jnthn lol :)
Tene :P
Tene lol
TimToady rakudo: my $x = 0; $x++ until $x = Inf; say $x; 00:58
p6eval rakudo a37640: OUTPUT«Inf␤»
TimToady beatcha!
flussence rakudo can do infinite loops faster than linux \o/ 00:59
TimToady it's only half of infinity, since it starts in the middle
jnthn rakudo: my $x = -Inf; $x++ until $x = Inf; say $x; 01:00
p6eval rakudo a37640: OUTPUT«Inf␤»
jnthn \o/
TimToady rakudo: say so NaN; # oreally? 01:01
jferrero niecza: my $x = 0; $x++ until $x == 2_000_000_000; say $x;
p6eval rakudo a37640: OUTPUT«Bool::True␤»
niecza v2-27-g1829f46: OUTPUT«(timeout)»
jnthn TimToady: That surprises me a bit. 01:02
TimToady I can just get my head around Inf being true
jnthn Yeah, it's > 0.
er, != 0 01:03
TimToady but I almost think NaN.defined should be false
jnthn But all comparrisions with NaN should be false.
Well, or that.
TimToady rakudo: say NaN.defined
p6eval rakudo a37640: OUTPUT«Bool::True␤»
jnthn rakudo: say NaN != 0 01:04
p6eval rakudo a37640: OUTPUT«Bool::True␤»
jnthn oh..
TimToady rakudo: say NaN == NaN
p6eval rakudo a37640: OUTPUT«Bool::False␤»
TimToady rakudo: say Inf == Inf
p6eval rakudo a37640: OUTPUT«Bool::True␤»
jnthn TimToady: Note that any NaN comparision likely returns false, but the meta-operator negates that and gives us true.
TimToady: e.g. we're not getting the != result of two NaNs, but !(NaN == NaN) 01:05
I think that's what's going on, anyways.
TimToady I think I'm fine with that :)
jnthn OK :)
I'm not sure what NaN != NaN does in C, tbh.
TimToady I think of NaN as a very lightweight failure 01:07
Tene rakudo: say NaN == Inf 01:08
p6eval rakudo a37640: OUTPUT«Bool::False␤»
TimToady rakudo: say -1/0; say 1/-0
p6eval rakudo a37640: OUTPUT«-Inf␤Inf␤»
masak ?(NaN == NaN) is supposed to be True.
er, False. 01:09
TimToady rakudo: say NaN === NaN
p6eval rakudo a37640: OUTPUT«Bool::False␤»
masak that is correct, IMU.
Tene rakudo: say NaN < Inf
p6eval rakudo a37640: OUTPUT«Bool::False␤»
TimToady that one could be true, since it's asking a non-numeric question
masak hm, true.
didn't see the third = :)
masak submits rakudobug 01:10
01:10 vmspb left
TimToady the problem with 1/0 being Inf is that you don't know whether the 0 underflowed from positive or negative 01:11
01:11 leprevost joined
TimToady well, unless your floater preserves the sign 01:11
jnthn "my floater" :)
TimToady dunno what IEEE has to say about that
jnthn figgers it's time for sleep 01:12
flussence hm, I just tried some C with printf("%d", 0.0/0.0 == 0.0/0.0);
printed "0"
masak TimToady: I've wondered about that too.
TimToady if we can get -0 output, seems like we should be able to input it too :)
jnthn: o/
jnthn night o/
TimToady rakudo: say -0.0 01:13
p6eval rakudo a37640: OUTPUT«0␤»
01:13 RichiH left
TimToady rakudo: my $n = -1.0e0; $n /= 2 until $n == 0; printf "%f\n", $n; 01:14
p6eval rakudo a37640: OUTPUT«-0.000000␤»
TimToady cool
rakudo: my $n = -1.0e0; $n /= 2 until $n == 0; say 1/$n 01:15
p6eval rakudo a37640: OUTPUT«Divide by zero␤ in 'infix:</>' at line 3734:CORE.setting␤ in 'infix:</>' at line 3735:CORE.setting␤ in main program body at line 22:/tmp/ofJW6VIoaE␤»
TimToady aww
masak wow! an actual Divide by zero :)
TimToady rakudo: my $n = -1.0e0; $n /= 2 until $n == 0; say Rat.new(1,$n) 01:16
p6eval rakudo a37640: OUTPUT«too many positional arguments: 3 passed, 1 expected␤ in main program body at line 22:/tmp/lOk0aLsXQM␤»
masak 'night, #perl6 01:17
TimToady niecza: my $n = -1.0e0; $n /= 2 until $n == 0; say 1/$n
p6eval niecza v2-27-g1829f46: OUTPUT«===SORRY!===␤␤Action method escale not yet implemented at /tmp/KPxJZhm08u line 1:␤------> my $n = -1.0e0⏏; $n /= 2 until $n == 0; say 1/$n␤␤Action method dec_number not yet implemented at /tmp/KPxJZhm08u line 1:␤------> my $n =
..-1.0e0⏏…
TimToady masak: \o
01:17 masak left 01:20 REPLeffect left 01:22 REPLeffect joined
sorear niecza: my $n = -1; $n /= 2 until $n == 0; say 1/$n 01:22
p6eval niecza v2-27-g1829f46: OUTPUT«-Infinity␤»
sorear TimToady: I suppose you've heard of the real projective line?
read some fascinating stuff yesterday 01:23
apparently there was a significant debate in the IEEE-754 committee on whether Inf should be signed
if Int is its own negation, then 1/x is continuous at 0
however it gets trickier for stuff like exp(x), which would need to have a branch cut at Inf 01:25
TimToady niecza: say Int == -Int # :)
p6eval niecza v2-27-g1829f46: OUTPUT«===SORRY!===␤␤Preceding context expects a term, but found infix == instead at /tmp/gUWsFCbJx8 line 1:␤------> say Int ⏏== -Int # :)␤␤Parse failed␤␤»
sorear Inf :)
TimToady rakudo: say Int == -Int # :) 01:26
p6eval rakudo a37640: OUTPUT«Bool::True␤»
TimToady niecza: say Int.WHAT
p6eval niecza v2-27-g1829f46: OUTPUT«===SORRY!===␤␤Undeclared name:␤ 'Int' used at line Any()1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/SAFE.setting line 377 (SAFE die @ 2)␤ at /home/p6eval/niecza/src/STD.pm6 line 1156 (STD P6.comp_unit @ 74)␤ at
../home/p6eval/niecza/src…
01:30 jevin joined
diakopter heh 01:46
sorear heh? 01:53
TimToady heh! 01:57
diakopter nm 01:58
I mean, hm
02:00 noganex joined 02:01 noganex_ left
TimToady sorear: why doesn't niecza's make force compilation of the setting? 02:03
seems like it would a trivial thing to do, just run the first run yourself 02:04
02:17 felliott joined 02:18 c1sung left
sorear I don't remember 02:21
Is Perl 6 going to do any gsoc stuff? 02:22
TimToady hope so, but someone with managerial skills needs to champion it 02:25
sorear TimToady: what's your take on the correct value of ["abc" ~~ /abc/] ? 02:27
02:28 leprevost left, am0c joined
TimToady an item is still an item in list context, so I'd say [Match] 02:40
02:46 whiteknight left 02:47 ymasory joined
sorear TimToady: What about ["abc" ~~ /(.)(.)(.)/] ? 02:50
TimToady [Match,Match,Match]
sorear TimToady: So without any subcaptures the match should be returned as an item? 02:57
TimToady it seems likeliest not to lose info the user expects 02:58
02:58 c1sung joined 03:24 benabik_away is now known as Benabik, Benabik is now known as benabik
sorear TimToady: do unsuccessful matches have distinguishing qualities? 03:31
right now niecza uses the Match type object as the return value for all unsuccessful matches 03:32
03:36 orafu left 03:39 plobsing joined 04:02 satyavvd joined 04:04 am0c left, am0c joined 04:17 ryan__ left 04:23 Su-Shee_ joined 04:26 Su-Shee left 04:27 Limbic_Region left 04:30 felliott left 04:34 nadim_ left 04:35 nadim_ joined 04:37 benabik is now known as benabik_away
TimToady a false Match object is fine 04:58
05:05 envi joined 05:16 _jaldhar joined 05:17 aindilis left 05:18 aindilis joined, jaldhar left 05:22 simcop2387 left 05:23 simcop2387 joined 05:37 stifynsemons joined 06:00 eternaleye joined 06:01 eternaleye left, eternaleye joined 06:04 kvijayasarathy joined 06:06 kvijayasarathy left, kvijayasarathy joined
dukeleto <2 hours for OSCON proposals, in case anybody was wondering 06:07
sorear: i will try to make gsoc happen again. you applying this year? 06:10
TimToady some people in Kharagpur were interested in doing gsoc; I told them to hang out here and someone would tell them what to do :) 06:13
06:16 wiseguyxp joined 06:21 kaare_ joined 06:27 kvijayasarathy left
sorear What do the people in Kharagpur want to do with Perl 6? 06:30
TimToady they weren't specific in their question (it was in a large group), but I said that if they had any good ideas, tpf would certainly want to hear them 06:32
sorear is not very familiar with the Indian Perl community...
dukeleto TimToady: feel free to direct anybody interested in GSoC+Perl to me 06:34
dukeleto tries to be useful
TimToady thanks 06:35
06:36 cosimo left
sorear dukeleto: when do I have to decide? 06:36
dukeleto sorear: not for a few months 06:37
sorear: the next few months is when the org has to apply, i don't think students apply until april-ish, iirc 06:38
sorear: but you should definitely be thinking of what kind of project you want to work on
sorear: something that you know you can complete in 3.5 months, with a breakdown of deliverables and a timeline 06:39
sorear: i assume it will be something in niecza, you just have to choose the something :)
06:40 cjk101010 joined
sorear Don't I need a mentor? 06:42
06:44 mayuresh joined
dukeleto sorear: the way it works is that mentors apply to the org, and then the org admin pairs each accepted student with a mentor. Of course, if you have a good mentor in mind and you can get them to sign up, that can work too :) 06:46
sorear: and we usually like to assign a backup mentor, so if the main mentor goes on vacation or is incommunicado, the student doesn't get left without help
sorear dukeleto: what I mean is that there is no-one who knows the niecza codebase better than I
dukeleto sorear: that isn't important. Your mentor just needs to be able to help you in a general way and make sure you hit your milestones 06:47
sorear: you are not the average student, that needs lots of help. Your mentor will mostly be symbolic :) 06:48
sorear: if you apply and are accepted, that is. All the mentors that sign up get to vote on the GSoC proposals
sorear: we usually get around 10 student slots, so the top 10 rates proposals get into GSoC 06:49
s/rates/rated/
06:50 mayuresh left 06:56 mtk left 07:01 wtw joined 07:04 mtk joined 07:13 colomon left
dalek ecza: 90a4b2f | sorear++ | src/niecza:
Hack Inf to not generate invalid JSON
07:14
07:27 kst left
dalek ecza: 3f20992 | sorear++ | / (2 files):
Regex matches without a $0 return $/ in list context (TimToady, moritz)
07:31
sorear -> sleep 07:34
07:34 kjeldahlw joined, colomon joined 07:38 colomon left 07:45 colomon joined
moritz_ good morning 07:46
diakopter / 07:53
moritz_ \
07:53 colomon left 08:00 Su-Shee_ is now known as Su-Shee 08:02 colomon joined 08:04 justatheory left, justatheory joined 08:08 justatheory left 08:14 Mowah joined 08:18 brill joined 08:26 agentzh joined
moritz_ phenny tell masak that RT #83622 rips the IRC conversation seriously out of context. On IRC, the " 08:34
phenny: tell masak that RT #83622 rips the IRC conversation seriously out of context. On IRC, the "that one could be true" refers to a line not even included in the ticket text.
phenny moritz_: I'll pass that on when masak is around.
moritz_ seems it's ilbot hacking season again :-) 08:43
irclog.perlgeek.de/perl6/2011-02-08#i_3265501 # if you have js active, the specific line is now hilighted, and you can identify it even if it's at the bottom of the screen 08:44
DaTa++ for the patch :-)
08:46 wiseguyxp left 09:04 tzhs joined
moritz_ tadzik: will you go to YAPC::Russia? 09:06
14th and 15th of May
tadzik moritz_: oh, unlikely. Dutch Perl Workshop is alredy killing my economics, and YAPC::EU is still on the calendar 09:07
but, how far from home is it?
moritz_ it's in Moscow
tadzik hell far then. No, I don't think so :( 09:08
LoRe moritz_: i'm the evil brother LoRe in here ;)
09:11 Su-Shee left, Su-Shee joined 09:12 skangas_ joined 09:13 skangas left, skangas_ is now known as skangas
moritz_ LoRe++ then 09:18
09:26 tzhs left 09:27 tzhs joined 09:33 dakkar joined 09:34 daxim joined 09:37 Su-Shee left 09:38 Su-Shee joined 09:41 VXZ joined 09:48 kjeldahl left, kjeldahl_ joined 09:49 nadim_ left 09:57 zenog joined 10:00 VXZ left
zenog sorear: Are there plans to support decimal number literals in Niecza? Is there a way that I can accelerate this? (i.e. if it is not too complicated to implement, tell me where I should start and I'll try myself if you are busy ;-) 10:11
flussence moritz_: that highlight thing can be made to work without JS, use a :target CSS selector 10:13
10:17 kjeldahl joined 10:19 kjeldahl_ left, Gothmog_ left, Gothmog_ joined
moritz_ flussence++ 10:20
moritz_ tries it
deployed it. Can anybody please test it (for example irclog.perlgeek.de/perl6/2011-02-08#i_3265601 ) with JS disabled? 10:22
I can't easily disable JS at $work :(
gfldex moritz_: if the background of the first column is supposed to be yellow, it works with JS disabled 10:24
moritz_ actually I would have preferred the whole row to be yellow 10:25
thanks gfldex++
flussence you'd have to move the i_* id to the <tr> to highlight the whole row 10:26
moritz_ right 10:27
flussence
.oO( why doesn't CSS have a "<" operator? )
gfldex moritz_: mind the colour blind plox
flussence yellow should be safe... 10:28
moritz_ gfldex: how could I help the colour blind? make it bold?
gfldex the first column in a different colour is fine
moritz_ gfldex: is it better than having the whole row in a different color? 10:29
gfldex there is a simple rule of thumb: if it got text, let it have high contrast
if somebody got a problem with yellow background, the first column would hurt least 10:30
moritz_ ah, I see the point
flussence here's a webpage colour blindness simulator: chrome.google.com/extensions/detai...f?hl=en-gb
jnthn morning o/ 10:31
flussence (it doesn't seem to work on my browser though :( ) 10:32
oh, there it goes
10:33 kjeldahl_ joined
moritz_ change pushed. 10:33
10:34 kjeldahl left
moritz_ now it only relies on the CSS 10:34
flussence++
gfldex++
\o jnthn
10:37 colomon left 10:43 Intensity left 10:44 colomon joined
gfldex if rakudo says "Died", where could that come from? 10:55
jnthn A die without a message, most probably
moritz_ rakudo: die
p6eval rakudo a37640: OUTPUT«Died␤␤ in main program body at line 22:/tmp/ib2mgbaS_r␤»
gfldex i have not a single die in that script :-/ 10:56
gfldex starts digging
moritz_ gfldex: do you get a backtrace? 10:57
gfldex i do 10:58
10:58 kaydsoft left 10:59 kaydsoft joined
jnthn That'll probably be revealing. :) 10:59
11:01 coldhead left
moritz_ including spicey secrets like line numbers and routine names 11:01
gfldex I do have a die in my script o.0. Maybe some coffee will help.
11:06 am0c left 11:07 masak joined
masak ahojte, zebras! 11:08
phenny masak: 08:34Z <moritz_> tell masak that RT #83622 rips the IRC conversation seriously out of context. On IRC, the "that one could be true" refers to a line not even included in the ticket text.
masak checks
generally, I tend to rip the IRC conversations out of context, but I tend to do it along sensible seams... 11:09
moritz_ I know
I was just surprised, because the ticket read contrary to what I remembered from the backlog
masak moritz_: are you referring to irclog.perlgeek.de/perl6/2011-02-08#i_3264744 ? 11:10
because I don't believe TimToady was referring to that evalutaion. that *is* a numerical question. 11:11
moritz_ masak: yes
masak (and that's why I removed it)
moritz_ hm
masak the === one however, is decidedly not numerical.
gfldex I'm parsing a slurped file with Grammar::parse. Is there any way to get hold of the line number the grammar is parsing (when I let it die dies)?
moritz_ masak: you might be right
masak gfldex: excellent question. 11:12
11:12 orafu joined
moritz_ gfldex: $/.orig.substr(0, $/.from) <-- count the newlines in here, add 1 11:12
masak moritz_: $/.from is where the match starts. 11:13
perhaps better to use $/.CURSOR.pos
moritz_ depends on what you want to do, and where you want to do it
but yes, might be better
gfldex $/.CURSOR.pos is the position in chars from the beginning. For some strange reason my editor shows only line and column. :-> 11:16
moritz_ gfldex: that's why you need to count the newlines
masak wrap it in a sub to abstract it away.
moritz_ rakudo: sub line-no($str, $pos) { 1 + $str.substr(0, $pos).comb(/\n/) } 11:17
p6eval rakudo a37640: ( no output )
gfldex would it be worth thinking about $/.CURSOR.line ?
moritz_ rakudo: sub line-no($str, $pos) { 1 + $str.substr(0, $pos).comb(/\n/) }; say line-no("a\nb\nc\n", 3)
p6eval rakudo a37640: OUTPUT«2␤»
masak gfldex: bring it up with TimToady :) 11:18
moritz_ gfldex: I'd too love a way to access the line number easily, I just don't know if $/.CURSOR.line is the right way 11:19
somehow it feels that $/.CURSOR is an implementation detail, and shouldn't be exposed too much
masak aye. and that its responsibility isn't line numbers.
gfldex I'm parsing by line anyway, so my solution is quite simple. But I'm for sure not the last person who wants to annoy his users with proper error messages while parsing. _And_ Perl5 is doing it properly by letting die magicly knowing where it is in the <>-operator. 11:21
gfldex looks in The Book That Should Not Be Known for the ritual to summon TimToady attention of the above. 11:22
moritz_ gfldex: the line number is available from the file handle
rakudo: say ~$*OUT.^methods(:local) 11:23
p6eval rakudo a37640: OUTPUT«close eof get ins lines open print printf say read write getc slurp t d e f s l z created modified accessed changed autoflush path stat␤»
moritz_ rakudo: get(); say $*IN.ins
p6eval rakudo a37640: OUTPUT«Any()␤»
moritz_ might be buggy :(
jnthn rakudo: $*IN.get; say $*IN.ins
p6eval rakudo a37640: OUTPUT«1␤» 11:24
jnthn rakudo: $*IN.get for 1..5; say $*IN.ins
p6eval rakudo a37640: OUTPUT«5␤»
moritz_ ah, get() defaults to $*ARGS
not $*IN
my bad
gfldex There might be no file handle involved but there may still be lines. So it may have to end up with Grammar. 11:25
moritz_ right 11:27
gfldex It might want to be a friend of $?FILE and $?LINE;
moritz_ I don't think so
masak hm, those are compile-time variables.
moritz_ point is, you can parse mutliple strings at the same time 11:28
gfldex why did i just end a sentence with ';'? o.0
moritz_ so a variable of any kind would imply ambiguty about which string it refers to
so it's better to go through a method on the current grammar, match object or cursor or so 11:29
gfldex What means it would need to be limited to a .parse that takes a file handle.
11:31 _jaldhar left, _jaldhar joined 11:32 Helios left 11:34 Helios joined
gfldex grammar Foo { my $curr_line; token TOP { ^ <line>+ $ }; token line { <foo> '<-' <bar> { $curr_line++ } }; token bar { <some_other_stuff> | { die "OHHNOSE did not find stuff at line $curr_line"; } } 11:37
That works for me. There might be blogging. 11:38
11:38 shi joined
gfldex err that my $curr_line needs additional = 0; 11:38
11:43 satyavvd left 12:02 kaydsoft left, kaydsoft joined 12:05 Helios left 12:06 Helios joined 12:07 icwiener joined
masak moritz_: I like the idea with highlighting the row in the clogs, but would it be possible to make it a brighter yellow? say, halfway between the current nuance and #fff? 12:13
moritz_ masak: sure. You have commit access :-) 12:37
or I can change it later on too
masak where's irclog at? 12:45
moritz_ github.com/moritz/ilbot 12:46
masak thanks.
moritz_ change pushed
masak ah, just saw it :) 12:47
moritz_ if you don't like the new color, it's in cgi/style.css
masak yes, #ff6 sounds like the right one.
for some reason the default 'yellow' makes me frown :(
moritz_ it was quite a contrast to the otherwise soft colors of the page 12:49
masak that, too. 12:52
12:52 bluescreen joined
masak well, the point of the yellow is to stand out, but there are different ways to stand out :) 12:52
12:57 vutekija joined
moritz_ anyway, I'm quite happy with the way the IR clogs are developing 12:58
they don't change much, but I'm pretty sure that all change is for the better (even if it sometimes takes several iterations)
13:00 mtk left 13:06 mtk joined 13:14 MayDaniel joined
masak I'm a firm believer in iterations. 13:18
13:25 mtk left 13:30 mtk joined
szabgab I have not looked at the logs of the channel yet, have any refugees of my Perl 6 talk at FOSDEM arrived? 13:34
moritz_ I haven't noticed any
jnthn I noticed one yesterday 13:35
moritz_ I skipped most of yesterday's backlog 13:36
13:36 plainhao joined
tadzik there were two or three 13:37
masak szabgab++
szabgab so there was a discussion at one of the dinners if it would be feasible to *run* a wiki in Perl 6 today? 13:38
assuming that the pages are served as static files generated at "save" time 13:39
moritz_ it definitively would. niecza has a high startup cost, but is otherwise quite quick
masak feasible, yes. just not straightforward.
szabgab so only during editing would it be slow
moritz_ so a niecza program as fastcgi app... why not?
masak whoever decides to try it out just needs a lot of patience.
13:39 felliott joined
masak even editing could be made fast, I think. 13:40
most of the speed costs could be "folded in" behind the scenes.
no need to process the new page while the user is waiting.
13:43 MayDaniel left 13:44 tzhs left
gfldex you don't have to rebuild a wiki page unless the page itself is changed (can be rebuild on update) or if a red link turned into a blue link 13:45
so the speed of the wiki engine depends mostly on the size of articles and the number of articles in the wiki 13:46
if you use a fast backend (*sql), the number of articles doesn't really matter 13:47
masak rakudo: say 3, 5 ... 1 13:50
p6eval rakudo a37640:
..OUTPUT«(timeout)517192123252729313335373941434547495153555759616365676971737577798183858789919395979910110310510710911111311511711912112312512712913113313513713914114314514714915115315515715916116316516716917117317517717918118318518718919119319519719920120320520720921121321521721922122322…
dalek kudo: cad076f | jnthn++ | .gitignore:
Update .gitignore so I get a clean status on Win32/MSVC.
13:56
13:58 woosley joined, fhelmberger joined 14:02 drbean left 14:05 skangas_ joined
masak rakudo: my @a = 1..10; say ~(@a>>.trans((1..26) => (14..26,1..13))) 14:05
p6eval rakudo a37640: OUTPUT«No candidates found to invoke for method 'increment_index' on object of type 'LSM'; available candidates have signatures:␤:(Mu : Regex $s;; *%_)␤:(Mu : Str $s;; *%_)␤␤ in 'Cool::next_substitution' at line 2466:CORE.setting␤ in 'Cool::trans' at line 2512:CORE.setting␤ in
..main pro…
masak submits rakudobug
that one's my fault. sorry 'bout that.
signature should probably be Cool, not Str.
rakudo: say Regex ~~ Cool
p6eval rakudo a37640: OUTPUT«Bool::True␤» 14:06
masak and I don't see why a Regex is Cool.
moritz_ me neither, but i'm sure they are cool :-)
masak not that it matters for the problem at hand, because of how narrowness works. but I don't see why it is or should be.
anyway, rakudobug. I'll fix it, too.
14:07 skangas left, skangas_ is now known as skangas 14:09 plobsing left
PerlJam Good morning #perl6 14:27
Juerd Good localtime 14:29
masak good now
14:29 wolfram_ joined 14:33 pmurias joined, slavik1 joined 14:35 slavik1 left
wolfram_ PerlJam (and also colomon if you're around): Sorry I left you with my FFT attempts so abruptly yesterday. I really had to catch my train. Was hoping for some useful comments though -- and that's what I got! 14:36
colomon wolfram_: no worries! 14:37
PerlJam no worries. I shouldn't have even looked at it but my curiousity got the better of me :)
14:38 plobsing joined
wolfram_ Got a working version now at nopaste.info/b5c05715b0.html. There also was a flaw in the logic, so the numbers could not be right. 14:38
That's a complete FFT in 6 lines of perl6. Nice. bit slow though... 14:39
PerlJam wolfram_: You should put it up on rosettacode if you haven't already.
14:40 xinming left 14:41 xinming joined
wolfram_ That's my first perl6 code. Comments for further improvement? 14:41
PerlJam: Is there an FFT on rosettacode already? Or would that be a comletely new entry? 14:42
shortcircuit wolfram_: Let me check
bbkr is IO::Socket::INET working for you in january Star release (parrot 3.0.0)? every recv request returns undef for me.
PerlJam wolfram_: I think it would be new by itself 14:43
shortcircuit Yeah, doesn't look like we have an FFT task.
wolfram_: Some simple directions on creating a task: blog.rosettacode.org/2011/01/gettin...lling.html
PerlJam shortcircuit++ :) 14:44
wolfram_ BTW: using rakudo on win32 from sourceforge.net/projects/parrotwin32/ I can't CTRL-C out of a hanging script. Any cure for that?
shortcircuit wolfram_: Also, if you haven't created an RC account, you probably should. It'll make it easier for the wiki community to chat with you, and it'll make it easy for me (as the entity behind the site) to keep up with attribution. :) 14:45
masak there should totally be an FFT task on rosettacode. and Perl 6 will probably shine at it. :) 14:46
shortcircuit++ wolfram_++
shortcircuit Also, masak++ for that invitation on IRC logs.
masak huh? invitation? 14:47
shortcircuit Erp. moritz_.
>.>
masak :P
moritz_++ masak-- # :)
jnthn phenny: tell pmichaud nom branch is haz an exist! 14:51
phenny jnthn: I'll pass that on when pmichaud is around.
14:52 kensanata joined
PerlJam "exist"? 14:52
jnthn PerlJam: It exists. :P
14:52 kaare__ joined
PerlJam :) 14:52
jnthn doesn't know if dalek picks up new branches automatically. 14:53
bbkr rakudo: IO::Socket::INET.new.open( "rakudo.org", 80 ); # what else does it expects?
p6eval rakudo cad076: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 1␤»
masak \o/ nom branch!
pmichaud good morning, #perl6 14:54
14:54 cognominal left
phenny pmichaud: 00:15Z <jnthn> tell pmichaud I'll probably branch Rakudo tomorrow. Can mostly ignore $dayjob tomorrow and hack on Perl 6 stuff. \o/ 14:54
masak bbkr: sometime tells me the error is with .new, not .open
phenny pmichaud: 14:51Z <jnthn> tell pmichaud nom branch is haz an exist!
masak morning, pm.
pmichaud jnthn: shall I go ahead and set up the new nqp repo, as well?
jnthn pmichaud: morning! 14:55
pmichaud: Yes, feel free to go ahead with the new nqp repo.
pmichaud then the nom branch can start to use the nqp repo as appropriate
jnthn pmichaud: Will be focusing on the Rakudo repo for a bit now. Though will no doubt be back doing improvements in nqp along the way
14:55 felliott left
jnthn pmichaud: Yes, that'll be good. 14:55
pmichaud: If you have tuits to set that bit up, that'd be great.
pmichaud I may have them a bit later today. 14:56
jnthn OK :)
I deleted origin/llsig branch which I know was fine and is no longer needed.
pmichaud correct
jnthn er, was *mine*
pmichaud I'll delete some of my branches today also
jnthn However, there's loads of others that I have little idea of the status of.
bbkr masak: correct. has something changed in this module? I've checked LWP::Simple included in Star distro and it uses new without any params.
jnthn Are all the mob[n] ones merged?
iirc they were to do with match object improvements some time ago? 14:57
14:57 bluescreen left
pmichaud if they aren't merged they can be safely dropped, I think (more) 14:57
match objects are likely to get some changes in nom anyway
based on yesterday's discussions with TimToady++ 14:58
14:58 bluescreen joined
jnthn pmichaud: OK 14:58
pmichaud: Match needs re-doing anyway. :)
14:58 shi left
jnthn It's not a 6model object yet ;) 14:58
pmichaud right 14:59
14:59 slavik1 joined
pmichaud I'm also thinking of making the submatches lazy 14:59
masak bbkr: no idea. 'git blame'.
pmichaud but I'll need to clarify a few things with TimToady++ first
jnthn pmichaud: OK. Will that mean creating less objects potentially? 15:00
pmichaud yes 15:01
if you don't ever ask for $<something>, it might not ever be created
masak wow.
PerlJam masak: Apparently you and I think alike at this moment :)
jnthn pmichaud: It also occured to me that when we set :node($/) all over the actions, we later only really need the position information (for annotations and error reporting).
masak pmichaud: but, but... the parsing is still done, right?
pmichaud masak: sure
masak oh phew.
pmichaud we just create a very minimal match object that gets filled in on request
PerlJam (lazy submatches)++ 15:02
pmichaud i.e., "lazy"
masak I'm all for that.
right, just not that lazy :)
pmichaud jnthn: so far we only need the position information
it's a reference anyway, so it's cheap
jnthn pmichaud: If we just kept those rather than a reference to the full match object (which in turn references the full cursor object) then once we hit PAST stage we could throw away a load of objects.
pmichaud: The reference is cheap. Keeping all the match tree in memory when we don't really need to is less cheap though. 15:03
pmichaud I'm not certain "we don't need to"
we can certainly fix .node so that it stores the position
PerlJam If you guys take all that pressure off the GC, what's goint to encourage the Parrot folks to keep improving it? ;)
15:03 awoodland joined
PerlJam s/goint/going/ 15:03
jnthn PerlJam: I think we need both. :P
pmichaud or that it chooses what to store based on a flag or dynamic variable somewhere
jnthn pmichaud: I just think it'd help our memory usage quite a bit, that's all. 15:04
pmichaud but I definitely want to keep :node($/)
jnthn Oh, I agree that we write :node($/)
pmichaud jnthn: I'm very doubtful about that at th emoment.
15:04 awwaiid left
pmichaud I don't think that the PAST nodes are holding the only references to the parse tree. 15:04
jnthn Oh?
pmichaud i.e., even if we eliminated them, I bet some context somewhere has the parse tree root in a register somewhere.
jnthn :/ 15:05
pmichaud especially since contexts live beyond the end of the subroutine
jnthn Aye, but they become collectable too. Unless something ends up taking a closure.
pmichaud and we don't have a good mechanism for nulling out registers of temporaries
jnthn In theory anyway. :)
pmichaud we don't have a way of knowing if something took a closure
so currently the static sub is holding a reference to its last context, in the usual case 15:06
jnthn *nod*
Yeah, that's...kinda tricky.
pmichaud which means that even after we exit the sub that was responsible for creating past, its context still exists and still holds a register with a reference to the parse tree
jnthn Ouch.
pmichaud at least, that's the current theory
jnthn Makes sense. 15:07
pmichaud part of the problem (which we've been discussing on #parrot) is that we don't have a good way to see what might be keeping a particular object alive
PerlJam If you had a good memory profiler, you could know for sure.
pmichaud PerlJam: well volunteered, sir!
PerlJam I don't even have enough time or energy to do the simple things that I know how to do, let alone figure out the things I don't know how to do 15:08
tadzik jnthn: nom branch! \o/ does Rakudo work on it? 15:12
jnthn tadzik: ?
tadzik jnthn: I mean, does Rakudo on 6model run?
jnthn tadzik: The branch is to do a major refactor of Rakudo to enable that to happen :)
tadzik: It'll take weeks. 15:13
:)
tadzik oh, ok :)
jnthn Though I guess in so far as "can nqp on 6model compiler the grammar and actions" - probably, yes. :)
But that's not so useful. :)
15:16 agentzh left 15:18 stifynsemons left, wtw left
sorear zenog: Decimal literals sound like a nice small project 15:20
zenog: You'll want to add a method or two to NieczaActions class in src/NieczaActions.pm6 or src/niecza
zenog: I have an augment block in src/niecza so I don't have to recompile 3000 lines when I want to make small additions like this 15:21
zenog: the error message tells you the name of the method you need
zenog: look at other action methods for coding examples, and at src/STD.pm6 to see the match structure
zenog sorear: Cool, I'll have a look at it. 15:22
15:22 plobsing left
sorear zenog: recommendation - use +$str, do not try to roll your own decimal-FP to binary-FP converter (remember the Java fiasco last week? FP parsers are *tricky*) 15:23
good * #perl6
zenog sorear: OK
sorear moritz_: irclog output is still legible in elinks. 15:24
15:24 MayDaniel joined
zenog Another question, this time regarding rakudo+parrot. I have ported a simple algorithm that loads a small file (<2MB) and then runs an optimization algorithm on the data. With C# or Java, the whole thing takes some seconds. 15:26
Rakudo Star is on it for more than 10 hours now, and not finished with reading in the data yet.
Am I doing something incredibly stupid/wrong?
sorear moritz_: fwiw, I added $/.CURSOR to niecza - STD and NieczaActions need to call grammar methods on matches all over the place
zenog Or is it a Rakudo/Parrot problem? 15:27
Is there anything I can do to improve IO speed.
15:27 benabik_away is now known as benabik
benabik Morning! o/ 15:27
colomon zenog: sounds like it might be something you're doing wrong? I'd believe in a second Rakudo processing speed was that slow, but its I/O performance is okay, so far as I know. 15:29
sorear jnthn: dalek picks up new branches if you're using push notify
colomon zenog: can you share the code / data file?
jnthn sorear: ah. I don't know that Rakudo repo is...
pmurias sorear: hi 15:30
phenny pmurias: 00:04Z <sorear> tell pmurias ehspan takes labels for start/end because that was the simplest way in the C# age, and there's no in principle reason to forbid overlapping
pmurias: 00:05Z <sorear> tell pmurias Is there correct JSON for 1/0? If so, I'll fix JSYNC.cs, either way niecza should not be generating Inf in nam trees
pmurias sorear: from what google tells me there is no correct JSON for 1/0
jnthn pmichaud: If you get chance, see github.com/perl6/mu/blob/master/mi...k-push.txt 15:31
(I'd do it myself but am not a repository admin.) 15:32
sorear pmurias: I've already fixed the bad JSON from the compiler; it was an oversight in Inf parsing 15:33
wolfram_ Created draft for new Rosettacode task: FFT. See rosettacode.org/wiki/FFT
zenog colomon: one moment 15:34
15:34 kensanata left 15:36 cjk101010 left
zenog colomon: here is the code: nopaste.info/d8ba9fd2fe.html the file is u.data from this archive: grouplens.org/system/files/ml-data.tar__0.gz 15:37
colomon zenog++
zenog colomon: Please don't laugh, it is my first non-trivial Perl 6 program.
colomon: I have a similar version with an array of objects instead of three arrays for the data.
colomon zenog: actually, that's a Perl 5 program you just pasted. 15:38
zenog colomon: My bad, I am in the middle of porting it for comparison.
colomon eerrr.... seems to have bits in Perl 5 and bits in Perl 6?
rakudo: use strict;
p6eval rakudo cad076: OUTPUT«===SORRY!===␤Unable to find module 'strict' in the @*INC directories.␤(@*INC contains:␤ lib␤ /home/p6eval/.perl6/lib␤ /home/p6eval//p2/lib/parrot/3.0.0-devel/languages/perl6/lib␤ .)␤» 15:39
zenog nopaste.info/d888710550.html
colomon: The last link is the Perl 6 program.
colomon Ah, yes, that's better. :)
zenog colomon: For startup plus 100 lines it takes about 6 seconds. 15:41
colomon: colomon: 55 seconds for 1000 lines 15:42
sorear How many lines is the full dataset? 15:43
zenog sorear: 100K lines
sorear: In my field, this is a tiny dataset that we use for development and debugging purposes because you can load+process it really quickly (opposed to a 1GB+ dataset)
pmurias sorear: does the order matter in letn? 15:44
that is is (letn "a" a "b" b) different from (letn "b" b "a" a)
sorear pmurias: yes, it's like schemelet* 15:45
colomon zenog: I just added a "say" statement to print when each line is loaded in, and let 'er rip... just broke 2000
wolfram_ shortcircuit: That's (rosettacode.org/wiki/FFT) my first Rosettacode edit. Looks okay to me but you better have a look...
sorear zenog: nitpick: .split(/\s+/) probably better written .comb, although the semantics aren't quite the same
colomon zenog: It's not exactly fast, but it sure seems like it ought to be done in a couple of hours...
sorear rakudo: say [" a b c ".split(/\s+/)].perl 15:46
shortcircuit wolfram_: I don't have time. I can direct you to people equally qualified, though.
p6eval rakudo cad076: OUTPUT«["", "a", "b", "c", ""]␤»
sorear rakudo: say [" a b c ".comb].perl
p6eval rakudo cad076: OUTPUT«[" ", "a", " ", "b", " ", "c", " "]␤»
sorear erm.
rakudo: say [" a b c ".words].perl
p6eval rakudo cad076: OUTPUT«["a", "b", "c"]␤»
pmurias sorear: have you considered using a structured binary representation like en.wikipedia.org/wiki/Protocol_buffers instead of JSON?
sorear words = comb(/S+/)
pmurias: yes 15:47
there probably will be a binary repr at some point
the main reason I picked json was not having to write my own pretty-printer
pmurias the json output isn't very pretty 15:48
sorear it's nicer if you pipe it through json_xs 15:49
zenog colomon: OK. I found another bug, @.rating_data must be rw, otherwise we cannot shuffle it. 15:50
sorear zenog: (draw_from_normal...) x $.num_factors probably doesn't do what you want
colomon zenog: 12,800 now.
sorear rakudo: say rand x 100
p6eval rakudo cad076:
..OUTPUT«0.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.3729825942750440.37298259…
masak right. evaluate once, then copy. 15:51
sorear rakudo: say [rand xx 100].perl # better, but not quite
p6eval rakudo cad076: OUTPUT«[0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343, 0.692334664610343,
..0.6923346646103…
zenog sorear: ah okay. As I said, was my first shot at it ...
sorear masak: worse, it's string replcations
wolfram_ shortcircuit: Either that or just leave it there. It
shortcircuit wolfram_: Did you see my /invite from #rosettacode?
pmichaud jnthn: nqp-rx/nom should now be nqp/master. git clone [email@hidden.address] 15:52
wolfram_ shortcircuit: Either that or just leave it there. It's a Wiki. If somebode wants/needs to improve it, they can :-)
pmichaud er
[email@hidden.address]
sorear out
wolfram_ shortcircuit: invite where? email? irc? 15:53
shortcircuit wolfram_: I used the IRC server's 'invite' functionality to extend an invite to you (on this irc network) to #rosettacode. 15:54
wolfram_: Try just typing: /join #rosettacode
The invite should have brought up a notice in your IRC client, but it might not have shown.
wolfram_ shortcircuit: No didn't see anything. But I'm on webchat.freenode.net (company proxy problems). Maybe doesn't work there. 15:55
masak sorear: is that bad? isn't Str immutable?
jnthn pmichaud++ 15:56
zenog colomon: .words seems to give a 20% improvement 15:57
flussence masak: strcpy sort of things are bad from a performance standpoint
pmichaud jnthn: it might be worthwhile to remove the nom branch from nqp-rx soon, to avoid confusion
flussence anything that moves more data than it needs to in general
jnthn pmichaud: Good idea. 15:58
tadzik watches history happening
colomon zenog: sweet! 15:59
zenog: 27K and counting here
zenog Anyway sorear++ colomon++ thanks for the hints so far. Any pointers to where I can help to improve performance are welcome ... I am newbie to Perl 6, but I think I could help out in some places.
colomon: 27K just with say, w/o splitting and storing it to the arrays? 16:00
jnthn pmichaud: Any reason not to do it "right away"?
pmichaud jnthn: I don't have any reason not to do it right away; didn't know if maybe you had some :)
colomon zenog: nope, it's doing and the splitting and storing too. I just added one line to tell me how far it has gotten each time through the loop.
jnthn pmichaud: Nope :)
pmichaud: Gone :) 16:01
16:01 vutekija left
zenog colomon: I use Rakudo Star 2011.01, why is it that much slower? 16:02
colomon zenog: no idea, though I am using the latest build of Rakudo from git.
zenog: might also be that it will hit a wall at some point, though it's still looking good at the moment (34K done)
zenog colomon: Program will crash once you get after the initialization, here is a corrected version: nopaste.info/f9077329fb.html 16:03
PerlJam The latest rakudo will have the latest parrot which both have several improvements
well, a later parrot than R* 2010.01 16:04
zenog colomon: I am not used to having method/property names resolved at runtime ...
TimToady lurks blearily, or blears lurkily... 16:06
colomon blears?! where?!
TimToady over thlere! 16:07
PerlJam llions and tligers and blears.
jnthn and llamas
pmichaud TimToady: when you get a chance and are more awake, could you comment about how you view match slot assignment in STD.pm in light our our discussion yesterday?
jnthn oh, wait...
:)
pmichaud i.e., STD.pm has a lot of instances of things like "$<slot> = $value" 16:08
which somewhat implies mutability of $/'s slots
TimToady I view that as cheating :)
jnthn pmichaud: We thend to have to work around those a bit at the moment.
pmichaud a supported cheat?
16:08 kst joined
pmichaud jnthn: I'm talking about in light of new changes to the notion Match, not what exists in nqp today :) 16:09
*notion of Match
jnthn pmichaud: Aye, it'd just be nice if we end up in a place where we can do what STD does :)
pmichaud jnthn: well, unless STD is cheating in ways that aren't STD :)
PerlJam jnthn: or even what STD should do.
jnthn Well, or that. :)
pmichaud jnthn: right. I need to know where STD's cheats are that need to be avoided 16:10
zenog colomon: I'll be away but I stay logged in. Thank you very much so far. &
pmichaud I *would* much prefer to see STD using binding instead of assignment at least
16:10 wiseguyxp joined
colomon zenog: no worries, I'm very interested in seeing Rakudo / Perl 6 faster. :) 16:10
16:11 dukeleto left, dukeleto joined 16:13 plobsing joined
jnthn pmichaud: Yes, true. 16:14
That'd make things easier.
pmichaud anyway, I'll simply classify our "work arounds" as "cheats" and then we're doing the same as STD -- cheating. :-P
16:15 Patterner left
jnthn Yes, but have you seen how ugly our cheats are :-P 16:15
pmichaud I haven't see many really ugly cheats... maybe I've not been paying attention closely enough 16:16
*seen
16:17 Psyche^ joined, Psyche^ is now known as Patterner
jnthn pmichaud: copyOPER in Grammar.pm ;) 16:17
pmichaud oh, that
STD's cheat for that is not much better
imo
jnthn oh, OK :)
masak sorear: was it you who once said that github issue numbers are not monotonic? I've been using the github issue system quite a bit lately, and I haven't noticed anything like that. 16:18
16:21 daxim left
tadzik nopaste.snit.ch/30876 -- nqp test failures 16:23
PerlJam wonders how long it'll take for "which nqp?" to have an obvious answer :) 16:24
pmichaud if there's no -rx, you're referring to the new nqp.
tadzik yeah, new nqp
takadonet hey all 16:25
tadzik hey takadonet
jnthn tadzik: t/nqp/55-multi-method.t - that one surprises me.
A couple of the others I know about but that one shoudl not fail.
tadzik it's the most interesting one actually
16:25 wiseguyxp left
tadzik allow me a three-liner 16:25
> ./nqp t/nqp/55-multi-method.t
1..4
zsh: segmentation fault ./nqp t/nqp/55-multi-method.t
jnthn :/ 16:26
16:26 risou joined
jnthn tadzik: Can you use gdb and get me a stack trace? 16:26
tadzik sure thing
16:26 risou left
jnthn tadzik: Thanks :) 16:26
16:26 risou joined
pmurias is spliting up commits important? 16:26
tadzik can't gdb 16:27
jnthn: how do I run a program with a parameter?
dalek ecza: 8e6294d | pmurias++ | cl-backend/backend.lisp:
fix letn, ignore module definitions for now, add allow defining a new method
16:28
16:29 MayDaniel left
jnthn tadzik: r teh_param 16:29
tadzik neh
owait 16:30
nqp is an empty file here
tadzik scratches head
16:32 wolfram_ left
pmichaud loliblogged: pmthium.com/2011/02/08/new-nqp-repo...do-branch/ 16:34
tadzik lolpmichaudblogs! 16:35
pmichaud emailed to p6c and parrot-dev 16:36
jnthn pmichaud: nice :)
pub & # back in 2-3 hours, I expect
tadzik jnthn: nopaste.snit.ch/30877 16:38
16:42 vutekija joined, felliott joined 16:48 felliott left, pmurias left 16:52 estrabd joined 16:53 pmurias joined 16:54 felliott joined 16:58 cognominal joined 17:02 justatheory joined
dalek ecza: 8c97bc9 | pmurias++ | cl-backend/backend.lisp:
[cl-backend] scopedlex can do binding, remove unused function
17:02
17:07 vmspb joined 17:15 awoodland left 17:23 woosley left, felliott left, woosley joined 17:40 orafu left 17:41 rgrau joined 17:43 cdarroch joined, cdarroch left, cdarroch joined
TimToady gfldex: counting lines in the grammar as you parse is error prone, especially if you have multiline comments or quotes, or if you backtrack; it's generally better to rely on automatic translation of the current position to the line number, since cursors are tracking positions anyway 17:44
in STD that's $¢.lineof
17:45 felliott joined
TimToady and then it can also cache the translation table for you 17:45
17:47 Layla_91 joined 17:48 risou left, risou_ joined 17:49 felliott left
Layla_91 Howdy! :D 17:50
TimToady o/
moritz_ that Perl 6 FFT algorithm would be nice to have in rosettacode :-)
shortcircuit moritz_: rosettacode.org/wiki/FFT 17:51
TimToady already there
shortcircuit wolfram_++ put it up already.
tadzik Layla_91: o/
moritz_ ah, I haven't backlogged long enough before commenting :-)
shortcircuit TimToady: Did those wget tarballs work well enough?
TimToady pity that .[0,2,4...*] doesn't autotrim yet...
PerlJam indeed
though it still makes me long for a syntax similar to @array[@%%2] or something 17:52
TimToady shortcircuit: they worked well enough--I translated a few more hrefs to make them work even better
shortcircuit Cool.
moritz_ one could get rid of the map with »*» $twd (but would need a pair of parens 17:53
TimToady they do still tend to lose some of the formatting if one doesn't have network access, but that's livable, except for the delays of looking for network access when there isn't...
which I cured by turning off my wifi card :)
shortcircuit Hehe.
Sounds like there are absolute references embedded somewhere where they don't belong. I might be able to fix that. 17:54
colomon wait, can .[0,2,4...*] ever autotrim?
17:54 envi left, pmurias left
colomon does .[ ] assume the list it is given is monotonic non-decreasing? 17:55
TimToady there's supposed to be some way of asking an iterator if it's *ish, but rakudo doesn't do that yet, afaik 17:56
moritz_ is that way specced?
TimToady are iterators specced?
that's one of those things we're kinda waiting for a doc backport on from rakudo 17:57
colomon but even if you know it's *ish, how do you know the next value you get won't be back in the range of the .[ ]
?
17:57 dakkar left
colomon iterators are pmichaud's grant, right? 17:57
TimToady if it goes off the end with a *-ish iterator, we can assume it's monotonic
it will behoove the programmer not to run off the end with a *-ish sequence if they don't want that assumed 17:58
colomon can we assume that if it goes off the end it is done, whether or not it is *-ish?
17:59 vmspb left 18:00 felliott joined
TimToady maybe that would be simplest 18:03
though perhaps we could special case the single subscript case to produce a failure instead of a Nil 18:05
moritz_ pmichaud: could you please add dalek pushing to rakudo/rakudo, as described in github.com/perl6/mu/blob/master/mi...k-push.txt ? thanks
PerlJam What does "*ish" really mean? is this sequence *ish? 0,2,4, { @array.rand.Int } ... *
?
TimToady any sequence that is known to be "infinite" because there's a * or Inf involved 18:06
so that one is *ish
likewise $x xx *
and 1,2,3,*
probably better to spell it *-ish
or maybe splattery :) 18:07
PerlJam So that's a non-monotonic sequence but is still *-ish. How do we warn the user they may be doing something stupid? :) 18:08
TimToady you write a document that says "Don't do something stupid." :)
PerlJam wfm :) 18:09
TimToady and put little letters that say "Professional driver on closed course. Do not attempt."
18:10 _ilbot left, _ilbot joined
Util std: my @z[5] = 15, 16; @z.perl.say; 18:10
p6eval std 625303c: OUTPUT«ok 00:01 123m␤»
Util rakudo: my @z[5] = 15, 16; @z.perl.say; 18:11
p6eval rakudo cad076: OUTPUT«[15, 16]␤»
Util How can that be legal?
PerlJam Util: why would it not be?
Though, I would have expected some Anys
oh, I see. 18:12
TimToady you told it to put 15 and 16 into @z[5]. how is that not what you asked for?
PerlJam Util: in declarations like "my @z[5]", the [5] is the shape of the array 18:13
Util I would expect `my @foo[32]` to by a syntax error.
18:13 nadim_ joined
TimToady ah, right 18:13
Util Aha! # shape
TimToady what a dumb language
I wonder if rakudo is parsing it right 18:14
Util Just surprising
moritz_ iirc it just ignores shapes semantically
TimToady almost certainly it's ignoring the [5] if so
PerlJam yes, I think so too
tadzik pugs: my @z[5] = 15, 16; @z.perl.say; 18:15
p6eval pugs: OUTPUT«[undef, undef, undef, undef, undef, [15, 16]]␤»
TimToady that's how it would come out without the declarative shape
PerlJam really? not [ 15, 16, Any, Any, Any ] ?
TimToady pugs doesn't know shape parsing
so it's (my @z).[5] = 18:16
PerlJam oh, of course
(ETOOMANYCONTEXTS in my brain sometimes :)
TimToady I never get confused...oh wait...
Util (unrelated): 18:17
rakudo: my @M = [3,3],[3,3]; say "in : ", @M>>.WHAT.perl, @M.perl; for @(@M[0]) {$_ *= 2}; say "out: ", @M>>.WHAT.perl, @M.perl; @M[0][0] = 1; say "OK";
TimToady I suspect we'll learn to read the declarations better when we've been using them for reals
p6eval rakudo cad076: OUTPUT«in : (Array, Array)[[3, 3], [3, 3]]␤out: (Array, Array)[[6, 6], [3, 3]]␤OK␤»
Util rakudo: my @M = [3,3],[3,3]; say "in : ", @M>>.WHAT.perl, @M.perl; @M[0] = @M[0] X* 2; say "out: ", @M>>.WHAT.perl, @M.perl; @M[0][0] = 1; say "OK";
p6eval rakudo cad076: OUTPUT«in : (Array, Array)[[3, 3], [3, 3]]␤out: (List, Array)[(6, 6), [3, 3]]␤Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/6zUFr5Fkmo␤»
Util Why does X* create an immutable list?
TimToady has to copy values
rakudo: say <1 2> X* <10 20> 18:18
p6eval rakudo cad076: OUTPUT«10202040␤»
Util and this doesn't (have to copy values)? :
rakudo: my @M = [3,3],[3,3]; say "in : ", @M>>.WHAT.perl, @M.perl; @M[0] = @M[0] >>*>> 2; say "out: ", @M>>.WHAT.perl, @M.perl; @M[0][0] = 1; say "OK";
TimToady where are the lvalues?
p6eval rakudo cad076: OUTPUT«in : (Array, Array)[[3, 3], [3, 3]]␤out: (Array, Array)[[6, 6], [3, 3]]␤OK␤»
Util The lvalues are in the same place in the `>>*>>` version as in the `X*` version. 18:21
18:22 fhelmberger left
TimToady I dunno, that's peculiar 18:22
looks like it's plus or minus a deref 18:23
probably because it's list context rather than item
rakudo: my @M = [3,3],[3,3]; say "in : ", @M>>.WHAT.perl, @M.perl; @M[0] = [@M[0] X* 2]; say "out: ", @M>>.WHAT.perl, @M.perl; @M[0][0] = 1; say "OK"; 18:25
p6eval rakudo cad076: OUTPUT«in : (Array, Array)[[3, 3], [3, 3]]␤out: (Array, Array)[[6, 6], [3, 3]]␤OK␤»
TimToady there you go
18:25 fhelmberger joined
TimToady the hyper returns a new Array, while the X returns a list 18:25
list vs item is the essential difference between X and hyper 18:26
(and Z) 18:27
rakudo: my @M = [3,3],[3,3]; say "in : ", @M>>.WHAT.perl, @M.perl; @M[0][] = @M[0] X* 2; say "out: ", @M>>.WHAT.perl, @M.perl; @M[0][0] = 1; say "OK";
p6eval rakudo cad076: OUTPUT«in : (Array, Array)[[3, 3], [3, 3]]␤Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/lHzni4IZDw␤» 18:28
TimToady that shoulda worked too, methinks
rakudo: my @M = [3,3],[3,3]; say "in : ", @M>>.WHAT.perl, @M.perl; @(@M[0]) = @M[0] X* 2; say "out: ", @M>>.WHAT.perl, @M.perl; @M[0][0] = 1; say "OK";
p6eval rakudo cad076: OUTPUT«in : (Array, Array)[[3, 3], [3, 3]]␤Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/4Shk2O87BY␤» 18:29
TimToady hmm
that seems buggy to me
rakudo: my @M = [3,3],[3,3]; @M[0][] = 1,2,3; 18:31
p6eval rakudo cad076: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/iLDvXu2ad8␤»
18:32 fhelmberger left
TimToady why can't I assign a list to an existing (sub)array? 18:32
18:32 zby_home_ joined
TimToady [3,3] is supposed to create a mutable Array 18:32
rakudo: my @M = [3,3],[3,3]; @M[0].push: 1,2,3; say @M.perl 18:33
p6eval rakudo cad076: OUTPUT«[[3, 3, 1, 2, 3], [3, 3]]␤»
TimToady I guess @() and zen slice aren't working quite right
colomon zenog: Had no trouble reading in the entire u.data file, though it was disappointingly slow. Then it blew up, just as you said it would. 18:35
18:35 vmspb joined
colomon #phasers in 25? 18:36
Util colomon: yes
colomon Util++
Util tadzik, PerlJam, TimToady: Thanks! 18:38
tadzik me? 18:40
18:41 gfldex left
Util tadzik: I saw you try; that is always appreciated. 18:42
18:42 gfldex joined 18:43 Layla_91 left 18:44 mberends joined 18:49 gfldex left 18:51 gfldex joined
tadzik Util++ # appreciating 18:51
18:51 impious joined 18:52 impious left 18:53 gfldex left 18:55 molaf joined 18:57 gfldex joined 19:02 Sarten-X left 19:07 risou_ left 19:10 asarch joined, VXZ joined 19:11 MayDaniel joined 19:12 Sarten-X joined 19:16 alester joined 19:17 ashleydev left, ashleydev joined 19:27 colomon left 19:31 shi joined, mberends left 19:33 Vlavv` left, Vlavv_ joined 19:36 ash_ joined
Util S04, line 380: ..."place an explicit return statement after it, use a C<sink>"... 19:38
Is that missing an "or" after the comma?
19:39 dual left
TimToady nod 19:42
19:43 kst left
TimToady feel free 19:43
19:44 mberends joined
dalek ecs: 3bda36a | util++ | S04-control.pod:
Add missing "or"
19:45
19:45 dual joined
Util thanks! 19:45
19:47 molaf left 19:50 plobsing left 19:52 vutekija left 19:53 vutekija joined, coldhead joined 19:57 vutekija left 19:58 bluescreen left 20:00 molaf joined, bluescreen joined 20:01 molaf left 20:08 arlinius left
moritz_ TimToady: the 'today' URLs now redirect as though wished 20:10
20:18 colomon joined
diakopter how was that? 20:19
moritz_ how was what? 20:20
mberends ifair that was to the actual date, so that search engine spiders do not mis-index the content.
diakopter the redirecting
moritz_ diakopter: the irclog.perlgeek.de/perl6/today URL now redirects to the current date 20:21
diakopter I thought it always did that
moritz_ so that TimToady++ doesn't have to refresh + go to previous day
diakopter: nope, it just delivered the content from the current day
diakopter ah, oh
TimToady++ moritz_++ 20:22
google, of course, hits /today every few seconds :)
moritz_ does it? 20:23
diakopter try it... type some jibberish
then search for it
moritz_ pooSui1uOabi1quu
diakopter HHFIBHOWECKXL
moritz_ my jibberish is better than yours!!! 20:24
diakopter bwahaha "Showing results for FACEBOOK. Search instead for HHFIBHOWECKXL"
moritz_ lol
20:25 stkowski joined
diakopter hm, well, it did work every time I tried it over the past year, like 2 or 3 times 20:25
I guess I'll wait another minute 20:26
mberends last year google visited a home based P6 webserver 4 times a day after it was announced in #perl6 20:27
diakopter hm
it wasn't jibberish actually
it was a particular phrase of languagey words 20:28
The fox brown quick jumped over dog lazy the
ash_ probably off topic, but does anyone with good make-foo know how to list all of the targets of a makefile?
mberends grep would probably handle that 20:29
arnsholt Best I can suggest off-hand is grep -P '^[^ ]+:' =)
Or actually grep -P '^[^:]:' 20:30
Bah. Insert plus where appropriate in that last one
ash_ i know make -np will list some of the targets, and by some i mean all of the targets built into make + yours, i just want mine, not the default ones 20:31
moritz_ ash_: run it with an empty makefile once, and use that as a reference to remove all builtins 20:32
20:32 kfo_ joined
ash_ you and your logic 20:33
sounds good
moritz_ it will remove overridden built-in targets
but it's a nice approximation
20:35 kfo left
colomon just used 20 lines of C++ to do something that would have taken two lines of Perl. :\ 20:36
and the sad thing is, I would have been sure the Perl version worked, and I'm eyeing the C++ version suspiciously. 20:37
arnsholt Don't you just love low-level programming?
colomon not really. 20:38
arnsholt Hehe. You and me both
ash_ colomon: i am writing an emulator for ugrad students to test their programs with in C++, and many many times I keep feeling like that myself
colomon I keep on thinking what a happy day it will be when there's a fairly full Perl 6 implement on .NET.
arnsholt I usually find valgrind to increase my confidence a bit, though
colomon valgrind is lovely, no doubt. I spent hours last night trying to track down a problem that valgrind found for me in two minutes (when I thought to use it). 20:39
arnsholt Yeah. I've occasionally wondered why I bother tracking down those "jump depends on uninitialised value" errors 20:40
But it usually turns out to be a good idea
ash_ i am almost to the point where i might start using perl embedded into my C++ for parts of it
szabgab moritz_: have you submitted a talk to LinuxTag Berlin? if not yet, the dead line is today! 20:41
colomon the problem it found, incidentally, was a typo in a printf format string that was causing a bus error.
arnsholt *sigh* A good example of all the things I hate with low-level work
moritz_ szabgab: i haven't, and i won't attend (family) 20:42
flussence for that make target list thing, you could take a look at how {bash,zsh}-completion does it
szabgab oh
moritz_: do you know if any perl 6-er have submitted?
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ory_tablet 20:43
20:44 ash_ left
moritz_ szabgab: no :( 20:44
colomon ... and those 20 lines of C++ do not appear to work. :( 20:45
20:47 V15170R joined
V15170R Hello 20:47
colomon oh, actually it was the accessor function that was wrong. sigh.
V15170R is there something like XML::Parser or XML::Parser::SAX for perl6 yet?
flussence github.com/krunen/xml/ 20:49
20:52 Chillance joined
dalek ok: 5a230d6 | (Christopher Bottoms)++ | src/subs-n-sigs.pod:
Dance subroutine example: Printing to the screen seemed to simplify the example a little.
20:56
20:57 asarch left
dalek ok: 47dfb50 | (Christopher Bottoms)++ | src/subs-n-sigs.pod:
Dance subroutine example: Finished changing print's to say's
21:01
21:02 plainhao left, Sarten-X left 21:04 ash_ joined 21:06 ash__ joined, ash_ left, ash__ is now known as ash_ 21:09 Sarten-X joined 21:12 Kovensky left 21:17 plobsing joined
flussence
.oO( one problem with generating all my passwords with a hmac hash... forgetting the input format. argh )
21:19
sjohnson heh 21:21
21:22 molaf joined
flussence aha, there it is. 21:23
V15170R hi again :)
21:23 ymasory_ joined 21:27 V15170R left, pmurias joined
jnthn back 21:28
oops, missed #phasers
pmurias colomon: do you use .NET?
colomon pmurias: nope, not yet. 21:29
pmurias colomon: so what do you expect from a Perl 6 implementation on that platform?
colomon but the ability to move a lot of my code from C++ to Perl 6 would be a pretty good argument for doing a port. 21:30
21:30 bluescreen left
tadzik I'd like a fast implementation. Hell, it may be buggy 21:30
colomon Expect in what sense? I guess I'm hoping for fairly fast, feature-full, and interoperable with other .NET languages. 21:31
though it wouldn't have to be blazingly fast to be pretty darned useful.
21:31 kst joined
pmurias re doing a port, you mean the port of your code from C++ to Perl 6 21:31
colomon yes 21:32
21:32 plobsing left
pmurias why is it in C++ rather then in Perl 5? 21:32
colomon I've already had a request for a C# port, but I'm putting it off as long as possible.
jnthn mberends: ping
21:32 wiseguyxp joined
mathw evening 21:32
jnthn o/ mathw
mathw is excited by the creation of the 'nom' branch 21:33
mathw is also apparently incapable of writing sane Perl 6 anymore
colomon pmurias: I don't think anyone has ever considered Perl 5 an appropriate language for high-powered CAD data processing. :)
21:33 Kovensky joined
jnthn pmichaud: Glad you updated the README. I looked at that earlier and thought "huh" :) 21:35
pmurias colomon: so what would you need from niecza before you could use it?
21:37 lukas___ joined
colomon pmurias: Hmm. I haven't given it much thought. Guess I'd want grammars (which it already has, right?), iterators, meta-ops... 21:38
tadzik pmurias: I'd need completeness. I check frequently, and it can't run any of my scripts
21:38 plobsing joined
tadzik but I see sorear++ working and implementing stuff, so I'm waiting 21:38
takadonet I'm in the same boat as tadzik 21:39
21:39 zenog left
colomon pmurias: I should maybe start looking at what it would take to port the parsing portion of one of the ASCII translators. That would be a good start. But it's got to be pretty low priority for me at the moment anyway, I've got a huge load of stuff on my plate. 21:39
pmurias tadzik: what sort of stuff niecza lacks? 21:43
masak back 21:50
I have this low-hanging-fruit task for Yapsi, that I'd like to award to someone who's not already overburdened by Perl 6 TODOs. contact me here on the channel or by privmsg if you're interested. 21:51
jnthn gets curious ;) 21:54
masak jnthn: I doubt you qualify as "doesn't have hands full", though :P
jnthn True :P 21:55
masak jnthn: you'll just have to hope that someone bites so that I can karma the person and advertise the result. :)
perigrin I'm not overburdedn by *Perl 6* TODOs ... 21:56
it's all the other TODOs that are crushing my spirit :)
masak aww :) 21:57
tadzik pmurias: let me run some stuff with it
...now how do I run files? It gives me the prompt 21:58
pmurias tadzik: pass the file name? 21:59
vim foo.p6;mono run/Niecza.exe foo.p6
tadzik oh, my ~/bin/niecza script wasn't passing params, my bad 22:00
ok. 1) can't load my modules. 2) Unhandled exception: Unable to resolve method fmt in class Num. 3) is rw NYI. 4) Action method dec_number not yet implemented (say 3.14) 22:02
just some random scripts from my ~/src/perl6 22:03
22:03 woosley left
tadzik does NYI 22:03
masak tadzik++ 22:04
22:04 woosley joined
masak tadzik: maybe submit those as github issues? 22:04
tadzik loop as well. I'd love to try it, but I can't run anything
masak ;)
tadzik masak: I think that things are just further on sorear's TODO than other
masak currently only writes things from scratch in niecza, due to its differences to rakudo
tadzik so I'm just waiting patiently
that'd probably be the way 22:05
masak tadzik: well, he's really responsive to user feedback.
just so you know.
tadzik I don't want to spoil his plans with my "I want loop now!" stuff. I believe sorear knows best what to do
pmurias tadzik: could you nopaste your scripts 22:06
tadzik pmurias: sure
pmurias i'm wandering what you want loop for
masak ...when goto would suffice? :P 22:07
tadzik wklej.org/id/472640/ -- I was learning Perl 6 on this one :')
pmurias: for a stupid loop benchark :)
wklej.org/id/472642/ -- here. I'm comparing it to pir, nqp, perl 5 and stuff 22:08
masak tadzik: as a person often enough on the developer side of things, I love it when users butt in. :) even if I have different priorities, it's nice to know where the users are and what they need.
tadzik masak: I'd consider that
pmurias tadzik: you could use a while for niecza 22:09
tadzik pmurias: "for niecza" is a key here. I'd need to adjust everything I have. 22:10
writing from scratch, for niecza, as masak says, would be the right approach here probably. But you were curious why niecza can't be my favourite Perl 6 implementation atm 22:11
masak right.
people have different thresholds of "early adopter"-ness.
colomon just read pmichaud++'s blog post. what terrific nqp news! 22:12
szabgab TimToady: I just looked at your web site and it is missing the background color (and a lot of other parts) 22:14
masak "missing the background color"? 22:18
22:18 colomon left, brill left
tadzik for me it's missing its index.html 22:18
22:23 zby_home_ left 22:24 ash_ left, ash_ joined 22:28 Chillance left 22:29 pmurias left
masak is an LTM parser such as STD.pm6 combinable with the idea of "sequence points", such that if one has a big file already parsed, one could pick the last valid sequence point, and continue parsing from there on? my guess is yes, but I still don't grok LTM. 22:32
i.e. I'm not entirely sure what type of control flow LTM imposes. 22:33
22:34 brill joined 22:39 flatwhatson left 22:40 flatwhatson joined, kaare__ left 22:41 shi left, MayDaniel left, woosley left 22:45 Mowah left 22:47 dukeleto left 22:48 dukeleto joined 22:52 ymasory_ left 22:55 shi joined 22:56 drbean joined 22:58 plobsing left 23:07 plobsing joined 23:14 lukas___ left
TimToady masak: arguably, LTM makes it easier to have sequence points because you're not relying so much on backtracking 23:15
all you really have to do is remember the exact language you were in at a given position, which is what immutable *cough* Cursors provide 23:16
well, and some continuation context if you're down in recursive descent somewhere...but any parser has that problem 23:17
23:17 whiteknight joined 23:18 plobsing left 23:19 brill left
masak aye. 23:19
23:19 leprevost joined
masak what would be way cooler was if there was some way to "rescue" some of the later sequence points, saying "ok, we're back on track, don't need to re-parse these bits". 23:20
23:21 lukas___ joined
masak consider the file sitting in an interactive editor, and I change my variable from "$sucessor" to "$successor". 23:21
all the Match nodes that fall out of the new parse would have the exact same structure -- it's just a matter of the parser "realizing" this and canceling the parse. 23:22
TimToady same structure, but not the same data, since the current position is part of it 23:23
masak hm, yes. 23:24
TimToady there's probably a way of recording all positions relative to the previous construct that would help
but then you'd have to recalculate to find the actual position later
masak reminds me a bit of events/deltas and snapshots at strategic places to avoid having to recalculate too much. 23:25
TimToady doubtless there are various strategies to minimize reparsing
another approach is to reparse to the end of the file, but do it in the background once the current page is reanalyzed
masak yes. 23:26
TimToady depending on how much CPU you care to waste, you can still make it look fast
masak :)
TimToady "just throw another core at it"
I wonder how long till that approach is noticed by the carbon neutralists...
masak there's an ad outside my house about how "standby mode" on appliances is using up large parts of Sweden's electricity. 23:27
TimToady certainly it would faster to walk the remaining tree and adjust postions
masak and slightly more elegant, too.
TimToady I suspect they can make standby much cheaper in the future
wolverian masak: that varies a lot by device. e.g. wii vs. ps3.
masak wolverian: I'm sure it does. 23:28
I can't help thinking that it's a kinda silly campaign.
TimToady battery powered strew-them-about processors tend to be very efficient, yet know how to wake up very fast
masak lobbying the industry to waste less energy would probably do loads more for the environment than harrying citizens. 23:29
TimToady eventually they'll just shovel them out of airplanes and ad hoc grid the whole world with solar powered relays
masak o.O
talk about "cloud computing"! 23:30
23:30 icwiener left
TimToady and someday you'll have intraocular projectors, none of this stupid display or contact lens business 23:30
masak TimToady: are you working at the Singularity Institute now? :P
TimToady that last one I predicted in the late 80s
I'm working at the Plurality Institute, actually 23:31
masak :P
I knew about that pun. should have seen it coming from 30 years away...
flussence I remember reading somewhere that a 1-line change to some C compiler made about 90kW of difference for its combined userbase...
TimToady kind of a serious pun though 23:32
Tene I've considered trying to work for singinst. 23:33
I don't have a very good singing voice, though.
masak "Hello and welcome to the punners convention. Today we're doing Singularities." 23:34
tadzik I do, but I'm quite alone in my opinion
TimToady all puns are singular, we sincerely hope and pray
Tene more-seriously, I don't expect I have much to offer to them. 23:35
masak I've read about the Singularity pattern in Gang of Four. I heard it's a bit of a Civilisation smell, though. 23:36
TimToady we just need to make sure that the singularity is programmed with a language that humans like more than machines do.
then the machines will all go shopping
ash_ if your worried about power consumption from standby, just unplug anything you can 23:40
masak right.
ash_ although, i don't recommend unplugging, say the refrigerator
23:41 felliott left
masak one way to "save" power for the fridge is to take things out of the freezer and put them in the fridge :) 23:41
Tene gist.github.com/817504
23:41 plobsing joined
Tene rakudo: say (1..4).grep( * %% 2 ) 23:41
p6eval rakudo cad076: OUTPUT«24␤» 23:42
ash_ what? no perl6 or perl5?
ash_ sidenote, i almost wrote that as "no perl or perl5"
masak Tene: or an invocant colon. I can't believe I just said that. 23:43
TimToady phenny: ask wolfram_ /me is kinda wondering why you used evens and odds instead of the complex numbers that Perl 6 has built in...
phenny TimToady: I'll pass that on when wolfram_ is around.
Tene masak: I find my colon to dramatically improve convenience
23:43 IllvilJa left
masak Tene: :) 23:43
23:44 cosimo joined
jnthn sleep & 23:45
23:45 felliott joined, felliott left
TimToady rakudo: say grep * %% 2, 1..4 23:46
p6eval rakudo cad076: OUTPUT«24␤»
TimToady that seems most readable to me
rakudo: 1..4 ==> grep * %% 2 ==> say 23:47
p6eval rakudo cad076: OUTPUT«24␤»
TimToady shiny!
masak that's... a little bit insane :) 23:48
TimToady rakudo: classify(* % 2, 1..4).[0].perl.say 23:49
p6eval rakudo cad076: OUTPUT«"1" => [1, 3]␤»
TimToady rakudo: classify(* % 2, 1..4).[1].perl.say
p6eval rakudo cad076: OUTPUT«"0" => [2, 4]␤»
23:49 alester left
Eevee pipeline actually looks more sane to me than the plain grep; I always have trouble parsing grep's comma form 23:49
masak that's the old .classify semantics, right?
TimToady something seems strange about it 23:50
duh
rakudo: classify(* % 2, 1..4).{'0'}.perl.say
p6eval rakudo cad076: OUTPUT«undef␤»
ash_ undef?
TimToady it's not a hash, just a list of pairs, I guess 23:51
so masak is correct, old semantics
spec currently says it returns a hash
23:51 felliott joined, lamstyle left
TimToady the 0 and 1 were backwards because the 1 pair came out before the 0 pair :) 23:51
ash_ how did that put out an undef? just wondering 23:52
TimToady rakudo: classify(* % 2, 1..4).perl.say
p6eval rakudo cad076: OUTPUT«("1" => [1, 3], "0" => [2, 4])␤»
TimToady rakudo: classify(* % 2, 1..4).{}.perl.say 23:53
p6eval rakudo cad076: OUTPUT«("1" => [1, 3], "0" => [2, 4])␤»
TimToady it's probably saying classify didn't return any named arguments 23:54
ash_ rakudo: classify(* % 2, 1..4).<0>.perl.say
p6eval rakudo cad076: OUTPUT«undef␤»
TimToady rakudo: classify(* % 2, 1..4).[0]<1>.perl.say
p6eval rakudo cad076: OUTPUT«undef␤»
TimToady rakudo: classify(* % 2, 1..4).[0].perl.say 23:55
p6eval rakudo cad076: OUTPUT«"1" => [1, 3]␤»
23:55 ggoebel joined
TimToady I guess a pair doesn't like hash subscripting :) 23:55
rakudo: classify(* % 2, 1..4).WHAT.say
23:55 felliott left
p6eval rakudo cad076: OUTPUT«List()␤» 23:55
ash_ is it part of List() thats returning the undef somewhere 23:56
TimToady rakudo: (1,2,3,4).<0>.say
p6eval rakudo cad076: ( no output )
TimToady rakudo: (1,2,3,4).WHAT.say
flussence undef comes from Exception iirc
p6eval rakudo cad076: OUTPUT«Parcel()␤»
TimToady rakudo: classify(* % 2, 1..4).<0>.WHAT.say 23:58
p6eval rakudo cad076: OUTPUT«Failure()␤»
ash_ ah
TimToady flussence: yep
ash_ flussence++
rakudo: Failure.say
p6eval rakudo cad076: OUTPUT«Failure()␤»
TimToady rakudo: Failure.perl.say 23:59
p6eval rakudo cad076: OUTPUT«Failure␤»
TimToady hmm
rakudo: Failure.new.perl.say
p6eval rakudo cad076: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 1␤»
TimToady rakudo: Failure.new("foo").perl.say
p6eval rakudo cad076: OUTPUT«"foo"␤»
TimToady scratches head