»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
00:03 lestrrat is now known as lest_away 00:10 yinyin joined 00:17 alester joined
TimToady sorear: um, the parser's main time is before the user program's main time; it's a different "run" in that sense 00:20
00:24 BinGOs left 00:25 BinGOs joined 00:26 synth left 00:28 justatheory left 00:34 justatheory joined
sorear TimToady: I'm having some difficulties with that model 00:34
Mainly, along the lines of my &x := {}; BEGIN { augment class Block { ... }; $x.foo } 00:35
The parser has to use the user code's instantiations of Block, Str, ClassHOW, etc in order for BEGIN-time metaprograms to work
But those are precisely the ones that cannot be sealed early
er, closed
TimToady that's why we use derivation instead of MONKEY_TYPING 00:36
sorear ? 00:37
TimToady final is not the same as closed 00:38
sorear yes, but AFAICT Block cannot be finalized *or* closed until CHECK time 00:40
00:40 masonkramer_ left 00:41 kensanata left, eternaleye joined
TimToady but that's the definition of Block for the user's program, not for the compiler, which has already been compiled 00:45
sorear my &x := {}; BEGIN { &x.WHAT !=== Block } y/n? 00:49
00:51 tedv joined, tylerni7 joined
TimToady correct, since &x is bound at run time, and BEGIN happens at compile time 00:53
sorear um. right. oops. 00:54
BEGIN { {}.WHAT !=== Block } ?
TimToady === 00:55
sorear Why? {} is constucted by the compiler. 00:57
TimToady sure, and it's an object of type Block 00:59
sorear Is it of the user's Block type? Or are the two Blocks ===?
TimToady (more precisely, it becomes one when {} is run)
sorear so the runtime type of closures binds to the user's instantiation of classes. ok. 01:00
that leaves ClassHOW 01:01
01:01 lest_away is now known as lestrrat
sorear I suppose this is a strong argument for doing as little as possible at compile time 01:03
diakopter hee
diakopter feels vindicated in arguing for an interpreter 01:04
well, more of an interpreter.
TimToady the interesting boundary is how much we can optimize at YOU_ARE_HERE in the setting 01:06
diakopter SAW_THE_CIRCULARITY_BLADE_IN_HALF_HERE 01:09
TimToady it might well be worth assuming that most of the setting is not monkey-typed until proven otherwise, and then re-pessimize it :)
diakopter that was how I imagined it [in sprixelCLR], at one point 01:10
TimToady optimizers are "cheaters", so sometimes cheaters get caught, and have to pay :) 01:12
01:12 ashleydev left, ash_ joined
sorear unfortunately, there doesn't appear to be any way in the CLR to swap the implementation of a subprogram 01:21
so before absolute finality, we need to rely on indirecting every call
diakopter well
what do you mean by 'subprogram'
sorear System.Reflection.Method
diakopter ? 01:22
... to privmsg
01:23 rurban joined
diakopter rurban: hi; ltns 01:27
01:33 redicaps joined 01:40 whiteknight left 01:55 plobsing joined 01:57 jaldhar joined
dalek meta: r339 | stefa...@cox.net++ | trunk/vicil/ (2 files):
[vicil] Start hashing out the kernel
01:58
01:59 agentzh joined
sorear who runs dalek, again? 02:01
diakopter me
ish 02:02
sorear could you hack it to treat ... as a wildcard when running the email->nick reverse mapping?
diakopter maybe 02:04
I think it just uses what's in the RSS/ATOM feed 02:05
yeah: code.google.com/feeds/p/csmeta/svnchanges/basic 02:10
took forever to find it
Infinoid's code is highly abstracted :)
sorear dalek also has an email to nickname mangler 02:11
diakopter oh
sorear when I commit to nqp-rx, dalek uses E:stefanor@cox.net as a key into the Parrot CREDITS file
then it gets sorear from the U: line and puts that in the channel
diakopter k; I'll see about making it wildcard 02:12
sorear (yes, the Parrot credits file. No matter what project you're comitting to.)
02:14 cognominal left
pmichaud good evening, #perl6 02:14
ash_ greetings pmichaud, did any of your talks happen to make it online? Or anyone elses? 02:15
pmichaud if you mean videos, my experience is that the videos take weeks to show up, if ever. 02:16
I don't think any of the videos from YAPC's that I've spoken at have ever made it online.
ash_ okay, just curious 02:17
02:18 [mark] joined
sorear Has anyone ever looked into what's wrong with YAPC? 02:19
02:20 tedv left
diakopter what are the symptoms? 02:20
sorear Videos never get posted
02:23 [mark] left 02:27 meppl left
pmichaud it's put together by volunteers. transcoding videos is time consuming. 02:34
thus it often doesn't get done.
sorear ah 02:35
02:40 [mark] joined, ashleydev joined 02:41 jaldhar left 02:43 jaldhar joined 02:45 cognominal joined 02:52 ash_ left 02:58 ash_ joined 02:59 [mark] left, [mark] joined 03:01 [mark] left 03:05 alester left 03:10 mtve joined
lue ohai 03:12
sorear hi 03:16
03:19 christine left, christine joined 03:20 rurban left 03:27 Limbic_Region left 03:40 agentzh left 04:09 dalek left, dalek joined 04:11 eiro left, eiro joined
sorear hey cool dalek rebooted 04:14
TimToady: What does a repr have to do to be called "P6opaque"? 04:34
04:35 justatheory left, s1n joined 04:36 ashleydev left
sorear pmichaud: here? 04:55
I'm wondering how parcel arguments interact with invocant arguments 04:56
(method (|\$parcel) { $parcel.perl.say })(1, (2,3), 4) 04:57
rakudo: (method (\|$parcel) { $parcel.perl.say })(1, (2,3), 4)
p6eval rakudo 7b089e: OUTPUT«===SORRY!===␤Malformed parameter at line 11, near "\\|$parcel)"␤»
sorear no parcel parameters yet in rakudo I guess
but I'm interested in that case & the converse one
05:03 Guest23195 joined
dalek meta: r340 | stefa...@cox.net++ | trunk/vicil/Kernel.cs:
[vicil] A sketch of our P6opaque
05:15
sorear Oh well. 05:16
diakopter no I didn't do that.. 05:18
[Coke] in lieu of LTM in rakudo, how can I specify which proto is tested first? 05:28
05:32 Wolfman2000 left
sorear [Coke]: textual order 05:32
[Coke] sorear: by name of the rule? 05:33
that didn't seem to matter. "scalar" matched before "array"
trying to combine the rules into a single rule now.
sorear [Coke]: no, by byte offset in the source file 05:34
dalek meta: r341 | stefa...@cox.net++ | trunk/vicil/Sprixel/Compiler (2 files):
[vicil] Make the nature of the P1 polymorph a bit more explicit
05:35
sorear (actually I think it's counting code units, but still)
[Coke] sorear: ah. will try to remember that for next time. thanks. 05:36
05:37 orafu left, orafu joined 05:44 Cyg07 joined
Cyg07 clean 05:46
05:46 Cyg07 left 05:47 Mowah joined
sorear I am thinking Parcel needs to be VERY primitive. 05:53
05:55 agentzh joined
sorear Parcels aren't lazy !? 06:03
06:04 Zapelius joined
sorear Who besides pmichaud understands the new list model? 06:15
+here
mberends hi sorear, probably noone. The backlogs partially reveal a series of gradually mutating concepts, so you would become the second or third person to really understand it. 06:20
it's the whirlpool model running at 0.01Hz
0.0001Hz 06:21
sorear 0.0001Hz is once every three hours... 06:22
mberends er, add a few more zeroes then ;)
06:25 Zapelius left 06:26 Zapelius joined 06:33 skids left 06:40 Ross^ joined 06:41 skids joined 06:43 Su-Shee joined
mberends hi Su-Shee, are you up for some DBD writing today? I have tuits :) The www.perlworkshop.be/bpw2010/ decided not to schedule the FakeDBD talk... 06:54
06:58 Guest23195 is now known as kaare 06:59 kaare is now known as Guest2679 07:00 nadim left, Guest2679 is now known as _kaare, nadim joined
sorear In light of the existance of the \|$foo parameter form, is a Perl 6 implementation obliged to handle $*foo(:a, :b) differently from $*foo(:b, :a) ? 07:09
rakudo: \(1, 2).WHAT.perl 07:11
p6eval rakudo 7b089e: ( no output )
sorear rakudo: \(1, 2).WHAT.perl.say
p6eval rakudo 7b089e: OUTPUT«Capture␤»
Su-Shee mberends: no, I'm trying to keep a deadline today. ;) 07:13
07:15 Ross^ left
mberends okey dokey :) 07:18
07:23 ejs joined 07:27 Su-Shee_ joined, Su-Shee left 07:33 Su-Shee_ is now known as Su-Shee
_kaare mberends: Interesting. I'm considering moritz_ ' challenge here: use.perl.org/~pmichaud/journal/40407 07:34
07:35 ejs left, ejs joined
_kaare If it can be done w/o Parrot knowledge. Don't have tuits for starting that. 07:36
mathw Good morning 07:45
mberends good morning mathw
_kaare: that link was to Patrick's Rakudo * update. Which of the challenges do you mean? 07:46
cxreg in the comments, there's a thing about postgres and fakedbi 07:47
07:48 skids left
mberends oh right :) it looks like we'll have postgresql and CSV drivers by end of July 07:48
cxreg reads FakeDBD/mysql.pm6 07:49
_kaare mberends: The postgresql one. But if you already fixed it, OK :-)
cxreg oh, that looks like NCI
mberends anyone interested in testing a FakeDBD::FreeTDS ?
cxreg looks easy, too
Su-Shee cxreg: it is. I have no clue at all about NCI and managed three methods. 07:50
and I really mean _no_ clue.
_kaare + sorry about the nit so precise link. But you can't link to a comment there.
mberends :-) got it in 2
07:51 cosimo joined
_kaare It looks esay to do a Pg version if NativeCall does the magic Parrot gluing. 07:53
cxreg yeah, exactly 07:54
NCI++
07:54 tadzik joined 07:55 redicaps left 07:56 clintongormley joined
cxreg git-heads, git.git master just merged a branch which adds "git cherry-pick <range>" 07:57
mberends there's also a GSoc project to make Parrot NCI more flexible, so if it succeeds we get access to almost any native library instead of just a lucky few. Today, for example, it's not possible to use Zavolaj to access SQLite afaics.
cxreg compiles
08:00 skids joined
mathw yeah I'm looking forward to that one, because I want to look at binding GObject libraries via GIR 08:01
but I want to wait until the new NCI stuff lands
cxreg mberends: what defines "lucky few" ?
mathw at the moment I suspect it would be far too much hassle
Su-Shee mathw: when is it supposed to land? 08:02
mathw Whenever it's ready, I guess 08:03
I'm not exactly waiting on the doorstep 08:04
mberends cxreg: Parrot's current NCI can use any library, but can only call functions whose signatures (ie parameter and return types) are in a list that is hardcoded. Zavolaj docs mention the source files involved. Any arbitrary signature would be so much nicer.
mathw Lots of other things to do first, only one of them being Perl 6-y
cxreg mberends: ah. sounds like preprocessor issues.
cxreg reads about libffi 08:05
looks like it's a spinoff from gcc 08:09
mberends zavolaj cannot cope with NCI calls that pass or receive pointers to native structs, for example. Pointers to native arrays are ok, for arrays of some native type such as int32 or pointers to C strings.
plobsing mberends: that is not strictly true. Parrot currently provides a utility to create support for more predefined signatures ahead of time. So any arbitrary signature is possible now, if a little inconvenient. 08:10
mberends plobsing: thanks:) then we need to expose that in zavolaj soon. 08:11
plobsing: I was aware of your NCI project outside of the Parrot core. Will you merge that in? 08:13
plobsing Why bother? libjit only supports a subset of platforms that libffi supports (ash_++'s gsoc project) 08:14
notably it sucks on OSX
if you want it bad enough it is there. otherwise wait a bit longer for a better solution in core. 08:15
mberends ahh, right. better to wait for the GSoC work to land in core. It may not be in time for Rakudo *, so we'll have to discuss bundling dependencies with the distribution.
plobsing mberends: if you are creating library bindings, 95% of the time you know the signatures in advance, in which case you can create a parrot dynlib with extra signature support using parrot_nci_thunk_gen. 08:17
the just in time stuff is only really more useful for exploratory programming. 08:18
sorear plobsing: Entirely out of curiousity, why did you decide to prototype on libjit instead of libffi?
mberends plobsing: I never thought about creating a dynlib. good idea!
plobsing more convenient API.
08:19 kensanata joined
plobsing as I've said multiple times, if I knew about the poor platform support, I would have chosen something else. 08:20
sorear ah 08:21
mathw It's always a pain when you find out about something like that after you've done a load of work on it 08:28
mathw goes back to contemplating websites written in Haskell 08:29
plobsing true, but the convenient API meant that most of the work was parrot-side, so no big loss
08:29 dakkar joined
arnsholt mathw: You scare me =p 08:30
mathw arnsholt: my work here is done :D 08:32
sorear -> sleep 08:33
mathw It's really just that my Haskell skils have rotted for far too long
and I happen to need to write a couple of fairly straightforward websites
Very simple things maybe with an sqlite backend
and unfortunately Web.pm with Rakudo just isn't fast enough 08:34
(yet)
mberends if we can get a P6 version of Dancer (expected around end of July) you'd have an in-process webserver with response times under 1 second 08:36
08:37 stepnem joined
mathw awesome 08:39
mberends those are my Rakudo * goals: P6 Dancer, some async I/O (implementing select), and expanding FakeDBI. 08:42
moritz_ good morning
mberends good moritz_ 08:43
08:43 tylerni7 left 08:44 skids left
moritz_ mberends: if you do async IO, _sri++ might start porting mojo to p6 :-) 08:45
_kaare: there are actually two possible routes to implement FakeDBD::pg 08:48
_kaare: one is to use the NCI stuff, just like the mysql driver
_kaare: and the ohter is to try to use the bindings that parrot already has, but that likely requires parrot knowledge (though not too much) 08:49
svn.parrot.org/parrot/trunk/t/library/pg.t that's the PIR code that tests the postgres bindings 08:50
_kaare moritz_: Yeah, I saw that already. And it works. I just have no idea how to use that from rakudo. 08:52
moritz_ rakudo: say pir::split__pss('a', 'foobar') 08:53
p6eval rakudo 7b089e: OUTPUT«[ "foob", "r" ]␤»
moritz_ _kaare: that's a possibilty to use PIR opcodes in rakudo
the thing after the __ is the signature
returns a PMC (p) and receives two strings (ss)
another is Q:PIR { ... } blocks, where you can assign to %r to set the return value 08:54
but if you don't want to explore the parrot route, using NCI directly is fine too
08:57 skids joined, skangas joined 09:00 plobsing left, masak joined
masak oh hai, #perl6! 09:00
mberends hai masak! 09:01
masak mberends: how are things?
mberends masak: lovely day up here in Sweden :) going to UK after $work today, and plenty of &hacking time now :) 09:02
masak oh, still in Sweden? where?
mberends www.sundsgarden.se near Helsingborg 09:03
masak sounds wonderful. must be warmish.
mberends it certainly is 09:04
it's an old college by the sea, very tranquil.
we look across the sound to Denmark only a few km away 09:05
masak aye.
a couple of months ago, we were almost on the other side in a car. :) 09:06
mberends yes. Lund and jnthn++ are only 30 mins south by train
09:07 azert0x joined
_kaare moritz_: Can I ask you about it next week where I hope to have a _little_ spare time to look at it? 09:07
masak szabgab: kudos on the training course! blogs.perl.org/users/gabor_szabo/20...ugust.html
moritz_ _kaare: sure
masak szabgab: holler if you want assistance updating the course notes.
moritz_ what should happen when I import the same routine name from two modules into the same lexical scope? 09:11
masak an error is issued? 09:12
arnsholt It should definitely be possible to get an error in that case 09:13
Might be something that shuold be adjustable via a pragma or something
moritz_ tries to find the right location to patch 09:15
_sri: www.perlmonks.org/?node_id=846021 09:16
09:16 yinyin left
moritz_ but using the same module twice shouldn't result in an error, right? 09:18
arnsholt Hmm. True 09:19
masak good point.
moritz_ I'm asking because cognominal++ submitted a ticket
rakudo: use Test; use Test;
p6eval rakudo 7b089e: OUTPUT«===SORRY!===␤Multiple declarations of lexical '&plan'␤␤»
masak feels like the second use should just be a no-op. 09:20
moritz_ my first step is to make the error message more awesom (or at least try to :-)
the second step is to see of $existing === $imported, and do nothing if that's the case
masak can a module re-export a sub that it imported with a use statement? in that case, this issue can have other, less trivial manifestations. 09:21
moritz_ hugme: add qiuhw to book
hugme hugs qiuhw. Welcome to book!
masak but the above fix sounds sane, and it'd fix that case as well.
moritz_ I just don't know if it works the way I envision 09:24
because rakudo currently doesn't really import at compile time
it sets up the stubs at compile time
but does the actual loading too late
rakudo: use Test; BEGIN { plan 1 } 09:25
p6eval rakudo 7b089e: OUTPUT«===SORRY!===␤Could not find sub &plan␤»
moritz_ rakudo: sub plan { }; BEGIN { plan }
p6eval rakudo 7b089e: OUTPUT«===SORRY!===␤Could not find sub &plan␤»
masak rakudo: our sub plan { }; BEGIN { plan } 09:26
p6eval rakudo 7b089e: OUTPUT«===SORRY!===␤Could not find sub &plan␤»
masak afk &
moritz_ I have a patch for the more awesome error message, spectesting now 09:30
hugme: add qiuhw to svg-plot 09:32
hugme hugs qiuhw. Welcome to svg-plot!
09:35 jedai_ joined
moritz_ Hongwen Qiu took up a weekly challenge (closures for .subst, iirc) and has since then submitted patches to the book, and now SVG::Plot too \o/ 09:35
09:36 jedai left 09:39 muixirt joined
muixirt hi 09:41
moritz_ hi muixirt
muixirt moritz_: why does the make spectest take twice as long as some weeks ago? 09:42
moritz_ muixirt: it now defaults to only one test job at once
muixirt: you can controll that via the TEST_JOBS env variable
muixirt start up times for perl6 got a lot bigger too 09:43
moritz_ :( 09:44
09:44 redicaps joined
moritz_ rakudo: say pir::null 09:46
p6eval rakudo 7b089e: OUTPUT«error:imcc:syntax error, unexpected '\n'␤ in file 'EVAL_1' line 24655632␤===SORRY!===␤syntax error ... somewhere␤»
moritz_ rakudo: say pir::null__p
p6eval rakudo 7b089e: OUTPUT«Null PMC access in type()␤ in main program body at line 11:/tmp/rz1eGewvDA␤»
masak ouch :) 09:48
perhaps the only Null PMC access for which I react, "well, you asked for it" :)
moritz_ well, you pass a null, you get a null PMC access :-)
it might be pretty simple to prevent any null PMC access in assignment (by auto-promoting to Mu), but that might hide some bugs rather than expose them 09:50
masak aye.
wow. this RFC, almost 10 years old now, contains the seeds of placeholder parameters. dev.perl.org/perl6/rfc/23.pod -- with all due respect to TheDamian, what we ended up with looks *so* much better. :) 09:53
09:53 TiMBuS joined
masak of course, the RFC predates twigils, so it wasn't really possible to arrive at a nice syntax. :P 09:53
09:56 redicaps left 09:57 redicaps joined
dalek kudo: b043847 | moritz++ | src/Perl6/Module/Loader.pm:
emit more awesome error message when importing a symbol would override an

Previously that died with "Multiple declarations of lexical $symbol". Next step: don't die when using the same module twice (don't know if that's going to be quite as easy...)
09:59
mathw masak: actually I think the best improvement we got over that RFC in the end was generating anonymous functions using * 10:02
Which is kind of something completely different yet not 10:03
masak aye, that's also homologous to that RFC.
10:03 x19290 joined
mathw Although we didn't get implicit currying 10:03
10:04 x19290 left
masak I initially greeted the `* + *` syntax with a bit of silent skepticism. 10:04
but I definitely see its use in restricted situations now.
much like junctions.
moritz_ masak: and then you saw my starry obfu :-)
masak well, much like junctions, it's possible to over-use them and create obfu code :P
there will always be people who freak out over that. I'm not one of them. 10:05
10:05 x19290 joined, lestrrat is now known as lest_away
masak moritz_++ on the starry obfu. :) 10:05
mathw I don't care if it allows the creation of obfuscated code 10:06
moritz_ mathw: implicit currying can be quite harmful if you don't have static type checking
mathw It's up to programmers to write clear code, not the language to enforce it, because enforcing it usually removes expressiveness
moritz_: yeah, I'm not saying we should have it. Haskell does it elegantly, but that's because it's completely static and can check everything.
moritz_ because you get very bad error messages when you accidentally supply too few arguments 10:07
I see we're in violent agreement :-)
mathw yes
10:07 x19290 left
moritz_ I'm sure there'll be an ACME module which implements that, by hijacking the dispatcher 10:07
mathw if people want to do that, that's fine 10:09
in fact it's great
that's what Perl 6 is about!
Give you a good language, but let you muck about with it if it's not right
At least, that's what I see it as
When I can see over the wall of awesome :)
masak mathw: [backlog - web sites in Haskell] there's a static web page generator for Haskell, called Hakyll. I'm thinking of porting it to Perl 6, if only to see if it's possible to translate arrows sensibly from Haskell to something else. :) jaspervdj.be/hakyll/ 10:11
mathw that looks really impressive 10:18
masak yes, I'm drawn to well-designed apps like this one. 10:19
mathw I'm more needing dynamic stuff (probably using Yesod for that), but Pandoc could certainly solve a problem for me if I 'borrow' it
masak having toyed a little with dynamic stuff in Perl 6, I feel I would probably be much happer right now with a static solution. :) 10:25
I might make myself a Perl 6 blog with a static webpage, for example.
mathw mmm
yes I think I'll definitely be using Pandoc
moritz_ ponders porting mowyw to Perl 6
mathw my current project is a simple website thingy for a friend 10:26
I want to give her an interface to edit pages
so I was going to power it with Yesod, and if I plug the Pandoc library into it I can let her write them in Markdown, which she should find much easier to deal with than HTML
10:29 clintongormley left
masak lunch & 10:31
10:36 colomon joined 10:38 redicaps left, x19290 joined, redicaps joined
x19290 not native English speaker 10:40
with current Rakudo, my Int $i = '123' is 10:41
runtime error, not compile time.
How about future Perl6?
Thank you. 10:43
10:43 x19290 left 10:44 x19290_ joined, x19290_ left
mberends de-commute to 11:01
-> London
11:01 mjk joined 11:05 skangas left 11:06 mberends left
colomon loliblogged! justrakudoit.wordpress.com/2010/06/...cna-day-2/ 11:23
moritz_ colomon++ 11:24
colomon moritz_++
I must have told the story about how quickly that bug was fixed at least five times yesterday, and I'm pretty sure Patrick was talking it up as well. 11:25
TiMBuS big question: how would feed operators be implemented in rakudo? i think they are the coolest thing about perl6 and would love to have them in rakudo * 11:30
but after trying to grok all this laziness im beginning to see why they arent implemented yet :/
moritz_ afaict <<== is supposed to be like push, but lazily evaluates its arguments 11:32
but I'm not sure how scoping is supposed to work with the feeds
colomon I suspect they will be pretty easy to implement now that lazy lists are sensible.
moritz_ colomon: reading your blog reminded me that I had forgotten to close the ticket in RT :-) 11:36
done now
colomon :)
11:36 x19290 joined
colomon what happens if you call prefix:<+> on a Match object? 11:36
moritz_ The Right Thing :-) 11:37
it numifies the string part
(we have tests for them, and pass them :-) 11:38
colomon \o/
TiMBuS since they are sensible, would say, $a := map {...} 1..5; achieve the same result as @a <== map {..} <== 1..5; or is there some kind of additional wizardry going on in the second case
moritz_ I think it's sensible for them to be the same
colomon rakudo: my @a = <a b c d>; say @a[101 % *] 11:41
p6eval rakudo b04384: OUTPUT«b␤» 11:42
colomon rakudo: my @a = <a b c d>; say @a[102 % *]
p6eval rakudo b04384: OUTPUT«c␤»
moritz_ that was an old rakudobug for which I put a workaround in SVG::Plot
colomon lolibloggedagain: justrakudoit.wordpress.com/2010/06/...rig-tests/ 11:43
afk
11:45 ciphertext joined, skangas joined 11:49 dukeleto left, envi^home joined
arnsholt Have any of you guys read Jeffrey Kegler's posts about Marpa on blogs.perl.org? 11:50
masak x19290: that is a good question. 11:51
x19290: it certainly is a thing which *can* be caught at compile time.
11:52 Util left, Util joined
masak x19290: whether a Perl 6 compiler actually *will* catch it is, I believe, up to that compiler (and its authors). 11:52
avar arnsholt: Yeah, but I understand like 2% of it >:)
moritz_ arnsholt: URL?
11:52 dukeleto joined
masak x19290: TimToady has hinted now and then that it's preferable that errors be caught early if they can. but I don't think the spec mandates it. 11:52
takadonet morning all 11:54
moritz_ actually this particular instance could be caught with moderate effort
because string literals have :returns('Str') in the PAST node
masak takadonet: \o 11:55
arnsholt moritz_: blogs.perl.org/users/jeffrey_kegler/ 11:56
"Parsing with Ruby Slippers" is very interesting
avar: Heh. The more I read about it, the more I feel the need to try to write a Perl 6 implementation 11:57
masak arnsholt: does it have any relation to the work being done in/around STD.pm6? 11:58
11:58 dalek left 11:59 dalek joined
arnsholt masak: Not really. Marpa is, as far as I've understood, an Earley parser on steroids 12:00
masak googles "Early parser"
arnsholt Which means that it can find all the parse trees in an ambiguous CFG
masak ah, seems to be connected to linguistics. 12:01
arnsholt The (very) short version: it's a dynamic programming CFG parser algorithm that finds all possible parses for a sentence
masak nice.
I can see why you're interested!
moritz_ wow, that post is awesome 12:02
arnsholt Isn't it? 12:03
masak: Yeah. I'm trying to use what I know to pick LHF that are a bit uncommon
masak "Einstieg in Perl 6: So entwickeln Sie robusten, wartbaren und effizienten Code: Alvar Freude[Sep 28, 2010]" -- this Amazon title keeps popping up on Twitter. I'm considering buying the book. 12:04
mainly because I can't imagine what it contains. :) 12:05
moritz_ I found alvar to be a nice guy to irc/talk to - that's nearly all I know about it :-)
masak is he on freenode? 12:06
moritz_ nick alvar on irc.perl.org - no idea about freenode
currently not online though 12:07
masak neither am I. :)
x19290 masak: Thanks a lot. 12:08
masak glad to help.
moritz_ actually that compile time detection could be done with tcurtis' PAST optimization framework 12:09
it's a bit of an abuse, but it should work ;-)
12:11 x19290 left 12:13 mjk left
moritz_ rakudo: '3.14' ~~ /.*/ and say $/.sin 12:13
p6eval rakudo b04384: OUTPUT«0.00159265291648683␤»
arnsholt Hmm. Marpa is big though. wc -l on all the .pm files in the distrib is 10905
12:13 x19290 joined
x19290 Thanks moritz_ and bye. 12:14
12:14 x19290 left
moritz_ I think that's a nice idea for a fun project to try out 12:14
look for infix:<=> nodes whose second argument has a :returns defined 12:15
see if you can get the type information of the LHS at compile time 12:16
and carp if the types don't agree
masak yeah, sounds like fun. 12:17
moritz_ I don't know if I'll get any hacking done today, but I might try it tomorrow 12:18
or on Monday, where I don't work
masak ++moritz_
bbkr rakudo: for <inhale exhale> xx * {sleep .say;} # xx op combined with * is awesome :P
p6eval rakudo b04384: OUTPUT«inhale␤exhale␤inhale␤exhale␤inhale␤exhale␤inhale␤exhale␤inhale␤exhale␤inhale␤exhale␤»
masak :)
nice trick on using the return value of .say to mean "1 second", too :) 12:19
huf why isnt this an infinite loop? what does xx * do? :) 12:21
moritz_ huf: it is an infinite loop
huf: but p6eval runs into a resource limit at some point
huf ah. then i guess i understand that code
moritz_ and returns what it has got so far
mathw oh 12:22
that's nice
huf moritz_: yeah, the lack of some kind of errormessage pointing that out was what confused me
cono masak: but if .say will return an error 0, program will sleep forever :D 12:23
masak huf: like "the program was still running, but we cut it off here"?
moritz_ rakudo: sleep(0); say "alive"
masak rakudo: sleep 0; say "awake"
p6eval rakudo b04384: OUTPUT«alive␤»
rakudo b04384: OUTPUT«awake␤»
moritz_ lol
huf masak: yeah, something like that
masak moritz_: you're a bit faster today :P
cono: no, it won't. see above :P
cono: what made you think 0 means "forever"? that's not very intuitive. 12:24
moritz_ that's what Inf is for :-)
masak rakudo: sleep; say "awake"
p6eval rakudo b04384: ( no output )
masak now THAT would sleep forever. :P 12:25
just like in Perl 5.
bbkr Inf sleep by default does "pbc::sleep(1e16) while 1" (or something like that as far as i remember)
cono masak: or forever if no EXPR.
miss understandnig :)
masak cono: still. 0 !=== no EXPR.
cono I know
moritz_ bbkr: right; that's a workaround for parrot not supporting infinite sleep
cono my mistake :d
mathw Shouldn't sleep with no EXPR be an error? 12:26
masak mathw: it isn't in Perl 5.
mathw: I guess the parameter has Inf as the default.
bbkr mathw: indeed, its "sleep ($seconds = Inf) {}"
cono rakudo: sleep Inf; say "awake"
p6eval rakudo b04384: ( no output ) 12:27
mathw Can anybody demonstrate why I might want to sleep forever?
masak rakudo: sleep NaN; say "awake"
cono mathw: daemons
p6eval rakudo b04384: ( no output )
cono mathw: they awakes only on signals
masak mathw: out of spite.
:) 12:28
mathw cono: I don't think we get to program the Great Old Ones in Perl 6 somehow.
masak: hah
masak rakudo: sleep 4 + 2i; say "awake"
p6eval rakudo b04384: OUTPUT«You can only coerce a Complex to Real if the imaginary part is zero␤ in 'Num' at line 1␤ in 'sleep' at line 5125:CORE.setting␤ in main program body at line 11:/tmp/loCIf19iS4␤»
masak bah :) 12:29
mathw cono: also, every daemon I ever wrote tends to sit around blocking on something I/O-ish, like a poll() call
cono mathw: I wrote daemons for offline work, and break it's sleep only on work
mathw ah right 12:30
cono e.g. $s->insert_job->awake
mathw I've only done network ones
Never got to use signals as they don't carry enough data :) 12:31
cono mathw: heh, w8, I will show you how to send more data by signals :D
mathw: search.cpan.org/~vpit/IPC-MorseSign...Signals.pm
:D
bbkr infinite sleep may also be useful for forked child processes - in P5 they go to infinite sleep unless you set "$SIG{'CHLD'} = 'IGNORE';"
mathw cono: that... umm... err........... 12:32
colomon afk # driving back to YAPC 12:33
mathw wishes he was at YAPC it sounds awesome
12:34 bluescreen joined
cono I bought tickets and book hotel, but still nervous about visa to Italy (fvcking Ukraine) :( 12:34
12:34 bluescreen is now known as Guest33887 12:35 colomon left
masak Italy does *what* to Ukraine, you say? o.O 12:35
cono You have not problem to come to Ukraine. But you have so difficult to trip to another country if you are citizen of Ukraine 12:36
12:36 broquaint left
masak sorry to hear that. 12:36
cono For Lisbon trip I went to Praha (coz visas to Chezch republic simpler) and after that went to Portugal. Kinda freak 12:37
Now, wanna try to direct fly to Italy 12:38
will have embassy meeting at 5 of July, need some luck for taking visa :D
mathw And I thought it was a hassle going from the UK, at least I just need a passport...
cono mathw: are you from UK ? 12:39
mathw yes 12:40
cono My dream is to visit: UK and Switzerland
and Fiji :D
Fiji are opposite to Ukraine on the earth 12:41
12:41 redicaps left
mathw Probably quite hard for you to visit here as well. And unlikely to get any better. The gutter press have been quite successful in generating hysteria about immigrants 12:42
masak cono: you were in Lisbon? did we meet?
cono masak: yeah, I remember you :)
masak :) 12:43
cono masak: it's me and Conway: home.cono.org.ua/_mg_4422.jpg
masak you do look familiar :)
cono maybe :)
12:44 redicaps joined
masak cono: when did you start paying attention to Perl 6? 12:45
cono masak: home.cono.org.ua/_mg_4405.jpg p6 team ? :D 12:46
masak parts of it, yes :)
cono masak: you and pmichaud talking, am I right?
masak aye. and frettled next to me, and jnthn a bit further away.
cono yup :D
moritz_ any p6/parrot hackathon plans for pisa? 12:47
masak hm, need to find where I put those sandals...
moritz_: I'm just assuming there'll be one :D
frettled masak: hmm? :D
cono masak: I payed attention long time ago. But have very big language bar :( 12:48
masak frettled: it's you, isn't it?
cono: how long ago? before or after Pugs got going?
frettled Yup, that's me with the backpack. 12:49
cono masak: from pugs time. But had big problems with haskell. Learn a little haskell :D 12:50
but not so much leterature in russian about haskell
12:50 azawawi joined
mathw Haskell can be difficult enough even if you speak English natively 12:50
azawawi hi
masak azawawi: \o
azawawi sorear: ping
cono mathw: yeah, It's explode your brain :D
mathw There's an unfortunate tendency for the documentation to be very academic, and to talk about applicative functors using mathematical symbols and expect you to know the translations into Haskell code 12:51
cono masak: it's Wall and my face: home.cono.org.ua/_mg_4414.jpg
mathw oh hai azawawi
masak cono: so it is :)
cono was really fun, Wanna to yapsi again :(
mathw www.flickr.com/photos/mattofwalton/4724266617 <- it's my cat! (sorry, couldn't resist)
(unfortunately not at YAPC) 12:52
cono mathw: nice :)
mathw although if he did go, you'd all get nothing done
cono But I like toyger cats
masak cono: you keep writing it "yapsi" -- that's flattering :)
cono masak: I was copy this spelling from you :D 12:53
masak cono: YAPC is a conference. Yapsi is a Perl 6 implementation. :)
actually, YAPC is several conferences.
mathw oh of course
cono ah, sorry, didn't know :)
masak cono: no worries :) 12:54
arnsholt really wants to go to YAPC
(::EU)
Maybe next year
mathw Mi komprenas. Yapsi = Yet Another Perl Six Implementation
cono ah
mathw I just spent all the money for YAPC::EU on something else
cono mi ne paroli :)
mathw So maybe next year, with arnsholt :)
masak mathw: yes, that's the idea. 12:55
mathw I do have a silly habit of only wanting to go places where I speak the local language, which does cut me back a lot since I don't speak anything other than English and German
arnsholt Speaking of conferences, has anyone heard anything about an NPW for 2011?
masak arnsholt: I haven't heard a lot about NPW for 2010. 12:56
arnsholt mathw: Understandable. But you can get quite far with pointing and waving
mathw :)
arnsholt (It can even be quite fun =)
mathw I survived in Sweden,b ut everyone there seems to speak perfect English
It's quite disturbing
masak ...hardly perfect...
arnsholt masak: Oh yeah, did anything happen with that? I heard something about postponing due to volcanoes, but since I wasn't going I never paid much attention
masak arnsholt: so, there might be an NPW on Iceland later this summer. 12:57
mathw masak: compared to the average Brit's any-other-language...
masak arnsholt: last I heard, they wanted suggestions for suitable dates.
arnsholt Oh, nifty
12:57 pmurias joined
masak mathw: Swedes:Brits::errors:shortcuts 12:58
man, I love that syntax.
12:58 aesop left
mathw it's neat syntax 12:59
but I believe your statement is false
12:59 aesop joined
mathw Allow me to reply as a Prolog interpreter: 12:59
No.
masak :)
"Where's the official Perl 6..." "No."
arnsholt masak: My SWI prolog actually says "false" 13:00
But that does ruin the joke a bit ^^
mathw Maybe pmichaud is more of a Prolog guy than I thought
arnsholt Prolog is awesome! =D
mathw Not that it matters, he's still awesome :)
yeah it is
I love writing predicates that you can use backwards
arnsholt Yeah, that's one of the niftier parts 13:01
The whole unification and backtracking thing is really cool
13:01 broquaint joined
mathw I always enjoy spending a while working in something that makes me think completely differently. Hence: Haskell. 13:01
arnsholt Yeah, I really should get around to learning Haskell 13:02
mathw What I love about Perl 6 is that I'll be able to do more Haskelly things alongside more normal things, all together
masak maybe we should arrange a Haskell study circle here on #perl6?
arnsholt That might be cool
masak we go off to a side channel and discuss weekly some online tutorial or other...
arnsholt A friend of mine and me have talked about a Haskell study circle when the fall semester starts up again 13:03
masak seems there's a few of us already who'd join such a thing.
mathw I'd be happy to join in
I doubt it'd be long before we depart from the areas I understand
arnsholt (In my more hubristic moments I've considered having a look at pugs =) 13:04
mathw I never understood Pugs 13:05
although at the time I had other rather nastier concerns
moritz_ .u umlaut 13:07
phenny moritz_: Sorry, no results for 'umlaut'.
moritz_ .u diare
phenny moritz_: Sorry, no results for 'diare'.
moritz_ .u diaresis
phenny moritz_: Sorry, no results for 'diaresis'.
13:07 charsbar_ left
masak .u ümlaüt 13:07
phenny masak: U+00FC U+006D U+006C U+0061 U+00FC U+0074
masak :)
13:07 ejs left 13:09 JimmyZ joined 13:11 l2trace99 joined
kolibrie I'm getting what I believe is an extra '+' on my pattern when I run: viv -5 -e "token { 'hello' \s \S+ }" 13:16
$self->_MATCHIFYr($S, "hello", $C->_PATTERN(qr/\Ghello\s\S++/));
13:18 proller left, azawawi left
moritz_ kolibrie: in perl 5.10 and above, ++ is the 'greedy + without backgracking' 13:18
*backtracking 13:19
so that's fine
if you say 'regex' instead of 'token', the + should be gone 13:20
13:20 proller joined
kolibrie moritz_: ah, so my Perl 5 knowledge is lacking. Thank you for pointing out that new syntax 13:21
moritz_ you're welcome 13:25
13:33 vdrab joined 13:35 colomon joined 13:37 sunnavy left, sunnavy joined 13:41 sunnavy left 13:42 ejs joined 13:43 sunnavy joined 13:47 sunnavy left 13:48 sunnavy joined 13:52 JimmyZ left 14:06 gbacon joined 14:08 lest_away is now known as lestrrat, pmurias left 14:11 lestrrat is now known as lest_away 14:14 redicaps left 14:15 lest_away is now known as lestrrat
pugssvn r31414 | Kodi++ | [t/spec/S03-operators/series*.t] Deleted redundant tests, reorganized and updated remaining tests, and added new ones. 14:16
r31414 | [t/spec/S03-metaops/zip.t, t/spec/S03-metaops/hyper.t] Added tests mistakenly included in series.t.
r31414 | [t/spec/TODO] The series tests should now be complete.
14:16 colomon left 14:19 bphillips joined
kolibrie my slides are online (not sure how much better I can make them before I present): graystudios.org/talks/viv/viv.xul 14:19
(half hour from now)
masak \o/ 14:20
bbkr rakudo: Seq.new.^methods>>.say # a bug? maybe Perl6MultiSub.Str() should list all prototypes? 14:21
p6eval rakudo b04384: OUTPUT«new␤elems␤Str␤Method 'say' not found for invocant of class 'Perl6MultiSub'␤ in main program body at line 11:/tmp/oMSbzSnuwZ␤» 14:22
moritz_ bbkr: or the name, just like the only-subs do 14:23
14:23 justatheory joined
bbkr moritz_: or name. should I report or already known? 14:24
moritz_ bbkr: don't think it's been reported so far
14:25 agentzh left
moritz_ kolibrie: slides look nice, if a bit technical 14:25
masak kolibrie: nice slides. did a double take at slides 16..17, but you probably have some plan with that. 14:27
bbkr: yeah, that one looks new.
bbkr reported then 14:28
moritz_ my firefox only displays them in a rather small window, but I guess it's a local problem here
masak bbkr: in general (i.e. outside of bug-finding mode), it's a slight unpattern to do >>.say -- but you know that, I guess.
moritz_: looks OK here. 14:29
bbkr masak: why?
moritz_ >>. doesn't guarantuee order of execution
masak bbkr: because >>. doesn't work well with side effects, and .say is only side effect.
moritz_ so it's not so nice for methods that cause side effects 14:30
bbkr makes sense, thanks :)
masak Perl generally doesn't mind if you use things for "what they weren't meant". but in this case, it's best not to, and to spread the meme not to. :) 14:31
14:31 estrabd joined
bbkr if I add tests to pugs repo that i'm sure Rakudo will pass and Pugs will fail do I have to fudge them somehow for Pugs? 14:33
moritz_ bbkr: don't bother
as long as nobody maintains pugs, we don't maintain stuff for pugs 14:34
bbkr thanks. i'll browse through RT queue soon and try to add tests and close some bugs already fixed 14:35
arnsholt If pugs is reanimated, there's probably going to be all kinds of madness going on with what passes and what doesn't anyways
moritz_ bbkr: that's great. Many tickets that are fixed but no tests yet are assigned to me - don't hesitate to work on those 14:36
14:44 patspam joined
masak if we run a Haskell study circle for a semester, one goal of it could be "fix some LHF stuff in Pugs". 14:45
kolibrie moritz_: I'm a little worried about how technical it is - maybe the way I present it can make it more comprehensible 14:46
masak: I believe that was all refactoring work, and it finally got back to working again after a year 14:47
masak kolibrie: ah, that explains it.
arnsholt masak: That would be cool, yeah 14:49
14:49 redicaps joined, redicaps left
kolibrie moritz_, masak: thank you for looking over my slides 14:50
moritz_ kolibrie: you're welcome
masak a pleasure. have a good talk!
14:54 Zapelius left
ajs moritz_: loved your Math::Model blog. I plugged it all over the interwebs: bit.ly/dDmx9J 14:55
moritz_ ajs: glad you liked it, and thanks for sharing 14:56
14:58 Su-Shee left
kolibrie masak: thanks 14:58
ajs I think we have a new marketing phrase for Perl 6: "Use Perl 6, the power of SVG compels you!" 14:59
masak yes, SVG examples make people happy.
I found that out with use.perl.org/~masak/journal/39152 15:00
moritz_ any kind of visual output really
15:00 colomon joined
moritz_ masak: does druid work on rakudo master? 15:00
masak moritz_: not quite yet. 15:01
it runs, but there are still errors.
arnsholt Hmm. Do you happen to know if any of Graphviz's algorithms are documented somewhere? =)
masak moritz_: I'd look at it right away, but I was just going to set my teeth into pls again :)
moritz_ masak: I think pls has priority. Don't let me distract you :-) 15:02
masak I made good progress with pls yesterday. might have something to show later today. 15:03
pugssvn r31415 | bbkr++ | # RT #75636 15:04
15:04 vdrab left
skids www.abrij.org/~bri/camelia_ifs.svg <-- will now soak your CPU on chrome as well as opera with 1fps flying camelias. 15:04
moritz_ phenny: tell bkkr to please mention [t/spec] at the start of commit messages to the test suite, so that people know which part of the pugs repo was modified. Thanks, and thanks for the tests! 15:06
phenny moritz_: I'll pass that on when bkkr is around.
skids ( www.abrij.org/~bri/ifs.svg runs a bit smoother, but no camelias.)
colomon thinks he will be able to eliminate more than half of the trig tests when all is said and done. 15:07
moritz_ \o/
bbkr moritz_: i'll include t/spec info next time, thanks 15:12
rakudo: Inf.Int/Inf.Int # whooops !
p6eval rakudo b04384: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤ in 'Rat::new' at line 3608:CORE.setting␤ in 'infix:</>' at line 3697:CORE.setting␤ in main program body at line 11:/tmp/Ta59dSzlNU␤»
bbkr rakudo: Inf.Int/(Inf.Int) # whooops ! 15:13
p6eval rakudo b04384: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤ in 'Rat::new' at line 3608:CORE.setting␤ in 'infix:</>' at line 3697:CORE.setting␤ in main program body at line 11:/tmp/RwYG4QngDp␤»
bbkr bug?
masak thinks so 15:14
Inf.Int should be Inf, no?
rakudo: say Inf/Inf; say Inf.WHAT
p6eval rakudo b04384: OUTPUT«NaN␤Num()␤»
masak oh, right. Inf works across a number of types.
bbkr rakudo: Inf.Int.WHAT.say 15:15
p6eval rakudo b04384: OUTPUT«Int()␤»
bbkr so Rat should create, because it's Int / int
15:16 PacoLinux left, PacoLinux joined
colomon Inf.Int doesn't work yet 15:17
rakudo: Inf.Int.say
p6eval rakudo b04384: OUTPUT«-9223372036854775808␤» 15:18
15:20 muixirt left 15:22 ajs left
masak actually, that's the saddest attempt at a positive infinity I've ever seen. :/ 15:23
colomon we could make it maxint pretty easily, but that's still pretty sorry as these things go. 15:24
15:25 skangas left
masak moritz_: to-json makes \uXXXX escapes out of *every* character, printable or no. 15:25
arnsholt Whoops =) 15:26
masak I guess I could post-process it...
huh, scratch that. it seems to preserve capital letters. 15:27
pugssvn r31416 | bbkr++ | [t/spec/S32-num/rat.t] RT #75636 Inf.Int/1 fails to create Rat
masak moritz_: I guess it's the \c0 and \c127 sequences which don't match properly at github.com/moritz/json/blob/master/...iny.pm#L29 15:28
masak tests this hypothesis
rakudo: say "ABC123abc oh hai".subst(/<-[\c0..\c127]>/, { ord(~$_).fmt('\u%04x') }, :g) 15:29
p6eval rakudo b04384: OUTPUT«ABC123\u0061\u0062c\u0020\u006f\u0068\u0020\u0068\u0061\u0069␤» 15:30
masak right.
colomon huh. range bug?
masak I think the range is fine.
but nqp-rx doesn't understand \c
or sump'n.
so the range is from 0 to c, perhaps. 15:31
or from 0 to \
rakudo: say .ord for "0", "\"
p6eval rakudo b04384: OUTPUT«===SORRY!===␤Confused at line 11, near "say .ord f"␤»
masak rakudo: say ord($_) for "0", "\\" 15:32
p6eval rakudo b04384: OUTPUT«48␤92␤»
masak aye, that matches the evidence.
bbkr rakudo: say '(foo' ~~ / '(' ~ ')' [foo] / 15:34
p6eval rakudo b04384: OUTPUT«Unable to parse _block48, couldn't find final ')' at line 1␤ in <anon> at line 11:/tmp/TyfqaGBfMz␤ in 'Cool::match' at line 2227:CORE.setting␤ in 'Regex::ACCEPTS' at line 5026:CORE.setting␤ in 'infix:<~~>' at line 326:CORE.setting␤ in main program body at line
..11:/tmp/TyfqaGBf…
moritz_ masak: yes, I know that's the bug. Just was too lazy and hopeful to work around it
masak moritz_: working around it now. OK if I send you a patch? 15:35
moritz_ masak: you can also commit directly
masak oh, so I can.
:)
will do that instead.
moritz_ hugme: add masak to json
hugme hugs masak. Welcome to json!
masak I already had a commitbit, I think. but thanks :) 15:36
moritz_: what's the rationale for excluding the range 0..127 from escaping, by the way?
moritz_: the 0..31 characters aren't very printable.
and the 127 generally isn't either. 15:37
bbkr rakudo: class A { class B {}; B.new } 15:38
p6eval rakudo b04384: ( no output )
15:41 plainhao joined
moritz_ masak: I just took something that worked, more or less 15:42
and passed the tests
refinements are welcome
sorear kolibrie: You probably know this already, but I haven't managed to get DEEP to completely underlie viv yet. Right now for -5 it's only used in regex compilation
masak moritz_: github.com/moritz/json/commit/5da3d...19d862b931 15:44
colomon sorear: just came out of kolibrie's talk on viv / gimme5
masak moritz_: it doesn't pass any more tests as far as I can see, but it makes ordinary output much nicer. 15:46
moritz_ masak++ 15:47
sorear feels slightly embarrased to be mentioned at YAPC
masak sorear: if I were you, I'd be proud. :)
rakudo: my Bool $a; ++$a 15:49
p6eval rakudo b04384: OUTPUT«Type check failed for assignment␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/7GlVXymAk8␤»
masak submits rakudobug
rakudo: class Parent { has $!priv }; class Child is Parent { method foo { say $!priv } }; Child.new(:priv(42)).foo 15:52
p6eval rakudo b04384: OUTPUT«42␤»
masak someone remind me... is this correct, by spec, etc?
moritz_ it's not
masak thank you.
and there's not really a method for a parent class to share things with its descendents, except for making them public? 15:53
sorear Does the existance of the \|$parcel binding form oblige Perl 6 implementations to treat $*foo(:a, :b) and $*foo(:b, :a) differently? 15:54
15:54 dual left
moritz_ masak: except but 'trusts', iirc 15:54
masak moritz_: right. ...which isn't implemented in Rakudo.
moritz_ rakudo implements universal trust
sorear Is prefix:<|> a real operator or just part of the call syntax? If the former, what does it return? 15:56
ash_ wait... so there is only public and private in rakudo? no protected? (i feel like i have noticed this before...)
moritz_ in rakudo it's implemented as an operator
ash_: you're correct
not only rakudo, but also perl 6 in general 15:57
15:57 patspam left 15:58 colomon left
bbkr rakudo: A { class B {}; A::B.new } # is this allowed syntax? 15:58
p6eval rakudo b04384: OUTPUT«Could not find sub &A␤ in main program body at line 11:/tmp/P4_4g5y3Yl␤»
sorear &GLOBAL::prefix:<|> just coerces to Capture in rakudo 15:59
the actual flattening happens in src/Perl6/Actions.pm +1964
ash_ but trusts lets another trusted class look at private variables, correct? 16:00
16:00 Ross^ joined
ash_ I see in S12, trusts used with a class type, but can it be used with an instance? (just curious) 16:00
Tene rakudo: class A { class B {}; A::B.new } 16:01
p6eval rakudo b04384: OUTPUT«Can not find sub A::B␤ in main program body at line 1␤»
16:02 dual joined
ash_ rakudo: class A::B { }; say A::B.new.WHAT 16:02
p6eval rakudo b04384: OUTPUT«A::B()␤»
bbkr ash_: rt.perl.org/rt3/Ticket/Display.html?id=62878 I wrote tests but I'm not sure which of those calls are Spec-comaptible. A { class B {}; A::B.new } looks like valid call because A::B is defined when .new is called. 16:04
16:05 skids left, macdaddy joined
bbkr so it doesn't look like fully resolved yet 16:05
16:05 ashleydev joined
ash_ well, you have a bare A, do you mean like module A? or class A? 16:05
16:05 macdaddy is now known as Guest99994 16:06 ashleydev_ joined
ash_ oh, i see in your bug report 16:07
yeah that seems to not be working right now, the last case of A::B 16:08
16:08 cotto joined
bbkr left as open (unchanged) then 16:08
16:09 Su-Shee joined
ash_ std: class A { class B { }; }; A::B.new 16:09
p6eval std 31416: OUTPUT«ok 00:01 107m␤»
ash_ hmm
std: class A { class B { }; }; B.new
p6eval std 31416: OUTPUT«===SORRY!===␤Undeclared name:␤ 'B' used at line 1␤Check failed␤FAILED 00:01 107m␤»
ash_ std: class A { class B { }; B.new };
p6eval std 31416: OUTPUT«ok 00:01 107m␤»
16:10 ashleydev left, ashleydev_ is now known as ashleydev
ash_ according to std you shouldn't be able to do class A { class B { }; }; B.new # one of your tests is like that 16:10
16:14 Guest99994 left 16:16 stepnem left
bbkr ash_: thanks, I've just pasted this info to ticket 16:16
sorear perl6: say |(a => 2).WHAT 16:17
p6eval pugs: OUTPUT«Pair␤»
..elf 31416: OUTPUT«Undefined subroutine &GLOBAL::prefix__124 called at (eval 124) line 3.␤ at ./elf_h line 5881␤»
..rakudo b04384: OUTPUT«Pair()␤»
sorear perl6: say (|(a => 2)).WHAT
p6eval rakudo b04384: OUTPUT«Capture()␤»
..pugs: OUTPUT«Pair␤»
..elf 31416: OUTPUT«Undefined subroutine &GLOBAL::prefix__124 called at (eval 124) line 3.␤ at ./elf_h line 5881␤»
16:18 eiro left, eiro joined, cognominal left
sorear 2 + 2 # Does this call &infix:<,> ? 16:19
16:19 stepnem joined
bbkr rakudo: use Test; plan 1; isa_ok(1|2, Junction); 16:19
p6eval rakudo b04384: OUTPUT«1..1␤Null PMC access in get_iter()␤ in main program body at line 1␤» 16:20
16:20 christine left
bbkr rakudo: use Test; plan 1; isa_ok any(1,2), Junction; 16:20
p6eval rakudo b04384: OUTPUT«1..1␤Null PMC access in get_iter()␤ in main program body at line 1␤»
ash_ rakudo: say any(1,2) ~~ Junction 16:21
p6eval rakudo b04384: OUTPUT«1␤»
masak sorear: why would it?
ash_ masak: what if it gets translated into &infix:<+>(2, 2); ? 16:22
masak ash_: it'd have to be re-parsed for that to call &infix:<,>, wouldn't it?
16:22 mjk joined
ash_ good point 16:22
this is single pass parsing 16:23
sorear does foo(2, 2) call &infix:<,>? S06 suggests that argument lists are syntactic, but doesn't clearly say it
16:25 christine joined
ash_ rakudo: sub infix:<,> ($a, $b) { say "yup" }; sub foo($a, $b) { }; foo(2, 2) 16:25
p6eval rakudo b04384: ( no output )
masak sorear: this all sounds like a circularity-saw question...
ash_ rakudo: sub infix:<,> ($a, $b) { say "yup" }; sub foo($a, $b) { }; foo(2, 2); 2 , 4; 16:26
p6eval rakudo b04384: OUTPUT«yup␤»
ash_ ltm is probably at work here
(.*,.*) seems to be a signature before an infix , 16:27
masak I don't think this has to do with LTM.
LTM is for separating between things like 'sub' and a sub called 'subtract'.
this is more a question of how the parse tree and the AST map to actual calls at runtime. 16:28
16:29 cognominal joined
bbkr rakudo: class D is ::C {}; 16:30
p6eval rakudo b04384: OUTPUT«===SORRY!===␤Could not find sub &chars␤»
ash_ rakudo: sub infix:<,> ($a, $b) { say "yup" }; sub foo($a, $b) { }; foo((2, 2)); 16:31
p6eval rakudo b04384: OUTPUT«yup␤Not enough positional parameters passed; got 1 but expected 2␤ in 'foo' at line 11:/tmp/zVID3ldpt4␤ in main program body at line 11:/tmp/zVID3ldpt4␤»
ash_ what is looking for &chars? bbkr do you know? 16:32
rakudo: ::C
p6eval rakudo b04384: ( no output )
ash_ std: ::C
p6eval std 31416: OUTPUT«ok 00:01 106m␤»
masak ash_: I suspect bbkr is going through existing RT tickets. 16:33
bbkr ash: I have no idea. I'm just checking RT queue for bugs that can be closed.
16:34 stepnem left
bbkr ash: I know Rakudo code not enough to answer what is causing this bug. some parts of codebase, like glue modules and dispatching, are still "black magic" for me 16:34
16:35 stepnem joined
masak a good guess is that either the thing binding D to parent classes, or the thing reporting an error in that first thing, uses &chars somewhere. 16:36
16:36 FardadJalili joined 16:39 FardadJalili left 16:40 davidfetter joined 16:41 mjk left
bbkr rt.perl.org/rt3/ gives "Internal Server Error" ? 16:41
bbkr runs away
davidfetter hello 16:42
any rakudo developers in the house?
i'm looking for a way to detect the rakudo version
masak davidfetter: I'm a rakudo developer some days of the week. :) 16:43
16:44 |mjk| joined
bbkr i'm afraid is not available yet (in fact Rakudo has "releases" not versions). you can only get parrot version through -v console switch. 16:44
masak davidfetter: I know there is a patch in RT somewhere for a better --version flag for Rakudo.
davidfetter masak, got any idea how i find a version now?
PerlJam yeah, current output of --version is LTA
16:44 ab5tract left
davidfetter this is for PL/Parrot, which will host PL/Rakudo, btw 16:45
masak davidfetter: do you have a git repository checked out somewhere?
davidfetter: then you can probably do 'git log' and check the date at the top.
davidfetter unfamiliar with the TLA, LTA
PerlJam davidfetter: Less Than Aweseom 16:46
er, Awesome
masak davidfetter: "LTA" stands for "Less Than Awesome", i.e. bad in some way.
davidfetter k
masak davidfetter: it's this group's way of saying something can be improved further or made slightly better.
davidfetter perl6 --version 16:47
This compiler is built with the Parrot Compiler Toolkit, parrot version 2.5.0.
ugh
masak aye. LTA. :/
16:47 pyrimidine joined
masak pyrimidine: \o 16:48
pyrimidine o/
davidfetter gets awful flashbacks of organic chem lab
pyrimidine sorry :) 16:49
masak :)
16:49 meppl joined
pyrimidine If it helps, I'm a biologist, not a chemist 16:49
davidfetter do tell :)
pyrimidine bioperl 16:50
davidfetter hopes to get the bio interested in pl/parrot, as they're already (well, a lot of them) heavy users of postgresql
the bio community*
yes, i get that's an incredibly diverse group
16:50 |mjk| left
pyrimidine yep. the chado crew from GMOD are the heavy users. 16:50
*heavy Pg users 16:52
davidfetter yeah, i figured that was what you meant
pyrimidine not implying they're heavy users of anything else (though they might be :)
PerlJam Are you saying they're obese? ;)
davidfetter 's serum caffeine levels are probably outside optimal range
so back to rakudo versions 16:53
"built with PCT, parrot 2.5.0" doesn't actually tell me about the rakudo version 16:54
masak davidfetter: that is correct.
davidfetter: it's been addressed.
davidfetter what, if anything, does?
masak davidfetter: the fix is in a patch in an RT ticket.
davidfetter: it's pending pmichaud's review.
davidfetter is there a git branch or something that has the patch applied? 16:55
masak not that I know. 16:56
here's the patch, it seems: rt.perl.org/rt3/Ticket/Display.html?id=73148
16:57 dakkar left
masak I also seem to recall some discussion on these very issues on IRC, in which pmichaud expressed hesitation over some proposed solutions. I'll try to find it in the logs. 16:57
bbkr What is the difference between Any and Mu objects (or where can I find inheritance diagram) ? 16:58
davidfetter speaking of branches, what's rakudo using for SCM?
16:58 colomon joined
masak bbkr: Any ~~ Mu, Mu !~~ Any. probably S02 outlines this. 16:58
davidfetter: git.
davidfetter: github.com/rakudo/rakudo 16:59
davidfetter excellent!
Su-Shee I thought Any indicated anythingness and Mu indicates any form of nothingsness?
davidfetter doesn't know git super-well, but has had pretty uniformly good experiences with it so far
colomon is hoping for a live report from pmichaud's cool perl 6 lecture, as he is in the Perl on Android lecture.
davidfetter this is in sharp contrast to the other SCMs i've tried 17:00
bbkr masak: thanks, found it
17:00 gbacon left
masak davidfetter: seems there is some discussion here: irclog.perlgeek.de/perl6/2010-03-02#i_2054444 17:01
davidfetter hopes colomon will pipe up and ask pmichaud about the version issue, or cause someone else at YAPC::NA to do so
colomon version issue?
davidfetter masak, thanks. reading
rakudo --version doesn't spit out anything helpful
masak it's not an issue, it's a patch on RT pending review :P 17:02
17:02 rlb3 joined
masak and I also think it really should be improved. I list it as one of the things that Rakudo Star should have in my list at use.perl.org/~masak/journal/39597 17:02
17:03 tadzik left
masak "perl6 --version doesn't actually give version info" -- rt.perl.org/rt3/Ticket/Display.html?id=68752 -- that ticket is from 2009-08-23. 17:03
ash_ how would the version number be calculated? the year/month it was released? 17:04
masak that said, I don't consider it as critical, or as worthy of pmichaud's attention, as the closures bug or the backtracking bug or the charclass-escapes bug.
it's relatively low-priority.
davidfetter depends what you're doing with it ;) 17:05
17:05 TiMBuS left
masak ash_: releases have release numbers, such as #30; version numbers, such as 2010.06; and code names, such as "Kiev". 17:05
probably all three could be in the --version information.
bbkr rakudo: class Q {}; Q.new; # bug or expected behavior (interpreted as Q{} quoting) ? 17:06
p6eval rakudo b04384: OUTPUT«===SORRY!===␤Confused at line 11, near "Q.new; # b"␤»
masak bbkr: yeah, that one :(
that desperately needs fixing too.
bbkr then I assume it's already known :) 17:07
17:07 envi^home left
masak bbkr: oh, you didn't find it in RT? :) 17:07
yes, it's known.
and yes, that's why.
kolibrie sorear: yes, I explained things somewhat where things are going rather than the exact state right now (especially with the speed at which you have been working on viv) 17:08
sorear: we only said nice things about you
colomon: you did not introduce yourself, so I will not recognize you irl 17:09
bbkr masak: RT is down so I cannot check :( I just stepped into it while hacking oneliners. 17:10
colomon kolibrie: sorry about that.
17:11 ejs left
kolibrie colomon: np. just say hi if you happen to run into me. I don't leave till tomorrow 17:11
colomon will do. 17:13
masak bbkr: it's in there. for when RT comes back up, you'll find it as #74338.
bbkr masak: thanks
masak nom & 17:14
17:14 masak left 17:15 thebird left, ejs joined
ingy greetings! 17:17
patch and I are porting TestML to p6
we had a q 17:18
stupid one
is there a use lib for p6
?
ash_ ingy: yea, @*INC is the include path
rakudo: say @*INC; 17:19
p6eval rakudo b04384: OUTPUT«lib/home/p6eval/.perl6/lib/home/p6eval//p1/lib/parrot/2.5.0-devel/languages/perl6/lib.␤»
bbkr ingy: and you can modify it in BEGIN block like here: cpansearch.perl.org/src/MORITZ/JSON...01-parse.t
17:19 colomon left
ingy bbkr: that's what we need 17:20
thanks
ash_ rakudo: use lib('./lib');
p6eval rakudo b04384: OUTPUT«===SORRY!===␤Unable to find module 'lib' in the @*INC directories.␤(@*INC contains:␤ lib␤ /home/p6eval/.perl6/lib␤ /home/p6eval//p1/lib/parrot/2.5.0-devel/languages/perl6/lib␤ .)␤»
ash_ rakudo: use lib '.'; 17:21
p6eval rakudo b04384: OUTPUT«===SORRY!===␤Unable to find module 'lib' in the @*INC directories.␤(@*INC contains:␤ lib␤ /home/p6eval/.perl6/lib␤ /home/p6eval//p1/lib/parrot/2.5.0-devel/languages/perl6/lib␤ .)␤»
ash_ alpha: use lib '.'; 17:22
p6eval alpha 30e0ed: ( no output )
ash_ "use lib" works in alpha, it should work again in rakudo master eventually... 17:23
bbkr alpha: use lib '/etc'; # checking jailing :P
p6eval alpha 30e0ed: ( no output )
17:23 rlb3 left
ash_ alpha: use lib '/etc'; say @*INC; 17:23
p6eval alpha 30e0ed: OUTPUT«/home/p6eval/.perl6/lib/home/p6eval/rakudo-alpha/parrot_install/lib/2.0.0-devel/languages/perl6/liblib.␤»
bbkr damn :) 17:24
ash_ hmmm odd, i thought it would of showed up in there
alpha: BEGIN { use lib '/etc'; }; say ~@*INC;
p6eval alpha 30e0ed: OUTPUT«/home/p6eval/.perl6/lib /home/p6eval/rakudo-alpha/parrot_install/lib/2.0.0-devel/languages/perl6/lib lib .␤»
17:24 gbacon joined
ash_ weird 17:25
17:25 tadzik joined
bbkr i remember tath trere is already RT for that 17:26
that*
17:29 Chillance joined
bbkr rakudo: BEGIN {@*INC.push("/dev/null")}; use Test; 17:34
p6eval rakudo b04384: ( no output )
sorear { } creates a new dynamic scope 17:47
@*INC doesn't leave that 17:48
diakopter I thought only assignment was reverted 17:50
otherwise it's impossible to detect whether a clone occured
17:53 colomon joined
ash_ BEGIN phases are just executed first, i thought 17:55
17:55 rlb3 joined 17:57 rlb3 left
sorear oh, right 18:05
ash_ rakudo: BEGIN {@*INC.push("/etc"); say ~@*INC; }; say ~@*INC; 18:06
p6eval rakudo b04384: OUTPUT«lib /home/p6eval/.perl6/lib /home/p6eval//p1/lib/parrot/2.5.0-devel/languages/perl6/lib . /etc␤lib /home/p6eval/.perl6/lib /home/p6eval//p1/lib/parrot/2.5.0-devel/languages/perl6/lib . /etc␤»
18:15 patspam joined 18:19 leedo joined, leedo left 18:21 kensanata left 18:24 ejs left 18:28 macdaddy joined, macdaddy is now known as Guest47677 18:36 l2trace99 left 18:43 s1n left 18:44 Guest47677 left 18:45 davidfetter left
jnthn o/ from England 18:47
18:48 stepnem left 18:51 patspam left, patspam joined 18:52 macdaddy joined 18:53 macdaddy is now known as Guest39268, patspam left, patspam joined 18:56 Wolfman2000 joined 18:57 stepnem joined 19:04 cono left 19:05 cono joined 19:11 Ross^ left, Ross joined 19:18 masonkramer joined 19:19 patspam left 19:24 [Coke] left, [Coke] joined 19:29 ejs joined
moritz_ \o 19:31
colomon o/ 19:32
19:32 drbean_ joined 19:34 drbean left 19:35 lichtkind joined, jaldhar left 19:36 plainhao left
moritz_ when are people going to YAPC::EU? Any plans yet? 19:36
dalek kudo: f3d8af8 | moritz++ | src/Perl6/Compiler.pir:
make @*INC writable, by popular request (RT #75956)
19:37
19:37 lestrrat is now known as lest_away 19:38 stepnem left
frettled jnthn: Are ye in excile? 19:40
19:41 kensanata joined 19:42 s1n joined 19:44 stepnem joined
pugssvn r31417 | moritz++ | [t/spec] infix:<eqv> with Rats 19:50
19:50 stepnem left
[Coke] needs regexp hepl. 19:52
TimToady we don't have any regexps here, only regexes :)
19:53 perlygatekeeper left 19:54 masak joined
[Coke] You'll notice my typing isn't right on other words there. :P 19:54
masak ahoy!
moritz_ [Coke]: go ahead and ask
[Coke] so, if I have:
Su-Shee he wants a repl. not hepl. ;)
[Coke] token variable:sym<normal> { '$' <identifier> [ '(' $<key>='3' ')' ]? }
then it parses OK. (this is for tcl's hash-like var indexing, so I get $a(3) working there. (key is hardcoded to "3", but that's fine for now.) 19:55
frettled TimToady: any current regs, then?
[Coke] if I change the key to <key=.foo> where foo is is other rule that I expect to cover valid keys (that is already defined elsewhere in the grammar), then the parse fails. I am assuming that my syntax is ok, and that it is the rule I'm including that's the problem? 19:56
19:56 ejs left
moritz_ yes, <key=.foo> is correct syntax, and supported by nqp-rx 19:57
19:58 colomon left
masak ingy: TestML! woot! 19:58
though why people are so eager to manipulate @*INC in BEGIN blocks, I'll probably never understand... :) 19:59
frettled masak: Old die-hard habits, now featuring in Die Hard 6.
moritz_ masak: in tests there is a very simple answer
20:00 [Coke] left
moritz_ masak: you can't make assumptions about @*INC of a particular compiler, and can't influence it in any other way 20:00
masak moritz_: oh, I meant in applications. in tests, even application's tests, it's perfectly OK and normal. 20:01
in applications, I'd think twice before using it.
20:02 uniejo joined
masak moritz_: re your email about pre-YAPC::EU hackathon plans, I'm prepared to arrove a few days early to convene over a Perl 6 hackathon. I haven't made any reservations yet. 20:03
moritz_ masak: if everything works fine, I'll book for Aug 1st to 6th 20:04
masak: and good to hear there's someone coming early too :-)
20:04 [Coke] joined 20:05 colomon joined
masak that should work for me too. might bend it to Aug 2nd rather than 1st, we'll see. 20:05
20:05 Psyche^ joined
frettled masak: back in the good ole' days of horribly bad Perl, we modified @INC all the time for reasons I've happily forgotten. I just remember that it was a horror. 20:05
20:06 [Coke] left
colomon wonders how many years he programmed in Perl without ever using a module... 20:06
masak frettled: it just naturally strikes me as slightly anti-social. which is why it's OK for tests, because tests are standalone scripts. 20:07
frettled Good $deity, have I inspired the telling of Perl war stories now?
masak: Yes.
Wolfman2000 frettled: There are Perl war stories?
moritz_ sure there are
Wolfman2000 I'm curious about them
20:08 [Coke] joined
wolverian do we have command line argument parsing yet? 20:09
20:09 Patterner left, Psyche^ is now known as Patterner
tadzik in MAIN? Yes 20:10
pugssvn r31418 | lwall++ | [STD] allow null parameter before ;;
moritz_ rakudo: sub MAIN() { say "run automatically" }
p6eval rakudo b04384: OUTPUT«run automatically␤»
moritz_ rakudo: sub MAIN($missing_argument) { } 20:11
p6eval rakudo b04384: OUTPUT«Usage:␤/tmp/sTfWLOFNRE missing_argument␤»
wolverian swoons
seriously, that is so great.
moritz_ patrickas++ for implementing most of the logic
masak can a role refer to private attributes of a class it's being mixed into? 20:12
wolverian moritz_: can I has defaults for them?
masak (in Perl 6, not Rakudo)
tadzik you can, even in rakudo
moritz_ wolverian: I think so
$ ./perl6 -e 'sub MAIN($x = 30) { say $x }'
30
$ ./perl6 -e 'sub MAIN($x = 30) { say $x }' 50 20:13
50
also supported: named arguments, which can be passed with --optionname=value
s/passed/populated/
wolverian how about short names? :)
moritz_ NYI
wolverian: but the logic for parsing is all in Perl 6 20:14
tadzik hmm, I sense a bug
wklej.org/id/355490/
moritz_ wolverian: so if you want to patch it, you don't need to learn any scary PIR stuff
wolverian moritz_: I'll take a look at it after I have this script done.
moritz_ tadzik: bug indeed. Mandatory parameters need to come before optional ones 20:15
rakudo: sub MAIN($v = 0, $arg, $bark = 'default bark') { }
p6eval rakudo b04384: OUTPUT«Usage:␤/tmp/laJdSS86Ki [v] arg [bark]␤»
moritz_ it should die at compile time
rakudo: sub x($v = 0, $arg, $bark = 'default bark') { }
p6eval rakudo b04384: ( no output )
moritz_ $arg after $v = 0 should be forbidden
tadzik: care to submit?
tadzik sure
what should the note look like then? 20:16
moritz_ tadzik++ # breaking stuff
tadzik "Raduko should cry about bad order of optional and obligatory parameters?"
moritz_ rakudo doesn't complain about mandatory parameters after parameters with default values
tadzik a'right
moritz_ yeah, something like that
tadzik well, O
masak rakudo: our &s = &say; role R { method foo { s $!x } }; class A does R { has $!x }; A.new(:x("OH HAI")).foo # TimToady: is this allowed?
p6eval rakudo b04384: OUTPUT«OH HAI␤»
tadzik whoops. Well, I'm not so big to fix stuff in Rakudo, so I can try breaking :) 20:17
wolverian holy crap safari is slow with the perlcabal.org/syn files
frettled If you think Safari is slow, don't try Firefox.
masak tadzik: the note should replicate the problem, and be clear about what's wrong and what's expected.
TimToady std: sub MAIN($v = 0, $arg, $bark = 'default bark') { }
p6eval std 31417: OUTPUT«===SORRY!===␤Can't put required parameter after optional parameters at /tmp/cqKyqwJwH9 line 1:␤------> sub MAIN($v = 0, $arg⏏, $bark = 'default bark') { }␤Check failed␤FAILED 00:01 114m␤»
tadzik I'll try to minimize the test case 20:18
20:18 quietfanatic joined
moritz_ rakudo: sub a($x = 0, $y) 20:18
rakudo: sub a($x = 0, $y) { }
p6eval rakudo b04384: OUTPUT«===SORRY!===␤Symbol '$ss_SS_S_S__S_S_s' not predeclared in <anonymous> (/tmp/ei0fZ2gHqZ:1)␤»
rakudo b04384: ( no output )
moritz_ there you go :-)
tadzik std: sub MAIN($v = 0, $arg) { }
p6eval std 31417: OUTPUT«===SORRY!===␤Can't put required parameter after optional parameters at /tmp/VY35KleGJr line 1:␤------> sub MAIN($v = 0, $arg⏏) { }␤Check failed␤FAILED 00:01 111m␤» 20:19
tadzik great :)
moritz_ doesn't need to be MAIN at all
tadzik ah, not only in main then?
Even better
frettled moritz_: Where did that $ss_SS_S_S__S_S_s come from? :)
moritz_ frettled: from p6eval
masak tadzik: also, if you prefix the message subject with [BUG], the RT ticket will be automatically labeled as a bug. :)
frettled moritz_: Magic ternary notation?
tadzik Wow, didn't even finish my email and alredy 2 patches for the subject :) 20:20
moritz_ frettled: it tries to add something to remove unsafe symbols
tadzik hrm
rakudo: sub foo ($v = 0, $arg) { }
p6eval rakudo b04384: ( no output )
frettled moritz_: it sure generates an interesting read
tadzik std sub foo ($v = 0, $arg) { }
std: sub foo ($v = 0, $arg) { }
p6eval std 31417: OUTPUT«===SORRY!===␤Can't put required parameter after optional parameters at /tmp/JdwlPShJsd line 1:␤------> sub foo ($v = 0, $arg⏏) { }␤Check failed␤FAILED 00:01 111m␤»
tadzik good
sent 20:21
frettled Hmm, how will things like Getopt end up working, I wonder ...
moritz_ tadzik++
masak TimToady: I'm running up against interesting new questions of encapsulation and visibility. is it kosher for a role to speak of attrs it doesn't have?
tadzik \p/
masak \q/ 20:22
tadzik erm
moritz_ frettled: MAIN makes that mostly superfluous
tadzik \o/
masak \σ/
20:23 Ross left
frettled \π/ 20:23
TimToady masak: it can certainly speak of them in $.foo form; $!foo without declaration could be viewed as a requirement from the class
std: $!foo
p6eval std 31417: OUTPUT«ok 00:01 107m␤»
20:23 Ross joined
colomon ufo++ 20:24
masak TimToady: I hardly even see $.foo as attributes any more...
TimToady: but I didn't hear you say "no", so I'll keep going in the direction I'm headed with this code... :)
TimToady they are still abstract attributes, but viewed from the outside; a class may sometimes wish to view even its own attributes that way
20:25 stepnem joined
masak colomon: pls will probably come with ufo integrated. 20:25
20:26 Su-Shee left
colomon masak++ 20:26
I've just started a new quick project on github, btw. 20:27
masak TimToady: a class speaking of a private attribute it doesn't have makes no sense. a role doing same makes sorta-kinda sense, because it can still be mixed into something that has the attribute.
ash_ std: class A { class B { }; }; B.new; # this is wrong, correct? 20:28
20:28 estrabd left
frettled moritz_: Ah, I'd forgotten that part of S06, and definitely feel to dense to redigest it right now. :) 20:28
p6eval std 31417: OUTPUT«===SORRY!===␤Undeclared name:␤ 'B' used at line 1␤Check failed␤FAILED 00:01 107m␤»
colomon github.com/colomon/str2num
TimToady ash_: if std says something to do with namespaces is wrong, it's almost always correct
colomon just starting on tests for the first function 20:29
masak colomon++
20:30 tadzik left
moritz_ I'd love to see that in C at some point, for speed 20:30
ash_ colomon: couldn't you define it as a grammar? (just curious)
colomon ash_: it's already defined (and better) as a grammar. 20:31
moritz_: yeah, first goal is to get it correct.
masak today I'm really missing Java's protected access level in Perl 6, for some reason. I have to make attributes public and 'is rw' when they'd really be better off private and/or readonly.
colomon right now numbers are totally messed up in Rakudo. 20:32
ash_ masak: would 'trusts' help your design some if it was functional? 20:34
(it might be, i haven't tried)
20:34 estrabd joined
masak ash_: if it could glob over yet-unknown descendents, it would. 20:34
20:35 estrabd left
moritz_ what kind of data do you want to share with child classes, but not publicly? 20:35
masak rakudo: our &s = &say; class A { method foo { say "OH HAI" } }; role B { method foo { s "before"; callsame; s "after" } }; class C is A does B {}; C.new.foo # I'm surprised the role takes precedence here
p6eval rakudo b04384: OUTPUT«before␤OH HAI␤after␤»
ash_ ah, then it probably wouldn't help since 'trusts' doesn't get inherited, i don't think
moritz_ masak: that's because class C doesn't define a method with the same name 20:36
20:36 estrabd joined
masak moritz_: ah, true. 20:37
wolverian can you "trust" a module/package? 20:38
masak moritz_: I have a class which encapsulates a hash. in a child class, I want to add load/save serialization, so I need access to the hash.
ash_: I don't need 'trusts' to get inherited. I only need the parent class to trust a child class when it sees one.
wolverian masak: stupid q: why inheritance and not composition? 20:39
masak can you trust a Bool? half of them are false.
wolverian: I don't immediately see how composition would help me here, if the data in the parent class is private.
wolverian additionally, it seems that if the child class wants to munge with a parent class's internals, the parent class should provide specific (public) hooks for that
masak nod. 20:40
wolverian but that's kind of hand-wavey, I know.
masak that's the design I'm reluctantly landing at.
I need to make the encapsulated hash public and rw, so that the load method can load into it. 20:41
I could do it via a specially-written method, but it'd amount to the same thing.
20:41 mj41 left
wolverian it'd be safeer. 20:41
s/ee/e/
ash_ protected would be nice in this situation, so the children have a way of manipulating the parts of the parent that were designed for it, but not the rest of the world 20:42
masak wolverian: I don't see how.
wolverian masak: the hash wouldn't be arbitrarily mungable, only in that particular fashion.
masak wolverian: by... overwriting the whole thing? :) 20:43
wolverian: it's not like I'm restricting its use here.
wolverian why not? ;) 20:44
masak because 'load from file' implies that the whole hash becomes overwritten by the contents from the file. 20:45
there's no less restricted operation you could do to a hash.
ash_ are private methods inherited? 20:46
moritz_ no
ash_ why not?
if you didn't want it to be inherited you could call it a submethod
moritz_ why would a private method be inherited, if a child doesn't have access to privates anyway? 20:47
20:47 Sarten-X left
wolverian masak: $self.remove_all; $self.add_all(load_file); ? 20:48
masak: I'm sure there's always some way to make it convoluted :)
wolverian has been coding java
ash_ moritz_: if you made methods private methods inherit to children, you could have protected methods via that, (for a given definition of 'private' anyway), then if you didnt' want them to be inherited you could make them submethods 20:49
moritz_ if we wanted protected methods, we'd introduce them
20:50 masak left
dalek kudo: 11cbd4f | util++ | (3 files):
Change dynops build from deprecated ops2c.pl to new NQP-based ops2c
20:52
20:52 stepnem left 20:56 bphillips left 20:58 Sarten-X joined
quietfanatic Has anyone noticed that the Parrot SDL library included in Rakudo has a random "say 'Hu'" in it? 20:59
TimToady yes
you noticed it :)
quietfanatic True. It was kind of noticable when I ran it. 21:00
sorear TimToady: What stops "my int @foo; @foo[0] := @foo[12];' from working?
21:00 _kaare left
wolverian lisppaste doesn't know #perl6 anymore apparently 21:00
Tene it was being used for spam 21:01
wolverian it doesn't know perl6, either. :)
s/perl6/Perl 6/
TimToady whatever asks @foo for the 0th bvalue fails
and probably the compiler notices := to a non-bvalue 21:03
pugssvn r31419 | Kodi++ | [S03] Capitalo.
wolverian I can't add boolean flags to MAIN either 21:04
21:04 whiteknight joined
quietfanatic rakudo: class A is B {} 21:06
p6eval rakudo f3d8af: OUTPUT«===SORRY!===␤Could not find sub &chars␤»
[Coke] quietfanatic: I just removed that line from the parrot sdl library. thanks.
quietfanatic [Coke] You'
re quite welcome
[Coke] Hu. 21:07
(I have no idea what it was doing there. =-)
wolverian my first perl6 script: sub MAIN ($pattern = ':', $separator = "\n") { say $*IN.lines.map: { .split($pattern).join($separator) } } 21:10
it _is_ a bit slow to start up though... :)
I called it 'splat', because split is already taken. if anyone knows of a ready made unix tool for that, though, please tell. 21:11
[Coke] ISTR that a rakudo slowdown was recently noticed in re: extra "isa" calls.
21:13 pyrimidine left 21:24 mjk joined
Tene wolverian: there's already a command to do that; paste. 21:30
wolverian: paste -s -d:
21:31 kensanata left, colomon left
wolverian Tene: thanks! 21:32
sorear perl6: my $x; $x ::= 1; $x := 2;
p6eval pugs: ( no output )
..elf 31419: OUTPUT«Undefined subroutine &GLOBAL::infix_::_61 called at (eval 124) line 4.␤ at ./elf_h line 5881␤»
..rakudo f3d8af: OUTPUT«===SORRY!===␤::= binding not yet implemented at line 11, near " 1; $x := "␤»
sorear mildew: my $x; $x ::= 1; $x := 2;
p6eval mildew: OUTPUT«Can't open perl script "mildew": No such file or directory␤»
sorear perl6: (-> $x { $x := 2 })(1); 21:33
p6eval elf 31419: OUTPUT«AST handler circumfix:pblock partially unimplemented at ./elf_h line 3549␤»
..rakudo f3d8af: OUTPUT«:= binding of variables not yet implemented␤ in 'infix:<:=>' at line 601:CORE.setting␤ in <anon> at line 11:/tmp/j8MnYhFif7␤ in main program body at line 11:/tmp/j8MnYhFif7␤»
wolverian Tene: I think paste does the reverse of my script, actually.
p6eval ..pugs: ( no output )
21:33 tedv joined
wolverian Tene: I split the input on : and print each element on its own line. I certainly can't get paste to do that. 21:33
Tene ah
yes, I misread the order. 21:34
sorear tr : '\012'
< input > output
wolverian sorear: doesn't replace strings, I think. 21:35
time to go. good night, all. 21:36
21:37 mjk left 21:39 gbacon left 21:40 tylerni7 joined
Tene yeah, tr can only replace one char with another 21:41
TimToady hmm, 5.14 is going to have package Foo {...} 21:43
if modules get written that way, we can't rely on the semicolon form to recognize P5... 21:44
ash_ what does package mean in perl6? (i thought you needed to use module/role/class) 21:48
TimToady package is the bare namespace, up till now; module implies exportatation via 'is export' 21:49
but really there's little difference
dinner & 21:50
21:51 kst left
sorear 5.14 is going to have package Foo { ... } ? WHYYY 21:52
ash_ because they wana be cool like perl6 21:53
(i don't see that as a bad thing, despite my sarcasm)
21:53 s1n left
sorear True or false: Every value in Perl 6 is logically containerized. 1 refers to an anonymous, read-only, unbindable container which contains 1; since return statements perform a read-only bind, all function calls return read-only container aliases too. 21:54
21:57 Ross left, Ross joined 21:59 [Coke] left 22:02 FardadJalili joined 22:03 Chillance left 22:09 tylercurtis joined 22:13 s1n joined 22:16 FardadJalili left 22:22 estrabd is now known as estrabd_afk 22:28 colomon joined
colomon rakudo: say (1 + 0/10).WHAT 22:31
p6eval rakudo f3d8af: OUTPUT«Rat()␤»
22:33 uniejo left
sorear What happens if a method call invocant is rw? 22:40
22:41 pragma_ is now known as amgrap, kensanata joined
lue ohai 22:42
22:42 amgrap is now known as pragma_, lichtkind left
colomon pmichaud: ping? 22:46
22:51 lue left, Guest33887 left 22:57 lest_away is now known as lestrrat 22:59 colomon left 23:00 lichtkind joined 23:01 Ross left 23:10 araujo left 23:11 araujo joined 23:12 lichtkind left 23:14 colomon joined
colomon pmichaud: now in dorm lobby, eating tamales. :) 23:15
23:17 Limbic_Region joined
colomon str2num("100000000.100000000000000000000000000000") now works! 23:23
sorear Would it be semantically valid for A := B to be a macro for VAR(A).BIND(B)? 23:30
sorear wants infix:<:=> and VAR to both be macros or neither be macros in Sprixel/VICIL
23:31 athomason joined 23:32 skids joined
colomon rakudo: say 10 ** 20 23:36
p6eval rakudo 11cbd4: OUTPUT«1e+20␤»
23:38 patspam joined, pnate left 23:39 pnate joined
sorear Who broke the Rakudo build? 23:42
It's back to using so much memory as to average 2.0% CPU utilization 23:43
23:47 pnate left 23:50 [Coke] joined, pnate joined
colomon log10(str2num(".000000000000000000000000000000000000000000000000000000000001")) now equals -60 23:54
ash_ is that right 23:55
colomon yes
ash_ cool
colomon rakudo: say .000000000000000000000000000000000000000000000000000000000001
p6eval rakudo 11cbd4: OUTPUT«8.67361737988404e-19␤»
colomon yup, that's why I'm working on this. :)
ash_ isn't that floating point error? 23:56
colomon it's *a* floating point error, if that's what you mean. 23:57
but it's not precision or anything.
rakudo: say 1e-60
p6eval rakudo 11cbd4: OUTPUT«1e-60␤»
colomon rakudo: say log10(1e-60)
p6eval rakudo 11cbd4: OUTPUT«-60␤» 23:58
colomon ash_: what's happening is Rakudo currently tries to express 1e60 as an integer, leading to massive overflow. 23:59