Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-04-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 diakopter felher: neither do I
00:00 tokuhirom joined #perl6
00:01 felher diakopter: what is it that you don't understand? (This conversation surely looks odd)
00:02 diakopter I don't understand what I was trying to say
00:05 felher diakopter: the perfect basis for a good conversation ;)
00:05 diakopter you said it
00:20 nif joined #perl6
00:26 felher moritz: ping
00:34 dalek tablets: ea5daf7 | (Herbert Breunung)++ | html/ (4 files):
00:34 dalek tablets: first css styles to beautify quotes and normal text
00:34 dalek tablets: review: https://github.com/perl6/tablets/commit/ea5daf711a
00:41 machine2 joined #perl6
00:58 scott__ joined #perl6
01:12 leprevost joined #perl6
01:13 jferrero joined #perl6
01:14 IngisKahn joined #perl6
01:19 havenn joined #perl6
01:22 wolfman2000 joined #perl6
01:41 skipper joined #perl6
01:41 moritz felher: pong
01:43 felher moritz: wow. i didn't think you'll respond at 3:45 am :)
01:44 szbalint joined #perl6
01:44 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:50 havenn joined #perl6
01:51 felher moritz: my solution is to write "$!.defined ?? ..." instead of "$! ??". Is that an ok fix for the problem?
02:01 cj joined #perl6
02:06 moritz felher: I think the real fix is to make defined exceptions true again
02:07 moritz felher: (and, conversely, make a failed try {} return Nil or Any instead of the exception, but you can leave that to somebody else)
02:08 felher moritz: so fail('blar').Bool shall return True?
02:09 drbean joined #perl6
02:10 felher moritz: was there a time where defined Exception were considered True?
02:10 moritz fail('blar').True never executes the .True
02:10 perigrin joined #perl6
02:11 moritz because fail($x) is really return(Failure.new(exception => X::AdHoc.new(payload => 'blar')))
02:11 moritz so the return is executed before the .True ever has a chance to run
02:12 moritz well, excepts are just normal objects. Only Failure is considered magical (false, undefined, explodes on usage etc.)
02:12 moritz *exceptions
02:12 moritz and for normal objects, .True == .defined
02:12 moritz and it was that way in rakudo before nom too
02:12 perigrin left #perl6
02:13 felher moritz: hm.. sounds reasonable :)
02:14 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:15 felher Ah, i see :) Poor child, poor father :)
02:16 orafu joined #perl6
02:16 moritz ah well, she's better now. And I'll try to sleep once more :-)
02:17 felher moritz: good luck, and may both of you sleep well :)
02:18 moritz thanks :-)
02:21 xinming joined #perl6
03:00 mikec joined #perl6
03:00 xinming joined #perl6
03:11 perigrin joined #perl6
03:28 perigrin left #perl6
03:45 benabik joined #perl6
04:21 IngisKahn joined #perl6
04:31 _jaldhar joined #perl6
04:32 envi_ joined #perl6
04:36 constantined joined #perl6
04:57 NamelessTee joined #perl6
05:07 kaleem joined #perl6
05:12 jrockway joined #perl6
05:27 replore joined #perl6
05:31 Woodi joined #perl6
05:31 Woodi hallo everyone :)
05:36 birdwindupbird joined #perl6
05:39 cotto joined #perl6
05:42 tadzik hello Woodi
05:49 Woodi how progress going ? :)
05:50 colomon joined #perl6
05:50 tadzik with Perl 6 you mean? Not bad I guess :) The Oslo Hackathon is upcoming
05:52 Woodi ah, the imprezas :) forgot, was in virtual world for a while... but Oslo sounds close...
05:55 tadzik do come :)
05:55 tadzik we have quite a team coming from Poland
05:57 Woodi heh :)
05:57 Woodi lastly I learned thet team is the best weapon :)
05:57 tadzik like, whole two people
05:58 Woodi any web page for Hackathon ? or easy to google ?
05:59 tadzik hm
05:59 tadzik https://gist.github.com/1711730
06:02 Woodi I wonder if I can get free days. but if that will happen I can annoy ppls with photo camera...
06:03 tadzik no hacking?
06:04 Woodi I can talk too :)
06:04 tadzik :)
06:04 Woodi realy I was hoping for learning :)
06:04 tadzik me and moritz++ have already blogged about our plans for hackathon
06:05 tadzik if masak haven't hijacked planetsix you could even easily find the posts :P
06:05 Woodi will check :)
06:06 Woodi ok, away from that keyboard for a while...
06:33 xdbr joined #perl6
07:07 fhelmberger joined #perl6
07:12 brrt joined #perl6
07:14 kresike joined #perl6
07:52 masak good awakening period, #perl6
07:53 tadzik heyawn masak
07:53 moritz \o masak
07:54 masak sorry sorry about hogging planetsix :/
07:55 fglock joined #perl6
07:57 tadzik :) pay no minnd
07:57 tadzik it's a clever hack, intentional or not
07:57 masak not really.
07:57 tadzik I wonder how many blog aggregators can be hijacked in this way
08:13 masak can you always take something non-deterministic and emulate it deterministically, if you accept an exponential slowdown?
08:15 kst joined #perl6
08:16 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
08:16 moritz masak: and which allows you to reduce the explored space of exponential configuration to a single random event
08:17 moritz consider a random passwort generator. You cannot emulate it with something determinstic
08:18 moritz 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 moritz because there's no deterministic way to pick a random item of a huge list
08:19 masak arnsholt: I'm sniffing around in the vicinity of automatic saga correctness analysis, DFAs and NFAs.
08:31 masak moritz: I think we might be having slightly non-aligned definitions of "non-deterministic".
08:32 moritz masak: you are refering to the idea of a machine that can magically chose "right" branches?
08:33 masak yes, that.
08:33 masak moritz: my definition is exactly that of the "N" in "NFA", that is, an input may cause several state transitions.
08:33 dakkar joined #perl6
08:33 masak "at once".
08:34 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:36 masak that's my intuition too.
08:36 masak because you can emulate being at N states at once by keeping a 2**N state vector around.
08:37 masak I don't see why you need the proviso "and that the runtime is polynomial otherwise".
08:38 bonsaikitten so the only problem is that your state space expands by 2**N worst case
08:39 moritz masak: because otherwise N can grow very fast
08:40 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?
08:40 masak bonsaikitten: that only feels like a problem if I decide to map out the derived DFA in memory.
08:41 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)
08:41 masak arnsholt: yes, I think so. NP is the class of things doable in polynomial time by a non-deterministic Turing machine.
08:41 masak moritz: :)
08:47 spider-mario joined #perl6
08:59 tarch joined #perl6
09:37 FACEFOX joined #perl6
09:39 FACEFOX joined #perl6
09:41 FACEFOX joined #perl6
09:43 FACEFOX joined #perl6
09:52 thelazydeveloper joined #perl6
09:52 replore joined #perl6
09:58 ocharles joined #perl6
10:17 bacek joined #perl6
10:24 NamelessTee joined #perl6
10:28 daxim joined #perl6
10:52 jferrero joined #perl6
10:58 mauror joined #perl6
11:12 masak std: my %h = END => 1;
11:12 p6eval std 1ad3292: OUTPUT«ok 00:00 41m␤»
11:12 masak r: my %h = END => 1;
11:12 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix => instead at line 1, near " 1;"␤»
11:12 * masak submits rakudobug
11:20 jnthn Need real LTM to really fix that one.
11:21 JimmyZ joined #perl6
11:24 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:27 jnthn It's almost certainly related
11:27 jnthn END => should win because the declarative prefix incorporates the =>
11:35 JimmyZ aloha
11:35 moritz moin
11:35 jnthn dobry den :)
11:36 bbkr dzien dobry :)
11:37 masak dober dan :)
11:38 daxim I just learnt that c# has invisible invocants.   Blah() is a method call in the current context
11:41 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:46 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 masak anyway, Java does the same. Eclipse makes the static method calls cursive, so you get a bit of a visual cue which is which.
11:52 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␤»
11:52 gfldex am i doing something silly?
11:52 tadzik you're doing something NYI using the wrong syntax :)
11:53 gfldex what would be the right syntax?
11:54 masak a couple of things here.
11:55 masak quasi < > isn't supported, so far as I know.
11:55 masak r: quasi {}; say "alive"
11:55 p6eval rakudo 3bd91f: OUTPUT«alive␤»
11:55 masak r: quasi <>; say "alive"
11:55 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/eq45vsV6bF:1␤»
11:55 masak even if it were, the triple-brace syntax (which is part of the next big step forward, D2), isn't supported yet.
11:55 gfldex r: macro f_macro($name){ return quasi { sub {{{$name}}} (){ say 'i am {{{$name}}}'; } } }; f_macro('foo'); foo();
11:55 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
11:56 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 masak ever*
11:57 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 masak you can make subs scope-sensitive by using a neat trick with dynamic variables that I really should document/blog about some day.
11:59 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
12:00 moritz for now, yes
12:01 masak gfldex: well, there's always code generation/eval of whole programs.
12:01 tadzik hmm, not really
12:01 tadzik well, for subs yes, for methods no
12:01 masak and there's also textual macros, at least in Pugs. :)
12:01 tadzik Redis library cheats in a similar way, adding lots of methods using .^add_method
12:02 tadzik 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.
12:02 masak gfldex: presumably you could do my &COMPILING::foo; or some such, though.
12:03 gfldex i actually have a usecase for that :)
12:03 gfldex https://gist.github.com/2366834
12:03 gfldex trivial to do in javascript
12:04 gfldex just need to copy over the functions from one namespace to another
12:05 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.
12:05 moritz *the proper solution
12:05 moritz we just aren't there yet
12:05 tadzik gfldex: see https://github.com/slunski/perl6-simple-redis/blob/master/lib/Simple/Redis.pm#L137 for some inspiration
12:05 benabik joined #perl6
12:06 moritz except that this generates methods, not subs
12:07 moritz but I guess we should have a similar meta-level API for installing subs
12:07 tadzik yes
12:08 gfldex could i do some ::= in a macro?
12:09 pernatiy joined #perl6
12:13 masak you can run arbitrary code in a macro.
12:13 masak but I have a feeling you really have another question in mind. :)
12:14 masak 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:15 moritz masak: that's why I said "and then import them at compile time"
12:16 masak hm.
12:16 masak that would be neat, yes.
12:17 gfldex could a package be constructed at runtime?
12:18 _jaldhar joined #perl6
12:18 masak r: say Package.new
12:18 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Package' called (line 1)␤»
12:18 masak r: say Module.new
12:18 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Module' called (line 1)␤»
12:19 masak oh wait. this is all done by HOWs :)
12:19 masak r: say PackageHOW
12:19 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&PackageHOW' called (line 1)␤»
12:19 masak hm.
12:19 moritz r: say Perl6::Metamodel::PackageHOW.new()
12:19 p6eval rakudo 3bd91f: OUTPUT«Could not find symbol 'Perl6::Metamodel::&PackageHOW'␤  in block <anon> at /tmp/GrzAFKjXMU:1␤␤»
12:19 sftp joined #perl6
12:19 moritz r: package A { }; say A.HOW
12:19 jnthn Just Metamodel::PackageHOW
12:19 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␤␤»
12:20 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␤␤»
12:20 moritz r: say Metamodel::PackageHOW.new()
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/ePeE3szs2Q:1␤␤»
12:20 masak r: say Metamodel::PackageHOW.new_type
12:20 p6eval rakudo 3bd91f: OUTPUT«<anon>()␤»
12:21 moritz what I had in mind was something like
12:21 moritz package A { }; A.^add_sub(:export, $name, $code);
12:22 moritz 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 #perl6
12:23 masak sounds eminently doable.
12:24 brrt joined #perl6
12:24 moritz note that it wouldn't be lexically callable within A, because of the issues masak++ has mentioned
12:25 moritz (and it might need to be a module instead of a package)
12:25 masak hm, does .^add_stash allow something like this already?
12:25 masak yeah, should probably me a module, come to think of it.
12:27 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␤»
12:27 moritz r: module A { BEGIN { EXPORT_SYMBOL('&foo', <ALL DEFAULT>, sub { say "OH HAI" }) } }
12:27 p6eval rakudo 3bd91f:  ( no output )
12:27 moritz r: module A { BEGIN { EXPORT_SYMBOL('&foo', <ALL DEFAULT>, sub { say "OH HAI" }) } }; import A; foo()
12:27 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&foo' called (line 1)␤»
12:27 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.
12:28 gfldex I strongly believe that there should be more stumbling in this world. :)
12:28 masak +1
12:28 moritz \o/ success
12:28 moritz nopaste forthcoming
12:28 masak or at least daring to ask questions regardless of whether they're well-formulated.
12:30 moritz https://gist.github.com/2366919
12:30 masak moritz++
12:33 masak 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
12:35 tadzik moritz: ooh, cool
12:38 jnthn Please call trait_mod:<is>(..., :export) instead of the (should not be leaking out of CORE.setting) EXPORT_SYMBOL
12:38 jnthn Calling the trait_mod by yourself is totally legit.
12:38 moritz right, that would be less hacky
12:38 moritz jnthn: how could I add something to export to a package after it has been composed?
12:40 moritz 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␤␤»
12:40 jnthn Composition and export are totally orthogonal anyway.
12:40 moritz ok, rephrase
12:40 jnthn Exports just go in the package's EXPORT::DEFAULT and so forth
12:40 moritz I want to do it from outside the package
12:41 * masak gets on a train
12:42 moritz git updated, now sticks more to the API
12:44 moritz *gist
12:47 moritz it still feels a bit hacky, because the 'is export' trait asks the sub for its name
12:47 moritz and an anonymous sub doesn't have that name, so we need to override the .name method. Yikes.
12:47 moritz but it's good to see that such stuff actually works in nom
12:49 moritz r: say Regex ~~ Method
12:49 p6eval rakudo 3bd91f: OUTPUT«True␤»
12:49 tadzik moritz: I suppose the shell output needs updating now too :)
12:55 uvtc joined #perl6
12:56 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:57 uvtc Actually, I don't see a "master" branch at github.com/rakudo/rakudo...
12:57 mucker joined #perl6
12:59 tarch_ joined #perl6
12:59 benabik uvtc: nom is the new master.
12:59 benabik uvtc: By default, it should check out nom.  People with old checkouts may have to change their config.
13:00 moritz well, we should update the website to reflect that
13:00 benabik moritz: True
13:00 dalek tablets: e1a3c25 | (Herbert Breunung)++ | html/ (28 files):
13:00 dalek tablets: new inc and navigation order
13:00 dalek tablets: review: https://github.com/perl6/tablets/commit/e1a3c25c3e
13:06 PacoAir joined #perl6
13:07 fgomez joined #perl6
13:08 uvtc Is R* 2012.04 expected to land before the Oslo hackathon?
13:08 moritz no, after
13:08 moritz we want to include all the good stuff from the hackathon in the release
13:09 kaleem_ joined #perl6
13:09 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:10 moritz I hope so :-)
13:19 dalek tablets: f368ff0 | (Herbert Breunung)++ | html/ (4 files):
13:19 dalek tablets: fixed typo in the ssi
13:19 dalek tablets: review: https://github.com/perl6/tablets/commit/f368ff0eb4
13:31 bluescreen10 joined #perl6
13:35 tyatpi joined #perl6
13:56 JimmyZ joined #perl6
13:59 JimmyZ_ joined #perl6
14:08 zipf joined #perl6
14:15 kresike joined #perl6
14:16 mdupont joined #perl6
14:23 envi_ joined #perl6
14:33 [Coke] (deep in backscroll - if you're using .docx instead of .doc, you can unzip it and then you're just versioning xml.)
14:35 envi_ joined #perl6
14:37 moritz [Coke]: yes, but the question is still if it's suitable for version control
14:37 moritz [Coke]: ie small changes in the document also lead to only small changes in the XML output
14:37 moritz and if the changes are mergeable
14:38 brrt iirc there's xml::diff in cpan?
14:39 benabik I think there's a merge program for OpenOffice documents.
14:56 pernatiy_ joined #perl6
14:56 cognominal moritz++  #  your gist "Perl 6: dynamically generate exports in Rakudo" is very impressive https://gist.github.com/2366919
14:58 colomon woah!  sweet!
14:59 benabik std: my $x = sub foo() {...}
14:59 p6eval std 1ad3292: OUTPUT«ok 00:00 42m␤»
14:59 benabik r: my $x = sub foo() {...}
14:59 p6eval rakudo 3bd91f:  ( no output )
14:59 moritz r: my $x = sub foo() {...}; say $x
14:59 p6eval rakudo 3bd91f: OUTPUT«sub foo() { ... }␤»
14:59 moritz r: my $x = sub foo() {...}; say $x()
14:59 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␤␤»
15:00 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 #perl6
15:00 benabik Ah, but dynamic names is harder.  I see.
15:00 tadzik aye
15:02 colomon hmm?  why?
15:03 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 #perl6
15:05 moritz benabik: that's why I use the role mix
15:05 moritz *mixin in that gist
15:06 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
15:07 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:08 moritz benabik: no, it's not 'our'
15:10 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:11 moritz our-ness and exporting are orthongonal
15:11 moritz I guess that's what you meant too
15:12 benabik Basically, yes.  I'm used to qualified imports in ML and Haskell.
15:14 moritz I guess they aren't too hard to do now
15:15 moritz 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`?
15:15 moritz yes
15:16 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
15:16 benabik As our?
15:16 moritz import Foo::Bar::Baz into F; # could make all imports available as F::sub_from_that_package()
15:17 pernatiy joined #perl6
15:17 moritz which would require a lexical F which happens to be a package
15:17 moritz and which holds all the imports, but modified to be visible like 'our'
15:18 * benabik waits for the gist...  ;-)
15:20 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.  :-)
15:25 kresike bye all
15:25 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 #perl6
15:30 JimmyZ std: sub f  { } but role { } does role { };
15:30 p6eval std 1ad3292: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤"but" and "does" are non-associative and require parens at /tmp/GZrv7ekajF line 1:â�¤------> [32msub f  { } but role { } does [33mâ��[31mrole { };[0mâ�¤Check failedâ�¤FAILED 00:00 41mâ�¤Â»
15:30 JimmyZ r: sub f  { } but role { } does role { };
15:30 p6eval rakudo 3bd91f:  ( no output )
15:30 JimmyZ bug?
15:31 dalek rakudo/nom: 200926b | moritz++ | src/core/traits.pm:
15:31 dalek rakudo/nom: .HOW.WHAT is the same as just .HOW. Simplify
15:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/200926b9a5
15:31 dalek rakudo/nom: 05b1cb1 | moritz++ | src/core/Str.pm:
15:31 dalek rakudo/nom: native infix:<xx> operator
15:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/05b1cb1319
15:33 JimmyZ I think the second commit lost something
15:35 moritz JimmyZ: like what?
15:35 JimmyZ multi infix:<xx>
15:35 moritz oh right
15:36 moritz JimmyZ++
15:40 moritz well,, :<x>
15:45 fsergot joined #perl6
15:45 fsergot Hi #perl6 o/
15:47 colomon o\
15:47 Psyche^ joined #perl6
15:52 kcwu joined #perl6
16:00 sjohnson heh
16:05 sorear good * #perl6
16:06 colomon */
16:17 sjohnson hi sorear, and colomon
16:17 sjohnson how's it going?
16:19 colomon my brain is thoroughly confused trying to debug an arithmetic decompression codec in C++
16:21 mucker joined #perl6
16:21 * [Coke] yawns.
16:23 spider-mario joined #perl6
16:24 sorear o/ spider-mario
16:24 spider-mario \o
16:25 lichtkind joined #perl6
16:27 lichtkind moritz: are you sure ssi wrks on that server?
16:35 fglock joined #perl6
16:43 simcop2387 joined #perl6
16:46 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 moritz but maybe it isn't.
16:46 lichtkind moritz: i see in source the ssi includes unresolved
16:46 lichtkind but maybe its becasue the stag files are in a subfulder
16:46 lichtkind because
16:47 lichtkind http://tablets.perl6.org/
16:47 moritz lichtkind: no, subfolders don't hurt
16:49 lichtkind than blame goes back to <!--#include virtual="/inc/meta.stag"-->
16:49 lichtkind which is spelled corectly i think
16:50 lichtkind moritz: your right its there http://tablets.perl6.org/inc/meta.stag
16:50 moritz ok, it was my fault
16:51 moritz seems some part of the apache config is more case sensitive than I thought
16:51 moritz works now
16:51 moritz 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 #perl6
16:51 moritz lichtkind: which is it to be?
16:51 lichtkind moritz: yes the css are now in effect
16:52 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 uvtc lichtkind, You're hand-editing all the html?
16:52 lichtkind moritz: yes i copied that yesterday from one of my projects i wanted to change that
16:52 moritz lichtkind: so UTF-8 is fine?
16:52 lichtkind sure
16:53 lichtkind uvtc: yes and by now i dont see any benefit to automate it
16:53 lichtkind uvtc: interested?
16:54 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 tablets: ffcced6 | moritz++ | html/inc/meta.stag:
16:54 dalek tablets: change encoding in meta tags to UTF-8
16:54 dalek tablets: review: https://github.com/perl6/tablets/commit/ffcced69b1
16:54 uvtc lichtkind, Mark wrote the diveintopython book...
16:54 uvtc lichtkind, all in raw html.
16:54 uvtc lichtkind, His opinion seemed to be that html was the medium of our time, and he had a good Emacs mode, so why not.
16:56 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 skids joined #perl6
16:56 uvtc lichtkind, Personally, I stopped writing raw html way back when I discovered LaTeX, then TeXinfo, Pod, reST, and finally Markdown.
16:58 lichtkind uvtc: yes markdown i heard yesterday too but im not sure if its robust enough for weir side effects of metaops like  [\ ]
16:59 lichtkind 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 #perl6
16:59 lichtkind uvtc: its on cpan?
17:00 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 uvtc lichtkind, No, it's actually written in Haskell.
17:00 fgomez joined #perl6
17:00 uvtc lichtkind, http://johnmacfarlane.net/pandoc/
17:01 PacoAir joined #perl6
17:01 [Coke] +# 04/12/2012 - rakudo++ ; niecza (95.08%); pugs (40.9%)
17:01 [Coke] +"niecza",     20354,     1,   749,  1530, 22634, 24123
17:01 [Coke] +"pugs"  ,      8756,     0,  3261,  1560, 13577, 23984
17:01 [Coke] +"rakudo",     21407,    31,   638,  1890, 23966, 24133
17:01 [Coke] p: say 21407*.41-8756
17:01 p6eval pugs: OUTPUT«20.87␤»
17:01 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.
17:01 [Coke] oooh, 21 tests, I can scrounge those up.
17:01 lichtkind uvtc: i see  thank you for the info
17:02 uvtc lichtkind, sure, y/w
17:02 moritz (fwiw pandoc would be trivial to install on the server too)
17:02 lichtkind moritz: you mean haskell is already there?
17:03 uvtc The fellow who wrote/writes Pandoc is the same guy who created gitit: http://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
17:04 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.
17:05 lichtkind uvtc: a git based wiki i wait for this since 2 years
17:05 [Coke] p: say sprintf("%03d",      3)
17:05 p6eval pugs: OUTPUT«(timeout)»
17:05 lichtkind im complaining about socialtest since 3 years but noone did anything
17:05 uvtc lichtkind, Welcome to flavor country. :)
17:07 uvtc moritz, Looks like gitit should also be available via apt-get.
17:07 lichtkind it read like a dream
17:07 lichtkind yes but the wiki is on different server
17:07 [Coke] p: my $r = 2..6; say $r.min
17:07 p6eval pugs: OUTPUT«2 3 4 5 6␤»
17:07 lichtkind hot elder juice anyone?
17:08 uvtc lichtkind, I'm afraid to ask what you mean by that. :)
17:09 lichtkind uvtc: its healthy common be  a good boy
17:09 lichtkind i just saying im gonne make me a cup
17:09 [Coke] Yah, that sounds disturbing here too.
17:10 lichtkind ya dont know what elder is?
17:10 benabik happstack?
17:10 uvtc lichtkind, Maybe you mean elderberry juice?
17:10 benabik So not only is gitit a git-backed wiki, it's written in Haskell?  Awesome.
17:10 lichtkind uvtc: right
17:11 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
17:11 benabik It does literate haskell...  I wonder if they have a gitit wiki backed by their source.  :-D
17:12 uvtc You can also embed LaTeX math in Pandoc-Markdown, and it gets rendered nicely in pdf output.
17:12 uvtc LaTeX math Moritz, LaTeX math. :)
17:14 brrt joined #perl6
17:14 lichtkind uvtc: to me its no brainer
17:14 spider-mario docutils does that too
17:14 spider-mario since 0.8
17:14 lichtkind i just have to convince to perlfoundation people
17:15 oiig_ joined #perl6
17:15 lichtkind spider-mario: is that a perl module?
17:15 spider-mario no
17:15 spider-mario a python one
17:15 jaffa4 joined #perl6
17:15 [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.
17:16 [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: http://www.unexpected-vortices.com/doc-notes/markdown-and-rest-compared.html
17:17 spider-mario oh, nice
17:17 * [Coke] is only really tangentially a TPF person, but is happy to play one.
17:18 lichtkind :)
17:20 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:21 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)...
17:21 spider-mario do you think so? I find #### extremely distracting
17:21 moritz but mostly I want poeple to do use whatever tools they are productive with
17:22 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 "###".
17:22 * benabik always expects back ticks to indicated code, not links.
17:23 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. :)
17:23 spider-mario (though I’m not sure what would be better)
17:24 uvtc And I agree with benabik: backticks are codey things.
17:24 uvtc Not linkey things.
17:25 spider-mario why is that so?
17:25 spider-mario because of bash?
17:25 benabik Shell, mostly.
17:25 flussence r: `echo a`
17:25 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Confused␤at /tmp/1s_0h9vqQY:1␤»
17:25 spider-mario r: qx{echo a}
17:25 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␤␤»
17:25 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:25 uvtc )
17:26 Chillance joined #perl6
17:26 spider-mario (I think there’s an error in the document)
17:26 spider-mario “Here's a code block within the list item.”
17:26 spider-mario it’s not a code block, it’s a quotation
17:26 spider-mario since it’s missing the ::
17:27 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?
17:29 spider-mario uvtc: regarding math, it’s: :math:`a^2 = b^2 + c^2`
17:29 spider-mario or, alternatively, `a^2 = b^2 + c^2`:math:
17:29 fhelmberger_ joined #perl6
17:29 spider-mario docutils understand the math role since 0.8
17:29 brrt r: sub bar($x --> Int() { return 3.5 }; say bar(3);
17:29 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/waw8DpQyKM:1␤»
17:29 spider-mario when outputting html, by default, it is converted to MathML
17:29 brrt r: sub bar($x --> Int()) { return 3.5 }; say bar(3);
17:29 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/QJ33APFt7z:1␤»
17:30 spider-mario r: sub toto($x --> Int) {42}; say toto 1
17:30 p6eval rakudo 3bd91f: OUTPUT«42␤»
17:30 fhelmberger_ joined #perl6
17:31 spider-mario r: sub bar($x --> Int) { return 3.5 }; say bar(3);
17:31 p6eval rakudo 3bd91f: OUTPUT«3.5␤»
17:31 spider-mario r: sub bar($x) returns Int { return 3.5 }; say bar(3);
17:31 p6eval rakudo 3bd91f: OUTPUT«Type check failed for return value␤  in sub bar at /tmp/odUEXATxRC:1␤  in block <anon> at /tmp/odUEXATxRC:1␤␤»
17:31 brrt ah
17:31 uvtc spider-mario, Thanks. Fixed.
17:32 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␤␤»
17:32 brrt so rakudo implements it but not the syntax
17:32 brrt or, what is the correct syntax
17:33 REPLeffect joined #perl6
17:39 * [Coke] discovers "quietly" by reading spec tests. huh.
17:39 benabik quietly?
17:39 lichtkind moritz: i think it would be freat to have a gitit wiki so anyone would be happy
17:39 [Coke] r: quietly {warn "shhh"}
17:39 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&quietly' called (line 1)␤»
17:40 lichtkind coders can commit and rest can edit
17:40 [Coke] guessing NYI anywhere
17:40 [Coke] t/spec/S04-statements/quietly.t
17:40 [Coke] S04:840
17:41 moritz it's the "try" for warnings
17:41 moritz or was it for &note? not sure anymore
17:41 * [Coke] wonders why not "no warnings"
17:41 TimToady for warnings
17:41 birdwindupbird joined #perl6
17:43 moritz [Coke]: different scoping
17:43 moritz [Coke]: "no warnings" is for the lexical scope. "quietly" surpresses warnings in code that is called from the current location too
17:43 moritz ie
17:44 moritz sub f { warn 'foo' }; { no warnings; f(); } still warns
17:44 moritz sub f { warn 'foo' }; quietly { f(); } # no warnings
17:44 benabik S04:840 mentions it, but doesn't explain it.
17:45 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?
17:45 benabik PerlJam++
17:45 spider-mario (or even &f)
17:46 lichtkind moritz: i would like to hear from you later but for now i have to go
17:46 benabik spider-mario: &f won't call it, just return a reference to it (I think)
17:46 spider-mario just like {f}
17:46 spider-mario used as a value
17:47 spider-mario (e.g. in quietly {f})
17:47 benabik r: sub f() { say 'f' }; f(); {f}; &f
17:47 p6eval rakudo 3bd91f: OUTPUT«f␤f␤»
17:47 spider-mario yes, but
17:47 spider-mario r: say {say "hello"}
17:47 p6eval rakudo 3bd91f: OUTPUT«Block.new()␤»
17:48 TimToady std: gather quietly contend maybe do try lazy pi
17:48 p6eval std 1ad3292: OUTPUT«ok 00:00 41m␤»
17:48 spider-mario r: sub f() {say 'f'}; f; {f}; sub {f}
17:48 p6eval rakudo 3bd91f: OUTPUT«f␤f␤»
17:49 zipf joined #perl6
17:49 PerlJam TimToady: so
17:50 PerlJam ;)
17:50 dalek roast: 4128c59 | coke++ | S02-names/ (2 files):
17:50 dalek roast: pugs fudge
17:50 dalek roast: review: https://github.com/perl6/roast/commit/4128c59f90
17:50 dalek Pugs.hs: bb9c4e9 | coke++ | t/spectest.data:
17:50 dalek Pugs.hs: run (fudged) tests
17:50 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/bb9c4e9e6b
17:52 [Coke] ARGH.
17:52 [Coke] 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.
17:52 [Coke] at least I have list of everything that SHOULD be fudged. :P
17:53 REPLeffect joined #perl6
17:53 dalek Pugs.hs: b9e60c7 | coke++ | t/spectest.data:
17:53 dalek Pugs.hs: run fudged tests
17:53 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/b9e60c7ba5
17:58 timotimo [Coke], you can still get the files from your git object database if you added them at one point. did you?
18:03 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»
18:03 jaffa4 What is it equal<
18:04 jaffa4 r: my @a = 1,2,5,13, 19;  print all(@a).perl
18:04 p6eval rakudo 3bd91f: OUTPUT«all(1, 2, 5, 13, 19)»
18:04 jaffa4 r: my @a = 1,2,5,13, 19;  print !all(@a).perl
18:04 p6eval rakudo 3bd91f: OUTPUT«False»
18:04 jaffa4 r: my @a = 1,2,5,13, 19;  print not all(@a).perl
18:05 p6eval rakudo 3bd91f: OUTPUT«False»
18:05 jaffa4 r: my @a = 1,2,5,13, 19;  print not all(@a)
18:05 p6eval rakudo 3bd91f: OUTPUT«False»
18:06 LylePerl joined #perl6
18:11 brrt r: my int $x = 3;
18:11 p6eval rakudo 3bd91f:  ( no output )
18:11 brrt r: my int $x = 3; say $x;
18:11 p6eval rakudo 3bd91f: OUTPUT«3␤»
18:11 brrt ... odd
18:11 brrt that stuff does not work for me
18:12 brrt or, it does not work in the REPL
18:12 moritz brrt: yes, that's a known bug
18:13 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
18:13 moritz yes, fixable
18:14 * brrt checks out rakudo source
18:14 moritz brrt: possibly done in nqp though
18:16 moritz running the repl with --ll-exception might give you a better idea about where the error occurs
18:17 dalek rakudo/nom: b229580 | moritz++ | src/core/Str.pm:
18:17 dalek rakudo/nom: Revert "native infix:<xx> operator"
18:17 dalek rakudo/nom:
18:17 dalek rakudo/nom: This reverts commit 05b1cb13190b324bd4c718c2ecdbddb15b8a6994.
18:17 dalek rakudo/nom: It was wrong (misspelled the operator name), and causes
18:17 dalek rakudo/nom: segfaults when the operator name is fixed
18:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b22958003c
18:21 maja joined #perl6
18:23 maja joined #perl6
18:27 brrt it looks like it is nqp
18:31 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:32 uvtc Usage docs.
18:32 brrt pod works, doesn't it?
18:32 moritz it does
18:32 uvtc I don't see a perl6doc command in my ~/opt/rakudo-star/bin directory...
18:32 uvtc How do I view the pod docs in my script?
18:33 moritz uvtc: perl6 --doc $file
18:33 uvtc gracias.
18:34 uvtc 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
18:34 moritz right
18:34 moritz brrt: the problem seems to be nqp/src/cheats/parrot-callcontext.pir lines 21 and 22
18:35 moritz $P0 = lexpad[$S0]
18:35 moritz that calls the vtable the returns a PMC
18:35 moritz s:2nd/the/that/
18:35 moritz but if it's an int register, it would need to use  $I0 = lexpad[$S0]
18:40 * brrt moves to nqp
18:40 jaffa4 r: "uuu"~~ g:s/u/{ print "once" }/;
18:40 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Confused␤at /tmp/JEKf6eFn44:1␤»
18:41 jaffa4 std: "uuu"~~ g:s/u/{ print "once" }/;
18:41 p6eval std 1ad3292: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Bogus term at /tmp/cGDNK8vBGL line 1:â�¤------> [32m"uuu"~~ g:s/u/{ print "once" }/[33mâ��[31m;[0mâ�¤Undeclared routines:â�¤     'g:s' used at line 1â�¤   'u' used at line 1â�¤Parse failedâ�¤FAILED 00:00 42mâ�¤Â»
18:41 jaffa4 std: "uuu"~~ s:g/u/{ print "once" }/;
18:41 p6eval std 1ad3292: OUTPUT«ok 00:00 42m␤»
18:41 jaffa4 r: "uuu"~~ s:g/u/{ print "once" }/;
18:41 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 #perl6
18:44 jaffa4 What is wrong in here?
18:44 moritz jaffa4: strings are immutable. You cannot change the string "uuu"
18:44 moritz jaffa4: you can only change the contents of variables
18:45 * brrt doesn't know enough PIR for this fix :-)
18:45 GlitchMr joined #perl6
18:46 moritz brrt: if you figure out how to get the type of a register, I can fix that part
18:50 brrt you mean the type it should have?
18:50 brrt as specified by perl
18:50 moritz right
18:56 dalek Pugs.hs: f25ef30 | coke++ | t/spectest.data:
18:56 dalek Pugs.hs: remove flaky test file
18:56 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/f25ef30359
18:57 [Coke] timotimo: no, I never added them. and I've now reconstructed it by hand.
19:02 dalek roast: 23a618d | coke++ | S (5 files):
19:02 dalek roast: pugs fudge
19:02 dalek roast: review: https://github.com/perl6/roast/commit/23a618d44f
19:04 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
19:05 moritz in parrot's src/pmc/lexpad.pmc it's done internally all the time
19:08 tadzik home.sweet()!
19:08 [Coke] p: say 8951/21407
19:08 p6eval pugs: OUTPUT«0.4181342551501845190825430933806698743402␤»
19:12 [Coke] argh. now it's too close to 42%!
19:12 [Coke] p: say 21407*.42-8951
19:12 p6eval pugs: OUTPUT«39.94␤»
19:12 uvtc Just noticed, the perl6 man page doesn't mention the `--doc` option.
19:16 tadzik oh, that's possible
19:19 benabik moritz: Trying to add a quick and dirty introspection method.
19:21 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:22 tadzik uvtc: it's the same thing
19:23 uvtc tadzik, I'd need an account at rt to file bugs there, though. Right?
19:24 uvtc At https://rt.perl.org/rt3/Public/?nossl=true
19:24 uvtc (heh. ?ssl=false ?)
19:24 tadzik uvtc: I think so
19:31 lexu joined #perl6
19:34 moritz you can't submit bugs via the web interface, regardless of wheteher you have an account or not
19:34 moritz email is the weapon of choice here
19:34 * brrt leaves, sleeptime
19:34 uvtc I was just about to ask: "I have a really simple question...". :)
19:34 brrt left #perl6
19:34 uvtc Thanks moritz. Will try in 3 ... 2 ... 1 ...
19:35 moritz BOOM
19:36 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 uvtc ?
19:36 moritz uvtc: by sending it to rakudobug@perl.org
19:37 uvtc So, do they get triaged by someone in a boiler room somewhere shoveling bug reports into the proper furnace? :)
19:38 uvtc (sent, btw)
19:38 moritz yes, that someone is likely a perl script though :-)
19:38 uvtc Ah, I see the bug report.
19:38 moritz magic!
19:41 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:44 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:45 * benabik isn't sure how Rakudo actually does native lexicals with these classes.
19:46 * moritz neither
19:46 moritz I guess only mls and jnthn could tell you without first having to read and understand the code
19:46 benabik moritz: I have a type_of method on Parrot's lexpad now though, if that would help?
19:47 benabik (Not terribly well tested.)
19:47 moritz benabik: I'd name it register_type or reg_type
19:47 moritz it's one of the missing ingredients, yes
19:48 * moritz blug: http://perlgeek.de/blog-en/perl-6/2012-rakudo-hack-dynamic-export-lists.writeback
19:49 tadzik BLOGGING SPREE
19:49 tadzik moritz++
19:50 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.”
19:50 spider-mario I recognize myself the other day :D
19:50 spider-mario thanks :D
19:52 jaffa4 r: print ([**] 1,2,3,4);
19:52 p6eval rakudo 3bd91f: OUTPUT«1»
19:52 jaffa4 Should not this print some other value?
19:52 spider-mario why?
19:52 tadzik :)
19:52 jaffa4 is it not power?
19:52 moritz it is
19:52 spider-mario yes, precisely
19:52 moritz and what's 1 to the 2nd power?
19:52 tadzik r: say 1 ** Inf
19:52 p6eval rakudo 3bd91f: OUTPUT«1␤»
19:52 spider-mario 1 ** anything = 1
19:52 moritz r: say 1 ** 1i
19:52 p6eval rakudo 3bd91f: OUTPUT«1+0i␤»
19:52 benabik r: print [**] 2,3,4
19:52 p6eval rakudo 3bd91f: OUTPUT«2417851639229258349412352»
19:52 spider-mario btw, does [**] respect **’s associativity?
19:52 spider-mario looks so
19:52 moritz spider-mario: yes
19:53 jaffa4 Is it not right associative?
19:53 moritz it is
19:53 spider-mario yes
19:53 benabik r: print (2**3)**4
19:53 p6eval rakudo 3bd91f: OUTPUT«4096»
19:53 moritz 2 ** (3 ** 4)
19:53 moritz r: .say for [\**] 2, 3, 4
19:53 p6eval rakudo 3bd91f: OUTPUT«4␤81␤2417851639229258349412352␤»
19:54 spider-mario nice
19:55 moritz r: say (42, 18, *%* ... 1)[*-2]
19:55 p6eval rakudo 3bd91f: OUTPUT«(timeout)»
19:55 moritz r: say (42, 18, *%* ... 0)[*-2]
19:55 p6eval rakudo 3bd91f: OUTPUT«6␤»
19:56 * moritz is still proud of that GCD implementation
19:56 spider-mario :D
19:56 spider-mario I like it too
19:57 jaffa4 r: print [-] 8,2,2;
19:57 p6eval rakudo 3bd91f: OUTPUT«4»
19:58 jaffa4 SHould it this be 6?
19:59 moritz jaffa4: as a general rule, [OP] a, b, c  is the same as a OP b OP c
20:00 moritz and 8 - 2 - 2 happens to be 4
20:00 spider-mario how do you get 6, jaffa4?
20:00 jaffa4 8-(2-2)
20:00 spider-mario oh
20:01 jaffa4 should be 8
20:01 spider-mario ** is right-associative but - is not
20:01 jaffa4 It depends on the operator then
20:02 spider-mario it does, indeed
20:05 estrabd joined #perl6
20:06 * moritz recommends reading S03
20:08 jaffa4 I can read/write, execute, who am I?
20:28 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?
20:29 spider-mario I meant the current nom
20:29 spider-mario from the git repository
20:30 uvtc Well, startup (to get the prompt) is pretty much instantaneous for me.
20:30 sjn spider-mario: iirc, no
20:30 spider-mario how much time to run a Hello World?
20:31 spider-mario 3s (* 2012.02) vs 0.x s (current) on my machine
20:31 uvtc $ time ./bar.pl6
20:31 uvtc hello world!
20:31 uvtc real0m0.968s
20:31 uvtc user0m0.824s
20:31 uvtc sys0m0.104s
20:31 spider-mario oh
20:32 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
20:32 spider-mario HEAD: perl6 hello.pl  0,46s user 0,13s system 96% cpu 0,613 total
20:33 uvtc Wow. Nice improvement.
20:34 benabik I think R* includes the serialization work...
20:34 spider-mario 2012.02: Stage parse: 2.750
20:34 spider-mario current: Stage parse: 0.347
20:34 spider-mario (--stagestats told me that)
20:34 spider-mario benabik : 2012.02 does not
20:34 spider-mario 2012.04 will
20:34 benabik Ah.
20:34 benabik spider-mario: Well, there you go.
20:35 spider-mario “Stage post” has slightly increased, though
20:35 spider-mario 0.031 → 0.091
20:35 spider-mario we might do more stuff now
20:36 spider-mario do we?
20:36 benabik I think post includes the serialization.
20:36 spider-mario oh, ok.
20:36 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')?
20:36 spider-mario well, it is certainly acceptable considering the gain on the parsing.
20:37 spider-mario uvtc : [] does not flatten
20:37 colomon n: my @a = ['a', 'b', 'c']; say @a.perl;
20:37 p6eval niecza v15-6-gefda208: OUTPUT«[["a", "b", "c"]].list␤»
20:37 spider-mario the first one produces a list that has ['a', 'b', 'c'] as it first value
20:37 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.
20:37 spider-mario its*
20:38 spider-mario (and the second one doesn’t need brackets in Perl 6)
20:39 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␤»
20:39 uvtc rakudo: my @a = ('a', ('b', 'c'), 'd'); say @a.perl
20:39 p6eval rakudo 3bd91f: OUTPUT«Array.new("a", "b", "c", "d")␤»
20:39 uvtc rakudo: my @a = ('a', ['b', 'c'], 'd'); say @a.perl
20:39 p6eval rakudo 3bd91f: OUTPUT«Array.new("a", ["b", "c"], "d")␤»
20:40 colomon perl6: say ['a', 'b', 'c'].WHAT
20:40 p6eval pugs: OUTPUT«Array␤»
20:40 p6eval ..rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«Array()␤»
20:40 colomon perl6: say ('a', 'b', 'c').WHAT
20:40 p6eval rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«Parcel()␤»
20:40 p6eval ..pugs: OUTPUT«Array␤»
20:40 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.
20:40 spider-mario r: my @a = 2, 3, 4; say (1, @a, 5).perl
20:40 p6eval rakudo 3bd91f: OUTPUT«(1, Array.new(2, 3, 4), 5)␤»
20:40 spider-mario oh?
20:41 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
20:41 p6eval rakudo 3bd91f: OUTPUT«(1, Array.new(2, 3, 4), 5)␤»
20:41 spider-mario r: my @a = 2, 3, 4; say (1, @a, 5).elems
20:41 p6eval rakudo 3bd91f: OUTPUT«5␤»
20:41 spider-mario right.
20:41 spider-mario r: my @a = 2, 3, 4; say (1, [@a], 5).elems
20:41 p6eval rakudo 3bd91f: OUTPUT«3␤»
20:41 spider-mario r: my @a = 2, 3, 4; say (1, [@a], 5).perl
20:41 p6eval rakudo 3bd91f: OUTPUT«(1, [2, 3, 4], 5)␤»
20:41 uvtc colomon, Oh, whoops. Ok, one's a Parcel and one's an Array...
20:41 spider-mario r: my @a = 2, 3, 4; say (1, [@a], 5)
20:41 p6eval rakudo 3bd91f: OUTPUT«1 2 3 4 5␤»
20:41 spider-mario r: my @a = 2, 3, 4; say (1, @a, 5)
20:41 p6eval rakudo 3bd91f: OUTPUT«1 2 3 4 5␤»
20:42 spider-mario (sorry, I may be abusing p6eval)
20:42 TimToady r: my @a = 2, 3, 4; say (1, $@a, 5)
20:42 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Invalid hard reference syntax at line 1, near "@a, 5)"␤»
20:42 TimToady n: my @a = 2, 3, 4; say (1, $@a, 5)
20:42 p6eval niecza v15-6-gefda208: OUTPUT«[31m===[0mSORRY![31m===[0m��Invalid hard reference syntax at /tmp/RLvjO_tr66 line 1:�------> [32mmy @a = 2, 3, 4; say (1, $[33m�[31m@a, 5)[0m��Parse failed��»
20:42 TimToady nyi I guess
20:43 TimToady std: my @a = 2, 3, 4; say (1, $@a, 5)
20:43 p6eval std 1ad3292: OUTPUT«ok 00:00 43m␤»
20:45 thou joined #perl6
20:46 xenu joined #perl6
20:49 uvtc r: my @a = ['a', 'b']; say @a.WHAT;
20:49 p6eval rakudo 3bd91f: OUTPUT«Array()␤»
20:49 uvtc r: my @a = ('a', 'b'); say @a.WHAT;
20:49 p6eval rakudo 3bd91f: OUTPUT«Array()␤»
20:49 uvtc No parcel there...
20:50 TimToady r: my @a := ('a', 'b'); say @a.WHAT
20:50 p6eval rakudo 3bd91f: OUTPUT«Parcel()␤»
20:51 spider-mario r: my @a = 'a', 'b'; @a[*].WHAT.say
20:51 p6eval rakudo 3bd91f: OUTPUT«Parcel()␤»
20:51 uvtc I need to check back to my notes to see what := does...
20:52 uvtc r: my @a = 'a', 'b'; say @a.WHAT
20:52 p6eval rakudo 3bd91f: OUTPUT«Array()␤»
20:52 japhb r: my @a = 2, 3, 4; my @b = (1, @a, 5); my $c = (1, @a, 5); say @b.perl; say $c.perl;
20:52 p6eval rakudo 3bd91f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤$(1, Array.new(2, 3, 4), 5)␤»
20:52 japhb That is very counterintuitive to me.
20:53 * 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.
20:53 uvtc ... with a guest appearance by :=.
20:54 uvtc 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;
20:54 p6eval rakudo 3bd91f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤$(1, (2, 3, 4), 5)␤»
20:55 PerlJam uvtc: You could always write such a blog post  :)
20:56 spider-mario r: my @a = 1, 2, 3; @a.rotate = 1, 2, 3; @a.say
20:56 p6eval rakudo 3bd91f: OUTPUT«1 2 3␤»
20:56 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...
20:56 spider-mario r: my @a = 1, 2, 3; my @b := @a.rotate; @b[0] = 5; @a.say
20:56 p6eval rakudo 3bd91f: OUTPUT«1 5 3␤»
20:56 spider-mario magic!
20:57 spider-mario r: my @a = 1, 2, 3; @a.rotate.WHAT.say
20:57 p6eval rakudo 3bd91f: OUTPUT«Array()␤»
20:57 spider-mario r: my @a = 1, 2, 3; @(@a.rotate).WHAT.say
20:57 p6eval rakudo 3bd91f: OUTPUT«Array()␤»
20:59 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.
21:00 TimToady .oO(n/r == noise reduction)
21:02 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)␤»
21:03 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)␤»
21:03 PerlJam now, that one I don't understand.
21:03 PerlJam I'd guess nieczabug
21:03 spider-mario r: my @a = 2,3,4; my @b = (1, @a, 5); my $c = (1, @a, 5); say @b.perl; say $c.perl;
21:03 p6eval rakudo 3bd91f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤$(1, Array.new(2, 3, 4), 5)␤»
21:03 spider-mario r: my @a = 2,3,4; my @b = (1, @a, 5); my $c = (1, @a, 5); say @b.perl; say @($c).perl;
21:03 p6eval rakudo 3bd91f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤(1, 2, 3, 4, 5).list␤»
21:03 spider-mario it correctly flattens when evaluated in list context
21:04 spider-mario 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␤»
21:04 spider-mario in niecza too
21:05 pernatiy joined #perl6
21:06 |newbie| joined #perl6
21:07 snearch joined #perl6
21:08 jnthn_ joined #perl6
21:08 PerlPilot joined #perl6
21:08 hillu_ joined #perl6
21:08 TimToady joined #perl6
21:09 estrai joined #perl6
21:10 uvtc spider-mario, Aye, there's another piece of the puzzle: sometimes assigning a list to a $scalar, and sometimes to an @array...
21:12 uvtc Thanks, all. o/
21:12 uvtc left #perl6
21:14 PerlJam joined #perl6
21:24 y3llow_ joined #perl6
21:24 bruges_ joined #perl6
21:26 fgomez joined #perl6
21:28 y3llow joined #perl6
21:31 y3llow joined #perl6
21:37 lichtkind moritz: ping
21:59 jnthn_ evening, #perl6
21:59 spider-mario o/
22:00 plobsing joined #perl6
22:02 jnthn_ On-site consulting gig tomorrow, then my Perl 6 tuit deficit is over. :)
22:05 sjn yay! \o/
22:09 lichtkind jnthn_: o/
22:10 |newbie| Is perl 6 used anyone in the commercial world?
22:15 jnthn hi lichtkind
22:20 [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␤»
22:20 [Coke] aw.
22:25 localhost joined #perl6
22:27 oiig_ joined #perl6
22:28 fgomez joined #perl6
22:54 kst joined #perl6
22:54 thou joined #perl6
23:19 fgomez joined #perl6
23:24 fsergot Good night #perl6 o/
23:25 plobsing joined #perl6
23:26 tokuhirom joined #perl6
23:36 whiteknight joined #perl6
23:47 fgomez joined #perl6
23:56 diakopter mmm RNA quines

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

Perl 6 | Reference Documentation | Rakudo