»ö« 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.
diakopter felher: neither do I 00:00
00:00 tokuhirom joined 00:01 tokuhir__ left
felher diakopter: what is it that you don't understand? (This conversation surely looks odd) 00:01
diakopter I don't understand what I was trying to say 00:02
felher diakopter: the perfect basis for a good conversation ;) 00:05
diakopter you said it
00:20 nif joined
felher moritz: ping 00:26
dalek blets: ea5daf7 | (Herbert Breunung)++ | html/ (4 files):
first css styles to beautify quotes and normal text
00:34
00:36 machine2 left 00:37 fglock left 00:41 machine2 joined 00:45 ocharles left 00:47 scott__ left 00:58 scott__ joined 01:12 jferrero left, leprevost joined 01:13 jferrero joined 01:14 IngisKahn joined 01:16 Ingis left 01:19 havenn joined 01:22 vlixes left, wolfman2000 joined 01:41 skipper joined
moritz felher: pong 01:41
felher moritz: wow. i didn't think you'll respond at 3:45 am :) 01:43
01:44 szbalint left, szbalint joined, havenn left
felher moritz: in core/IO.pm there are quite a few lines like: "try { IO-thing } $! ?? fail($!) !! True". Which doesn't work since $! is either Mu or a Exception and $! is therefore false everytime. If i'm right about this i will search for those, fix them and make a patch :) 01:44
01:48 jerome_ left 01:50 havenn joined
felher moritz: my solution is to write "$!.defined ?? ..." instead of "$! ??". Is that an ok fix for the problem? 01:51
01:54 skipper left 01:56 cj left 02:01 cj joined 02:06 drbean left
moritz felher: I think the real fix is to make defined exceptions true again 02:06
felher: (and, conversely, make a failed try {} return Nil or Any instead of the exception, but you can leave that to somebody else) 02:07
felher moritz: so fail('blar').Bool shall return True? 02:08
02:09 drbean joined
felher moritz: was there a time where defined Exception were considered True? 02:10
moritz fail('blar').True never executes the .True
02:10 whiteknight left, perigrin joined
moritz because fail($x) is really return(Failure.new(exception => X::AdHoc.new(payload => 'blar'))) 02:11
so the return is executed before the .True ever has a chance to run
well, excepts are just normal objects. Only Failure is considered magical (false, undefined, explodes on usage etc.) 02:12
*exceptions
and for normal objects, .True == .defined
and it was that way in rakudo before nom too
02:12 perigrin left
felher moritz: hm.. sounds reasonable :) 02:13
moritz (and usually I'm not up at this time, but $daughter decided that she was sweating, hungry, thirsty /and/ had toothing pain all at once) 02:14
felher Ah, i see :) Poor child, poor father :) 02:15
02:16 orafu left, orafu joined
moritz ah well, she's better now. And I'll try to sleep once more :-) 02:16
felher moritz: good luck, and may both of you sleep well :) 02:17
moritz thanks :-) 02:18
02:20 xinming_ left 02:21 xinming joined 02:26 thelazydeveloper left 02:45 nif left 02:50 havenn left 02:57 IngisKahn left 02:59 scott__ left 03:00 mikec left, xinming left, mikec joined, xinming joined 03:11 perigrin joined 03:28 perigrin left 03:31 leprevost left 03:45 wolfman2000 left, benabik joined 04:21 IngisKahn joined 04:31 jaldhar left, _jaldhar joined 04:32 envi_ joined 04:36 constantined joined 04:43 _jaldhar left 04:57 NamelessTee joined 05:07 kaleem joined 05:10 jrockway left 05:12 jrockway joined 05:27 replore joined 05:31 Woodi joined
Woodi hallo everyone :) 05:31
05:34 envi_ left 05:36 birdwindupbird joined 05:39 cotto left, cotto joined 05:41 colomon left
tadzik hello Woodi 05:42
Woodi how progress going ? :) 05:49
05:50 colomon joined
tadzik with Perl 6 you mean? Not bad I guess :) The Oslo Hackathon is upcoming 05:50
Woodi ah, the imprezas :) forgot, was in virtual world for a while... but Oslo sounds close... 05:52
tadzik do come :) 05:55
we have quite a team coming from Poland
Woodi heh :) 05:57
lastly I learned thet team is the best weapon :)
tadzik like, whole two people
Woodi any web page for Hackathon ? or easy to google ? 05:58
05:58 NamelessTee left
tadzik hm 05:59
gist.github.com/1711730
Woodi I wonder if I can get free days. but if that will happen I can annoy ppls with photo camera... 06:02
tadzik no hacking? 06:03
Woodi I can talk too :) 06:04
tadzik :)
Woodi realy I was hoping for learning :)
tadzik me and moritz++ have already blogged about our plans for hackathon
if masak haven't hijacked planetsix you could even easily find the posts :P 06:05
Woodi will check :)
ok, away from that keyboard for a while... 06:06
06:33 xdbr joined 07:02 machine2 left 07:07 fhelmberger joined 07:12 brrt joined 07:14 kresike joined
masak good awakening period, #perl6 07:52
tadzik heyawn masak 07:53
moritz \o masak
masak sorry sorry about hogging planetsix :/ 07:54
07:55 fglock joined
tadzik :) pay no minnd 07:57
it's a clever hack, intentional or not
masak not really.
tadzik I wonder how many blog aggregators can be hijacked in this way
08:05 SHODAN left
masak can you always take something non-deterministic and emulate it deterministically, if you accept an exponential slowdown? 08:13
08:14 kst left 08:15 kst joined
arnsholt masak: Good question. Anything in particular you're musing? 08:16
moritz masak: only if there is a "reduce" function that runs in polynomial time
masak: and which allows you to reduce the explored space of exponential configuration to a single random event
consider a random passwort generator. You cannot emulate it with something determinstic 08:17
you can, in exponential time, list all the passwords it would create, but that doesn't help in you printing a single, random password to the user 08:18
because there's no deterministic way to pick a random item of a huge list
masak arnsholt: I'm sniffing around in the vicinity of automatic saga correctness analysis, DFAs and NFAs. 08:19
moritz: I think we might be having slightly non-aligned definitions of "non-deterministic". 08:31
moritz masak: you are refering to the idea of a machine that can magically chose "right" branches? 08:32
masak yes, that. 08:33
moritz: my definition is exactly that of the "N" in "NFA", that is, an input may cause several state transitions.
08:33 dakkar joined
masak "at once". 08:33
moritz masak: well, if your model also includes that the final answer is only a binary decision, and that the runtime is polynomial otherwise, then yes, you can always simulate the nondeterministic machine in O(exp(deterministici)) 08:34
masak that's my intuition too. 08:36
because you can emulate being at N states at once by keeping a 2**N state vector around.
I don't see why you need the proviso "and that the runtime is polynomial otherwise". 08:37
bonsaikitten so the only problem is that your state space expands by 2**N worst case 08:38
moritz masak: because otherwise N can grow very fast 08:39
masak moritz: right, but the relative slowdown is exponential regardless what the time complexity was first. 08:40
arnsholt masak: Isn't this more or less the essence of P vs. NP?
masak bonsaikitten: that only feels like a problem if I decide to map out the derived DFA in memory.
moritz masak: I'm not sure that proviso is necessary, but I know that my previous exposure to machine theory and complexity theory has mostly been limited to things faster than O(exp(exp(N)), so I'm being careful 08:41
bonsaikitten masak: the NFA -> DFA transform is usually benign (and you can minimize)
masak arnsholt: yes, I think so. NP is the class of things doable in polynomial time by a non-deterministic Turing machine.
moritz: :)
08:47 spider-mario joined 08:59 tarch joined 09:34 FACEFOX left 09:37 FACEFOX joined, FACEFOX left 09:38 literal_ is now known as literal 09:39 FACEFOX joined, FACEFOX left 09:41 FACEFOX joined, FACEFOX left 09:43 FACEFOX joined 09:49 replore left 09:52 thelazydeveloper joined, replore joined 09:53 replore left 09:58 ocharles joined 10:17 bacek joined 10:24 NamelessTee joined 10:28 daxim joined 10:38 jferrero left 10:52 jferrero joined 10:58 mauror joined 11:06 benabik left
masak std: my %h = END => 1; 11:12
p6eval std 1ad3292: OUTPUT«ok 00:00 41m␤»
masak r: my %h = END => 1;
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix => instead at line 1, near " 1;"␤»
masak submits rakudobug
jnthn Need real LTM to really fix that one. 11:20
11:21 JimmyZ joined
masak at first blush LTM seems unrelated to this one, which is all about the interplay between the bareword token and the fat comma. 11:24
jnthn It's almost certainly related 11:27
END => should win because the declarative prefix incorporates the =>
JimmyZ aloha 11:35
moritz moin
jnthn dobry den :)
bbkr dzien dobry :) 11:36
masak dober dan :) 11:37
daxim I just learnt that c# has invisible invocants. Blah() is a method call in the current context 11:38
jnthn It may be, or it may be a sub call (though they call their subs static methods, misleading a bunch of folks into thinking they're doing OO when they ain't at all...) 11:41
masak I think it's a stretch to put an equals sign between subs and static methods. it may confuse just as much as it enlightens. 11:46
anyway, Java does the same. Eclipse makes the static method calls cursive, so you get a bit of a visual cue which is which.
gfldex r: macro f_macro($name){ return quasi < sub <<< $name >>> (){ say 'i am <<<$name>>>'; } > }; f_macro('foo'); foo(); 11:52
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/rW_rWZ37Z1:1␤»
gfldex am i doing something silly?
tadzik you're doing something NYI using the wrong syntax :)
gfldex what would be the right syntax? 11:53
masak a couple of things here. 11:54
quasi < > isn't supported, so far as I know. 11:55
r: quasi {}; say "alive"
p6eval rakudo 3bd91f: OUTPUT«alive␤»
masak r: quasi <>; say "alive"
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/eq45vsV6bF:1␤»
masak even if it were, the triple-brace syntax (which is part of the next big step forward, D2), isn't supported yet.
gfldex r: macro f_macro($name){ return quasi { sub {{{$name}}} (){ say 'i am {{{$name}}}'; } } }; f_macro('foo'); foo();
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
masak and even if it *were*, you probably won't every be able to insert an unquote after 'sub', because that's not a term as such. 11:56
ever*
gfldex is there any other way to inject subs with a given name into the scope? 11:57
masak not really. scopes are more static than that. 11:58
you can make subs scope-sensitive by using a neat trick with dynamic variables that I really should document/blog about some day.
gfldex so if i want to do code generation that results in haveing lots of fairly similar functions i have to write some .pm to disk 11:59
moritz for now, yes 12:00
masak gfldex: well, there's always code generation/eval of whole programs. 12:01
tadzik hmm, not really
well, for subs yes, for methods no
masak and there's also textual macros, at least in Pugs. :)
tadzik Redis library cheats in a similar way, adding lots of methods using .^add_method
they're all generated iirc, name, signatures, code 12:02
masak gfldex: oh! and fourthly, if you just declare a sub in a quasi block, no-one's ever gonna see it outside of the quasi block anyway. that follows from hygiene. subs are lexical.
gfldex: presumably you could do my &COMPILING::foo; or some such, though.
gfldex i actually have a usecase for that :) 12:03
12:03 spider-mario left
gfldex gist.github.com/2366834 12:03
trivial to do in javascript
just need to copy over the functions from one namespace to another 12:04
moritz well, the proper is probably to create 'is export'ed functions somewhere, and then import them at compile time 12:05
masak well, lexpads are static in Perl 6. and for good reasons.
moritz *the proper solution
we just aren't there yet
tadzik gfldex: see github.com/slunski/perl6-simple-re...is.pm#L137 for some inspiration
12:05 benabik joined
moritz except that this generates methods, not subs 12:06
12:06 bbkr left
moritz but I guess we should have a similar meta-level API for installing subs 12:07
tadzik yes
12:08 constantined left
gfldex could i do some ::= in a macro? 12:08
12:09 pernatiy joined, brrt left
masak you can run arbitrary code in a macro. 12:13
but I have a feeling you really have another question in mind. :)
moritz: problem is later when calling those subs, you have to do it indirectly somehow. because CHECK time will disallow any sub calls to things that were never declared. 12:14
moritz masak: that's why I said "and then import them at compile time" 12:15
masak hm. 12:16
that would be neat, yes.
gfldex could a package be constructed at runtime? 12:17
12:18 _jaldhar joined
masak r: say Package.new 12:18
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Package' called (line 1)␤»
masak r: say Module.new
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Module' called (line 1)␤»
masak oh wait. this is all done by HOWs :) 12:19
r: say PackageHOW
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&PackageHOW' called (line 1)␤»
masak hm.
moritz r: say Perl6::Metamodel::PackageHOW.new()
12:19 sftp left
p6eval rakudo 3bd91f: OUTPUT«Could not find symbol 'Perl6::Metamodel::&PackageHOW'␤ in block <anon> at /tmp/GrzAFKjXMU:1␤␤» 12:19
12:19 sftp joined
moritz r: package A { }; say A.HOW 12:19
jnthn Just Metamodel::PackageHOW
p6eval rakudo 3bd91f: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::PackageHOW'␤ in sub say at src/gen/CORE.setting:6258␤ in block <anon> at /tmp/leaM0xvvZ1:1␤␤»
masak r: say Metamodel::PackageHOW 12:20
p6eval rakudo 3bd91f: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::PackageHOW'␤ in sub say at src/gen/CORE.setting:6258␤ in block <anon> at /tmp/4B6hSxl7Fs:1␤␤»
moritz r: say Metamodel::PackageHOW.new()
p6eval rakudo 3bd91f: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::PackageHOW'␤ in sub say at src/gen/CORE.setting:6258␤ in block <anon> at /tmp/ePeE3szs2Q:1␤␤»
masak r: say Metamodel::PackageHOW.new_type
p6eval rakudo 3bd91f: OUTPUT«<anon>()␤»
moritz what I had in mind was something like 12:21
package A { }; A.^add_sub(:export, $name, $code);
and then when somebody does a 'use A', they'd get a routine of name $name imported 12:22
gfldex do want! :)
12:22 bbkr joined
masak sounds eminently doable. 12:23
12:24 brrt joined
moritz note that it wouldn't be lexically callable within A, because of the issues masak++ has mentioned 12:24
(and it might need to be a module instead of a package) 12:25
masak hm, does .^add_stash allow something like this already?
yeah, should probably me a module, come to think of it.
moritz r: module A { BEGIN { EXPORT_SYMBOL('&foo', <ALL DEFAULT>, sub { say "OH HAI" }) } 12:27
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
moritz r: module A { BEGIN { EXPORT_SYMBOL('&foo', <ALL DEFAULT>, sub { say "OH HAI" }) } }
p6eval rakudo 3bd91f: ( no output )
moritz r: module A { BEGIN { EXPORT_SYMBOL('&foo', <ALL DEFAULT>, sub { say "OH HAI" }) } }; import A; foo()
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&foo' called (line 1)␤»
gfldex ohh, and about that asking the wrong question thing. Yes I do and quite often so. I found that by stumbling forward without any sense of direction I get to places I never imagined to go to and find thing I never imaged to look for.
I strongly believe that there should be more stumbling in this world. :) 12:28
masak +1
moritz \o/ success
nopaste forthcoming
masak or at least daring to ask questions regardless of whether they're well-formulated.
moritz gist.github.com/2366919 12:30
masak moritz++
there's something exquisitely weird about pushing a subroutine created on-the-fly back into a static lexpad ;) 12:33
moritz the BEGIN is needed because EXPORT_SYMBOL accesses $*EXPORT which is gone at runtime
tadzik moritz: ooh, cool 12:35
jnthn Please call trait_mod:<is>(..., :export) instead of the (should not be leaking out of CORE.setting) EXPORT_SYMBOL 12:38
Calling the trait_mod by yourself is totally legit.
moritz right, that would be less hacky
jnthn: how could I add something to export to a package after it has been composed?
r: my $x = sub { }; $x.name = 'foo'; say $x.name 12:40
p6eval rakudo 3bd91f: OUTPUT«Cannot assign to a non-container␤ in block <anon> at /tmp/hxRw5zt7nY:1␤␤»
jnthn Composition and export are totally orthogonal anyway.
moritz ok, rephrase
jnthn Exports just go in the package's EXPORT::DEFAULT and so forth
moritz I want to do it from outside the package
masak gets on a train 12:41
moritz git updated, now sticks more to the API 12:42
*gist 12:44
it still feels a bit hacky, because the 'is export' trait asks the sub for its name 12:47
and an anonymous sub doesn't have that name, so we need to override the .name method. Yikes.
but it's good to see that such stuff actually works in nom
r: say Regex ~~ Method 12:49
p6eval rakudo 3bd91f: OUTPUT«True␤»
tadzik moritz: I suppose the shell output needs updating now too :)
12:55 uvtc joined
uvtc Just noticed that rakudo.org still has a heading link and instructions for "How to get Rakudo nom". Nom has been merged in, hasn't it? 12:56
Actually, I don't see a "master" branch at github.com/rakudo/rakudo... 12:57
12:57 mucker joined 12:59 tarch left, tarch_ joined
benabik uvtc: nom is the new master. 12:59
uvtc: By default, it should check out nom. People with old checkouts may have to change their config.
moritz well, we should update the website to reflect that 13:00
benabik moritz: True
dalek blets: e1a3c25 | (Herbert Breunung)++ | html/ (28 files):
new inc and navigation order
13:06 PacoAir joined 13:07 fgomez joined
uvtc Is R* 2012.04 expected to land before the Oslo hackathon? 13:08
moritz no, after
we want to include all the good stuff from the hackathon in the release
13:09 kaleem_ joined
uvtc Sounds like the Oslo event is going to be pretty epic. (And the last time I used that word to describe anything was years ago from a skateboard.) :) 13:09
moritz I hope so :-) 13:10
13:10 kaleem left
dalek blets: f368ff0 | (Herbert Breunung)++ | html/ (4 files):
fixed typo in the ssi
13:19
13:31 bluescreen10 joined 13:35 tyatpi joined 13:41 _jaldhar left 13:44 JimmyZ left 13:53 kaleem_ left 13:56 JimmyZ joined 13:59 JimmyZ_ joined, kresike left 14:00 mucker left 14:01 JimmyZ left, JimmyZ_ is now known as JimmyZ 14:08 zipf joined 14:15 kresike joined 14:17 mdupont joined 14:23 envi_ joined 14:30 envi_ left
[Coke] (deep in backscroll - if you're using .docx instead of .doc, you can unzip it and then you're just versioning xml.) 14:33
14:35 envi_ joined
moritz [Coke]: yes, but the question is still if it's suitable for version control 14:37
[Coke]: ie small changes in the document also lead to only small changes in the XML output
14:37 zipf left
moritz and if the changes are mergeable 14:37
brrt iirc there's xml::diff in cpan? 14:38
benabik I think there's a merge program for OpenOffice documents. 14:39
14:49 PacoAir left 14:53 pernatiy left 14:56 pernatiy_ joined
cognominal moritz++ # your gist "Perl 6: dynamically generate exports in Rakudo" is very impressive gist.github.com/2366919 14:56
colomon woah! sweet! 14:58
benabik std: my $x = sub foo() {...} 14:59
p6eval std 1ad3292: OUTPUT«ok 00:00 42m␤»
benabik r: my $x = sub foo() {...}
p6eval rakudo 3bd91f: ( no output )
moritz r: my $x = sub foo() {...}; say $x
p6eval rakudo 3bd91f: OUTPUT«sub foo() { ... }␤»
moritz r: my $x = sub foo() {...}; say $x()
p6eval rakudo 3bd91f: OUTPUT«Stub code executed␤ in method gist at src/gen/CORE.setting:8224␤ in sub say at src/gen/CORE.setting:6258␤ in block <anon> at /tmp/JSHOAqTKCc:1␤␤»
benabik r: my $x = sub foo() {...}; say foo() 15:00
p6eval rakudo 3bd91f: OUTPUT«Stub code executed␤ in method gist at src/gen/CORE.setting:8224␤ in sub say at src/gen/CORE.setting:6258␤ in block <anon> at /tmp/o7_lqPNSPj:1␤␤»
15:00 jerome_ joined
benabik Ah, but dynamic names is harder. I see. 15:00
tadzik aye
colomon hmm? why? 15:02
benabik r: my $name = 'foo'; my $x = sub $name {...}; say $x # failure, I bet... 15:03
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/mh7gQ2M3tL:1␤»
15:03 pernatiy joined, pernatiy_ left
moritz benabik: that's why I use the role mix 15:05
*mixin in that gist
benabik moritz: Yeah, I figured that out after a moment. If someone is going to do that a lot, a custom trait "is named($foo)" might be useful. 15:06
moritz benabik: agreed
benabik moritz: Does that install the sub into the module, or just the module's exports? (i.e. does `A::foo` work as well as `use A; foo`) 15:07
15:08 pernatiy left
moritz benabik: no, it's not 'our' 15:08
benabik That's odd. Exported subs aren't automatically available any other way, right? You have to explicitly say `our sub foo() is export`? 15:10
moritz our-ness and exporting are orthongonal 15:11
I guess that's what you meant too
benabik Basically, yes. I'm used to qualified imports in ML and Haskell. 15:12
moritz I guess they aren't too hard to do now 15:14
we can install lexicals. We can install stuff in symbol tables. We can rename stuff if we want. There are no obstacles except tuits and the need to do the design (in the places where it isn't done yet) 15:15
benabik Imports are installed as `my`?
moritz yes
benabik moritz: Indeed. P6 has awesome flexibility in that regard. 15:16
moritz but it would be easy enough to import into a lexically created package
benabik As our?
moritz import Foo::Bar::Baz into F; # could make all imports available as F::sub_from_that_package()
15:17 pernatiy joined
moritz which would require a lexical F which happens to be a package 15:17
and which holds all the imports, but modified to be visible like 'our'
benabik waits for the gist... ;-) 15:18
moritz benabik: the problem is really that I don't understand the current import mechanism very well -- I just know which pieces are in place 15:20
benabik moritz: Fair enough. I'm more interested in the concepts anyway. :-)
kresike bye all 15:25
15:25 kresike left
moritz r: sub f is export { }; { sub f is export { } } 15:25
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤A symbol &f has already been exported␤»
15:26 thou joined
JimmyZ std: sub f { } but role { } does role { }; 15:30
p6eval std 1ad3292: OUTPUT«===SORRY!===␤"but" and "does" are non-associative and require parens at /tmp/GZrv7ekajF line 1:␤------> sub f { } but role { } does ⏏role { };␤Check failed␤FAILED 00:00 41m␤»
JimmyZ r: sub f { } but role { } does role { };
p6eval rakudo 3bd91f: ( no output )
JimmyZ bug?
dalek kudo/nom: 200926b | moritz++ | src/core/traits.pm:
.HOW.WHAT is the same as just .HOW. Simplify
15:31
kudo/nom: 05b1cb1 | moritz++ | src/core/Str.pm:
native infix:<xx> operator
15:32 FACEFOX left
JimmyZ I think the second commit lost something 15:33
moritz JimmyZ: like what? 15:35
JimmyZ multi infix:<xx>
moritz oh right
JimmyZ++ 15:36
well,, :<x> 15:40
15:40 fglock left 15:45 fsergot joined
fsergot Hi #perl6 o/ 15:45
colomon o\ 15:47
15:47 Psyche^ joined 15:51 Patterner left, Psyche^ is now known as Patterner 15:52 kcwu left, kcwu joined 15:58 JimmyZ left
sjohnson heh 16:00
sorear good * #perl6 16:05
colomon */ 16:06
16:07 brrt left 16:12 pernatiy left
sjohnson hi sorear, and colomon 16:17
how's it going?
colomon my brain is thoroughly confused trying to debug an arithmetic decompression codec in C++ 16:19
16:21 mucker joined
[Coke] yawns. 16:21
16:24 spider-mario joined
sorear o/ spider-mario 16:24
spider-mario \o
16:25 lichtkind joined
lichtkind moritz: are you sure ssi wrks on that server? 16:27
16:30 tokuhirom left 16:34 birdwindupbird left 16:35 fglock joined 16:41 simcop2387 left 16:43 simcop2387 joined
moritz lichtkind: no, I'm not. I've enabled mod_inlude and added Options +Includes and AddOutputFilter includes .html, which should be enough 16:46
but maybe it isn't.
lichtkind moritz: i see in source the ssi includes unresolved
but maybe its becasue the stag files are in a subfulder
because
tablets.perl6.org/ 16:47
moritz lichtkind: no, subfolders don't hurt
16:48 fgomez left
lichtkind than blame goes back to <!--#include virtual="/inc/meta.stag"--> 16:49
which is spelled corectly i think
moritz: your right its there tablets.perl6.org/inc/meta.stag 16:50
moritz ok, it was my fault
seems some part of the apache config is more case sensitive than I thought 16:51
works now
lichtkind: currently you have a meta tag saying the page is encoded in Latin-1, but the HTTP header says UTF-8
16:51 fgomez joined
moritz lichtkind: which is it to be? 16:51
lichtkind moritz: yes the css are now in effect
uvtc lichtkind, just noticed your tablets project. Looks like your goal is to move the tablets content from the old socialtext Perl 6 wiki to raw html pages in a github project. 16:52
lichtkind, You're hand-editing all the html?
lichtkind moritz: yes i copied that yesterday from one of my projects i wanted to change that
moritz lichtkind: so UTF-8 is fine?
lichtkind sure
uvtc: yes and by now i dont see any benefit to automate it 16:53
uvtc: interested?
uvtc lichtkind, Not sure at this point. Sidenote though, I remember reading the diveintomark blog a while back before it went dark. 16:54
dalek blets: ffcced6 | moritz++ | html/inc/meta.stag:
change encoding in meta tags to UTF-8
uvtc lichtkind, Mark wrote the diveintopython book...
lichtkind, all in raw html.
lichtkind, His opinion seemed to be that html was the medium of our time, and he had a good Emacs mode, so why not.
lichtkind uvtc: yes im an editor author too so i expect lot of automation plus perl 6 uses lot of weird letters wich broke any wiki syntax i know of + i have hard requirements for anchors and links and some visual formating 16:56
16:56 skids joined
uvtc lichtkind, Personally, I stopped writing raw html way back when I discovered LaTeX, then TeXinfo, Pod, reST, and finally Markdown. 16:56
lichtkind uvtc: yes markdown i heard yesterday too but im not sure if its robust enough for weir side effects of metaops like [\ ] 16:58
uvtc: my hope is just once the container html stand its writing plain text anyway 16:59
uvtc lichtkind, Depends on which Markdown processing software you use. The most robust one I know of (and the one I use) is Pandoc.
16:59 leprevost joined
lichtkind uvtc: its on cpan? 16:59
uvtc lichtkind, With Pandoc, I write in its enhanced Markdown, put in Unicode chars when needed, and escape any chars I'm concerned about. 17:00
lichtkind, No, it's actually written in Haskell.
17:00 fgomez left, fgomez joined
uvtc lichtkind, johnmacfarlane.net/pandoc/ 17:00
17:01 PacoAir joined
[Coke] +# 04/12/2012 - rakudo++ ; niecza (95.08%); pugs (40.9%) 17:01
+"niecza", 20354, 1, 749, 1530, 22634, 24123
+"pugs" , 8756, 0, 3261, 1560, 13577, 23984
+"rakudo", 21407, 31, 638, 1890, 23966, 24133
p: say 21407*.41-8756
p6eval pugs: OUTPUT«20.87␤»
uvtc lichtkind, I only bring this up because my hunch is that you're going to have trouble finding contributors who are willing to edit raw html. Then again, with doc projects, it's often the case that too many cooks spoil the stew.
[Coke] oooh, 21 tests, I can scrounge those up.
lichtkind uvtc: i see thank you for the info
uvtc lichtkind, sure, y/w 17:02
moritz (fwiw pandoc would be trivial to install on the server too)
lichtkind moritz: you mean haskell is already there?
uvtc The fellow who wrote/writes Pandoc is the same guy who created gitit: gitit.net/ . Markdown-based wiki backed by git. 17:03
moritz lichtkind: no, I mean there's a Debian package for pandoc, so it's an 'aptitude install' away
lichtkind moritz: so i can test it on my ubuntu easily 17:04
uvtc If I were choosing a wiki, I'd look first at gitit. Just my 2¢. I have not been crazy about SocialText.
lichtkind uvtc: a git based wiki i wait for this since 2 years 17:05
[Coke] p: say sprintf("%03d", 3)
17:05 dakkar left
p6eval pugs: OUTPUT«(timeout)» 17:05
lichtkind im complaining about socialtest since 3 years but noone did anything
uvtc lichtkind, Welcome to flavor country. :)
moritz, Looks like gitit should also be available via apt-get. 17:07
lichtkind it read like a dream
yes but the wiki is on different server
[Coke] p: my $r = 2..6; say $r.min
p6eval pugs: OUTPUT«2 3 4 5 6␤»
lichtkind hot elder juice anyone?
uvtc lichtkind, I'm afraid to ask what you mean by that. :) 17:08
lichtkind uvtc: its healthy common be a good boy 17:09
i just saying im gonne make me a cup
[Coke] Yah, that sounds disturbing here too.
17:09 tyatpi left
lichtkind ya dont know what elder is? 17:10
benabik happstack?
uvtc lichtkind, Maybe you mean elderberry juice?
benabik So not only is gitit a git-backed wiki, it's written in Haskell? Awesome.
lichtkind uvtc: right
uvtc benabik, Yup. And Pandoc does the markdown processing, which is very robust. 17:11
lichtkind benabik: and it exports to most useful formats, thats a real big thing
benabik It does literate haskell... I wonder if they have a gitit wiki backed by their source. :-D
uvtc You can also embed LaTeX math in Pandoc-Markdown, and it gets rendered nicely in pdf output. 17:12
LaTeX math Moritz, LaTeX math. :)
17:13 REPLeffect left 17:14 brrt joined
lichtkind uvtc: to me its no brainer 17:14
spider-mario docutils does that too
since 0.8
lichtkind i just have to convince to perlfoundation people
17:15 oiig_ joined
lichtkind spider-mario: is that a perl module? 17:15
spider-mario no
a python one
17:15 jaffa4 joined
[Coke] lichtkind: convince us of what now? 17:15
uvtc lichtkind, not sure what you mean. If moritz can apt-get install both pandoc and gitit, you can just start a new Perl 6 wiki.
[Coke] you don't really need buyin from TPF on that. they were just putting something out there for folks to use if they needed, not assuming it'd be the official end all be all wiki. 17:16
uvtc spider-mario, I actually just wrote up a small comparison of Pandoc-Markdown vs. docutils reST: www.unexpected-vortices.com/doc-not...pared.html
spider-mario oh, nice 17:17
[Coke] is only really tangentially a TPF person, but is happy to play one.
lichtkind :) 17:18
fglock I'm implementing 'no strict' perl5 in perlito - it has some surprises; I wonder if anybody still uses it. I need this in order to pass the perl tests 17:20
spider-mario uvtc: “I prefer Markdown style — it's easier to visually discern the main sections and subsections without getting distracted by lower subsections.” 17:21
moritz just for your info, I'm happy to install all sorts of stuff so that contributors to *.perl6.org can use the tools they want. I personally like git and pod and asciidoc (and markdown too, though haven't used it a lot)...
spider-mario do you think so? I find #### extremely distracting
moritz but mostly I want poeple to do use whatever tools they are productive with
spider-mario as for the link syntax, I prefer rst’s 17:22
uvtc spider-mario, Yes, because I know that "underlined things" are the main sections and subsections, so I my eyes can sorta pass over the "###".
benabik always expects back ticks to indicated code, not links.
spider-mario I find # too “dense” 17:23
uvtc spider-mario, Regarding links, I think Markdown is more Perlish is this regard: they look like what they are. Square brackets around things make them look clicky --- like I could click them. Links. :)
spider-mario (though I’m not sure what would be better)
uvtc And I agree with benabik: backticks are codey things. 17:24
Not linkey things.
spider-mario why is that so? 17:25
because of bash?
benabik Shell, mostly.
flussence r: `echo a`
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Confused␤at /tmp/1s_0h9vqQY:1␤»
spider-mario r: qx{echo a}
p6eval rakudo 3bd91f: OUTPUT«qx, qqx is disallowed in safe mode␤ in sub restricted at src/SAFE.setting:2␤ in sub QX at src/SAFE.setting:9␤ in block <anon> at /tmp/O3ZNFsDr4m:1␤␤»
uvtc Because in the shell (and in Perl 5), when I want to execute code, I can put it in backticks (like echo `date` >> myfile.txt
)
17:26 Chillance joined
spider-mario (I think there’s an error in the document) 17:26
“Here's a code block within the list item.”
it’s not a code block, it’s a quotation
since it’s missing the ::
uvtc spider-mario, Ooops. Thanks! (See, that's why I don't like reST's blockquote syntax). 17:27
lichtkind could we set a wiki that i can try and compare the pain with pure html?
spider-mario uvtc: regarding math, it’s: :math:`a^2 = b^2 + c^2` 17:29
or, alternatively, `a^2 = b^2 + c^2`:math:
17:29 fhelmberger_ joined
spider-mario docutils understand the math role since 0.8 17:29
brrt r: sub bar($x --> Int() { return 3.5 }; say bar(3);
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/waw8DpQyKM:1␤»
spider-mario when outputting html, by default, it is converted to MathML
brrt r: sub bar($x --> Int()) { return 3.5 }; say bar(3);
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/QJ33APFt7z:1␤»
17:30 fhelmberger_ left
spider-mario r: sub toto($x --> Int) {42}; say toto 1 17:30
p6eval rakudo 3bd91f: OUTPUT«42␤»
17:30 fhelmberger_ joined, fhelmberger left
spider-mario r: sub bar($x --> Int) { return 3.5 }; say bar(3); 17:31
p6eval rakudo 3bd91f: OUTPUT«3.5␤»
spider-mario r: sub bar($x) returns Int { return 3.5 }; say bar(3);
p6eval rakudo 3bd91f: OUTPUT«Type check failed for return value␤ in sub bar at /tmp/odUEXATxRC:1␤ in block <anon> at /tmp/odUEXATxRC:1␤␤»
brrt ah
uvtc spider-mario, Thanks. Fixed.
spider-mario r: sub bar($x) of Int { return 3.5 }; say bar(3); 17:32
p6eval rakudo 3bd91f: OUTPUT«Type check failed for return value␤ in sub bar at /tmp/qj3Wg1Cyea:1␤ in block <anon> at /tmp/qj3Wg1Cyea:1␤␤»
brrt so rakudo implements it but not the syntax
or, what is the correct syntax
17:33 REPLeffect joined 17:37 fhelmberger_ left
[Coke] discovers "quietly" by reading spec tests. huh. 17:39
benabik quietly?
lichtkind moritz: i think it would be freat to have a gitit wiki so anyone would be happy
[Coke] r: quietly {warn "shhh"}
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&quietly' called (line 1)␤»
lichtkind coders can commit and rest can edit 17:40
[Coke] guessing NYI anywhere
t/spec/S04-statements/quietly.t
S04:840
moritz it's the "try" for warnings 17:41
or was it for &note? not sure anymore
[Coke] wonders why not "no warnings"
TimToady for warnings
17:41 birdwindupbird joined 17:42 mdupont left, REPLeffect left
moritz [Coke]: different scoping 17:43
[Coke]: "no warnings" is for the lexical scope. "quietly" surpresses warnings in code that is called from the current location too
ie
sub f { warn 'foo' }; { no warnings; f(); } still warns 17:44
sub f { warn 'foo' }; quietly { f(); } # no warnings
benabik S04:840 mentions it, but doesn't explain it.
PerlJam benabik: S32-setting-library/Basics.pod briefly explains it 17:45
spider-mario I’d rather write {f} than { f(); }, actually, wouldn’t you?
benabik PerlJam++
spider-mario (or even &f) 17:46
lichtkind moritz: i would like to hear from you later but for now i have to go
benabik spider-mario: &f won't call it, just return a reference to it (I think)
spider-mario just like {f}
used as a value
(e.g. in quietly {f}) 17:47
benabik r: sub f() { say 'f' }; f(); {f}; &f
p6eval rakudo 3bd91f: OUTPUT«f␤f␤»
spider-mario yes, but
r: say {say "hello"}
p6eval rakudo 3bd91f: OUTPUT«Block.new()␤»
TimToady std: gather quietly contend maybe do try lazy pi 17:48
p6eval std 1ad3292: OUTPUT«ok 00:00 41m␤»
spider-mario r: sub f() {say 'f'}; f; {f}; sub {f}
p6eval rakudo 3bd91f: OUTPUT«f␤f␤»
17:49 zipf joined
PerlJam TimToady: so 17:49
;) 17:50
dalek ast: 4128c59 | coke++ | S02-names/ (2 files):
pugs fudge
gs.hs: bb9c4e9 | coke++ | t/spectest.data:
run (fudged) tests
17:51 mucker left
[Coke] ARGH. 17:52
that was a lot more than 2 files for roast. I was doing "git commit --amend", not "git commit -a --amend", and at one point did a reset to clear out what I thought was the ONE file I edited.
at least I have list of everything that SHOULD be fudged. :P
17:53 REPLeffect joined
dalek gs.hs: b9e60c7 | coke++ | t/spectest.data:
run fudged tests
17:53
timotimo [Coke], you can still get the files from your git object database if you added them at one point. did you? 17:58
jaffa4 r: my @a = 1,2,5,13, 19; if all(@a)== 1|2|5|13|19 { print "equal";} 18:03
p6eval rakudo 3bd91f: OUTPUT«equal»
jaffa4 What is it equal<
r: my @a = 1,2,5,13, 19; print all(@a).perl 18:04
p6eval rakudo 3bd91f: OUTPUT«all(1, 2, 5, 13, 19)»
jaffa4 r: my @a = 1,2,5,13, 19; print !all(@a).perl
p6eval rakudo 3bd91f: OUTPUT«False»
jaffa4 r: my @a = 1,2,5,13, 19; print not all(@a).perl 18:05
p6eval rakudo 3bd91f: OUTPUT«False»
jaffa4 r: my @a = 1,2,5,13, 19; print not all(@a)
p6eval rakudo 3bd91f: OUTPUT«False»
18:06 LylePerl joined
brrt r: my int $x = 3; 18:11
p6eval rakudo 3bd91f: ( no output )
brrt r: my int $x = 3; say $x;
p6eval rakudo 3bd91f: OUTPUT«3␤»
brrt ... odd
that stuff does not work for me
or, it does not work in the REPL 18:12
moritz brrt: yes, that's a known bug
brrt is it a fixable bug? :-) 18:13
moritz brrt: the REPL does some magic to copy newly declared variables into a common pad, and that can't deal with native types yet
yes, fixable
brrt checks out rakudo source 18:14
moritz brrt: possibly done in nqp though
18:15 fgomez left
moritz running the repl with --ll-exception might give you a better idea about where the error occurs 18:16
dalek kudo/nom: b229580 | moritz++ | src/core/Str.pm:
Revert "native infix:<xx> operator"

This reverts commit 05b1cb13190b324bd4c718c2ecdbddb15b8a6994. It was wrong (misspelled the operator name), and causes segfaults when the operator name is fixed
18:17
18:21 maja joined 18:22 maja left 18:23 maja joined, maja left
brrt it looks like it is nqp 18:27
uvtc Is there yet a customary way to include docs in a Perl 6 script? For example, in Python you can put a docstring at the top, then run `pydoc myscript.py` and it will format the top-level docstring and put you in its pager to read it. 18:31
Usage docs. 18:32
brrt pod works, doesn't it?
moritz it does
uvtc I don't see a perl6doc command in my ~/opt/rakudo-star/bin directory...
How do I view the pod docs in my script?
moritz uvtc: perl6 --doc $file 18:33
uvtc gracias.
Wait --- that supports the new Perl 6 Pod (as opposed to Perl 5 POD), correct? 18:34
brrt although, iirc, there were some small changes in the format
moritz right
brrt: the problem seems to be nqp/src/cheats/parrot-callcontext.pir lines 21 and 22
$P0 = lexpad[$S0] 18:35
that calls the vtable the returns a PMC
s:2nd/the/that/
but if it's an int register, it would need to use $I0 = lexpad[$S0] 18:36
brrt moves to nqp 18:40
jaffa4 r: "uuu"~~ g:s/u/{ print "once" }/;
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Confused␤at /tmp/JEKf6eFn44:1␤»
jaffa4 std: "uuu"~~ g:s/u/{ print "once" }/; 18:41
p6eval std 1ad3292: OUTPUT«===SORRY!===␤Bogus term at /tmp/cGDNK8vBGL line 1:␤------> "uuu"~~ g:s/u/{ print "once" }/⏏;␤Undeclared routines:␤ 'g:s' used at line 1␤ 'u' used at line 1␤Parse failed␤FAILED 00:00 42m␤»
jaffa4 std: "uuu"~~ s:g/u/{ print "once" }/;
p6eval std 1ad3292: OUTPUT«ok 00:00 42m␤»
jaffa4 r: "uuu"~~ s:g/u/{ print "once" }/;
p6eval rakudo 3bd91f: OUTPUT«onceonceonceCannot assign to a non-container␤ in sub infix:<=> at src/gen/CORE.setting:9863␤ in block <anon> at /tmp/cXGfWmzG54:1␤␤»
18:44 fgomez joined
jaffa4 What is wrong in here? 18:44
moritz jaffa4: strings are immutable. You cannot change the string "uuu"
jaffa4: you can only change the contents of variables
brrt doesn't know enough PIR for this fix :-) 18:45
18:45 GlitchMr joined
moritz brrt: if you figure out how to get the type of a register, I can fix that part 18:46
18:47 zipf left
brrt you mean the type it should have? 18:50
as specified by perl
moritz right
18:55 daxim left
dalek gs.hs: f25ef30 | coke++ | t/spectest.data:
remove flaky test file
18:56
[Coke] timotimo: no, I never added them. and I've now reconstructed it by hand. 18:57
dalek ast: 23a618d | coke++ | S (5 files):
pugs fudge
19:02
benabik moritz: You know what would be nice for that? The ability to see the type of a register in the lexpad. 19:04
moritz benabik: I'm sure it's possible, just not exposed to the user
in parrot's src/pmc/lexpad.pmc it's done internally all the time 19:05
tadzik home.sweet()! 19:08
[Coke] p: say 8951/21407
p6eval pugs: OUTPUT«0.4181342551501845190825430933806698743402␤»
[Coke] argh. now it's too close to 42%! 19:12
p: say 21407*.42-8951
p6eval pugs: OUTPUT«39.94␤»
uvtc Just noticed, the perl6 man page doesn't mention the `--doc` option.
tadzik oh, that's possible 19:16
benabik moritz: Trying to add a quick and dirty introspection method. 19:19
uvtc tadzik, for something like that, is it better to send an email to rakudobug-at-perl.org, or maybe file a bug at the perl6 bug tracker? 19:21
19:22 oiig_ left
tadzik uvtc: it's the same thing 19:22
uvtc tadzik, I'd need an account at rt to file bugs there, though. Right? 19:23
At rt.perl.org/rt3/Public/?nossl=true 19:24
(heh. ?ssl=false ?)
tadzik uvtc: I think so
19:31 lexu joined
moritz you can't submit bugs via the web interface, regardless of wheteher you have an account or not 19:34
email is the weapon of choice here
brrt leaves, sleeptime
uvtc I was just about to ask: "I have a really simple question...". :)
19:34 brrt left
uvtc Thanks moritz. Will try in 3 ... 2 ... 1 ... 19:34
moritz BOOM 19:35
uvtc Hm. How do I send it in such a way so that it gets associated with Perl 6, rather than Perl 5. 19:36
?
moritz uvtc: by sending it to [email@hidden.address]
uvtc So, do they get triaged by someone in a boiler room somewhere shoveling bug reports into the proper furnace? :) 19:37
(sent, btw) 19:38
moritz yes, that someone is likely a perl script though :-)
uvtc Ah, I see the bug report.
moritz magic!
uvtc When I submit a bug, from now on I want to hear that sound in Dragon's Lair when Dirk comes back for another go. 19:41
19:41 lexu left
benabik moritz: This looks more "fun" than I thought. NQP has it's own LexPad and LexInfo PMCs to deal with sixmodel magic. And I don't think those types were updated to deal with non-PMC lexicals. 19:44
benabik isn't sure how Rakudo actually does native lexicals with these classes. 19:45
moritz neither 19:46
I guess only mls and jnthn could tell you without first having to read and understand the code
benabik moritz: I have a type_of method on Parrot's lexpad now though, if that would help?
(Not terribly well tested.) 19:47
moritz benabik: I'd name it register_type or reg_type
it's one of the missing ingredients, yes
moritz blug: perlgeek.de/blog-en/perl-6/2012-rak....writeback 19:48
tadzik BLOGGING SPREE 19:49
moritz++
moritz just the same ol' stuff I already gist'ed :-) 19:50
spider-mario “But sometimes people want to generate subroutines on the fly and use them, and can't seem to find a way to do it.”
I recognize myself the other day :D
thanks :D
jaffa4 r: print ([**] 1,2,3,4); 19:51
p6eval rakudo 3bd91f: OUTPUT«1»
19:51 tarch_ left
jaffa4 Should not this print some other value? 19:51
spider-mario why? 19:52
tadzik :)
jaffa4 is it not power?
moritz it is
spider-mario yes, precisely
moritz and what's 1 to the 2nd power?
tadzik r: say 1 ** Inf
p6eval rakudo 3bd91f: OUTPUT«1␤»
spider-mario 1 ** anything = 1
moritz r: say 1 ** 1i
p6eval rakudo 3bd91f: OUTPUT«1+0i␤»
benabik r: print [**] 2,3,4
p6eval rakudo 3bd91f: OUTPUT«2417851639229258349412352»
spider-mario btw, does [**] respect **’s associativity?
looks so
moritz spider-mario: yes
jaffa4 Is it not right associative? 19:53
moritz it is
spider-mario yes
benabik r: print (2**3)**4
p6eval rakudo 3bd91f: OUTPUT«4096»
moritz 2 ** (3 ** 4)
r: .say for [\**] 2, 3, 4
p6eval rakudo 3bd91f: OUTPUT«4␤81␤2417851639229258349412352␤»
spider-mario nice 19:54
moritz r: say (42, 18, *%* ... 1)[*-2] 19:55
p6eval rakudo 3bd91f: OUTPUT«(timeout)»
moritz r: say (42, 18, *%* ... 0)[*-2]
p6eval rakudo 3bd91f: OUTPUT«6␤»
moritz is still proud of that GCD implementation 19:56
spider-mario :D
I like it too
jaffa4 r: print [-] 8,2,2; 19:57
p6eval rakudo 3bd91f: OUTPUT«4»
jaffa4 SHould it this be 6? 19:58
moritz jaffa4: as a general rule, [OP] a, b, c is the same as a OP b OP c 19:59
and 8 - 2 - 2 happens to be 4 20:00
spider-mario how do you get 6, jaffa4?
jaffa4 8-(2-2)
spider-mario oh
jaffa4 should be 8 20:01
spider-mario ** is right-associative but - is not
jaffa4 It depends on the operator then
spider-mario it does, indeed 20:02
20:04 estrabd joined
moritz recommends reading S03 20:06
jaffa4 I can read/write, execute, who am I? 20:08
20:10 mauror left 20:12 GlitchMr left
uvtc (BTW, just wanted to mention: wow, rakudo perl6 (R* 2012.02) starts up *fast*. Last time I tried it it was much slower to start up.) 20:28
spider-mario nom is even faster than * 2012.02 20:29
uvtc Um... is R* 2012.02 based on nom?
spider-mario I meant the current nom
from the git repository
uvtc Well, startup (to get the prompt) is pretty much instantaneous for me. 20:30
sjn spider-mario: iirc, no
spider-mario how much time to run a Hello World?
20:31 birdwindupbird left
spider-mario 3s (* 2012.02) vs 0.x s (current) on my machine 20:31
uvtc $ time ./bar.pl6
hello world!
real0m0.968s
user0m0.824s
sys0m0.104s
spider-mario oh
uvtc This is on a Lenovo ThinkPad T510. 20:32
spider-mario 2012.02: /usr/bin/perl6 hello.pl 2,92s user 0,19s system 98% cpu 3,156 total
HEAD: perl6 hello.pl 0,46s user 0,13s system 96% cpu 0,613 total
uvtc Wow. Nice improvement. 20:33
benabik I think R* includes the serialization work... 20:34
spider-mario 2012.02: Stage parse: 2.750
current: Stage parse: 0.347
(--stagestats told me that)
benabik : 2012.02 does not
2012.04 will
benabik Ah.
spider-mario: Well, there you go.
spider-mario “Stage post” has slightly increased, though 20:35
0.031 → 0.091
we might do more stuff now
do we? 20:36
benabik I think post includes the serialization.
spider-mario oh, ok.
uvtc What's the difference for arrays between square brackets and parens? That is, what is the difference between @a = ['a', 'b', 'c'] and @a = ('a', 'b', 'c')?
spider-mario well, it is certainly acceptable considering the gain on the parsing.
uvtc : [] does not flatten 20:37
colomon n: my @a = ['a', 'b', 'c']; say @a.perl;
p6eval niecza v15-6-gefda208: OUTPUT«[["a", "b", "c"]].list␤»
spider-mario the first one produces a list that has ['a', 'b', 'c'] as it first value
benabik moritz: I renamed it to LexInfo.register_type and will push it to parrot.git/master when tests complete. I leave it to others to deal with it in NQP.
spider-mario its*
(and the second one doesn’t need brackets in Perl 6) 20:38
uvtc rakudo: @a = ('a', ('b', 'c'), 'd'); say @a.perl 20:39
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Variable @a is not declared␤at /tmp/5idJJiNrJR:1␤»
uvtc rakudo: my @a = ('a', ('b', 'c'), 'd'); say @a.perl
p6eval rakudo 3bd91f: OUTPUT«Array.new("a", "b", "c", "d")␤»
uvtc rakudo: my @a = ('a', ['b', 'c'], 'd'); say @a.perl
p6eval rakudo 3bd91f: OUTPUT«Array.new("a", ["b", "c"], "d")␤»
colomon perl6: say ['a', 'b', 'c'].WHAT 20:40
p6eval pugs: OUTPUT«Array␤»
..rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«Array()␤»
colomon perl6: say ('a', 'b', 'c').WHAT
p6eval rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«Parcel()␤»
..pugs: OUTPUT«Array␤»
uvtc Oh, I was thinking that maybe the []'s and ()'s were creating something different, but it's just a way to pass notes to the compiler.
spider-mario r: my @a = 2, 3, 4; say (1, @a, 5).perl
p6eval rakudo 3bd91f: OUTPUT«(1, Array.new(2, 3, 4), 5)␤»
spider-mario oh?
colomon uvtc: they definitely are creating something different, see my previous two p6evals 20:41
spider-mario r: my @a = 2, 3, 4; say (1, @a.list, 5).perl
p6eval rakudo 3bd91f: OUTPUT«(1, Array.new(2, 3, 4), 5)␤»
spider-mario r: my @a = 2, 3, 4; say (1, @a, 5).elems
p6eval rakudo 3bd91f: OUTPUT«5␤»
spider-mario right.
r: my @a = 2, 3, 4; say (1, [@a], 5).elems
p6eval rakudo 3bd91f: OUTPUT«3␤»
spider-mario r: my @a = 2, 3, 4; say (1, [@a], 5).perl
p6eval rakudo 3bd91f: OUTPUT«(1, [2, 3, 4], 5)␤»
uvtc colomon, Oh, whoops. Ok, one's a Parcel and one's an Array...
spider-mario r: my @a = 2, 3, 4; say (1, [@a], 5)
p6eval rakudo 3bd91f: OUTPUT«1 2 3 4 5␤»
spider-mario r: my @a = 2, 3, 4; say (1, @a, 5)
p6eval rakudo 3bd91f: OUTPUT«1 2 3 4 5␤»
spider-mario (sorry, I may be abusing p6eval) 20:42
TimToady r: my @a = 2, 3, 4; say (1, $@a, 5)
p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Invalid hard reference syntax at line 1, near "@a, 5)"␤»
TimToady n: my @a = 2, 3, 4; say (1, $@a, 5)
p6eval niecza v15-6-gefda208: OUTPUT«===SORRY!===␤␤Invalid hard reference syntax at /tmp/RLvjO_tr66 line 1:␤------> my @a = 2, 3, 4; say (1, $⏏@a, 5)␤␤Parse failed␤␤»
20:42 thou left
TimToady nyi I guess 20:42
std: my @a = 2, 3, 4; say (1, $@a, 5) 20:43
p6eval std 1ad3292: OUTPUT«ok 00:00 43m␤»
20:45 thou joined 20:46 xenu joined
uvtc r: my @a = ['a', 'b']; say @a.WHAT; 20:49
p6eval rakudo 3bd91f: OUTPUT«Array()␤»
uvtc r: my @a = ('a', 'b'); say @a.WHAT;
p6eval rakudo 3bd91f: OUTPUT«Array()␤»
uvtc No parcel there...
TimToady r: my @a := ('a', 'b'); say @a.WHAT 20:50
p6eval rakudo 3bd91f: OUTPUT«Parcel()␤»
spider-mario r: my @a = 'a', 'b'; @a[*].WHAT.say 20:51
p6eval rakudo 3bd91f: OUTPUT«Parcel()␤»
uvtc I need to check back to my notes to see what := does...
r: my @a = 'a', 'b'; say @a.WHAT 20:52
p6eval rakudo 3bd91f: OUTPUT«Array()␤»
japhb r: my @a = 2, 3, 4; my @b = (1, @a, 5); my $c = (1, @a, 5); say @b.perl; say $c.perl;
p6eval rakudo 3bd91f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤$(1, Array.new(2, 3, 4), 5)␤»
japhb That is very counterintuitive to me.
uvtc would love to see a blog post on the differences between [], and (), and Parcels and Arrays... 20:53
japhb I think I understand *why* it happens, but it still messes with my head. I have to think about it, it's not just "obviously right" yet.
uvtc ... with a guest appearance by :=.
Something that occurs to me: a parcel is something you send in the mail and you hope it doesn't get flattened... 20:54
japhb r: my @a := 2, 3, 4; my @b = (1, @a, 5); my $c = (1, @a, 5); say @b.perl; say $c.perl;
p6eval rakudo 3bd91f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤$(1, (2, 3, 4), 5)␤»
PerlJam uvtc: You could always write such a blog post :) 20:55
spider-mario r: my @a = 1, 2, 3; @a.rotate = 1, 2, 3; @a.say 20:56
p6eval rakudo 3bd91f: OUTPUT«1 2 3␤»
uvtc I will if I can sort all this out. Copying/pasting some of this elsewhere so I can stare at it for a while...
spider-mario r: my @a = 1, 2, 3; my @b := @a.rotate; @b[0] = 5; @a.say
p6eval rakudo 3bd91f: OUTPUT«1 5 3␤»
spider-mario magic!
r: my @a = 1, 2, 3; @a.rotate.WHAT.say 20:57
p6eval rakudo 3bd91f: OUTPUT«Array()␤»
spider-mario r: my @a = 1, 2, 3; @(@a.rotate).WHAT.say
p6eval rakudo 3bd91f: OUTPUT«Array()␤»
uvtc One thing I think that would help new users asking q's on irc: when you show an example, stick with one of the impl's. If you type "perl6: ...", it tends to be more difficult to follow. Though, I realize that sometimes the answerer actually wants to see what the diff impl's are going to say. 20:59
21:00 plobsing left
TimToady
.oO(n/r == noise reduction)
21:00
21:01 bluescreen10 left
PerlJam n: my @a := 2, 3, 4; my @b = (1, @a, 5); my $c = (1, @a, 5); say @b.perl; say $c.perl; 21:02
p6eval niecza v15-6-gefda208: OUTPUT«[1, 2, 3, 4, 5].list␤$(1, (2, 3, 4), 5)␤»
PerlJam n: my @a = 2,3,4; my @b = (1, @a, 5); my $c = (1, @a, 5); say @b.perl; say $c.perl; 21:03
p6eval niecza v15-6-gefda208: OUTPUT«[1, 2, 3, 4, 5].list␤$(1, [2, 3, 4].list, 5)␤»
PerlJam now, that one I don't understand.
I'd guess nieczabug
spider-mario r: my @a = 2,3,4; my @b = (1, @a, 5); my $c = (1, @a, 5); say @b.perl; say $c.perl;
p6eval rakudo 3bd91f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤$(1, Array.new(2, 3, 4), 5)␤»
spider-mario r: my @a = 2,3,4; my @b = (1, @a, 5); my $c = (1, @a, 5); say @b.perl; say @($c).perl;
p6eval rakudo 3bd91f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤(1, 2, 3, 4, 5).list␤»
spider-mario it correctly flattens when evaluated in list context
n: my @a = 2,3,4; my @b = (1, @a, 5); my $c = (1, @a, 5); say @b.perl; say @($c).perl; 21:04
p6eval niecza v15-6-gefda208: OUTPUT«[1, 2, 3, 4, 5].list␤(1, 2, 3, 4, 5).list␤»
spider-mario in niecza too
21:05 pernatiy joined 21:06 |newbie| joined 21:07 snearch joined 21:08 jnthn_ joined, hillu_ joined, PerlPilot joined, jaffa4 left, estrai left, TimToady left, PerlJam left, jnthn left, hillu left, TimToady joined 21:09 estrai joined
uvtc spider-mario, Aye, there's another piece of the puzzle: sometimes assigning a list to a $scalar, and sometimes to an @array... 21:10
Thanks, all. o/ 21:12
21:12 uvtc left 21:14 PerlPilot left, PerlJam joined 21:18 fgomez left 21:24 y3llow_ joined, bruges_ joined 21:26 snearch left, y3llow left, bruges left, fgomez joined 21:27 y3llow_ left 21:28 y3llow joined 21:30 y3llow left 21:31 y3llow joined
lichtkind moritz: ping 21:37
21:51 leprevost left
jnthn_ evening, #perl6 21:59
spider-mario o/
22:00 plobsing joined
jnthn_ On-site consulting gig tomorrow, then my Perl 6 tuit deficit is over. :) 22:02
sjn yay! \o/ 22:05
22:08 thou left
lichtkind jnthn_: o/ 22:10
|newbie| Is perl 6 used anyone in the commercial world?
22:11 |newbie| left 22:12 PacoAir left 22:14 jnthn_ is now known as jnthn
jnthn hi lichtkind 22:15
22:17 fgomez left, spider-mario left
[Coke] p: say gist 3 22:20
p6eval pugs: OUTPUT«*** No such subroutine: "&gist"␤ at /tmp/JQeCMDzLCc line 1, column 5 - line 2, column 1␤»
[Coke] aw.
22:25 localhost joined 22:27 oiig_ joined 22:28 fgomez joined 22:34 lichtkind left 22:41 alester left 22:46 kst left 22:54 kst joined, thou joined 22:58 hillu_ is now known as hillu 22:59 NamelessTee left 23:01 fgomez left 23:19 fgomez joined 23:24 plobsing left
fsergot Good night #perl6 o/ 23:24
23:25 fsergot left 23:26 plobsing joined, tokuhirom joined 23:36 whiteknight joined, fgomez left 23:43 Chillance left 23:47 fgomez joined 23:52 benabik left
diakopter mmm RNA quines 23:56