pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | evalbot: perl6: say 3; (or rakudo:, pugs:, elf:, etc) | irclog: irc.pugscode.org/ | ~315 days 'til Xmas
Set by mncharity on 8 February 2009.
00:04 nihiliad left, nihiliad joined 00:12 iblechbot left 00:14 nihiliad left 00:15 IllvilJa joined 00:20 DemoFreak left 00:29 Sepheebear left 00:53 _timbunce joined
wayland @tell moritz_ actually, don't worry, I've already done S32-setting-library :), and it'll be in my next commit 00:56
lambdabot Consider it noted.
00:59 japhb joined 01:07 hercynium joined 01:08 timbunce left 01:10 justatheory left 01:16 wknight8111 left 01:27 felipe left, _timbunce left
pugs_svn r25401 | lwall++ | [STD] trait arguments are not in declarative context, hence 01:29
r25401 | lwall++ | is tighter(&infix:<**>)
r25401 | lwall++ | shouldn't try to declare a new ** operator
01:34 hercynium left 01:38 nihiliad joined, eternaleye joined 01:43 dukeleto left 01:44 alc joined 01:47 timbunce joined, timbunce left 01:48 fridim_ joined
meppl good nicht 01:50
01:52 meppl left 01:58 eternaleye left 02:15 estrabd left 02:28 eternaleye joined 02:37 eternaleye left 02:42 justatheory joined 02:43 felipe joined 02:44 skids joined
skids rakudo: package Foo { class Pair is also { method fmt(Str $format) { return "ohhai"; }}; :d<f>.fmt("Pair %s %s").say; } 02:45
p6eval rakudo 876c09: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
skids bah
02:46 hello\n joined
skids Not sure if that should even work but here it prints "Pair d f" not "ohhai" 02:47
02:53 justatheory left 02:56 eternaleye joined, estrabd joined, Tene joined 02:59 bacek__ joined 03:00 bacek left
s1n rakudo: say (1,2,3) 03:06
p6eval rakudo 876c09: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
s1n jnthn: i think some of your recent changes went afoul
i'm getting: too few arguments passed (0) - 1 params expected
current instr.: 'parrot;Bool;pick' pc 23612 (src/gen_setting.pir:335)
anyone else seeing this problem? 03:07
03:09 eternaleye left 03:10 Tene_ left 03:17 fridim_ left
skids sln: I updated a couple hours ago and I get correct "123" for that. 03:18
s1n skids: what revision?
skids: 444a4c? 03:19
skids sln: forgive me I don't even know where the revision number is kept...
I totally missed the whole git thing while on vacation from hacking. 03:20
s1n skids: git log | head | grep commit
well, head -n 1 maybe
skids Yeah 444a4c
s1n i'm still getting it
i've rebuilt several times
using the --gen-parrot too 03:21
skids I svn updated parrot by hand.
s1n skids: what revision of parrot do you have? 03:22
36856?
skids 36871
s1n hmm maybe jnthn forgot to update the parrot revision 03:23
03:23 agentzh left
s1n i'm doing a complete rebuild right now, i'll try manually updating parrot in a second 03:24
03:25 eternaleye joined 03:39 xinming left
s1n jnthn, pmichaud: please update build/PARROT_REVISION to at least r36875 03:40
jnthn's latest changes requires a newer dynext 03:41
pugs_svn r25402 | wayland++ | S16: Added a few attributes to trees 03:46
r25402 | wayland++ | S29: Moved a lot of stuff out to S32
r25402 | wayland++ | S32: Created this from S29 -- will incorporate S16 stuff soon
03:48 Sepheebear joined 03:54 frew joined
frew is it still planned that perl6 can run perl5 code? 03:55
and that perl5 will be the default for perl6?
skids Probably depends on perl5/parrot progress. It will definitely support p5 regular expressions in addition to the new ones. 03:57
frew well 03:59
that assumes that perl6 is on parrot
skids and it is supposed to recognize files starting with package foo; as p5, but I don't know what you mean by default there.
frew and it's currently in the spec that perl6 will suppoer perl7
er
perl5
skids Well, rakudo is where the action is at right now, and that will allow embeds of other languages that have a parrot version, which is a growing list. 04:01
frew skids: yeah, if it starts with class or module it assumes p6
I was just wondering if that part of the spec was up to date
04:01 autarch joined
skids yeah I'm not the one to ask. 04:01
frew because for that to be true perl6 must support the entirety of perl5 04:02
autarch why is date & time stuff being spec'd as part of synopsis 16?
04:02 alester joined
frew because that's a form of io? from a clock/ 04:02
autarch that should be just the low level bits
I'm begging you (whoever the right you is) to not put a bunch of high level stuff into the core
frew autarch: perl is a HLL though...why not? 04:03
autarch because you'll be stuck with this API forever
and the API that's in there now is wacky
and I thought there was some agreement that the Perl 6 core should be minimal, compared to Perl 5 04:04
frew maybe
I don't know about that
autarch plus these are things that need to be release on their own schedule
skids Probably it was originally a minimal IO-essential subset and someone got carried away.
frew if chromatic has anything to say about it perl6 will be light 04:05
autarch for example, time zone updates happen at semi-random times, but there could be 8-12 or more per year
leap seconds gets announced on their own schedule, etc
frew the Synopsis does say that if someone wants to do something with dates and times they should use the DateTime Module
skids Maybe it's just homeless specs in search of a Synopsis in which to spend the night :-) 04:06
autarch what DateTime module? the Perl 5 one?
frew probably
autarch gah, no!
frew but DateTime is better than any other languages handling of dates
why don't you like it?
autarch yes, _I_ know that
skids No it's talking about a DateTime object in the same Synopsis.
autarch frew: I'm the guy who created DateTime, in case you didn't know that ;) 04:07
frew skids: yep. I should have read further
autarch: I didn't know that. And thanks, it's awesome!
autarch you're welcome
04:07 oskie left
skids seconds frew autarch++ 04:07
autarch but anyway .... it could be much better, and should not be used as the basis for Perl 6 as-is
nor should this sort of _very complex_ stuff be spec'd in the synopsis, IMO 04:08
dates & times are an incredibly insane morass, trust me
pugs_svn r25403 | wayland++ | S16/S32: Moved Temporal and Tree stuff from S16 to S32
r25403 | wayland++ | S29: Added myself, because of last update
skids Well, just about all P5 modules should really be ground-up rethought now that there are all the new features in Perl6, especially some of them avoided pretending to do multiple dispatch because it was tedious without actuall MMD.
autarch skids: yeah, there's that too 04:09
but I mean, DateTime has other design flaws that it would be good to avoid
I did write an email to the perl6-language list about this just now too
At the language level, I think having a way to do something like localtime and gmtime is sufficient 04:10
instead of returning a gigantic list, it could return a very simple object, of course
wayland Incidentally, I've just moved the Time/Date stuff out of S16. And I agree, the interface definitely needs work, but I thought I'd move it out of S16 first, and then go to work on it.
autarch but the heavy lifting should be on CPAN6
actually, something like Time::Piece without the method duplication might be good for core 04:11
but without Time::Piece's completely broken attempt at datetime math 04:12
wayland autarch: I agree. I want a much more "simple-things-simple" interface
autarch Basically, an immutable object with a bunch of accessors, and maybe a strftime() method (or something similar), would be great 04:13
wayland (oops, I agree about improvement)
autarch no locales, no proper Olson time zones
wayland I'd like *hooks* for locales, timezones, and calendars
skids Personally I'd be happy to load a module for anything more than a ns-resolution gettimeofdayish thing.
autarch well, this Time::Piece-alike would be a module, but shipping it with core might be sane 04:14
04:14 eternaleye left
autarch wayland: my theory is that this minimal object would be something that the real DateTime(6) could use under the hood 04:14
04:15 eternaleye joined, bacek__ left
skids Whatever minimal object would be needed to pass in and out of NCI to OS essentials e.g. select, alarm... 04:15
autarch well, those just take a float, right? 04:16
skids But with subsecond if not sub-us precision, falling back to rounding.
04:16 gravity left
skids autarch: struct timeval 04:16
(and struct timespec) 04:17
alester OK, is there something I can write for rakudo
Something that would actually use perl 6
and allow me to be useful?
autarch skids: actually, that's a duration, not an instant in time
skids See the post on rakudo.org Re: the Setting.
04:17 hello\n left 04:18 bacek__ joined
frew is excited that DateTime and DBI are getting worked on for perl6 04:19
alester skids: Was that for me? 04:20
skids alester: yes.
autarch frew: I've done a _very little_ bit of code on it
04:20 xinming joined
autarch I'm kind of waiting for Rakudo to get further along at this point 04:20
alester autarch: I think DateTime is an ideal candidate for putting into Rakudo ASAP 04:21
frew autarch: that's fine, it's the fact that you are down with it that matters
alester it's crucial and it relies on little else
autarch alester: define "putting into Rakudo"
frew autarch: because when libraries like that are implemented in perl6 I'll be able to use it at work
alester converting to
autarch yeah, it's sort of a good candidate
alester I'm going to start on File::Next some time 04:22
Can't even think about something like Mech because it's so integrated with a stack below it
autarch I did work on it at the Frozen Perl hackathon a bit, but Rakudo is still A) missing random features; B) giving completely unhelpful error messages
frew have you guys been reading chromatics Modern Perl blog?
because he mentions some of these things
autarch B is a bigger problem, because it means I can't figure out if an error is me not knowing Perl 6, or a missing feature
frew or at least he did today
autarch frew: yes, I've been reading it
skids autarch: I try to get going but I'm way too detail oriented to be productive -- always finding something unimplemented that just bugs me and I don't want to work around.
frew ok, just making sure 04:23
autarch I'm 110% behind keeping Perl 6 core as freaking minimal as possible
frew he is apparently a big part of parrot; I can't see a lot of him in perl6 besides keeping the minutes though
autarch he is indeed a big part of parrot
skids Well the way to figure that out is log in here and try to crash via rakudo
rakudo: die() 04:24
p6eval rakudo 876c09: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
frew haha, nice
skids And then if your lucky someone will tell you "that's not implemented"
frew rakudo: "frew"
p6eval rakudo 876c09: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
frew yeah
it's broken atm
autarch yeah, pmichaud was at the hackathon, so I kept making him come round the table and look at my laptop
04:24 chrisdolan joined
alester Hey, that's life in the hemorrhaging edge. 04:24
autarch but it makes for a _very_ slow pace of development
which is why I'd just as soon wait 6 months before I start hacking on DateTime6 for real 04:25
frew did you guys see the Periodic Table of Operators?
autarch which in turn is why I don't want it spec'd as part of the core ;)
the table was lovely
frew oh my goodness!
skids where's that at?
frew I love it
www.ozonehouse.com/mark/periodic/ 04:26
wayland I've been not watching. I was hoping that Temporal (that's what I'm calling the minimal DateTime) would be a role that the real DateTime could do
ie. role DateTime does Interval { or whatever
I'm wanting the time stuff for a) localtime, gmtime, etc, and b) times in stat() 04:27
autarch the role as-is is bizarro
has $.calendar makes no sense
skids Heh I'll have to see about linking that up to my own similar themed frantic scribbles at www.perlfoundation.org/perl6/index.cgi?witch
autarch the get and last methods are also just odd
this is why I suggest having a Time::Piece-like extremely minimal class 04:28
this could also be a role that DateTime would do in the future
wayland You may be right about the $.calendar making no sense. I would expect it to usually link directly to Gregorian, or something 04:29
autarch it doesn't _have_ a calendar, it _is_ a calendar 04:30
but you don't need that for something minimal, use Gregorian and let the rest be CPAN6
wayland I guess I was intending that the Christian vs. Secular stuff be implemented via the Calendar modules 04:31
autarch wayland: that's a locale issue, really
unless you're talking about Julian vs Gregorian
wayland Is it? Good. Then maybe I can give $.calendar the flick :)
Nah, definitely AD vs. CE
autarch that's a locale issue 04:32
wayland The point to the get() and last() methods is that we don't need 5 functions called lastdayofmonth(), lastdayofquarter(), lastdayofyear(), etc
(or 15 functions) :)
autarch well, you certainly wouldn't name them like that, cause they should have underscores, but anyway ...
you don't need any of those, just have it be an immutable object which returns its own year, month, day, hour, minute second, etc 04:33
if you have more complicated needs, there will be more complicated modules
wayland Ah, and leave all that "last" business to maybe a calendar module :)
Ok, that's sounding good. I'm liking that better :) 04:34
(btw, thanks for saying you're the DateTime guy -- I know you know what you're talking about :) ) 04:36
autarch I wasn't sure if people recognized my nick
wayland I didn't :). And I preume you know I'm the one making a mess of the specs :). I'm going to start cleaning the Temporal stuff now :) 04:38
04:39 shinobi-cl left
autarch how do the specs get blessed? does TimToady mutter a chant over them? 04:39
frew autarch: You're in good company; I didn't realize I was talking to Larry Wall when I was talking to him in this channel
wayland I don't know, but I only hack on draft specs unless I'm sure I'm right :) 04:40
skids TimToady rules the std I think, but that doesn't get up past operators and keywords.
wayland That's why my contributions are on iterators, S29, and S16
autarch I mean, I could make changes to the time stuff, I suppose 04:41
but I don't want to work on it without guidance from the powers that be
wayland I'm in the middle of changing some things
But when I'm finished, you can have a go :)
Should be later today (it's 3:39pm here), so it shouldn't be too long. 04:42
autarch well, I'm not going to do it tonight (it's almost 11pm here)
wayland Oh, ok.
I'll try to remember to flick you an e-mail when I'm done :) 04:43
What's TAI?
Threat Analysis Index?
autarch en.wikipedia.org/wiki/International_Atomic_Time
wayland Thanks
autarch basically it's atomic time without any leap second adjustments
this stuff is insanely confusing (again, my reason to keep it out of core) 04:44
frew autarch: I thought it might be cool to print out the equation for figuring out Easter on a poster since it's so complicated 04:45
wayland Fine by me. Simple for core, but roles composable into something better :).
autarch frew: or the Chinese calendar, even more insane 04:46
frew I believe it
autarch there's a whole book on this stuff called Calendrical Calculations
I can't follow most of the math though 04:47
04:47 dukeleto joined
chrisdolan Will someone with Rakudo commit please add "return $cond" to the end of proclaim() in Test.pm? 04:47
frew I don't really care to. I just remember recently I was like, "When's easter" and I got curious as I always have to look it up
chrisdolan ... for better Test::More similarity 04:48
04:49 dukeleto left
chrisdolan or just "git pull git://github.com/chrisdolan/rakudo.git test-pm" 04:49
wayland chrisdolan: Not sure any of those people have been active recently (unsure though) 04:56
frew rakudo: 3; 04:57
p6eval rakudo 876c09: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
frew pugs: 3;
p6eval pugs: RESULT«3»
frew pugs: [1,2,3] =:= [1,2,3];
p6eval pugs: RESULT«Bool::False»
frew pugs: my @a = @b = [1,2,3]; @a =:= @b;
p6eval pugs: OUTPUT«*** ␤ Unexpected "@a"␤ expecting "=", "::", context, ":" or "("␤ Variable "@b" requires predeclaration or explicit package name␤ at /tmp/rGQqlip6xJ line 1, column 4␤»
04:58 autarch left
frew pugs: my @a = [1,2,3]; my @b = @a; @a =:= @b; 04:58
p6eval pugs: RESULT«Bool::False»
frew pugs: 1 =:= 1;
p6eval pugs: RESULT«Bool::False»
alester hey chrisdolan, didja notice a perlcritic target? 05:00
05:00 chrisdolan left
skids pugs: my $a = 1; my $b := $a; $a =:= $b 05:04
p6eval pugs: RESULT«Bool::True»
frew is confused 05:07
I thought =:= had to do with lists...
skids frew: Container identity, determines if variables are just 2 names linked to the same object. 05:08
frew oooooh
got it
05:09 justatheory joined
frew I figured that a list and a hash were containers so it would compare those 05:09
skids Yeah they are, but to assign them like that you have to use :=, = will copy. 05:10
frew pugs: my @a = [1,2,3]; my @b := @a; @a =:= @b; 05:11
p6eval pugs: RESULT«Bool::True»
frew interesting
05:11 frullet joined
frew pugs: my $foo = "bar"; $foo.?awesomebot 05:15
p6eval pugs: RESULT«undef»
frew pugs: my $foo = "bar"; $foo.*awesomebot
p6eval pugs: RESULT«undef»
frew pugs: my $foo = "bar"; $foo.+awesomebot
p6eval pugs: OUTPUT«*** No such method in class Str: "&awesomebot"␤ at /tmp/enIOiFALfU line 1, column 18 - line 2, column 1␤»
skids pugs: @f := [ "foo".say, "bar".say ] ; "wait for it".say; @f.say; 05:18
p6eval pugs: OUTPUT«*** ␤ Unexpected " :="␤ expecting "::"␤ Variable "@f" requires predeclaration or explicit package name␤ at /tmp/w3AyfnTe0f line 1, column 3␤»
skids pugs: my @f := [ "foo".say, "bar".say ] ; "wait for it".say; @f.say;
p6eval pugs: OUTPUT«foo␤bar␤wait for it␤1 1␤»
frew hahaha
skids Hrm I thought pugs already did lazy stuff.
frew pugs: my @f ::= [ "foo".say, "bar".say ] ; "wait for it".say; @f.say; 05:19
p6eval pugs: OUTPUT«foo␤bar␤wait for it␤1 1␤»
skids IIRC that should say "wait for it foo 1 bar 1" once lazy stuff is implemented 05:20
(I mean mine, ::= would still say as above) 05:22
frew yeah 05:24
I was just checking
05:25 agentzh joined 05:33 justatheory left 05:36 oskie joined 05:38 masak joined 05:46 iCtrl\neGOOL joined 05:47 iCtrl\neGOOL is now known as sabaonete
sabaonete is there any online perl interpreter? 05:47
05:52 sabaonete left
masak sabonete: you have to stick around for a while, so that people can reply to you. :) 05:54
06:09 oskie left
alester OK, is something unwell about make test? Or is it me? 06:15
masak alester: which product are we talking about? 06:17
alester rakudo
masak I don't usually run make test, only make spectest.
but I'll update and try the former.
alester oooh
I'm still trying to figure how things are sposeta work. 06:18
sial.org/pbot/35126 is what I'm getting 06:19
masak ok. 06:20
that looks like an actual error.
alester meaning in Rakudo or on my end?
masak in Rakudo.
care to submit a rakudobug?
alester trying out what's on the main 06:22
it might just be my fork.
masak well, 'make test' passes here. 06:23
alester it's like I'm missing a patch that has lots of eigenstates changes 06:30
i'm diffing my fork against rakudo/rakudo
or maybe I pulled something from someone else's branches 06:32
06:39 magnarjg joined 06:41 hirschnase joined 06:44 [cotto] left, [cotto] joined 06:45 hirschnase left
alester well, my copy of the rakudo main fails too 06:47
masak do a fresh checkout and run that? 06:48
06:52 hirschnase joined 07:06 nihiliad left 07:11 hirschnase left 07:19 agentzh left 07:23 dukeleto joined 07:24 agentzh joined
dukeleto perl6: say 42 07:27
p6eval rakudo 876c09: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
..elf 25403, pugs: OUTPUT«42␤»
masak fixes Rakudo 07:28
dukeleto masak: oooh, thanks! 07:29
masak just doing my job :)
07:33 meppl joined, alester left 07:36 ashizawa joined
masak hm. make error in Rakudo on timtowtdi.org :/ 07:36
masak will have to punt this one to moritz_ 07:37
pugs_svn r25404 | leto++ | Found log(0) bug; added log NaN/Inf tests and log10 complex tests 07:45
r25405 | wayland++ | Improved Temporal (previously DateTime) stuff a bit 07:47
07:50 iblechbot joined
moritz_ good morning 07:51
lambdabot moritz_: You have 2 new messages. '/msg lambdabot @messages' to read them.
moritz_ @massages
lambdabot wayland said 8h 11m 6s ago: What would you say to calling the new Spec directory S32-setting-library? We had some discussion on this earlier on IRC
wayland said 6h 54m 48s ago: actually, don't worry, I've already done S32-setting-library :), and it'll be in my next commit
masak moritz_: I can't make Rakudo to build on timtowtdi.org 07:52
dukeleto perl6: say "I am a sad bot" 07:53
p6eval rakudo 876c09: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
..elf 25405, pugs: OUTPUT«I am a sad bot␤»
moritz_ takes a look
pugs_svn r25406 | moritz++ | [t/spec] a few small improvements 07:55
r25412 | moritz++ | [t/spec] more autothreading tests (for .values and prefix:<+>) 07:56
r25413 | moritz++ | [t] update link in README
r25414 | moritz++ | [t] small improvements to HOWTO
r25415 | moritz++ | [t] updated deprecated-syntax.pod (mostly Junction stuff)
r25421 | moritz++ | [t] move adverbial_modifiers.t to spec/
r25422 | moritz++ | [t] move inplace.t to spec/
r25428 | moritz++ | [t] move lookaround.t to spec/ 07:57
r25429 | moritz++ | [t] move undeclared_attribute.t to spec/
r25430 | moritz++ | [t] move caller.t to spec/
moritz_ this is git-svn replaying yesterday night's improvements
pugs_svn r25436 | moritz++ | [t/spec] add a smartlink (albeit a bad one)
r25437 | moritz++ | [t] move scoped_named_subs.t to spec/, remove an obsolete test
r25438 | moritz++ | [t] move code_blocks_as_sub_args.t to spec/
dalek kudo: 543e228 | (Moritz Lenz)++ | t/spectest.data:
add an integration test to t/spectest.data
08:00
kudo: 3bcf8dd | (Moritz Lenz)++ | t/spectest.data:
we pass S29-any/isa.t, add it to t/spectest.data
kudo: b7c3233 | (Moritz Lenz)++ | t/spectest.data:
add test for Junction.eigenstates to spectest.data
kudo: 9288850 | (Moritz Lenz)++ | src/ (4 files):
expose Junction.eigenstates as a public method
moritz_ masak: can you build a fresh rakudo locally? it also fails for me 08:05
masak I could a few hours ago. trying again.
moritz_ tries to re-run Configure.pl 08:06
ah, that does the trick 08:07
masak moritz_++
moritz_ rakudo: say 'happy bot' 08:10
p6eval rakudo 876c09: OUTPUT«happy bot␤»
moritz_ rakudo: say 2**2**3 08:12
p6eval rakudo 876c09: OUTPUT«256␤»
moritz_ rakudo: say [**] 2, 2, 3
p6eval rakudo 876c09: OUTPUT«64␤»
08:13 Eevee left 08:15 iblechbot left
Matt-W Morning 08:22
pugs_svn r25439 | moritz++ | [t/spec] small fixes, moritz-- 08:23
Matt-W started writing Form.pm this morning, but then had to come to work 08:37
08:37 duke_leto joined
bacek_ rakudo: say 2**3**4 08:38
p6eval rakudo 543e22: OUTPUT«2.41785163922926e+24␤»
08:38 duke_leto left 08:58 DemoFreak joined 09:14 wolverian left 09:19 wolverian joined 09:22 wolverian left 09:25 wolverian joined 09:42 pmurias joined 09:44 PantheraPardus joined 09:49 maerzhase joined 10:03 |jedai| left 10:04 DemoFreak left 10:17 magnarjg left 10:18 bacek__ left
masak I know. let's do diamonds! 10:33
rakudo: role A { method foo { say "OH HAI" } }; role B does A {}; role C does A {}; class D does B does A {}; D.new.foo
p6eval rakudo 543e22: OUTPUT«A conflict occurred during role composition due to method 'foo'.␤current instr.: '!meta_compose' pc 342057764 ((unknown file):-1)␤»
masak this should work, shouldn't it?
a method shouldn't conflict with itself.
jnthn That's a bug.
masak bugmits rakudosub 10:34
jnthn It shouldn't try to compose roles that have already been composed.
It may be trying to do stuff to early...
10:35 bacek_ left
jnthn allison-- decided roles in Parrot would be so much better with us taking Perl 6 semantics, so now I have to keep working around them. *sigh* 10:35
Erm 10:36
withou us *not* taking...
jebat... *with us not taking
masak what about this one?
rakudo: role A {}; role B does A {}; role C does A {}; class D is B is C {}
p6eval rakudo 543e22: OUTPUT«The class 'D' already has a parent class ''. It may have been supplied by a role.␤current instr.: '!meta_trait' pc -2861953 ((unknown file):-1)␤»
masak not 'is' instead of 'does'.
s/not/note/
jnthn Hmm. 10:37
masak last time I checked, multi inheritance wasn't a crime :)
jnthn I have no idea why it'd be doing that. You're doing two different punned classes.
Erm, inheriting from two different punned classes. 10:38
masak submits rakudobug
pwned classes. heh.
jnthn :-P 10:46
10:48 alc left 10:49 cls_bsd left
masak I should blog about how to find bugs in Rakudo. it goes like this: (1) think of a one-liner that exercises a cool thing that probably no-one has done before (like diamond inheritance). (2) see it break. (3) submit bug. 10:49
:)
of course, it has to break in an interesting way, and not because of user stupidity or some such. 10:50
jnthn And occasionally step 2 may not happen. :-P
masak jnthn: of course. :) 10:51
I forgot to mention that.
but this way, even failures are in some sense fruitful. they're just a different kind of success.
moritz_ :-)
Matt-W You're very good at seeing the positives in everything :) 10:52
moritz_ jnthn: have you already had a chance to work on the multi dispatch + generics issue?
Matt-W When I call map as a method on a list, can I use adverby syntax for the block?
moritz_ Matt-W: in theory yes, in pratice not yet 10:53
jnthn should give masak his ASP classic tasks to see if he can possibly find anything positive in *that* steaming heap.
masak jnthn: I already have $WORK tasks to flee from, thank you very much.
moritz_ jnthn: it makes you appreciate the beauty of Perl 6 even more :-)
Matt-W moritz_: that explains the syntax error I got this morning then before I came to work 10:54
Matt-W made use of pointy subs and they made him happy
jnthn moritz_: I did reply to the mail... 10:55
10:56 cls_bsd joined
masak lunch & 10:56
jnthn moritz_: It's...non-trivial to do the fix, as I mentioned. 10:57
moritz_ ah yes, I remember... coroutines and stuff
sorry 10:58
jnthn sa citi lepsi po kave... 10:59
ooops, mis-channel
moritz_: Continuations...but yeah. 11:00
11:03 alexn_org joined
Matt-W jnthn: ASP classic as in Microsoft's pre-.NET web app development monstrosity? 11:04
jnthn Matt-W: Yes. 11:08
11:08 ejs joined
Matt-W jnthn: ouch 11:08
jnthn Matt-W: Indeed. 11:10
11:10 pmurias left
jnthn Apparently it was also written before SQL injection attacks were invented too. ;-) 11:10
Matt-W oh dear 11:13
I've done a little work with that sort of code myself, I didn't care much for it
Fortunately the bit I have to maintain in that system was written in Perl, by me.
jnthn I'm gradually re-writing bits into C#. 11:14
But it's slow going...
Edge cases, always having to track down dependencies between stuff, etc. 11:15
Matt-W I bet
I have similar problems, except I'm gouging out a broken subsystem in a big C++ app and trying to make it work right while interacting with everything around it in the same way across a hundred or so threads. Keeps me busy... 11:16
Although right now I've been challenged to a game of table tennis :) & 11:18
jnthn hey, that sounds more fun! 11:21
moritz_ (table tennis)++
I do that once or twice a week
for about 9 years now
masak rakudo: 1.5 * 52 * 9 11:30
p6eval rakudo 543e22: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
masak fixes 11:31
jnthn masak: Why does it keep failing like this? Is the root cause clear at all?
masak I don't know, I just work here. :/
11:32 zamolxes joined
masak rakudo: 1.5 * 52 * 9 11:38
p6eval rakudo 543e22: RESULT«702» 11:39
masak that's a lot of table tennis.
11:39 bacek joined
Matt-W hurrah! I won! 11:42
masak felicitations.
Matt-W We have a table in the 4th floor lunch room, so I try to play a game every day 11:43
it's much better for me than playing pool on the 5th floor :)
masak because of the extra set of stairs? :P 11:44
Matt-W my desk is on the fifth floor, so table tennis is even more extra effort :) 11:45
jnthn lives in the 4th story of a building. 11:48
It has no elevator.
Matt-W that's good for the leg muscles!
jnthn It sucked when I was moving in, but it's great otherwise.
masak my office is on an unspecified floor, because our office building complex inhabits a non-standard geometry.
Matt-W heh I bet it did
jnthn Now I can't bear the thought of moving out. :-) 11:49
Matt-W I try to use the stairs at work as much as possible, but since I moved up from the fourth floor it's seemed like a lot of extra effort to get up to the 5th
and most people agree, the 4th floor is okay, the 5th is hard
I suppose it's a good thing I don't work for the radio station on floor 6 :)
there was a building at uni that had a 'mezzannine floor'. I never did figure out where that was. It made the whole place far more interesting. 11:51
masak when I look out the window, it looks like we're on the ground floor. 11:52
Matt-W you're in a hill?
masak Matt-W: or a slope.
Matt-W that always confuses things
masak it make them interesting.
Matt-W this building has an extra floor on one side due to sloping
and the floor numbering system is american, which always bugs me 11:53
11:53 iblechbot joined
Matt-W well, the one on our side is, the hotel side (jduging by the signs in the fire escapes) use british floor number 11:53
masak this building doesn't have floow numbers, it has a 3D coordinate system.
Matt-W so you work at (4, 7, 2.4**pi)?
masak and little notes with coordinates on everything.
I work in D3L218b. 11:54
(don't ask.)
Matt-W that's... fun
bacek good evening
masak bacek: g'day.
bacek rakudo: say 2**3**4
p6eval rakudo 543e22: OUTPUT«2.41785163922926e+24␤»
bacek masak: g'day
masak: you can close #63306 now :) 11:55
Matt-W technically I work at NCQ05W057 but that's getting right down to which desk
masak closes
jnthn The fun one is trying to meet people on a given floor number...when you have different ideas of what floor 1 is.
masak rakudo: say [**] 2,3,4
Matt-W (and it's a very poor system, it doesn't tell you which part of the fifth floor to look in for desk 57)
p6eval rakudo 543e22: OUTPUT«4096␤»
Matt-W jnthn: yes!
masak bacek: you mean the ticket is incorrect?
bacek masak: it was correct, jnthn++ already fixed it 11:56
jnthn Well, I applied bacek++'s patch... ;-)
bacek masak: [**] is different :)
masak oki.
I don't think I understood what the bug was, then. 11:57
but I'll close.
Matt-W right associativity in action :)
bacek jnthn: can you apply github.com/bacek/rakudo/commit/4025...7fd62a07d7 (it is for #63232) 11:59
Matt-W So we have perl 6 setting now, is there a plan for how to progress through implementing it? 12:01
jnthn Someone else asked that in reply to my post about it.
So sounds like a plan would be good...
Matt-W well if people start diving in and implementing stuff there might be duplication of effort 12:02
or at least some train wrecks
jnthn Aye. 12:03
bacek We have RT for managing proposed patches. 12:04
12:05 pjcj joined
Matt-W Also, what's the procedure for patches on git? Do we fork rakudo and point you to a commit on our branch in the ticket? 12:05
12:06 fridim_ joined
Matt-W I ask because I can actually see myself writing code for the setting 12:06
jnthn Matt-W: I haven't worked out, how to do that yet. IN theory, it looks like the best way.
bacek jnthn: git remote add bacek-branch git://gitub.org/bacek/rakudo.git; git fetch bacek master; git cherry-pick <id>; 12:07
but it will keep author's name in commit. 12:08
git fetch bacek-branch master
Matt-W aaah 12:09
I knew it had a clever wayt o do it
lunch &
bacek github.com/bacek/rakudo/network have a nice picture (if you have a flash player installed :) 12:11
jnthn Yay, the train tickets for my vacation have just been delivered. :-) 12:18
bacek jnthn: congratulations! Take your laptop with you to spend time on rakudo hacking :) 12:21
rakudo: say +* 12:22
p6eval rakudo 543e22: OUTPUT«Use of uninitialized value␤0␤»
jnthn bacek: Actually my vacation is around/between a couple of Perl conferences. :-)
bacek: So will have the laptop. :-)
bacek jnthn: :)
masak: #61628 can be closed too
moritz_ whatever you say about git, it does make offline working much easier 12:23
jnthn But mostly I plan to relax, and speak awful Russian to everyone. :-)
bacek jnthn: ни в коем случае!
jnthn bacek: Oo minya, nyet unicodi! ;-)
bacek Is it possible to get admin rights at RT? So I can close tickets by myself? 12:24
jnthn: ni v koem sluchae!
masak bacek: resolving. 12:26
moritz_ bacek: you have to bother pmichaud with that
bacek moritz_: ok.
bacek summon pmichaud
spell failed... 12:28
moritz_ bad luck with your dices? :-) 12:29
bacek indeed 12:30
wayland Hmm. I have 12D6 somewhere? (I was a Shadowrun player :) ) 12:32
Maybe he needs to be conjured or enchanted instead of summoned 12:33
wayland casts an illusion of pmichaud :)
bacek using D10 usually. Munchkin forever! :)
12:35 hanekomu joined
moritz_ Munchkin++ 12:44
wayland btw, am I right in recalling that pugs bits get handed out willy-nilly? I ask because if autarch turns up wanting a pugs commit bit, I'd like him to have one :) 12:46
masak they get handed out liberally.
I'm not sure I remember how to do it, but I used to be able to hand them out. 12:47
ruoso wayland, masak, I've just replied in the thread about trees 12:53
masak ok. reading wayland's reply to my email now.
12:56 fridim_ left
ruoso wayland, one important thing I didn't mention in the mail is that I understand that if some attribute is going to be undefined for some cases in a Role, then it doesn't belong in that role, but in a more specialized one... 12:58
the good thing about roles is that they don't require an hierarchy
(which is what makes the Java API so terrible)
masak ruoso: I still think that a role Tree with a lookup method is a very silly thing to have. 12:59
lookup is a trait of _all_ data structures! 13:00
ruoso "trait"?
masak I use the word in a very loose sense.
you can do lookup on all data structures.
that's why they're data structures, so you can do lookup on them.
ruoso alright... in some sense, you can say that calling a method is a form of lookup 13:01
masak yes, but that's not what I meant.
ruoso (but it is what it actually means in Perl 6, since everything is represented in terms of method calls ;)
masak I meant that one can do lookup an all data structures that contain things... it's not specific to trees. 13:02
ruoso Ok, I think I agree with you
Perl 6 has already a powerful enough introspection API for you to do any magic you want 13:03
masak aye.
ruoso a Tree role won't actually help anything...
masak less than nothing, by me.
and I apologise if that makes me sound overly negative :)
ruoso what I had in mind is an old project (2007) of a tree-transforming language
actually, at first a tree-matching language 13:04
masak that sounds very interesting... for a CPAN module.
ruoso yes... sure... but I was wondering if a Tree role wouldn't be a fundamental piece for that to be possible
but I've already realised it isn't
masak good. 13:05
masak is a Tree hugger
ruoso but I'm still favorable to adding DateTime as built-in 13:06
masak I'm of two minds about that.
ruoso the fact that perl5 didn't have DateTime (as the current CPAN module) lead many people do do date and time math using timestamps 13:07
which is just plain wrong
masak you can't protect people from not knowing about CPAN.
ruoso I know... but I mean... if the time() sub returns a DateTime object 13:08
masak arguably better, yes.
ruoso where you can do, time + DateTime::Duration(:months(1));
or even
time + DateTime::Duration(:days(1))
(since that's the most common error
(er... it was supposed to be a ".new" in the two examples above) 13:09
13:13 ashizawa left 13:14 kane_ joined
Matt-W that's something i've always liked being able to do in SQL 13:16
in some ways it'd be lovely to have in the core
wayland It's after midnight here, so I'll unfortunately be turning in before I get to grips with things more, but I'd like to quickly mention that the core Temporal (previously DateTime) stuff is going to be fairly basic
But with the idea that a CPAN/heavy-lifting module can implement the same role better :) 13:17
That's not what I was thinking earlier, but autarch and others talked me into it :)
13:18 DemoFreak joined
Matt-W that sounds like a reasonable approach, yes 13:18
masak rakudo: my $a; $a min= 100; say $a 13:20
p6eval rakudo 543e22: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤current instr.: 'infix:cmp' pc 16183 (src/builtins/cmp.pir:146)␤»
masak I thought this had been fixed...
jnthn masak: I thought we had regression tests for min=... 13:21
ah 13:22
rakudo: my $a; say $a min 100;
p6eval rakudo 543e22: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤current instr.: 'infix:cmp' pc 16183 (src/builtins/cmp.pir:146)␤»
jnthn Ah, OK.
It's in min itself, not the meta-operator thingy.
masak ah.
Matt-W that min= max= thing, that's incredibly cool
masak Perl 6 is awesome.
Matt-W oh yes 13:23
jnthn masak: So bug report welcome, but my example pinpoints the problem more. :-)
masak bugs reports
...and has a spell fail of my own, it seems :) 13:24
masak shouldn't type at all today
rakudo: undef min 100 13:25
p6eval rakudo 543e22: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤current instr.: 'infix:cmp' pc 16183 (src/builtins/cmp.pir:146)␤»
bacek jnthn: it's Undef itself. 13:26
jnthn bacek: Or cmp now knowing how to deal with undex. 13:27
bacek: Maybe re-work it to dispatch to Rakudo's own cmp rather than Parrot's is better. 13:28
13:28 PantheraPardus left
bacek jnthn: I've replied to some ticket about undef. 13:28
looking now.
jnthn has Slovak class now 13:29
pugs_svn r25440 | ruoso++ | [mildew] Multi.pm compiles 13:30
r25440 | ruoso++ | [mildew] we dont need $OUT anymore, we have print and say now!
r25440 | ruoso++ | [mildew] Makefile builds Multi.pm but Prelude still doesnt load it.
ruoso mildew: say "Hello World!"
p6eval mildew: OUTPUT«can't create CORE.pad.store: Permission denied at ../../src/perl6/Cursor.pm line 194␤»
ruoso pfft...
13:31 skids left
Matt-W scowls at his perl 5 code 13:31
bacek jnthn: nopaste.snit.ch/15671 13:35
ruoso TimToady, is it possible to make the creation of CORE.pad.store inside the lex directory? 13:36
bacek In ticket I've got comment that other way will be implementing '.sub "cmp" :multi(Undef,_)'
ruoso TimToady, so we have only one directory where STD writes to?
jnthn rakudo: say undef cmp 2 13:39
p6eval rakudo 543e22: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤current instr.: 'infix:cmp' pc 16183 (src/builtins/cmp.pir:146)␤»
jnthn Gah, OK.
jnthn really afk now
ruoso proudly looks at mildew/t/return_function.t and thinks: this really looks like Perl 6 now... 13:42
masak looks 13:43
ruoso .oO( but there is still a long road before being able to actually run t/01-sanity/01-tap.t
masak still, good work. 13:44
ruoso rakudo: my sub foo($code) { $code.(); say "not" }; my sub bar() { foo({ return "ok"; }); say "not" }; bar(); 13:46
p6eval rakudo 543e22: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
ruoso erm... seems that I hit rakudo recompiling
rakudo: my sub foo($code) { $code.(); say "not" }; my sub bar() { foo({ return "ok"; }); say "not" }; bar();
p6eval rakudo 543e22: OUTPUT«not␤» 13:47
ruoso at least one thing that works in mildew and don't work in rakudo :) :) :)
masak :) 13:49
there's a ticket for that, though.
ruoso I know... I've oppened it (I think)
masak oh, right. 13:51
yes, I think so too.
13:53 araujo left 13:54 ejs1 joined 14:03 ejs left
Matt-W is that wrong? 14:08
masak Matt-W: rt.perl.org/rt3/Ticket/Display.html?id=61126 14:10
I secretly look forward to this being fixed, because then I can have fun breaking Rakudo by trying to return from subs that have already exited. :P 14:11
14:19 Porsbo joined
Matt-W so return... argh 14:20
head pain
return doesn't necessarily bind to its immediately enclosing block 14:21
masak it binds to its enclosing routine, IIRC.
Matt-W so { } isn't a routine 14:22
is -> { } a routine?
bacek (as in RT) I thinks they both should return 2.
Matt-W bacek: that's what I'd say, so I want to understand why they shouldn't
masak Matt-W: no, -> { } is not a routine. 14:23
see, um, S04.
I agree, the ticket makes a subtle point.
I also misunderstood it first.
bacek, Matt-W: maybe it'd help if you tried to explain to me why you think the examples should return 2. 14:27
bacek pugs: sub bar($code) { $code() }; sub foo { bar { return 1 }; return 2; }; say foo; 14:28
p6eval pugs: OUTPUT«2␤»
masak Pugs is wrong, too :)
bacek because this return returns from "bar", not "foo"
masak bacek: well, no. the 'return' is in foo.
bacek pugs: my $ret = ->{ return 42 }; sub bar($code) { $code() }; sub foo { bar $ret; return 2; }; say foo; 14:29
p6eval pugs: OUTPUT«2␤»
bacek so what?
Matt-W I would have read it that when bar runs $code(), $code() evaluates to '1', so bar then evaluates to 1, which is then ignored, and the routine proceeds to 'return 2'
masak or, rather, it's in a block which is not powerful enough to catch return exceptions, inside foo.
so the return exception propagates to foo. 14:30
bacek there is return exception handler in bar
masak yes, but the return is declared inside foo.
so, it's a "foo return" :)
bacek masak: what about my second example? 14:31
masak the one with the pointy block?
bacek yes
masak I think it's illegal, because the return isn't inside a sub. 14:32
Matt-W no way
bacek pugs: my $ret = sub { return 42 }; sub bar($code) { $code() }; sub foo { bar $ret; return 2; }; say foo;
p6eval pugs: OUTPUT«2␤»
bacek masak: try again
Matt-W isn't -> { } pretty much the same as sub { }?
masak Matt-W: no.
see S04.
Matt-W S04 seems to assume knowledge
masak bacek: now it returns 2, methinks. 14:33
Matt-W: :)
bacek masak: no. If you right, than foo returns 42.
And it's weird.
Matt-W "Pointy blocks and bare closures are transparent to return." 14:34
masak bacek: no, because now the 'return 42' is in a sub, and not in foo.
bacek even no. We will not call "say foo" at all.
masak bacek: sorry, did not get that last part.
what do you mean?
Matt-W so sub {} is 'stronger' than -> {} in that sub {} catches return exceptions 14:36
masak here's the p6l thread in which I go through the same process of bewilderment as you are right now: www.nntp.perl.org/group/perl.perl6....30088.html
Matt-W -> is just 'closure with formal parameters'
masak Matt-W: aye
Matt-W okay
I'm happy then
masak Matt-W++
Matt-W we're going to need a really, really good guide to blocks and closures in u4x though!
bacek perl6: sub blah { ->{ return 42 } }; sub bar($code) { $code() }; sub foo { bar blah; return 2; }; say foo;
masak Matt-W: indeed. 14:37
p6eval pugs, rakudo 543e22: OUTPUT«2␤»
..elf 25440: OUTPUT«AST handler circumfix:pblock partially unimplemented at ./elf_h line 2541␤»
14:37 skids joined
masak Matt-W: I'll add that to the TODO. 14:37
Matt-W I might try writing one at some point
bacek I tend to agree with both rakudo and pugs
Matt-W but I'm already maybe doing too many things
masak knows the feeling
Matt-W So I don't know which I should settle down and actually do
Although really I should write some code first to understand things better 14:38
And then write about the language
so I'll carry on poking at Form.pm
PerlJam bacek: But since those don't agree with the spec, they're wrong :)
bacek PerlJam: so, I last case program will just aborted?
masak Matt-W: ah, you're doing From.pm. great! 14:39
Matt-W masak: I even made a github tree, but it's only got some empty files in it
masak: I'll push some code when I've actually got some :)
masak Matt-W: cool. I'll add you to proto then. 14:40
Matt-W is that so I can teach proto about Form?
also is there a spec for Form.pm?
something that Damien used for his Perl 5 implementation?
masak Matt-W: only the Pod of Perl6::Form, AFAIK.
Matt-W Well I'll work from that
It looks bloody good, anyway 14:41
Matt-W must remember to mention Damien frequently in the README
masak :)
PerlJam Matt-W: I believe it's spelt "Damian"
masak Matt-W: please do tests.
Matt-W: also, there's something strange about the LICENSE file. 14:43
it seems to be just a random HTML file, containing lots of things but no license.
Matt-W hmm 14:44
I'll look into that
there was some weirdness with git when I did that
masak ok.
Matt-W README shouldn't be empty, for example
as I definitely tried to give it some contents
PerlJam: you are correct 14:45
14:45 nihiliad joined
Matt-W masak: there will be tests 14:46
masak \o/
Matt-W if you're very lucky I might even try test-driven development
14:47 ejs2 joined
masak I think that would make porting more painless, actually. 14:47
Matt-W yes 14:49
especially if there's already a test suite for Perl6::Form
could port that first
masak there essentielly isn't. 14:50
I looked.
it has one test. ('use')
Matt-W oh
damn
oh well
masak but writing the test suite while scrutinizing the POD for Perl6::Form might still be a very good idea, IMO.
Matt-W yes 14:51
helps to understand what it does
and helps to develop a nice API 14:52
masak aye.
Matt-W not that the API is the complicated thing there
masak mostly, there's just a lot of details. 14:53
anyway, good luck. I think I'll have good use for that module, and I look forward to reviewing your work.
Matt-W you can find all the bugs in it
and then fix them for me
masak right. :)
Matt-W :)
14:56 ejs1 left 14:59 Tene_ joined
pugs_svn r25441 | masak++ | [TODO] added really, really good guide about blocks/closures 15:01
15:10 Tene left
bacek perl6: for 1..8:by(2) { .say } 15:12
p6eval pugs: OUTPUT«*** ␤ Unexpected ":by"␤ expecting "_", fraction, exponent, term postfix, operator or block construct␤ at /tmp/98uqWh5yLK line 1, column 9␤»
..elf 25441: OUTPUT«Parse error in: /tmp/qNp98q2k6C␤panic at line 1 column 15 (pos 15): No previous operator visible to adverbial pair ([#<Match:0x819d374 @on_str="for 1..8:by(2) { .say }", @from=8, @to=14, @bool=true, @hash={:value=>#<Match:0x819d464 @on_str="for 1..8:by(2) { .say }", @from=9,
..@to=...
..rakudo 543e22: OUTPUT«Statement not terminated properly at line 1, near ":by(2) { ."␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
bacek perl6: .say for 1..8:by(2) 15:13
p6eval rakudo 543e22: OUTPUT«Statement not terminated properly at line 1, near ":by(2)"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
..pugs: OUTPUT«*** ␤ Unexpected ":by"␤ expecting "_", fraction, exponent, term postfix or operator␤ at /tmp/XJkLs2tCTB line 1, column 14␤»
..elf 25441: OUTPUT«Parse error in: /tmp/pKDFoPRHrO␤panic at line 1 column 19 (pos 19): No previous operator visible to adverbial pair ([#<Match:0x818731c @on_str=".say for 1..8:by(2)", @from=13, @to=19, @bool=true, @hash={:value=>#<Match:0x818736c @on_str=".say for 1..8:by(2)", @from=14, @to=19,
..@b...
bacek std: .say for 1..8:by(2)
moritz_ only STD.pm parses adverbs on operators yet
p6eval std 25441: OUTPUT«ok 00:02 33m␤»
masak rakudo: say (Range.new(:from(10), :to(20), :by(2))).perl 15:22
p6eval rakudo 543e22: OUTPUT«10..20␤»
masak rakudo: say (Range.new(:from(10), :to(20), :by(2))).elems 15:23
p6eval rakudo 543e22: OUTPUT«11␤»
masak rakudo: say (Range.new(:from(10), :to(20), :by(2))).values
p6eval rakudo 543e22: OUTPUT«1011121314151617181920␤»
masak rakudo: say ~(Range.new(:from(10), :to(20), :by(2))).values
p6eval rakudo 543e22: OUTPUT«10 11 12 13 14 15 16 17 18 19 20␤»
masak hey, people! low-hanging fruit! :) 15:24
bacek say ~(Range.new(:from('A'), :to('Z'), :by(2))).values 15:25
moritz_ masak: waht do you think is low-hanging?
bacek rakudo: say ~(Range.new(:from('A'), :to('Z'), :by(2))).values
p6eval rakudo 543e22: OUTPUT«A B C D E F G H I J K L M N O P Q R S T U V W X Y Z␤»
masak moritz_: implementing :by in the Range constructor.
at least for numbers. 15:26
um, at least for reals :)
Matt-W don't you just love programming language design 15:27
15:27 zamolxes left
Matt-W you even have to stop and think about what you mean when you say 'number' 15:27
jnthn masak: That prob depends on adverb parsing... 15:28
Oh, no, not in the constructor...
masak 'xactly.
ISTR someone already almost implemented this.
jnthn More bonus points, cosider porting parts of range to Perl 6. ;-)
s/more/for/
Gah, I do can't do English today. 15:29
jnthn couldn't do Slovak very well either. illness--
masak English is hard! Ni iru butikumi.
dalek kudo: 7d6683a | pmichaud++ | build/PARROT_REVISION:
Need to bump PARROT_REVISION for setting to work.
15:30
kudo: 6c983dc | pmichaud++ | (15 files):
Merge branch 'master' of [email@hidden.address]
bacek perl6: say 'A'+2
p6eval pugs: OUTPUT«2␤»
..elf 25441: OUTPUT«Argument "\x{41}" isn't numeric in addition (+) at (eval 121) line 3.␤2␤»
..rakudo 543e22: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
bacek :by(2) in ranges isn't so easy... 15:31
masak dives in to fix
jnthn bacek: You ++ twice, IIRC.
Rather than try to add two.
moritz_ masak: no need
masak oki
bacek :by(-2)
A lot of cases.
moritz_ it's short after XX:30, which means that rakudo is being rebuilt right now
jnthn OK, then you -- twice. ;-) 15:32
masak moritz_: ah.
Matt-W moritz_: when is rakudo rebuilt? 00 and 30?
masak jnthn: non-integral :by() and letters, then :)
moritz_ Matt-W: parrot is rebuilt at 00, rakudo after parrot, :15, :30 and :45
Matt-W ahah 15:33
15:34 frew_ joined
frew_ /w1 15:34
bacek jnthn: is there any way to check in run-time that I have to do manual incrementing?
'A1'..'A5':by(2)
or even 'A1'..'Z42':by(7)
perl6: enum Foo<A B C>; say ++Foo::A
p6eval pugs: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/F3LYIZ6j8F line 1, column 1-16␤»
..rakudo 6c983d: OUTPUT«Method 'succ' not found for invocant of class ''␤current instr.: 'parrot;Perl6Object;' pc 1681 (src/classes/Object.pir:721)␤»
..elf 25441: OUTPUT«Can't locate object method "postcircumfix__60_32_62" via package "Foo" (perhaps you forgot to load "Foo"?) at (eval 122) line 3.␤ at ./elf_h line 4346␤»
jnthn Hmm, that succs.
masak :P 15:35
moritz_ well, Foo::A is a constant
bacek perl6: enum Foo<A B C>; my $a = Foo::A; say ++$a;
p6eval pugs: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/KaehVEyyMC line 1, column 1-16␤»
..rakudo 6c983d: OUTPUT«Method 'succ' not found for invocant of class ''␤current instr.: 'parrot;Perl6Object;' pc 1681 (src/classes/Object.pir:721)␤»
..elf 25441: OUTPUT«Can't locate object method "postcircumfix__60_32_62" via package "Foo" (perhaps you forgot to load "Foo"?) at (eval 122) line 3.␤ at ./elf_h line 4346␤»
bacek perl6: enum Foo<A B C>; my $a = Foo::A; $a++; say $a;
p6eval elf 25441: OUTPUT«Can't locate object method "postcircumfix__60_32_62" via package "Foo" (perhaps you forgot to load "Foo"?) at (eval 121) line 3.␤ at ./elf_h line 4346␤»
..rakudo 6c983d: OUTPUT«Method 'succ' not found for invocant of class ''␤current instr.: 'parrot;Perl6Object;' pc 1681 (src/classes/Object.pir:721)␤»
..pugs: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/G1pcWv5YsO line 1, column 1-16␤»
bacek perl6: enum Foo<A B C>; my $r = Foo::A..*:by(-7); say $r[1,,3] 15:36
perl6: enum Foo<A B C>; my $r = Foo::A..*:by(-7); say $r[1..3]
p6eval elf 25441: OUTPUT«Parse error in: /tmp/g2Lz6M9gli␤panic at line 1 column 41 (pos 41): No previous operator visible to adverbial pair ([#<Match:0x83a4744 @on_str="enum Foo<A B C>; my $r = Foo::A..*:by(-7); say $r[1,,3]", @from=34, @to=41, @bool=true, @hash={:value=>#<Match:0x83a4780 @on_str="enum
..F...
..pugs: OUTPUT«*** ␤ Unexpected "by"␤ expecting term postfix or operator␤ at /tmp/qT6u7QhQ4y line 1, column 36␤»
..rakudo 6c983d: OUTPUT«Statement not terminated properly at line 1, near ":by(-7); s"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
pugs: OUTPUT«*** ␤ Unexpected "by"␤ expecting term postfix or operator␤ at /tmp/T06HXX2qiV line 1, column 36␤» 15:37
..elf 25441: OUTPUT«Parse error in: /tmp/QyNPsnY2MW␤panic at line 1 column 41 (pos 41): No previous operator visible to adverbial pair ([#<Match:0x83a45c8 @on_str="enum Foo<A B C>; my $r = Foo::A..*:by(-7); say $r[1..3]", @from=34, @to=41, @bool=true, @hash={:value=>#<Match:0x83a4668 @on_str="enum
bacek std: enum Foo<A B C>; my $r = Foo::A..*:by(-7); say $r[1..3]
p6eval ..F...
..rakudo 6c983d: OUTPUT«Statement not terminated properly at line 1, near ":by(-7); s"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
std 25441: OUTPUT«can't create lex/STD/infix__S_332DotDot_02.store: Permission denied at Cursor.pm line 551␤FAILED 00:02 33m␤»
bacek but this is correct syntax AFAIU. 15:38
moritz_ std: enum Foo<A B C>; my $r = Foo::A..*:by(-7); say $r[1..3]
p6eval std 25441: OUTPUT«Undeclared name:␤ Foo::A used at 1 ␤ok 00:05 39m␤»
bacek std: enum Foo<A B C>; my $r = Foo::A .. *:by(-7); say $r[1..3]
jnthn Heh, std doesn't understand enums?
p6eval std 25441: OUTPUT«Undeclared name:␤ Foo::A used at 1 ␤ok 00:02 35m␤»
jnthn Or at least register type names...
15:39 pmurias joined
bacek std: enum Foo <A B C>; my $r = Foo::A .. *:by(-7); say $r[1..3] 15:39
p6eval std 25441: OUTPUT«Undeclared name:␤ Foo::A used at 1 ␤ok 00:02 35m␤»
bacek yak...
Matt-W std: class Foo { }; Foo.new;
p6eval std 25441: OUTPUT«ok 00:02 33m␤»
Matt-W well it can handle class names
an enum thing?
or maybe it doesn't actually care there
bacek std: package Foo {}; Foo->new 15:40
p6eval std 25441: OUTPUT«############# PARSE FAILED #############␤Obsolete use of -> to call a method; in Perl 6 please use . instead at /tmp/GABJAqFBis line 1:␤------> package Foo {}; Foo->new␤FAILED 00:02 33m␤»
bacek std: package Foo { class Bar {} }; Foo::Bar->new 15:41
p6eval std 25441: OUTPUT«############# PARSE FAILED #############␤Obsolete use of -> to call a method; in Perl 6 please use . instead at /tmp/JbcMmb6X9T line 1:␤------> package Foo { class Bar {} }; Foo::Bar->new␤FAILED 00:02 33m␤»
bacek std: package Foo { class Bar { method new {} } }; Foo::Bar->new
p6eval std 25441: OUTPUT«############# PARSE FAILED #############␤Obsolete use of -> to call a method; in Perl 6 please use . instead at /tmp/WBmxhwxSin line 1:␤------> lass Bar { method new {} } }; Foo::Bar->new␤FAILED 00:02 33m␤»
bacek std: package Foo { class Bar { method new {} } }; Foo::Bar.new
p6eval std 25441: OUTPUT«Undeclared name:␤ Foo::Bar used at 1 ␤ok 00:02 33m␤»
bacek perl6: package Foo { class Bar { method new {} } }; Foo::Bar.new 15:42
p6eval pugs: OUTPUT«*** No such subroutine: "&Foo::Bar"␤ at /tmp/Np5QG7YeLZ line 1, column 46 - line 2, column 1␤»
..elf 25441: RESULT«undef␤»
..rakudo 6c983d: RESULT«[]»
15:46 alester joined
pmichaud good morning, all. 15:50
diakopter pmichaud: morning! 15:51
pugs_svn r25442 | pmurias++ | [mildew] removed mildew/t/hacks/out.t as testing hacks the test suit doesn't need to use doesn't seem sensible
PerlJam buenos dias pm
how are things? 15:52
pmichaud looking better. :-)
Matt-W hey pmichaud
masak morrn' pmichaud 15:53
moritz_ pmichaud: do you want to continue with the spectest-progress.csv updates, or should I fill in the gap?
pmichaud moritz_: I'm working on that right now, actually.
moritz_ pmichaud: ah, great
pmichaud I had to get the magic incantation for gitting a repo by date (bacek++ for the answer) 15:54
moritz_ which one do you use?
pmichaud getting the historical values since Jan 29 is going to be a process of matching rakudo versions with parrot versions
oops
10:23 <bacek> "git checkout `git log --reverse --since="2009-02-01"|head -1|cut -f2 -d' '`" 15:55
based on that.
although I might go with --until instead of --reverse --since :-)
(or maybe it's --before)
moritz_ git-rev-list -n1 --before=2009-02-08 HEAD 15:56
pmichaud that seems to work also. 15:57
I'm also going to try optimizing the process a bit by not building all of the intermediate Parrot versions. 15:59
so I just need the versions where Parrot made a significant change.
moritz_ I don't think you need many parrot updates at all 16:00
jnthn morning, pmichaud :-)
pmichaud well, there was the change on Feb 3 where Parrot changed the name of all of its internal string functions. 16:01
moritz_ ah right
pmichaud I'm hoping I can get away with just the Feb 3 version of Parrot and the current one.
jnthn pmichaud: Don't think I'll get to do much Parrot stuff today. Ongoing sub-optimal health, Slovak class and PM meeting tonight between them haven't left me with much free moments.
pmichaud we'll see. I'll commit intermediate progress on it so all can see that it's taking place.
jnthn: no problem, you did great work yesterday.
16:01 iblechbot left
pmichaud I'm looking at getting 'is export' to work today. 16:02
(at least for the default setting)
jnthn That would be awesome.
pmichaud the rest of my rakudo day, and most of the plane rides tomorrow, is going to be spent writing articles and documentation, I think.
jnthn pmichaud: I did think over a bit planning for List and Array going into the prelude and becoming parametric roles.
alester morning all 16:03
pmichaud jnthn: okay, anything significant? Also, should we be figuring out laziness then too?
jnthn I don't want to do major changes in terms of what processing it does, etc. Just re-structuring.
alester pmichaud: Anything we can put up on dru?
jnthn Basically:
pmichaud alester: yes, dru is one of the things I'm wanting as well.
alester I'm working tofigure out how to keep revisions
jnthn 1) We use ResizablePMCArray for storage, but stop inheriting from it. So we make it an attribute. Change most things that twiddle with self to twiddle with that. 16:04
pmichaud alester: I'm not too worried about keeping revisions. But if we are keeping revisions, we should use git to do it. I can set up another repo on github for it.
jnthn All that is done in the PIR.
alester pmichaud: No, no, Drupal keeps revision history.
jnthn Make sure we're still passing spectests at that point etc...
pmichaud alester: okay.
alester Like when making changes to wiki pages.
jnthn 2) Make a ResizablePMCArray proto-object in some Parrot:: namespace or somewhere out of the way. 16:05
16:05 eternaleye left
jnthn 3) Start porting it to Perl 6 as a class at first. Do this completely. 16:05
4) Once we're happy nothng broke in steps 1 to 3, s/class/role [::T] 16:06
And then start putting T on various parameters.
And then we should be done.
Sound workable?
pmichaud I don't have any major problems with it (more)
I suggest we do each step in its own branch.
since TEH AWESOME GIT is supposedly great at merging, this shouldn't be an issue. 16:07
so, step 1 in branch, merge, step 2 in branch, merge, etc.
alester There are four FQ items that show red that make me sad.
jnthn I was thinking these were small, incremental enough steps that we shouldn't need to branch...but if it makes you more comfortable, I'm happy to do it that way.
pmichaud it would make me more comfortable, yes. 16:08
jnthn OK. I'll learn how to make branches in TEH AWESOME GIT.
PerlJam almost anything is better at merging than svn
moritz_ jnthn: 'git-checkout -b newbranchname'
PerlJam jnthn: git checkout -b new_branch
jnthn ...anyone else? ;-)
moritz_ ;-)
pmichaud they're small, but stuff based on RPA is so pervasive throughout the code (e.g., slurpy params) that it's a bit more involved than what you described.
same for Hash 16:09
jnthn pmichaud: Yes, true. There may well be surprises.
Yeah, I planned to do Array and List, to get the experience of What Can Go Wrong.
masak jnthn: git co -b new_branch old_branch
pmichaud in particular, since Match is really based on both RPA and Hash, we might end up with some big surprises.
jnthn masak: :P 16:10
pmichaud: Yeah...true.
pmichaud I just expect that 3 of the 4 steps you outlined will have a surprise waiting for us. (No, I don't know which 3.)
PerlJam idly wonders if everyone has the "co" alias for "checkout"
pmichaud "co" didn't work for me at one point.
16:10 Eevee joined
PerlJam you need to configure the alias in ~/.gitconfig 16:11
masak yes, you need an alias.
but boy, is it worth it!
PerlJam here's the first few lines of my .gitconfig
[alias] ci = commit st = status co = checkout br = branch 16:12
(you'll have to imagine the newlines, sorry)
pmichaud PerlJam: maybe add that to the wiki somewhere? ;-)
PerlJam which wiki. there are so many (still)
masak yeah, people should stop making new wikis. :P 16:13
dukeleto perl6: say 42
p6eval elf 25442, pugs, rakudo 6c983d: OUTPUT«42␤»
dukeleto yay
perl6: say (10).log 16:14
p6eval pugs: OUTPUT«2.302585092994046␤»
..elf 25442, rakudo 6c983d: OUTPUT«2.30258509299405␤»
pmichaud in spectest-progress.csv, since we no longer have an svn revision number, what should I use for that column? The (short) git id?
PerlJam: I was thinking the github wiki for rakudo.
dukeleto perl6: say (10,20).log
moritz_ pmichaud: yes
p6eval elf 25442: OUTPUT«Useless use of a constant in void context at (eval 120) line 3.␤2.99573227355399␤»
..pugs: OUTPUT«0.6931471805599453␤»
..rakudo 6c983d: OUTPUT«0.693147180559945␤»
masak pmichaud: aye, I'd do that.
alester Is this anything obvious? sial.org/pbot/35131
masak perl6: say 42.new
alester I get it on my Linux box, but not my Mac
p6eval pugs: OUTPUT«<obj:Int>␤»
..elf 25442: OUTPUT«Can't locate object method "Str" via package "42" at ./elf_h line 736.␤ at ./elf_h line 4346␤»
..rakudo 6c983d: OUTPUT«0␤»
pugs_svn r25443 | pmurias++ | [mildew] &foo(...) works
pmichaud alester: try doing a make realclean
(for rakudo)
alester pmichaud: Done a million times 16:15
masak should 42.new really evaluate to 0?
jnthn Probably.
pmichaud masak: it's the same as Int.new
PerlJam alester: feels like you've a missing quote elsewhere.
masak pmichaud: ok.
pmichaud PerlJam: no, I've seen that error many times.
masak rakudo: say 42.clone
p6eval rakudo 6c983d: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
pmichaud it usually indicates that rakudo and parrot have somehow gotten out of sync. 16:16
moritz_ alester: I always get that if I remake parrot and don't clean rakudo
dukeleto perl6: say log10(0), log(0)
p6eval pugs: OUTPUT«-Inf-Inf␤»
..elf 25443: OUTPUT«Undefined subroutine &GLOBAL::log10 called at (eval 121) line 3.␤ at ./elf_h line 4346␤»
..rakudo 6c983d: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
moritz_ alester: 'make realclean' inparrot doesn't clean rakudo anymore
PerlJam can rakudo be taught to "make realclean" parrot though?
alester wow, look, it works.
OK, so noted, thanks.
dukeleto perl6: say log(0)
p6eval rakudo 6c983d: OUTPUT«Can't take log of 0␤␤» 16:17
..pugs: OUTPUT«-Inf␤»
..elf 25443: OUTPUT«Undefined subroutine &GLOBAL::log called at (eval 120) line 3.␤ at ./elf_h line 4346␤»
pmichaud PerlJam: rakudo's configure.pl knows to do that, if using the --gen-parrot option.
alester soon I'll actually be able to use rakudo to do something useful.
so do you wanna know about my new double-linked-list glib error? 16:19
moritz_ I see a new file called perl6_s1.pbc - is that a product of the new setting/? 16:20
masak alester: oh, absolutely!
jnthn moritz_: Yes
alester how?
moritz_ if so, I'll gitignore it
pmichaud moritz_: it's the stage 1 compiler.
[particle] considers writing sprintf in perl6
pmichaud yes, gitignore it, please.
masak alester: nopaste?
dukeleto does anybody else think that log(0) should return -Inf, like log10() does ? I did, so I updated that in my github fork. Perl 5 throws an exception, but no other arithmetic function does this. I seems a lot easier to catch an Inf than eval a statement that may have a log(0) buried in it
jnthn moritz_: Ah, OK.
alester masak: OK
jnthn moritz_: Also src/gen_setting.pm and src/gen_setting.pir then
masak dukeleto: you have a point.
pmichaud dukeleto: log(0) can return a Failure object.
note that many things in Rakudo that currently throw exceptions should in fact be returning Failure 16:21
masak dukeleto: what does S29 say about it? it's kinda canon.
dukeleto pmichaud: but -Inf makes a lot more sense
[particle] dukeleto: log(0) is undefined, not -Inf
dukeleto masak: I will look in S29
pmichaud dukeleto: my point is that in general it won't be necessary to eval to catch the exception.
masak dukeleto: oh, [particle] is right, btw.
[particle] nothing raised to any power can produce 0
dukeleto particle: but it *is* defined. It is just infinite.
masak dukeleto: how do you figure that? 16:22
alester sial.org/pbot/35132
dukeleto limit of log(x) as x goes to 0 is mathematically -Infinity
moritz_ perl6: say log(0)
masak dukeleto: a limit is not the value of the function.
p6eval rakudo 6c983d: OUTPUT«Can't take log of 0␤␤»
..pugs: OUTPUT«-Inf␤»
..elf 25443: OUTPUT«Undefined subroutine &GLOBAL::log called at (eval 120) line 3.␤ at ./elf_h line 4346␤»
dukeleto as x approaches from the right
moritz_ perl6: say 1/0
masak dukeleto: I agree about the limit...
pmichaud by that same argument, 3/0 should produce +Inf
p6eval rakudo 6c983d: OUTPUT«Divide by zero␤current instr.: 'infix:/' pc 21340 (src/builtins/op.pir:194)␤»
..pugs: OUTPUT«*** Illegal division by zero␤ at /tmp/BfUQnOBlE8 line 1, column 5 - line 2, column 1␤»
..elf 25443: OUTPUT«Illegal division by zero at (eval 119) line 3.␤ at ./elf_h line 4346␤»
pmichaud and I don't think that 3/0 should produce +Inf 16:23
masak pmichaud: no, because the (bidiractional) limit x/0 is not defined.
moritz_ pmichaud: that's a bit different, because in that case you can have limits from either side, yielding -Inf and +Inf
masak pmichaud: what moritz_ said.
moritz_ what masak said ;-)
dukeleto i am trying to make log(x) work for complex numbers as well 16:24
masak good luck :)
moritz_ it's not that hard
16:24 frew_ left
dukeleto and being a math nerd, it seems a lot more useful to have log(0) = -Inf, just sayin' 16:24
masak it's a can of worms, if you ask me.
moritz_ every complex number can be written as c = a * exp(i p)
16:24 frew_ joined
moritz_ so log(c) = log (a * exp(i p)) = log (a) + i p 16:24
16:24 ejs2 left 16:25 mikehh left
moritz_ where 0 <= p < 2 * pi by convention 16:25
masak moritz_: ok. I seemed to recall that the convention wasn't universal.
if it is, then it's not a can of worms.
maybe sqrt() is worse.
moritz_ masak: we've discussed on p6l to some length... 16:26
dalek kudo: 6445d09 | (Moritz Lenz)++ | t/spectest.data:
four more passing spectests
kudo: 00e9db4 | (Moritz Lenz)++ | .gitignore:
ignore perl6_s1.pc and src/gen_settings.pm
moritz_ masak: and TimToady said that this convention is universal for Perl 6 ;-)
masak moritz_: ok.
dukeleto moritz: I asked larry about complex branch cuts a long time ago, I think he decided on something, but I will have to look in the test suite to see what it is
16:26 Tene joined
moritz_ dukeleto: what I just wrote 16:26
dukeleto moritz_: sounds good to me 16:27
moritz_ he also suggested chokingly to have it return an infinite junction of all branches
now *that* would be can for worms...
dukeleto moritz: sure, that can be an optional pragma :) 16:28
masak I'd rather that not be an optional anything. :) 16:29
moritz_ use all <memory insanity>;
like this? ;-) 16:30
masak well, it'd have to be a _lazy_ infinite bidirectional junction of branch cuts, but still :P
jnthn Junctions aren't lazy AFAIK.
masak good.
moritz_
.oO( lazy quantum computing )
16:31
I wonder if Schrödinger's cat was as lazy as Garfield ;-)
masak I'm glad there's still a contradiction left between us and insanity. :)
pmichaud isn't "lazy quantum computing" actually how the universe works? ;-)
moritz_ masak: a tiny one ;-)
16:31 Tene__ joined
alester masak: Does that nopaste give you anything interesting? 16:31
pmichaud i.e., the outcome isn't decided until we look for the answer? that sounds like laziness to me :-)
dukeleto so, the reason this matters is that for negative whole numbers, log(x) is either + or -Inf (even or odd). It makes a ton of sense to make log(0) = -Inf if log(x) is going to take negative numbers as well 16:32
masak moritz_: have you seen abstrusegoose.com/7 ? :)
moritz_ masak: not yet
pmichaud: pretty much, yes
dukeleto no mathematician ever uses two definitions of branch cut in the same problem
masak alester: what nopaste?
moritz_ lol 16:33
alester masak: sial.org/pbot/35132
dukeleto but occasionally you may want to know about multiple sheets in the Riemann surface. This is a job for a CAS built on Perl. I'm working on it....
masak alester: well, I can say I've had the same error at least once :)
16:34 skids left
masak dukeleto: cool. 16:34
moritz_ dukeleto: I couldn't convince anybody to build a CAS into Perl 6 core ;-)
masak "everybody wants the core" 16:35
alester CAS?
masak alester: unable to reproduce your error.
alester Well, good, then it must not be real! :-)
moritz_ alester: computer algebra system
16:35 frew_ left 16:36 autarch joined, skids joined
dukeleto alester: Computer algebra system 16:36
masak alester: Computer algebra system. 16:37
[particle] alester: Computer algebra system
16:37 FurnaceBoy joined
[particle] :) 16:37
dukeleto moritz_: I want complex matrices part of core at least. No one wants to maintain Math::MatrixReal (except me) and no one ever wrote Math::MatrixComplex
moritz_ dukeleto: your chances are rather slim 16:38
16:38 frew_ joined
[particle] why does it need to be core? 16:38
dukeleto particle: it doesn't
alester Does it mean computer algebra system?
[particle] it can be part of all distros
masak core is overrated.
dukeleto particle: we need a concept between CORE and CPAN
[particle] ...and still not be core. 16:39
autarch is this valid P6 ... new Date( :year(2008), :month(1), :day(10) )
[particle] Date.new(...)
autarch ah, of course
moritz_ indirect method syntax is gone
[particle] and the peasants rejoice.
autarch yah, that was a cut & pasteo
16:39 frew_ left
skids particle: "base"? 16:39
masak or new: Date, ...
dukeleto the Factor language has a concept of CORE which is only the vm and what is necessary to pull down other stuff. Then there is "basis" which is kind of like "stuff at least 80% of people will need". Then they have "extra", which is like CPAN 16:40
autarch is there a standard for method names in P6 core bits? is it day_of_week, dayOfWeek, dayofweek?
16:40 frew_ joined
autarch (and I really hope it's the first) 16:40
pmichaud readline would seem to indicate the last
dukeleto I think matrices are in the 80% category, but not in core 16:41
masak alester: go with the first, I'd say.
autarch and is there some concept of private attribute with public readers?
masak autarch: yes. 16:42
dukeleto if matrices did not require extra perl modules a lot more people would use them, making code easier to read and the world will rejoice. Or something.
16:42 Tene_ left
autarch meta: I'm taking a look at the datetime stuff in S32 and trying to make it simple and sane 16:42
moritz_ alester: day-of-week is best IMHO
masak autarch: has $.attr;
moritz_ I meant autarch, sorry
alester moritz_: I don't know what you're saying.
autarch moritz_: with dashes?!
alester oh, ok
moritz_ alester: I autocompleted wrong, sorry
autarch: yes
masak likes day-of-week too
pmichaud fwiw, nearly all of the synopses do not use the underscores
autarch wow, that's legal?
moritz_ they are allowed in identifiers, so we should use them
masak autarch: it's quite a recent change. 16:43
autarch ok
moritz_ rakudo: sub day-of-week { say "Thursday" }; day-of-week()
masak day'of'week is legal, too :P
autarch yeah, it reads well that way
16:43 Tene left
p6eval rakudo 00e9db: OUTPUT«Thursday␤» 16:43
pmichaud okay, I take it back -- there are some underscore method names in synopses
skids autarch: along with ' too. But not usable at beginning or end like _
moritz_ pmichaud: we should get rid of them
pmichaud personally I prefer without underscores or hyphens.
for consistency.
autarch pmichaud: dayofweek is nasty
pmichaud if we're going to do day-of-week, then perhaps we also need read-line, is-writable, max-path, etc. 16:44
read-pipe
moritz_ maybe I should write a mail to p6l ;-) 16:45
skids "weekday"?
skids hides
autarch pmichaud: I think there's a difference in things based on existing Unix conventions, and stuff that's pulled out of butt
DateTime.pm uses day_of_week, so there's your convention ;)
masak skids++
pmichaud afaict, "based on existing unix conventions" isn't a strong attractor in Perl 6. 16:46
16:46 drbean left
autarch pmichaud: well, then based on existing Perl 5 conventions 16:46
pmichaud .callwith, .callsame, .nextwith, .nextsame 16:47
skids There's something to be said for sticking to nomenclature from a standard that a module is implementing, but not if it is onerous. E.g. Net::SNMP internals (gah).
autarch well, I'll use day-of-week and @Larry can change it later ;)
dukeleto pmichaud: it's definitely a fat fractal
[particle] it's more of a strange attractor
pmichaud one of the goals of Perl 6 is to eliminate the need for memorizing lists of exceptions
16:48 ron_ joined
pmichaud and in many places, that trumps "based on existing Perl 5" 16:48
autarch I just don't think noseperator scales very well
pmichaud fair enough -- I just expect we should get some opinion from p6l, or at least @Larry.
16:49 frew_ left
autarch yeah 16:49
16:49 frew_ joined
pmichaud I know that in the parrot world, underscore versus no-underscore bites me all over the place. It's definitely a place where I have to keep a memorized list of exceptions. 16:49
autarch like I said, I'll do it this way for now, I don't consider anything _I_ say final
skids A while ago I was wondering out loud whather it would be possible to have a class's internal namespace available inside method captures for that class at compile time.
autarch but when I do DateTime6 for CPAN it's going to have freaking separators
skids E.g. for constants you generally do not need to use except when calling methods. 16:50
[particle] ${'day of week'} 16:51
16:51 justatheory joined
PerlJam autarch++ day-of-week 16:52
pmichaud if we have separators, I definitely prefer the hyphen to the underscore. :-) 16:53
autarch hyphen is great, I just didn't realize it worked 16:54
wayland: are you gonna get pissed if I cut a huge chunk of S32/Temporal? 16:55
16:56 hanekomu left
PerlJam autarch: hyphens in identifiers is a relatively recent phenomenon. 16:56
16:57 kst left, hercynium joined, ron_ left
pmichaud Tene__: ping 16:58
oops, wrong chan.
autarch is there a built-in delegation syntax for P6? kind of like Moose "handles" 17:01
moritz_ autarch: yes
autarch: and guess what it's called ;-)
autarch handles? 17:02
moritz_ aye
autarch ah, found it
S12 is _so_ freaking huge
moritz_ autarch: ack '\bhandles\b' t/spec/
alester moritz_: ITYM ack -w handles t/spec 17:03
moritz_ especially t/spec/S12-attributes/delegation.t
alester who needs backslashes?
moritz_ alester: another useful thiing learned, thanks ;-)
alester ack --help is useful, too.:-)
moritz_ yes, but too long
I can only remeber one new option at a time 17:04
last time I learned about -Q
Matt-W rakudo: say "{<}"
p6eval rakudo 00e9db: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
moritz_ it's rebuild time again... 17:05
Matt-W hmph
17:05 mikehh joined
Matt-W I'll use my own rakudo then 17:05
if this one doesn't want me
moritz_ anyway, it's a parse error
Matt-W I had feared so
guess what syntax Perl6::Form uses
moritz_ you need single quotes then 17:06
Matt-W hmm
it'd be nice if it was something that was safe to use in double-quoted strings
moritz_ what about [<] then?
Matt-W it uses [ and ] for other things 17:07
moritz_ meh
Matt-W [[[[[[[[[[[] looks very strange :)
moritz_ it does
Matt-W I think all the brackets are taken :(
moritz_ even <<>>?
ah, yes
17:08 dukeleto left
autarch if I want to specify that an attribute does a role ... 17:09
has { does Temporal::Date } $!date;
?
autarch just makes up some syntax ;)
moritz_ has Temporal::Date $!date 17:10
autarch oh, that's simple
moritz_ that does a type-conformance check
which works for both is and does
autarch cool 17:12
Perl 6 is great!
masak we like to think so, too.
moritz_ it is indeed
which is why I spend so freakin' much time on it 17:13
(and because the people that group around Perl 6 are also great)
masak moritz_: that's because stupid people come later in the adopter cycle. 17:14
justatheory Is perlcabal.org/syn/ still the canonical location for Perl6 documentation?
masak justatheory: aye.
justatheory ta
masak np
17:14 hanekomu joined
autarch is $number.sprintf('%02d') the best way to do that? 17:17
masak autarch: $number.fmt("%02d") 17:20
autarch k 17:21
Matt-W mumbles darkly about putting comments in horribly complicated code 17:23
moritz_ masak: I don't think it's primarily intelligence - mostly attitude 17:25
masak moritz_: hm... you have a point.
but I'm unable to think of how to tell the difference. 17:26
17:26 IllvilJa left
autarch our Time multi gmtime == multi gmtime returns Time ? 17:29
moritz_ autarch: aye
[particle] pmichaud: what are you looking for in the rakudo setting? new unimplmented functions, or reimplementations of current pir functions? both? i have Str.perl, for example.
moritz_ rakudo: say *.perl 17:30
p6eval rakudo 00e9db: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
17:31 oskie joined 17:34 Lorn joined
pmichaud [particle]: anything that can be reasonably written in p6 is a candidate for setting code. 17:34
[particle] ok then.
pmichaud this includes re-implementations of current pir stuff. 17:35
note, however, that 'is export' doesn't work yet.
[particle] the exporting works, but not the importing.
pmichaud right, that's what I mean.
[particle] yep
pmichaud I'm working on that today/now.
[particle] i believe we have everything in place to do it now, yes?
pmichaud yes.
alester So how do I manually merge someone's commit? 17:36
pmichaud I just have to write the code to do the importing.
alester I'm trying to figure why github.com/rakudo/rakudo/commit/3c5...4d270cfb6c won't merge for me.
[particle] yeah, shouldn't be too much code
pmichaud alester: yesterday we discovered that http:// addresses for github aren't working.
alester well,
pmichaud it's a known github problem/issue.
alester aside from that
pmichaud if you switch to using git:// then everything works fine.
autarch is stringification overloading done by defining an infix:{'~'} method?
alester pmichaud: but I'm talking about doing the merging in the FQ screen 17:37
pmichaud autarch: define a 'Str' method
alester not from the CLI
pmichaud alester: okay, I don't know about that part.
autarch pmichaud: and a Num method for numification?
moritz_ rakudo: class A { method Str { "A's String" } }; say A.new
p6eval rakudo 00e9db: OUTPUT«A's String␤»
pmichaud autarch: yes, but I'm not sure if Num overloading is implemented in Rakudo yet.
alester pmichaud: You manually merge everything from the CLI?
pmichaud alester: I haven't had to do many merges yet.
moritz_ same here
autarch pmichaud: I'm just working on a spec
alester pmichaud: How are you getting our commits from our forks?
pmichaud alester: I haven't had to do that yet. 17:38
17:38 Util left
pmichaud alester: I've been busy focusing on getting the build system working. 17:38
alester pmichaud: Somehow you are, because things that have been on my forks are in the main rakudo/rakudo.
pmichaud alester: then I'm not the one who did those. :-)
alester oooh, ok.
moritz_ it works with git-fetch + git-cherry-pick + git-push
alester: I might have merged one of your commits 17:39
hope that's OK
(copyright-wise etc.)
alester that's fine, yes.
moritz_: so how do I get that commit from rakudo/rakudo to my fork? 17:40
git-cherry-pick 3c5ea038edbcfd5ab2c91a0cdbd8ec4d270cfb6c doesn't seem to do anything
uniqua:~/rakudo : git-cherry-pick 3c5ea038edbcfd5ab2c91a0cdbd8ec4d270cfb6c
Finished one cherry-pick.
# On branch master
nothing to commit (working directory clean)
moritz_ well, then it did one cherry-pick
and committed that as a change
git-log should show it
alester shouldn't I see something in git-status then? 17:41
17:41 IllvilJa joined
alester Or does it autocommit it? 17:41
moritz_ it autocommits
unless you tell it not to
alester oooh, ok
17:41 masak left
alester this whole crazy-different workflow is crazy-different. 17:41
moritz_ aye 17:42
but after some getting used to it works astonishingly well
17:42 riffraff joined
pugs_svn r25444 | moritz++ | [t/spec] tests for RT #63330 and RT #63332 17:45
17:50 ron_ joined 17:52 skids left, nihiliad left, cls_bsd left, Caelum left, r0bby left
autarch alright, checked in a big rewrite of the S32/Temporal spec 17:53
17:54 iblechbot joined, skids joined, nihiliad joined, cls_bsd joined, Caelum joined
autarch or not 17:55
apparently I don't have commit to pugs any more?
moritz_ takes a look
autarch has $.hour is ro? 17:57
moritz_ it's ro by default 17:58
autarch yay
moritz_ autarch: [email@hidden.address] (administrator, pending) 17:59
autarch: does that look sane?
or should I re-submit your email address?
autarch that's the right email 18:00
maybe I just don't know my pw
moritz_ I've re-sbumitted it
should should get a password email real soon
18:01 ron_ left 18:11 zamolxes joined
autarch moritz_: yep, all set, just checked in my spec changes 18:14
moritz_ autarch++ 18:15
pugs_svn r25445 | autarch++ | This is a very drastic revision (hopefully this won't turn into a revert war ;)
r25445 | autarch++ |
r25445 | autarch++ | Here's the changes in summary:
r25445 | autarch++ |
r25445 | autarch++ | removed all references to ...
r25445 | autarch++ |
r25445 | autarch++ | Locales, including eras, which come from a locale - this is a vast and complicated domain
r25445 | autarch++ |
r25445 | autarch++ | Alternate calendars - also vast and complicated
r25445 | autarch++ |
r25445 | autarch++ | String parsing of any sort - ditto, see the pattern here? ;)
r25445 | autarch++ |
r25445 | autarch++ | Format specifiers - this could come from locales (CLDR specifies this)
r25445 | autarch++ | or strftime, but again, it's more complicated than is needed
r25445 | autarch++ |
r25445 | autarch++ | Comparing dates or times to durations - this just doesn't make
r25445 | autarch++ | sense. Is 2009-02-23 greater or less than 5 days?
r25445 | autarch++ |
r25445 | autarch++ | Any sort of date or time math
r25445 | autarch++ |
r25445 | autarch++ | Added iso8601 output for every role, and made that the
r25445 | autarch++ | stringification. ISO8601 is unambiguous world-wide, easy to read, and
r25445 | autarch++ | easy to output.
r25445 | autarch++ |
r25445 | autarch++ | Renamed Temporal::Instant to Temporal::DateTime 18:16
r25445 | autarch++ |
r25445 | autarch++ | Got rid of Temporal::Subsecond and just made Temporal::Time allow for
r25445 | autarch++ | sub-second resolutions. Not sure if this is best done with an
r25445 | autarch++ | $.attosecond attribute or as a decimal number.
r25445 | autarch++ |
r25445 | autarch++ | Renamed Temporal::Timezone to Temporal::TimeZone::Observance. The
r25445 | autarch++ | latter is a simple thing which represents the offset, isdst flag, and
r25445 | autarch++ | short name for a given local time. This information should be
r25445 | autarch++ | available on all supported platforms. TimeZones themselves are
autarch gah, sorry
pugs_svn r25445 | autarch++ | complicated and very much platform-dependent. Better to leave this as
r25445 | autarch++ | a separate CPAN6 distro.
r25445 | autarch++ |
r25445 | autarch++ | Got rid of all mutating operators on everything. The built-ins should
autarch karma autarch
pugs_svn r25445 | autarch++ | be immutable for simplicity.
r25445 | autarch++ |
r25445 | autarch++ | Added numification overloading for Temporal::DateTime, which gives us
r25445 | autarch++ | comparison for free.
PerlJam Has it ended? 18:17
pmichaud comes down from the tree he climed to avoid the flood.
*climbed
pmichaud wanders off to lunch.
autarch was I supposed to do something to avoid that?
pmichaud we normally go for shorter commits messages, I think.
moritz_ well, but if it needs to documented, do it
pmichaud agreed. 18:18
autarch I made big changes, I didn't want to make my message "drastic revision of datetime stuff"
moritz_ autarch: ignore the nay-sayers ;-)
pmichaud I think it's reasonable. we should probably get the bot to do some flood control.
i.e., don't count me as a 'nay sayer' here :-)
autarch just have the bot include the first 3 lines and no more or something
moritz_ especially it should ignore empty lines
PerlJam Well, this is why I think the bot(s) should just do a short summary of the commit message anyway 18:19
pmichaud 5 lines would be okay for me.
I do wish we could get the automatic-email-to-p6l to give better subject lines, though.
Re: t/docs/Spec isn't proving to be very easy to find messages.
PerlJam (or if we follow the git-way, the first line would be "drastic revision of datetime stuff" and the rest would be the details. Then the bot need only show the first line) 18:20
moritz_ funny thing is, I already implemented a 'first 5 lines only' mechanism, but I screwed up the usuage of splice() ;-) 18:21
18:21 pugs_svn left, pugs_svn joined
frew_ rakudo: 1; 18:23
p6eval rakudo 00e9db: RESULT«1»
moritz_ hopefully fixed
frew_ rakudo: [\+] 1,1,2,3;
p6eval rakudo 00e9db: OUTPUT«Syntax error at line 1, near "[\\+] 1,1,2"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
frew_ rakudo: [\+] (1,1,2,3);
p6eval rakudo 00e9db: OUTPUT«Syntax error at line 1, near "[\\+] (1,1,"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
frew_ rakudo: [+] 1,1,2,3;
p6eval rakudo 00e9db: RESULT«7»
moritz_ frew_: triangle reduce ops are not yet implemented 18:24
frew_ apparently
that's sad
moritz_ frew_: bacek++ submitted a patch for that, but it waits for review
frew_ I just want to do the awesome uh, how does it go: [\+] 1,1,2..Inf 18:25
and that gives the fib sequence?
18:25 fridim_ joined
moritz_ that's simply 1, 1 ... &infix:<+> 18:26
but ... isn't implemented either
both need lazy lists
frew_ still awesome
but if I can't demonstrate it I won't tell them
moritz_ pugs: say [\+] 1,1,2..*
p6eval pugs: OUTPUT«pugs: out of memory (requested 1048576 bytes)␤»
frew_ haha, nice
moritz_ pugs: say ([\+] 1,1,2..*).[0..10] 18:27
p6eval pugs: OUTPUT«pugs: out of memory (requested 1048576 bytes)␤»
moritz_ that wuold work if pugs did lazyness correct
frew_ right
I am surprised it doesn't
Haskell is lazy right/ 18:28
18:28 autarch left
moritz_ it had a lazy backend 18:29
but that bit-rotted
frew_ unsurprisingly
18:30 Psyche^ joined 18:32 araujo joined
pugs_svn r25446 | lwall++ | [inplace.t] missing lparen 18:34
r25446 | lwall++ | [adverbial-modifiers.t] malformed postfix
TimToady [\+] can't do fibonacci 18:37
frew_ Why? 18:38
moritz_ because fibonacci requires feedback? 18:40
TimToady you would need an operator that returns 2 previous results, not one 18:41
18:42 Patterner left, Psyche^ is now known as Patterner
moritz_ std.pm rejects @foo[stuff]:p.value 18:42
TimToady it was playing around with [\+] that led me to propose 1,1...{$^a+$^b} instead
moritz_ is that correct?
TimToady problem is that :p is considered infix, which is past the postfix boundary, i think 18:43
perhaps I can reclassify :p as postfix with optional ws, maybe 18:44
but then that breaks the rule :/
moritz_ well, I don't strongly care either way, just wanted to know
TimToady std: (@foo[$stuff]:p).value
p6eval std 25446: OUTPUT«can't create CORE.pad.store: Permission denied at Cursor.pm line 194␤FAILED 00:02 32m␤»
wolverian > fix ((0:) . scanl (+) 1)
lambdabot [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946...
TimToady showoff 18:45
moritz_ std: (@foo[$stuff]:p).value
p6eval std 25446: OUTPUT«can't create CORE.pad.store: Permission denied at Cursor.pm line 194␤FAILED 00:04 35m␤»
wolverian surely I can write fix in perl 6 too, though
moritz_ meh
std: enum Foo <Bar Baz>; say Foo::Bar 18:46
p6eval std 25446: OUTPUT«Undeclared name:␤ Foo::Bar used at 1 ␤ok 00:02 33m␤» 18:47
TimToady doesn't remember enums yet
moritz_ that's what I wanted to tell you ;-)
18:47 barney joined
TimToady but I already knew that :{P 18:48
moritz_ but I didn't know that ;-)
18:49 FurnaceBoy left
alester what's the preferred way to get tickets into RT? 18:52
Someone mentioned rakudobug, but I don't see it.
moritz_ [email@hidden.address]
send a mail there, and it will appear in RT
18:53 kane_ left
meppl good night 18:53
alester whooo, my first bug. 18:55
18:55 meppl left
alester rt.perl.org/rt3/Ticket/Display.html?id=63346 concerns me a lot. 18:56
We play clever tricks, but Test::Harness ignores the failure. 18:57
19:09 maerzhase left
TimToady ruoso: problem is that lex gets blown away when STD changes, not when CORE.pm changes, so would tend to rebuild more often than necessary, but that's more of a problem with rm -rf lex, which is a crude ax 19:13
19:13 alester is now known as AndyAway
frew_ rakudo: [1,2,3] >>+<<[4,5,6] 19:15
p6eval rakudo 00e9db: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
frew_ pugs: [1,2,3] >>+<<[4,5,6]
p6eval pugs: RESULT«(5, 7, 9)»
frew_ pugs: [1,2,3] >>*<<[4,5,6]
p6eval pugs: RESULT«(4, 10, 18)»
frew_ pugs: [1,2,3] >>/<<[4,5,6]
p6eval pugs: RESULT«(1/4, 2/5, 1/2)»
frew_ pugs: [1,2,3] >>.<<[say,say,say] 19:16
p6eval pugs: OUTPUT«*** ␤ Unexpected ">>.<<["␤ expecting operator␤ at /tmp/R6rxX6T4uA line 1, column 9␤»
frew_ pugs: [1,2,3] >>+<<[i,i,i]
p6eval pugs: OUTPUT«*** No such subroutine: "&i"␤ at /tmp/3bT3xuUpcW line 1, column 15-20␤»
frew_ pugs: [1,2,3] >>.<<[i,i,i] 19:17
p6eval pugs: OUTPUT«*** ␤ Unexpected ">>.<<["␤ expecting operator␤ at /tmp/9nMhbylaqk line 1, column 9␤»
frew_ pugs: [1,2,3].map({ $^foo + i}) 19:18
p6eval pugs: OUTPUT«*** No such subroutine: "&i"␤ at /tmp/AOqPdzenxo line 1, column 15-24␤»
frew_ pugs: [1,2,3].map({ $^foo + 1})
p6eval pugs: RESULT«(2, 3, 4)»
19:25 Exodist joined 19:26 dukeleto joined 19:35 maerzhase joined
skids frew: no hypers for postfix yet but that would be [1,2,3]>>.say 19:41
TimToady no guarantee on order of that 19:42
frew_ rakudo: [1,2,3]>>.say 19:43
skids does (1,2,3).say guarantee order?
p6eval rakudo 00e9db: OUTPUT«Statement not terminated properly at line 1, near ">>.say"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
frew_ pugs: [1,2,3]>>.say
TimToady sure, it's just a list in string context
p6eval pugs: OUTPUT«2␤3␤1␤»
TimToady error above was putting space before a postfix 19:44
skids I guess I meant (1,2,3)>>.say but of course that would be one operand now that you point that out :-) 19:45
TimToady well, or using . as an infix :)
frew_ pugs: (1,2,3)>>.say
p6eval pugs: OUTPUT«2␤3␤1␤»
TimToady hyperops are always allow to execute in any order 19:46
frew_ someone told me that () and [] are effectively the same in perl6
is that true?
TimToady people tell you the darndest things
frew_ they do!
TimToady no, it's not true
frew_ I'm assuming that means not true
moritz_ rakudo: .say for [1, 2, 3]
p6eval rakudo 00e9db: OUTPUT«1 2 3␤»
moritz_ rakudo: .say for (1, 2, 3)
p6eval rakudo 00e9db: OUTPUT«1␤2␤3␤»
frew_ hmm 19:47
moritz_ not quite the same
frew_ can you explain what the deal is here then:
rakudo: [1,2,3].perl
TimToady pugs: my @a = [1,2,3]; say @a.elems # sb 1
p6eval rakudo 00e9db: RESULT«"[1, 2, 3]"»
pugs: OUTPUT«1␤»
frew_ rakudo: (1,2,3).perl
p6eval rakudo 00e9db: RESULT«"[1, 2, 3]"»
frew_ same thing
is .perl wrong?
moritz_ no
TimToady pugs: my @a = (1,2,3); say @a.elems # sb 3
p6eval pugs: OUTPUT«3␤»
moritz_ .perl can't distinguish the two
but that doesn't mean they are the same
TimToady .perl assumes item context 19:48
frew_ ok, so is [] still a reference?
TimToady yes, but don't tell anyone
moritz_ rakudo: .say for (1, 2, 3).item
p6eval rakudo 00e9db: OUTPUT«1␤2␤3␤»
moritz_ TimToady: that's wrong, isn't it?
frew_ so I somehow got the idea that if I do my @a = (1,2,3); foo(@a) foo would get a reference... or something like it 19:49
is that true?
TimToady (1,2,3) is specced to become [1,2,3] in item context
pmichaud rakudo currently converts (1,2,3) to [1,2,3] in scalar scontext
*context
TimToady depends on the signature of foo
skids frew_: perlcabal.org/syn/S02.html#Literals
moritz_ pmichaud: so you agree that my example above is a bug in rakudo? 19:50
TimToady if sub foo (@x) then it gets @x as a ref
pmichaud moritz_: it wasn't clear to me from the spec if item context was sufficient to promote List to Array
TimToady if sub foo (*@x) then it gets the flattened list
pmichaud or if it required scalar context
TimToady there's no such thing as scalar context 19:51
there are scalars...
which, if you assign to one, provides item context
pmichaud okay, I can switch it over. There was some example I saw (either in syn or in spectests) where that didn't seem to be right. 19:52
frew_ so sub foo($bar) gets a reference even if I pass it an array
TimToady if you find the term "scalar context" anywhere in the specs, it's either a ref to Perl 5 or an error
yes
frew_ interesting
pmichaud moritz_: yes, you can file it as a rakudobug 19:53
moritz_ pmichaud: will do
pmichaud and we need tests :-)
moritz_ will also do
TimToady so there's no difference between foo( (1,2,3) ) and foo( [1,2,3] ) in that case
frew_ ok
what about if I pass an array ref into array context?
moritz_ rakudo: .say for @([1, 2, 3]) 19:54
p6eval rakudo 00e9db: OUTPUT«1␤2␤3␤»
moritz_ rakudo: .say for |[1, 2, 3]
p6eval rakudo 00e9db: OUTPUT«1␤2␤3␤»
pmurias dukeleto: re CORE,basis and extra, in Perl 6 we have stuff that's implicitly loaded at the start (Prelude) and explicitly loaded (the CPAN)
frew_ cool
19:55 barney left
Matt-W pmurias: setting, setting, setting 19:55
TimToady scalars never autointerpolate
skids pmurias: in addition to whether it's loaded, there's whether it is "shipped with" 19:56
TimToady dukeleto: complex and matrices are both built-in datatypes
see S09
frew_ so my @foo = (1,2,3); sub bar($baz) { ... }; bar(@foo) is wrong
TimToady that doesn't necessarily imply that all possible matrix operations are built-in
not wrong 19:57
$baz is aliased to @foo
it's just a binding
pmichaud a scalar parameter can bind to basically anything, iirc
TimToady and a scalar can bind to anything
skids pmurias: the two would not necessarily have to be subsets, e.g. perl6 could load-by-default something if it finds it installed, but that might get ugly and just seems wrong.
TimToady gah
pugs_svn r25447 | moritz++ | [t/spec] tests for list in item context 19:58
pmichaud rakudo: say (1.2.3).item.WHAT; 19:59
p6eval rakudo 00e9db: OUTPUT«Statement not terminated properly at line 1, near ".3).item.W"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
moritz_ s/\./,/g
pmichaud rakudo: say (1,2,3).item.WHAT;
p6eval rakudo 00e9db: OUTPUT«Array␤»
TimToady rakudo: say (1,2,3).WHAT 20:00
p6eval rakudo 00e9db: OUTPUT«sh: ./parrot: No such file or directory␤»
moritz_ gah, it's the full hour and parrot rebuilds
TimToady heh, top of the hour
pmichaud we _really_ need to do something about the rebuild sequence.
like, don't do a rebuild if there haven't been any updates. 20:01
especially since parrot changes shouldn't affect rakudo builds (unless build/PARROT_REVISION changes)
TimToady or copy the finished product somewhere right at the end
pmichaud anyway, (1,2,3).WHAT returns List
TimToady (trying not to mention the "i" word...)
what I figgered 20:02
20:02 riffraff left
TimToady which is okay, since it's a mcro 20:02
a
any real method should imply .item though
pmichaud oh, I remember the issue.
TimToady (maybe)
pmichaud with .say for (1,2,3).item
why would that not be 1\n2\n3\n ? 20:03
TimToady rakudo: .say for [1,2,3]
p6eval rakudo 00e9db: OUTPUT«sh: ./parrot: No such file or directory␤»
moritz_ because it's one item over which for iterate
TimToady (1,2,3).item should be equiv to [1,2,3]
moritz_ *iterates
pmichaud yes, but how does that differ from .say for @a ?
TimToady @a interpolates, [] doesn't; I guess I think of it as [] since it's anonymous 20:04
lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
TimToady lambdabot--
pmichaud I know that @a interpolations and [] doesn't, but what distinguishes the two internally?
*interpolates
TimToady I suppose [] is really Scalar of Array 20:05
pmichaud right
that's what Rakudo currently does
so does this mean that .item also implies Scalar of ... ?
i.e., so that (1,2,3).item would return a reference as opposed to just an Array ? 20:06
TimToady lemme think about that
pmichaud that's the issue I kept running into, and why Rakudo ended up doing things the way it does now.
20:07 zamolxes left, alexn_org left
pmichaud Rakudo already does List->Array for .item, at any rate. 20:07
and doing for on an Array should interpolate the array
TimToady don't disagree with that part :)
something about Captures as return values, I think 20:08
pmichaud anyway, I'll annotate the rakudobug
TimToady question is whether .item returns Capture of Array, I think 20:10
where Scalar of Array is just a degenerate case
or it might be that (1,2,3) promotes only to positional Capture in item context 20:13
pugs_svn r25448 | pmichaud++ | [t/spec]: update new .item test with reference to RT ticket. 20:16
20:33 rindolf joined 20:53 iblechbot left
pmurias skids: what's "shipped with" is a packaging issue not a language one 20:54
frew_ enjoys King Cake 20:59
skids pmurias: wrt "base" though maybe thought should be put into a base package that comes with a bundler "use Base" which loads a certain set of libraries, so we don't have use bloat. Those particular modules should probably be held to a higher standard WRT sane exports etc. 21:01
as to what's a "language" issue is depends on whether you view that from a compsci perspective or a lay perspective. 21:02
21:05 jan_ left
pmurias skids: even the same implementations might come in different packages like "a batteries include" one 21:06
21:07 jan_ joined
pmurias and while different implementations are expected to implement the same language a default module set IMHO shouldn't be enforced 21:07
pmichaud after I do git checkout <version> to get to version as of a specific date, how do I get back to the present-day version?
21:09 perlsyntax joined 21:10 perlsyntax left, zamolxes joined
pmurias svn-- # creating it's own problems and made-up error messags 21:13
pugs_svn r25449 | pmurias++ | [mildew] renamed prelude to CORE - part 1 21:15
r25450 | pmurias++ | [mildew] part 2 of last commit - svn asked me to do it that way 21:16
pmurias ruoso: i rename the Prelude to CORE 21:18
* renamed 21:19
21:27 dukeleto left
ruoso later & 21:30
21:30 ruoso left 21:31 alester joined, icwiener joined 21:37 f00li5h is now known as p{erl, p{erl is now known as f00li5h
pugs_svn r25451 | hinrik++ | [S29] fix Pod errors 21:37
21:38 rindolf left
alester FINALLY, got my rakudo/rakudo merged down. 21:49
21:50 icwiener left
cxreg pmichaud: hopefully you've found it by now, but "git checkout branchname" 22:01
pmichaud cxreg: yes, I did. "git checkout master" does what I want.
so, "git checkout master", followed by "git checkout <new-desired-date>"
cxreg: thanks.
cxreg yeah. master is just a branch, nothing special about its name. np.
22:13 pmurias left 22:46 iblechbot joined 22:49 hanekomu left 22:52 wknight8111 joined 22:55 Limbic_Region joined 22:59 alexn_org joined 23:07 skids left 23:17 bacek_ joined 23:27 maerzhase left 23:34 hercynium left 23:39 alester left 23:43 drbean joined 23:47 DemoFreak left
dalek kudo: a74de6a | pmichaud++ | docs/spectest-progress.csv:
First cut of spectest-progress.csv update, more to come.
23:48
23:53 alexn_org left 23:57 s1n1 joined
s1n1 jnthn: ping 23:58
wayland Question for everyone -- if I have an object that needs to have a specific stringification, what do I do? If I make a .toString() method, will it call that? Answers good, doco link even better :)
s1n1 wayland: is it possible to overload the prefix:~ method? 23:59
23:59 User757 joined