Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-06-26

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:00 cxreg you know what i meant
00:00 cxreg but yeha
00:03 tadzik well
00:03 tadzik I see nothing wrong with publishing just grammars and nothing else
00:27 drbean joined #perl6
00:39 Crooky joined #perl6
00:53 Crooky fufrd go fu hrr`?
00:53 Crooky roh
00:53 Crooky eh, can't see the keyboard, nbmvmdif .. see yoiu tomorrow
01:00 am0c joined #perl6
01:04 scott_ joined #perl6
01:06 xinming_ joined #perl6
01:16 cognominal Génération of a json file is very slow. Recursive routine like to-json tends to concatenate at each level of recursion. would it not be possible to do lazy concatenation? Meaning doing the concatenations when the string are really needed. I suppose this is very different from full fledge ropes.
01:22 sorear push onto an array, then call .join at the end
01:23 cognominal sure enough, but I think that's eventually the compiler job.
01:25 cognominal anyway I will try it. The cost being loosing a chance to garbage collect the small chunks.
01:27 PZt joined #perl6
01:31 Pzt3 joined #perl6
01:34 mikemol joined #perl6
01:35 tyatpi joined #perl6
01:40 cog_ joined #perl6
01:45 cog_ joined #perl6
01:56 [Coke] This is like string vs. stringbuilder. We could make an explicit stringBuilder, but @strings is so easy.
02:21 orafu joined #perl6
02:25 arnsholt joined #perl6
02:25 flussence sorear: that would work... but the last time I had to do that in any language was because of IE6. :)
02:26 flussence (wait, don't we already have a Cat object?)
02:27 sorear [Coke]: TimToady says Str should eventually be a rope with O(log n) concat, fwiw
03:04 Crooky joined #perl6
03:13 shinobicl joined #perl6
03:13 shinobicl hi
03:14 shinobicl i'm having problems compiling rakudo ....
03:16 shinobicl a lot of warnings on NativeCall.c
03:59 drbean joined #perl6
03:59 shinobicl has been any changes on the process of compiling rakudo? any new dependence?
04:01 _jaldhar joined #perl6
04:04 kaleem joined #perl6
04:04 abercrombie joined #perl6
04:32 shinobicl left #perl6
04:38 BaggioKwok joined #perl6
04:55 birdwindupbird joined #perl6
05:06 * TimToady and quietfanatic have now made it to the Pacific Northwet...
05:07 sorear o/ TimToady
05:07 fhelmberger joined #perl6
05:12 prioli joined #perl6
05:19 sorear bah.
05:19 sorear 2012/06/22 went by and I forgot to mark it
05:20 shachaf What happened on 2012-06-22?
05:20 sorear more to the point what happened on 2010-06-22
05:20 diakopter niecza bd?
05:21 sorear 2nd anniversary of the first commit
05:21 sorear it's still a little hard to beleive it has been this long
05:30 dalek niecza: 414b1d6 | sorear++ | docs/announce.v19:
05:30 dalek niecza: Draft v19 announcement
05:30 dalek niecza: review: https://github.com/sorear/niecza/commit/414b1d6db1
05:33 moritz sorear++ # two years niecza
05:33 phenny moritz: 25 Jun 23:44Z <diakopter> ask moritz I'd love to see a histogram of weekly #perl6 activity (the number of messages in a given time slice (1hr? 15min?), averaged over the past N weeks, for the whole week).  Does your irclog db support such a thing?
05:34 moritz phenny: tell diakopter I pondered a simple activity stat by day, that would be easier on the DB
05:34 phenny moritz: I'll pass that on when diakopter is around.
05:38 moritz sorear: it would be even harder to believe you brought niecza to its current shape in less than two years :-)
05:51 kaleem joined #perl6
06:02 brrt joined #perl6
06:04 sudokode joined #perl6
06:09 pmichaud good morning, #perl6
06:11 sorear haha
06:11 sorear good morning pmichaud :p
06:12 * sorear wonders if pmichaud might not be in Texas today
06:12 pmichaud I'm in Texas, definitely.
06:12 pmichaud my sleep schedule is off, though.
06:17 tadzik ho, you're like in Polish timezone :)
06:17 tadzik good morning
06:17 pmichaud sorear++ niecza++ # happy birthday niecza
06:18 sisar where is the .new class constructor specced properly? I can't find it in S12.
06:19 pmichaud sisar:  I don't know what "specced properly" means here; but the best is http://perlcabal.org/syn/S12.html​#Construction_and_Initialization
06:20 pmichaud "All classes inherit a default new constructor from Mu. It expects all arguments to be named parameters initializing attributes of the same name."
06:21 sisar pmichaud: ah. Now that should be C<new> there.
06:22 pmichaud it is C<new> in the pod; I copied/pasted from the webpage
06:22 sisar oh, yes it is, duh !
06:23 sisar the fixed width and the non fixed width fonts on the webpage don't look very different.
06:25 kaleem joined #perl6
06:25 sisar especially inline C<> tags are not easily discernible from normal text.
06:32 dalek doc: 56fcbe0 | pmichaud++ | lib/Mu.pod:
06:32 dalek doc: Add Mu.new.
06:32 dalek doc: review: https://github.com/perl6/doc/commit/56fcbe09bb
06:36 dalek doc: 6eb95cd | pmichaud++ | lib/Rat.pod:
06:36 dalek doc: Rat wordsmithing.
06:36 dalek doc: review: https://github.com/perl6/doc/commit/6eb95cd491
06:37 wtw joined #perl6
06:37 sisar r: class Point { has $.x; has $.y;}; my $A = Point.new(:x(1));
06:37 p6eval rakudo 185f8f:  ( no output )
06:40 sisar in ^, I did not initialize y to any value. I missed my chance to do it while construction of a new object. Now it is not possible to give a value to y without declaring it as "is rw" in the first place?
06:40 pmichaud sisar: as written, that's correct.
06:41 sisar how can I make sure that I when instantiating an object, I initialize all the attribute?
06:42 Telgalizer joined #perl6
06:42 pmichaud looking
06:42 sisar that, is can the compiler complain "hey, you missed your chance to give a value to y"
06:43 pmichaud I'm not sure there can be a compile-time check, but perhaps:
06:44 pmichaud r: class Point { has $.x; has $.y; submethod BUILD($x, $y) {} };  my $p = Point.new(:x(1));
06:44 p6eval rakudo 185f8f: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤  in submethod BUILD at /tmp/5mh6ODMYxp:1␤  in method BUILDALL at src/gen/CORE.setting:622␤  in method bless at src/gen/CORE.setting:607␤  in method new at src/gen/CORE.setting:592␤  in block <anon> at /…
06:44 moritz r: class Point { has $.x; has $.y; method new(:$x!, :$y!) { nextsame } }; my $p = Point.new(:x(1))
06:44 p6eval rakudo 185f8f: OUTPUT«Required named parameter 'y' not passed␤  in method new at /tmp/xPkVgVdrDg:1␤  in block <anon> at /tmp/xPkVgVdrDg:1␤␤»
06:45 moritz sorear: like this
06:45 sisar why was it expecting 3 parameters? x, y and ... ?
06:45 moritz self
06:45 sorear moritz: s/sorear/sisar/ ?
06:45 scott___ joined #perl6
06:46 moritz yes, sorry
06:46 sisar moritz: what is 'self' ?
06:46 moritz sisar: the invocant
06:46 moritz the thing you call the method on
06:47 sisar moritz: i'm confused. This error "Not enough positional parameters passed; got 1 but expected 3", what would be the correct way to instantiate the object in pmichaud's example.
06:47 sisar ?
06:48 dalek niecza: bd1bd16 | sorear++ | FETCH_URL:
06:48 dalek niecza: Update bootstrap
06:48 dalek niecza: review: https://github.com/sorear/niecza/commit/bd1bd16792
06:48 pmichaud r: class Point { has $.x; has $.y; submethod BUILD($x, $y) {} };  my $p = Point.new(:x(1), :y(2));
06:48 p6eval rakudo 185f8f: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤  in submethod BUILD at /tmp/T4vqcHXyyd:1␤  in method BUILDALL at src/gen/CORE.setting:622␤  in method bless at src/gen/CORE.setting:607␤  in method new at src/gen/CORE.setting:592␤  in block <anon> at /…
06:48 pmichaud hmmmmm
06:48 sisar yes, that.
06:48 pmichaud I wonder if there's a rakudobug there.
06:49 pmichaud oh!
06:49 pmichaud r: class Point { has $.x; has $.y; submethod BUILD($!x, $!y) {} };  my $p = Point.new(:x(1), :y(2));
06:49 p6eval rakudo 185f8f: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤  in submethod BUILD at /tmp/hZunQD2Gpo:1␤  in method BUILDALL at src/gen/CORE.setting:622␤  in method bless at src/gen/CORE.setting:607␤  in method new at src/gen/CORE.setting:592␤  in block <anon> at /…
06:50 moritz pmichaud: :$!x and :!$y in the signature
06:50 moritz need to be named
06:50 pmichaud not according to S12
06:50 pmichaud 06:48 <dalek> niecza: bd1bd16 | sorear++ | FETCH_URL:
06:50 pmichaud oops
06:50 pmichaud submethod BUILD ($!tail, $!legs) {}
06:52 moritz then S12 needs updating
06:52 moritz if they were positional, the BUILDALL routine would have to introsprect the names to determine the call order
06:53 moritz s/call/argument/
06:53 moritz that's just absurd
06:54 pmichaud something has to do that introspection anyway
06:54 moritz no
06:54 moritz it can just pass all to BUILD
06:54 moritz and extra named arguments are ignored
06:55 pmichaud it can do that even with positionals
06:55 am0c joined #perl6
06:55 moritz but it doesn't need to introspect that way
06:55 moritz and object construction happens often, so we should make it fast
06:55 moritz also it doesn't make sense to introspect
06:55 pmichaud r:  sub xy($x, $y) { say "x=$x y=$y"; };   xy(:y(2), :x(1));
06:55 p6eval rakudo 185f8f: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤  in sub xy at /tmp/_ipplh99wi:1␤  in block <anon> at /tmp/_ipplh99wi:1␤␤»
06:55 moritz because the names of positional arguments are not part of the API of the routine
06:56 pmichaud oh, did we get rid of that?
06:56 moritz we got rid of filling positionals by name
06:56 pmichaud okay.
06:56 pmichaud then yes, S12 probably needs updating.
06:56 moritz I'm doing that
06:56 * sisar 's learning efforts found a rakudobug yesterday and a wrong piece of code in spec today. Yay(?)
06:56 moritz sisar: yay indeed
06:57 dalek specs: 7b1a298 | moritz++ | S12-objects.pod:
06:57 dalek specs: [S12] BUILD takes named arguments only
06:57 dalek specs:
06:57 dalek specs: It was a left-over from the times when
06:57 dalek specs: positional parameters could be filled by name.
06:57 dalek specs: review: https://github.com/perl6/specs/commit/7b1a298d97
06:57 moritz sorear++ # niecza v19
06:57 sisar but that has slowed me down
06:57 pmichaud S06 still has the sections that allow filling positionals by name.
06:58 sisar anyway, lunch &
06:58 sorear but only for explicit only subs, I think
06:58 * sisar afk
06:59 pmichaud I don't see anything that limits it to only subs
07:01 pmichaud okay, I see it now.
07:01 pmichaud "Another benefit of this policy is that, for routines that allow it, named arguments may be bound to positional parameters. (This is allowed only on routines that are explicitly declared with either the proto or the only declarator.)"
07:01 pmichaud r:  only sub xy($x, $y) { say "x=$x y=$y"; };   xy(:y(2), :x(1));
07:01 p6eval rakudo 185f8f: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤  in sub xy at /tmp/C_waHma64j:1␤  in block <anon> at /tmp/C_waHma64j:1␤␤»
07:02 pmichaud r:  only xy($x, $y) { say "x=$x y=$y"; };   xy(:y(2), :x(1));
07:02 p6eval rakudo 185f8f: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤  in sub xy at /tmp/wpgjJro57H:1␤  in block <anon> at /tmp/wpgjJro57H:1␤␤»
07:04 pmichaud r: class Point { has $.x; has $.y; submethod BUILD(:$!x, :$!y) {} };  my $p = Point.new(:x(1), :y(2));
07:04 p6eval rakudo 185f8f:  ( no output )
07:04 pmichaud r: class Point { has $.x; has $.y; submethod BUILD(:$!x, :$!y) {} };  my $p = Point.new(:x(1), :y(2)); say $p.perl;
07:04 p6eval rakudo 185f8f: OUTPUT«Point.new(x => 1, y => 2)␤»
07:04 pmichaud r: class Point { has $.x; has $.y; submethod BUILD(:$!x!, :$!y!) {} };  my $p = Point.new(:x(1), :y(2)); say $p.perl;
07:04 p6eval rakudo 185f8f: OUTPUT«Point.new(x => 1, y => 2)␤»
07:04 pmichaud r: class Point { has $.x; has $.y; submethod BUILD(:$!x!, :$!y!) {} };  my $p = Point.new(:x(1)); say $p.perl;
07:04 p6eval rakudo 185f8f: OUTPUT«Required named parameter 'y' not passed␤  in submethod BUILD at /tmp/QPTGi4q5H7:1␤  in method BUILDALL at src/gen/CORE.setting:622␤  in method bless at src/gen/CORE.setting:607␤  in method new at src/gen/CORE.setting:592␤  in block <anon> at /tmp/QPTGi4q5H7:1␤␤»…
07:05 pmichaud okay, works for me now!
07:05 moritz well, if you do that in new directly, you have a nicer backtrace :-)
07:05 pmichaud yes, but then it's possible to still create Points with y uninitialized by deriving a custom new
07:05 moritz right
07:06 pmichaud by putting it in BUILD, y _must_ be provided.
07:06 pmichaud (in all cases)
07:07 pmichaud I do like the new version as well; I was just looking for something a little more enforced than what new could do
07:09 moritz pmichaud++ #p6doc patches
07:09 dalek doc: 15f988c | moritz++ | lib/Mu.pod:
07:09 dalek doc: [Mu] .new only initializes attributes with accessors
07:09 dalek doc: review: https://github.com/perl6/doc/commit/15f988c3f4
07:11 pmichaud moritz++ # better patches
07:11 brrt joined #perl6
07:12 moritz pmichaud: well, some of yours were also better than mine. It's the sum (erm, how do you call the sum of two patches? merge?) that counts
07:13 pmichaud sum is good
07:17 immortal joined #perl6
07:18 odoacre joined #perl6
07:18 jaldhar_ joined #perl6
07:26 kresike joined #perl6
07:26 kresike hello all you happy perl6 people
07:27 brrt morning kresike
07:28 pmichaud hello kresike
07:28 szabgab http://pastebin.com/JrNkCWSV
07:28 szabgab compile error on ubuntu
07:29 pmichaud szabgab: 32 bit, ooc?
07:29 szabgab 64 bit
07:29 szabgab in a virtualbox
07:29 pmichaud hmmmm
07:29 pmichaud ubuntu 12.04 ?
07:30 kresike hello brrt, pmichaud
07:30 szabgab 11.04
07:30 brrt szabgab, whats HEAD?
07:30 szabgab with a perl 5.14.2 brew
07:30 szabgab just checked out
07:30 szabgab brrt: just checked out
07:31 brrt i have a debian amd64 here, so i'm going to see if i get the same thing
07:31 arnsholt_ joined #perl6
07:31 brrt whats your version of gcc?
07:31 lumi__ joined #perl6
07:31 brrt (mine is 4.4 for the record)
07:32 libertyp1ime joined #perl6
07:32 TimToady_ joined #perl6
07:32 orafu joined #perl6
07:32 szabgab brrt: 1 min # rebooting
07:32 Helios joined #perl6
07:32 pmichaud szabgab: several people have reported things like the "invoke not implemented for class ..."  error but I don't know that we've been successful in reproducing it.  This looks really helpful.
07:32 szabgab for the record, I was running aptitude safe-upgrade during the same time
07:32 szabgab so that migth have interfered
07:32 szabgab I try it again
07:32 pmichaud I might try installing 11.04 somewhere and see if I can get the failure.
07:33 szabgab pmichaud: wait till I retry
07:33 szabgab but for me don't do it, I can install 12.4 instead
07:33 brrt .. i have to rebuild nqp first, but it won't take too long
07:33 szabgab and probably I should anyway
07:35 szabgab just let me know if it imporant for you to research this - then I keep the 11.04 otherwise I just install the newer
07:35 szabgab ubuntu
07:38 pupoque joined #perl6
07:39 brrt i have a similar enough version
07:39 dalek doc: 3abb273 | pmichaud++ | lib/Real.pod:
07:39 dalek doc: Real.pod wordsmithing on floor and ceiling.
07:39 dalek doc: review: https://github.com/perl6/doc/commit/3abb273f6f
07:39 dalek doc: 15b5ca0 | pmichaud++ | lib/ (3 files):
07:39 dalek doc: Miscellaneous typo and punctuation improvements.
07:39 dalek doc: review: https://github.com/perl6/doc/commit/15b5ca089f
07:40 pmichaud szabgab: okay, I'll wait til you retry, at least for now.
07:40 pmichaud actually, I should get a bit more sleep here; so I'll bbl
07:41 sisar n: class foo { has $.x;}; my $obj = foo.new; $obj.x = 42; say $obj.x;
07:41 p6eval niecza v19-1-gbd1bd16: OUTPUT«42␤»
07:41 sisar whoa, niczabug !
07:42 moritz sisar: niecza doesn't do the whole rw/ro distinction yet
07:42 sisar (niecza allows writing via read-only accesor)
07:42 sisar moritz: oh.
07:42 sisar ok
07:42 sisar r: class foo { has $.x;}; my $obj = foo.new; $obj.x = 42; say $obj.x;
07:42 p6eval rakudo 185f8f: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <anon> at /tmp/8g7OhGqtkQ:1␤␤»
07:43 sisar moritz: would you call ^ missing line no. or wrong line no.?
07:43 sisar missing, i think
07:43 moritz :1
07:43 moritz that's the line number
07:44 sisar moritz: that's the line no. of the (start) of block, not where the error occured
07:44 sorear sleep&
07:45 moritz sisar: it's all line 1, no?
07:45 moritz I mean, where's the newline that would make it line 2?
07:46 fgomez joined #perl6
07:47 sisar moritz: oh right, here it is a single line. But if you split it out into sevaral lines, put it in a file, and still we get the same error: https://gist.github.com/2994193
07:47 diakopter r: class foo {␤ has $.x;};␤ my $obj = foo.new;␤ $obj.x = 42; ␤say $obj.x;
07:47 phenny diakopter: 05:34Z <moritz> tell diakopter I pondered a simple activity stat by day, that would be easier on the DB
07:47 p6eval rakudo 185f8f: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <anon> at /tmp/YHN4Q_D4Xm:1␤␤»
07:48 moritz yep, looks wrong
07:48 * sisar files the bugreport
07:51 sisar done, RT #113848
07:51 mtk joined #perl6
07:54 SatoAmbush joined #perl6
07:59 moritz sisar++
08:04 Khisanth joined #perl6
08:05 pupoque joined #perl6
08:07 szabgab after updating and restarting ubuntu (still 11.04 though) and after removing the parrot subdir, I could successfully run the Configure part
08:07 szabgab and the make part
08:09 felher joined #perl6
08:09 takesako_ joined #perl6
08:12 dalek rakudo/nom: 11b9d5e | pmichaud++ | src/core/Mu.pm:
08:12 dalek rakudo/nom: Add zero and 1 argument forms of infix:<=:=> and infix:<eqv>.
08:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/11b9d5e121
08:15 fgomez joined #perl6
08:23 jnthn morning
08:25 jnthn RT #113848 may be fixable my marking the auto-generated attribute accessor closure in Attribute.pm with the hidden-from-backtrace trait.
08:25 jnthn *by
08:29 moritz jnthn: it's probably not that easy
08:30 moritz jnthn: there's just a single line of backtrace; when we mark one routine as hidden_from_backtrace, and it makes any difference, then we'll have no more backtrace lines at all
08:30 moritz ok, it's better to report nothing than a wrong location, but it'll still be LTA
08:30 ocharles joined #perl6
08:31 vmspb joined #perl6
08:31 jnthn moritz: oh, and of course the error does not occur in the mainline...
08:31 jnthn moritz: er, i mean
08:31 jnthn does not occur in the accessor
08:32 jnthn It occurs in the mainline.
08:32 moritz right
08:32 jnthn Hmm
08:34 moritz still there's something odd there
08:34 moritz often the mainline confuses the line number generation
08:34 moritz but
08:34 moritz if I wrap the whole thing into a routine and all it, it *still* says line 1
08:36 moritz s/all/call/
08:37 moritz http://perlpunks.de/paste/show/4fe974b5.1907.15c # that's wil --ll-exception
08:37 moritz and the error occurs on line 8
08:38 moritz oh
08:38 moritz it seems that all assignment errors produce wrong/missing line numbers
08:38 moritz could it be that assignment op simply misses the :node thing?
08:40 dakkar joined #perl6
08:41 moritz ah yes
08:41 * moritz tries to fix
08:41 * moritz hates passing $/ inwards. It's easy to forget.
08:44 moritz yet I don't know if there are better alternatives
08:48 tadzik .u ờ
08:48 phenny U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE (ờ)
08:50 jnthn Sounds deadly.
08:52 moritz ok, I have a patch that works. Spectesting now.
09:00 felher joined #perl6
09:00 takesako_ joined #perl6
09:03 dalek rakudo/nom: 1ffd6cf | moritz++ | src/Perl6/Actions.pm:
09:03 dalek rakudo/nom: add line annotations to assignment operator
09:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1ffd6cf137
09:03 jnthn moritz++
09:07 moritz .oO( I have a truely beautiful test for that, but it doesn't fit on this margin. Sorry! )
09:08 dalek roast: 824e965 | moritz++ | integration/error-reporting.t:
09:08 dalek roast: test line number of error for assignment to non-variable, RT #113848
09:08 dalek roast: review: https://github.com/perl6/roast/commit/824e965561
09:09 frettled :)
09:09 jnthn $!.backtrace.any.line == 3
09:09 jnthn <3
09:09 jnthn That's cute :)
09:09 moritz aye :-)
09:10 moritz things like that make my exception work seem worthwhile
09:19 ab5tract joined #perl6
09:30 szabgab has dir() changed recently?
09:31 tadzik I think so
09:31 moritz szabgab: yes
09:31 szabgab on one machine it returns a bunch of Str -s on the other on IO-s
09:31 moritz szabgab: it uses to return strings, now it returns IO's
09:31 szabgab and the second one is newer machine
09:31 szabgab ok
09:31 [hds] joined #perl6
09:32 szabgab so much about backword compatibility :)
09:32 moritz yes :/
09:32 * szabgab is rebuilding rakudo on the desktop as well
09:32 * moritz was not too pleased about the change
09:32 * szabgab will have to add some tests to his own code
09:33 moritz szabgab: another change is that dir() now appends the path
09:34 moritz ie dir('/foo') now returns /foo/a.txt, /foo/b.txt instead of a.txt, b.txt
09:34 szabgab oh, yeah, that explains more of my code break !
09:34 szabgab and I wrote this 2 days ago
09:34 frettled moritz: what?
09:35 frettled hm
09:35 pmichaud we commit to backward compatibility for things going forward from here; not necessarily backward compatibility with what we had a year ago :)
09:36 * frettled struggles to find this in a synopsis, it does not appear to be in S16
09:36 szabgab well, dir() was returning Str-s about 3 days ago
09:36 pmichaud okay, I didn't notice that change.
09:36 frettled Ah, wait, S32
09:37 frettled in the setting library, d'oh
09:37 frettled «Returns a lazy list of file names in the $directory. By default the current and the parent directory are excluded, which can be controlled with the $test named parameter. Only items that smart-match against this test are returned.
09:37 szabgab I noticed this becasue my code behaved differently on the desktop where I built rakudo a few days ago and on my notebook that I build 2 hours ago
09:38 frettled This will make directory content parsing a bit of a nuisance.
09:38 moritz szabgab: sorry about that
09:38 pmichaud what behavior did the release have, out of curiosity?
09:38 moritz pmichaud: the new one :(
09:39 pmichaud so, the behavior changed from 2012.05 to 2012.06 ?
09:39 moritz pmichaud: yes
09:39 szabgab I thin Str-s and showrt names are better but I am not a big on API
09:39 moritz frettled: I think we should have a .file method that returns just the file name
09:39 pmichaud okay, I'm not quite as concerned then.  2012.06 is really the baseline I'm wanting to establish.
09:39 moritz and maybe .Str to that
09:39 frettled moritz: I think that's complicating things :
09:39 frettled :)
09:40 frettled In my work, I write routines for handling filenames etc. quite a bit.
09:40 moritz frettled: if the default stringifcation is just the file name, you can use it same as before, when the return values where strings
09:40 frettled In some cases, I want to open() all or a filtered list of the files in a directory.  In that case, the current behaviour (lazy list of IOs?) seems reasonable.
09:40 moritz pmichaud: what kind of backward compatiblity do you want to establish?
09:41 pmichaud moritz: we need to be providing our users a more stable environment across releases
09:41 frettled But in most other instances, I want to filter the filenames, or fiddle with them, and then Perl 5's behaviour is much more sane.
09:41 pmichaud i.e., some sort of deprecation policy for API changes
09:42 frettled I cannot honestly think of any real world uses where it's useful to get the full or even relative path of all files in a directory listing.
09:44 * frettled is not disagreeing with the notion of stability across releases, or with a deprecation policy, those are very good things to have.  (Just in case I appeared to be critical of that)
09:47 pmichaud ...am I reading the git log incorrectly?  It looks to me as though &dir changed after the 2012.06 release.
09:47 moritz +1 to a reasonable stability policy
09:49 moritz pmichaud: oh, you're right
09:49 pmichaud hmmmm
09:49 moritz which means we have to bundle the old ufo and panda versions in star
09:49 pmichaud well, we need to figure out how we're going to handle it
09:50 moritz oh, and it means that the changelog entry is in the wrong section
09:51 frettled There is one thing I don't get, which is probably due to not programming Perl 6 enough, and that is why dir() returns a list of IOs, and what it means :)  The second is the most embarrassing part; does this have anything to do with the filesystem's implementation of files as e.g. inode refs?
09:51 pmichaud frettled: second part: no
09:52 moritz frettled: we kinda abuse IO for storing filenames and paths
09:52 pmichaud frettled: in this case, IO objects are more like path references
09:52 pmichaud so, before, where &dir was simply returning a list of strings, it now returns IO objects from which one could get either the string or open the file directly
09:53 frettled Okay, so they are stale in the same way as the result of a Perl 5 readdir() are?
09:53 moritz frettled: so wrapping a path in an IO object kinda makes sense; it carries at least the same information as the file name, and makes it identifiable as being related to the file system
09:53 moritz frettled: yes
09:53 bhtwloger joined #perl6
09:53 frettled pmichaud: aha, I was suspecting that about being able to open the file directly.
09:53 frettled Does that not add a bit of overhead?
09:54 moritz well, you can do that too
09:54 moritz r: say dir()[0].open.get
09:54 p6eval rakudo 1ffd6c: OUTPUT«Cannot call 'open'; none of these signatures match:␤:(IO , $path, :r(:$r), :w(:$w), :a(:$a), :bin(:$bin), :chomp(:$chomp) = { ... }, Mu *%_)␤␤  in method open at src/gen/CORE.setting:7027␤  in block <anon> at /tmp/FJ2Ti4yQsE:1␤␤»
09:54 moritz r: say dir()[0].get
09:54 p6eval rakudo 1ffd6c: OUTPUT«Unable to open filehandle from path './star'␤  in method open at src/gen/CORE.setting:7034␤  in method get at src/gen/CORE.setting:7054␤  in block <anon> at /tmp/IeArQFO1k_:1␤␤»
09:54 moritz r: say dir().first(*.e).get
09:54 p6eval rakudo 1ffd6c: OUTPUT«Unable to open filehandle from path './star'␤  in method open at src/gen/CORE.setting:7034␤  in method get at src/gen/CORE.setting:7054␤  in block <anon> at /tmp/kc56XpWF3I:1␤␤»
09:54 moritz r: say dir().first(*.f).get
09:54 p6eval rakudo 1ffd6c: OUTPUT«# ~/.bashrc: executed by bash(1) for non-login shells.␤»
09:55 frettled Okay, that's cute.
09:55 frettled But will we …
09:55 moritz in fact you don't have to open it, .get opens it for you
09:55 pmichaud and one could do .slurp or .lines on it as well
09:55 moritz (something which I don't really like, though I have trouble pointing my finger to what it is I don't like)
09:55 frettled My personal concern is that I do a fair bit of scripting where filesystem traversal performance actually matters.
09:56 moritz r: say dir().grep(*.f).map({ "$_.path(): {+.lines}" })
09:56 p6eval rakudo 1ffd6c: OUTPUT«Malformed UTF-8 string␤␤  in method get at src/gen/CORE.setting:7057␤  in code <anon> at src/gen/CORE.setting:7078␤  in sub coro at src/gen/CORE.setting:5216␤  in method reify at src/gen/CORE.setting:5197␤  in method reify at src/gen/CORE.setting:4978␤  in method g…
09:56 moritz r: say dir().grep(*.f).map({ "$_.path(): {+.lines}" })[0]
09:56 p6eval rakudo 1ffd6c: OUTPUT«./.bashrc: 100␤»
09:56 frettled Naively, it looks to me as if this way of doing it will be significantly slower than merely getting a list of directory entries as strings.
09:56 pmichaud r: say dir().grep(*.f).elems
09:56 p6eval rakudo 1ffd6c: OUTPUT«22␤»
09:57 bhtwloger joined #perl6
09:57 pmichaud r: say dir().grep(*.f).map({ "$_.path(): {+.lines}" })[^5]
09:57 p6eval rakudo 1ffd6c: OUTPUT«./.bashrc: 100 ./test3.pl: 87 ./.profile: 22 ./Makefile: 131 ./.gitignore: 10␤»
09:57 moritz wow, where does the top-level .gitignore come from, I wonder? :-)
09:58 pmichaud frettled: so, perhaps we need a low-level &dir equivalent that returns strings.
09:58 pmichaud Or, perhapd &dir is the low-level string thingy, and we need a higher-level function for what &dir has been changed to do now.
09:58 jnthn Um. If constructing objects is significantly slower than a FILE SYSTEM OPERATION we have a big problem.
09:59 frettled pmichaud: at least I think I would need it :)
10:00 frettled jnthn: it depends on how well it scales
10:00 moritz well, we could have a Directory class that remembers its path, and has convenience methods such as .entries, .files, .subdircotries etc.
10:00 moritz modulo typos
10:00 jnthn I'd imagine &dir is gonna be primarily I/O bound (though hopefully it hits a disk cache in the common case); whether we construct Str or IO should be a drop in the ocean comparatively.
10:00 pmichaud jnthn: well, it's not that long in the past that parrot/rakudo were the bottlenecks to IO processing and not the I/O itself.
10:01 frettled As a concrete example, I have a program (in rather awful Perl 5 code) that traverses a subdirectory, identifies candidates for scanning, and if filenames match, I check contents.
10:01 pmichaud remember the "read and concat 50000 strings test" ?  ;-)
10:01 jnthn pmichaud: Yes, but I don't think assuming crappy implementation is the right way to do langauge design. ;-)
10:01 frettled Among the directories parsed, I can easily run into tens or hundreds of thousands of files in a single directory.
10:02 pmichaud frettled: object creation isn't likely to be the slowdown here.
10:02 frettled With some filesystems, yes, requesting the directory entries will be slow, but as jnthn says: don't assume crappy implementation.
10:02 jnthn I'm not objecting to having a version of dir (or dir itself) returning strings. Just find Str vs IO construction time being the argument a bit weird.
10:02 frettled Also: disks are not disks anymore. :)
10:02 moritz well, if we make dir() low-level, the file names should be returned as Buf's
10:03 jnthn frettled: Tell that to my laptop :)
10:03 moritz anyway, I'm warming up to the idea of reverting dir() to something more low-level, and build a better abstraction on top of it
10:03 jnthn Happily though, my desktop is endowed with SSD goodness :)
10:03 frettled jnthn's laptop: go get an upgrade ;)
10:03 pmichaud jnthn: historically it's been the case that moving from string I/O to object I/O imposes a noticeable slowdown, in Perl 6 as well as many other languages (more)
10:03 jnthn frettled: Yeah :)
10:03 szabgab dir("/home").map({ substr( $_, chars("/home/")) })   works for me :)
10:04 pmichaud I agree that it's less of an argument now in Rakudo than it once would've been, but the generic "I'm concerned about object overhead" is legitimate for many environments.
10:04 daxim joined #perl6
10:04 szabgab sorry
10:04 szabgab dir("/home").map({ substr( .Str, chars("/home/")) })   works for me :)
10:04 szabgab the previous was broken this 2nd works
10:05 frettled Oops, I'm getting a omnomnom interrupt here…
10:05 pmichaud seems like the first should've worked too.
10:05 moritz .map({ .split('/').[*-1] })
10:05 moritz frettled: bon appetit!
10:05 moritz in fact  .map(*.split('/')[*-1]) should work too
10:06 moritz r: say dir(/home/).map(*.split('/')[*-1])
10:06 p6eval rakudo 1ffd6c: OUTPUT«Failed to get the directory contents of '_block1011': readdir failed: No such file or directory␤  in block <anon> at src/gen/CORE.setting:7319␤  in sub dir at src/gen/CORE.setting:7314␤  in block <anon> at /tmp/Pny4QSPPRN:1␤␤»
10:06 moritz r: say dir('/home/').map(*.split('/')[*-1])
10:06 p6eval rakudo 1ffd6c: OUTPUT«No such method 'split' for invocant of type 'IO'␤  in block <anon> at /tmp/I26jaOP6YM:1␤␤»
10:06 szabgab :)
10:06 moritz r: say dir('/home/').map(*.path.split('/')[*-1])
10:06 p6eval rakudo 1ffd6c: OUTPUT«moritz drain sorear tene ash snarkyboojum p6eval diakopter azawawi coke infinoid andara cygx tryrakudo szabgab japhb flussence tewk runpugs␤»
10:06 pmichaud IO isn't Cool?
10:06 moritz nope
10:06 pmichaud that's an issue for using it like a Str, then.
10:06 Timbus $ time perl6 -e 'dir'
10:06 Timbus real0m3.914s
10:06 Timbus $ time perl -E 'opendir my $d, "."; my @a = readdir($d)'
10:06 Timbus real0m0.008s
10:07 moritz Timbus: that is hardly informative
10:07 jnthn Timbus: That tells us nothing useful
10:07 moritz perl 5 is finished before rakudo has started up. News at 11 :(
10:07 tadzik :)
10:07 Timbus cold start for rakudo is .3
10:08 dylanwu joined #perl6
10:08 Timbus the directory has 6300 files
10:08 moritz oh, it's not lazy :(
10:08 Timbus neither is perl5 tho ssso its kinda fair
10:09 moritz Timbus: but you'll also find that perl 5 loops over a 6300 element list faster than rakudo
10:09 pmichaud fairer would be  -MMoose
10:09 Timbus well im sure theres many reasons, but its obvious disk IO is not the bottleneck
10:09 dylanwu who can help me? plz, "Can't read configuration in database.conf: No such file or directory
10:09 dylanwu at /var/www/ilbot/tools/../lib/IrcLog.pm line 22"
10:09 Timbus -Mmoose is .14 seconds for me
10:09 moritz dylanwu: I can help you, in private message
10:10 Timbus i.. i have a record of all these things for some reason
10:10 GlitchMr joined #perl6
10:11 pmichaud anyway, speaking personally I'm not worried about the speed aspects as much as I am the api change.  :-((
10:12 moritz same here
10:18 pmichaud more broadly, I'm thinking that IO is one of those things that is still a bit too slushy in Perl 6; we may need some staged development.
10:18 moritz aye
10:18 moritz hey, we could experiment with that in another setting
10:18 pmichaud or even just a module
10:20 moritz right; our imports are lexical
10:20 pmichaud not everything has to go into the CORE.setting, especially for new/experimental stuff.
10:20 pmichaud or "slushy" stuff.
10:21 pmichaud well, I still need a bit of sleep; perhaps masak++ can comment on some of the above when he arrives :)
10:22 pmichaud phenny: tell masak  your thoughts on http://irclog.perlgeek.de/​perl6/2012-06-26#i_5758924 would be welcome.
10:22 phenny pmichaud: I'll pass that on when masak is around.
10:22 pmichaud afk, sleep
11:01 JimmyZ joined #perl6
11:12 spider-mario joined #perl6
11:35 brrt irc.per.org seems to be on the dead side of living
11:35 brrt perl.org
11:42 moritz brrt: huh? works for me
11:45 brrt can't connect at all
11:46 moritz I haven't tried to connect in quite some time, I'm just always on :-)
11:46 moritz brrt: that network has two IPs, 217.168.150.167 and 209.221.142.115. If one doesn't work, pick the other
11:47 brrt thanks, i'll try
11:48 kresike what ? No IPv6
11:51 fglock joined #perl6
11:57 am0c joined #perl6
12:06 tokuhirom joined #perl6
12:22 _ilbot joined #perl6
12:22 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
12:23 moritz kresike: no ipv6 it seems
12:24 kresike IPv4 is sooo yesterday ... :)
12:25 moritz ... and today too :-)
12:25 kresike unfortunately it's still pretty hard to get native IPv6 support
12:25 moritz though I do like all kinds of v6, perl and IP :-)
12:26 kresike now that you mention it, yes, I do like those too :)
12:30 skids joined #perl6
12:52 sisar moritz++ #fixing stuff :)
12:56 frettled moritz: Visual Basic, too?
12:59 kresike frettled, that's too basic to be fixed :)
13:00 frettled heh
13:02 PacoAir joined #perl6
13:07 mikemol joined #perl6
13:10 Psyche^ joined #perl6
13:17 domidumont joined #perl6
13:18 dod1 joined #perl6
13:18 sergot joined #perl6
13:18 sergot hi o/
13:19 domidumont joined #perl6
13:20 atrodo joined #perl6
13:21 kresike sergot, o/
13:21 sergot kresike: o/
13:23 plobsing joined #perl6
13:56 JimmyZ joined #perl6
13:58 bluescreen10 joined #perl6
13:59 [Coke] arguments on p5p about whether "my ();" should be allowed.
13:59 [Coke] r: my $a;
13:59 p6eval rakudo 1ffd6c:  ( no output )
13:59 [Coke] r: my ();
13:59 p6eval rakudo 1ffd6c:  ( no output )
13:59 [Coke] std: my ();
13:59 p6eval std 30385f8: OUTPUT«ok 00:00 41m␤»
13:59 jnthn It's just an empty signature.
13:59 jnthn (From the Perl 6 percpective.)
14:00 [Coke] is there ever a reason to /want/ my (); except when generating perl6 code lazily?
14:00 [Coke] lazy not in the perl 6 sense? ;)
14:03 kaleem joined #perl6
14:07 jnthn [Coke]: No
14:07 jnthn [Coke]: It just falls naturally out of what we parse there anyway.
14:08 [Coke] so, on the principal of making things painful for the implementor, we should probably disallow that.
14:08 jnthn Why?
14:09 pmichaud on principal.
14:09 pmichaud (principle?)
14:09 jnthn Tormenting the implementor is meant to produce a benefit for the user. :)
14:09 [Coke] I would like to know when I do something useless.
14:09 pmichaud well, the us.... what Coke++ said.  :)
14:09 jnthn This seems to be an unbenefit for the portion of our users who are writing crappy code generators. :)
14:09 [Coke] but, I'm happy to leave that to p6lint.
14:10 jnthn Anyway, it's easy to forbid if we want to, I suspect.
14:10 [Coke] Doesn't have to be in the compiler itself.
14:10 pmichaud "do something useless"  -- some would say that should go in the startup banner, then.   "Oh, you're using Perl 6, so you're likely doing something useless."
14:10 pmichaud :-)
14:10 [Coke] std: our ();
14:10 p6eval std 30385f8: OUTPUT«ok 00:00 41m␤»
14:11 * jnthn gets to do useless things with Perl 6 tomorrow at $client :)
14:11 pmichaud indeed, perhaps we should create a compiler called "useless".  :-)   Then we could justify our useless error messages.
14:12 * pmichaud now discovers he's parsing "useless"  as "use less".
14:12 dalek tablets: 165149e | (Gabor Szabo)++ | docs/report.pl:
14:12 dalek tablets: minor error checking
14:12 dalek tablets: review: https://github.com/perl6/tablets/commit/165149ee02
14:12 pmichaud I should probably get a bit more sleep.
14:12 jnthn Seems you could usemore :P
14:12 [Coke] pmichaud: hope everything's ok.
14:13 [Coke] I also need more sleep. Workstress is not good for healthy living.
14:13 pmichaud [Coke]: yes, things are fine here; I've just gotten myself into a weird sleep schedule.
14:14 [Coke] okgood.
14:14 pmichaud (might be fallout from attending yapc::na, where I was too busy to sleep :)
14:16 dalek tablets: 866f021 | (Gabor Szabo)++ | docs/index.txt:
14:16 dalek tablets: update links
14:16 dalek tablets: review: https://github.com/perl6/tablets/commit/866f02156a
14:18 szabgab how are the tablets updaed on the web site? I made some minor fix
14:19 pmichaud szabgab: I think it's done by a cron job.
14:19 kaare_ joined #perl6
14:19 [Coke] Gabor!
14:20 szabgab [Coke]: !!
14:20 [Coke] are you related to: http://en.wikipedia.org/wiki/G%C3%A1bor_Szab%C3%B3 ?
14:20 szabgab the dead jacc guitarist?
14:20 szabgab jazz
14:20 [Coke] aye.
14:21 [Coke] I'm guessing no. ;)
14:21 szabgab there are about 5000 people with this name, I think
14:21 szabgab "Gabor Szabo"
14:21 [Coke] ah, wow.
14:21 pmichaud the tablets README has some instructions on generating/publishing HTML; I wonder if it's up-to-date.
14:21 szabgab I am 529, if you care :)
14:21 [Coke] hee.
14:21 szabgab pmichaud: the generation part yes, I just don't know who can ssh
14:22 szabgab [Coke]: thats 23 ** 2
14:22 szabgab r: 23**2
14:22 p6eval rakudo 1ffd6c:  ( no output )
14:22 szabgab r: say 23**2
14:22 p6eval rakudo 1ffd6c: OUTPUT«529␤»
14:22 szabgab yes
14:23 szabgab and I aslso wanted to ask, what is the current opinion on documentation for Perl 6?
14:24 PerlJam szabgab: we need more of it!  :)
14:24 szabgab Where should it be?
14:24 [Coke] depends.
14:25 * szabgab is listening
14:25 [Coke] there's tablets (which, btw, has a TPF grant), docs, the book in the star repo, the spec, the source...
14:25 [Coke] If you're writing something for users, I'd think about contributing to the first 3.
14:26 szabgab The question where should the parameters of dir() be described?
14:26 pmichaud most of my documentation contributions at the moment are towards the p6doc effort
14:26 szabgab (as an example)
14:27 [Coke] ooh, an interesting question on p6u
14:27 Woodi yo everybody
14:28 szabgab where is p6doc?
14:28 [Coke] I would like to see an answer as to what's the expected difference between tablets and p6doc.
14:28 pmichaud [Coke]: I see p6doc as a command-line tool.
14:28 pmichaud tablets is almost exclusively web-based, I think.
14:29 pmichaud p6doc is the perl 6 version of "perldoc"
14:29 pmichaud szabgab: http://github.com/perl6/doc
14:29 [Coke] Woodi: http://www.youtube.com/watch?v=SVObGJ​vY7qk&amp;feature=results_main&amp;pl​aynext=1&amp;list=PL89179F2115D6D22A
14:30 [Coke] so, p6doc is like man pages, tablets can have more details and samples, and the book is for larning.
14:31 Woodi about dir, *: I heared (but more then year ago) there is no core in Perl6... so things in Rakudo and Parrot make some mess in my ideal imagination of perl6 implementation :)
14:31 lemmoner joined #perl6
14:31 Woodi -[Coke]-: I hope I'm not there on that video... youtube so video, right ? :)
14:32 PerlJam szabgab: Do you think you'll make some more Perl 6 screencasts?
14:32 szabgab PerlJam: its in the plans
14:32 Woodi heh :)
14:32 szabgab unless I get hired again :)
14:32 pmichaud maybe I'll try a screencast today.  I keep punching 'reload' on the yapcna YouTube account hoping my talks will appear there soon.
14:34 pmichaud [Coke]: yeah, that's a reasonable summary.  mainly I want someone to be able to do  "p6doc new"  or (eventually) "p6doc '%%'" and get a short blurb describing what 'new' or '%%' does.
14:34 pmichaud and, as important,  "p6doc length"  will tell you that 'length' doesn't exist and what to use instead :)
14:36 sisar pmichaud: screencast ?! yay ! topic ?
14:36 kresike iiuc p6doc is going to become something similar to perl5's perldoc
14:36 PerlJam kresike: but *way* better
14:37 pmichaud then when we get a good pod->html translator, we can have  http://doc.perl6.org/length   tell us about it.
14:37 kresike PerlJam, yes, that's self explanatory :)
14:37 pmichaud sisar: screencast;  I've been thinking about doing a set of short screencasts on rosettacode examples.
14:38 sisar ++pmichaud++ :)
14:38 pmichaud "here's a Perl6 rosettacode example; here's the problem, here's how the Perl 6 solution solves it"
14:38 jnthn We already have a Perl 6 web server. We could have a p6doc --web that hosts the documentation for you locally then you can explore it in a browser. :)
14:39 pmichaud more to the point, we already have feather; we could set up doc.perl6.org/query/foo to go ahead and return the result of 'foo' as pod text (i.e., until we get the html translation in place)
14:39 jnthn Don't we already haz a Pod::To::HTML?
14:40 pmichaud we don't _have_ to wait for html translation before making it available online.  Indeed, if it shows up as pod text, I think it might inspire folks to work on the translation
14:40 [Coke] Woodi: it's basically "hey woody"
14:40 jnthn I know, I more meant, I think we already have a module to do it :)
14:40 pmichaud jnthn: I see Pod::To::Text
14:41 pmichaud aha:  https://github.com/perl6/Pod-To-HTML/
14:41 jnthn pmichaud: We ship Pod::To::Text in Rakudo. Pod::To::HTML is on modules.perl.org
14:41 flussence as the main person responsible for Pod::To::HTML, I must admit it's a bit crap at the moment
14:42 pmichaud or, perhaps the url should be perl6.org/p6doc/foo
14:42 TimToady_ good morning all
14:42 colomon o/
14:42 pmichaud TimToady_!!!  o/
14:42 pmichaud good morning
14:42 jnthn morning, TimToady o/
14:42 TimToady joined #perl6
14:42 rjbs guten morgen
14:43 * TimToady tried to backlog last night, but he crumped instead
14:43 flussence (I had this ambitious idea a few months ago to separate out the part that iterates over the pod tree into a separate module, which would've made Pod::To::HTML much nicer to maintain, but never got around to getting it working...)
14:43 bhtwloger joined #perl6
14:45 moritz fwiw I want p6doc URLs to be doc.perl6.org/IO::Socket::INET#connect
14:46 pmichaud moritz: I'm fine with that as a result, but we probably also want a query form that redirects to the result
14:46 moritz aye
14:46 pmichaud I know that I've often liked   php.net/strlen   to quickly get me to the strlen documentation or an index of relevant pages
14:47 PerlJam yeah, that's one thing PHP got spot on was  their web docs
14:47 PerlJam (I used them *all* the time when I was coding PHP)
14:48 pmichaud so I'd like to be able to do, say,   perl6.org/p6doc/pick   and it gives me the documentation for 'pick'
14:48 tadzik sounds like a bailador app :)
14:50 jnthn ooh :)
14:52 PerlJam tadzik: were you talking the other day about extracting the pod-parsing into a module or did I imagine that?
14:53 masak wow, so I (1) got in just before the 2012.06 release and upset peoples code, but also (2) got in just before 2012.06 which is the new stability baseline? huh.
14:53 phenny masak: 10:22Z <pmichaud> tell masak  your thoughts on http://irclog.perlgeek.de/​perl6/2012-06-26#i_5758924 would be welcome.
14:53 masak reading it now.
14:53 masak also, sorry to everyone whose code I broke.
14:53 masak I'm pretty sure the change was for the better. we can discuss how to do this kind of change in the future.
14:54 pmichaud masak: I'm agreeing that thus far I feel more comfortable with &dir returning IO or something like it; I'm more interested in the managing slushiness part of the problem, since it's ripe.
14:55 masak aye.
14:55 masak still backlogging.
14:55 moritz I kinda feel that IO is not the proper abstraction for the return value
14:55 pmichaud I'm afk for a bit
14:55 moritz we should have something that stores dir and file name (or path and file name) separately
14:55 masak I've never felt comfortable with the set of uses IO closes over. I've just learned to accept it.
14:56 tadzik PerlJam: yep, probably
14:56 masak I think S16 has been under assault from various architecture astronauts over the years.
14:56 moritz and I'm kinda in favor of having a low-level dir reader, and something more high level with better suitable abstractions
14:57 [Coke] there's plenty of prior art here to pick from in terms of OO around the filesystem.
14:57 moritz like an IO::Dir which knows its own path, and can return a list of IO::Dir and IO::File objects when asked for its contents
14:57 moritz [Coke]: do you have an example for a good API?
14:58 moritz (off-topic: Ronja just learned to do a "high five" :-) )
14:59 [Coke] moritz: I would start with Java/C# and perl6ify it from there. (in java, there is File, Path, Readers, Writers... I'm sure p6 doesn't want or need all of it, but it's a good place to start.)
14:59 * masak high-fives Ronja!
15:00 flussence [Coke]: +1, I think IO should be broken up into a bunch of roles
15:00 masak moritz: I'm too old and tired to bikeshed IO and S16. you have my blanket approval to make any changes you feel are improvements.
15:00 flussence (taking dir for example, you obviously can't read/write it like a file, but it has a path like one.)
15:01 pmichaud from a stability perspective, I'd somewhat like us to "freeze" the existing IO spec, and perhaps build up replacements as modules in another space.
15:01 pmichaud s/IO spec/IO implementation/
15:02 PerlJam Hrm.
15:02 PerlJam You probably want to freeze the spec too though
15:02 moritz no
15:02 pmichaud no, not really.
15:02 moritz first it must make sense
15:03 sisar .oO ( in future, the file path will be like "dropbox.com/sisar/docs/foo.txt" or "drive.google.com/sisar/docs/foo.txt" ...)
15:03 pmichaud these days I'm somewhat not liking the synopses to be called "spec".  In many ways they serve more as a "language plan" than a "specification"
15:03 thou joined #perl6
15:03 pmichaud even S01 says that the 'spec' is determined by the test suite; i.e., roast
15:04 JimmyZ TDD
15:04 pmichaud but IO is definitely an area where we know that we *don't* want to freeze what we have no, either in implementation or in the synopses
15:04 pmichaud *we have now
15:04 PerlJam If someone reads the synopses and expects IO to work "as documented" but it doesn't because the synopses have changed based on implementation updates "in another place", that could be confusing.
15:05 jnthn There's probably a bunch of stuff in the IO implementation we can be pretty confident will not change. Like, "open", that you'll have some file-handle object you can .get/.lines/.say on, and so forth. One option is to declare those bits as permafrost, and the rest as slush.
15:05 PerlJam Especially since we've been telling everyone to look at the synopses as guides for how to do things
15:05 jnthn The average user probably doesn't care what class or role the thing they're calling comes from for the simple things.
15:06 jnthn And the design issues seem to be more around the less trivial scenarios and how to structure and factor the IO class/role hierachy.
15:06 pmichaud jnthn: yes, but at least in the present case it's a refactor that caused breakages.
15:07 pmichaud and I'm not sure it's a "less trivial scenario"
15:07 pmichaud (obtaining a list of files from a directory being fairly common in Perl)
15:08 jnthn pmichaud: I guess it's not about non-triviality and is more about confidence.
15:08 pmichaud given that a refactor can substantially change things; I don't have a lot of confidence about the current IO setup for much of anything.
15:08 jnthn *nod*
15:09 pmichaud even .get and .lines aren't really as solid as they might appear to be
15:09 pmichaud for example, can I .get on a directory?
15:10 jnthn I dunno. I do know that you can on an ordinary file and that this had best continue to work :)
15:10 jnthn I agree IO needs a ton of work though.
15:11 pmichaud I think one could have said "this had best continue to work" for &dir, too :)
15:11 jnthn Maybe. Maybe I've just been here enough to have heard enough "hmm...but wait" comments about &dir to expect it may change. :)
15:12 moritz http://bits.netbeans.org/6.5/javadoc/org-openide-f​ilesystems/org/openide/filesystems/FileObject.html # looks like a sensible API to steal from, at first glance
15:12 jnthn But I agree that's not something a typical user call use to make a call.
15:12 jnthn s/call use/can use/
15:12 pmichaud we have another ripe case -- the return value from    $foo.match($pat, :g)
15:13 pmichaud currently rakudo returns a list of Match objects, S05 says it should return a single Match object that encapsulates the global set
15:13 moritz hm
15:13 moritz if we want to do that, we either need to be very careful about containerizing Match objects
15:13 moritz or we need to have a flag in Match that indicates whether it should flatten
15:14 pmichaud not really, what determines flattening is the sigil
15:14 pmichaud $/ is non flattening, @() flattens.
15:14 proller_ joined #perl6
15:14 proller joined #perl6
15:14 moritz that's not quite satisfactory (more)
15:14 moritz suppose you want to implement Str.subst(:g, $regex)
15:15 moritz now you call self.match(:g, $regex)
15:15 moritz and you have to be able to know some stuff about the return value
15:16 moritz in particular you need to be able to distingish the case of several matches from the case of one match with several positional captures
15:16 moritz currently both look the same
15:16 pmichaud yes, rakudo currently gets that wrong.
15:16 pmichaud :g implies the "several matches case"  even if there's only one match.
15:16 pmichaud (at least according to S05)
15:16 jnthn ...matches case, or cases match?
15:17 moritz so it should return a match object which at .[0] has another Match object, which holds the captures?
15:17 pmichaud that's what S05 says.
15:17 moritz speaking of which
15:17 pmichaud I'm not sure I agree with S05 here, though.
15:17 moritz iirc the latest S05 also says that questionmark-quantified matches should not produce a result list, but rather return Nil or the submatch
15:18 moritz rakudo needs updating to that too
15:18 pmichaud yes, I've been aware of that issue as well.
15:18 pmichaud I was hoping to fix that in QRegex but it didn't happen before we made the grammar switchover.
15:18 pmichaud That's also on my list of things to address.
15:18 moritz and since we are now talking about regexes, I'd love to see more reply to the latest question on p6u
15:18 moritz I'm not sure if my answer was adequat
15:19 jnthn pmichaud: Are you pondering changing it for NQP as well as Rakudo?
15:19 pmichaud jnthn: yes.
15:19 jnthn pmichaud: Hm. But we don't have Nil in NQP.
15:19 jnthn pmichaud: What shall we use instead?
15:19 pmichaud Mu.
15:19 pmichaud NQPMu, if needed.
15:19 jnthn OK.
15:19 pmichaud or just leave it unbound.
15:20 jnthn Yes, a type object.
15:20 lichtkind joined #perl6
15:20 jnthn Unbound is gonna end up meaning NQPMu in NQP soon anyway.
15:20 jnthn Undef Must Die.
15:20 jnthn :)
15:20 lichtkind o/
15:20 Woodi -moritz-: but would be nice if  /p6doc/rest/api will not be so-so-many-levels-deep :) (except if not needed)
15:21 pmichaud (note that I've been studying .match in Rakudo quite a bit recently; preparing for a Str.match refactor and to resolve the :g-creates-too-many-$!target issue)
15:21 moritz Woodi: what exactly do you need a doc REST API for?
15:21 lichtkind pmichaud++ for his changes in my absense
15:21 jnthn pmichaud: Sounds good.
15:21 lichtkind szabgab++ too
15:22 pmichaud also, bizarrely, Str.match prevents me from fixing the laziness issues in ListIter.  I don't understand why.
15:22 Woodi -moritz-: rest is quite natural and examples before was restfull
15:22 jnthn pmichaud: Mostly I just wanted to be sure you weren't planning on using Undef in NQP :)
15:22 moritz Woodi: that doesn't answer my question
15:22 pmichaud jnthn: I'm in total agreement that Undef must die; indeed, that's why I was once asking about having things automatically init to NQPMu.
15:22 Woodi ok, do not understand question then :)
15:23 jnthn pmichaud: Ah, yeah, I'd forgotten that. The answer is "they will when I get around to it"
15:23 jnthn pmichaud: Which will likely happen during the QAST migration.
15:23 moritz Woodi: the question is: what do you want to use a REST API in p6doc for?
15:23 pmichaud I'm not pushing for that quickly, fwiw.  It can happen on its own accord.
15:23 moritz Woodi: I ask because the way to add docs (PUT or CREATE or whatever it's called in HTTP) is through git, not HTTP
15:23 jnthn pmichaud: The QAST, or the NQPMu? :)
15:24 pmichaud NQPMu
15:24 jnthn Ah
15:24 moritz Woodi: so I don't see much sense having a REST API
15:24 Woodi -moritz-: err... perl6.org/doc/substr  - it short and restfull, just use it...
15:24 moritz Woodi: so you just want nice URLs, not a REST API?
15:24 Woodi "perl6.org/doc/substr" is not REST API ?
15:25 jnthn Most people understand REST wrong anyway. Like, thinking the URL structure is the most important thing and then forgetting hypermedia is actually the most important thing. :)
15:25 Woodi probably agree...
15:25 pmichaud in general, I'm fully on board with the idea of avoiding Parrot objects as much as possible; including (and especially) Undef.   The only ones I'm interested in keeping are analogues to nqp::list and nqp::hash
15:25 pmichaud (i.e., low-level list and hash types)
15:25 moritz Woodi: only if every URL is a REST API to you
15:26 moritz afk
15:26 Woodi ok, pls push PAUSE button, well be back to that :)
15:26 jnthn pmichaud: Yeah, we'll always have something like that.
15:27 PerlJam Woodi: HAve you read http://en.wikipedia.org/wiki/R​epresentational_state_transfer  ?
15:27 pmichaud maybe we'll need a low-level IO type, too; I haven't thought about it that much.
15:27 pmichaud afk for a bit
15:31 Woodi -pmichaud-: just looked on it. and ?
15:31 Woodi oops
15:31 Woodi -PerlJam-: answer to you :)
15:34 lemmoner joined #perl6
15:35 Woodi you kicked me ? so silent here...
15:36 Woodi k, I want to remind something, maybe deserve it :)
15:37 Woodi some time ago I wrote about requirements for modules and still think it is good idea...
15:37 Woodi I planned to use XML::Something as example but IO popped
15:38 Woodi maybe few levels of biurocracy is not so bad :)
15:39 Woodi I planned to look on modules eg. XML in Perl5, Python, Ruby, C, ... and write some basic API. this can be start for modulecrafting
15:40 Woodi and such API would be generic, multilanguage, actual for centuries :)
15:40 Woodi k, afk :)
15:47 pmichaud back again
16:01 kresike bye all
16:02 brrt left #perl6
16:08 revdiablo joined #perl6
16:12 alester joined #perl6
16:18 stephenlb joined #perl6
16:42 proller_ joined #perl6
16:43 ILyuhan joined #perl6
16:43 cog__ joined #perl6
16:45 TimToady I think the most important API distinction has to do with whether the returned values represent the identity such that race conditions are possible or not
16:45 TimToady filenames as strings are always subject to race conditions
16:46 TimToady but opening files and returning file descriptors is subject to performance limitations
16:46 ILyuhan left #perl6
16:46 TimToady so we need both
16:46 moritz isn't there still room for race conditions between reading the file name and opening it?
16:47 Vlavv joined #perl6
16:48 TimToady depends on what capabilities the OS gives you to avoid that, I suppose
16:48 TimToady errands &
16:52 tyatpi joined #perl6
17:03 zby_home joined #perl6
17:33 [Coke] [1] 23483
17:44 [particle] joined #perl6
17:48 moritz fg
17:48 tadzik errands
17:51 cognominal joined #perl6
17:54 mucker joined #perl6
17:55 Chillance joined #perl6
17:57 fibo joined #perl6
17:58 brrt joined #perl6
17:59 sorear good * #perl6
18:01 jnthn hi, sorear
18:02 colomon \o
18:14 kresike joined #perl6
18:14 kresike hello all
18:34 moritz \o
18:36 sergot joined #perl6
18:41 cog_ joined #perl6
18:58 [Coke] sorear: yay for another release.
18:58 [Coke] sorear: any big plans for niecza in the coming months?
19:02 * colomon feels guilty for not doing more Niecza-hacking lately.
19:02 moritz colomon: I know another great project for you :-)
19:03 moritz colomon: document all the trig stuff (and maybe other math stuff) in p6doc
19:03 colomon moritz: what?
19:03 colomon hmmm...
19:03 * colomon has paid no attention to p6doc yet.
19:03 colomon pointers?
19:04 moritz colomon: I guess it's not too much effort actually; it's enough to mention each sub/method once (in Real or Numeric), even if it's implemented multiple times in different classes
19:04 moritz colomon: https://github.com/perl6/doc/
19:05 bluescreen10 joined #perl6
19:06 colomon moritz: understand that lack of work on Niecza isn't because I don't know what to do there.  it's more a sign life has been keeping me very busy lately...
19:06 colomon but I've added p6doc to my todo list.
19:07 moritz colomon: I understand, and don't want to put any pressure on you, just wanted to bring it to your awareness
19:07 colomon moritz++
19:23 zby_home joined #perl6
19:24 dalek doc: 8bac80e | moritz++ | lib/Match.pod:
19:24 dalek doc: document Match
19:24 dalek doc: review: https://github.com/perl6/doc/commit/8bac80e9ab
19:25 [particle]1 joined #perl6
19:29 flussence I just pushed some minor changes to pod2html, the most significant one is that it depends on URI now (instead of trying to do it itself, poorly :)
19:29 [Coke] flussence++
19:31 flussence (do we have anything like that for html-escaping? There's another thing I could chop out of the module...)
19:32 moritz I should add that to Mojo::Util
19:33 moritz I already have base64 decoding and encoding, url escaping and unescaping
19:33 dalek nqp/toqast: cfbc76f | jnthn++ | src/HLL/Actions.pm:
19:33 dalek nqp/toqast: Don't need Parrot namespace related stuff here any more.
19:33 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/cfbc76f39c
19:33 dalek nqp/toqast: 395aa0a | jnthn++ | src/QAST/Compiler.nqp:
19:33 dalek nqp/toqast: Start to compile QAST::CompUnit. Set HLL and compile the contained top-level block.
19:33 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/395aa0a3ea
19:34 dalek rakudo/toqast: e5c5266 | jnthn++ | src/QPerl6/Actions.pm:
19:34 dalek rakudo/toqast: Toss useless our statement and parameter.
19:34 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/e5c52662db
19:34 dalek rakudo/toqast: 7928806 | jnthn++ | src/QPerl6/Actions.pm:
19:34 dalek rakudo/toqast: Start to refactor various parts of CompUnit to use QAST::CompUnit.
19:34 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/792880631f
19:34 dalek rakudo/toqast: 0564728 | jnthn++ | src/QPerl6/Actions.pm:
19:34 dalek rakudo/toqast: type => returns in statementlist.
19:34 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/05647286bd
19:34 moritz jnthn: does it compile?
19:34 jnthn moritz: ?
19:35 jnthn moritz: Depends what you mean by "it"
19:35 jnthn moritz: The branches build. But qperl6 doesn't do anything useful at this point.
19:35 jnthn moritz: I'm working towards "compile hello world" first :)
19:36 moritz jnthn: well, does it compile the setting?
19:36 jnthn moritz: qperl6 in the branch uses QAST
19:36 jnthn moritz: Using perl6, not qperl6.
19:36 moritz ah
19:36 flussence n: token gen_delims        { <[:/?#\[\]@]> };
19:36 p6eval niecza v19-1-gbd1bd16: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Methods must be used in some kind of package at /tmp/krUBnnOuok line 1:â�¤------> [32mtoken gen_delims        [33mâ��[31m{ <[:/?#\[\]@]> };[0mâ�¤â�¤Please backslash # for literal char or put whitespace in front for comment at /tm…
19:36 flussence n: grammar { token gen_delims        { <[:/?#\[\]@]> }; }
19:36 p6eval niecza v19-1-gbd1bd16: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Please backslash # for literal char or put whitespace in front for comment at /tmp/62b45tqvv2 line 1:â�¤------> [32mammar { token gen_delims        { <[:/?#[33mâ��[31m\[\]@]> }; }[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
19:37 flussence niecza doesn't like URI.pm :/
19:37 flussence (I don't think it'd work with podtohtml overall, but I was trying ooc)
19:38 jnthn moritz: I figured it'd be easier to get us compiling basic programs with QAST, then work through the sanity tests, then spectest, then set it loose on compiling CORE.setting.
19:39 birdwindupbird joined #perl6
19:39 jnthn The current big task is re-arranging SC handling.
19:43 tokuhirom joined #perl6
19:49 [Coke] qperl6?
19:50 moritz quantum perl 6!
19:50 jnthn [Coke]: a perl6 executable that uses QAST :)
19:50 tadzik moritz: url escaping is builtin in URI, Bailador uses that these days
19:50 jnthn [Coke]: Just exists during the life of the toqast branch.
19:50 jnthn [Coke]: It won't escape the branch :)
19:52 fridim_ joined #perl6
19:58 masak evening all you sweet Perl 6 people.
20:02 moritz \o masak
20:02 tadzik masak! \o/
20:02 dalek star: 2d2565e | moritz++ | Makefile:
20:02 dalek star: ship version of ufo, pand and File::Tools from before the &dir API change
20:02 dalek star: review: https://github.com/rakudo/star/commit/2d2565e876
20:02 masak \o/
20:03 sergot \o/
20:03 tadzik |\o/|
20:04 tadzik o<
20:04 tadzik /o\
20:04 tadzik It's fun to stay at the Y.M.C.A...
20:04 masak jnthn: it's happening again... :)
20:04 masak jnthn: all your fault :P
20:04 jnthn I...huh...what... :P
20:05 tadzik it wasn't me
20:05 jnthn Is that example still in the Perl 6 book? :)
20:05 masak jnthn: also, last IRC snippet of http://strangelyconsistent.org/bl​og/happy-10th-anniversary-perl-6
20:05 masak jnthn: you started it! :P
20:07 moritz today I learned that perl 1.0 didn't have eval
20:07 moritz and neither did it have sort
20:07 moritz or arrays interpolating into lists
20:08 masak or regexes, I think. didn't those come in Perl 2?
20:09 moritz perl 1 had regexes
20:09 masak ok.
20:09 masak would be a fun talk. "what Perl 1.0 didn't have."
20:09 moritz but perl 2 greatly improved regex support
20:09 masak Juerd++ did a nice talk about what Perl 4.0 didn't have.
20:09 moritz * New regexp routines derived from Henry Spencer's.
20:09 moritz o Support for /(foo|bar)/.
20:09 moritz o Support for /(foo)*/ and /(foo)+/.
20:09 moritz o \s for whitespace, \S for non-, \d for digit, \D nondigit
20:09 moritz from bleadperl's 'git log'
20:09 moritz about the 2.0 release
20:10 masak oh, the regexes were replaced, not implemented.
20:10 masak stil marvellously simple at that time.
20:10 masak it's amazing how far we've come.
20:11 baest joined #perl6
20:11 dukeleto joined #perl6
20:12 * kresike .oO(masak made a mistake and didn't correct himself, maybe he is human after all)
20:12 kresike :)
20:12 moritz I can attest that he certainly looks human
20:12 tadzik wasn't that his clone?
20:12 moritz well, one of 'em
20:13 moritz but if they are *clones*, the others should look human too, no?
20:13 kresike moritz, looks can be deceiving ... didn't you see the Terminator movies ? :)
20:13 tadzik hmm, possibly
20:13 masak still*
20:13 kresike yay
20:13 sergot :)
20:13 masak I guarantee that all of my clones are human.
20:14 kresike but you are not ? :)
20:14 PerlJam perhaps only partially so
20:14 * masak bobs happily in mid-air
20:14 tadzik how can you tell if you're not talking to one of the clones?
20:15 * masak makes a mental note to blog about his six clones at some point
20:15 masak it's... complicated.
20:15 tadzik use v6
20:16 kresike this number six keeps coming up in here ... wonder why ?
20:17 tadzik because it's June!
20:17 masak kresike: probably because of PHP 6.
20:17 PerlJam I thought it had something to do with the number of the beast
20:18 kresike masak, I'm sure it's not that
20:21 TimToady nr: constant @t = [\+] 1..10; say (0,@t Z^.. @t)[4];
20:21 p6eval niecza v19-1-gbd1bd16: OUTPUT«10^..15␤»
20:21 p6eval ..rakudo 1ffd6c: OUTPUT«5␤»
20:22 TimToady nr: constant @t = [\+] 1..10; say (0,@t Z^.. @t).lol[4];
20:22 p6eval niecza v19-1-gbd1bd16: OUTPUT«Unhandled exception: Unable to resolve method lol in type List␤  at /tmp/pMV9mhTUaf line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3917 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3918 (module-CORE @ 562) ␤  at /home/p6…
20:22 p6eval ..rakudo 1ffd6c: OUTPUT«Any()␤»
20:22 PacoAir joined #perl6
20:22 TimToady nr: constant @t = [\+] 1..10; say (0,@t Z^.. @t)».list.lol;
20:22 p6eval niecza v19-1-gbd1bd16: OUTPUT«Unhandled exception: Unable to resolve method lol in type Array␤  at /tmp/r3jw1koqWB line 1 (mainline @ 6) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3917 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3918 (module-CORE @ 562) ␤  at /home/p…
20:22 p6eval ..rakudo 1ffd6c: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55␤»
20:23 TimToady r: constant @t = [\+] 1..10; say (0,@t Z^.. @t)».list[4];
20:23 p6eval rakudo 1ffd6c: OUTPUT«5␤»
20:23 * TimToady is having difficulty persuading either niecza or rakudo to yield a nice solution to http://rosettacode.org/wiki/Floyd%27s_triangle
20:24 * masak looks, interested
20:25 TimToady treating Z^.. as a list of parcels seems to be very difficult in either impl
20:25 masak TimToady: your efforts with RC nicely parallel Ludwig Zamenhof's efforts with translating Hamlet and the Bible into Esperanto after inventing it :)
20:26 tadzik oh, Esperanto
20:26 tadzik where did I put this list of summer plans
20:26 TimToady you need a list of summers first
20:26 * masak is too busy to write his list of summer plans
20:27 tadzik I have a generator for them, and the reified ones are already immutable
20:27 moritz fwiw the panda bundles with the to-be-released 2012.06 star works fine now
20:27 tadzik . o O ( already immutable sounds wrongish )
20:27 moritz *bundled
20:27 tadzik moritz: does it work for p6doc?
20:28 moritz tadzik: dunno, star installs p6doc for me
20:28 TimToady r: constant @t = [\+] 1..10; say (0,@t Z^.. @t)».item[4];
20:28 p6eval rakudo 1ffd6c: OUTPUT«5␤»
20:28 tadzik kay
20:28 TimToady nr: constant @t = [\+] 1..10; say (0,@t Z^.. @t)».item[4];
20:28 p6eval rakudo 1ffd6c, niecza v19-1-gbd1bd16: OUTPUT«5␤»
20:28 tadzik I'll take a look at panda and pod again after I finally get rid of this exam madness
20:28 moritz tadzik: which is why it's lower priority for me right now
20:28 tadzik understood
20:28 moritz if anybody wants to help with the star release, draft a release announcement
20:28 TimToady nr: constant @t = [\+] 1..10; say (0,@t Z^.. @t)».perl[4];
20:28 p6eval rakudo 1ffd6c, niecza v19-1-gbd1bd16: OUTPUT«5␤»
20:29 TimToady nr: constant @t = [\+] 1..10; say (0,@t Z^.. @t)[^5].perl;
20:29 p6eval niecza v19-1-gbd1bd16: OUTPUT«(0^..1, 1^..3, 3^..6, 6^..10, 10^..15)␤»
20:29 p6eval ..rakudo 1ffd6c: OUTPUT«(1, 2, 3, 4, 5)␤»
20:30 colomon n: constant @t = [\+] 1..10; for (0,@t Z^.. @t)[^5] -> $range { say $range.join; }
20:31 p6eval niecza v19-1-gbd1bd16: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤»
20:31 colomon n: constant @t = [\+] 1..10; for @((0,@t Z^.. @t)[^5]) -> $range { say $range.join; }
20:31 p6eval niecza v19-1-gbd1bd16: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤»
20:33 dalek nqp/toqast: 6beda3d | jnthn++ | src/QAST/CompUnit.nqp:
20:33 dalek nqp/toqast: Add some more SC-related bits to QAST::CompUnit.
20:33 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/6beda3d75c
20:33 dalek nqp/toqast: 8302932 | jnthn++ | src/QAST/Compiler.nqp:
20:33 dalek nqp/toqast: Sketch out compilation of load/main; it may even actually work...
20:33 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/83029326eb
20:38 dalek rakudo/toqast: 93627fc | jnthn++ | src/QPerl6/Actions.pm:
20:38 dalek rakudo/toqast: First step of switching over to QAST::CompUnit for all the SC stuff.
20:38 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/93627fc2ed
20:38 dalek rakudo/toqast: 85bbebb | jnthn++ | src/QPerl6/Actions.pm:
20:38 dalek rakudo/toqast: Eliminate final .loadinit(...) usage.
20:38 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/85bbebb8fa
20:42 masak rn: my $n = 5; my $max = [+] 1..$n; my $l = $max.chars; for 1..$n { say (++(state $i)).fmt("%{$l}d") xx $_ }
20:42 p6eval niecza v19-1-gbd1bd16: OUTPUT«Potential difficulties:â�¤  $i is declared but not used at /tmp/aOGW6TSXp2 line 1:â�¤------> [32m= $max.chars; for 1..$n { say (++(state [33mâ��[31m$i)).fmt("%{$l}d") xx $_ }[0mâ�¤â�¤ 1â�¤ 2  3â�¤ 4  5  6â�¤ 7  8  9 10â�¤11 12 13 14 15â�¤Â»
20:42 p6eval ..rakudo 1ffd6c: OUTPUT« 1␤ 2  3␤ 4  5  6␤ 7  8  9 10␤11 12 13 14 15␤»
20:42 masak TimToady: easy.
20:42 sergot masak++
20:42 sergot :)
20:43 masak heh, I accidentally used the new-ish rhs thunking of infix:<xx>. that one is handy, isn't it? :)
20:44 jnthn Ain't it the lhs that's thunk'd?
20:44 brrt joined #perl6
20:45 araujo joined #perl6
20:45 masak yes. sorry.
20:46 masak I have trouble sometimes with the chiral directions.
20:46 brrt perl6 is busy lately
20:46 masak brrt! \o/
20:47 brrt o/. :-) but, seriously, it is
20:47 brrt it is good
20:47 [Coke] thunk into the table.
20:47 [Coke] whoops, no, it's up from the table. Coke--
20:47 pupoque joined #perl6
20:48 TimToady masak: yes, I'm sure there's a way to do it, but the Z^.. way should at least fail consistently between niecza and rakudo :)
20:49 TimToady by the way, I don't think your solution works when the number of chars varies in the last line
20:49 adu joined #perl6
20:51 TimToady such as the N=14 case
20:52 dalek star: ddb6e0f | jnthn++ | skel/docs/announce/2012.06:
20:52 dalek star: Add a draft announce for 2012.06.
20:52 dalek star: review: https://github.com/rakudo/star/commit/ddb6e0f655
20:55 * flussence has a horrible but stateless-looking solution
20:55 flussence r: constant @t = [\+] ^11; .say for ((0, @t «+» 1) Z @t).map(-> $x, $y { ~Range.new($x, $y)».fmt("%{@t[*-1].log(10).ceiling}d") });
20:55 p6eval rakudo 1ffd6c: OUTPUT« 0␤ 1␤ 2  3␤ 4  5  6␤ 7  8  9 10␤11 12 13 14 15␤16 17 18 19 20 21␤22 23 24 25 26 27 28␤29 30 31 32 33 34 35 36␤37 38 39 40 41 42 43 44 45␤46 47 48 49 50 51 52 53 54 55␤»
20:56 TimToady that doesn't look right either for N=14
20:56 TimToady the 99 column should be narrower than the 100 column
20:58 TimToady r: constant @t = [\+] ^4; .say for ((0, @t «+» 1) Z @t).map(-> $x, $y { ~Range.new($x, $y)».fmt("%{@t[*-1].log(10).ceiling}d") });
20:58 p6eval rakudo 1ffd6c: OUTPUT«0␤1␤2 3␤4 5 6␤»
20:58 flussence hm, has an off-by-one anyway. it should start "((@t «+» 1) Z @t[1..*]).map"
20:58 TimToady r: constant @t = [\+] ^5; .say for ((0, @t «+» 1) Z @t).map(-> $x, $y { ~Range.new($x, $y)».fmt("%{@t[*-1].log(10).ceiling}d") });
20:58 p6eval rakudo 1ffd6c: OUTPUT«0␤1␤2 3␤4 5 6␤7 8 9 10␤»
20:58 TimToady hmm, I guess it does work
21:00 TimToady (on formatting)
21:00 masak TimToady: oh, you're right about N=14.
21:00 masak I even tested that but didn't consider the result wrong.
21:00 masak yes, that means each column has to be formatted individually.
21:00 masak slightly trickier, but still fairly doable :)
21:02 TimToady but I'm with flussence++ in wanting a stateless solution :)
21:04 masak of course.
21:05 sorear [Coke]: get non-bootstrap running, see if I can extract enough awesomeness from it to make up for the LTAness of not being bootstrapped
21:07 [Coke] cool.
21:08 pmichaud back again
21:08 TimToady flussence: btw, I think you're depending on .map not flattening by default, which is arguably a rakudobug
21:08 pmichaud map should be flattening by default now
21:08 TimToady so you might need a .lol there, but then niecza certainly won't run it
21:09 TimToady oh, nevermind, you're taking in pairs
21:10 * pmichaud reads backscroll
21:10 * TimToady obviously needs to take a map...er...a nap...
21:11 TimToady afk &
21:11 kresike bye all
21:12 masak bye kresike.
21:12 cog_ tadzik, masak, jnthn can you edit the fpw wiki so we can know where every one stays and eat.  http://journeesperl.fr/fpw2012/wiki
21:13 flussence I've come up with https://gist.github.com/2999080 but it seems insufficiently lazy; trying to use ^Inf hangs it :(
21:15 masak aww :)
21:16 pmichaud (Z^.. handling)  I know there's a bug with Z handling in Rakudo for some operators; it's on my todo list.
21:17 sergot What does &lol do?
21:18 pmichaud "lol" == "list of lists"... it essentially turns flattening parcels into non-flattening parcels
21:18 pmichaud or something like that.  the details still need a little fleshing out.
21:18 sergot pmichaud++ thanks
21:22 leprevost joined #perl6
21:27 cog__ joined #perl6
21:40 harmil joined #perl6
21:42 harmil Well, I'm about to go off on vacation for the rest of the week, but I thought I'd mention: I just finished deploying a trivial parser in rakudo for $work … startup is a bit painful, but it parses like a champ!
21:43 masak \o/
21:43 masak harmil++
21:43 jnthn harmil: Is the startup largely the compilation time rather than actual startup time?
21:44 harmil jnthn: yes, I'm pulling in Log and Date::Time::Utils along with my grammar and actions… total startup is about 2-5 seconds
21:44 harmil But since I just need the parser to sit there reading input and spitting out ASTs, I'm fine with that.
21:44 jnthn harmil: OK...with the various modules pre-compiled?
21:44 harmil jnthn: no pre-compilation, yet
21:45 jnthn OK.
21:45 harmil Since I have to inter-operate with lots of other code in other languages, I spit out the ASTs as JSON. Damn, I just love JSON as a neutral interchange!
21:46 jnthn :)
21:47 harmil One side benefit to Perl 6: my domain language happens to look a lot like SQL, so I'm going to talk to $work about being able to derive a pure SQL parser from it and publish that on github…  we shall see.
21:55 masak good night, fearless and glorious #perl6.
21:57 sudokode joined #perl6
21:59 geekosaur joined #perl6
22:11 mattp_ joined #perl6
22:17 raiph joined #perl6
22:17 raiph hii #perl6
22:19 raiph reading thru the wiki and issues at https://github.com/stevan/p5-mop
22:20 raiph seems the more p6 compat it will be the better
22:21 raiph reading https://github.com/stevan/p5-mop/issues/28
22:27 pmichaud raiph: there's a hackathon taking place in august to address exactly that (p6 and p5 mop)
22:28 skids joined #perl6
22:28 * jnthn -> sleep, night o/
22:28 raiph ah. perfect. thx.
22:29 raiph (fwiw my specific concern was best middle ground on concrete syntax (issue 28 suggests introducing "my method"))
22:34 pmichaud http://act.yapc.eu/mtmh2012/sponsors.html#p5mop
22:34 pmichaud (item #5)
22:37 thomax joined #perl6
22:37 thomax hi
22:39 thomax when i do a `time perl6 -e 'say "hello world"'` ib a linux system i get 0.765u 0.145s 0:00.94 95.7%, but when i do the same with "normal" perl (time perl -e 'print "hello world\n"') i get 0.001u 0.002s 0:00.02 0.0%
22:40 pmichaud yeah, perl 6 has a lot more in it.
22:40 thomax which means that perl6 is about 10 times slower starting
22:40 pmichaud sure, but you get a lot more at startup
22:41 thomax so, that means for everyday tool programming perl5 is the better choice, right?
22:41 pmichaud depends on the type of programming you're doing.
22:41 pmichaud Yes, there are some applications for which p5 will be better, and others for which p6 will be better.  Just like some applications are better in C and others are better in C++
22:41 thomax system automatisation, filtering, admin stuff
22:42 pmichaud out of curiosity, try:
22:42 benabik What matters more?  Startup time?  Overall run time?  Time spent writing the tool?
22:42 pmichaud time perl -MMoose -MMooseX::Method::Signature -MMooseX::MultiMethods -MRegexp::Grammars -e 'print "hello world\n"'
22:42 thomax yeah, i stick with C, C++ is for the others
22:42 benabik With many sysadmin scripts the programmer time is far more important than the run time.
22:43 thomax pmichaud: gives me about the same result
22:44 pmichaud really? rakudo is still 10x slower?
22:45 thomax yes, really
22:46 thomax maybe i should install MooseX, to be fair ;-)
22:47 pmichaud also, what version of rakudo are you running?
22:47 thomax debian unstable.. wait
22:47 pmichaud perl6 -v
22:48 thomax This is perl6 version 2012.04.1 built on parrot 4.3.0 revision 0
22:49 thomax my last try on perl6 is 1.5 years ago :-)
22:50 pmichaud 2012.04.1 is reasonably recent
22:50 thomax actually perl6 made it into debian, thats quite a success :-)
22:50 pmichaud here's the timings I get
22:50 pmichaud https://gist.github.com/2999876
22:51 pmichaud that's not including Regexp::Grammars
22:51 benabik For me P6 takes 0.8, P5 0.1, Moose takes 0.27  (I don't have grammars or any MooseX)
22:51 thomax as i said, i don't have MooseX installed :-)
22:51 pmichaud yeah; the point is that startup is an apples-to-oranges comparison :)
22:52 pmichaud for some applications (including 'hello world'), p5 is faster startup.   for other applications, p6 is faster.
22:53 pmichaud afk here
22:54 thomax ok, then.. i'm offline :-)
22:54 thomax ahoi
22:54 thomax and thanks
23:01 [particle] joined #perl6
23:12 stephenlb joined #perl6
23:30 lichtkind gnight
23:30 lichtkind o/

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

Perl 6 | Reference Documentation | Rakudo