»ö« 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! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
00:03 timbunce left 00:10 timbunce joined 00:11 icwiener left 00:12 jaldhar joined 00:13 cdarroch left 00:16 envi joined
arnsholt What's the currently correct way to get all elements of an array except the first? 00:23
@a[1..*] is apparently not it?
sorear @a[{1..$^a}] 00:25
you can't use * currying with .. because 1..* is already taken to mean an open-ended range
arnsholt Ah, right
sorear so you have to use a more clunky syntax 00:26
wolverian @a.tail?
thought we had that.
flussence rakudo: my @a = <1 2 3 4>; say @a[1^..@a]; #?
p6eval rakudo a95c1d: OUTPUT«34Any()␤»
flussence argh.
arnsholt Yeah have to subtract one
As I just discovered on my REPL =)
wolverian rakudo: <a b c d>.tail
p6eval rakudo a95c1d: OUTPUT«Method 'tail' not found for invocant of class 'Parcel'␤ in main program body at line 22:/tmp/aN5jt0lNEY␤»
wolverian sadpanda 00:27
sorear however .tail is a very nice idea and I will add it to my Perl6 asap
:)
dalek tpfwiki: (Brian Julin)++ | www.perlfoundation.org/perl6/index.cgi?perl_6 00:30
00:34 timbunce left 00:38 molaf joined 00:42 lopaway is now known as lopnor
TimToady rakudo: my @a = <1 2 3 4>; say @a[1..*] 00:46
p6eval rakudo a95c1d: OUTPUT«(timeout)»
TimToady that is specced to work
diakopter oh; I didn't know that 00:48
sorear How? 00:49
TimToady ranges that are "too big" autotruncate at the top
sorear So @a[1..10] is magically different from my @b = 1..10; @a[@b] ? 00:50
(Where by magically I mean MMDally)
TimToady S09:217 is the current spec on that 00:52
we may restrict this to "known infinite" lists
sorear oh, hmm 00:54
I didn't really that there were recognized *types* of iterators 00:55
so I guess infix:<...> can
't be implemented using just gather/take
00:59 envi left, jferrero left 01:37 lopnor is now known as lopaway
rokoteko is the fail() and its binding with $! specced? 01:39
sorear yes
rokoteko sorear: ok. so when you fail(); fail() and fail(); in a row there should be three events readable from $! ? 01:40
correct? 01:41
sorear no 01:44
fail() does an implicit return
the latter two fails are unreachable
rokoteko where is the current spec?
sorear github.com/perl6/specs/
rokoteko no but concerning failure objects and $! :)
I think I tried to read the synopsis, but it was a while ago. 01:45
Im happy that it is specced now anyhow. :) Just curious where is the information located at. (not general specs, but concerning this issue) 01:46
arnsholt Yay! 01:49
My solution for problem 2 now passes all of masak's tests ^^
TiMBuS TimToady, how is that 'supposed' to work, though? assume Inf actually means {1-elems} ? 01:50
or perhaps make it so a Range doesn't change a Whatever into an Inf when it's constructed? 01:52
01:59 lopaway is now known as lopnor
rokoteko sorear: ? 02:03
02:04 lopnor is now known as lopaway
sorear rokoteko: S04 02:05
02:05 lopaway is now known as lopnor
dalek ecza/cilbackend: 3027c50 | sorear++ | lib/CLRBackend.cs:
Generate fields for variables
02:07
ecza/cilbackend: 068b969 | sorear++ | lib/CLRBackend.cs:
Implement conditionality of protopad field generation
ecza/cilbackend: 4e2ba3e | sorear++ | lib/CLRBackend.cs:
Generate fields for packages
rokoteko "Note however that '$!.handled = 1;' marks only the main exception as handled. To mark them all as handled you must access them individually via the .pending method"
Tene not implemented at all in rakudo
rokoteko sorear: what does it mean "them" all there? 02:08
Tene rokoteko: any other pending exceptions
rokoteko Tene: are they stored in $! ?
Tene rokoteko: by default, failures are not thrown, but instead just return to the calling code, and set $!
at scope exit, $! is checked to ensure that all failures have been handled 02:09
rokoteko: Yes, in $!.pending, iirc. $! holds the most-recent failure, and $!.pending holds the rest.
You'd want to check the synopses to be sure, but that's what I remember.
rokoteko Tene: excellent. thank you. my quote was from the synopses. let me try to read through that part again before being more curious. : 02:10
:)
Tene rokoteko: so, if I have like: sub foo { fail }; sub bar { fail }; { foo(); bar(); ... } 02:11
at the ..., $! has the exception from bar, and $!.pending has a list containing the exception from foo
flussence wow, I *like* the sound of that a lot. 02:13
rokoteko ok. and $!.WHAT eq "Failure" ?
Tene rokoteko: Proooobably.
flussence: consider: @foo>>.maybe-fail(); 02:14
You run over all the items in parallel, and any failures during the processing are accumulated in $!
rokoteko Tene: ok. This is just sounds surprising that Rakudo cant really handle a failure (pun might not be intended).
Tene rokoteko: Nobody has worked on it since I stopped contributing.
flussence I was thinking it'd be perfect for something like batch-processing stuff over a flaky network :) 02:15
Tene rokoteko: The infrastructure is in place to handle most of it with not much trouble, but nobody is interested enough to work on it right now.
rokoteko: there are several other places where things need to be handled at *any* scope exit, even through exceptions, and there isn't a good general mechanism for that right now, so nobody's really touching it until somebody else fixes that, approximately. 02:16
afk; decommuting
rokoteko Tene: ok. hope you dont mind to answer if I ask why did you stop working on it?
Tene rokoteko: Ask again in an hour.
rokoteko Tene: Ill ask some other time, sure. :) 02:17
02:18 sftp left
rokoteko Tene: thanks anyhow. Ive read some article that said 'perl6 is ready for production' ... and it's difficult for me to understand how, if Rakudo cannot even handle exceptions according to the spec. :) Well. "rakudo never actually fails" -- one might say. 02:20
or actually, more of a general question. is it more like the spec changes when the implementation changes or like implementation changes when spec says it needs to? ie. is perl6 almost completely specced as it is now? 02:22
or is one still supposed to be "scared" of changes in the spec if one is wondering about actually using perl6 in future production environments just by following the current synopsis? 02:24
sorear the spec and the implementations are changing each other 02:25
we call it the "whirlpool model"
several people are using Perl 6 in production environments
we haven't declared backward compatibility yet, so don't assume it
if you write a script that runs on Rakudo 2010.09, keep a copy of 2010.09 to run it with 02:26
POSIX is backward compatible - Rakudo 2010.09 + contemporary Parrot will run fine on any OS version for years to come
rokoteko hmmmmm... maybe I misremember the blog/article/writing about perl6 being ready for production. or it was written by an idiot. :) thanks for the througouh explanation you all. :) 02:29
Maybe in a few years or such! :) 02:30
sorear Why wait?
You seem to have a bizarre definition of "production ready" 02:31
rokoteko ahhhhhh
that might be. I was NOT talking about "I wrote this engine for my personal blog in perl6 and it is ready for production" -situation. 02:32
there are some people using perl that might want build actually serious applications. and like to do it. :) 02:34
But 'failures are not yet implemented' is fucking big herring. or actually two herrings fucking and giving a birth to a giant pink herring. :) 02:36
sorear have you ever heard of something called the "no true scotsman fallacy" ?
failures ARE implemented
rakudo: say $*FOO.WHAT
p6eval rakudo a95c1d: OUTPUT«Failure()␤»
rokoteko sorear: nope, I havent heard of those. do you mind to explain? 02:37
flussence rakudo: sprintf('%d %1$d', 4).WHAT.say;
p6eval rakudo a95c1d: OUTPUT«Failure()␤»
rokoteko sorear: I wouldnt really want to chit-chat about the fact that you got a Failure() object implemented.
sorear rakudo: sub hi { fail("Foo") }; say hi.WHAT 02:39
p6eval rakudo a95c1d: OUTPUT«Failure()␤»
sorear what isn't implemented is the "throwing multiple exceptions at once" bit 02:40
flussence (did sorear implement that?)
sorear which is, IMHO, wrong
flussence: no
the only thing I have ever contributed to Rakudo is use Foo:from<perl5>;
flussence niecza: sub hi { fail("Foo") }; say hi.WHAT # I meant like this :)
p6eval niecza 406e042: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'fail' used at line 1␤Check failed␤»
sorear 80% of the specs are wishful thinking 02:41
nobody implements them, and they have more or less serious problems as written
the specs don't just describe Perl 6.0; they also lay out goals for the future
actually what we have here isn't quite the no true Scotsman fallacy 02:43
but something slightly different
the problem is that you keep adding conditions to "production ready"
stop that.
rokoteko sorear: ok, sorry. maybe I faulty remember the 'perl 6 is ready for production' article, atleast couldnt look it up now. :) so maybe my criticism was a bit harsh. apologizes and I appreciate all your good work on the implementation.
sorear also, the term "production" is silly in this context 02:44
instead, I'd like you to give a precise definition of "rokoteko ready"
02:44 molaf_ joined
rokoteko sorear: ready for programming in a serious environment? sure. 02:44
"define serious" .... yea. we can go on with this the whole night. ;) 02:45
02:48 molaf left 02:53 ch3ck3r joined
rokoteko ahhhhh.. dev.perl.org/perl6/ .. quote 'If you are looking for production ready code please use Perl 5' 02:56
02:57 ch3ck left
rokoteko That actually is very clearly stated on the site. 02:59
sorear The next time somebody asks about "production" readiness I'm going to reply "We have no plans at this time to ever start production of Perl 6 on tangible media"
03:00 lopnor is now known as lopaway
sorear I allowed myself to be taken in by the wrong question 03:01
the answer to "production ready" is quite simple and well defined
rokoteko ahhh.. found the article. blogs.perl.org/users/ingy_dot_net/2...ready.html 03:04
it actually said 'release ready' .. not referring to production.
Im just curious because Im earning my bread and herrings by working with perl and every now and then someone might ask me which way to head, perl 5.8.8, 5.10, 5.12 (or 5.14 etc) or 6. 03:06
So Id prefer myself to be up-to-date. 03:07
hence I try to follow on how far perl6 is implemented. and that is the one and only reason Im sometimes asking these (relatively stupid) questions here. 03:10
03:12 felliott left, glow left 03:29 Chillance left 03:35 redicaps joined 03:42 lopaway is now known as lopnor
lue wello there o/ 04:04
colomon has just found the crucial hole in the ABC code that makes him look silly...
lue
.oO(The Ministry of Silly Code)
04:06
04:50 justatheory left 04:52 orafu left 04:53 orafu joined 04:54 redicaps left 05:02 s1n1 left
shortcircuit Here's RC's analytics data from dec 17th, coming from perladvent.wordpress.com. I thought you might find it interesting, as it looks like folks find File I/O a particularly interesting topic. pastebin.com/M1HT1s5P 05:06
If there hasn't been an advent post dedicated to File I/O on P6 yet, that would probably be a popular topic. 05:07
shortcircuit is off to sleep.
05:21 nymacro left
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ics_tablet 05:41
Tene rokoteko: Perl 6 is ready for at least some production environments. I personally use it at work sometimes, as do some others. 05:45
rokoteko: So, you just figure out what it means for you, and do that.
rokoteko: You certainly *can* deal with exceptions okay in Perl 6, but not all of the specced features are available. CATCH blocks, resumable exceptions, etc. are all usable. 05:46
sorear: I'm curious about your thoughts on $!.pending. The main goal for that model, afaik, is to handle something like @foo>>.maybe-fail(); 05:48
sorear Tene: as written $!.pending has a very serious POLS violation on { buggy_code(); CATCH { say $! } } 05:50
Tene POLS? 05:51
sorear principle of least suprise
if buggy_code throws two exceptions at once, CATCH will eat one of them and rethrow the other
Tene I'm not very happy with $!.pending, but I'm not sure if my complaints are the same as yours.
Ahh, right, because they're *all* automatically rethrown at block exit.
sorear how many programmers will look at that code fragment and immediately release that exceptions might still come out of it? 05:52
Tene sorear: I vaguely recall that CATCH is supposed to mark all caught exceptions as handled, which might include .pending, but I'm unsure. 05:53
06:29 ch3ck3r left 06:46 uasi joined
uasi rakudo: my $a = 0 but True; if $a { say 'True' } 06:47
p6eval rakudo a95c1d: ( no output )
uasi rakudo: my $a = 0 but True; if ?$a { say 'True' } 06:48
p6eval rakudo a95c1d: OUTPUT«True␤»
Tene uasi: Yes, rakudo has problems with the get_bool vtable :( 06:51
uasi Tene: ooh, sad 06:53
06:56 soroush joined 06:57 soroush_ left 07:01 uasi left 07:30 Intensity joined 07:34 Bonham joined 08:00 wamba joined 08:03 glow joined 08:22 jhuni left 08:28 _kaare joined 08:48 lopnor is now known as lopaway 08:53 risou joined 08:58 jedai joined
moritz_ arnsholt: @a[1..*-1] should work in rakudo 09:09
rakudo: my @a = 1..5; say @a[1..*-1]
p6eval rakudo a95c1d: OUTPUT«2345␤»
09:16 ascent_ left 09:17 BigBoy_ joined 09:24 envi joined
TiMBuS moritz_, on that topic, rt.perl.org/rt3/Ticket/Display.html?id=77424 can be closed 09:32
i would also like to fix the @a[1..*] issue if someone would tell me how it is meant to work ;/ 09:34
moritz_ would also like to know 09:42
TiMBuS: ticket closed, thanks 09:45
TiMBuS np 09:50
09:50 rgrau joined
TiMBuS <TimToady> ranges that are "too big" autotruncate at the top 09:57
oh ok
i guess thats how..
rakudo: say (<1 2 3>[1..5]).perl 09:58
p6eval rakudo a95c1d: OUTPUT«("2", "3", Any, Any, Any)␤»
09:58 _twitch joined
TiMBuS so 'too big' == Inf? 09:59
moritz_ ' too big' == 'larger than this.end' 10:01
TiMBuS so the output above is wrong? 10:02
im having deja vu here.. i think the current output is wrong because its needed to allow slice assignment 10:03
10:10 mberends joined 10:12 dju left
arnsholt moritz_: Hooray. Thanks =) 10:16
mberends Disappointing news: due to snow in Frankfurt, my flights to Saint Petersburg for event.perlrussia.org/saintperl2/ were cancelled. We're going to try a Skype video as consolation at 13:00 GMT.
phenny mberends: 16 Dec 16:05Z <masak> tell mberends when you have time, I'd like to discuss irclog.perlgeek.de/phasers/2010-12-14#i_3087119 with you.
moritz_ TiMBuS: yes, we've discussed it before. Yes, the difficulty is that both slice assignment is supposed to work, and that in rvalue context the trailing Anys should not be there 10:17
arnsholt mberends: If it's any consolation, my GF's flight -to- Frankfurt was cancelled as well =)
mberends 800 flights cancelled yesterday, 450 of them in Germany. 10:18
moritz_ mberends: I hope you're not stuck anywhere
(if you're stuck in Frankfurt, you're just 2 hours of train ride from my home... visit me!)
mberends fortunately not, I managed to backtrack. 10:19
arnsholt mberends, the amazing Prolog traveller? ^^
mberends moritz_: that would have been a nice consolation :)
10:21 Trashlord left 10:25 Trashlord joined
tadzik oh, mberends 10:32
10:32 desertm4x joined
tadzik mberends: I did some additions to http-server-simple, wanna take a look? 10:32
mberends hi tadzik, yes please :)
tadzik mberends: github.com/tadzik/http-server-simple 10:33
it powers my grammar-based dispatcher :)
10:38 hudnix left 10:40 hudnix joined
mberends tadzik: nice. In a quick read, all your additions look ok, and obviously it already works for you. I need to check that the class->role switch does not impact other applications, and also that it will play nicely with what will become Perl 6 Dancer one day. 10:41
tadzik mberends: how could it impact anything? Perl 6 creates a class-role anyway, it someone wants to instantiate it 10:47
desertm4x I have a question regarding this piece of code (using Rakudo): pastebin.com/SKhHBTak -- Why do I have to use ::B in the new method instead of B (which I can use everywhere else). And is it preferable to use ::B everywhere?
tadzik oh, it even shoudn't be used like this, now as I look at the commit 10:48
desertm4x: where it B declared? 10:49
ah, nvm
desertm4x Nowhere, it is a "place holder"?
tadzik yeah, my bad
mberends tadzik: yes, class->role shouldn't impact anything. It's just not all fresh in my mind atm, been very busy with @other_stuff. 10:50
tadzik can see jnthn's hand in perlcabal.org/syn/S14.html#Parametric_Roles 10:51
moritz_ desertm4x: seems like a bug to me 10:52
tadzik mberends: do you have any roadmap for H::S::S in your head maybe? 10:53
mberends tadzik: initially the goal is to host Dancer, so that means PSGI support. Not reallly any other goals yet. 10:54
10:57 masak joined
masak oh weekend hai, #perl6! 10:57
moritz_ lolitsmasak! 11:00
masak lol!
rakudo: subset Foo::Bar of Int where { $_ %% 2 }; my Foo::Bar $i = 2; say $i; 11:01
p6eval rakudo a95c1d: OUTPUT«Null PMC access in type()␤ in main program body at line 22:/tmp/K6J9haMwsU␤»
masak rakudo: subset Foo::Bar of Int where { $_ %% 2 }; my Foo::Bar $i = 2
p6eval rakudo a95c1d: OUTPUT«Null PMC access in type()␤ in main program body at line 22:/tmp/TMqmq84u_F␤»
masak rakudo: subset Foo::Bar of Int where { $_ %% 2 }; my Foo::Bar $i
p6eval rakudo a95c1d: OUTPUT«Null PMC access in type()␤ in main program body at line 22:/tmp/ux_yOlKOWL␤»
masak rakudo: subset Foo::Bar of Int where { $_ %% 2 }
p6eval rakudo a95c1d: ( no output )
masak rakudo: subset Foo::Bar of Int where { $_ %% 2 }; say "alive"
p6eval rakudo a95c1d: OUTPUT«alive␤»
masak does a dip into RT for prior art
rakudo: subset A of Mu; my A $x 11:03
p6eval rakudo a95c1d: ( no output )
jnthn o/ #perl6
masak submits rakudobug
jnthn! \o/
jnthn ...heh, I see it's business as usual here. ;)
masak I'm just warming up! :)
...though I must confess reporting bugs is losing its glamour now that Rakudo isn't as much of a moving target. 11:04
after a few months of shooting fish in a barrel, the fish start to thin out...
jnthn masak: I'll try to change that soon. :P
masak I'm counting on it :)
jnthn
.oO( From next month, masak can come and nail rakudobugs to my door... :) )
11:05
masak
.oO( in the middle of the night... )
11:06 risou left
jnthn
.oO( Great, now the nightmares continue into the day too. :P )
11:06
masak mwhahaha
tadzik hello masak 11:08
masak tadzik: hi!
ok, I have an idea for slot #19 now. might as well volunteer for that slot. 11:09
jnthn digs into his packing
Long journey coming up :)
masak it's mixin types. I don't think that's been done.
jnthn: when're you leaving? 11:10
jnthn masak: Sleeper train leaves from Copenhagen at 18:20
masak: But need to allow loads of time to get there because...Skanetrafiken. :|
masak oh, train? wow.
jnthn masak: Heh. I'm glad I'm not flying because a bunch of UK airports are closed at the moment. :)
masak jnthn: wrong type of snow? :P 11:11
11:11 jferrero joined
masak that was an oblique reference to en.wikipedia.org/wiki/The_wrong_type_of_snow 11:11
jnthn masak: Yes, I'm well aware of that excuse. :P 11:13
masak I learned it from the musical "Starlight Express" :) 11:14
jnthn Wow. There's a type of snow called "Watermelon snow". That'd be painful to be hit by.
masak rakudo: subset A of Int where { $_ %% 2 }; my A $a 11:15
p6eval rakudo a95c1d: ( no output )
masak rakudo: subset A of Int where { $_ %% 2 }; my A $a; say "alive"
p6eval rakudo a95c1d: OUTPUT«alive␤»
masak rakudo: subset Foo::Bar where { $_ %% 2 }; my A $a; say "alive"
p6eval rakudo a95c1d: OUTPUT«===SORRY!===␤In "my" declaration, typename A must be predeclared (or marked as declarative with :: prefix) at line 22, near " $a; say \""␤»
masak rakudo: subset Foo::Bar where { $_ %% 2 }; my Foo::Bar $a
p6eval rakudo a95c1d: OUTPUT«Null PMC access in type()␤ in main program body at line 22:/tmp/E8zbnCZ3SK␤»
jnthn :/
masak just narrowing down the error. :)
jnthn What on earth is it doing there...
masak it's the :: that causes it, it seems. 11:16
<tadzik> good evening zebras! 11:19
I for one hope this will become an instant classic :)
jnthn It may, but it's not black and white. 11:23
11:30 BigBoy_ left
masak jnthn: :P 11:34
11:34 lopaway is now known as lopnor
masak I'd help furthering genetic modification just so that at some point in the future, scientists can drop a red-green zebra in a herd of ordniary zebras, and have the rest of the zebras go "wtf!?" 11:35
moritz_ ...unless zebras are color blind :-) 11:36
masak hm. maybe have the stripes run the other way, then. :)
11:41 shi joined
moritz_ a checker board zebra 11:44
masak that might natrually arise as offspring from an ordinary zebra and one with perpendicularly oriented stripes :P 11:45
jnthn Then they evolve the ability to play chess... 11:47
11:51 timbunce joined
masak <sorear> you can't use * currying with .. because 1..* is already taken to mean an open-ended range 12:02
sorry, what?
S09:241 explicitly begs to differ. 12:03
tadzik masak: you've got it :) 12:04
(zebras classic, I mean)
12:07 soroush left, BigBoy_ joined
colomon masak: err... @array[0 .. *] does not work because of * currying. 12:10
masak oh no, not this discussion again. :(
can't we just link to the last one :( 12:11
tl;dr summary: it does work, I'm right, the spec says I'm right.
colomon masak: @array[0..*] works, but it does NOT use currying. 12:12
@array[0..*-1] does use currying.
masak keeps silent and rolls eyes
colomon you can roll your eyes all you want, but that is EXPLICITLY how Perl 6 works, according to the spec. 12:13
jnthn rakudo: (0..*).WHAT.say
p6eval rakudo a95c1d: OUTPUT«Range()␤»
jnthn Indeed.
colomon rakudo: (0..*-1).WHAT.say 12:14
p6eval rakudo a95c1d: OUTPUT«WhateverCode()␤»
12:14 whiteknight joined 12:16 BigBoy_ left
masak from the previous discussion: 12:17
<masak> if it doesn't work with our current model, we need a new m
that's all I have to say.
er, s/new m/new model/ 12:18
copy/paste fail.
12:19 lopnor is now known as lopaway 12:20 sftp joined
colomon masak: I'm really not clear on what doesn't work here, other than your mental model of what happens in these cases.... 12:21
12:22 lopaway is now known as lopnor 12:29 BigBoy_ joined 12:39 felliott joined 12:43 MayDaniel joined 12:59 thepler left 13:05 timbunce left 13:08 MayDaniel left 13:13 redicaps joined 13:30 roen joined 13:31 roen left 13:35 ch3ck3r joined 13:36 snearch joined 14:04 f00li5h left 14:07 lopnor is now known as lopaway 14:11 zby_home_ joined
jnthn -> train to UK 14:27
14:27 [Coke] left 14:28 [Coke] joined, desertm4x left 14:34 lopaway is now known as lopnor 14:37 ambs joined, ambs left 14:53 felipe left, felipe joined 14:54 ascent_ joined 15:06 MayDaniel joined
mberends Phew! Using Skype, some bright lamps, a few pieces of cardboard and some adhesive tape, I have just given my Perl 6 Implementations talk to the Saint Petersburg Perl Workshop in Russia... from London. 15:15
colomon \o/ 15:17
moritz_ all hail our internet overloards!
colomon moritz_: sneak peak at today's Advent post: perl6advent.wordpress.com/?p=658&am...eview=true
still needs a round of proofreading
moritz_ since all I'm doing right now is thinking about masak's p4, I might just as well proofread it 15:18
regex basenote { <[a..g]+[A..G]> } 15:20
can be simplified to regex basenote { :i <[a..g]> }
s/regex/token/ even
colomon: you might spend half a sentence explaining what Lilypond is 15:23
(and/or linking to a page explaining it)
otherwise quite nice
colomon regex basenote { :i <[a..g]> } doesn't appear to actually work in Rakudo?
moritz_ rakudo: my regex basenote { :i <[a..g]> }; say 'abcABC' ~~ /<&basenote>+/ 15:24
p6eval rakudo a95c1d: OUTPUT«abc␤»
moritz_ indeed
nqp-rx--
colomon thanks 15:25
moritz_ but s/regex/token/ should work :-) 15:26
colomon what's the difference between regex and token? 15:28
15:28 cognominal left
moritz_ tokens don't backtrack 15:28
and a character class can only ever match 1 char, so there's no need for backtracking 15:29
colomon hmmm.
I think I'm going to leave the article like this -- it would just be another thing to explain -- and ponder changing the module in the future. 15:30
moritz_ sure
masak <colomon> masak: I'm really not clear on what doesn't work here, other than your mental model of what happens in these cases.... 15:33
while actively unwilling to discuss this further unless there's implementation ideas involved, I'm confused by this statement.
the discussion started with colomon explaining to me, again, that @a[ 0 .. *-1 ] doesn't work in Perl 6.
colomon no it didn't 15:34
@a [0..*-1] works perfectly in both Perl 6 and Rakudo
but it doesn't work the way you seem to think it does
masak I and S09.
colomon or perhaps more accurately, @a[0..*] doesn't work the way you seem to think it does.
masak I seem to think it returns all elements of @a. 15:35
moritz_ 0..*-1 is a HyperWhatever, 0..* a Range
and it should
masak yes.
moritz_ it doesn't yet, due to limitations in rakudo (or maybe in the spec, not sure yet)
masak right.
I agree that the spec is... possibly inconsistent. 15:36
colomon it does return all elements of @a. It does NOT curry, which is what you claimed.
masak and I'm *strongly* arguing for it to come down consistent in one particular way.
colomon The spec is perfectly consistent.
masak glad to hear it.
moritz_ colomon: afaict it's consistent, but not very explicit about *how* the detection of infinite lists should work
colomon we thrashed this all out last time, and changed the spec and Rakudo to conform to it.
It doesn't detect infinite lists, so far as I know. 15:37
It detects Ranges.
masak all that is fine by me.
moritz_ colomon: so postcircumfix:<[ ]>(Range) clips to both ends of the array? 15:38
masak my primary interest is making sure the corner case between *-1 and .[0..*] works.
colomon perlcabal is down? 15:39
15:39 Patterner left
colomon moritz_: that's my understanding 15:39
it may be a bit more complicated than that. 15:40
15:40 Psyche^ joined, Psyche^ is now known as Patterner
moritz_ colomon: it somehow has to react magically differently as lvalues and rvalues 15:41
which I don't think is possible today
masak colomon: now I see why you thought I was speaking about currying, and why that confused me. it was sorear who talked about currying, and I quoted him. the fact that he was talking about currying was mostly incidental; he was really talking about @a[0..*] not working. sorry about the confusion.
as far as I know, there's no problem with @a[ 1..* ], which is what irclog.perlgeek.de/perl6/2010-12-18#i_3100548 was about. 15:42
colomon no problem in what sense? 15:43
masak in the sense that it correctly produces a list of all elements of @a except the first.
moritz_ as I just elaborate, it's quite impossible to implement correctly
15:44 snearch left
colomon masak: agreed. 15:44
moritz_ if just clip ranges to the bounds of the array, @a[0..5] = 1..6 won't work
colomon moritz_: I'm not clear on why that's impossible to implement correctly?
ah.
masak hm.
I'm not immediately sure I see the problem.
colomon should it?
masak I see the lvalue/rvalue part.
but not why it's a problem.
moritz_ masak: because assigning to non-existing array items is supposed to autovivify them 15:45
ie my @a; @a[0] = 5;
masak right, and just reading them isn't.
moritz_ and likewise @a[0..1] = 5;
masak that's interesting; never thought about that before.
moritz_ masak: not only should it not autovivify them, but for ranges it should even return the empty list 15:46
masak but it feels right that it *should* behave differently in the two cases; what makes it impossible to implement?
ah.
moritz_ the fact that context flows outwards in Perl 6
masak right.
colomon you have to know whether you're an lvalue or an rvalue.
couldn't you do that with a proxy object?
moritz_ so @a[5] never knows if it's in lvalue or rvalue context
colomon it would be funky, but it seems like it ought to be doable. 15:47
moritz_ you mean that @a[1..5] returns something that behaves differently upon iteration and assignment to list items?
colomon yes
masak let's concretize this: my @a = 1..20; my $slice := @a[5..10]; say $slice.elems; say $slice.WHAT; $slice = 15..20; # what should be printed? should the assignment work? 15:48
colomon ye gads
masak :)
moritz_ no, because $slice is a scalar
masak moritz_: can you make a similar example that works? 15:49
moritz_ masak: that works? or that demonstrates the problem?
colomon what if you made it $slice := 15..20 at the end?
masak moritz_: the latter :)
colomon no, never mind.
moritz_ ok
my @a = 0..9
@a[8..20].elems # should print 2 15:50
@a[8..20] = 1..*; @a.elems # 21
colomon !!!!!
masak right. 15:51
there you go.
I shouldn't have complicated things by trying to bind to a slice. :)
moritz_ (if it's only supposed to work with infinite ranges, just swap * and 20 in the example)
masak quite bluntly, slices behave very differently upon reading and writing.
moritz_ right. 15:52
masak and that seems fair game to me.
moritz_ afaict rakudo doesn't have a dedicated type for slices yet 15:53
colomon another potential troublemaker: what's @a[0, 2..*] do?
moritz_ the same as (@a[0], @a[2..*]) 15:54
colomon that's what I hoped, but that makes things even harder to implement. 15:56
moritz_ why? 15:57
masak could a Parcel be used as the type for slices?
moritz_ it just returns something like Parcel(@a[0], Slice(@a, 2..*))
colomon you can't just look for @a[Range] to trigger the special behavior 15:58
moritz_ colomon: currently .[] does things like calling Code objects, and then calls .at-pos() to resolve the actual value at the array slot 15:59
it can do the range detection too
colomon rakudo: my @a = 1..100; say @a[-> $size { 1, 4 ...^ * > $size }].perl
p6eval rakudo a95c1d: OUTPUT«(2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, Any)␤»
colomon dang it!
16:00 mtk left
colomon rakudo: my @a = 1..100; say @a[-> $size { 1, 4 ...^ * >= $size }].perl 16:01
p6eval rakudo a95c1d: OUTPUT«(2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98)␤»
colomon there we go.
moritz_ rakudo: say (2, 5, 8 ... * >= 100).perl 16:03
p6eval rakudo a95c1d: OUTPUT«(2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101)␤»
moritz_ a bit simpler this time :-)
colomon and wrong. ;)
moritz_ rakudo: say (2, 5, 8 ...^ * >= 100).perl
p6eval rakudo a95c1d: OUTPUT«(2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98)␤»
moritz_ better? :-) 16:04
16:05 MayDaniel left 16:06 felliott left
colomon is now contemplating horrible ideas like lazy array assignment... 16:08
16:14 mtk joined 16:34 jferrero left
masak "Soon the members of team were twice and then dozens of times more effective than their peers, and they began to view their jobs not as testing software, but as breaking software." -- a captivating tale. www.t3.org/tangledwebs/07/tw0706.html 16:35
after reading that, I totally want my own Black Team. 16:36
masak laughs maniacally
16:38 BigBoy_ left
masak at the very least, I could make a talk titled "Black Team techniques -- becoming a Q&A ninja". 16:41
moritz_ "And the things they did to software went beyond all bounds of rational use testing and were more akin to software torture."
16:41 entel joined
entel hello, do perl5 modules work with perl6? 16:42
colomon entel: not yet.
entel oh darn
masak entel: there's something called blitzkost that's worth checking out. 16:43
moritz_ some do, if you install blizkost
masak see modules.perl6.org/
entel ok so i want to write a irc bot in perl6, any modules for that yet?
masak wait, blizkost isn't on modules.perl6.org/ ? o.O
moritz_ entel: check out modules.perl6.org/, I can't remember all perl 6 modules anymore :-) 16:44
masak oh well, see github.com/jnthn/blizkost
entel hmm doesnt look like it 16:45
wolverian can I build rakudo* on windows from the tarballs?
the installer release is pretty old 16:46
entel hmm how do sockets work in perl6 then i wonder
masak in Rakudo, they work, at least. 16:48
they could still be improved in various ways.
flussence IO::Socket, same as perl6
*5
entel oh okay
great
16:50 BigBoy_ joined 16:53 MayDaniel joined 17:11 masak left 17:19 MayDaniel left
wolverian so I built rakudo with --gen-parrot on win32, but gmake rakudo-test gives me rakudo\perl6.o:perl6.c:(.text+0x33): undefined reference to `Parrot_set_config_hash' 17:20
rakudo*, rather
the 2010.11 release 17:21
17:31 lopnor is now known as lopaway
wolverian hrm. maybe I just forgot to run gmake install first. 17:33
17:36 ch3ck joined
moritz_ --gen-parrot should run install for parrot 17:36
17:37 ch3ck3r left, Chillance joined 17:38 dual joined
wolverian moritz_: it did. 17:38
not sure if it succeeded.
running gmake install in the parrot directory doesn't help. 17:39
17:40 Guest31794 left
wolverian weird. just gmake works fine to build rakudo after --gen-parrot has installed parrot, but running gmake rakudo-test or trying to run perl6.exe after gmake install doesn't find parrot. 17:54
17:58 justatheory joined 18:02 muixirt joined
moritz_ wolverian: you're not in a directory with whitespace in ths path, by chance? 18:05
18:05 BigBoy_ left
muixirt with latest parrot/rakudo something like perl6 -e 'while 1 {my $a="testtest"}' # slowly comsumes memory 18:09
wolverian moritz_: I am. 18:10
no, I'm not
I *am* in a path with a suffix, which might be confusing to some. 18:11
gcc -o perl6.exe "perl6.o" C:/Users/Ilmari/Downloads/rakudo-star-2010.11.tar/rakudo-star-2010.11/install/lib/parrot\parrot_config.o "C:/Users/Ilmari/Downloads/rakudo-star-2010.11.tar/rakudo-star-2010.11/install/bin\libparrot.dll" -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -lgmp 18:12
that builds and links perl6.exe succesfully, but running it fails to find parrot.
TimToady wonders if we should make CATCH an implicit loop over @!, insteaqd of priviledging the most recent $! so highly, and if so, whether it should go oldest to newest, or newest to oldest. Can argue it both ways... 18:17
moritz_ has no idea how to fix it
TimToady *privileging
and s/q//
18:20 PerlJam left, hatseflats left, hatseflats joined, PerlJam joined
wolverian maybe I should try with a separately installed parrot 18:20
TimToady under that view, all exception objects are kept in @!, and $! is merely the message composed of all exceptions currently in @!, and handling an exception means deleting it from @! (or not putting it back, if CATCH is shifting/popping @! in its implicit loop) 18:21
18:21 kulp joined
TimToady if we assume a destructive CATCH loop, then the current exception is in $_ and @! contains all the as-yet-uncaught exceptions, available for examination 18:22
18:23 takadonet1 joined
takadonet1 hey 18:23
18:23 kulp left
TimToady but we could nibble on @! from either end, and that depends on whether we think we get more control by examining @! from oldest to newest or from newest to oldest 18:24
the current design assumes the $! controls the (superseded) pending exceptions, but in many cases the oldest exception is likely to be the most informative 18:25
wolverian after installing parrotwin32 2.10 and running gmake in a clean rakudo 2010.11 dir, I get: cc1.exe: warning: C:\icu-4.4.2\icu\include: No such file or directory 18:27
which fails the build.
there is C:\Parrot-2.10.0\icu, which it should be looking in, I think.
colomon someone please make sure my Advent post (already in wordpress) goes live in the next hour or two? kthx. afk. 18:35
moritz_ why not just publish it now? 18:40
flussence TimToady: I'd prefer a @! in little-endian order, so that I can stick a logger function into a CATCH block and not have to wonder whether my log's in chronological order :)
TimToady the advent link didn't work for me
flussence: that's a point 18:41
moritz_ TimToady: as long as it's a preview, it only works for authors
TimToady there are actually two degrees of freedom here, the order that @! is stored, and the order that it is read 18:42
in any case, I envision a very lightweight implementation; @! could simply be a linked list, and testing for pending exceptions is just looking to see if the root is null
if a single linked list, then prepending new exceptions is most efficient, but the @! abstraction could make it look either order anyway 18:43
and the CATCH abstraction can iterate the @! abstraction in either order 18:44
but looping oldest to newest in that case would require a list reversal at some level or other 18:46
which might be okay; exception processing is supposed to be exceptional
so we intentionally bias it to do more processing on the handling side so that the exception trapping mechanism in normal code can be as lightweight as possible 18:47
18:47 felliott joined
TimToady there is also a semantic divide between unthrown and thrown exceptions; there is only one of the last, and it's the the most recent 18:49
that's what the $!.pending model is all about, but I could see ways of invoking CATCH whereby the currently being thrown exception is added to the "new" end of @! and then processed alongside any unthrown exceptions that were already in @! 18:50
processing old to new would, however, require CATCH to examine the other end of @! to find the most proximate cause 18:51
which to me argues that the @! abstraction wants to have [0] be the newest and [*-1] be the oldest, which makes CATCH a pop loop, not a shift loop 18:52
flussence that's a good point... and it's the same order as backtraces appear in, so there's consistency doing it that way... 18:54
18:55 felliott left
TimToady well, there are two cultures of backtraces too... 18:57
also, @! entries are not necessarily causally related in the way that backtraces are assumed to be
flussence maybe @! should be %!, then people wouldn't complain that they expected either order :P 18:58
TimToady only if we can easily sort in order of occurrence 19:09
in the limit, @! is a relation of exceptional events that could be extracted on in any of various ways 19:10
so maybe we just want $! to be a database handle ;)
19:11 PacoLinux left
takadonet1 www.reddit.com/r/programming/commen...bc_module/ Being downvoted :( 19:12
19:12 PacoLinux joined
takadonet1 it's a great post! 19:12
19:12 adu joined 19:13 adu left, fith joined 19:24 glow left 19:29 adu joined, Exodist left, exodist_ joined 19:34 ardeshir joined 19:35 exodist_ is now known as Exodist
ardeshir ardeshir 19:35
perl6: say "hi p6" 19:36
p6eval pugs, rakudo a95c1d: OUTPUT«hi p6␤»
takadonet1 ardeshir: hey 19:37
moritz_ rakudo: my $t = <morning noon evening>[DatTime.now.hour div 8]; say "good $d"
p6eval rakudo a95c1d: OUTPUT«===SORRY!===␤Symbol '$d' not predeclared in <anonymous> (/tmp/wFe5hS0CMq:22)␤»
moritz_ rakudo: my $t = <morning noon evening>[DatTime.now.hour div 8]; say "good $t"
p6eval rakudo a95c1d: OUTPUT«Could not find sub &DatTime␤ in main program body at line 22:/tmp/3WVY7JNF4g␤»
moritz_ rakudo: my $t = <morning noon evening>[DateTime.now.hour div 8]; say "good $t"
p6eval rakudo a95c1d: OUTPUT«good evening␤»
moritz_ such demonstrations are far more impressive if they work on first attempt :-) 19:38
19:38 snearch joined
ardeshir rakudo: my $t=<mornin aftrnoon night>[DateTime.now.hour div 8]; say "Good $t" 19:40
p6eval rakudo a95c1d: OUTPUT«Good night␤»
ardeshir nice...
19:41 MayDaniel joined
tadzik hello zebras 19:47
19:48 plobsing left
fith rakudo: my $t=<a b c d e>; print $t.pick(1) 19:53
p6eval rakudo a95c1d: OUTPUT«d»
fith Huh, cool... after 15+ perl4/5 I might yet be able to adapt :-) 19:54
moritz_ it's certainly fun trying :-) 19:55
19:58 masak joined
tadzik oh, masak, you missed "hello zebras" :) 19:59
masak heh :) 20:00
<moritz_> such demonstrations are far more impressive if they work on first attempt :-) 20:06
that's why I usually test-drive one-liners locally...
20:07 MayDaniel left
ardeshir rakudo: $c = 'p'; $n = $c.ord; say $n; 20:07
p6eval rakudo a95c1d: OUTPUT«===SORRY!===␤Symbol '$c' not predeclared in <anonymous> (/tmp/dlX4reoRjj:22)␤»
masak rakudo: my $c = 'p'; $n = $c.ord; say $n;
p6eval rakudo a95c1d: OUTPUT«===SORRY!===␤Symbol '$n' not predeclared in <anonymous> (/tmp/4hX9T6gFxv:22)␤»
masak rakudo: my $c = 'p'; my $n = $c.ord; say $n;
p6eval rakudo a95c1d: OUTPUT«112␤» 20:08
masak ardeshir: strict mode on by default in Perl 6.
moritz_ rakudo: say ~'Hello'.ords
p6eval rakudo a95c1d: OUTPUT«72 101 108 108 111␤»
ardeshir rakudo: my $c='p'; my $n = $c.ord; say $c, $n;
p6eval rakudo a95c1d: OUTPUT«p112␤»
ardeshir nice ...
.ord > erlang strings... 20:09
rakudo: say ~ 'erlang'.ords; 20:10
p6eval rakudo a95c1d: OUTPUT«101 114 108 97 110 103␤»
ardeshir perl6 makes me wet :-)
takadonet1 lol
masak ardeshir: that's probably because of the memory leaks... 20:11
tadzik I hope that's because you spilled your drink 20:12
ardeshir lets hope snot for long
not drinking $yet
20:13 muixirt left 20:14 plobsing joined
takadonet1 fith: : what types of perl 4/5 application have you written? 20:16
rjbs I didn't even know there *was* a Perl v⅘ 20:18
fith takadonet1: Mostly SysAdmin type scripts, I've done a bit of Web devel in Dancer, (and attempted Catalyst devel...), lots of what could be best classified as "misc" :)
masak likes misc 20:19
fith :p only a little bit of Perl4, got clue-by-foured into using perl 5 by the original group I started working with
20:25 timbunce joined, timbunce left
takadonet1 rakudo: class A {}; my $class= 'A'; my $x = $class.new(); 20:34
p6eval rakudo a95c1d: ( no output )
takadonet1 interesting...
masak no, not really.
Str has a .new method, just like other classes. 20:35
moritz_ old bug
takadonet1 rakudo: class A::B {}; my $class = 'A::B'; my $x = $class.new(); say $x.WHAT;
p6eval rakudo a95c1d: OUTPUT«Null PMC access in get_repr()␤ in main program body at line 22:/tmp/dDziDAwrHT␤»
takadonet1 workarounds?
masak submits rakudobug
takadonet1: don't do it from the beginning :)
20:36 jferrero joined
moritz_ ::($class).new, once it's implemented 20:36
takadonet1 masak: Well doing a port of Text::Diff and it uses that technique alot ... all well
masak for now, maybe &eval
colomon wait, my $class = 'A::B'; my $x = $class.new() is the bug?
20:37 plobsing left
moritz_ yes 20:37
and that it works without :: too
colomon right
rakudo: class A::B {}; my $class = 'A::B'; my $x = $class.eval.new(); say $x.WHAT;
p6eval rakudo a95c1d: OUTPUT«A::B()␤»
colomon that's the "workaround". (ie a correct way to do it, that actually works in Rakudo.) 20:38
takadonet1 thanks
fith rakudo: my $t='Word n0t 123'; $t ~~ m/(\d+)/; print $/
p6eval rakudo a95c1d: OUTPUT«0»
masak no, I submitted the Null PMC access. the Str.new is already in RT, I think.
fith rakudo: my $t='Word n0t 123'; $t ~~ m:g/(\d+)/; print $/ 20:39
p6eval rakudo a95c1d: OUTPUT«===SORRY!===␤Adverb 'g' not allowed on m at line 22, near "; print $/"␤»
moritz_ that doesn't work yet, due to some conceptual problems
but you can use $str.match(:g, /regex/)
colomon masak++ 20:40
fith Ah, cool, no worries, mostly working through on-line examples
20:52 adu left
masak I'm currently trying try.rakudo.org from Firefox on Windows. Getting a dialog box saying "A serious error has occurred, please file a bug report describing what happened". 21:03
This sounds very enticing; how do I go about filing a bug report? :P
21:03 snearch left
masak rakudo: my $b = True but False; say $b; say ?$b 21:04
p6eval rakudo a95c1d: OUTPUT«Bool::True␤Bool::False␤»
masak I intend to write tomorrow's advent post about that small program. :)
moritz_ /o\ 21:05
masak aye -- take cover! :)
21:05 adu joined
masak inverting the arms like that makes it seem in my font like someone under a bed covering head under arms... 21:06
lue hello o/ 21:08
masak hi lue
moritz_ hates web development 21:09
lue
.oO(salutations ō\ )
masak is o\ the Windows version of o/ ?
moritz_ it's like expressive dancing instead of using plain english
masak: \\o\ is :-)
masak moritz_: then maybe we should outsource web development to honey bees...
moritz_ masak: but we have to communicate with them first :/ 21:10
21:10 jhuni joined
masak ...and we don't dance well enough :( 21:10
lue moritz_: are you required to support old versions of IE?
flussence masak: I just tried the try.rakudo code locally and it works, I think that server just needs a poke :(
masak oh! now I see: o\ is an 'o' followed by an escaped space.
fith ask the #Dancer guys :)
masak flussence: I'll try again, then. 21:11
fith++
flussence it was doing the same error yesterday...
moritz_ lue: nope. But I'm still trying to use CSS for site layout (for which it wasn't designed), and HTML for a GUI (for which it wasn't design)
lue what was CSS made for then? 21:12
masak flussence: no, still doesn't work here.
moritz_ and a strange mixture of mostly manual DOM writing on the server, letting the browser parse it, and then accessing the DOM tree with JS again
lue: layout
lue: but it's awefully hard to make something like a three-column layout with headers and footers 21:13
(yes, it's a solved problem, and can be found on the intertubes. But doing something similar yourself is hard)
lue I tried seeing how to do that actually. It's (amazingly&surprisingly) hard. 21:14
moritz_ right
flussence masak: I think the backend part's gone wrong somehow. AFAIK it's hitting a 30-second timeout (at frontend/try-rakudo.pl:45), but I still haven't figured out why
lue [ as much so as Unicode in (La)TeX ]
moritz_ because CSS wasn't meant for GUI-like layouts
lue: unicode in latex works pretty well with xetex, or whatever it's called
flussence (that bit of code seems familiar though, I remember it having problems relating to \n)
lue XeTeX is great, if only I had a tool that would show me what glyphs were in a font. [ it's the only reason I don't use XeTeX now ] 21:15
moritz_ why not write such a tool yourself? 21:16
doesn't sound too hard, actually
21:16 obsd123 joined
lue no, actually. I'd probably end up venturing beyond .... *gulp* .... Perl 6. :) 21:16
moritz_ there are other fine languages too 21:17
lue I know. I'd actually be surprised if I could do it in P6 right now :D
moritz_ you sure could 21:18
you can read binary data
what else do you need?
obsd123 Can anyone point me towards an elucidation on this thought "Interchangable runtime engines let you interpret your bytecode or convert it to something else (e.g., Java, C, or even back to Perl)." from dev.perl.org/perl6?
lue A way to display the font glyphs I would think.
moritz_ lue: ASCII art :-)
lue [ If nothing else, it'd be a good chance to put that C++ book to some use :D ] 21:19
moritz_ in fact, you can write pixel graphics (pnm) or vector graphics (svg)
21:19 zby_home_ left
moritz_ obsd123: the idea is to write a compiler that can emit either CLR or JVM code, for example 21:19
currently no compiler does that though, afaict 21:20
masak rakudo: my $value = 42 but role { method Bool { False } }; say $a; say ?$a
p6eval rakudo a95c1d: OUTPUT«===SORRY!===␤Symbol '$a' not predeclared in <anonymous> (/tmp/WOdizafK5p:22)␤»
masak rakudo: my $value = 42 but role { method Bool { False } }; say $value; say ?$value
p6eval rakudo a95c1d: OUTPUT«42␤Bool::False␤»
obsd123 moritz_: The way the statement is written it makes it sound as though I could write a really complex, cool program in p6, p5 or whatever that would be vastly too complex to write in, say, C, and then just have the perl binary spit out some C code that does the exact same thing 21:21
or am I completely off base and misunderstanding?
moritz_ obsd123: it sure sounds like it 21:22
obsd123: and at least for perl 6 that's one of the goals
we're currently working on adding a .NET/CLR backend to rakudo (a perl 6 compiler written on top of parrot)
obsd123 sounds too awesome to be true 21:23
would completely change the way one goes about learning a new language
moritz_ well, C as a backend would be a real pain to implement
but JVM and .NET and parrot seem realistic as backends
flussence oh, I just remembered something 21:26
moritz_: can you check if the rakudo that try.rakudo.org's using has readline enabled?
obsd123 it seems like if C or any other low-level language could be implemented it would obviate the need for a perl parser since the outputted C code (or whatever else) would be vastly more efficient at runtime
flussence I think it might be breaking because that's missing... 21:27
moritz_ obsd123: that's a common misconception
obsd123: the underlying perl code still has a vast flexibility that comes at a certain cost when mapped to the machine level
independently of whether you go through C, or JIT compile it 21:28
21:28 Guest1723 left
moritz_ flussence: I'll try 21:28
flussence thanks :)
(it should have the path to the perl6 interpreter in ./backend/.config)
moritz_ flussence: nope, no readline 21:30
21:31 timbunce joined
flussence hm, I'll see if I can reproduce the error here then 21:32
obsd123 moritz_: I guess that makes sense . . . you wouldn't be able to determine how much memory to allocate to something ambiguous like "$var = $user_input" at compile time even if that statement were translated to C, so all of the same magic in perl would have to be dumped into your C code . . . Seems a bit more obvious why it would be a pain to implement now :)
21:32 Helios left, ascent_ left 21:35 ardeshir left, LoRe left
moritz_ obsd123: right. And it would need a GC, strings can't map to C level strings (because they are grapheme level in p6) etc. 21:41
21:43 Helios joined 21:44 envi left
masak ok, tomorrow's Advent post is now up backstage on perl6advent.wordpress.com, and scheduled for 00:00 UTC tomorrow. 21:47
reviews welcome.
21:47 entel left 21:49 wamba left 21:52 risou joined
flussence nice post, though I prefer to write p5 zero-equals-success lines as "if ( system($whatever) == 0 )" :) 21:53
masak ok, I'll change it to that to reflect real-world usage :) 21:57
lue Great post 21:59
(and I'm sure that last example happens somewhere in the real world)
colomon nice post.
Looked good to me, proofreading-wise.
masak thanks. it was inspired by a tweet that highlighted the last example as scary/wonderful. 22:00
it's a sobering thought that the Advent calendar has thousands of readers, if one includes the long tail. 22:02
22:05 adu left
masak I think pmichaud++'s finish last year on the 24th was very good. will we have something equally good this year? 22:06
moritz_ maybe TimToady++ on social hacks? 22:09
masak yes please. 22:11
flussence oh jeez.
masak provided his thumb is healed by then.
flussence lack of readline isn't the problem with try.rakudo.
Now I'm at a loss.
:/
22:12 MayDaniel joined
flussence I guess all I can suggest at this point is to see what error message (if any) the persist.pl script is printing... 22:13
moritz_ flussence: I can give you access to feather3 where this stuff is hosted 22:14
flussence: would that help? 22:15
flussence go ahead, I'll see what I can do with it
masak flussence++
flussence (I bet it'll turn out to be something obvious and silly...) 22:16
lue reading colomon's post, I just realized this 'actions' thingy might help with my Pod parser [ or at least make it more readable :) ] 22:17
flussence huh, this looks like a really old git checkout... 22:20
moritz_ feel free to pull
flussence oh, the commits since shouldn't have touched the server side stuff anyway. I'll leave that till I get it working.
cotto what's the right way to install a perl module on feather? 22:21
moritz_ if tehre's a debian package for it, sudo aptitude install libfoo-bar-perl 22:23
cotto: what do you need?
cotto whatever aloha needs
moritz_ if there's no debian package, use cpanm 22:24
cotto ok
no sudo for me. 22:25
flussence hm, the backend's running in screen which means I should be able to reattach to that to see the error... but screen won't let me.
any idea what "Cannot open your terminal '/dev/pts/11' - please check." means?
cotto no, though I thought screen sessions had to be started shared 22:26
flussence oh... it means my real uid owns the terminal and ~tryrakudo can't open it. /facepalm
masak heads home to sleep 22:29
moritz_ if nothing else helps, kill the screen, and restart the programs inside
masak 'night, zebras.
moritz_ (maybe investigate first which run)
'night striped masak
masak is striped the other way :)
22:30 masak left
cotto who do I talk to to get added to sudoers? 22:30
22:30 risou left
flussence got into screen finally, looks like the frontend isn't talking to the backend for whatever reason 22:31
time to restart it, I think.
moritz_ cotto: on which machine? feather1 or 3? 22:32
flussence fixed it!
cotto feather
moritz_ cotto: you should have sudo now
cotto moritz_, thanks 22:33
flussence (strangest error message I've ever seen: "$TERM is too long". wtf?) 22:38
22:39 LoRe joined 22:43 ascent_ joined 22:45 timbunce left
lue new blog post-it! rdstar.wordpress.com/2010/12/18/sn...nd-a-book/ 22:47
22:47 masonkramer joined
flussence I thought that was going to be a blog post about U+2603 and the one after it :) 22:53
cotto moritz_, Bot::BasicBot::Pluggable is installed but aloha's bot.pl can't find it. 22:54
23:01 MayDaniel left
lue what I did and wanted to do is based on 2603 and 2604 though : 23:02
s/:/:)/
23:19 lopaway is now known as lopnor
sbp .u 2603 23:21
phenny U+2603 SNOWMAN (☃)
sbp .u 2604
phenny U+2604 COMET (☄)
fith there's a Unicode for a snowman? heh 23:26
23:29 _kaare left 23:34 whiteknight left 23:36 whiteknight joined
takadonet1 anyone have an idea what this means: Placeholder variable cannot override existing signature 23:37
23:43 rgrau left 23:51 s1n joined