»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:01 Guest21759 left 00:16 envi_ joined 00:18 xenu joined, xenu is now known as Guest25510 00:21 alester left 00:22 replore_ joined 00:31 tyatpi left 00:33 noam left, noam joined, wolfman2000 joined 00:39 wolfman2000 left 00:40 Khisanth left, wolfman2000 joined 00:44 thelazydeveloper left 00:46 thou left 00:47 tyatpi joined, scott__ left 00:55 Khisanth joined 01:00 noam left, noam joined 01:03 fgomez left 01:07 whiteknight left 01:13 scott__ joined 01:22 thou joined 01:30 vlixes left 01:50 fgomez joined 01:52 thou left 01:54 tokuhirom left, tokuhirom joined 01:58 tokuhirom left
raiph . 02:04
02:08 ponbiki joined 02:12 lestrrat left 02:13 lestrrat joined 02:16 daemon left, bbkr_ joined, Grrrr joined 02:17 bbkr left 02:18 daemon joined 02:19 simcop2387 left 02:20 simcop2387 joined 02:24 fgomez left 02:25 thou joined 02:30 replore_ left 02:31 fgomez joined, fgomez left, fgomez joined, Guest25510 left 02:37 orafu left 02:38 orafu joined 02:52 jerome_ left 03:02 xenu joined 03:03 xenu is now known as Guest66377 03:18 Guest66377 left 03:20 jaldhar joined 03:23 xenu_ joined 03:28 xenu_ left 03:34 xenu_ joined 03:51 orphu joined 03:56 carlin left, birdwindupbird joined 03:59 kaleem joined 04:04 xenu_ left 04:15 carlin joined 04:29 lorn_ joined 04:30 orphu left 04:34 spaceships left, MContagious joined 04:36 spaceships joined 04:39 xenu joined, xenu is now known as Guest78525 04:41 fgomez left 04:43 Guest78525 left 04:46 lestrrat left, fgomez joined, icwiener joined, lestrrat joined 04:47 fgomez left, fgomez joined
icwiener Hi, I read about boolean types, that there is "bool" (primitive) and "Bool" (object) but for me only the opject type is working as described. Is that info outdated? cog.cognitivity.com/perl6/val.html 04:49
04:49 xenu_ joined 04:52 xenu_ left
sorear icwiener: all current implementations provide a subset of the primitiv e types. 04:53
Rakudo has int, num, and str; Niecza has none (a vacuous subset); I don't know for pugs
04:54 xenu_ joined, skids left 04:58 ponbiki left
raiph icwiener: from that doc: "This document is obsolete. The design of Perl6 has changed in important ways since this was written: refer to the Perl6 documentation efforts elsewhere. These pages will stay up for archival interest only: don't rely on them!" 04:59
icwiener: the specific thing u wrote, and related stuff on that page, contains things that are indeed outdated. 05:00
05:01 spaceships left
raiph icwiener: eg what is called "primitive" in that doc is now "native" 05:01
05:02 vlixes joined
icwiener Hmm, I do not see that info you quoted on that page. 05:02
raiph icwiener: it's back a few pages at the start 05:03
icwiener Ah, I see.
But well, I see so many in parts contradicting info about Perl 6 that it should not surprise me. :D
Hmm, so it is the best to look at the synopses, I guess? 05:04
raiph well, they are almost always the most definitive source 05:07
there are some very well written articles from the last year or two that i think are very helpful for most folk 05:08
05:08 xenu_ left
icwiener Ok, thanks for the help. I will read S02 now since I think I will find an answer there. :) 05:11
05:13 au__ joined, pmichaud_ joined, moritz_ joined 05:14 japhb_ joined, stepnem_ joined, diakopte1 joined, daxim_ joined, apejens_ joined 05:16 au__ left 05:21 orafu left, phenny left, stepnem left, au left, colomon left, japhb__ left, pjcj left, diakopter left, simcop2387 left, ocharles left, _sri left, xinming_ left, sisar left, plobsing left, dbr left, sunnavy left, tkr left, arnsholt left, preflex left, BooK left, szbalint left, fgomez left, REPLeffect left, mtk left, moritz left, daxim left, apejens left, thou left, sporous left, wolong left, jaldhar left, scott__ left, araujo left, cognominal left, felher left, ddima left, clkao left, jnthn left, raiph left 05:22 pjcj joined, orafu joined, fgomez joined, jaldhar joined, thou joined, simcop2387 joined, scott__ joined, REPLeffect joined, ocharles joined, araujo joined, sporous joined, cognominal joined, _sri joined, xinming_ joined, sisar joined, plobsing joined, dbr joined, sunnavy joined, felher joined, tkr joined, ddima joined, arnsholt joined, preflex joined, colomon joined, clkao joined, jnthn joined, BooK joined, szbalint joined, wolong joined, Guest46584 joined, jtpalmer joined, LoRe joined, patch joined, Bucciarati joined, frettled joined, doy joined, bonsaikitten joined, bjarneh joined, Util_ joined, domidumont joined, huf joined, tadzik joined, odoacre_ joined, Tene joined, shachaf joined, takesako joined, kcwu joined, Juerd joined, silug joined, cxreg joined, prammer joined, PZt joined, ingy joined, yves_ joined, Gothmog_ joined, rhr joined, sorear joined, charsbar___ joined, stepnem_ is now known as stepnem 05:27 mtk joined 05:30 au joined 05:31 carlin left 05:33 xenu_ joined 05:35 birdwindupbird left 05:39 icwiener left 05:42 icwiener joined
moritz_ \o 05:42
05:42 moritz_ is now known as moritz 05:52 mdupont left
sorear o/ 05:53
05:55 mdupont joined 05:58 xenu_ left 05:59 carlin joined 06:01 lestrrat left 06:02 lestrrat joined 06:07 wtw joined 06:25 xenu joined 06:26 xenu is now known as Guest88551 06:27 birdwindupbird joined 06:37 birdwindupbird left 06:38 carlin left 06:44 Guest88551 left, birdwindupbird joined 06:45 xenu_ joined 06:52 xenu_ left 07:01 pjcj left 07:04 xenu joined, xenu is now known as Guest95483 07:16 xinming_ left 07:17 Guest95483 left, xinming joined 07:18 xenu_ joined, fglock joined
fglock o/ 07:18
07:19 lestrrat left, pjcj joined 07:20 alvis` left, lestrrat joined 07:24 fhelmberger joined 07:25 xenu_ left 07:30 thou left, xenu_ joined 07:35 apejens_ is now known as apejens 07:46 xenu_ left 07:49 kresike joined 07:50 fgomez left
sorear r: val("perl").rindex("e").say 07:54
p6eval rakudo d9fd17: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&val' called (line 1)␤»
sorear r: say @*ARGV
p6eval rakudo d9fd17: OUTPUT«Dynamic variable @*ARGV not found␤ in method gist at src/gen/CORE.setting:8673␤ in sub say at src/gen/CORE.setting:6556␤ in block <anon> at /tmp/52p1PBwyga:1␤␤»
sorear r: say @*ARGS 07:55
p6eval rakudo d9fd17: OUTPUT«␤»
sorear r: say @*ARGS.perl
p6eval rakudo d9fd17: OUTPUT«Array.new()␤»
07:56 PZt left
dalek pan style="color: #395be5">perl6-examples: 0bbf113 | (Gerhard R)++ | other/bottles.pl:
add 99 bottles of beer, 'official' lyrics
08:03
pan style="color: #395be5">perl6-examples: d147721 | (Gerhard R)++ | other/n-body.pl:
add high-level version of n-body problem
08:06 xenu joined
jnthn morning, #perl6 08:07
08:07 xenu is now known as Guest79618
mikec__ morning jnthn 08:07
moritz \o jnthn 08:08
08:09 birdwindupbird left, sisar left 08:13 sisar joined
moritz jnthn++ # fixing traits + named arguments 08:14
jnthn OK, this one is fun.
r: package A { class Str {}; our sub foo() { return Str.new } }
p6eval rakudo d9fd17: OUTPUT«===SORRY!===␤This type cannot box a native string␤»
08:14 Guest79618 left
jnthn In here, the compiler wants to make a string constant. 08:14
So, it looks up Str.
Apart from you changed the meaning of the Str type in that lexical scope.
moritz so, what's our stance on that? 08:15
jnthn And changed it to something that won't actually work in place of the real Str type.
Well, my stance is "working as designed"
moritz "you told us so"?
08:15 xenu_ joined
moritz ok, +1 08:15
jnthn The box that fails actually is while trying to create a string constant, probably to attach a name ot "foo" or to install it in the package or something. 08:16
moritz jnthn: should I reject it, or will you? 08:17
jnthn moritz: Can leave it with me; I have some Perl 6 tuits today :)
moritz jnthn: ok, great
jnthn: did you spectest the use-arglist branch with your changes?
if it's all passing, any objections to merging?
moritz spectests right now 08:18
jnthn moritz: 2 failures (more)
dalek pan style="color: #395be5">perl6-examples: 1ce1e53 | (Gerhard R)++ | other/n-body.pl:
[other/n-body.pl] use given instead of explicit $_
jnthn One is due to a wrong traits test, I think.
The other one is in the advent integration tests. I mentioned which one last night. 08:19
I think the test is wrong.
Should be easily fixable.
moritz ok
jnthn No objection to merging, but do spectest first to make sure I didn't miss anything :)
moritz ok
jnthn moritz: Did you fix this one: rt.perl.org/rt3/Ticket/Display.html?id=112766 08:24
moritz jnthn: ah, yes. But I don't know if we have test coverage 08:25
will do that after use-malice merge :-)
jnthn \o/ 08:26
bbi15
08:28 dakkar joined
moritz r: role A { method x($?CLASS:U:) { } } 08:32
p6eval rakudo d9fd17: OUTPUT«===SORRY!===␤In signature parameter $?CLASS, it is illegal to use the ? twigil␤at /tmp/878HwYBsll:1␤»
moritz r: role A { method x(::?CLASS:U:) { } }
p6eval rakudo d9fd17: ( no output )
08:32 xenu_ left
icwiener r: my Hash %h; %h.push: 'A' => 1; 08:36
p6eval rakudo d9fd17: OUTPUT«Type check failed in assignment to '$v'; expected 'Hash' but got 'Int'␤ in method _push_construct at src/gen/CORE.setting:5868␤ in method push at src/gen/CORE.setting:5846␤ in block <anon> at /tmp/y4a6RjciG1:1␤␤»
icwiener Ok, so it's not local. :) ... Not implemented yet? 08:37
moritz icwiener: it works as designed
icwiener: you declared a hash that only hold elements of type Hash
icwiener: so it complains that 1 isn't of type Hash 08:38
icwiener Umm ... let me reread something. :)
sorear jnthn: where is the making of a string constant in Str.new? 08:39
moritz sorear: there's a string constant being made for the name of the subroutine foo 08:40
sorear n: class Str { }; say "foo".flip # is jnthn trying to tell me this is wrong? 08:41
p6eval niecza v17-2-gb8fcf85: OUTPUT«oof␤»
sorear in niecza, string constants go for CORE::Str
not MY::Str
moritz hm
sorear (I had to do this because STD contains a class 'Regex' and then tries to use regular expressions inside it.)
08:43 xenu_ joined
icwiener moritz: Oh my. I guess I confused it with other languages' habit to write the type of the variable before its name. :/ 08:43
moritz: Thanks to pointing out my mistake.
moritz icwiener: well, p6 has a distinction between containers and values 08:44
icwiener: if you say my Int $x, then $x is a Scalar which can hold an Int
if you write my Int @x, then $x is an Array which can Int objects
*can hold 08:45
08:46 _Vi left
jnthn r: class Str { }; say "foo".flip 08:46
p6eval rakudo d9fd17: OUTPUT«===SORRY!===␤This type cannot box a native string␤»
jnthn That's also what I'd expect.
icwiener moritz: Yes. As such it does not seem like a distinction. The type bevore the name describes what can be inside. And the "is Foo" declares the type of the variable ... No?
jnthn I guess I could go with the CORE interpretation too; it just seems inconsistent with the way we generally do things in Perl 6.
moritz jnthn: in World.pm, how do I construct a Bool::True?
jnthn And CORE:: feels really wrong.
moritz: You don't. You look up the one that's already there. 08:47
moritz jnthn: how do I do that then?
jnthn moritz: Do you need the object or a PAST node that gets it?
self.find_symbol(['Bool', 'True']) # finds it
Then to get a PAST node to reference it self.get_ref(...) around it
moritz I'm pretty sure that is sometrait should put a True in :$sometrait
08:47 xenu_ left
jnthn sorear: At least it should be SETTING:: 08:47
moritz: I think that dates back to a time before we had Bool::True ;) 08:48
moritz oh, and it's Actions after all, not world
jnthn: sounds sensible
jnthn Oh, if you're doing the trait, you only want find_symbol
not get_ref
moritz right
jnthn As you're calling the trait immediately.
moritz because it's applied right at compile time
08:49 xenu_ joined, _Vi joined
moritz jnthn: question is, can we ever declare a class Str with useful contents with our current semantics? 08:50
jnthn moritz: One easy way would be (though think the name lookup is a bit off at the moment) to subclass CORE::Str 08:51
Alternatively:
r: class Str { has str $!value is box_target; }; say "foo".flip 08:52
p6eval rakudo d9fd17: OUTPUT«Method 'flip' not found for invocant of class 'Str'␤ in block <anon> at /tmp/L2nptDlZQv:1␤␤»
moritz oh nice
jnthn Well, that's basically what happens in BOOTSTRAP.pm :)
sorear jnthn: Part of my logic is that names should not be very magical 08:53
jnthn: You don't override the 'class' declarator by defining an object with the magic name ClassHOW 08:54
dalek ecs: 0079930 | moritz++ | S14-roles-and-parametric-types.pod:
[S14] use :U instead of "where {!.defined}"
jnthn sorear: It has been pondered... :)
sorear I imagine TimToady wasn't thinking at all about "what essential thing might I be shadowing?" when he wrote Regex in STD.pm6
jnthn sorear: But yeah, you do it by the EXPORTHOW mechanism.
sorear and neither was I - I lost a lot of metaphorical hair over debugging that 08:55
WTF WHY IS NIECZA NOT FINDING THE REGEX IMPLEMENTATION CLASS
08:55 xenu_ left
jnthn Hm. Would be interesting to get a TimToady ruling on this. 08:55
Maybe SETTING:: is the right compromise option.
"You can diddle things like Str, but we'll make you write your own setting" 08:56
sorear I would settle for SETTING, but I'd like to unify or harmonize it with EXPORTHOW somehow
jnthn I'm not too attached to how EXPORTHOW currently is.
Partly because I want a compositional import mechanism.
Well, maybe I do. 08:57
08:57 noam left
sorear I am interested in elaboration 08:57
08:57 noam joined
jnthn Essentially, some way you could use multiple MOP-affecting modules, each one exporting a role, and if they try to change the MOP in conflicting ways you get the usual composition failure issue. 08:57
dalek rlito: 36fb5f3 | (Flavio S. Glock)++ | README-perlito5-js:
Perlito5 - javascript: data model update: Compile-time / Run-time interleaving
08:58 jerome_ joined 08:59 carlin joined
dalek ast: 95257ca | moritz++ | S05-modifier/sigspace.t:
test ms//
09:00
jnthn I feel a bit odd about things like "class Str {...}; 'foo'; Str.new;" because the latter is clearly going to use the lexical class, whereas the constant would not. Not sure whether I should be so bothered on that though... 09:01
moritz is there any reason for still having . in @*INC by default? 09:03
jnthn moritz: I suspect removing it will have a similar pain level to removing lib. 09:04
09:04 noam left
moritz jnthn: I don't think so, because all our modules already are in lib/ 09:04
09:04 noam joined
jnthn moritz: Good point... I guess it may surprise people who got used to things being as they are. 09:04
moritz: But I guess that argues "remove it soon", so less people get used to it :) 09:05
moritz jnthn: it certainly surprises me that an A.pm in my rakudo dir sets up my spectest runs
09:05 fridim_ joined
jnthn sets up, or upsets? :) 09:06
.oO( Somebody upset us the bomb )
moritz upsets
jnthn: ok, one more question about traits 09:07
in the case of sub answer() is description('something') { 42 }
and description is a role name
09:08 carlin left
moritz how is trait_mod:<is> called? 09:08
jnthn In that case, 'something' goes as an extra positoinal.
frettled moritz++ – I think having . in @*INC is a bad idea.
jnthn &trait_mod:<is>(&answer, description, 'something')
09:08 NamelessTee joined 09:09 xenu joined, xenu is now known as Guest15098, colomon left
moritz then I have all the failing tests figured out 09:10
frettled \o/ 09:11
Now you need to write a new test to make the code fail again!
moritz akshually there's one new failure that I'm simply fudging 09:12
dalek kudo/use-arglist: c2634bd | moritz++ | / (2 files):
pairs in traits have a Bool value, not Int
moritz but it only passed accidentally before
jnthn ok 09:13
moritz an 'is export(:MANDATORY)'
jnthn moritz: That one needs special handling, iirc. 09:14
moritz jnthn: right
jnthn moritz: It means that the thing is *always* imported.
moritz jnthn: and it only passed before because we always imported everything that was exported with any tag
jnthn ah, ok 09:15
We can fix mandatory later.
moritz aye 09:16
I don't think anybody uses it out there 09:17
09:17 Guest15098 left
moritz anyway, doing a final spectest now with a local merge 09:17
jnthn Doubt it.
\o/
moritz++ # improving our malice
moritz :-) 09:18
actually I like the translation "deceitfulness" better
where's phenny?
the "list" in "arglist" means something like "trick" or "subterfuge" 09:19
jnthn wonders if it's at all related to the English use of "list" as in "the boat listed" 09:28
moritz is that, like, capsized?
frettled almost! 09:29
jnthn no, it's what happens before that :)
More like "leaning to one side" or so
moritz ah
german "kraengen"
no, I don't think it's related
jnthn It was a stretch :) 09:30
dalek kudo/nom: ff4843a | moritz++ | src/Perl6/Grammar.pm:
preparations for use with arglist
09:31
rakudo/nom: 3b5d78c | moritz++ | src/Perl6/ (3 files):
rakudo/nom: move make_simple_code_object to World, rename it to start with create_
09:31 dalek left
frettled In Norwegian, "list" can mean "cunning" 09:31
moritz frettled: that's closer to the german "list" 09:32
09:32 icwiener left, dalek joined, ChanServ sets mode: +v dalek
moritz meh, dalek didn't detect that merge 09:32
ah well, double karma for jnthn++ and me :-)
frettled hehe
sorear sleep 09:35
09:36 jferrero joined, drschumtzenberg joined 09:37 xenu_ joined
dalek ast: 17368d0 | moritz++ | / (3 files):
fix up traits and importing tests
09:40
09:40 xenu_ left 09:42 noam left 09:43 noam joined 09:44 MContagious left
tadzik o/ 09:45
\o/
moritz \o tadzik 09:46
tadzik now I can make all my modules use arglists :)
as in use Term::ANSIColor :constants
moritz I'm testing the :MANDATORY fix 09:47
right now
09:47 xenu_ joined
frettled tadzik: ooh? 09:48
tadzik hoo! :) 09:49
moritz note that only pairs in arglists are supported right now
use lib 'lib'; # not yet :(
tadzik but how about use lib dir => 'lib'?
09:50 noam left
moritz hope 09:50
09:50 noam joined
moritz erm 09:50
nope
:-)
jnthn We just don't ahve a dynamic exportation mechanism yet.
moritz the value of the pairs is ignored 09:51
use Test :!DEFAULT; # also imports DEFAULT :-)
jnthn The way it's really meant to work is thing not used as a tag gets passed on to an &EXPORT in UNIT, iiuc.
*things
Which could be a macro but I guess could be a sub also...
We could do the sub case now and it'd be enough for "use lib". 09:52
moritz oh by the way
$ ./perl6 -Ilib -e 'use Test (); ok 1; done'
===SORRY!===
CHECK FAILED:
Undefined routine '&ok' called (line 1)
Undefined routine '&done' called (line 1)
but that imports MANDATORY
in contrast to need Test; which does not import :MANDATORY
jnthn Sounds good.
09:55 xenu_ left 09:56 xenu_ joined
dalek kudo/nom: e51b93b | moritz++ | src/Perl6/Grammar.pm:
always import MANDATORY exports
09:56
kudo/nom: b6fe916 | moritz++ | src/Perl6/Grammar.pm:
die when trying to import a tag that is not exported
ast: 86459a9 | moritz++ | S11-modules/importing.t:
test that non-existent export tags die on importing
09:58 colomon joined
jnthn wonders if we'll get some unfudges from this 09:59
moritz I've included two unfudges in the roast commit before 10:00
jnthn nice
S10-packages/export.t may be worth a look 10:01
10:01 xenu_ left
jnthn S11-modules/import-tag.t too 10:02
moritz both need quite some review first, I fear 10:04
dies_ok { bop() }, 'bop() not imported';
jnthn eek 10:05
dalek ast: cecf9d0 | moritz++ | S11-modules/import-tag.t:
eval around compile-time lookup failures
moritz both pugs and rakudo had quite a tradition of letting us get away with that
iirc it was only this year that we started detecting it at compile time 10:06
jnthn Right.
Well, within the last year
Was when the optimizer landed, last autumn.
dalek kudo/nom: 64c2fdb | moritz++ | t/spectest.data:
run S11-modules/import-tag.t
10:07
10:10 drbean joined 10:11 noam left, noam joined 10:12 noam left, noam joined
moritz ok, I have a crude version of use lib 'lib' working 10:14
though, of course, you first need to -Ilib because it's in lib/lib.pm :-)
jnthn Well, if we install it it's fine :) 10:15
moritz: How'd you made it work?
moritz jnthn: if there are non-pairs in the use arglist, it tries to call our sub EXPORT in the module 10:16
jnthn: and passes all positional arguments to it
jnthn moritz: OK. I think the spec says it should pass unused nameds too.
moritz: That is, if we find ones that don't map to tags, then die if there's no &EXPORT, otherwise pass them along.
moritz jnthn: that's not hard to do, but probably leads to worse error messages 10:17
r: sub f() { }; say f(:foo)
p6eval rakudo 64c2fd: OUTPUT«Unexpected named parameter 'foo' passed␤ in sub f at /tmp/XyTRUmRtEq:1␤ in block <anon> at /tmp/XyTRUmRtEq:1␤␤»
moritz hm, maybe not
I should read the specs at some point :-)
waiting for a spectest run to finish, then I'll push 10:18
jnthn moritz: We can give as we do today if there's no EXPORT sub. 10:19
So it's only worse for modules doing dynamic exportation stuff.
moritz $ ./perl6 -Ilib -e 'use Test "foo";'
===SORRY!===
Error while importing from 'Test': no EXPORT sub, but you provided positional argument in the 'use' statement
10:19 noam left
moritz that could be changed a little 10:19
10:19 mdupont left 10:20 noam joined
moritz n: use lib 'lib'; 10:20
p6eval niecza v17-2-gb8fcf85: OUTPUT«===SORRY!===␤␤'use' with arguments NYI at /tmp/O1G8OAg8Uc line 1:␤------> use lib 'lib'⏏;␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1364 (die @ 3) ␤ at /home/p6eval/niecza/s…
10:21 scott__ left
dalek kudo/nom: 6bd95b3 | moritz++ | / (3 files):
first crude shot at importing with positional args

Also crude implementation of lib.pm
10:25
kudo/nom: 72358bd | moritz++ | docs/ChangeLog:
update changelog
10:26 xenu joined, noam left 10:27 xenu is now known as Guest15543
moritz blogs.perl.org/users/brad_gilbert/2...and-d.html nice 10:27
10:27 noam joined
moritz though I wouldn't call Go a toy 10:27
10:29 birdwindupbird joined 10:30 NamelessTee left
jnthn wonders if we can have green on "use" in features yet :) 10:31
10:32 noam left 10:33 Guest15543 left
jnthn nqp: (-> $a, $b { say($a ~ $b) })('h', 'i') 10:33
p6eval nqp: OUTPUT«hi␤»
10:38 xenu_ joined 10:40 NamelessTee joined 10:41 xenu_ left 10:44 carlin joined
dalek kudo/nom: 81d88d8 | jnthn++ | src/Perl6/Actions.pm:
Avoid a huge if ladder by replacing it with a hash lookup.
10:44
10:55 _Vi left 10:58 xenu_ joined 11:12 xenu_ left, xenu joined, xenu is now known as Guest51707 11:18 tyatpi left
dalek pan style="color: #395be5">perl6-examples: dde18a0 | (Gerhard R)++ | shootout/revcomp.p6.pl:
[shootout/revcomp.p6.pl] replace loop with for
11:18
pan style="color: #395be5">perl6-examples: ccbd2c0 | (Gerhard R)++ | other/revcomp.pl:
add alternative version of revcomp problem
11:22 Guest51707 left, benabik left 11:23 xenu_ joined 11:26 noam joined 11:31 snearch joined 11:33 xenu_ left, pernatiy left
dalek pan style="color: #395be5">perl6-examples: dd8202a | (Gerhard R)++ | other/revcomp.pl:
[other/revcomp.pl] fix whitespace
11:33
moritz removing . from @*INC breaks some tests 11:34
I guess we either need to fix them or the harness
jnthn Um 11:35
What do flip-flop operators evaluate to?
moritz n: say (3 ff 4) 11:36
p6eval niecza v17-2-gb8fcf85: OUTPUT«1␤»
moritz n: say (0 ff 4)
p6eval niecza v17-2-gb8fcf85: OUTPUT«␤»
11:36 noam left
jnthn The tests seem to expect them to count how many items they've seen in that state, not just give true or false... 11:36
moritz n: say (3 ff 4) for ^5 11:37
p6eval niecza v17-2-gb8fcf85: OUTPUT«1␤1␤1␤1␤1␤»
jnthn Spec doesn't seem to say muchon this...
moritz probably 'same as p5' applies
n: say (3 ff 0) for ^5
p6eval niecza v17-2-gb8fcf85: OUTPUT«1␤2␤3␤4␤5␤»
11:37 noam joined
moritz or "same as niecza" :-) 11:38
11:38 xenu_ joined, JimmyZ joined
jnthn n: for ^5 { say $_, ($_ == 2 ff $_ == 3) } 11:38
p6eval niecza v17-2-gb8fcf85: OUTPUT«0␤1␤21␤32␤4␤»
jnthn I never understood these darn ops in Perl 5 anyway. :) 11:39
n: for ^5 { say $_, ($_ == 2 ^ff $_ == 3) } 11:41
p6eval niecza v17-2-gb8fcf85: OUTPUT«0␤1␤2␤32␤4␤»
jnthn n: for ^5 { say $_, ($_ == 2 ^ff $_ == 3).WHAT }
p6eval niecza v17-2-gb8fcf85: OUTPUT«0Str()␤1Str()␤2Str()␤3Int()␤4Str()␤»
jnthn Str?!
JimmyZ r: for ^5 { say $_, ($_ == 2 ^ff $_ == 3).WHAT } 11:42
p6eval rakudo 81d88d: OUTPUT«0Bool()␤1Bool()␤2Bool()␤3Bool()␤4Bool()␤»
11:46 xenu_ left 11:48 benabik joined 11:52 drschumtzenberg left 11:53 xenu_ joined
dalek blets: 07a09e4 | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
expanded on sigil , added interpolation dummy
12:03
12:04 drschumtzenberg joined
dalek pan style="color: #395be5">perl6-examples: 7a64336 | (Gerhard R)++ | / (4 files):
move some files from other/ to shootout/
12:05
12:07 kborer joined
dalek blets: e57de33 | (Herbert Breunung)++ | docs/report.pl:
report writes now also a todo
12:09
12:11 xenu_ left, not_gerd joined 12:12 xenu joined
dalek blets: 2950112 | (Herbert Breunung)++ | docs/report.pl:
report todo also minds faq
12:12
12:12 xenu is now known as Guest79896
not_gerd regex-dna.p6.pl from perl6-examples/shootout panics with Out of mem! 12:13
12:13 carlin left
not_gerd could someone verify if that's true for other platforms? 12:14
12:17 carlin joined 12:18 noam left, noam joined, _Vi joined 12:21 Guest79896 left 12:26 noam left 12:27 xenu_ joined, noam joined 12:39 phenny joined
moritz not_gerd: I'm trying it now 12:39
12:44 pernatiy joined 12:45 PacoAir joined
moritz it sure takes some time 12:45
erm
especially if it reads from STDIN, and I don't provide any input 12:46
ok, OOMs here too
12:46 xenu_ left 12:47 _Vi left 12:51 alvis joined
not_gerd moritz: 32bit or 64bit architecture? 12:51
12:51 xenu_ joined
moritz not_gerd: 64bit linux 12:51
dalek ast: e63e982 | jnthn++ | S03-operators/flip-flop.t:
Fudge flip-flop.t for Rakudo.
12:53
kudo/nom: 5d601c7 | jnthn++ | src/Perl6/Grammar.pm:
Parse the fff variants of the flip-flop operators (though still NYI).
kudo/nom: e5d47e5 | jnthn++ | src/ (2 files):
Redo the flip-flop implementation. This also covers the fff from, doesn't suffer the scoping issues in the previous version and passes all but the final two tests in flip-flop.t (which seem to run into scoping issues that aren't the flip-flop operators fault anyway).
kudo/nom: ad47906 | jnthn++ | t/spectest.data:
Turn on flip-flop.t.
not_gerd moritz: I was wondering if teh script just exhausted the 32-bit address-space 12:54
dalek atures: 0146fa6 | jnthn++ | features.json:
Rakudo now supports the fff form of the flip-flop operators.
12:55
moritz not_gerd: I've set a ulimit of 1GB, so it won't go over 3GB anyway 12:56
not_gerd it took ~3GB here before dying, so it might have actually reached that limit here
dalek kudo/nom: 30c0796 | jnthn++ | docs/ChangeLog:
ChangeLog update.
blets: 2aa4b00 | (Herbert Breunung)++ | docs/ (2 files):
polish and operation
12:58
kudo/nom: b09c6f8 | moritz++ | / (5 files):
remove . from default @*INC
13:02
13:02 lorn_ left
not_gerd arguably, this makes the Rakudo of ~2009 more useful for real-world tasks 13:02
I'm guessing the more feature-complete regex engine is to blame?
moritz not_gerd: only for those involving lots of regexes, I think
well, it's more feature complete but still not quite mature enough, I think 13:03
13:04 lorn_ joined
JimmyZ moritz: your commit lost something? 13:05
moritz JimmyZ: you're right, I delete the wrong line :( 13:06
JimmyZ hehe
jnthn was just looking at it and noticed the same... 13:07
moritz JimmyZ++, jnthn++ # reviewing my commits
ok, spectesting with the correct fix now
dalek kudo/nom: 632b1f9 | moritz++ | src/core/terms.pm:
actually remove . from @*INC
13:12
13:12 xenu_ left 13:22 xenu joined, xenu is now known as Guest18409
dalek blets: 248f42b | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
repair and add some links
13:25
13:27 Guest18409 left 13:32 lorn_ left 13:33 tokuhirom joined
moritz p6: say 'foobar'.rindex('o') 13:33
p6eval pugs, rakudo b09c6f, niecza v17-2-gb8fcf85: OUTPUT«2␤»
moritz p6: say 'foobar'.rindex('o', 0)
p6eval niecza v17-2-gb8fcf85: OUTPUT«Num()␤»
..rakudo b09c6f: OUTPUT«2␤»
..pugs: OUTPUT«-1␤»
13:33 mdupont joined
moritz 3 compilers, 3 answers 13:34
13:36 tyatpi joined
moritz jnthn: I thought a bit about 'is export' needing to walk outer packages 13:37
13:37 fhelmberger left
moritz jnthn: I see two possibilities: an outer_package pointer in Stash (or maybe in the package itself) 13:37
13:37 lorn_ joined
moritz jnthn: or we could keep a stack of package in a dynamic variables at compile time 13:37
jnthn: which one would you prefer? 13:38
13:39 noam left, lorn_ left, noam joined
jnthn moritz: I'd been thinking about the stack 13:43
Guess the other way works too though and makes the info introspectable at runtime... 13:44
13:44 lorn_ joined
moritz so, any preference? :-) 13:45
13:46 noam left
jnthn moritz: Well, I'm looking at S02 and seeing: 13:47
PARENT # Symbols in this package's parent package (or lexical scope)
(That's a pseudo-package.)
Since those can be done indirectly like ::('PARENT')::<$x> we'll need a way to walk that chain at runtime. 13:48
moritz doesn't every package except UNIT has a parent package?
jnthn Well, and UNIT is really a lexical scope and thus a pseudo-package
I guess other lexical packages don't have a parent package though 13:49
my module Foo { }
Depends if you expect Bar's PARENT pointing to Foo to imply that Foo::Bar also works out. 13:50
moritz it's not clear to me if PARENT and the outer packages that 'is export' needs are the same chain 13:51
gfldex o.0 what happend to startup time over night? 13:52
13:52 skids joined
gfldex well, i know what happend, it is less then halve now 13:52
but why?
moritz it happened in February, actually :-)
the bounded serialization branch brought that
we don't construct our full type hierarchy at startup anymore, we "simply" deserialize it 13:53
jnthn moritz: It's not clear to me either.
moritz: I'm +1 to going with an @*PACKAGES stack. 13:54
13:54 xenu_ joined, lorn_ left 13:58 snearch left 13:59 xenu_ left 14:00 xenu_ joined, lorn_ joined 14:01 kaleem left 14:08 not_gerd left
moritz $ ./perl6 -e 'module A { class B { BEGIN { say nqp::atkey(@*PACKAGES, 0).gist } } }' 14:08
A()
$ ./perl6 -e 'module A { class B { BEGIN { say nqp::atkey(@*PACKAGES, 1).gist } } }'
===SORRY!===
Method 'gist' not found for invocant of class 'B'
the dangers of working with uncomposed classes :-)
anyway, it seems that @*PACKAGES works-ish
14:09 lorn_ left
moritz ... except that it retains B even after the closing curly :( 14:09
14:09 Lorn is now known as lorn_ 14:11 lorn joined 14:12 alester joined 14:13 lorn left 14:16 wtw left, xenu_ left 14:21 xenu joined 14:22 xenu is now known as Guest20996, kaare_ joined 14:25 Guest20996 left, fhelmberger joined 14:26 PacoAir left 14:27 spaceships joined 14:28 tokuhirom left 14:29 tokuhirom joined
[Coke] /away 14:31
[Coke] wonders how he did that.
moritz [Coke]: in irssi there are ctrl+somechar control sequences for that 14:32
ctrl+b for bold
geekosaur ctrl+u is mIRC spec for underline
(styles were initially defined by mIRC and somehow became standard....)
14:34 tokuhirom left
dalek rlito: 1b4e7ee | (Flavio S. Glock)++ | TODO-perlito5:
Perlito5 - TODO update: typeglobs
14:34
14:35 alim joined 14:36 zby_home_ joined, xenu_ joined
dalek kudo/nom: 40547d6 | moritz++ | src/Perl6/Grammar.pm:
track current packages in @*PACKAGES

we will need it for exporting from nested packages
14:38
14:39 xenu_ left 14:40 kresike left 14:45 goraki_ joined
dalek rlito: f0f0aef | (Flavio S. Glock)++ | TODO-perlito5:
Perlito5 - TODO update: context
14:45
14:45 lorn joined 14:46 xenu_ joined 14:52 mdupont left 14:59 xenu_ left, fgomez joined 15:03 alim left, alim joined 15:09 fgomez left 15:15 JimmyZ left 15:18 JimmyZ joined 15:21 fhelmberger left 15:24 xenu joined 15:25 xenu is now known as Guest71899
gfldex but why? 15:26
sorry WH
TimToady
.oO(wrong house?)
goraki_ That's what I was wondering? 15:27
PerlJam wrong human
15:27 JimmyZ left 15:28 goraki_ left, goraki_ joined
moritz wrong Higgs boson :-) 15:28
15:29 goraki_ is now known as goraki 15:33 spider-mario joined
spider-mario hello 15:34
15:34 Guest71899 left
moritz \o spider-mario 15:34
spider-mario n: (1 ... 10).map: &say 15:35
p6eval niecza v17-2-gb8fcf85: ( no output )
15:35 JimmyZ joined
spider-mario p: (1 ... 10).map: &say 15:35
p6eval pugs: OUTPUT«*** ␤ Unexpected "10"␤ expecting operator or ")"␤ at /tmp/sMAJPqeSp0 line 1, column 8␤»
spider-mario r: (1 ... 10).map: &say
p6eval rakudo 40547d: ( no output )
spider-mario what I get with my local copy of rakudo is: 15:36
This type cannot unbox to a native integer
is that a bug?
it works with {.say} or {say $_} instead of &say
moritz it's a known bug 15:37
related to &say having a slurpy in its siganture
*signature
spider-mario oh, ok
moritz the correct thing to do is to pass all arguments straight to say
spider-mario thanks
moritz which is not what you'd expect
15:39 xenu_ joined
dalek kudo/nom: 397cafd | jnthn++ | docs/ROADMAP:
Remove a completed ROADMAP item; moritz++.
15:40
JimmyZ moritz++ indeed 15:41
15:41 alim left
moritz exporting from nested packages is a bit more complicated 15:42
jnthn moritz: What makes it so?
15:43 fglock left
moritz jnthn: it seems I have to create an EXPORT package inside each package we create 15:43
r: say EXPORT.WHAT
p6eval rakudo 40547d: OUTPUT«EXPORT()␤»
jnthn moritz: yes.
moritz r: say OUR<EXPORT>.WHAT
p6eval rakudo 40547d: OUTPUT«Any()␤» 15:44
moritz r: say MY<EXPORT>.WHAT
p6eval rakudo 40547d: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Perl6::Metamodel::ModuleHOW'␤ in block <anon> at /tmp/1wgo_SzN2n:1␤␤»
moritz r: say ::MY<EXPORT>.WHAT
p6eval rakudo 40547d: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Perl6::Metamodel::ModuleHOW'␤ in block <anon> at /tmp/3euzNd1o_B:1␤␤»
jnthn r: say MY::<EXPORT>.WHAT
p6eval rakudo 40547d: OUTPUT«EXPORT()␤»
jnthn :)
moritz ok :-)
jnthn moritz: But it should be possible to create it on demand.
$module.WHO<EXPORT> = anon package EXPORT { };
Or so.
moritz jnthn: does that mean that $*EXPORT is going away? 15:45
jnthn moritz: $*EXPORT is always the one in UNIT.
moritz: Thing is that we actually create that up front...since it lives in a lexpad.
moritz but the other EXPORTs only live in the package. Got it. 15:46
jnthn Yeah.
TimToady also, packages don't promise export, only modules, and things that think they're modules
if it's easier to implement export everywhere, I suppose that's okay
moritz I can see how that might be slightly confusing, but then again if you muck with EXPORT yourself, you should be familiar with the system
jnthn TimToady: I currently would have to add something to make that distinction, fwiw. 15:47
TimToady: The current factoring just works everywhere.
TimToady well, if we ever get P5 packages, they won't have EXPORT...
jnthn True :)
TimToady that was the original intended meaning of package 15:48
15:48 smash joined, noam_ joined 15:49 xenu_ left, Psyche^ joined
jnthn I've kinda stolen it to mean "something that doesn't care if you redeclare it with a module/class/role later" 15:50
Well, I think the spec hints at that meaning too anyway though.
TimToady some kind of liskov going on there...
well, it's really just mixins 15:52
15:52 Patterner left, Psyche^ is now known as Patterner 15:54 xenu_ joined 16:01 am0c joined
TimToady re Regex shadowing, the current regex language used in compiling should be in the $~Regex slang, which doesn't have much to do with the current definition of Regex, and in fact is largely anonymous by necessity, since it might be a derived language 16:02
how this relates to single-dispatch types like Str is unclear though 16:03
if you're calling a compiler routine that has been defined elsewhere, it depends only on its Str definition at the point it was compiled 16:04
so something macro-y has to be involved to get this kind of confusion 16:06
jnthn Aye; NQP has a Regex type, but that doesn't get confused with the Regex type defined in CORE.setting. 16:07
TimToady more caffiene is a necessary but not necessarily sufficient condition for further progress...
jnthn :)
16:07 PZt joined 16:08 xenu_ left, bbkr joined
TimToady we probably want to have our cake and eat it too, and this is one of those areas that you can't always get away with it... 16:08
16:09 xenu_ joined 16:10 JimmyZ left 16:11 bbkr_ left
TimToady basically the issue is to what extent types used by the compiler runtime are lifted into the compiling scope; we want to be able to do that to change the current language, but in this case we get burnt 16:11
16:11 wolfman2000 left
jnthn Rakudo keeps a very clear idea of the symbols in the program its compiling and the program that's currently running. 16:12
The issue is where it should find things like Str when making e.g. a string constant.
At present, it just looks up what Str means in the scope it is currently compiling.
TimToady well, maybe a first approximation is not to allow shadowing of critical compiler classes outside of MONKEY_TYPING 16:13
jnthn Where would it look? CORE or SETTING?
16:14 noam_ left
TimToady I mean blow up if it sees "class Str" 16:14
16:14 noam_ joined
TimToady maybe we need a slang for the current type system of the compiler 16:15
PerlJam as far as I've read through this conversation just now, "blow up on 'class Str'" gets my vote :)
TimToady so you have to be a bit more intentional about overriding it
jnthn TimToady: I'm struggling a bit with where we draw the line. 16:16
TimToady well, me too :)
jnthn :)
16:18 sudokode joined
TimToady part of what's going on here is that we've considered the current language to be defined lexically, and mostly tried to keep the type system orthogonal to that, on the assumption that any polymorphism will just work under liskovian rules, but clobbering Str like that is violating some kind of contract somewhere 16:19
so suppose as a thought experiment we define a "string" slang, $~Str or some such. What's the next type that blows up this way? 16:21
jnthn The numerics. 16:22
TimToady so suppose we define other slangs for those types. what's the next failure mode? failure to convert from compiler types to user types?
16:23 xenu_ left
jnthn There's no "compiler types" issue, so far as I can see. 16:24
The compiler expects the types to obey certain contracts.
Those contracts are things like, "knows how to box this native type" or "has a new method that looks like this" and so forth.
For Code objects, the relations get a bit intimate... 16:25
It goes poking at attributes and so forth.
Then, the guts in various places expect code objects to be laid out in a certain way.
TimToady and the contract evolves over time too
jnthn Yeah. 16:26
TimToady maybe the conservative thing is to make a list of "reserved types", and you can't define those without MONKEY_TYPING, and then if you do, expect weird failure modes
jnthn It's all kind of a meta-model to me. There are places we've picked an interface, contract etc. and already expose it. There's others where things are considered "internals" still.
masak lol hai #perl6 16:27
jnthn ohhai, masaksan
moritz lolshark masak! 16:28
masak backsharks
16:28 xenu joined, erkan left, xenu is now known as Guest36794
masak r: package A { class Str {}; our sub foo() { return Str.new } } 16:29
p6eval rakudo 397caf: OUTPUT«===SORRY!===␤This type cannot box a native string␤»
masak inneresting.
jnthn masak: See discussion in ticket and also during the day :)
16:30 snearch joined
masak nodnod 16:31
16:32 thou joined, fgomez joined, Guest36794 left 16:35 zby_home_ left, zby_home_ joined 16:39 pernatiy left, thelazydeveloper joined
masak p6: my $x = (); say $x.WHAT 16:40
p6eval rakudo 397caf, niecza v17-2-gb8fcf85: OUTPUT«Parcel()␤»
..pugs: OUTPUT«Array␤»
16:41 goraki left
dalek kudo/nom: 9cdfbfa | moritz++ | src/core/traits.pm:
is export() now installs tags in the current and outer packages, not just in UNIT
16:45
jnthn \o/ 16:47
moritz++
jnthn has some patches too :)
dalek kudo/nom: d2e01f1 | jnthn++ | src/ (2 files):
Give enums the capability to produce a role based on themselves.
16:48
kudo/nom: 80416be | jnthn++ | src/core/operators.pm:
Get does and but operators to handle turning non-composable types into composable ones, or dying helpfully.
kudo/nom: 423b292 | jnthn++ | t/spectest.data:
Run S12-enums/as-role.t.
kudo/nom: 97d2c72 | jnthn++ | .gitignore:
Add lib/lib.pir to .gitignore.
moritz and I think I know what ails the import statement
jnthn moritz: Partly what you just fixed, no? :)
.oO( I prefer alements to ailments... )
dalek kudo/nom: 0a5caa9 | jnthn++ | docs/ROADMAP:
Remove another completed ROADMAP item.
16:51
16:53 xenu_ joined 16:57 xenu_ left, birdwindupbird left 16:58 xenu_ joined
dalek kudo/nom: c95b593 | moritz++ | src/Perl6/Grammar.pm:
fix import thinko
16:59
ast: 65f0631 | jnthn++ | S02-magicals/file_line.t:
Unfudge a couple of passing tests.
17:00
moritz $ ./perl6 -e 'module A { sub f is export { say "SHARK" } }; import A; f' 17:01
SHARK
17:01 fgomez left 17:02 daxim_ left
jnthn \o/ 17:03
17:04 birdwindupbird joined 17:05 PacoAir joined 17:06 vlixes left 17:07 xenu_ left
jnthn r: END { say 42 }; exit 17:10
p6eval rakudo 397caf: ( no output )
17:10 dakkar left
dalek kudo/nom: 4b16cae | moritz++ | / (2 files):
coerce arglist to import to an RPA

now import Type :DEFAULT; works the same as a bare import Type
17:12
17:13 kborer left, mspaulding joined 17:14 mspaulding left
dalek ast: fe93c85 | jnthn++ | S04-phasers/end.t:
Test that exit runs END phasers.
17:16
kudo/nom: 1b5ab32 | jnthn++ | src/core/control.pm:
Run END phasers when exit terminates a program.
17:17
17:17 fgomez joined, erkan joined, erkan left, erkan joined
masak interesting backlog. moritz++ jnthn++ TimToady++ 17:18
colomon now feels bad for ignoring #perl6 for the last six hours... 17:21
masak ignoring #perl6 is always worth regretting :P 17:22
17:22 goraki joined 17:24 tyatpi left
masak TimToady: this feels a bit like the Steele PDF we talked about once: clojure.com/blog/2012/05/08/reducer...ssing.html 17:24
(the one about parallelism in Fortress) 17:25
17:28 xenu joined 17:29 xenu is now known as Guest93722, birdwindupbird left
dalek ast: df8cc85 | jnthn++ | S14-traits/package.t:
Update a test for current spec; doesn't actually run yet, but at least it's not utterly wrong anymore.
17:30
17:30 derrazo joined
moritz eeks, it seems that use + import collide :/ 17:31
sorear good * #perl6
17:31 derrazo left
masak sorear! \o/ 17:31
jnthn moritz: collide? 17:32
o/ sorear
dalek kudo/nom: 7a9b1e5 | jnthn++ | docs/ChangeLog:
Couple of extra ChangeLog items.
17:33
jnthn moritz: I'd kinda expect them to ignore the imported symbols since they're identical.
moritz: Guess there's always a chance it's something silly like containers getting in the way of NQP's =:= check. 17:34
17:35 preflex left, preflex_ joined
moritz jnthn: it's something even more silly. It's that if I do a 'use Test;', then the module inside my test file exports &plan, and not the symbol it should export 17:35
maybe that anon package EXPORT { } gets reused or so 17:36
17:36 preflex_ is now known as preflex
jnthn moritz: er 17:36
d'oh
yes. :)
Let's do Metamodel::PackageHOW.new_type(:name('EXPORT')) instead :)
jnthn--
moritz ... and compose it, no?
jnthn Yeah. 17:37
Though compose on a PackageHOW is a noop I guess.
moritz jnthn: it sets $!composed to 1 :-)
jnthn yeah, just noticed that ;)
masak std: sub circumfix:<#{ }>(*@elems) { set @elems }; #{ 1, 2, 3 }; two terms in a row 17:39
p6eval std fab64fc: OUTPUT«Possible attempt to put comments in qw() list at (eval 247) line 87.␤Potential difficulties:␤ Embedded comment seems to be missing backtick at /tmp/kFfUh3zg9S line 1:␤------> }>(*@elems) { set @elems }; #{ 1, 2, 3 }⏏; two terms in a row␤ok 00:00 4…
moritz std: qw()
p6eval std fab64fc: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'qw' used at line 1␤Check failed␤FAILED 00:00 40m␤»
masak agreed. not ideal.
TimToady: ^^^
moritz it shouldn't say 'qw() list' when qw() is not a quoting construct
17:41 daxim joined, tyatpi joined 17:42 Guest93722 left 17:43 xenu_ joined
TimToady um, that seems to be a Perl 5 error 17:44
the string 'qw()' does not occur in the std directory 17:45
n: sub circumfix:<#{ }>(*@elems) { set @elems }; #{ 1, 2, 3 }; two terms in a row 17:46
p6eval niecza v17-2-gb8fcf85: OUTPUT«Potential difficulties:␤ Embedded comment seems to be missing backtick at /tmp/l03KYU5PIZ line 1:␤------> }>(*@elems) { set @elems }; #{ 1, 2, 3 }⏏; two terms in a row␤ &circumfix:<#{ }> is declared but not used at /tmp/l03KYU5PIZ line …
TimToady so it's really an artifact of STD using translation at a spot where emulation might be a bit more correct and considerably slower 17:47
masak ah. 17:49
TimToady translation is used heavily in STD, note that we're already up to (eval 247)
17:49 benabik left, benabik joined
TimToady and STD is pushing the limits of P5 very hard already 17:49
17:52 fglock joined
dalek ast: e81414b | moritz++ | S11-modules/import.t:
fix and expand import.t

the old version used wrong scoping in eval_dies_ok, and importing by wrong names. Adds some tag exporting tests
17:55
17:56 xenu_ left
moritz jnthn: does file_line.t actually pass for you? 17:56
dalek ast: 461a624 | moritz++ | S02-magicals/file_line.t:
fix file_line.t
17:58
blets: cb768a4 | (Herbert Breunung)++ | docs/ (3 files):
found better memorizer term for appendix h
17:58 cogno joined
moritz removing a fudge directive changes the line number :-) 17:58
17:58 adu joined 17:59 HarryS left
dalek kudo/nom: 4fd2558 | moritz++ | src/core/traits.pm:
fix export bug
17:59
kudo/nom: 3c92ea2 | moritz++ | t/spectest.data:
run import.t
17:59 HarryS joined
adu hi 17:59
moritz hello adu
adu perl6 is hard to learn 18:00
TimToady yeah, we've been trying for 11 years now...
adu heh
PerlJam adu: because there aren't enough learning resources?
adu: because it's intrinsically difficult? 18:01
masak hi adu.
sisar PerlJam: aye. #lck of learning reources
adu no because, I try and read code after reading part of the spec
sisar *lack
masak could we make Perl 6 easier to learn for you in some way?
adu I'm trying to grok STD.pm6
masak heh.
TimToady maybe you should start with something easier... :) 18:02
masak STD.pm6 is quite a huge program to try to grok.
adu and so far the only thing I've been able to glean is that numbers can have underscores
PerlJam adu: that's like trying to understand a person by looking at their innards
diakopte1 ++
masak p6: say 45_123
p6eval pugs, rakudo c95b59, niecza v17-2-gb8fcf85: OUTPUT«45123␤»
masak \o/
PerlJam adu: are you familiar with perl 5?
adu PerlJam: nope
PerlJam okie 18:03
TimToady what languages are you familiar with?
adu I'm coming from a Python/Haskell background
TimToady you might find rosettacode.org a better way, then
adu ok
TimToady you can compare P6 snippets with those languages
gfldex adu: rosettacode.org/wiki/Category:Perl_6
TimToady also, feel free to ask questions here 18:04
jnthn moritz: (file_line.t) yes, it passed, thus why I unfudged :) 18:05
dalek rlito: 62d9c24 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - javascript: add GLOB ref infrastructure
PerlJam It would be neat if rosettacode had a side-by-side comparison thing 18:06
18:07 icwiener joined
TimToady that's what windows are for 18:07
adu so I've been looking at things like: something:sym<!@#$> 18:12
18:12 diakopte1 is now known as diakopter
spider-mario I think Perl 6 is what made me learn Perl 5 18:12
not sure what made me learn Perl 6
maybe Haskell
adu and I think it would be useful for operator expressions
but I can't figure out how 18:13
18:14 sisar left
moritz adu: what are you trying to achieve? 18:14
adu I'd like to write a go compiler to parrot
moritz cool 18:15
18:15 sisar joined
adu I'm not sure how goroutines would work, tho 18:15
moritz adu: perlgeek.de/en/article/mutable-gram...for-perl-6 explains the :sym<> stuff
me neither. Maybe #parrot on irc.perl.org has some ideas 18:16
18:16 fgomez left, xenu_ joined
adu another thing I'm not sure about is automatic semicolon insertion 18:16
it would best be a stage inserted between tokenization and the rule grammer, but I'm not sure how to do that in perl6 18:17
or NQP that is
also, what's the difference between { <…> } and {*}? 18:18
TimToady we do something like that with line-ending } assuming the end of statement
<...> is kind of a fossil, probably 18:19
if it's being used as a proto placeholder
adu yes
TimToady {*} is the new syntax
adu ok
good to know
TimToady which works for rules because the * would otherwise be illegal there 18:20
18:20 asdfqwerty joined, asdfqwerty is now known as asfqwerty_
TimToady we used to use ... in normal protos, but that means something else in regexes 18:20
adu well, from what I gather it parses as a single token "{*}" not 3 tokens
TimToady STD does, not sure about rakudo 18:21
moritz I think rakudo parses it as a block containing a Whatever
not as a single token
TimToady not in a regex it doesn't :)
moritz well, yes :-)
jnthn Think as a single token in regexes.
adu so does that mean { * } is equivalent?
jnthn Rakudo still supports the old syntax too, iirc. 18:22
TimToady would prefer that to be written { {*} } if you really want whitespace
{*} at the outer block level is really just sugar for that
adu so how do I insert a stage between tokenization and rule parsing? 18:23
or is there another way to simulate ASI 18:24
benabik adu: nqp doesn't really separate out those stages.
TimToady adu: the curlycheck rule in STD basically supplies an implicit ; after a line-ending } 18:25
moritz adu: just parse a statementlist, and each statement goes until either a semicolon or a newline
benabik I _think_ it could be done by requiring something like [ ';' | $ ] at the end of statements. But I don't recall if $ matches EOL or EOS
TimToady $$ for EOL
moritz benabik: EOS
adu that might work 18:26
TimToady note how the curlycheck rule does it
<?before \h* $$>
adu is that a positive lookahead?
moritz yes 18:27
adu what is \h?
TimToady there is a fancier alternative with <.unv> that allows for embedded comments and "unspace"
moritz adu: horizontal whitespace
TimToady horizontal ws
moritz adu: perlcabal.org/syn/S05.html is the p6 regex bible :-) 18:28
TimToady \v is vertical, of course
adu hmm ok
TimToady when curlycheck finds one, it sets a memo on the position in the input that can be used by any rule that is interested in statement termination at that point 18:30
adu so what does sigil:sym<@> do, does it assign the @ token to <sym>? 18:32
TimToady that's one of the things it does
moritz adu: did my first link not explain that? 18:33
adu I didn't understand that link
TimToady it also check for an endsym rule associated with the sigil syntactic category
moritz adu: which part did you not understand? 18:34
TimToady (though sigil doesn't have an endsym rule)
adu so could I use the rule with that syntax? like { <sigil:sym<@>> }
18:34 cogno left
moritz adu: I'm always happy to improve my articles based on feedback 18:34
TimToady adu: you don't generally want to
moritz no, you use <sigil>
PerlJam moritz: I think he may be thinking of the link to S05 18:35
moritz and it matches all sigil:sym<somthing> rules as alternatives
TimToady think of syntactic categories as alternations without |
adu is it closed?
TimToady extensible
in derived languages
adu like <sigil> won't match something that's not in it's definition list?
TimToady depends on which language you're in; it's polymorphic 18:36
adu ok
TimToady that's how we extend P6
18:36 cogno joined
TimToady perl6: sub postfix:<!> ($x) { [*] 2..$x }; say 42! 18:37
p6eval pugs, rakudo 3c92ea, niecza v17-2-gb8fcf85: OUTPUT«1405006117752879898543142606244511569936384000000000␤»
TimToady there, just added a token to <infix>
adu so would it be possible to extend perl6 to look like Go without compiling to parrot?
TimToady apples and oranges
but yes
Perl 6 thinks of all other languages as mere sub-dialects of Perl 6 18:38
adu right, that question might have made more sense either without extend or compile in it
18:38 alim joined
TimToady which backend is in use should be immaterial, eventually 18:38
nqp is currently bound to parrot, but the plan is to make that retargetable as well 18:39
asfqwerty_ hello. I was reading some problem today in a forum. I don't know much perl6 but for what i've read on the perl6 article in wikipedia, i think it might be done with junctions and/or lazy lists .... 18:40
TimToady also, there are still plenty of doctorate-level questions in the exact interplay of the current language with newly-minted languages; we were just thrashing out some of that earlier
moritz asfqwerty_: what problem are you pondering? 18:41
asfqwerty_ pastebin.ca/2145769
TimToady asfqwerty_: There's More Than One Way To Do It, generally
asfqwerty_ i'm not an expert programmer, but i have the feeling that those perl6 constructs might help to make such algorithms simpler... 18:42
adu moritz: I'll try giving the article another read
moritz asfqwerty_: they might. But if you're not an expert programmer, first you should find a correct solution at all, and only then worry about making it look neat
TimToady this looks like a bin-packing problem
adu what does category:mul_op mean? 18:43
18:43 alim left
TimToady asfqwerty_: see rosettacode.org/wiki/Knapsack_problem for possible algorithms 18:44
asfqwerty_ thanks TimToady :) i'll look into that and the "bin-packing" thing
TimToady category is itself a syntactic category that defines other categories
hence we bootstrap with category:category 18:45
adu ok
kind of mind bending 18:46
TimToady though STD only uses <category> in one spot, which might be a design smell
moritz and I might not need the category: thing in that article
TimToady adu: well, most people try to learn a new language by starting at the small end, not the large end... :) 18:47
diakopter asfqwerty_: that reminds me of a Google interview question someone told me they had
tadzik 'evening
adu subshortname?
TimToady: which end am I starting at?
TimToady not the small end :) 18:48
asfqwerty_ oh... so it must be a really hard problem
dalek kudo/nom: ad3a7b6 | moritz++ | src/core/Str.pm:
add native str concatenation op
18:48 alim joined
moritz asfqwerty_: not necessarily. There's not enough to solve really hard problems in interviews 18:48
18:48 kboga joined
TimToady in fact, subshortname is what allows us to have names like infix:<+> 18:49
adu ya, <category> is used in <subshortname> which is used in <sublongname> which is used in a lot of places
18:50 cogno left
TimToady but oddly, not in method declarations, which is probably, as I say, a design smell 18:51
adu so is there a difference between categories and protos? 18:52
TimToady categories are a specialized kind of proto that takes longest token matching into account 18:53
most protos are merely doing multiple dispatch
sisar if someone can take a look: irclog.perlgeek.de/perl6/2012-05-07#i_5555441 18:54
TimToady when you talk about lexer vs parser, this is something that is implicit in Perl 6
you just write the grammar, and Perl 6 derives a lexer for you from it
adu fascinating 18:55
TimToady and basically, every time you tweak the current language, it writes a new lexer
(hopefully reusing the reusable bits for efficiency)
PerlJam adu: magic is a common ingredient in Perl 6 ;)
TimToady so when I defined a new postfix above, it wrote a new lexer with a different set of tokens for the postfix rule
moritz sisar: nothing obvious 18:56
sisar moritz: maybe you can try it on your side? should I wait more than 3min ? 18:57
TimToady we're still trying to figure out how to do that efficiently, but it's the right way to do it from the viewpoint of allowing extensibility
moritz phenny: ask arnsholt if anything is blocking the merge of the cstr branches
phenny moritz: I'll pass that on when arnsholt is around.
moritz sisar: no need to wait that long
TimToady sorear++ likes to call this "wishful thinking", and it is
but to me, wishful thinking is another name for "vision"
sisar moritz: yeah, i figured.
moritz sisar: it seems to hang when passing a single value to merge_sort 18:58
TimToady and if language immutability is what turns out to make optimization possible, then I'd just point out that all the immutable languages are also sub-dialects of Perl 6... :) 19:01
moritz sisar: ah, changing it to @a[ $m ..^ +@a ] fixes it
known bug in the range op, iir
c
sisar moritz: :) thanks for clearing that up. I was stumped for a while. 19:02
TimToady masak: yes, that paper is definitely in the same mindspace as Steele's, and where we want to head with the internals of hyper context. 19:03
moritz sisar: trying a fix now
sisar wow ! 19:04
today moritz++ and jnthn++ are on a roll :)
TimToady crumb, it's already lunchtime...how'd that happen?
diakopter mmm picnic 19:05
moritz r: say <jnthn moritz>.roll 19:07
p6eval rakudo 3c92ea: OUTPUT«jnthn␤»
TimToady adu: actually, what I'd really like to see is a Go backend for Perl 6 :)
moritz that would rock, yes
diakopter I thought perlito had one
adu well, I'm very familiar with Go 19:08
not sure what's involved in making a backend tho
TimToady jnthn++ has been thinking about that a lot lately 19:09
in a general way
adu would it compile Perl6 to Go code?
moritz yes
TimToady or to whatever Go compiles to, if there's some lower-level form 19:10
moritz "Perl 6 to go" -- "did you mean 'to take away?'"
adu TimToady: there are 3 lower-level forms
TimToady
.oO(and then?)
diakopter I thought Go didn't have a runtime "eval" or code loading facility
jnthn
.oO( I figure TimToady means I've been thinking about backends a lot more than Go a lot... :) )
TimToady so, to a low-level form that maximizes the product of portability and cleanliness 19:11
PerlJam jnthn: but whose backend?
jnthn PerlJam: ouch :P
TimToady diakopter: one would presumably have to include an interpreter of some sort in that case
19:11 Chillance joined
TimToady but hopefully an interpreter than can interact with compiled code as well 19:12
adu (1) C (which is a slightly nonstandard C which 6c/8c parses) (2) .s (which is an assembly language incompatible with gas), and (3) .o (which is a static library format incompatible with all linkers)
TimToady every VM is going to have emulate/translate decisions
19:13 isBEKaml joined
TimToady diakopter: and I'll note that Perl 5 is written in C, and yet provides 'eval'...it just doesn't do the compiling to C part very well yet... :) 19:13
adu TimToady: then I would recommend just compiling to pure Go 19:14
TimToady the main problem with compiling to another high-level languages is where to do name-mangling
and how does the source language distinguish names that need to be mangled form those that don't 19:15
adu right, then maybe Go's C
TimToady same problem, slightly different keywords
19:15 birdwindupbird joined
TimToady but basically, same problem that STD has translating bits to P5, when P5 doesn't know about names like infix:<**> 19:16
adu well Go's C-naming convention is package(center dot)funcname 19:17
TimToady and P6 is probably just Go:: on the front of the name, or some such
otherwise we assume sufficient mangling to avoid collisions
adu TimToady: for example: runtime·memmove() 19:18
gcc doesn't accept the center dot, but 6c/8c do
TimToady we tend to be more specific about our "other language" since there may be other target languages than C
much like we use .perl where, say, Pything uses .repl 19:19
we assume there are many repls :)
adu you might do something like P6·say
TimToady you mean in the generated code?
adu yes
TimToady okay, that makes sense 19:20
adu but I feel like it would be possible to bring all of the Go runtime to parrot 19:21
TimToady we'll teach everyone how to use a Compose key yet...
adu lo
l
19:21 am0c left
adu on mac it's shift-opt-9 19:22
TimToady how...mnemonic...
19:22 uniejo joined
adu heh 19:22
19:22 uniejo left
adu as in plan9? 19:22
TimToady compose . - here
though why - I dunno. 19:23
CTRL+SHIFT u b 7 also works here under Gnome 19:24
I keep wishing for the vim digraphs under my compose key though...
I guess that's ^K . M in vim 19:25
19:26 xenu_ left, araujo left
TimToady perl6: sub don't-know ($x) { say "I dunno about $x." }; don't-know 'the details of Go identifiers' 19:27
p6eval pugs, rakudo ad3a7b, niecza v17-2-gb8fcf85: OUTPUT«I dunno about the details of Go identifiers.␤»
TimToady but I doubt it'd like that one 19:28
must...eat...lunch... 19:31
adu Haskell people would like that 19:32
19:33 xenu joined, xenu is now known as Guest378 19:36 zby_home_ left
tadzik 2 *** other S02 data types -- KeySet, KeyBag 19:39
(ROADMAP) do we have something remaning here?
moritz tadzik: I think .Str is still not passing tests; otherwise it's implemented 19:40
tadzik I'll just assign myself to it and take care
moritz ++tadzik 19:41
dalek kudo/nom: cc19e25 | moritz++ | src/core/Range.pm:
make a range with Real min coerce the max to to Real too
moritz sisar: that commit should fix the mergesort example from rosettacode
19:42 araujo joined, araujo left, araujo joined
moritz sisar++ # bringing it to my attention 19:42
19:42 goraki left
dalek kudo/nom: 5ccbf3a | tadzik++ | docs/ROADMAP:
Add myself to some ROADMAP things
19:42
tadzik KeySets remind me of some Roles things we couldn't agree upon on GPW 19:43
S14: a private attribute declared using has is private to the class, not to the role. 19:44
moritz ah right
I think we agreed to change that
but rakudo currently does neither/nor
tadzik yeah
jnthn What did we decide? 19:45
moritz r: role R { has $!a }; class A does R { has $!a };
p6eval rakudo ad3a7b: OUTPUT«===SORRY!===␤Attribute '$!a' already exists in the class 'A', but a role also wishes to compose it␤»
jnthn I agree the current situation is sub-optimal
tadzik something I've found lying around:
r: gist.github.com/2638792
p6eval rakudo ad3a7b: OUTPUT«Can not get non-existent attribute '$!a' on class 'MyRole'␤ in submethod BUILD at /tmp/yIypOHPuWo:8␤ in method BUILDALL at src/gen/CORE.setting:605␤ in method bless at src/gen/CORE.setting:590␤ in method new at /tmp/yIypOHPuWo:5␤ in block <anon> at /tmp/yIypOH…
moritz r: role R { has $!a }; class A does R { method x() { $!a } };
p6eval rakudo ad3a7b: OUTPUT«===SORRY!===␤Attribute $!a not declared in class A␤at /tmp/CG6sCOWzx4:1␤»
19:45 bbkr1 joined, raiph joined
moritz jnthn: I think we agreed to make the attributes private to the role 19:46
so that two roles using attributes of the same name wouldn't conflict
jnthn moritz: OK
I like that.
I wonder how to make it happen. :)
moritz at least that's what I remember
tadzik yeah, something of this sort
jnthn I think it's easy until...it becomes uneasy :)
moritz and masak++'s bright face while talking about the encapsulation aspects of it :-)
tadzik you can resolve methods in the class consuming the roles, but it's not possible with attributes 19:47
masak shows the bright face again, just to make sure that's how it happens 19:49
:D 19:50
tadzik hears "hi hi" in the back of his head
the masak of Cheshire
jnthn Oh, I remember where things got messy. 19:53
The naive approach is to say "well, we just use the role as the lookup handle for attributes, rather than have the ::?CLASS type var and use its reification in the lookup" 19:54
Then you find that you have class A does R { }; class B is A does R { }
And oops, how the two compositions of the role are sharing storage slots. 19:55
s/how/now/
moritz hm, that's kinda consistent with the "roles never conflict with themselves" doctrine
jnthn moritz: Apart from they kinda are
moritz though not sure if that's desirable though 19:56
jnthn I suspect it ain't :)
masak that second role composition looks like a complete no-op to me. 19:57
jnthn Anyway, it seems you still need some genericity; it's probably that you somehow want the attribute lookups to have a type var other than ::?CLASS, that is mapped to the concrete role, but I think there may be an awkward circularity there..
masak: Flattening composition.
Do drive it home, we don't even need attributes:
masak .oO( flattening will get you nowhere )
jnthn role R { method m() { 1 } }
class A does R { }
fglock re Go backend: perlito6 was bootstrapped in Go, but then Go changed (it was very new back then) 19:58
jnthn class B is A { method m() { 2 } }
class C is A does R { }
C.m
masak: Output of above?
masak 2
jnthn o.O
masak no?
TimToady fglock: Perl 6 changed too, I suspect. :)
masak was that wrong? :)
jnthn: surely any method from the class hierarchy (even if not from that actual class) wins over a method from a role? 19:59
jnthn masak: You're saying that C's local decision to compose a role can result in that becoming a no-op because a parent class also composed it?
fglock that too :)
masak jnthn: oh wait!
sorry, I saw wrong. C doesn't inherit from B.
jnthn masak: You seem to think roles are invovled in dispatch...
argh
I meant for it to as well :(
I meant
class C is B does R { }
:)
And I still want "1"
masak jnthn: but you're saying that the R in C wins over B?
jnthn masak: Of ocurse it has to. 20:00
That's what flattening composition means.
20:00 fgomez joined
jnthn "Copy the role's declarations into the class" 20:00
masak r: role R { method m { 1 } }; class A does R {}; class B is A { method m { 2 } }; class C is B does R {}; say C.new.m
p6eval rakudo ad3a7b: OUTPUT«1␤»
20:00 fglock left
masak jnthn: you're right. 20:00
moritz :-)
20:00 fgomez left
masak and I should know better than to argue with you about these things. ;) 20:01
20:01 fgomez joined
masak but yeah, that makes it more "interesting". 20:01
moritz p6: role R { method m { 1 } }; class A does R {}; class B is A { method m { 2 } }; class C is B does R {}; say C.new.m
p6eval pugs, rakudo ad3a7b, niecza v17-2-gb8fcf85: OUTPUT«1␤»
masak \o/
three compilers, one cup.
er. answer.
diakopter eek
tadzik argh
jnthn It was only *two* :P
moritz some people, when faced with a problem, think "Oh, I know, I'll use junctions". Now they have any(1, 2) problems
jnthn :D
masak moritz: autopun :P
moritz masak: you win a cookie 20:02
jnthn I'll make a branch in the next day or so to explore changing the role things, anyways.
I'm pretty optimistic P6opaque is up to the challenge, we just need to feed it the right info with regard to attribute lookups. 20:03
20:03 mdupont joined
masak \o/ 20:04
20:11 sisar left
TimToady btw, rosettacode is down, so if anyone here has su access there, help would be appreciated 20:17
kboga oh haai p6!
moritz \o kboga
masak kboga! \o/
moritz long time no see
and back with a patch \o/ 20:19
jnthn kboga: omgz...just saw your pull request!
kboga is it bad?
jnthn kboga: no, it's totally awesome that you've shown up with a patch for it :)
Wasn't expecting that :)
moritz we had a branch for that, real-trouble :-) 20:20
it had some... trouble :-)
jnthn Right :)
moritz spectests the patch
masak kboga++ # showing up with a patch 20:22
jnthn moritz: Patch looks good to me, after a read through. 20:23
+1 to apply if spectests are clean
kboga++
moritz it's a "I fixed your numbers" patch :-)
jnthn Real good!
kboga haha 20:24
moritz it passes the Torvalds tests 0 and 1, looks good and compilers 20:25
*compiles
20:27 alim left, birdwind1pbird joined 20:28 birdwindupbird left
benabik That's one more test than Linus uses for patches he sends to the git list. 20:28
TimToady which one?
benabik Compiles. 20:29
I assume he's somewhat more rigorous about Linux patches.
20:30 kaare_ left 20:31 birdwind1pbird is now known as birdwindupbird
dalek d: f4748eb | larry++ | STD.pm6:
improve message on .meth (stuff)

old message would point to the paren and say you needed parens...
20:35
kudo/nom: 4157918 | kboga++ | / (10 files):
Made Real a role, fixed the trouble with log & exp multi's that gave, fixed the num cmp's to return Order enum stuff, added missing round multi sub to Num, added missing methods to Real, added missing subs, enabled real-bridge.t which now passes.
20:36
jnthn There's 200 more tests... o.O 20:37
kboga++ again
Probably tipped us over the 22,000 mark.
masak that... is impressive. 20:38
20:45 envi_ left, adu left, snearch left 20:56 jferrero left 20:58 adu joined 21:02 Tedd1 joined 21:03 skids left
moritz [Coke]: FYI when smoking rakudo with t/spec/test_summary you now need PERL6LIB=lib:. 21:08
though in the long run I should really fix the tests and not require the .
adu Coke is smoking rakudo? 21:11
diakopter the rest of us get it second-hand
adu lol
masak smoked rakudo tastes the best. 21:12
moritz 22048 passes on my machine 21:13
"total", 22048, 0, 709, 1887, 24644, 24117
21:14 birdwindupbird left
jnthn \o/ 21:15
21:15 wolfman2000 joined
tadzik kboga++ 21:18
masak r: 24_117 - 22_048 21:19
p6eval rakudo 415791: ( no output )
masak r: say 24_117 - 22_048
p6eval rakudo 415791: OUTPUT«2069␤»
masak we're running low on failing tests :P 21:20
tadzik weird, I have Tests=24102
moritz so, 15 difference
tadzik or those are passed+skipped?
masak oh!
r: say 24_644 - 22_048
p6eval rakudo 415791: OUTPUT«2596␤» 21:21
masak a bit better.
diakopter r: say delimit 241025348275725, "_"
p6eval rakudo 415791: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&delimit' called (line 1)␤»
masak r: sub delimit($_, $sep) { .flip.comb(/..?.?/).join($sep).flip }; say delimit 241025348275725, "_" 21:23
p6eval rakudo 415791: OUTPUT«241_025_348_275_725␤»
adu is this right? { '{' ~ '}' [ <element> ** ',' ] ','? }
masak adu: no, not anymore.
<element> ** ',' turned into <element>+ % ',' 21:24
and those [] look superfluous to me.
adu ok
diakopter masak++ # delimit 21:25
moritz depends on which tool adu uses 21:26
masak troo
moritz nqp has the current syntax, nqp-rx still the old one
adu right now I'm using nqp
diakopter r: sub delimit($_, $sep) { .flip.comb(/..?.?/).join($sep).flip }; say delimit 241025348275725.3352, "_" # masak... I don't get it <- 21:29
p6eval rakudo 415791: OUTPUT«241_025_348_164_334␤»
diakopter brb
masak hm. 21:31
r: .say for 241025348275725.3352.flip.comb
p6eval rakudo 415791: OUTPUT«4␤3␤3␤4␤6␤1␤8␤4␤3␤5␤2␤0␤1␤4␤2␤»
masak r: .say for 241025348275725.3352.flip.comb(/..?.?/)
p6eval rakudo 415791: OUTPUT«433␤461␤843␤520␤142␤»
masak o.O 21:32
r: say 241025348275725.3352
p6eval rakudo 415791: OUTPUT«241025348164334␤»
masak ah.
bug?
21:32 pernatiy joined
colomon absolutely 21:33
n: say 241025348275725.3352
p6eval niecza v17-2-gb8fcf85: OUTPUT«241025348275725.31␤»
masak submits rakudobug 21:34
jnthn r: say (241025348275725.3352).WHAT 21:35
p6eval rakudo 415791: OUTPUT«Rat()␤»
jnthn Is it not just different levels of precision when the Rat is converted to a Num for printing?
Niecza normally gets a few more digits than Rakudo.
masak r: say 241025348275725.3352.nude 21:36
p6eval rakudo 415791: OUTPUT«301281685344656669 1250␤»
masak jnthn: seems you're right.
$ dc
4k
301281685344656669 1250/ p 21:37
241025348275725.3352
jnthn wonders if Rakudo can't get itself a bit more precision somehow though.
21:38 alester left 21:42 Chillance left, Chillance joined
masak adds these new findings to the ticket 21:46
TimToady maybe it's a mistake to use Num as an intermediate form in Str conversion 21:48
21:50 jferrero joined
TimToady certainly it's easy to write the direct conversion, if you don't need E notation 21:50
dalek blets: d29cec5 | (Herbert Breunung)++ | docs/ (2 files):
linkfixes
21:51
21:52 Guest378 left, icwiener left 21:57 xenu joined 21:58 xenu is now known as Guest98158
masak 'night, #perl6 21:59
22:00 adu left 22:01 Guest98158 left 22:02 xenu_ joined
dalek blets: 69038e7 | (Herbert Breunung)++ | README.md:
restructure the readme a bit
22:05
TimToady n: gist.github.com/2639796 22:08
p6eval niecza v17-2-gb8fcf85: OUTPUT«241025348275725.3352␤18446744073709551616.33333333333333333333␤»
TimToady r: gist.github.com/2639796
p6eval rakudo 415791: OUTPUT«241025348164334.1113913352␤18446744073709551616.33333333333333333333␤»
TimToady hm, almost works under rakudo 22:09
p: gist.github.com/2639796 22:10
p6eval pugs: OUTPUT«241025348275725.3352␤18446744073709551616.33333333333333333333␤»
22:10 spider-mario left
diakopter rat to string? 22:10
TimToady yes
except rakudo doesn't seem to handle the front integer well 22:11
oddly, it works right on my machine under rakudo 22:12
maybe I need to "upgrade" 22:13
diakopter which integer is the front one
TimToady 241025348275725 22:14
diakopter oh heh
22:14 whiteknight joined
TimToady r: say 241025348275725.3352.floor.WHAT 22:14
p6eval rakudo 415791: OUTPUT«Int()␤»
TimToady r: say 241025348275725.3352.floor 22:15
p6eval rakudo 415791: OUTPUT«241025348164334␤»
TimToady bleah
diakopter what does your local rakudo say
TimToady the same as niecza
so some kind of regression
recompiling rakudo now 22:16
diakopter how old was your working one
TimToady r: say 241025348275725.floor
p6eval rakudo 415791: OUTPUT«241025348275725␤»
TimToady oh, a week or so
was outatown last week fetching quietfanatic from college 22:17
diakopter r: say 241025348275725.0.floor
p6eval rakudo 415791: OUTPUT«241025348275725␤»
22:17 _ilbot left
diakopter r: say 241025348275725.00000000.floor 22:17
p6eval rakudo 415791: OUTPUT«241025348275725␤»
diakopter r: say 241025348275725.1.floor
p6eval rakudo 415791: OUTPUT«241025348275725␤»
diakopter r: say 241025348275725.0001.floor 22:18
p6eval rakudo 415791: OUTPUT«241025348271708␤»
diakopter r: say 241025348275725.001.floor
p6eval rakudo 415791: OUTPUT«241025348110647␤»
diakopter r: say 241025348275725.01.floor
p6eval rakudo 415791: OUTPUT«241025348275725␤»
diakopter r: say 241025348275725.005.floor
p6eval rakudo 415791: OUTPUT«241025348275725␤»
TimToady as long as you stick with $ and ¢ you'll be fine :)
22:18 PacoAir left
diakopter r: say 241025348275725.004.floor 22:19
p6eval rakudo 415791: OUTPUT«241025348275725␤»
diakopter r: say 241025348275725.006.floor
p6eval rakudo 415791: OUTPUT«241025347842211␤»
diakopter r: say 241025348275725.0055.floor
p6eval rakudo 415791: OUTPUT«241025348244865␤»
diakopter r: say 241025348275725.0054.floor
p6eval rakudo 415791: OUTPUT«241025348271708␤»
diakopter r: say 241025348275725.0053.floor
p6eval rakudo 415791: OUTPUT«241025348271708␤»
diakopter r: say 241025348275725.0052.floor
p6eval rakudo 415791: OUTPUT«241025348271708␤»
diakopter r: say 241025348275725.0051.floor
p6eval rakudo 415791: OUTPUT«241025348271708␤»
diakopter r: say 241025348275725.0050.floor
p6eval rakudo 415791: OUTPUT«241025348275725␤»
diakopter hmm ok
I wonder what numeric progression that is
0050 something 22:20
22:21 benabik left, _ilbot joined
TimToady still works fine after recompile; is p6eval on a 32-bit machine? 22:21
diakopter looks
no 22:22
TimToady strangeness
and we're running the same version... 22:24
diakopter p6eval@feather3:~/rakudo/parrot$ ./parrot -V
This is Parrot version 3.6.0-devel built for i386-linux.
TimToady well it's the same git hash as mine
can you have the same githash and be running a different branch? 22:25
diakopter is your parrot 64-bit?
22:26 noam_ left, noam_ joined
TimToady iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8, 22:27
ptrsize=8, byteorder=12345678,
nv=double, numvalsize=8, doublesize=8, longdoublesize=16
diakopter how'd you get that 22:28
TimToady these parameters are not terribly well named...
parrot/myconfig 22:29
diakopter iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4,
ptrsize=4, byteorder=1234,
nv=double, numvalsize=8, doublesize=8, longdoublesize=12
TimToady well, there you have it
parrot has wordsize dependencies...who'da thunk it? 22:30
diakopter all arithmetic should be arbitrary precision!!!
transcendentals should be used to their furthest known precision!!! 22:31
TimToady do I detect a note of sarcasm? 22:32
diakopter three triple-negating exclamation notes
22:33 ponbiki joined
jnthn blaught: 6guts.wordpress.com/2012/05/08/sinc...hackathon/ 22:33
TimToady "All music is folk music. Ain't never heard no horse sing no song..." --Louis Armstrong
jnthn :P
TimToady quadruple negative there
jnthn Teaching tomorrow so...sleep & o/
diakopter o/
TimToady \o 22:34
still and all, .floor shouldn't be limited by the integer word size, if the numerator is arbitrarily big 22:35
so I call rakudobug
diakopter Rodents of Unusual Size 22:36
TimToady now what gives me the idea that Unusual usually means Big there...
diakopter in the Fire Swamp, you hear a popping noise before the flames shoot up from the ground 22:37
TimToady well, yes, and I have a cat that keeps using the word "meow"
I don't think that word means what she thinks it means.
huf i think it always means what she wants it to mean :) 22:38
TimToady actually, right now, I think it means "I want to be slept under."
so nap & 22:39
huf hehe
22:41 thelazydeveloper left 22:42 fgomez left, skids joined 22:45 spaceships left
diakopter r: say 3875928375982735.383854792874359827349682.floor 22:47
p6eval rakudo 415791: OUTPUT«3875928375982729␤»
diakopter phenny: tell TimToady try 3875928375982735.383854792874359827349682.floor on p6eval 22:48
phenny diakopter: I'll pass that on when TimToady is around.
22:57 spaceships joined 22:58 xenu_ left, asfqwerty_ left 22:59 fgomez joined, ponbiki left 23:02 tyatpi left 23:03 xenu joined 23:04 xenu is now known as Guest37127 23:09 Guest37127 left 23:12 fgomez left 23:15 xenu_ joined 23:23 xenu_ left, raiph left, fgomez joined 23:24 thou left 23:28 fgomez left 23:29 NamelessTee left 23:38 xenu joined, xenu is now known as Guest33780 23:39 NamelessTee joined 23:47 NamelessTee left 23:48 Chillance left 23:52 Guest33780 left