Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-12-18

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:03 timbunce left #perl6
00:10 timbunce joined #perl6
00:11 icwiener left #perl6
00:12 jaldhar joined #perl6
00:13 cdarroch left #perl6
00:16 envi joined #perl6
00:23 arnsholt What's the currently correct way to get all elements of an array except the first?
00:23 arnsholt @a[1..*] is apparently not it?
00:25 sorear @a[{1..$^a}]
00:25 sorear you can't use * currying with .. because 1..* is already taken to mean an open-ended range
00:25 arnsholt Ah, right
00:26 sorear so you have to use a more clunky syntax
00:26 wolverian @a.tail?
00:26 wolverian thought we had that.
00:26 flussence rakudo: my @a = <1 2 3 4>; say @a[1^..@a]; #?
00:26 p6eval rakudo a95c1d: OUTPUT«34Any()␤»
00:26 flussence argh.
00:26 arnsholt Yeah have to subtract one
00:26 arnsholt As I just discovered on my REPL =)
00:26 wolverian rakudo: <a b c d>.tail
00:26 p6eval rakudo a95c1d: OUTPUT«Method 'tail' not found for invocant of class 'Parcel'␤  in main program body at line 22:/tmp/aN5jt0lNEY␤»
00:27 wolverian sadpanda
00:27 sorear however .tail is a very nice idea and I will add it to my Perl6 asap
00:27 sorear :)
00:30 dalek tpfwiki: (Brian Julin)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6
00:34 timbunce left #perl6
00:38 molaf joined #perl6
00:42 lopaway is now known as lopnor
00:46 TimToady rakudo: my @a = <1 2 3 4>; say @a[1..*]
00:46 p6eval rakudo a95c1d: OUTPUT«(timeout)»
00:46 TimToady that is specced to work
00:48 diakopter oh; I didn't know that
00:49 sorear How?
00:49 TimToady ranges that are "too big" autotruncate at the top
00:50 sorear So @a[1..10] is magically different from my @b = 1..10; @a[@b] ?
00:50 sorear (Where by magically I mean MMDally)
00:52 TimToady S09:217 is the current spec on that
00:52 TimToady we may restrict this to "known infinite" lists
00:54 sorear oh, hmm
00:55 sorear I didn't really that there were recognized *types* of iterators
00:55 sorear so I guess infix:<...> can
00:55 sorear 't be implemented using just gather/take
00:59 envi left #perl6
00:59 jferrero left #perl6
01:37 lopnor is now known as lopaway
01:39 rokoteko is the fail() and its binding with $! specced?
01:39 sorear yes
01:40 rokoteko sorear: ok. so when you fail(); fail() and fail(); in a row there should be three events readable from $! ?
01:41 rokoteko correct?
01:44 sorear no
01:44 sorear fail() does an implicit return
01:44 sorear the latter two fails are unreachable
01:44 rokoteko where is the current spec?
01:44 sorear github.com/perl6/specs/
01:44 rokoteko no but concerning failure objects and $! :)
01:45 rokoteko I think I tried to read the synopsis, but it was a while ago.
01:46 rokoteko Im happy that it is specced now anyhow. :) Just curious where is the information located at. (not general specs, but concerning this issue)
01:49 arnsholt Yay!
01:49 arnsholt My solution for problem 2 now passes all of masak's tests ^^
01:50 TiMBuS TimToady, how is that 'supposed' to work, though? assume Inf actually means {1-elems} ?
01:52 TiMBuS or perhaps make it so a Range doesn't change a Whatever into an Inf when it's constructed?
01:59 lopaway is now known as lopnor
02:03 rokoteko sorear: ?
02:04 lopnor is now known as lopaway
02:05 sorear rokoteko: S04
02:05 lopaway is now known as lopnor
02:07 dalek niecza/cilbackend: 3027c50 | sorear++ | lib/CLRBackend.cs:
02:07 dalek niecza/cilbackend: Generate fields for variables
02:07 dalek niecza/cilbackend: review: https://github.com/sorear/niecza/commit/3027c5045e
02:07 dalek niecza/cilbackend: 068b969 | sorear++ | lib/CLRBackend.cs:
02:07 dalek niecza/cilbackend: Implement conditionality of protopad field generation
02:07 dalek niecza/cilbackend: review: https://github.com/sorear/niecza/commit/068b9693e4
02:07 dalek niecza/cilbackend: 4e2ba3e | sorear++ | lib/CLRBackend.cs:
02:07 dalek niecza/cilbackend: Generate fields for packages
02:07 dalek niecza/cilbackend: review: https://github.com/sorear/niecza/commit/4e2ba3efc7
02:07 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"
02:07 Tene not implemented at all in rakudo
02:08 rokoteko sorear: what does it mean "them" all there?
02:08 Tene rokoteko: any other pending exceptions
02:08 rokoteko Tene: are they stored in $! ?
02:08 Tene rokoteko: by default, failures are not thrown, but instead just return to the calling code, and set $!
02:09 Tene at scope exit, $! is checked to ensure that all failures have been handled
02:09 Tene rokoteko: Yes, in $!.pending, iirc.  $! holds the most-recent failure, and $!.pending holds the rest.
02:09 Tene You'd want to check the synopses to be sure, but that's what I remember.
02:10 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 rokoteko :)
02:11 Tene rokoteko: so, if I have like: sub foo { fail }; sub bar { fail }; { foo(); bar(); ... }
02:11 Tene at the ..., $! has the exception from bar, and $!.pending has a list containing the exception from foo
02:13 flussence wow, I *like* the sound of that a lot.
02:13 rokoteko ok. and $!.WHAT eq "Failure" ?
02:13 Tene rokoteko: Proooobably.
02:14 Tene flussence: consider: @foo>>.maybe-fail();
02:14 Tene You run over all the items in parallel, and any failures during the processing are accumulated in $!
02:14 rokoteko Tene: ok. This is just sounds surprising that Rakudo cant really handle a failure (pun might not be intended).
02:14 Tene rokoteko: Nobody has worked on it since I stopped contributing.
02:15 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.
02:16 Tene 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 Tene afk; decommuting
02:16 rokoteko Tene: ok. hope you dont mind to answer if I ask why did you stop working on it?
02:16 Tene rokoteko: Ask again in an hour.
02:17 rokoteko Tene: Ill ask some other time, sure. :)
02:18 sftp left #perl6
02:20 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:22 rokoteko 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:24 rokoteko 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:25 sorear the spec and the implementations are changing each other
02:25 sorear we call it the "whirlpool model"
02:25 sorear several people are using Perl 6 in production environments
02:25 sorear we haven't declared backward compatibility yet, so don't assume it
02:26 sorear if you write a script that runs on Rakudo 2010.09, keep a copy of 2010.09 to run it with
02:26 sorear POSIX is backward compatible - Rakudo 2010.09 + contemporary Parrot will run fine on any OS version for years to come
02:29 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:30 rokoteko Maybe in a few years or such! :)
02:30 sorear Why wait?
02:31 sorear You seem to have a bizarre definition of "production ready"
02:31 rokoteko ahhhhhh
02:32 rokoteko 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:34 rokoteko there are some people using perl that might want build actually serious applications. and like to do it. :)
02:36 rokoteko 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" ?
02:36 sorear failures ARE implemented
02:36 sorear rakudo: say $*FOO.WHAT
02:36 p6eval rakudo a95c1d: OUTPUT«Failure()␤»
02:37 rokoteko sorear: nope, I havent heard of those. do you mind to explain?
02:37 flussence rakudo: sprintf('%d %1$d', 4).WHAT.say;
02:37 p6eval rakudo a95c1d: OUTPUT«Failure()␤»
02:37 rokoteko sorear: I wouldnt really want to chit-chat about the fact that you got a Failure() object implemented.
02:39 sorear rakudo: sub hi { fail("Foo") }; say hi.WHAT
02:39 p6eval rakudo a95c1d: OUTPUT«Failure()␤»
02:40 sorear what isn't implemented is the "throwing multiple exceptions at once" bit
02:40 flussence (did sorear implement that?)
02:40 sorear which is, IMHO, wrong
02:40 sorear flussence: no
02:40 sorear the only thing I have ever contributed to Rakudo is use Foo:from<perl5>;
02:40 flussence niecza: sub hi { fail("Foo") }; say hi.WHAT # I meant like this :)
02:40 p6eval niecza 406e042: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'fail' used at line 1␤Check failed␤»
02:41 sorear 80% of the specs are wishful thinking
02:41 sorear nobody implements them, and they have more or less serious problems as written
02:41 sorear the specs don't just describe Perl 6.0; they also lay out goals for the future
02:43 sorear actually what we have here isn't quite the no true Scotsman fallacy
02:43 sorear but something slightly different
02:43 sorear the problem is that you keep adding conditions to "production ready"
02:43 sorear stop that.
02:43 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.
02:44 sorear also, the term "production" is silly in this context
02:44 sorear instead, I'd like you to give a precise definition of "rokoteko ready"
02:44 molaf_ joined #perl6
02:44 rokoteko sorear: ready for programming in a serious environment? sure.
02:45 rokoteko "define serious" .... yea. we can go on with this the whole night. ;)
02:48 molaf left #perl6
02:53 ch3ck3r joined #perl6
02:56 rokoteko ahhhhh.. http://dev.perl.org/perl6/ .. quote 'If you are looking for production ready code please use Perl 5'
02:57 ch3ck left #perl6
02:59 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
03:01 sorear I allowed myself to be taken in by the wrong question
03:01 sorear the answer to "production ready" is quite simple and well defined
03:04 rokoteko ahhh.. found the article. http://blogs.perl.org/users/ingy_dot_net/2010/07/rakudos-really-really-release-ready.html
03:04 rokoteko it actually said 'release ready' .. not referring to production.
03:06 rokoteko 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:07 rokoteko So Id prefer myself to be up-to-date.
03:10 rokoteko 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:12 felliott left #perl6
03:12 glow left #perl6
03:29 Chillance left #perl6
03:35 redicaps joined #perl6
03:42 lopaway is now known as lopnor
04:04 lue wello there o/
04:04 * colomon has just found the crucial hole in the ABC code that makes him look silly...
04:06 lue .oO(The Ministry of Silly Code)
04:50 justatheory left #perl6
04:52 orafu left #perl6
04:53 orafu joined #perl6
04:54 redicaps left #perl6
05:02 s1n1 left #perl6
05:06 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. http://pastebin.com/M1HT1s5P
05:07 shortcircuit 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 #perl6
05:41 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_basics_tablet
05:45 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 Tene rokoteko: So, you just figure out what it means for you, and do that.
05:46 Tene 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:48 Tene 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:50 sorear Tene: as written $!.pending has a very serious POLS violation on { buggy_code(); CATCH { say $! } }
05:51 Tene POLS?
05:51 sorear principle of least suprise
05:51 sorear if buggy_code throws two exceptions at once, CATCH will eat one of them and rethrow the other
05:51 Tene I'm not very happy with $!.pending, but I'm not sure if my complaints are the same as yours.
05:51 Tene Ahh, right, because they're *all* automatically rethrown at block exit.
05:52 sorear how many programmers will look at that code fragment and immediately release that exceptions might still come out of it?
05:53 Tene sorear: I vaguely recall that CATCH is supposed to mark all caught exceptions as handled, which might include .pending, but I'm unsure.
06:29 ch3ck3r left #perl6
06:46 uasi joined #perl6
06:47 uasi rakudo: my $a = 0 but True; if $a { say 'True' }
06:47 p6eval rakudo a95c1d:  ( no output )
06:48 uasi rakudo: my $a = 0 but True; if ?$a { say 'True' }
06:48 p6eval rakudo a95c1d: OUTPUT«True␤»
06:51 Tene uasi: Yes, rakudo has problems with the get_bool vtable :(
06:53 uasi Tene: ooh, sad
06:56 soroush joined #perl6
06:57 soroush_ left #perl6
07:01 uasi left #perl6
07:30 Intensity joined #perl6
07:34 Bonham joined #perl6
08:00 wamba joined #perl6
08:03 glow joined #perl6
08:22 jhuni left #perl6
08:28 _kaare joined #perl6
08:48 lopnor is now known as lopaway
08:53 risou joined #perl6
08:58 jedai joined #perl6
09:09 moritz_ arnsholt: @a[1..*-1] should work in rakudo
09:09 moritz_ rakudo: my  @a = 1..5; say @a[1..*-1]
09:09 p6eval rakudo a95c1d: OUTPUT«2345␤»
09:16 ascent_ left #perl6
09:17 BigBoy_ joined #perl6
09:24 envi joined #perl6
09:32 TiMBuS moritz_, on that topic, http://rt.perl.org/rt3/Ticket/Display.html?id=77424 can be closed
09:34 TiMBuS i would also like to fix the @a[1..*] issue if someone would tell me how it is meant to work ;/
09:42 * moritz_ would also like to know
09:45 moritz_ TiMBuS: ticket closed, thanks
09:50 TiMBuS np
09:50 rgrau joined #perl6
09:57 TiMBuS <TimToady> ranges that are "too big" autotruncate at the top
09:57 TiMBuS oh ok
09:57 TiMBuS i guess thats how..
09:58 TiMBuS rakudo: say (<1 2 3>[1..5]).perl
09:58 p6eval rakudo a95c1d: OUTPUT«("2", "3", Any, Any, Any)␤»
09:58 _twitch joined #perl6
09:59 TiMBuS so 'too big' == Inf?
10:01 moritz_ ' too big' == 'larger than this.end'
10:02 TiMBuS so the output above is wrong?
10:03 TiMBuS im having deja vu here.. i think the current output is wrong because its needed to allow slice assignment
10:10 mberends joined #perl6
10:12 dju left #perl6
10:16 arnsholt moritz_: Hooray. Thanks =)
10:16 mberends Disappointing news: due to snow in Frankfurt, my flights to Saint Petersburg for http://event.perlrussia.org/saintperl2/ were cancelled. We're going to try a Skype video as consolation at 13:00 GMT.
10:16 phenny mberends: 16 Dec 16:05Z <masak> tell mberends when you have time, I'd like to discuss http://irclog.perlgeek.de/phasers/2010-12-14#i_3087119 with you.
10:17 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 =)
10:18 mberends 800 flights cancelled yesterday, 450 of  them in Germany.
10:18 moritz_ mberends: I hope you're not stuck anywhere
10:18 moritz_ (if you're stuck in Frankfurt, you're just 2 hours of train ride from my home... visit me!)
10:19 mberends fortunately not, I managed to backtrack.
10:19 arnsholt mberends, the amazing Prolog traveller? ^^
10:19 mberends moritz_: that would have been a nice consolation :)
10:21 Trashlord left #perl6
10:25 Trashlord joined #perl6
10:32 tadzik oh, mberends
10:32 desertm4x joined #perl6
10:32 tadzik mberends: I did some additions to http-server-simple, wanna take a look?
10:32 mberends hi tadzik, yes please :)
10:33 tadzik mberends: https://github.com/tadzik/http-server-simple
10:33 tadzik it powers my grammar-based dispatcher :)
10:38 hudnix left #perl6
10:40 hudnix joined #perl6
10:41 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:47 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): http://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?
10:48 tadzik oh, it even shoudn't be used like this, now as I look at the commit
10:49 tadzik desertm4x: where it B declared?
10:49 tadzik ah, nvm
10:49 desertm4x Nowhere, it is a "place holder"?
10:49 tadzik yeah, my bad
10:50 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:51 * tadzik can see jnthn's hand in http://perlcabal.org/syn/S14.html#Parametric_Roles
10:52 moritz_ desertm4x: seems like a bug to me
10:53 tadzik mberends: do you have any roadmap for H::S::S in your head maybe?
10:54 mberends tadzik: initially the goal is to host Dancer, so that means PSGI support. Not reallly any other goals yet.
10:57 masak joined #perl6
10:57 masak oh weekend hai, #perl6!
11:00 moritz_ lolitsmasak!
11:00 masak lol!
11:01 masak 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␤»
11:01 masak rakudo: subset Foo::Bar of Int where { $_ %% 2 }; my Foo::Bar $i = 2
11:01 p6eval rakudo a95c1d: OUTPUT«Null PMC access in type()␤  in main program body at line 22:/tmp/TMqmq84u_F␤»
11:01 masak rakudo: subset Foo::Bar of Int where { $_ %% 2 }; my Foo::Bar $i
11:01 p6eval rakudo a95c1d: OUTPUT«Null PMC access in type()␤  in main program body at line 22:/tmp/ux_yOlKOWL␤»
11:01 masak rakudo: subset Foo::Bar of Int where { $_ %% 2 }
11:01 p6eval rakudo a95c1d:  ( no output )
11:01 masak rakudo: subset Foo::Bar of Int where { $_ %% 2 }; say "alive"
11:01 p6eval rakudo a95c1d: OUTPUT«alive␤»
11:01 * masak does a dip into RT for prior art
11:03 masak rakudo: subset A of Mu; my A $x
11:03 p6eval rakudo a95c1d:  ( no output )
11:03 jnthn o/ #perl6
11:03 * masak submits rakudobug
11:03 masak jnthn! \o/
11:03 jnthn ...heh, I see it's business as usual here. ;)
11:03 masak I'm just warming up! :)
11:04 masak ...though I must confess reporting bugs is losing its glamour now that Rakudo isn't as much of a moving target.
11:04 masak after a few months of shooting fish in a barrel, the fish start to thin out...
11:04 jnthn masak: I'll try to change that soon. :P
11:04 masak I'm counting on it :)
11:05 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 #perl6
11:06 jnthn .oO( Great, now the nightmares continue into the day too. :P )
11:06 masak mwhahaha
11:08 tadzik hello masak
11:08 masak tadzik: hi!
11:09 masak ok, I have an idea for slot #19 now. might as well volunteer for that slot.
11:09 * jnthn digs into his packing
11:09 jnthn Long journey coming up :)
11:09 masak it's mixin types. I don't think that's been done.
11:10 masak jnthn: when're you leaving?
11:10 jnthn masak: Sleeper train leaves from Copenhagen at 18:20
11:10 jnthn masak: But need to allow loads of time to get there because...Skanetrafiken. :|
11:10 masak oh, train? wow.
11:10 jnthn masak: Heh. I'm glad I'm not flying because a bunch of UK airports are closed at the moment. :)
11:11 masak jnthn: wrong type of snow? :P
11:11 jferrero joined #perl6
11:11 masak that was an oblique reference to http://en.wikipedia.org/wiki/The_wrong_type_of_snow
11:13 jnthn masak: Yes, I'm well aware of that excuse. :P
11:14 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.
11:15 masak rakudo: subset A of Int where { $_ %% 2 }; my A $a
11:15 p6eval rakudo a95c1d:  ( no output )
11:15 masak rakudo: subset A of Int where { $_ %% 2 }; my A $a; say "alive"
11:15 p6eval rakudo a95c1d: OUTPUT«alive␤»
11:15 masak rakudo: subset Foo::Bar where { $_ %% 2 }; my A $a; say "alive"
11:15 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 \""␤»
11:15 masak rakudo: subset Foo::Bar where { $_ %% 2 }; my Foo::Bar $a
11:15 p6eval rakudo a95c1d: OUTPUT«Null PMC access in type()␤  in main program body at line 22:/tmp/E8zbnCZ3SK␤»
11:15 jnthn :/
11:15 masak just narrowing down the error. :)
11:15 jnthn What on earth is it doing there...
11:16 masak it's the :: that causes it, it seems.
11:19 masak <tadzik> good evening zebras!
11:19 masak I for one hope this will become an instant classic :)
11:23 jnthn It may, but it's not black and white.
11:30 BigBoy_ left #perl6
11:34 masak jnthn: :P
11:34 lopaway is now known as lopnor
11:35 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:36 moritz_ ...unless zebras are color blind :-)
11:36 masak hm. maybe have the stripes run the other way, then. :)
11:41 shi joined #perl6
11:44 moritz_ a checker board zebra
11:45 masak that might natrually arise as offspring from an ordinary zebra and one with perpendicularly oriented stripes :P
11:47 jnthn Then they evolve the ability to play chess...
11:51 timbunce joined #perl6
12:02 masak <sorear> you can't use * currying with .. because 1..* is already taken to mean an open-ended range
12:02 masak sorry, what?
12:03 masak S09:241 explicitly begs to differ.
12:04 tadzik masak: you've got it :)
12:04 tadzik (zebras classic, I mean)
12:07 soroush left #perl6
12:07 BigBoy_ joined #perl6
12:10 colomon masak: err... @array[0 .. *] does not work because of * currying.
12:10 masak oh no, not this discussion again. :(
12:11 masak can't we just link to the last one :(
12:11 masak tl;dr summary: it does work, I'm right, the spec says I'm right.
12:12 colomon masak: @array[0..*] works, but it does NOT use currying.
12:12 colomon @array[0..*-1] does use currying.
12:12 * masak keeps silent and rolls eyes
12:13 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
12:13 p6eval rakudo a95c1d: OUTPUT«Range()␤»
12:13 jnthn Indeed.
12:14 colomon rakudo: (0..*-1).WHAT.say
12:14 p6eval rakudo a95c1d: OUTPUT«WhateverCode()␤»
12:14 whiteknight joined #perl6
12:16 BigBoy_ left #perl6
12:17 masak from the previous discussion:
12:17 masak <masak> if it doesn't work with our current model, we need a new m
12:17 masak that's all I have to say.
12:18 masak er, s/new m/new model/
12:18 masak copy/paste fail.
12:19 lopnor is now known as lopaway
12:20 sftp joined #perl6
12:21 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:22 lopaway is now known as lopnor
12:29 BigBoy_ joined #perl6
12:39 felliott joined #perl6
12:43 MayDaniel joined #perl6
12:59 thepler left #perl6
13:05 timbunce left #perl6
13:08 MayDaniel left #perl6
13:13 redicaps joined #perl6
13:30 roen joined #perl6
13:31 roen left #perl6
13:35 ch3ck3r joined #perl6
13:36 snearch joined #perl6
14:04 f00li5h left #perl6
14:07 lopnor is now known as lopaway
14:11 zby_home_ joined #perl6
14:27 * jnthn -> train to UK
14:27 [Coke] left #perl6
14:28 [Coke] joined #perl6
14:28 desertm4x left #perl6
14:34 lopaway is now known as lopnor
14:37 ambs joined #perl6
14:37 ambs left #perl6
14:53 felipe left #perl6
14:53 felipe joined #perl6
14:54 ascent_ joined #perl6
15:06 MayDaniel joined #perl6
15:15 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:17 colomon \o/
15:17 moritz_ all hail our internet overloards!
15:17 colomon moritz_: sneak peak at today's Advent post: http://perl6advent.wordpress.com/?p=658&amp;preview=true
15:17 colomon still needs a round of proofreading
15:18 moritz_ since all I'm doing right now is thinking about masak's p4, I might just as well proofread it
15:20 moritz_ regex basenote { <[a..g]+[A..G]> }
15:20 moritz_ can be simplified to   regex basenote { :i <[a..g]> }
15:20 moritz_ s/regex/token/ even
15:23 moritz_ colomon: you might spend half a sentence explaining what Lilypond is
15:23 moritz_ (and/or linking to a page explaining it)
15:23 moritz_ otherwise quite nice
15:23 colomon regex basenote { :i <[a..g]> } doesn't appear to actually work in Rakudo?
15:24 moritz_ rakudo: my regex basenote { :i <[a..g]> }; say 'abcABC' ~~ /<&basenote>+/
15:24 p6eval rakudo a95c1d: OUTPUT«abc␤»
15:24 moritz_ indeed
15:24 moritz_ nqp-rx--
15:25 colomon thanks
15:26 moritz_ but s/regex/token/ should work :-)
15:28 colomon what's the difference between regex and token?
15:28 cognominal left #perl6
15:28 moritz_ tokens don't backtrack
15:29 moritz_ and a character class can only ever match 1 char, so there's no need for backtracking
15:29 colomon hmmm.
15:30 colomon 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
15:33 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 masak while actively unwilling to discuss this further unless there's implementation ideas involved, I'm confused by this statement.
15:33 masak the discussion started with colomon explaining to me, again, that @a[ 0 .. *-1 ] doesn't work in Perl 6.
15:34 colomon no it didn't
15:34 colomon @a [0..*-1] works perfectly in both Perl 6 and Rakudo
15:34 colomon but it doesn't work the way you seem to think it does
15:34 masak I and S09.
15:34 colomon or perhaps more accurately, @a[0..*] doesn't work the way you seem to think it does.
15:35 masak I seem to think it returns all elements of @a.
15:35 moritz_ 0..*-1 is a HyperWhatever, 0..* a Range
15:35 moritz_ and it should
15:35 masak yes.
15:35 moritz_ it doesn't yet, due to limitations in rakudo (or maybe in the spec, not sure yet)
15:35 masak right.
15:36 masak 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.
15:36 masak and I'm *strongly* arguing for it to come down consistent in one particular way.
15:36 colomon The spec is perfectly consistent.
15:36 masak glad to hear it.
15:36 moritz_ colomon: afaict it's consistent, but not very explicit about *how* the detection of infinite lists should work
15:36 colomon we thrashed this all out last time, and changed the spec and Rakudo to conform to it.
15:37 colomon It doesn't detect infinite lists, so far as I know.
15:37 colomon It detects Ranges.
15:37 masak all that is fine by me.
15:38 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.
15:39 colomon perlcabal is down?
15:39 Patterner left #perl6
15:39 colomon moritz_: that's my understanding
15:40 colomon it may be a bit more complicated than that.
15:40 Psyche^ joined #perl6
15:40 Psyche^ is now known as Patterner
15:41 moritz_ colomon: it somehow has to react magically differently as lvalues and rvalues
15:41 moritz_ which I don't think is possible today
15:41 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.
15:42 masak as far as I know, there's no problem with @a[ 1..* ], which is what http://irclog.perlgeek.de/perl6/2010-12-18#i_3100548 was about.
15:43 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.
15:43 moritz_ as I just elaborate, it's quite impossible to implement correctly
15:44 snearch left #perl6
15:44 colomon masak: agreed.
15:44 moritz_ if just clip ranges to the bounds of the array, @a[0..5] = 1..6 won't work
15:44 colomon moritz_: I'm not clear on why that's impossible to implement correctly?
15:44 colomon ah.
15:44 masak hm.
15:44 masak I'm not immediately sure I see the problem.
15:44 colomon should it?
15:44 masak I see the lvalue/rvalue part.
15:44 masak but not why it's a problem.
15:45 moritz_ masak: because assigning to non-existing array items is supposed to autovivify them
15:45 moritz_ ie  my @a; @a[0] = 5;
15:45 masak right, and just reading them isn't.
15:45 moritz_ and likewise  @a[0..1] = 5;
15:45 masak that's interesting; never thought about that before.
15:46 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?
15:46 masak ah.
15:46 moritz_ the fact that context flows outwards in Perl 6
15:46 masak right.
15:46 colomon you have to know whether you're an lvalue or an rvalue.
15:46 colomon couldn't you do that with a proxy object?
15:46 moritz_ so @a[5] never knows if it's in lvalue or rvalue context
15:47 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?
15:47 colomon yes
15:48 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
15:48 masak :)
15:48 moritz_ no, because $slice is a scalar
15:49 masak moritz_: can you make a similar example that works?
15:49 moritz_ masak: that works? or that demonstrates the problem?
15:49 colomon what if you made it $slice := 15..20 at the end?
15:49 masak moritz_: the latter :)
15:49 colomon no, never mind.
15:49 moritz_ ok
15:49 moritz_ my @a = 0..9
15:50 moritz_ @a[8..20].elems # should print 2
15:50 moritz_ @a[8..20] = 1..*;  @a.elems # 21
15:50 colomon !!!!!
15:51 masak right.
15:51 masak there you go.
15:51 masak I shouldn't have complicated things by trying to bind to a slice. :)
15:51 moritz_ (if it's only supposed to work with infinite ranges, just swap * and 20 in the example)
15:51 masak quite bluntly, slices behave very differently upon reading and writing.
15:52 moritz_ right.
15:52 masak and that seems fair game to me.
15:53 moritz_ afaict rakudo doesn't have a dedicated type for slices yet
15:53 colomon another potential troublemaker: what's @a[0, 2..*] do?
15:54 moritz_ the same as  (@a[0], @a[2..*])
15:56 colomon that's what I hoped, but that makes things even harder to implement.
15:57 moritz_ why?
15:57 masak could a Parcel be used as the type for slices?
15:57 moritz_ it just returns something like Parcel(@a[0], Slice(@a, 2..*))
15:58 colomon you can't just look for @a[Range] to trigger the special behavior
15:59 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 moritz_ it can do the range detection too
15:59 colomon rakudo: my @a = 1..100; say @a[-> $size { 1, 4 ...^ * > $size }].perl
15:59 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)␤»
15:59 colomon dang it!
16:00 mtk left #perl6
16:01 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)␤»
16:01 colomon there we go.
16:03 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)␤»
16:03 moritz_ a bit simpler this time :-)
16:03 colomon and wrong.  ;)
16:03 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)␤»
16:04 moritz_ better? :-)
16:05 MayDaniel left #perl6
16:06 felliott left #perl6
16:08 * colomon is now contemplating horrible ideas like lazy array assignment...
16:14 mtk joined #perl6
16:34 jferrero left #perl6
16:35 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. http://www.t3.org/tangledwebs/07/tw0706.html
16:36 masak after reading that, I totally want my own Black Team.
16:36 * masak laughs maniacally
16:38 BigBoy_ left #perl6
16:41 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 #perl6
16:42 entel hello, do perl5 modules work with perl6?
16:42 colomon entel: not yet.
16:42 entel oh darn
16:43 masak entel: there's something called blitzkost that's worth checking out.
16:43 moritz_ some do, if you install blizkost
16:43 masak see http://modules.perl6.org/
16:43 entel ok so i want to write a irc bot in perl6, any modules for that yet?
16:43 masak wait, blizkost isn't on http://modules.perl6.org/ ? o.O
16:44 moritz_ entel: check out http://modules.perl6.org/, I can't remember all perl 6 modules anymore :-)
16:44 masak oh well, see https://github.com/jnthn/blizkost
16:45 entel hmm doesnt look like it
16:45 wolverian can I build rakudo* on windows from the tarballs?
16:46 wolverian the installer release is pretty old
16:46 entel hmm how do sockets work in perl6 then i wonder
16:48 masak in Rakudo, they work, at least.
16:48 masak they could still be improved in various ways.
16:48 flussence IO::Socket, same as perl6
16:48 flussence *5
16:48 entel oh okay
16:48 entel great
16:50 BigBoy_ joined #perl6
16:53 MayDaniel joined #perl6
17:11 masak left #perl6
17:19 MayDaniel left #perl6
17:20 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 wolverian rakudo*, rather
17:21 wolverian the 2010.11 release
17:31 lopnor is now known as lopaway
17:33 wolverian hrm. maybe I just forgot to run gmake install first.
17:36 ch3ck joined #perl6
17:36 moritz_ --gen-parrot should run install for parrot
17:37 ch3ck3r left #perl6
17:37 Chillance joined #perl6
17:38 dual joined #perl6
17:38 wolverian moritz_: it did.
17:38 wolverian not sure if it succeeded.
17:39 wolverian running gmake install in the parrot directory doesn't help.
17:40 Guest31794 left #perl6
17:54 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:58 justatheory joined #perl6
18:02 muixirt joined #perl6
18:05 moritz_ wolverian: you're not in a directory with whitespace in ths path, by chance?
18:05 BigBoy_ left #perl6
18:09 muixirt with latest parrot/rakudo something like perl6 -e 'while 1 {my $a="testtest"}' # slowly comsumes memory
18:10 wolverian moritz_: I am.
18:10 wolverian no, I'm not
18:11 wolverian I *am* in a path with a suffix, which might be confusing to some.
18:12 wolverian 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 wolverian that builds and links perl6.exe succesfully, but running it fails to find parrot.
18:17 * 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
18:17 TimToady *privileging
18:17 TimToady and s/q//
18:20 PerlJam left #perl6
18:20 hatseflats left #perl6
18:20 hatseflats joined #perl6
18:20 PerlJam joined #perl6
18:20 wolverian maybe I should try with a separately installed parrot
18:21 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 kulp joined #perl6
18:22 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:23 takadonet1 joined #perl6
18:23 takadonet1 hey
18:23 kulp left #perl6
18:24 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:25 TimToady 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:27 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 wolverian which fails the build.
18:27 wolverian there is C:\Parrot-2.10.0\icu, which it should be looking in, I think.
18:35 colomon someone please make sure my Advent post (already in wordpress) goes live in the next hour or two?  kthx.  afk.
18:40 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 :)
18:40 TimToady the advent link didn't work for me
18:41 TimToady flussence: that's a point
18:41 moritz_ TimToady: as long as it's a preview, it only works for authors
18:42 TimToady there are actually two degrees of freedom here, the order that @! is stored, and the order that it is read
18:42 TimToady 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
18:43 TimToady if a single linked list, then prepending new exceptions is most efficient, but the @! abstraction could make it look either order anyway
18:44 TimToady and the CATCH abstraction can iterate the @! abstraction in either order
18:46 TimToady but looping oldest to newest in that case would require a list reversal at some level or other
18:46 TimToady which might be okay; exception processing is supposed to be exceptional
18:47 TimToady 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 felliott joined #perl6
18:49 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:50 TimToady 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:51 TimToady processing old to new would, however, require CATCH to examine the other end of @! to find the most proximate cause
18:52 TimToady 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:54 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:55 felliott left #perl6
18:57 TimToady well, there are two cultures of backtraces too...
18:57 TimToady also, @! entries are not necessarily causally related in the way that backtraces are assumed to be
18:58 flussence maybe @! should be %!, then people wouldn't complain that they expected either order :P
19:09 TimToady only if we can easily sort in order of occurrence
19:10 TimToady in the limit, @! is a relation of exceptional events that could be extracted on in any of various ways
19:10 TimToady so maybe we just want $! to be a database handle ;)
19:11 PacoLinux left #perl6
19:12 takadonet1 http://www.reddit.com/r/programming/comments/enzsk/perl_6_advent_calendar_day_18_abc_module/ Being downvoted :(
19:12 PacoLinux joined #perl6
19:12 takadonet1 it's a great post!
19:12 adu joined #perl6
19:13 adu left #perl6
19:14 fith joined #perl6
19:24 glow left #perl6
19:29 adu joined #perl6
19:29 Exodist left #perl6
19:29 exodist_ joined #perl6
19:34 ardeshir joined #perl6
19:35 exodist_ is now known as Exodist
19:35 ardeshir ardeshir
19:36 ardeshir perl6: say "hi p6"
19:36 p6eval pugs, rakudo a95c1d: OUTPUT«hi p6␤»
19:37 takadonet1 ardeshir: hey
19:37 moritz_ rakudo: my $t = <morning noon evening>[DatTime.now.hour div 8]; say "good $d"
19:37 p6eval rakudo a95c1d: OUTPUT«===SORRY!===␤Symbol '$d' not predeclared in <anonymous> (/tmp/wFe5hS0CMq:22)␤»
19:37 moritz_ rakudo: my $t = <morning noon evening>[DatTime.now.hour div 8]; say "good $t"
19:37 p6eval rakudo a95c1d: OUTPUT«Could not find sub &DatTime␤  in main program body at line 22:/tmp/3WVY7JNF4g␤»
19:37 moritz_ rakudo: my $t = <morning noon evening>[DateTime.now.hour div 8]; say "good $t"
19:37 p6eval rakudo a95c1d: OUTPUT«good evening␤»
19:38 moritz_ such demonstrations are far more impressive if they work on first attempt :-)
19:38 snearch joined #perl6
19:40 ardeshir rakudo: my $t=<mornin aftrnoon night>[DateTime.now.hour div 8]; say "Good $t"
19:40 p6eval rakudo a95c1d: OUTPUT«Good night␤»
19:40 ardeshir nice...
19:41 MayDaniel joined #perl6
19:47 tadzik hello zebras
19:48 plobsing left #perl6
19:53 fith rakudo: my $t=<a b c d e>; print $t.pick(1)
19:53 p6eval rakudo a95c1d: OUTPUT«d»
19:54 fith Huh, cool...  after 15+ perl4/5 I might yet be able to adapt :-)
19:55 moritz_ it's certainly fun trying :-)
19:58 masak joined #perl6
19:59 tadzik oh, masak, you missed "hello zebras" :)
20:00 masak heh :)
20:06 masak <moritz_> such demonstrations are far more impressive if they work on first attempt :-)
20:06 masak that's why I usually test-drive one-liners locally...
20:07 MayDaniel left #perl6
20:07 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)␤»
20:07 masak rakudo: my $c = 'p'; $n = $c.ord; say $n;
20:07 p6eval rakudo a95c1d: OUTPUT«===SORRY!===␤Symbol '$n' not predeclared in <anonymous> (/tmp/4hX9T6gFxv:22)␤»
20:07 masak rakudo: my $c = 'p'; my $n = $c.ord; say $n;
20:08 p6eval rakudo a95c1d: OUTPUT«112␤»
20:08 masak ardeshir: strict mode on by default in Perl 6.
20:08 moritz_ rakudo: say ~'Hello'.ords
20:08 p6eval rakudo a95c1d: OUTPUT«72 101 108 108 111␤»
20:08 ardeshir rakudo: my $c='p'; my $n = $c.ord; say $c, $n;
20:08 p6eval rakudo a95c1d: OUTPUT«p112␤»
20:08 ardeshir nice ...
20:09 ardeshir .ord >  erlang strings...
20:10 ardeshir rakudo: say ~ 'erlang'.ords;
20:10 p6eval rakudo a95c1d: OUTPUT«101 114 108 97 110 103␤»
20:10 ardeshir perl6 makes me wet :-)
20:11 takadonet1 lol
20:11 masak ardeshir: that's probably because of the memory leaks...
20:12 tadzik I hope that's because you spilled your drink
20:12 ardeshir lets hope snot for long
20:12 ardeshir not drinking $yet
20:13 muixirt left #perl6
20:14 plobsing joined #perl6
20:16 takadonet1 fith: : what types of perl 4/5 application have you written?
20:18 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" :)
20:19 * 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 #perl6
20:25 timbunce left #perl6
20:34 takadonet1 rakudo: class A {}; my $class= 'A';  my $x = $class.new();
20:34 p6eval rakudo a95c1d:  ( no output )
20:34 takadonet1 interesting...
20:34 masak no, not really.
20:35 masak Str has a .new method, just like other classes.
20:35 moritz_ old bug
20:35 takadonet1 rakudo: class A::B {}; my $class = 'A::B'; my $x = $class.new(); say $x.WHAT;
20:35 p6eval rakudo a95c1d: OUTPUT«Null PMC access in get_repr()␤  in main program body at line 22:/tmp/dDziDAwrHT␤»
20:35 takadonet1 workarounds?
20:35 * masak submits rakudobug
20:35 masak takadonet1: don't do it from the beginning :)
20:36 jferrero joined #perl6
20:36 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
20:36 masak for now, maybe &eval
20:36 colomon wait, my $class = 'A::B'; my $x = $class.new() is the bug?
20:37 plobsing left #perl6
20:37 moritz_ yes
20:37 moritz_ and that it works without :: too
20:37 colomon right
20:37 colomon rakudo: class A::B {}; my $class = 'A::B'; my $x = $class.eval.new(); say $x.WHAT;
20:37 p6eval rakudo a95c1d: OUTPUT«A::B()␤»
20:38 colomon that's the "workaround".  (ie a correct way to do it, that actually works in Rakudo.)
20:38 takadonet1 thanks
20:38 fith rakudo: my $t='Word n0t 123'; $t ~~ m/(\d+)/; print $/
20:38 p6eval rakudo a95c1d: OUTPUT«0»
20:38 masak no, I submitted the Null PMC access. the Str.new is already in RT, I think.
20:39 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 $/"␤»
20:39 moritz_ that doesn't work yet, due to some conceptual problems
20:39 moritz_ but you can use $str.match(:g, /regex/)
20:40 colomon masak++
20:40 fith Ah, cool, no worries, mostly working through on-line examples
20:52 adu left #perl6
21:03 masak I'm currently trying http://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 masak This sounds very enticing; how do I go about filing a bug report? :P
21:03 snearch left #perl6
21:04 masak rakudo: my $b = True but False; say $b; say ?$b
21:04 p6eval rakudo a95c1d: OUTPUT«Bool::True␤Bool::False␤»
21:04 masak I intend to write tomorrow's advent post about that small program. :)
21:05 moritz_ /o\
21:05 masak aye -- take cover! :)
21:05 adu joined #perl6
21:06 masak inverting the arms like that makes it seem in my font like someone under a bed covering head under arms...
21:08 lue hello o/
21:08 masak hi lue
21:09 * moritz_ hates web development
21:09 lue .oO(salutations ō\ )
21:09 masak is o\ the Windows version of o/ ?
21:09 moritz_ it's like expressive dancing instead of using plain english
21:09 moritz_ masak: \\o\ is :-)
21:09 masak moritz_: then maybe we should outsource web development to honey bees...
21:10 moritz_ masak: but we have to communicate with them first :/
21:10 jhuni joined #perl6
21:10 masak ...and we don't dance well enough :(
21:10 lue moritz_: are you required to support old versions of IE?
21:10 flussence masak: I just tried the try.rakudo code locally and it works, I think that server just needs a poke :(
21:10 masak oh! now I see: o\ is an 'o' followed by an escaped space.
21:10 fith ask the #Dancer guys :)
21:11 masak flussence: I'll try again, then.
21:11 masak fith++
21:11 flussence it was doing the same error yesterday...
21:11 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)
21:12 lue what was CSS made for then?
21:12 masak flussence: no, still doesn't work here.
21:12 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
21:12 moritz_ lue: layout
21:13 moritz_ lue: but it's awefully hard to make something like a three-column layout with headers and footers
21:13 moritz_ (yes, it's a solved problem, and can be found on the intertubes. But doing something similar yourself is hard)
21:14 lue I tried seeing how to do that actually. It's (amazingly&surprisingly) hard.
21:14 moritz_ right
21:14 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
21:14 lue [ as much so as Unicode in (La)TeX ]
21:14 moritz_ because CSS wasn't meant for GUI-like layouts
21:14 moritz_ lue: unicode in latex works pretty well with xetex, or whatever it's called
21:14 flussence (that bit of code seems familiar though, I remember it having problems relating to \n)
21:15 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:16 moritz_ why not write such a tool yourself?
21:16 moritz_ doesn't sound too hard, actually
21:16 obsd123 joined #perl6
21:16 lue no, actually. I'd probably end up venturing beyond .... *gulp* .... Perl 6. :)
21:17 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
21:18 moritz_ you sure could
21:18 moritz_ you can read binary data
21:18 moritz_ what else do you need?
21:18 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?
21:18 lue A way to display the font glyphs I would think.
21:19 moritz_ lue: ASCII art :-)
21:19 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 #perl6
21:19 moritz_ obsd123: the idea is to write a compiler that can emit either CLR or JVM code, for example
21:20 moritz_ currently no compiler does that though, afaict
21:20 masak rakudo: my $value = 42 but role { method Bool { False } }; say $a; say ?$a
21:20 p6eval rakudo a95c1d: OUTPUT«===SORRY!===␤Symbol '$a' not predeclared in <anonymous> (/tmp/WOdizafK5p:22)␤»
21:20 masak rakudo: my $value = 42 but role { method Bool { False } }; say $value; say ?$value
21:20 p6eval rakudo a95c1d: OUTPUT«42␤Bool::False␤»
21:21 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 obsd123 or am I completely off base and misunderstanding?
21:22 moritz_ obsd123: it sure sounds like it
21:22 moritz_ obsd123: and at least for perl 6 that's one of the goals
21:22 moritz_ we're currently working on adding a .NET/CLR backend to rakudo (a perl 6 compiler written on top of parrot)
21:23 obsd123 sounds too awesome to be true
21:23 obsd123 would completely change the way one goes about learning a new language
21:23 moritz_ well, C as a backend would be a real pain to implement
21:23 moritz_ but JVM and .NET and parrot seem realistic as backends
21:26 flussence oh, I just remembered something
21:26 flussence moritz_: can you check if the rakudo that try.rakudo.org's using has readline enabled?
21:26 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
21:27 flussence I think it might be breaking because that's missing...
21:27 moritz_ obsd123: that's a common misconception
21:27 moritz_ obsd123: the underlying perl code still has a vast flexibility that comes at a certain cost when mapped to the machine level
21:28 moritz_ independently of whether you go through C, or JIT compile it
21:28 Guest1723 left #perl6
21:28 moritz_ flussence: I'll try
21:28 flussence thanks :)
21:28 flussence (it should have the path to the perl6 interpreter in ./backend/.config)
21:30 moritz_ flussence: nope, no readline
21:31 timbunce joined #perl6
21:32 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 #perl6
21:32 ascent_ left #perl6
21:35 ardeshir left #perl6
21:35 LoRe left #perl6
21:41 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:43 Helios joined #perl6
21:44 envi left #perl6
21:47 masak ok, tomorrow's Advent post is now up backstage on perl6advent.wordpress.com, and scheduled for 00:00 UTC tomorrow.
21:47 masak reviews welcome.
21:47 entel left #perl6
21:49 wamba left #perl6
21:52 risou joined #perl6
21:53 flussence nice post, though I prefer to write p5 zero-equals-success lines as "if ( system($whatever) == 0 )" :)
21:57 masak ok, I'll change it to that to reflect real-world usage :)
21:59 lue Great post
21:59 lue (and I'm sure that last example happens somewhere in the real world)
21:59 colomon nice post.
21:59 colomon Looked good to me, proofreading-wise.
22:00 masak thanks. it was inspired by a tweet that highlighted the last example as scary/wonderful.
22:02 masak it's a sobering thought that the Advent calendar has thousands of readers, if one includes the long tail.
22:05 adu left #perl6
22:06 masak I think pmichaud++'s finish last year on the 24th was very good. will we have something equally good this year?
22:09 moritz_ maybe TimToady++ on social hacks?
22:11 masak yes please.
22:11 flussence oh jeez.
22:11 masak provided his thumb is healed by then.
22:11 flussence lack of readline isn't the problem with try.rakudo.
22:11 flussence Now I'm at a loss.
22:11 flussence :/
22:12 MayDaniel joined #perl6
22:13 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:14 moritz_ flussence: I can give you access to feather3 where this stuff is hosted
22:15 moritz_ flussence: would that help?
22:15 flussence go ahead, I'll see what I can do with it
22:15 masak flussence++
22:16 flussence (I bet it'll turn out to be something obvious and silly...)
22:17 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:20 flussence huh, this looks like a really old git checkout...
22:20 moritz_ feel free to pull
22:20 flussence oh, the commits since shouldn't have touched the server side stuff anyway. I'll leave that till I get it working.
22:21 cotto what's the right way to install a perl module on feather?
22:23 moritz_ if tehre's a debian package for it, sudo aptitude install libfoo-bar-perl
22:23 moritz_ cotto: what do you need?
22:23 cotto whatever aloha needs
22:24 moritz_ if there's no debian package, use cpanm
22:24 cotto ok
22:25 cotto 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.
22:25 flussence any idea what "Cannot open your terminal '/dev/pts/11' - please check." means?
22:26 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
22:29 * masak heads home to sleep
22:29 moritz_ if nothing else helps, kill the screen, and restart the programs inside
22:29 masak 'night, zebras.
22:29 moritz_ (maybe investigate first which run)
22:29 moritz_ 'night striped masak
22:29 * masak is striped the other way :)
22:30 masak left #perl6
22:30 cotto who do I talk to to get added to sudoers?
22:30 risou left #perl6
22:31 flussence got into screen finally, looks like the frontend isn't talking to the backend for whatever reason
22:31 flussence time to restart it, I think.
22:32 moritz_ cotto: on which machine? feather1 or 3?
22:32 flussence fixed it!
22:32 cotto feather
22:32 moritz_ cotto: you should have sudo now
22:33 cotto moritz_, thanks
22:38 flussence (strangest error message I've ever seen: "$TERM is too long". wtf?)
22:39 LoRe joined #perl6
22:43 ascent_ joined #perl6
22:45 timbunce left #perl6
22:47 lue new blog post-it! https://rdstar.wordpress.com/2010/12/18/snowman-comets-pod-parsing-and-a-book/
22:47 masonkramer joined #perl6
22:53 flussence I thought that was going to be a blog post about U+2603 and the one after it :)
22:54 cotto moritz_, Bot::BasicBot::Pluggable is installed but aloha's bot.pl can't find it.
23:01 MayDaniel left #perl6
23:02 lue what I did and wanted to do is based on 2603 and 2604 though :
23:02 lue s/:/:)/
23:19 lopaway is now known as lopnor
23:21 sbp .u 2603
23:21 phenny U+2603 SNOWMAN (☃)
23:21 sbp .u 2604
23:21 phenny U+2604 COMET (☄)
23:26 fith there's a Unicode for a snowman? heh
23:29 _kaare left #perl6
23:34 whiteknight left #perl6
23:36 whiteknight joined #perl6
23:37 takadonet1 anyone have an idea what this means: Placeholder variable cannot override existing signature
23:43 rgrau left #perl6
23:51 s1n joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo