Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-04-10

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:16 nif joined #perl6
00:29 [particle] joined #perl6
00:31 wolfman2000 joined #perl6
00:36 replore_ joined #perl6
00:44 plobsing joined #perl6
00:51 xinming joined #perl6
00:51 vlixes joined #perl6
00:56 lichtkind joined #perl6
01:11 jaldhar joined #perl6
01:12 scott___ joined #perl6
01:15 tokuhirom joined #perl6
01:29 liuchong joined #perl6
01:39 vlixes left #perl6
01:44 wooden joined #perl6
01:44 wooden joined #perl6
01:46 nif left #perl6
01:52 retupmoca joined #perl6
01:56 xinming joined #perl6
01:57 moritz Juerd: nope, seems back to normal
02:18 orafu joined #perl6
02:51 xinming_ joined #perl6
02:51 fgomez joined #perl6
02:51 fgomez joined #perl6
03:12 sunnavy joined #perl6
03:41 replore_ joined #perl6
03:54 skids joined #perl6
04:44 SHODAN joined #perl6
04:52 farber7 joined #perl6
04:55 DarthGandalf joined #perl6
04:56 farber7 Hello I have a few questions about rooting the MotoActv, if I go for a run with it do I need to bring my phone as well to keep them linked for apps and internet. ? I know it notifies you of text messages but how close will my phone need to be. I have a iPhone 4 now but I had the droid razor and would go back to it but its way to big to take on runs with me.
04:58 farber7 Also if I got the watch and made it work how I needed with heart rate monitor and all can I have help rooting it I will pay for it to be rooted if I cannot do it. I have about 10 other people on my team who will do the same thing if possibel
04:59 lestrrat joined #perl6
05:06 alvis` joined #perl6
05:08 NamelessTee joined #perl6
05:08 bonsaikitten farber7: I think you're not in the right place
05:09 birdwindupbird joined #perl6
05:13 lestrrat joined #perl6
05:14 havenn joined #perl6
05:15 sudokode joined #perl6
05:25 alvis joined #perl6
05:36 moritz good morning
05:56 havenn joined #perl6
06:02 havenn joined #perl6
06:27 xinming joined #perl6
06:33 jferrero joined #perl6
06:35 jnthn morninä
06:38 geekosaur בוקר טוב
06:38 geekosaur (...whatever font my client substituted there is hideous)
06:44 tarch joined #perl6
06:47 cosimo morgen
06:55 shachaf geekosaur: You're allbery_b?!
06:55 moritz \o cosimo
06:55 moritz cosimo: LWP::Simple works again on newest Rakudo :-)
06:57 * jnthn wonders if cosimo will be at the Oslo hackathon
06:58 birdwindupbird joined #perl6
07:00 cosimo moritz: that's great to hear
07:01 cosimo jnthn: i'll try to show up, however my mum is flying to Oslo on saturday morning :)
07:03 geekosaur shachaf, yes
07:03 shachaf geekosaur: I thought you had disappeared forever or something.
07:09 fhelmberger joined #perl6
07:22 fglock_ joined #perl6
07:31 havenn joined #perl6
07:32 nwc10 joined #perl6
07:41 havenn joined #perl6
07:46 tadzik hello there
07:51 havenn joined #perl6
07:51 pomysl joined #perl6
07:51 pomysl joined #perl6
07:53 havenn joined #perl6
08:13 pomysl joined #perl6
08:13 pomysl joined #perl6
08:14 masak morning, #perl6.
08:15 arnsholt o/
08:18 moritz \o
08:18 * masak .oO( I said hello, and all they did was raise arms )
08:18 masak :P
08:19 moritz as long as they don't fire... :-)
08:19 tadzik :P
08:19 tadzik hello hello
08:20 masak it's great to be back. my offline acquaintances are silly too, but not like you guys. :)
08:21 pomysl joined #perl6
08:21 pomysl joined #perl6
08:21 arnsholt I'm still working on my first cup of coffee, so I'm still not quite verbal yet =)
08:21 arnsholt Also, too many still-s
08:26 pomysl joined #perl6
08:26 pomysl joined #perl6
08:32 pomysl_ joined #perl6
08:37 pomysl joined #perl6
08:37 pomysl joined #perl6
08:37 masak re http://blogs.perl.org/users/shlomi_fish/2012/04/t​he-perl-april-fools-gag-that-could-have-been.html -- I think Shlomi was funnier back when we tried to fork Perl 6 and make his own.
08:37 masak s/we/he/
08:42 masak ah, it's still online: http://www.shlomifish.org/rindolf/rindolf-spec/
08:43 moritz well, funniness wears off after a while
08:43 masak I think it's a somewhat interesting thought experiment -- what if the Perl 6 transition had been more on the order of Python 3k?
08:44 moritz probably like kurila
08:44 masak url?
08:44 moritz ie an interesting experiment that doesn't really take off
08:45 moritz masak: https://github.com/ggoossen/kurila#readme
08:45 bbkr joined #perl6
08:48 masak I think Perl 6, much like Esperanto, survives a lot on its clear vision.
08:48 masak i.e. a better something.
08:50 moritz so, what's the "something"?
08:50 moritz "everything"? :-)
08:57 masak fsvo "something", yes ;)
08:57 masak actually, I think we're whirlpooling on the "something".
08:58 masak by the end of the process we'll jump out and say "a-ha! Perl 6 is finished, and this is the kind of something it's a better one of!" :P
09:00 moritz I hope it won't come out as "better PHP" or "better awk" :-)
09:05 masak well, it'll be that too. but yeah, I'd be surprized if we landed on only that :P
09:07 havenn joined #perl6
09:10 moritz masak: btw have you seen https://gist.github.com/2346494 ?
09:14 masak I hadn't. nice.
09:14 masak s/Gas/Vapor/ :)
09:15 moritz :-)
09:15 masak also, that's a narrower definition of "slushy" than I've been using.
09:15 * masak checks his own definition in a blog post
09:16 masak "Slushy is good; it means that we have some backing from implementations, but the spec and the implementations don't quite agree yet."
09:16 masak to me "slushy" is not about stability so much as "we know that we're at least a little bit right, but we suspect things are still a bit wrong, too".
09:17 masak I guess we're saying the same thing, though.
09:17 moritz that's a better phrasing, yes
09:18 masak the numbering for the phases confuses the heck out of me.
09:18 masak I think both because it feels inverted (solid things are colder, no?) and because the numbers don't tell me anything. I think you need something spatial rather than numbers. something progress-bar-like.
09:19 moritz oh right, non-physicsts think that high temperature values are hotter
09:19 masak :P
09:20 TESTKEYz joined #perl6
09:20 masak but maybe this is "raw source" and it could be rendered as HTML.
09:20 masak fwiw, I think this should go up alongside the compiler comparison thingy.
09:20 moritz if you do statistical physics, you usually use 1/KT as the "temperature"
09:21 moritz maybe think of it as Moh's scale instead of temperature
09:21 moritz :-)
09:21 moritz anyway, I don't have a problem with renumbering
09:22 masak heh, sludgy minerals.
09:22 moritz or maybe use letters, if we can find two terms for "solid" and "slushy" that don't start with the same letter
09:22 masak if the letters sort "right" lexicographically, it's fine.
09:23 moritz re showing it on perl6.org, I wanted to get some more feedback first
09:23 masak you're looking for that sweet spot of a model that's both simple and intuitive.
09:23 moritz because partially that rating is *very* subjective
09:24 havenn joined #perl6
09:24 masak it is? maybe it has an inherent fuzziness of one point on the scale...
09:26 moritz some random observations so far:
09:27 moritz S02 and S03 have a lot more subheadings than S04
09:27 masak maybe you could re-use the PSA scale from A01? "Accepted", "a few Buts", "major Caveats", "Rejected"
09:27 moritz they also have (or hopefully had) a lot more crackpot stuff than S04 (and, I suspect, S05)
09:27 masak I think diakopter++ went and added lots of subheadings to S02 at one point.
09:28 moritz right
09:28 masak S05 has its fair share of crackpot stuff ;)
09:28 moritz it has?
09:28 * masak .oO( three kinds of <?after > )
09:28 moritz I'm not too deep into it
09:29 * masak .oO( say hello to the ~~ operator in regexes )
09:30 moritz ah well, some possibly unimplementable builtins are harmless compared to some of the parsing stuff I've deleted from S02 and S03
09:30 * masak .oO( Conjecture: we don't know how crazy the <*abc> syntax actually is, so some bits of it might be physically impossible )
09:30 moritz masak: <*abc> is on a sound theoretical foundation
09:31 masak aye.
09:31 moritz masak: it allows only a regular language, so you can simulate it as a DFA that accepts in every possible state
09:31 masak yes, I know.
09:31 moritz (but still carries on as far as it can)
09:32 moritz so I don't expect much in the "physically impossible" department
09:32 masak right. the conjecture in question just says "could get expensive".
09:33 moritz std: /<*a||b>/
09:33 p6eval std 1ad3292: OUTPUT«ok 00:00 41m␤»
09:34 moritz masak: I'm more concerned about it being expensive in terms of compiler writer hours :-)
09:34 masak luckily, the feature as such is not on a critical path of any kind.
09:34 masak it's more of a "nice syntactic sugar" thing.
09:35 moritz more like "nice sugar"
09:35 moritz it's not as if you could easily get the same functionality if you were willing to use ugly syntax
09:35 masak you could. S05 gives examples.
09:36 moritz well, but that requires you to spell out the regex. Which is much harder if some part of it is user input.
09:36 masak &eval
09:36 masak :)
09:39 masak r: my $rx = ''; for 'xyz'.comb.reverse { $rx = "[$_ $rx]?" }; say $rx
09:39 p6eval rakudo 3bd91f: OUTPUT«[x [y [z ]?]?]?␤»
09:39 masak r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say $rx
09:39 p6eval rakudo 3bd91f: OUTPUT«[x [y z?]?]?␤»
09:39 moritz ok, you have won :-)
09:39 masak \o/
09:40 moritz r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'xy' ~~ /<?{ $rx }/
09:40 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 1, near "/"␤»
09:40 moritz r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'xy' ~~ /<?{ $rx }>/
09:40 p6eval rakudo 3bd91f: OUTPUT«True␤»
09:40 moritz r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'x' ~~ /<?{ $rx }>/
09:40 p6eval rakudo 3bd91f: OUTPUT«True␤»
09:40 moritz r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'xyza' ~~ /<?{ $rx }>/
09:40 p6eval rakudo 3bd91f: OUTPUT«True␤»
09:40 moritz r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'xyza' ~~ /^<?{ $rx }>$/
09:40 p6eval rakudo 3bd91f: OUTPUT«False␤»
09:40 moritz r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'xyz' ~~ /^<?{ $rx }>$/
09:40 p6eval rakudo 3bd91f: OUTPUT«False␤»
09:41 masak mischivous idea: we could prototype an implementation by just throwing in this kind of code :P
09:41 moritz I just thought about that
09:41 moritz but unfortunately it's not that easy
09:41 masak dang. :/
09:41 masak well, could always prototype it in a module for the time being.
09:41 moritz consider  <* [xyz | a ] b >
09:42 moritz that shouldn't match xyb
09:42 moritz but if you just recursively apply your transformation to all literals, it would match
09:42 masak right.
09:48 masak OH BTW. after thinking some more about how best to create a unity matrix in S09-enabled Perl 6.
09:49 masak I decided I was on far too many high horses at the same time, grinding far too many theoretical axes.
09:50 moritz use matrix; my @m = unity(5); # for a 5x5 unity matrix
09:50 masak how about 'sub I($n) { my Num @matrix[$n][$n]; @matrix[$_][$_] = 1 for ^$n; return @matrix }'? :)
09:50 masak moritz: sure, that's the API. I'm talking about the implementation.
09:51 moritz CHECK failed: assignment to @matrix[...][...] will never work. Type constraint: Num. Got: Int
09:51 masak er, s/Num/Real/, perhaps.
09:51 masak I meant Numeric but wrote Num.
09:51 masak that seems to happen to me (and others) a lot. :)
09:51 masak if 'my Numeric @matrix[$n][$n]' works, then I'll take that.
09:52 masak hm. I just realized I wrote [$n][$n] instead of [$n;$n].
09:52 masak does S09 explicitly support the former form?
09:52 moritz masak: that's kinda cute. But for "real" linear algebra applications you probably want some sparsish matrix types
09:52 masak sure.
09:53 masak but I consider that a representation, not a part of the algorithm.
09:53 moritz masak: in fact, all serious linear algebra libs that I know have separate (upper triangle, lower triangle, diagnoal matrix, sparse matrix, dense matrix) types
09:53 masak *nod*
09:53 masak and that's fine.
09:54 masak anyway, I realized I was out in APL-land or FP land looking for nice ways to create a unity matrix.
09:54 moritz well, the two are related. If you know that the matrix always stays diagonal, it gives you an easier API
09:54 masak but it should probably just be the above.
09:54 moritz use Matrix; my @a := diagonal(1 xx $n);
09:54 masak oh, troo.
09:54 masak as long as it upgrades seamlessly, that's probably the cutest implementation possible.
09:54 masak moritz++
09:55 masak sub unity($n) { diagonal 1 xx $n }
09:55 moritz seamlessly, yes. Not sure if it should implicitly though
09:56 moritz though there should be coercions available
09:56 masak if the matrices are immutable, it's not much of a problem.
09:56 masak then we can Liskov freely and happily.
09:56 moritz after all, my @a = 1, 2, 3;  coerces the RHS to array
09:57 moritz likewise if we allow  my @a as DenseMatrix;  @a = unity(5)  to coerce, we should be fine
09:58 moritz which makes me think we maybe should have a MutableMatrix vs. ImmutableMatrix distinction like Array/List and Hash/EnumMap
09:58 brrt joined #perl6
09:59 * masak still thinks the Array/List distinction will forever confuse newcomers, and that the name "EnumMap" is too narrow/wide
09:59 * moritz knew that masak's next line would be about the "EnumMap" name
10:00 moritz but then you also have to complain about Pair/Enum
10:00 moritz :-)
10:00 masak maybe I will... :)
10:00 * masak eyes his collection of sledgehammers
10:01 * moritz is glad he's not the only one complaining
10:01 moritz on this occasion I'd also like to note that the multiple uses of the smartmatch operator block us from having   $str ~~ m:g/.../  working
10:03 moritz (because if m:g/../ returns a list, it desugars to  do { my $_ := $str; (m:g/.../).ACCEPTS($_) }
10:03 moritz and sine List.ACCEPTS already has a perfectly valid meaning that doesn't work in this case, we have a problem)
10:08 moritz s/sine/since/
10:11 GlitchMr joined #perl6
10:17 mucker joined #perl6
10:24 moritz I'd like to try a constrained writing exercise in Perl 6 one day. Something along the lines of "write a short, text based game that doesn't use the letter 'e' in its source code" or so
10:24 moritz maybe something less drastic for a start :-)
10:26 jnthn "e" is great because then your code can't just use eval(...decode stuff...) too :)
10:26 daxim joined #perl6
10:29 moritz it *can* use ::('&' ~ 'd'.succ ~ 'val').($stuff) :-)
10:29 jnthn right :)_
10:29 jnthn Can't use "." would be painful :)
10:29 moritz oh yes
10:29 jnthn Can't use parens would make people learn the precedence table :P
10:30 moritz I wonder how far you can get without curlies
10:30 moritz all your blocks written as whatever-curried expressions... :-)
10:30 jnthn ooh :D
10:31 moritz without 'e' you can't declare methods
10:31 moritz classes, attributes and subs would be fine though
10:32 jnthn You can add code objects via the MOP...but BEGIN and CHECK are out for doing it :P
10:32 moritz but 'constant' forces compile time evaluation too
10:32 jnthn Unless capital E is OK :)
10:32 jnthn ooh, yes!
10:33 moritz you see, we already get creative just by thinking about the problem, without even doing anything in it
10:33 jnthn nom: class A { constant = A.HOW."add_m{'d'.succ
10:33 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
10:33 jnthn gah
10:34 jnthn nom: class A { constant = A.HOW."add_m{'d'.succ}thod"(A, 'foo', sub ($slf) { say 42 }); }; A.foo
10:34 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'Undef'␤»
10:34 fsergot joined #perl6
10:34 jnthn Hm :)
10:34 jnthn We may also find bugs :P
10:34 jnthn nom: class A { constant x = A.HOW."add_m{'d'.succ}thod"(A, 'foo', sub ($slf) { say 42 }); }; A.foo
10:34 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'Undef'␤»
10:35 jnthn wtf
10:35 * jnthn gotta teach stuff, will leave masak to golf and file rakudobug :P
10:36 fsergot hi #perl6 o/
10:39 tadzik hey fsergot
10:40 NamelessTee joined #perl6
10:51 gfldex masak: i believe the following is asking for your attention: http://rosettacode.org/wiki/Assertions#Perl_6
10:52 PZt joined #perl6
11:01 masak gfldex: nah, that's a textual macro. :)
11:02 gfldex should it be?
11:02 masak also, the one who wrote that thinkgs that "non-hygienic" means "textual".
11:02 masak well, textual macros fall above AST macros on the power spectrum.
11:02 masak which means, as usual, that you should use them sparingly, only if you can't use the things below on the scale.
11:03 masak here I kinda feel an AST macro would've been nicer, actually.
11:03 masak but then, the specifics of how to pass an expression into an AST macro are not necessarily nailed down.
11:05 brrt left #perl6
11:06 gfldex so this is for later
11:07 masak I guess Pugs has textual macros.
11:08 masak pugs: macro foo($x) { "$x; $x" }; foo('say "OH HAI"')
11:08 p6eval pugs: OUTPUT«OH HAI␤OH HAI␤»
11:08 masak pugs: say "runtime"; macro foo($x) { say "compile time"; "$x; $x" }; foo('say "OH HAI"')
11:08 p6eval pugs: OUTPUT«compile time␤runtime␤OH HAI␤OH HAI␤»
11:08 masak \o/
11:09 thelazydeveloper joined #perl6
11:10 tadzik do we have textual macros too?
11:11 masak "we" as in Rakudo? no.
11:11 tadzik yes, I meant Rakudo
11:11 masak you'll have to find someone crazier than me to implement textual macros. :)
11:11 tadzik :P
11:12 masak there's a fundamental impossibility in there somewhere. strings are immutable, and yet textual macros literally change the source code being parsed.
11:12 masak which is problematic, because all the cursors prior to the macro application refer to the old source code, and suddenly there's a new source code.
11:13 masak AST macros are much easier, because ASTs are meant to be transformed in varous fun ways. that's why we have a middle end.
11:15 spider-mario joined #perl6
11:19 lestrrat joined #perl6
11:20 pernatiy joined #perl6
11:25 fsergot Which file is responsible for running perl6's scripts?
11:25 masak heh, Perl 6 discussion on #perl-help :)
11:26 fsergot In nqp, right?
11:27 fsergot Oh, found. :)
11:30 moritz masak: if we want to implement the :rw regex modifier at some point, we need to reference variables and not values in cursors and match objects
11:31 root____1 joined #perl6
11:31 masak yeah.
11:32 jnthn $!orig already does hold the original thingy fwiw
11:35 root____1 hi. i'm trying to read up on perl6.. and there's one thing that i can't really figure out: does Perl 6 support DSLs, similar to Ruby or something else?
11:36 moritz well, (nearly) every language supports DSLs in the ruby sense (that is, normal code looking cute if you give the subroutines and methods cute names)
11:37 moritz Perl 6 also allows you to extend the syntax in lexical scopes, for example by introducing new operators
11:37 masak poladark: you can pass a block to a sub, and have that sub dynamically declare some stuff, such that your DSL only works inside the block.
11:37 poladark i really loved hacking Rebol and i got kind of addicted to DSLs there
11:37 moritz there's also support for macros, but it's not quite there yet, being worked on
11:38 jnthn rakudo: sub postfix:<!>($n) { [*] 1..$n }; say 10!
11:38 p6eval rakudo 3bd91f: OUTPUT«3628800␤»
11:38 poladark i *suppose* Rebol syntax is just a giant DSL engine
11:38 masak poladark: then you can write stuff like 'recipe { ingredients onion => 1, milk => 2dl; ... }'
11:39 moritz poladark: I don't know much about Rebol, but I do know that the term "DSL" is overloaded and highly ambigous
11:39 masak I think there's a useful core to the DSL concept. you can find it around Martin Fowler and his writings.
11:39 masak but there's a lot of hot air around that core.
11:42 poladark my experience learning perl regex properly convinced me of how having domain-specific languages for solving particular problems well has value
11:43 moritz yes, but regexes are a very different beast of DSLs as what ruby folks mean when they say "DSL"
11:44 arnsholt And what the Lispers mean when they say is a third thing, I think
11:44 moritz ie it's really a different language within a quoting construct
11:44 tokuhirom joined #perl6
11:45 snearch joined #perl6
11:46 bluescreen10 joined #perl6
11:46 masak moritz: regexes are an "external DSL", according to the terminology. recipe/ingredients using well-named subs is an "internal DSL".
11:47 masak I'm not keen on the terminology, mostly because it glorifies internal DSLs a bit much. but it seems pretty established.
11:47 moritz masak: is there a term for something inbetween? like, well-named subs plus custom operators?
11:48 masak don't think so. but in Perl 6 it's all the same :)
11:48 jnthn How about we call it, "using your language's features appropriately"? :)
11:48 masak in http://masak.org/carl/yapc-russia-​2011-athlete-programming/talk.pdf I prefer the distinction "growing language inwards"/"growing language outwards".
11:48 masak so, anything nested in something else is a language that grows inwards into some other language.
11:49 masak whereas various prepropressing or compiling is growing a language outwards.
11:49 moritz .oO( does that mean that SQL is cancer? )
11:50 simcop2387 joined #perl6
11:50 masak when you compare Perl's regex support (syntax-wise) to Python's or PHP's, you can see that Perl groks "inner languages" at a wholly different level than Python or PHP.
11:51 poladark that's what initially confused me about Ruby DSLs too. i thought "wow, i can make my own database query or text processing language like SQL or Regex now!"
11:51 poladark turns out it wasn't as impressive as that
11:51 poladark but it works reasonably well for some things like Puppet
11:52 tadzik do you know Dancer/Sinatra?
11:53 masak DSLs do have a place. they're not just toys. but it's prudent not to let the hype and enthusiasm carry the baby out on a tidal wave of bathwater. ;)
11:54 poladark i only heard of Sinatra. never used it.
11:54 masak I've landed on a view where I consider myself the most productive and happy when I create little "internal APIs" for myself inside of an application. basically build the syntactic abstractions I need, as I need them.
11:54 masak it's extremely liberating to keep in mind that the programming language basically lets you do *anything* to make the solution more easy to express.
11:55 poladark over the years, i've fallen in love with the way different programming techniques are good at certain problems. i'd really love it if there was one language that was flexible enough to contain the possibility of using all of them when coding
11:55 masak welcome to #perl6 :)
11:55 tadzik :)
11:56 poladark :O
11:56 tadzik I always thought Sinatra/Dancer/Bailador is pretty much what DSL is supposed to look like
11:56 masak it's a good example, I think, of a well-balanced internal DSL.
11:57 masak your domain is HTTP verbs. so you get them as subroutines.
11:57 benabik joined #perl6
12:00 poladark once in a while, i'm really pissed off because i think "i could do this in a row of code with Forth!"
12:01 poladark but i'm not sure if a ruby-like DSL would allow me to create a Forth "dialect".
12:05 [Coke] I remember back in the day when a DSL was a standalone thing. I worked with a one off language to generate medical billing app/reports aeons ago.
12:06 masak well, you'd need a dedicated parser and interpreter for something like a Forth sublanguage.
12:06 masak but under the final vision of Perl 6, it should definitely be possible.
12:06 poladark :)
12:06 moritz well, Perl 6 does make parsing easy
12:07 tadzik aye
12:07 gfldex i'm quite sure it will work with a version prior to Final Perl 6
12:07 masak poladark: if you want to experiment with it in limited forms now, I recommend looking into parsing with grammars.
12:07 moritz though simple DSLs are already easy to parse. Like, splitting on newlines and blanks
12:07 masak p6: say "testing a simple Forth lexer.words.perl
12:07 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Confused␤at /tmp/cVUxgd6vFk:1␤»
12:07 p6eval ..niecza v15-6-gefda208: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/OmaKL9jVJj line 1:â�¤------> [32msay[33mâ��[31m "testing a simple Forth lexer.words.per[0mâ�¤â�¤Confused at…
12:07 p6eval ..pugs: OUTPUT«*** ␤    Unexpected end of input␤    expecting block, "\\", variable name or "\""␤    at /tmp/1x5N5nh6h3 line 2, column 1␤»
12:07 masak p6: say "testing a simple Forth lexer".words.perl
12:07 p6eval niecza v15-6-gefda208: OUTPUT«["testing", "a", "simple", "Forth", "lexer"].list␤»
12:07 p6eval ..rakudo 3bd91f: OUTPUT«("testing", "a", "simple", "Forth", "lexer").list␤»
12:07 p6eval ..pugs: OUTPUT«*** No such method in class Str: "&words"␤    at /tmp/SnmpTj4GQN line 1, column 5 - line 2, column 1␤»
12:08 brrt joined #perl6
12:08 * masak adds .words to the Pugs LHF TODO
12:08 tadzik hmm, there could be a bot for this
12:08 tadzik .LHF pugs .words
12:08 tadzik or such
12:09 tadzik random idea, maybe useless :)
12:09 moritz we've already discussed integrating p6eval with ticket submission and test creation
12:09 moritz but I guess we were reaching too high
12:10 moritz so not much has happened
12:10 tadzik probably the cost outweights the benefits
12:10 [Coke] open pugs issue #LHF Str.words
12:11 moritz tadzik: well, it was hard to find a user interface that was both powerful and easy to use
12:12 masak [Coke]++ # https://github.com/perl6/Pugs.hs/commit/​2512b2da720f9a7041736eb0b791858fe9912103
12:12 masak what a delightfully simple patch.
12:13 moritz there's some pretty neat DSL around that patch :-)
12:15 [Coke] masak: sadly, it got me that one test file, but not much else. (I need to ratched down autounfudge's pugs a little bit more, as a lot of the stuff we've skipped is hanging when we try to unfudge it.)
12:15 masak I think the "feeling" around DSL (and the reason for much of the hype) is "whoa, I can make my code look more like the solution space than like code!"
12:15 [Coke] there's probably some manually unfudging to do, though.
12:17 moritz masak: which is also the drive behind data driven programming
12:18 masak aye.
12:19 masak it's also some of the drive behind employing a top-down approach to coding.
12:19 envi_ joined #perl6
12:19 masak use API -> defined API -> implement underpinnings of API.
12:19 masak define*
12:20 masak repeat until you hit the metal :)
12:23 spider-mario I’ve read that Perl 6 was expected to have faster implementations than Perl 5 thanks to optional typing and all that,
12:23 spider-mario do you think we’ll get there one day?
12:24 moritz maybe
12:24 moritz rakudo already benefits from gradual typing
12:24 moritz but it still has to make up lots of ground
12:24 moritz it's probably too early to tell
12:24 spider-mario probably
12:25 spider-mario still, the tendency is encouraging. :)
12:25 masak I think we'll land in a place where Rakudo (say) will be slower for most things, faster for some specific things, but fast enough for it not to matter because you'd generally want the things Perl 6 has over Perl 5.
12:25 flussence the numeric stuff is getting lots of optimisation lately but I find anything using regex to still be painfully slow :/
12:26 spider-mario rakudo’s startup time already has nothing to do with that of its 2012.02 star release.
12:26 user joined #perl6
12:26 tadzik in what way?
12:26 spider-mario a good way
12:26 spider-mario a very good way
12:27 tadzik perl6 -e 1  0.24s user 0.14s system 81% cpu 0.459 total
12:27 tadzik not bad indeed
12:27 dalek roast: a84fe9b | coke++ | S (3 files):
12:27 dalek roast: pugs unfudge (so)
12:27 dalek roast: review: https://github.com/perl6/roast/commit/a84fe9bd4d
12:27 spider-mario (sorry, some of my sentences may seem awkward)
12:27 tadzik used to be about 0.5 seconds iirc
12:27 spider-mario (I’m not always comfortable with English)
12:27 spider-mario tadzik: with * 2012.02, a hello world took 3 seconds to execute on my machine
12:28 spider-mario now, about 0.3s
12:28 [Coke] \o/
12:28 spider-mario (maybe 0.5 actually)
12:28 spider-mario (but still!)
12:29 [Coke] I assume that's due to jnthn++'s bs branch?
12:29 flussence cold start on a netbook: 0m1.593s
12:29 moritz flussence: and warm start?
12:29 spider-mario it seems so
12:29 masak [Coke]: aye.
12:29 tadzik spider-mario: oooh
12:29 tadzik oh, Star was before bs?
12:29 flussence warm start... 1.319. I thought it'd be faster
12:30 spider-mario Star, cold: 2,95s user 0,17s system 64% cpu 4,811 total
12:30 masak [Coke]: at GPW, I was demo-ing some Rakudo stuff in the space before my talk, and was surprised, live, at the improved startup time.
12:30 spider-mario Star, warm: 2,97s user 0,17s system 98% cpu 3,189 total
12:30 spider-mario git, cold: 0,47s user 0,14s system 65% cpu 0,930 total
12:30 spider-mario git, warm: 0,46s user 0,15s system 97% cpu 0,620 total
12:30 masak a six-fold speedup.
12:30 masak that's significant.
12:30 spider-mario it is, it makes rakudo much more usable
12:32 masak it makes it usable sooner :P
12:32 moritz now I just wish we could have have module loading
12:32 moritz s:2nd/have/fast/
12:32 moritz which probably requires working precompilation
12:33 masak well, really fast compilation wouldn't be so bad either.
12:34 masak people will start to feel the pain for slow compiles as application sizes scale up.
12:34 masak s/for/of/
12:34 moritz aye
12:34 [Coke] p6: use Test; ok(any(1|0), "how many tests?")
12:34 p6eval niecza v15-6-gefda208: OUTPUT«ok 1 - how many tests?␤»
12:34 p6eval ..rakudo 3bd91f: OUTPUT«===SORRY!===␤Twigil-Variable constants not yet implemented. Sorry. ␤at lib/Test.pm6:3␤»
12:34 p6eval ..pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤    at /tmp/kAdBVcKtTv line 1, column 1␤»
12:35 moritz [Coke]: 1
12:35 moritz [Coke]: test functions shouldn't autothread
12:35 masak did we spec that?
12:35 [Coke] moritz: was trying to demonstrate that pugs authothreads.
12:35 [Coke] *autothreads
12:35 [Coke] locally I get:
12:35 [Coke] ok 1 - how many tests?
12:35 [Coke] not ok 2 - how many tests?
12:36 masak we did spec that.
12:36 [Coke] masak: there's a pugsbug ferya.
12:36 fgomez joined #perl6
12:36 moritz masak: where?
12:36 * masak submits pugsbug
12:36 masak moritz: https://github.com/perl6/spec​s/blob/master/S24-testing.pod
12:36 [Coke] makes it somewhat hard to fudge tests properly. I end up skipping everything with ajunction.
12:36 masak lots of Mu in the signatures.
12:36 moritz masak: ah, right
12:37 moritz it was even me who specced it :-)
12:38 [Coke] masak: pugs might need Mu before that's possible.
12:39 moritz [Coke]: you can probably write Object until then
12:39 frank59 joined #perl6
12:39 masak frank59: hi!
12:45 _ilbot joined #perl6
12:45 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
12:46 bluescreen10 joined #perl6
12:53 tyatpi joined #perl6
12:54 JimmyZ joined #perl6
12:54 masak a long detailed list of the mistakes of PHP: http://me.veekun.com/blog/2012/04​/09/php-a-fractal-of-bad-design/
12:54 tadzik I wonder why would one spend so much time writing down the downsides of a language
12:54 masak perhaps interesting for language designers. also slightly depressing reading. :)
12:54 tadzik I laughed at "foo" == TRUE, "foo" == 0, 0 != TRUE :)
12:55 flussence that one about long numeric strings is new to me...
12:56 flussence (and scary)
12:56 masak tadzik: yeah, because having more than one equality operator would just confuse people ;)
12:56 brrt i work in php and it is bad enough without snobs like you pointing it out :-p
12:57 brrt anyway
12:57 tadzik masak: yeah, better bury the fundamental logic :)
12:57 brrt what would it take for coercive type definitions to work in rakudo
12:57 tadzik Spock will not approve
12:57 tadzik (would?)
12:57 brrt they work?
12:58 havenn joined #perl6
12:58 brrt p6: my Num(Cool) $x = "2390"; say $x.WHAT;
12:58 p6eval pugs: OUTPUT«*** ␤    Unexpected ")"␤    expecting word character, "|", ":", "*" or parameter name␤    at /tmp/Y421SmPwiD line 1, column 12␤»
12:58 p6eval ..niecza v15-6-gefda208: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Str, needed Num or subtype␤  at /tmp/6mhhKddrhv line 0 (mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3843 (…
12:58 p6eval ..rakudo 3bd91f: OUTPUT«===SORRY!===␤Confused␤at /tmp/MTe0Kmsg9j:1␤»
12:58 brrt as per S02: my Num(Cool) $x = prompt "Gimme a number";
12:59 masak brrt: NYI.
12:59 masak rakudo: sub foo($x as Num) { $x }; say foo("2390").WHAT
12:59 p6eval rakudo 3bd91f: OUTPUT«Str()␤»
12:59 masak huh.
12:59 masak b: sub foo($x as Num) { $x }; say foo("2390").WHAT
12:59 p6eval b 922500: OUTPUT«Num()␤»
13:00 brrt masak: i reckoned, so what would it take to implement it?
13:00 masak jnthn or pmichaud :)
13:00 brrt :-) and if I where to offer my services, where should I look
13:04 masak seems to me it would affect both Grammar.pm and Actions.pm
13:04 masak you might want to dig up how Rakudo Beijing did its conversion in sub signatures.
13:05 masak ...but I fear this might be a non-trivial patch, especially considering that the question "how first-class are these things?" never really got a satisfactory answer, if I recall correctly. :/
13:06 masak i.e. can you declare an attribute to be 'Num(Cool)'? (probably yes). can you instantiate a parametric role with they type 'Num(Cool)'? (no frickin' idea)
13:06 masak the type*
13:08 tarch joined #perl6
13:11 tokuhirom joined #perl6
13:11 brrt hmm... okay
13:13 masak I want the 'Num(Cool)' syntax too. but it'll be non-trivial to get it in place, I think.
13:14 PerlJam that rant on PHP oddly leads me to somewhat of an opposite conclusion than the author.
13:14 PerlJam (not that PHP isn't braindamaged, but that this is partly what makes it successful :)
13:15 PerlJam masak: the *syntax* is easy, it's the semantics that are non-trivial :-)
13:16 jnthn Coercion types are non-trivial because they need to be first class
13:16 jnthn Which likely means CoercionHOW
13:16 jnthn And diddling how type checks are handled and stuff.
13:16 jnthn It goes deep...
13:17 masak yeah. we haven't explored how deep yet.
13:17 jnthn It mostly needs me to get some design tuits to explore it, but mostly those are tied up in other things.
13:17 masak maybe we should start by implementing it on a small scale -- for example, forbidding Role[Num(Cool)]
13:17 jnthn Like, QST
13:17 masak QAST!
13:17 masak \o/
13:17 jnthn *QAST
13:18 masak \o/
13:18 jnthn masak: Why would be forbid that? :)
13:18 jnthn s/be/we
13:18 masak jnthn: to make it easier to implement a first cut of it.
13:18 jnthn masak: Your "make it easier" sounds like "do it innevitably wrong so we have to rip out a bad implementation later".
13:18 masak but maybe it'll all be so unified that it doesn't much matter...
13:19 jnthn And given the places that it'll touch, I really, really don't fancy that approach. :)
13:19 [Coke] jnthn: ... I'm confused. doesn't that describe the last 11 years pretty well?
13:19 * [Coke] ducks.
13:19 jnthn [Coke]: :P
13:19 masak jnthn: no, I was just thinking there might be unintended consequences lurking, and we could shield ourselves from some of the corner cases by putting up limits. but feel free to ignore it if it doesn't sound like a good idea. :)
13:19 thelazydeveloper joined #perl6
13:20 [Coke] hugme: hug jnthn
13:20 * hugme hugs jnthn
13:20 [Coke] hugme: kick jnthn
13:20 PerlJam masak: seems like you'd want to find the unintended consequences right away so that you can fix the design
13:20 PerlJam (which might mean "forbid this construct" :-)
13:21 [Coke] hugme: hug hugs
13:21 * hugme hugs hugs
13:21 tadzik hugme: hug pugs
13:21 * hugme hugs pugs; tadzik++
13:21 tadzik tee-hee
13:21 * jnthn would be a little bothered if we had to forbid that case.
13:21 PerlJam in any case, finding them sooner means that we don't put in something that sort of works and then people rely on it before we find out it's really broken
13:22 jnthn Mostly because Str(Mu) is the default kash hey type
13:22 jnthn ...hash key!
13:22 jnthn .oO( wtf... )
13:22 tadzik kash, hey
13:24 masak oh? not Str(Any)?
13:24 masak so junctions won't autothread in a hash lookup?
13:25 jnthn Oh, good question...
13:25 jnthn I think postcircumfix is where the autothreading happens, though.
13:25 masak p6: my %h = foo => 0, bar => 0, baz => 1; say "OH HAI" if %h{"foo" | "bar" | "baz"}; say "!"
13:25 p6eval pugs: OUTPUT«!␤»
13:25 p6eval ..rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«OH HAI␤!␤»
13:26 masak oh, ok.
13:26 spider-mario p6: (1 .. 5)».say
13:26 p6eval pugs: OUTPUT«2␤3␤4␤5␤1␤»
13:26 p6eval ..niecza v15-6-gefda208: OUTPUT«1␤2␤3␤4␤5␤»
13:26 p6eval ..rakudo 3bd91f: OUTPUT«1␤4␤5␤3␤2␤»
13:27 brrt seriously, how does pugs come up with that?
13:28 masak it rotates it one step.
13:28 masak all of those are "correct", though. you don't get promised execution ordering with »
13:29 spider-mario p: (1 .. 10)».say
13:29 p6eval pugs: OUTPUT«1␤2␤3␤4␤5␤6␤8␤9␤10␤7␤»
13:29 spider-mario 7
13:29 spider-mario :D
13:29 spider-mario r: (1 .. 10)».say
13:29 p6eval rakudo 3bd91f: OUTPUT«2␤8␤6␤10␤5␤9␤3␤4␤1␤7␤»
13:29 arnsholt brrt: IIRC, pugs intentionally does it out of order to keep the end-user "honest"
13:29 arnsholt That is, not rely on ordered execution =)
13:29 jnthn Rakudo the same, fwiw
13:30 PerlJam pugs++ rakudo++
13:30 spider-mario rakudo really shuffles them
13:30 brrt i see
13:30 spider-mario (or does it actually do multithreading?)
13:30 [Coke] p: (1..1)».say
13:30 p6eval pugs: OUTPUT«1␤»
13:30 [Coke] #HA.
13:30 jnthn Rakudo doesn't multithread yet, no
13:31 arnsholt [Coke]: Nice one! ^_^
13:31 brrt p6: (1..1)>>.say
13:31 p6eval pugs, rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«1␤»
13:32 birdwind1pbird joined #perl6
13:35 bluescreen10 joined #perl6
13:36 fsergot joined #perl6
13:38 colomon n: (1 .. 10)».say
13:38 p6eval niecza v15-6-gefda208: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
13:40 colomon :(
13:46 [Coke] colomon: pugs is starting to catch up with niecza.
13:46 [Coke] colomon: up to 40%!
13:46 colomon pugs++
13:47 felher Hey folks: I have a segfault on my machine when doing 'echo -e "~Date.new\n" | nom' with latest nom. Is that known? (the same happens if i type it directly into the repl, fwiw)
13:47 [Coke] hey, I'm trying to troll you over here.
13:47 [Coke] nom: ~Date.new
13:47 p6eval rakudo 3bd91f: OUTPUT«Cannot unbox a type object as a native int␤  in any <anon> at src/gen/BOOTSTRAP.pm:97␤  in sub sprintf at src/gen/CORE.setting:1949␤  in method Str at src/gen/CORE.setting:9453␤  in method Stringy at src/gen/CORE.setting:674␤  in sub prefix:<~> at src/gen/CORE.sett…
13:48 * moritz doesn't get a segfault either
13:48 * felher gets a segfault in the nom repl if he types "~Date.newn^D"
13:49 felher strange :)
13:49 gfldex no segfault here on cygwin
13:51 jnthn Can one of you that segfautls possibly gdb/bt it?
13:51 moritz oh right, I get one at REPL exit too
13:51 jnthn REPL...exit?!
13:51 moritz aye
13:52 moritz in nqp_op_info_table
13:52 moritz jnthn: https://gist.github.com/2351524
13:52 [Coke] some non sixian return value?
13:53 moritz I wonder if Date.new() should the same as Date.today()
13:54 moritz or if it should die with "Which date do you want?"
13:54 jnthn That segfault is quite odd - it's not even dying in an op itself...
13:54 jnthn nom: Date.new('blind')
13:54 p6eval rakudo 3bd91f: OUTPUT«Invalid Date string; please use the format "yyyy-mm-dd"␤  in method new at src/gen/CORE.setting:9397␤  in block <anon> at /tmp/Spzu5eSx2P:1␤␤»
13:54 moritz (or just return some random date, just to mess with people a little)
13:54 jnthn aww
13:55 masak moritz: epoch date? :)
13:55 masak it's the zero of dates.
13:55 [Coke] TimToady's birthday.
13:55 masak :)
13:55 felher +1 for the random date solution :D
13:55 masak Mayan end-of-the-world date.
13:55 felher Oh, thats a good one too :)
13:56 moritz or maybe the birth year of Perl 6
13:56 masak founding of Republic of Austria.
13:56 moritz always the next Christmas :-)
13:56 brrt +1 for next christmas
13:56 flussence next christmas, unless the VM's version is >= 6.0, in which case return last christmas :)
13:57 masak "Last Christmas, I gave you Perl 6..."
13:57 jnthn "...and the very next day, you segfaulted it..."
13:58 [Coke] mmhehehe.
13:58 fsergot :D
13:58 [Coke] nice little Wham! reference.
13:59 PacoAir joined #perl6
14:00 brrt the day the bikeshed was built
14:00 gfldex n: my @a = 1..5; my @b = 'a'..'e'; my %h = @a Z=> @b;
14:01 p6eval niecza v15-6-gefda208: OUTPUT«Potential difficulties:â�¤  %h is declared but not used at /tmp/u3Ww_ItoJH line 1:â�¤------> [32mmy @a = 1..5; my @b = 'a'..'e'; my [33mâ��[31m%h = @a Z=> @b;[0mâ�¤â�¤Â»
14:01 gfldex n: my @a = 1..5; my @b = 'a'..'e'; my %h = @a Z=> @b; say %h.perl;
14:01 p6eval niecza v15-6-gefda208: OUTPUT«{"1" => "a", "2" => "b", "3" => "c", "4" => "d", "5" => "e"}.hash␤»
14:01 masak "This year, to save me from tears, I'll just pass a continuation."
14:01 gfldex should that really be "1" ?
14:01 moritz brrt: did you mean: the day the /green/ bikeshed was built? :-)
14:01 masak I heard it was blue.
14:02 NamelessTee joined #perl6
14:02 masak gfldex: hashes are Str-keyed by default.
14:02 brrt basically, it should be green
14:02 brrt i'm synesthic, e is a green letter
14:03 brrt perl is a green word
14:03 brrt its bikeshed is green
14:03 brrt (which is really stupid, really, now i think of it)
14:03 moritz brrt: how does perl6.org look and sound for a synesthic?
14:04 brrt not green enough :-p
14:04 masak like a symphony of pastel vibrations.
14:06 brrt the pastel makes it doable, really
14:06 dalek rakudo/nom: b8fdbea | moritz++ | src/core/Temporal.pm:
14:06 dalek rakudo/nom: Date.new should not die with LTA error
14:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b8fdbeaa1a
14:07 spider-mario “The functional parts of PHP are designed like C”
14:07 spider-mario procedural*?
14:07 masak I thought PHP was all procedural.
14:08 masak maybe it's "functional" as in "it works"?
14:08 spider-mario the rest of the sentence is  “but the objectional (ho ho) parts are designed like Java”
14:08 mucker joined #perl6
14:08 brrt maybe the writer isn't natively english
14:08 moritz there's a part of the world that says "functional" when they mean they write and call functions.
14:10 masak yeah, some people like to distinguish procedural and OO, and call the former "functional". mostly non-FP people :)
14:10 gfldex PHP got cloasures that don't relly work. That might be the functional part.
14:10 masak to me, distinguishing procedural and OO in the first place is a bit of a stretch... :)
14:11 moritz masak: then you haven't written nearly enough QuickBasic
14:11 havenn joined #perl6
14:11 moritz or any other language without objects and nothing-like-objects
14:11 spider-mario gfldex : C doesn’t have it.
14:11 brrt masak: try squeak
14:11 masak I have written quite enough of QuickBasic. I know what you mean, but I still think OO is a subset of procedural, not distinct from it.
14:12 gfldex spider-mario: that might be the reason why then dont work :)
14:12 spider-mario :D
14:12 masak brrt: yeah, squeak looks attractive.
14:12 moritz uhm, to me OO is an addition to procedural
14:12 masak confirm segfault on Rakudo HEAD with '~Date.new' on REPL followed by Ctrl+D.
14:12 * masak submits rakudobug
14:12 brrt the thing about OO... in theory, not in practice
14:12 spider-mario to me, it’s a parallel concept and can be applied to functional programming as well
14:12 spider-mario cf. OCaml and Scala
14:13 brrt is that you have this 'network' of objects
14:13 moritz masak: HEAD~1
14:13 brrt and pushing one object causes some kind of 'wave' of messages
14:13 brrt and that does work
14:13 brrt and that works very well, but it requires a lot of world to set up
14:13 moritz masak: b8fdbeaa avoids the segfault, but it's no real fix
14:13 brrt because many people don't do that, their networks are simple
14:13 spider-mario oh, it reminds me of that saying that Erlang has great support for OOP. :d
14:14 spider-mario it’s kind of true.
14:14 brrt and then, it really is procedural
14:14 masak moritz: ok, that goes in the ticket as well.
14:14 masak moritz: do you know a way to cause the segfault after that commit went in?
14:14 spider-mario erlang’s por
14:14 spider-mario oops
14:14 spider-mario erlang’s processes can be seen as objects
14:15 moritz #
14:15 masak brrt: I think I have never worked in an OO project that does that idealized network thing.
14:15 * brrt neither
14:15 spider-mario erlang projects do
14:15 spider-mario :D
14:15 masak brrt: it tends to be just a little bit of runtype polymorphism here and there.
14:15 moritz masak: no :/
14:15 moritz except by reverting it
14:15 masak moritz: any guess at the underlying cause?
14:15 moritz "programming error"
14:16 brrt masak: i know :-)
14:16 brrt especially in scripting / web development, where big-world-setup is inpractical
14:17 masak the most interesting thing I heard about last year was CQRS. it wraps some ordinary things inside-out in an interesting way.
14:18 tadzik moritz: ooc, why 24-12 for Date.new()?
14:19 masak tadzik: that's Christmas in Germany.
14:19 masak tadzik: also, I've never seen that date format.
14:19 masak dd-MM
14:19 masak is it a Polish thing?
14:20 tadzik I don't think it's a format of any sort, but it's precisly the information I wanted to pass :)
14:20 moritz tadzik: feel free to change to the 25th if that is more christmassy to you
14:20 tadzik :) 24 is fine
14:20 masak tadzik: I found ISO 8601, and I never looked back. 2012-12-24.
14:21 masak to me, 25th is Christmas in the US and the UK, and 24th is Christmas in Sweden.
14:22 spider-mario I don’t understand the need for the special case
14:22 brrt 25th (and 26th) in the netherlands, although the 'church event' - the 'kerst mis' is on the 24th
14:22 spider-mario if I call it on 2012/12/26, I get a Date that represents 2013/12/24?
14:23 spider-mario why?
14:23 spider-mario oh, ok
14:23 spider-mario sorry.
14:23 masak spider-mario: "next Christmas"
14:23 spider-mario I just got it. :D
14:24 brrt also, cqrs is interesting
14:24 spider-mario I’m wondering whether I should rebuild rakudo just to get that constructor.
14:25 spider-mario my current rakudo is HEAD^
14:25 spider-mario (on nom)
14:30 bluescreen10 joined #perl6
14:30 masak I'd be thankful if someone could extract Date from src/core of HEAD~1, reproduce the error, and golf it down to something minimal.
14:30 masak my bet is it involves native attributes somehow.
14:30 fsergot r: my Str $s; $s.chars;
14:30 p6eval rakudo 3bd91f: OUTPUT«use of uninitialized value of type Str in string context␤»
14:30 fsergot It should print line number, shouldn't it?
14:30 masak this is your chance to catch a segfault!
14:31 tyatpi_ joined #perl6
14:31 fsergot ;:)
14:31 Trashlord joined #perl6
14:31 spider-mario masak : http://paste.pocoo.org/show/zOfIYY9ZjS5rN1ITYTVm/
14:32 sw joined #perl6
14:32 tadzik fsergot: I wish it would, yeah
14:33 masak spider-mario: yes, and that's now https://rt.perl.org/rt3/Tic​ket/Display.html?id=112376
14:33 fsergot perl6 test.p6
14:33 fsergot use of uninitialized value of type Str in string context
14:33 fsergot 0
14:33 fsergot tadzik: it doesn't. :)
14:34 masak spider-mario: but... what is it in the Date class that causes the segfault?
14:34 tadzik yeah, I know. I have few of those warnings in Panda and I wasn't able to track them down
14:34 spider-mario oh
14:34 fsergot tadzik: is there any possibility to change this? :)
14:35 tadzik of course there is. Turing completeness, parallel universes and all this :P
14:35 tadzik frankly, I don't know
14:36 tadzik it seems to come from Mu.pm, which uses warn()
14:36 tadzik I don't see why warn() would not print a line number
14:36 tadzik r: warn "foobar"
14:36 p6eval rakudo 3bd91f: OUTPUT«foobar␤»
14:36 tadzik gah
14:37 masak arguably it should.
14:37 masak if you just want to print to $*STRERR, use 'note'.
14:37 tadzik sure
14:38 tadzik but I think precisely about the "use of uninitialized value" warning
14:39 fsergot Can I find somewhere the list of all built-in variables? :)
14:41 jnthn Note it's $*ERR
14:41 jnthn fsergot: iirc S28
14:41 masak oh right.
14:42 fsergot jnthn++ thanks
14:49 fsergot Maybe in this error message variable name should be printed? It'll let us track line down easier? :)
14:49 fsergot Or this is a bad idea? :)
14:49 fsergot is this*
14:50 tadzik I think it does that for some variables
14:50 fsergot It does it only if we use uninitialized variable, not value.
14:51 fsergot Or i'm wrong? :)
14:51 tadzik well, that's expected :)
14:51 tadzik see https://github.com/rakudo/rakud​o/blob/nom/src/core/Mu.pm#L137
14:51 tadzik it depends on nqp::iscont()
14:51 fsergot I see. :)
14:52 tadzik ...whatever it is
14:52 jnthn nom: my $a; say $a
14:52 p6eval rakudo 3bd91f: OUTPUT«Any()␤»
14:52 jnthn nom: my $a; say +$a
14:52 p6eval rakudo 3bd91f: OUTPUT«use of uninitialized variable $a of type Any in numeric context␤0␤»
14:52 masak niecza: warn "foo"
14:52 p6eval niecza v15-6-gefda208: OUTPUT«foo␤  at /home/p6eval/niecza/lib/CORE.setting line 1226 (warn @ 3) ␤  at /tmp/pzJMHodAjo line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3843 (module-CORE @ 65) ␤  at /hom…
14:53 fsergot I thought We can add printing variable name in value context too.
14:53 tadzik why doesn't warn print a line number anyway>
14:54 brrt left #perl6
14:55 sisar joined #perl6
14:57 brrt joined #perl6
14:59 thou joined #perl6
15:01 moritz because nobody has implemented it
15:01 poladark left #perl6
15:01 masak because the source code doesn't say to print a line number.
15:02 tadzik :)
15:03 tadzik I thought there's maybe a specced reason
15:06 masak nope. S32/Basics talks about warn, but not how its output is supposed to look.
15:07 tadzik I see
15:08 REPLeffect joined #perl6
15:10 tadzik r: https://gist.github.com/2352043
15:10 p6eval rakudo 3bd91f: OUTPUT«foobar at line 5␤»
15:11 moritz yes, but that's the wrong approach
15:11 moritz it's rather that the code that catches the exception should introspect the backtrace
15:12 tadzik probably, yes
15:13 tadzik what catches warns?
15:16 moritz good question
15:17 moritz r: return
15:17 p6eval rakudo 3bd91f: OUTPUT«Attempt to return outside of any Routine␤  in block <anon> at src/gen/CORE.setting:340␤  in block <anon> at /tmp/FBoK_sKATj:1␤␤»
15:17 jnthn It's configured in Exceptions.pm iirc
15:17 moritz probably sub print_control
15:18 tadzik yeah
15:18 tadzik Exception.pm#102
15:19 * tadzik is testing a patch
15:20 moritz fwiw the "proper" approach is to reuse method nice() from class Backtrace
15:20 moritz needs a wee bit of refactoring, but I can do that
15:21 moritz and then simply take the first line for warnings, and all lines for errors
15:21 pomysl joined #perl6
15:21 pomysl joined #perl6
15:22 tadzik want to do it?
15:24 dalek rakudo/nom: 32c674e | moritz++ | src/core/Backtrace.pm:
15:24 dalek rakudo/nom: Backtrace.nice can now produce single lines
15:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/32c674ee46
15:25 moritz tadzik: you can now use .nice(:oneline) to get the line to append to the warning
15:25 tadzik I shall, thanks moritz++
15:27 moritz r: sub f() { }; say &f.get_namespace.get_name
15:27 p6eval rakudo 3bd91f: OUTPUT«Method 'get_namespace' not found for invocant of class 'Sub'␤  in block <anon> at /tmp/J7A_vQcVxZ:1␤␤»
15:33 moritz jnthn: the .get_namespace thing on the parrot subs that Perl 6 Code objects wrap just gives 'perl6'
15:33 jnthn sure
15:33 moritz jnthn: is there any way to get the Perl 6 level package name (for backtraces)?
15:33 jnthn we dont' use Parrot nanespaces
15:34 jnthn moritz: Not without storing it in the code objects.
15:34 jnthn Which is doable.
15:35 jnthn And easy. Edit BOOTSTRAP.pm and add an extra field at the end of Routine
15:35 jnthn Then in create_code_object if it's a Routine (already a conditonal for that in there somewhere) then nqp::bindattr that field to $*PACKAGE
15:35 jnthn Then a method in Routine to introspect it
15:35 moritz sounds really doable :-)
15:36 jnthn It should be easy. :)
15:36 jnthn s/field/attribute/ # in .Net terminology mode today due to teaching :)
15:36 moritz it's OK, I understood you :-)
15:36 havenn joined #perl6
15:37 * moritz isn't quite monoglot
15:38 jnthn Well, the mistake is worse in the opposite direction
15:38 moritz what's an attribute in .Net?
15:38 jnthn (The term "attribute" means something very different in .Net, and I've confused people terribly.)
15:38 jnthn It's compile-time meta-data added to a declaration of soem kind.
15:39 jnthn Think traits, but less powerful :)
15:39 moritz :-)
15:39 masak those are called "annotations" in most languages, I think.
15:41 moritz r: { ... }
15:41 p6eval rakudo 3bd91f:  ( no output )
15:42 jnthn masak: In Java and...which other ones? :)
15:43 moritz jnthn: I don't see a fleg that tells us if something is a routine
15:43 moritz just $is_dispatcher
15:43 jnthn moritz: no no, it's not a flag, ti's the type
15:44 jnthn moritz: I think an if block in create_code_object looks for it.
15:44 moritz jnthn: how do I type-check this early in the bootstrap? .HOW.isa ?
15:45 jnthn if nqp::istype($code, $routine_type) {
15:45 jnthn lien 718
15:45 moritz ah, ok
15:45 moritz thanks
15:45 jnthn sorry, I forgot create_code_object was broken out into parts now
15:46 moritz not a problem
15:46 moritz I figured it must have been the bigger one :-)
15:47 jnthn Well, maybe a problem with my memory given I only did the refactor within the last month or so :)
15:47 moritz Argentinia might have flushed a few buffers :-9
15:47 Psyche^ joined #perl6
15:50 tyatpi_ joined #perl6
15:52 vlixes joined #perl6
15:54 timotimo can i refer to a classes "things" with the :: syntax somehow?
15:55 masak you mean "Foo" and "Bar" in Foo::Bar?
15:56 TimToady only if you need indirect lookup of the name, then you can use ::(), but otherwise stuff is in the metaobject
15:56 TimToady unless explicitly declared 'our'
15:56 masak ah, I misunderstood the question. TimToady++
15:56 TimToady so I agree with masak++, what are you really asking?
15:56 moritz $ ./perl6 -e 'class A { sub f { }; say &f.package} '
15:56 moritz A()
15:56 timotimo OK. i'm reading an article about php weirdnesses and one thing he mentions is that he knows of no language that has ClassName::something for static access
15:56 moritz \o/
15:56 * PerlJam thought he was asking about attributes
15:56 timotimo i thought maybe perl6 has something vaguely similar
15:57 masak yes, it turns out A::foo is only visible if the sub foo in A was given 'our' scoping.
15:57 moritz timotimo: well, both Perl 5 and Perl 6 have $ClassName::OurVariable
15:57 moritz which is somewhat similar, I assume
15:57 masak r: class A { our &x }; A::x = 42; say A::x
15:57 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix = instead at line 1, near " 42; say A"␤»
15:57 masak r: class A { our $x }; A::x = 42; say A::x
15:57 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix = instead at line 1, near " 42; say A"␤»
15:57 TimToady but then, technically, we wouldn't say the sub is in the class, but in the classs's package
15:58 moritz masak: A::x is a listop
15:58 masak oh, of course.
15:58 masak r: class A { our $x }; $A::x = 42; say $A::x
15:58 p6eval rakudo 3bd91f: OUTPUT«42␤»
15:58 masak \o/
15:58 TimToady classes can have subs, but then they're called methods
15:58 masak what? no.
15:59 timotimo "Object attributes are $obj->foo, but class attributes are $obj::foo. I’m not aware of another language that does this or how it’s useful." - so it's like "our" variables in perl5 and 6?
15:59 masak classes can have subs, but then the classes are acting more like packages than like classes :)
15:59 jnthn The class doesn't really "have it" either, if you mean the meta-object :)
15:59 TimToady you are talking about the syntax, I'm talking about the semantics
15:59 masak r: class A { our sub foo { say "OH HAI" }; method foo { say "OH HAI again!" } }; A::foo; A.new.foo
15:59 p6eval rakudo 3bd91f: OUTPUT«OH HAI␤OH HAI again!␤»
15:59 masak TimToady: no, I'm talking about what hook the sub hangs itself on.
16:00 masak the A::foo thing is because classes are packages, and packages share their 'our'-y things.
16:00 TimToady well, that's what I said, it's in the class's package, not the class
16:01 TimToady the class's package isn't part of the class, from an OO point of view
16:01 masak ok. it sounded like you were saying that whenever a class has a sub, that's a method, which is wildly wrong.
16:01 TimToady I'm using the metaobject as the boundary of the actual class here
16:01 TimToady and when you poke a sub into it, it's a method
16:01 masak but yeah, the class's "class" aspect can't have subs in that sense, I guess. only the class's "package" aspect can.
16:01 masak and if you don't 'our' the sub, it's the class's "block" aspect that gets the sub :)
16:02 TimToady methods are just subs that are "mislocated" from some other scope into the metaobject
16:02 * jnthn -> hotel, bbl
16:02 tadzik hm, Backtrace.new($ex) segfaults Rakudo for some reason
16:02 PerlJam masak: is that aspect oriented programming?  ;)
16:03 masak PerlJam: more like role deconstruction of OO in Perl 6 ;)
16:03 Ingis joined #perl6
16:05 * masak => grocery_store => home
16:07 Ting_ joined #perl6
16:07 Ting_ ls
16:07 Ting_ ls
16:07 sjohnson ls -l
16:07 Ting_ ls -lh
16:07 PerlJam total 0
16:08 tadzik :P
16:09 Ting_ left #perl6
16:10 tadzik clearly he didn't find what he was looking for
16:12 dalek rakudo/nom: edfd0f2 | moritz++ | src/Perl6/World.pm:
16:12 dalek rakudo/nom: [World] avoid a lookup for which we already have a variable
16:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/edfd0f216f
16:12 dalek rakudo/nom: 8144a04 | moritz++ | src/ (3 files):
16:12 dalek rakudo/nom: implement Routine.package
16:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8144a04637
16:13 TimToady moritz: under the OKness proposal, http://irclog.perlgeek.de/​perl6/2012-04-10#i_5421023 would return something like OK[list], which would not rerun the .ACCEPTS since the OK bit is already considered success; ironing out smartmatching is the main point of that proposal, but people keep getting distracted by the less important bits of the proposal
16:14 plobsing joined #perl6
16:15 tadzik https://gist.github.com/2352529 makes rakudo segfault, if anyone wants to take a look
16:16 moritz tadzik: probably related to $ex being a parrot exception, not a Perl 6 type
16:16 tadzik oh, must be, yes
16:16 moritz tadzik: try EXCEPTION($ex) instead
16:16 tadzik yeah, everything uses nqp::atkey
16:17 * tadzik tries
16:17 moritz or even more efficient
16:17 spider-mario moritz: since $rtype is just an alias for $routine_type and is only used in the line below its definition, we might as well get rid of it, might we not?
16:17 spider-mario (or am I missing something?)
16:18 moritz Bactrace.new($ex.backtrace, 2)
16:18 spider-mario (I’m talking about https://github.com/rakudo/rakudo/commit/edfd0f216f )
16:18 envi_ joined #perl6
16:18 tadzik well, this way we miss the whole point of reusing nice(), no?
16:19 moritz or maybe Bactrace.new($ex.backtrace, 0).nice
16:19 moritz or maybe Bactrace.new($ex.backtrace, 0).nice(:oneline)
16:19 moritz thing is, if you wrap the parrot exception in an Exception, then the first thing that Backtrace.new does is unwrap it to get at its .backtrace
16:20 tadzik right
16:20 moritz spider-mario: you're right
16:20 nwc10 left #perl6
16:20 moritz hey, people actually read my patches.
16:21 moritz that's both awesome and scary :-)
16:21 spider-mario :D
16:21 dalek rakudo/nom: 72e8fe8 | moritz++ | src/Perl6/World.pm:
16:21 dalek rakudo/nom: [World] further cleanup by spider-mario++
16:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/72e8fe8c0f
16:23 jaffa4 joined #perl6
16:27 envi_ joined #perl6
16:38 havenn joined #perl6
16:43 envi_ joined #perl6
16:55 xinming joined #perl6
16:57 moritz $ ./perl6 -e 'sub f() { warn "foo" }; f'
16:57 moritz foo  in sub f at -e:1
16:58 s1n joined #perl6
16:59 * masak home
17:00 moritz $ ./perl6 -e 'sub f() { +Any }; f'
17:00 sftp joined #perl6
17:00 moritz use of uninitialized value of type Any in numeric context  in method Numeric at src/gen/CORE.setting:650
17:00 moritz these are not the line numbers you are looking for :/
17:03 jaffa4 what is perl6?
17:03 TimToady perl6 is what.
17:04 jaffa4 WHat is executed under the hood of perl6?
17:04 moritz rakudo
17:04 jaffa4 perl6:say <1 2 3>
17:04 PerlJam niecza
17:04 moritz pugs
17:04 jaffa4 perl6: say <1 2 3>
17:04 p6eval pugs: OUTPUT«123␤»
17:04 p6eval ..rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«1 2 3␤»
17:05 jaffa4 all of them
17:05 TimToady but not when someone sez: $ ./perl6 -e ...
17:05 TimToady which is why moritz++ said rakudo
17:05 PacoAir joined #perl6
17:06 * benabik ponders installing a perl6 script that calls all three.
17:06 TimToady of course, ./perl6 depends on which directory you're in
17:06 masak jaffa4: if you look far enough down, it's all just electrons in circuits executing. but that can't be what you're asking. what is your question -- I mean, what kind of answer do you expect to get?
17:06 jaffa4 that answer you happened to give, taht kind of answer.
17:07 benabik Rakudo is the only project that I know being arrogant enough of building an executable simply named perl6.  ;-)
17:07 fsergot joined #perl6
17:07 PerlJam benabik: hubris is one of the 3 virtues
17:07 TimToady well, Perl builds one called "perl"  :)
17:07 masak jaffa4: much of Rakudo and Niecza runs Perl 6 under the hood.
17:08 TimToady but I guess it's not arrogant enough to build one called "perl6" either...
17:08 moritz benabik: not arrogance; hysterical raisins
17:08 TimToady Rakudo and Niecza runs much of Perl 6 under the hood.
17:08 benabik moritz: Stupid raisins.  Have to pick them out of food all the time, now they're in my compilers?  ;-)
17:08 PerlJam .oO( Where is this "hood" anyway? )
17:09 masak I don't get the hangup people have with the name of the 'perl6' executable. there are several implementations of Ruby. at least one has an executable called 'ruby'. people expect this.
17:09 masak benabik: well, they *are* hysterical, so no wonder they get in everywhere.
17:09 TimToady I think when there are multiple of a particular program in your path, it should just pick one randomly and run it
17:10 masak PerlJam: the "hood" is the part of the executable that keeps memory from leaking out into the rest of the system.
17:10 masak it's a technical term.
17:10 TimToady I thought that was the bonnet...
17:10 masak no, the bonnet keeps away the bees.
17:10 moritz which botnet?
17:11 TimToady otnet, oviously
17:12 moritz
17:12 moritz mm
17:17 masak http://twitter.com/sixthformp​oet/status/189744050331586562 -- autopun, or just regular pun? or both?
17:17 s1n joined #perl6
17:17 PerlJam heh
17:17 * jnthn v hotele :)
17:18 pmichaud commit b8fdbea (Date.new) is cute :)
17:18 jnthn pmichaud! \o/
17:18 masak this one definitely is an autopun, though: http://twitter.com/sixthformp​oet/status/187923128033349634
17:18 pmichaud good afternoon, #perl6
17:25 * pmichaud reads backscroll
17:26 pmichaud (php language rant): I read all of that and the author doesn't really have a conclusion? Sheesh.
17:27 Chillance joined #perl6
17:28 fsergot joined #perl6
17:34 jnthn .oO( was pmichaud's comment a meta-rant? )
17:35 pmichaud Yes.
17:38 pmichaud I wonder if Backtrace.nice(:$oneline)  should instead have an argument indicating the number of lines wanted
17:39 pmichaud instead of choosing between "1" and "all"
17:41 s1n joined #perl6
17:42 jnthn I can imagine cases where something could only want the first n lines.
17:45 PerlJam making a parameter for the number of lines is less special-casey and results in a net increase in functionality
17:46 mucker TimToady: Curious doubt. Allowing ' as a legal character in a variable name, was that a linguistic decission ? -- $foo's_bar indicating possesion
17:46 sisar joined #perl6
17:47 pmichaud mucker: also things like $L'Hopital
17:47 mucker :)
17:47 pmichaud or even   $L'Hôpital
17:48 daxim well, isn::t that cute…
17:49 PerlJam mucker: the answer to your question is definitely "yes"  :)
17:49 spider-mario btw (regarding the “perl6” executable name),
17:49 spider-mario S01 says that Perl 6 code should include a v6 header,
17:49 spider-mario what is the preferred one?
17:49 spider-mario I use #!/usr/bin/env perl6
17:49 spider-mario currently.
17:50 pmichaud "use v6;"  is the canonical one, I think.
17:50 spider-mario ok, thanks.
17:50 brrt joined #perl6
17:51 spider-mario it does have the advantage of producing a useful error message in perl 5.
17:53 TimToady mucker: yes, it was primarily a decision from traditional word-based orthography
17:53 PerlJam at least until someone breaks it with a v6 module on CPAN
17:54 mucker TimToady: love that feature. I find my self using lots of variables names implying possession of some sort.
17:54 TimToady unfortunately it won't allaw things like 'twas
17:54 TimToady *allow
17:54 lichtkind joined #perl6
17:55 TimToady or Charles'
17:55 TimToady but then, I always write Charles's anyway
17:56 * TimToady wonders if there are any 0-width letters in Unicode...
17:56 spider-mario ·
17:56 spider-mario oops
17:56 spider-mario
17:56 spider-mario ah, letter?
17:57 PerlJam my $_'twas-the-night-before-Christmas;   _ is almost invisible sometimes
17:57 spider-mario (I’m not sure “ ” is actually supposed to have a null width but it does on my machine)
17:57 jnthn .u
17:57 phenny U+202F NARROW NO-BREAK SPACE ( )
17:58 spider-mario we french-speaking people call it « espace insécable fine »
17:58 envi_ joined #perl6
17:59 TimToady perl6: my $ʹtwas = 'the night before Christmas'; say $ʹtwas
17:59 p6eval pugs, rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«the night before Christmas␤»
17:59 PerlJam well then
17:59 TimToady perl6: constant ʹtwas = 42; say ʹtwas
17:59 p6eval pugs: OUTPUT«*** ␤    Unexpected "="␤    expecting ":" or "("␤    at /tmp/zQ9wrugMqh line 1, column 16␤»
17:59 p6eval ..rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«42␤»
18:01 s1n joined #perl6
18:01 mucker The spec says atleast one alphabet must be preceding ' :) http://perlcabal.org/syn/S0​2.html#Apostrophe_separator
18:02 TimToady yes, but I wasn't using ', but ʹ
18:02 TimToady .u ʹ
18:02 phenny U+02B9 MODIFIER LETTER PRIME (ʹ)
18:02 spider-mario .u ’
18:02 phenny U+2019 RIGHT SINGLE QUOTATION MARK (’)
18:02 TimToady which is officially a letter
18:02 spider-mario r: constant ’ = 42; say ’
18:02 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Missing initializer on constant declaration␤at /tmp/C3EJ1bsyeF:1␤»
18:02 spider-mario r: constant ’x = 42; say ’x
18:02 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Missing initializer on constant declaration␤at /tmp/LxlR5r1QiZ:1␤»
18:02 mucker oo .. okay
18:03 TimToady r: constant ʹ = 42; say ʹ
18:03 p6eval rakudo 3bd91f: OUTPUT«42␤»
18:03 TimToady n: my \ʹ = 42; say ʹ
18:03 p6eval niecza v15-6-gefda208: OUTPUT«42␤»
18:03 TimToady r: my \ʹ = 42; say ʹ
18:03 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Malformed my␤at /tmp/uJSI_Smad9:1␤»
18:04 TimToady r: my \a = 42; say a
18:04 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Malformed my␤at /tmp/rC2cylvC8G:1␤»
18:04 jnthn Ah, i still need to add that syntax.
18:04 TimToady r: my (\a) = 42; say a
18:04 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Malformed parameter␤at /tmp/vka_kHZy2x:1␤»
18:04 jnthn ETOOMUCHTODO
18:04 pmichaud TimToady++ seems to use it often :)
18:05 TimToady I want a story for people who have an irrational dislike for sigils
18:05 vlixes left #perl6
18:05 pmichaud TimToady: you mean a story other than "Your dislike of sigils is irrational?"  ;-)
18:05 TimToady a TMTOWTDIish story
18:06 PerlJam the story seems to be "your dislike of sigils is well-founded" so far  ;)
18:06 pmichaud r: say <$ @ % &> ~~ Rational
18:06 p6eval rakudo 3bd91f: OUTPUT«False␤»
18:06 spider-mario :D
18:06 pmichaud r: say <$ @ % &>.any ~~ Rational
18:06 p6eval rakudo 3bd91f: OUTPUT«False␤»
18:07 TimToady though the function in http://rosettacode.org/wiki​/Runge-Kutta_method#Perl_6 reads rather nicely with the sigilless forms
18:08 * mikemol discovers he doesn't have whatever font is necessary for 𝛿
18:10 TimToady .u 1D6FF
18:10 phenny TimToady: Sorry, no results for '1D6FF'.
18:11 TimToady .u U+1D6FF
18:11 phenny TimToady: Sorry, no results
18:11 TimToady hmm
18:11 daxim http://www.fileformat.info/info/u​nicode/char/1d6ff/fontsupport.htm
18:12 daxim out of that list, I recommend the Code200x tribe of fonts.
18:12 TimToady well, firefox seems to get it fine on my machine
18:12 birdwindupbird joined #perl6
18:13 TimToady part of the reason that function works well though is that the italic delta functions visually as a mock sigil
18:13 TimToady which is kind of how mathematicians use them
18:17 TimToady n: my \dy₃ = 42;
18:17 p6eval niecza v15-6-gefda208: OUTPUT«[31m===[0mSORRY![31m===[0m��Term definition requires an initializer at /tmp/lERpq5rHLH line 1:�------> [32mmy \dy[33m�[31m₃ = 42;[0m��Confused at /tmp/lERpq5rHLH line 1:�------> [32mmy \dy[33m�[31m₃ = 42;[0m��Parse failed��»…
18:17 TimToady but I couldn't get it to work with subscripts, for some reason that is probably my own fault...
18:18 mikemol FWIW, my setup atm is Chrome on Win7.
18:19 TimToady n: say so '₃' ~~ /\w/
18:19 p6eval niecza v15-6-gefda208: OUTPUT«False␤»
18:19 TimToady that's the problem
18:20 TimToady eval: say 'troo' if '₃' =~ /\w/
18:20 buubot_backup TimToady: ERROR: syntax error at (eval 20) line 1, near "say 'troo'"
18:20 TimToady eval: print 'troo' if '₃' =~ /\w/
18:20 buubot_backup TimToady: No output.
18:21 envi_ joined #perl6
18:21 TimToady hmm
18:21 TimToady eval: use utf8; print 'troo' if '₃' =~ /\w/
18:21 buubot_backup TimToady: No output.
18:21 TimToady eval: use utf8; print 'troo' if '₃' =~ /\w/u
18:21 buubot_backup TimToady: No output.
18:21 lichtkind TimToady: i just dont know how to describe $*COMPILING and $*DEBUGGING
18:22 * PerlJam would have thought subscripts would be used with some combining sequence to "attach" them to letters and thus they'd match w
18:22 TimToady those are placeholders for Perl 5 varialbes, and we probably have no idea what they actually do in Perl 6
18:22 TimToady funny, subscript three matches \w in my local p5
18:23 TimToady eval: use utf8; print ord '₃'
18:23 buubot_backup TimToady: 83231
18:28 TimToady well, if they've gone and redefined superscripts and subscripts, maybe we should consider whether they should be allowed specially at the ends of identifiers
18:29 lichtkind allright so i dont add them in the index
18:29 TimToady (perhaps along with the real prime character, not the fake modifier letter)
18:30 TimToady .u ′″‴⁗
18:30 phenny TimToady: U+2032 U+2033 U+2034 U+2057
18:30 sorear good * #perl6
18:30 TimToady howdy doody
18:32 * TimToady still thinks it's a bit odd that super/subscript chars can't match w though
18:34 TimToady now someone else should point out that y₁ should mean y[0], and someone else should point out that y₀ should mean that...
18:36 pernatiy joined #perl6
18:38 au neither ⑦ nor ⒎ nor ㍟ match \w, either... seems a character is only considered a digit when it's denoting a number.
18:39 spider-mario r: '⑦' ~~ /\d/
18:39 p6eval rakudo 3bd91f:  ( no output )
18:39 spider-mario r: say '⑦' ~~ /\d/
18:39 p6eval rakudo 3bd91f: OUTPUT«#<failed match>␤»
18:40 lichtkind joined #perl6
18:40 spider-mario r: '⑦'.perl.say
18:40 p6eval rakudo 3bd91f: OUTPUT«"⑦"␤»
18:40 sorear .u ⑦
18:40 phenny U+2466 CIRCLED DIGIT SEVEN (⑦)
18:40 sorear .u ₁₀
18:40 phenny U+2081 SUBSCRIPT ONE (₁)
18:40 phenny U+2080 SUBSCRIPT ZERO (₀)
18:40 spider-mario r: '⑦'.comb.perl.say
18:40 p6eval rakudo 3bd91f: OUTPUT«("⑦",).list␤»
18:40 spider-mario good. :)
18:41 spider-mario r: '⑦'.chars.say
18:41 p6eval rakudo 3bd91f: OUTPUT«1␤»
18:41 sorear au!! long time no see
18:42 au indeed! how's things?
18:45 masak au! \o/
18:45 sorear au: ok
18:45 au /o
18:46 sorear au: lack of tuits, though :|
18:46 envi_ joined #perl6
18:46 au *nod*
18:48 au . o O ( The good thing about reinventing tuits is that you can get a round one )
19:02 s1n joined #perl6
19:02 prammer anyone interested in presenting at strange loop?  https://thestrangeloop.com/sessi​ons-page/call-for-presentations
19:06 pmichaud I'm always interested in presenting.  :)
19:09 prammer I'd love to see more perl (5 or 6) at strange loop.  I'm biased though since St. Louis is local for me.
19:09 mucker left #perl6
19:09 pmichaud I think I'll submit a talk.
19:09 pmichaud Not sure what I'll talk about yet -- but I'll look at last year's program and figure out something useful
19:10 pmichaud Perhaps a talk about Perl 6 examples from rosettacode.org
19:10 prammer Anything perl 6 related I suspect would be a good fit.
19:10 pmichaud looks like the conference is code-heavy
19:11 mikemol I'll put together an updated local mirror copy for whoever needs it.
19:11 * mikemol is getting used to that.
19:11 pmichaud mikemol++
19:11 prammer Yes.  A lot of JVM languages, typically.
19:11 prammer Matt Follett gave a Perl 6 talk, in 2010 iirc
19:12 * brrt wonders whether he is the only person who doesn't like jquery
19:12 mikemol brrt: No. But my reasons aren't syntactic or semantic.
19:13 brrt interesting conference though
19:13 masak brrt: well, the thing about jQuery is that it shouldn't have been necessary. JavaScript's role has changed a lot over the years.
19:14 plobsing joined #perl6
19:14 brrt .. i guess. i just see such messes made with jquery
19:19 mikemol I don't care for it, because I once frequented a Wordpress-based blog that required over forty page requests to load, and at least six of them were different versions of jQuery...
19:19 masak r: macro redirect($code) { quasi { sub say(*@args) { say "Something else" }; {{{$code}}}(); } }; redirect { say "Hello world"; } # no, {{{}}} is not implemented yet. just gonna try and golf this NPMCA...
19:19 p6eval rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str()␤  in block <anon> at /tmp/Mce8a2QGgP:1␤␤»
19:19 mikemol It's like a static-linking problem with symbol collisions.
19:20 masak r: macro r($c) { quasi { sub say(*@) {}; {{{$c}}}(); } }; r { say "!" }
19:20 p6eval rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str()␤  in block <anon> at /tmp/fWt3K5gDaR:1␤␤»
19:20 masak r: macro r($c) { quasi { sub say(*@) {}; {{{$c}}}(); } }; r 42
19:20 p6eval rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str()␤  in block <anon> at /tmp/uaXbPAiZLP:1␤␤»
19:20 masak r: macro r($c) { quasi { sub say(*@) {}; {$c}(); } }; r 42
19:20 p6eval rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str()␤  in block <anon> at /tmp/5p668VUDIs:1␤␤»
19:20 masak r: macro r($c) { quasi { sub say(*@) {}; {}(); } }; r 42
19:21 p6eval rakudo 3bd91f: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Hash'␤  in <anon> at src/gen/BOOTSTRAP.pm:812␤  in any <anon> at src/gen/BOOTSTRAP.pm:808␤  in <anon> at /tmp/AGNxfdDvIJ:1␤  in block <anon> at /tmp/AGNxfdDvIJ:1␤␤»
19:21 masak r: macro r($c) { quasi { sub say(*@) {}; {;}(); } }; r 42
19:21 p6eval rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str()␤  in block <anon> at /tmp/QoErNGV9SU:1␤␤»
19:21 masak r: macro r { quasi { {;}() } }; r
19:21 p6eval rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str()␤  in block <anon> at /tmp/SC_GjpL3kR:1␤␤»
19:21 masak r: macro r { quasi { Nil } }; r
19:21 p6eval rakudo 3bd91f:  ( no output )
19:21 lichtkind TimToady: was it right to delet $*ARCH and should i add $*XKERNEL?
19:21 masak inneresting.
19:21 masak r: say {;}()
19:21 p6eval rakudo 3bd91f: OUTPUT«Nil␤»
19:21 masak r: say Nil.WHICH; say Nil.WHICH
19:21 p6eval rakudo 3bd91f: OUTPUT«Nil␤Nil␤»
19:22 masak r: say {;}().WHICH; say Nil.WHICH
19:22 p6eval rakudo 3bd91f: OUTPUT«Nil␤Nil␤»
19:31 lichtkind jnthn: i have real problems
19:31 lichtkind even if adding simple things i got runtime hackles
19:35 masak lichtkind: what did you write, what result did you get, and what were your expectations?
19:35 masak be precise.
19:35 lichtkind i just added my $KERNEL = 4; and i get runtime error evenif my program is ";"
19:36 masak added... to what?
19:37 masak anyone else seeing the 12th test (which is TODO'd) in t/spec/S32-list/uniq.rakudo pass?
19:44 dalek roast: 110d111 | masak++ | S06-macros/macros-d1.t:
19:44 dalek roast: [S06-macros/macros-d1.t] added Null PMC access test
19:44 dalek roast:
19:44 dalek roast: discovered by samlh++
19:44 dalek roast: review: https://github.com/perl6/roast/commit/110d111beb
19:45 brrt left #perl6
19:49 [Coke] brrt: I love jquery. but I'm comparing my love to raw javascript.
19:49 [Coke] (messes with jquery) ... that sound slike the common argument against p5. ;)
19:50 [Coke] r: my $KERNEL = 4;
19:50 p6eval rakudo 3bd91f:  ( no output )
19:50 [Coke] nope, WMF.
19:50 [Coke] er, WFM.
19:52 tadzik masak: yes
19:53 masak so, it turns out the condition in https://github.com/rakudo/rakudo/b​lob/nom/src/Perl6/Actions.pm#L3080 is never true.
19:54 masak it looks reasonable. any idea why it doesn't work as advertized?
19:54 [Coke] that is a very long file
19:55 [Coke] are you sure that $nil_class is actually finding that symbol?
19:55 masak no.
19:56 masak not sure that's the proper check either.
19:58 pmichaud does find_symbol find any currently in-scope symbol, or only those that are in the bootstrap?
20:00 pmichaud I'm guessing it finds any currently in-scope symbol
20:00 masak hm, sometimes it's :scope('lexical') and sometimes :scope('lexical_6model')
20:01 PerlJam What's $*W ?
20:01 masak the world.
20:01 pmichaud I'm guessing it's "world" or somesuch
20:01 PerlJam ah
20:01 [Coke] .u 20DD
20:01 phenny U+20DD COMBINING ENCLOSING CIRCLE (⃝)
20:01 flussence .oO( doesn't look all that enclosing to me... )
20:01 pmichaud looks like the circles that I find in the windmills of my.... encoding
20:01 [Coke] enofont?
20:02 pmichaud I see the circle okay in my font, but it's offset to the left of the parens
20:02 * [Coke] was trying to figure out how to get a unicode checkmark in a combining circle.
20:02 [Coke] I see, basically: []()
20:02 flussence .u 2713 20dd
20:02 phenny flussence: Sorry, no results for '2713 20dd'.
20:02 flussence bah
20:02 flussence r: say "\x[2713]\x[20dd]"
20:02 p6eval rakudo 3bd91f: OUTPUT«✓⃝␤»
20:02 flussence :/
20:02 flussence it's enclosing the wrong thing...
20:03 * flussence decides urxvt just sucks at unicode
20:03 tadzik wfm
20:03 felher Hey folks. Suppose i have  a class A::B::MyClass and a class A::B::SecondClass. Is it possible to create a module A::B::ALL that exports those classes? So that i could write something like: "use A::B::ALL; SecondClass.new()".
20:03 PerlJam masak: I'd think they should all be lexical_6model  (unless there are really 2 Nils, but that makes my brain hurt)
20:04 flussence it displays around the « on my screen, maybe there's a font mismatch there... oh well, not that important
20:04 au .u 24E5
20:04 phenny U+24E5 CIRCLED LATIN SMALL LETTER V (ⓥ)
20:04 flussence felher: I had that exact problem a while back. It's specced (use :EXPORT) but it doesn't work in anything
20:04 masak all of mine are lexical_6model, but that code is never reached.
20:05 pmichaud afaik, there's only one Nil
20:05 pmichaud src/core/Nil.pm
20:05 tadzik moritz: (warnings), yeah, same results here; seems that it's all trickier than it seems to be. Or maybe just 'is hidden-from-backtrace' for all those subs will do?
20:05 tadzik .Numeric etc
20:05 felher flussence++: thanks for the answer :)
20:07 masak let's see. Nil isn't mentioned in BOOTSTRAP.pm.
20:08 pmichaud right, it's just a normal type object
20:08 masak Actions.pm only mentions it as PAST nodes ordinarily. I might be the only one in there trying to fetch it from a lexical environment.
20:08 pmichaud it is a lexical class
20:08 pmichaud my class Nil is Iterator {
20:09 masak right, but isn't src/core "too late" for Actions.pm?
20:09 masak I mean, Actions.pm is nqp...
20:09 masak and src/core is Perl 6...
20:09 * masak tries to make the levels fit together in his head
20:10 masak src/core isn't even compiled at the time Actions.pm is being compiled!
20:10 pmichaud no, but it is at the time when Actions.pm is being run
20:10 pmichaud (except when compiling src/core itself)
20:11 masak so Actions.pm can pull type names from src/core? just checking.
20:12 masak r: say Nil ~~ Nil
20:12 p6eval rakudo 3bd91f: OUTPUT«True␤»
20:12 masak r: say {;}() ~~ Nil
20:12 p6eval rakudo 3bd91f: OUTPUT«True␤»
20:12 * PerlJam asserts that both PAST::Var.new(:name('Nil'), :scope('lexical_6model')) and PAST::Var.new( :name('Nil'), :scope('lexical') ) can not both be simultaneously correct
20:12 masak r: say nqp::istype(Nil, Nil)
20:12 p6eval rakudo 3bd91f: OUTPUT«Method 'gist' not found for invocant of class 'Integer'␤  in sub say at src/gen/CORE.setting:6258␤  in block <anon> at /tmp/vZLARDUYVe:1␤␤»
20:12 pmichaud r: say nqp::p6box_i(nqp::istype(Nil, Nil))
20:12 p6eval rakudo 3bd91f: OUTPUT«1␤»
20:13 masak ok, so outside of Actions.pm it works...
20:14 * masak drops it for now
20:15 pmichaud PerlJam: I don't know what's up with the :scope('lexical') in Actions.pm
20:15 pmichaud I wonder if it's fossil
20:15 PerlJam I'd wager so
20:16 TimToady .oO(there is no bootstrapping problem in computer science that cannot be solved by adding another level of bootstrap...)
20:17 pmichaud I find 13 instances of :scope('lexical') or :scope<lexical>  in src/Perl6
20:17 PerlJam .oO(... or by being crushed under the heels of the boot that was strapped)
20:18 pmichaud it's entirely possible that :scope('lexical') works for lexical lookups in common cases
20:18 pmichaud although it might not be as efficient as 'lexical_6model' or might fail in certain instances
20:19 * pmichaud tries s/lexical/lexical_6model/ to see what happens
20:20 tadzik loliblogged! http://ttjjss.wordpress.com/2012/04/10/​plans-for-the-perl-6-hackathon-in-oslo/
20:21 s1n joined #perl6
20:22 masak \o/ tadzik++
20:22 havenn joined #perl6
20:22 masak tadzik: if you put energy at bringing Hitomi back to relevance, I'm willing to chip in with additional tuits.
20:22 PerlJam tadzik++
20:23 pmichaud lol!  "Whatever but Cool"
20:23 masak I have a vague feeling my main focus at the Oslo hackathon will be QAST/macros, though.
20:23 tadzik masak: that sounds like a plan
20:23 tadzik yet I really want to refactor Bailador, before or during, not after
20:23 tadzik (for the reasons I stated)
20:23 masak pmichaud: yeah, tadzik got the best blog name. someone inadvertently suggested it to him :P
20:23 tadzik shush!
20:23 PerlJam tadzik: is bailador a dancer port or really just a dancer-a-like for perl 6 heavily inspired by dancer?
20:24 masak tadzik: also, remember our highly secret but very exciting project. I've already done a few tentative commits on it.
20:24 tadzik PerlJam: it's really a Dancer lookalike, but I've started digging into Dancer2 source code recently and been trying to make it something closer to a real Dancer port
20:24 arnsholt tadzik: Sounds cool. I've been pondering various things along similar lines as well, so starting to really look forwards to the Hackathon now!
20:24 tadzik masak: sure thing
20:24 pmichaud I haven't decided what I'll focus on in Oslo.  I was thinking of working a bit on the Perl 6 module universe
20:24 jaffa4 What is Dancer 2?
20:25 tadzik Dancer 2 is a rewrite of Dancer :)
20:25 jaffa4 and Dancer?
20:25 pmichaud I was also thinking of looking at zavolaj-like things a bit
20:25 tadzik Dancer is http://perldancer.org/ a nice web framework for Perl
20:25 PerlJam jaffa4: Dancer is a web framework inspired by Sinatra
20:25 arnsholt (My recent interest in Zavolaj being prerequisitely related to my web musings)
20:26 spider-mario I like Mojolicious
20:26 pmichaud although maybe I'll just focus on closing RT tickets and providing suggestions/guidance/distractions to others :)
20:26 PerlJam Dancer 2 has the advantage that mst is helping with the rewrite
20:26 masak pmichaud: yay \o/
20:26 uvtc joined #perl6
20:27 pmichaud I'll definitely help out with QAST if folks are working on that.
20:27 PerlJam pmichaud: Rakudo profiling tools would be nice too :)
20:27 tadzik I have an affection for Dancer. It showed me that web development doesn't have to be a horrible torture :)
20:27 pmichaud oh, I can do those.  I had a start on some profiling stuff in nqp that was never finished.
20:28 uvtc Hi #perl6. Was just going to install Rakudo * on a newly-reinstalled OS (Lubuntu). Looking at the R* readme, it says that I need to have subversion installed ... I think that's there for Parrot ... but isn't parrot on github now?
20:28 tadzik or nqp profiling. I would love to see some compilation speed improvements
20:28 tadzik uvtc: what version of R* is taht?
20:28 PerlJam tadzik: me too
20:28 pmichaud uvtc: that's.... surprising
20:28 uvtc 2012.02
20:29 tadzik oh gosh, one so needs to fix that README :)
20:29 * tadzik looks
20:29 tadzik uvtc: certainly you don't need svn for anyting these days
20:29 pmichaud pmichaud@kiwi:~/p6/star/rakudo-2012.01$ ack -i -a subversion
20:29 pmichaud docs/announce/2009-04:58:  spectests, instead of obtaining checkout copies via Subversion.
20:30 pmichaud CREDITS:9:    description (D), subversion username (U) and snail-mail
20:30 pmichaud pmichaud@kiwi:~/p6/star/rakudo-2012.01$
20:30 pmichaud ohwait
20:30 spider-mario http://mojolicio.us/perldoc/Mojo​licious/Guides/CodingGuidelines
20:30 spider-mario “Code should be written with a Perl6 port in mind.”
20:30 spider-mario \o/
20:30 pmichaud wrong repo
20:30 tadzik yesh
20:30 masak spider-mario: whatever the heck that means :P
20:30 uvtc The readme also says that I should have libreadline5-dev, but libreadline-dev pulls in ... lessee ... libreadline6-dev. If that's ok, perhaps the readme could be amended there as well.
20:30 spider-mario sure :D
20:30 tadzik __sri++ has stated an interest in a Perl 6 port for some time now. Last time I checked he was missing docs
20:32 PerlJam maybe someone should put that "rule" to the test and try to port mojo to Perl 6
20:32 PerlJam :-)
20:32 masak we should write docs with __sri++ in mind :)
20:32 PerlJam though, I think sri is the right person for that task
20:32 pmichaud uvtc: I'm guessing we should remove the 'subversion' requirement
20:33 pmichaud I'm not sure what libreadline library should be requested now
20:33 dalek star: 789872f | tadzik++ | skel/README:
20:33 dalek star: Remove unnecessary dependencies from README, uvtc++
20:33 dalek star: review: https://github.com/rakudo/star/commit/789872f25e
20:33 uvtc I'll try just libreadline-dev, get libreadline6-dev, and see how that works.
20:33 uvtc Oooh, thanks, dalek.
20:34 tadzik I'm having libreadline6-dev installed and it works fine
20:34 tadzik (debian)
20:34 uvtc tadzik, great.
20:34 uvtc Argh, gotta go. Will check back later.
20:34 masak o/
20:34 tadzik thanks for noticing!
20:34 uvtc :)
20:38 felher Is there a nice way to write 'my Str $string = "long string that doesn't get into one line"'? Maybe some kind of quoting form that melts a newline and following whitespaces into one space, so that one could nicely align those strings? I now about heredocs, but i think they require an extra line, which is no problem for large strings, but not so nice for strings that fit into two lines. :)
20:39 masak felher: <<'EOT'.subst("\n", " ", :g);
20:39 masak er. q:to/EOT/ :)
20:39 PerlJam felher:   There's also ye old standby:  my Str $string = "line one " ~ "line two " ~ "line three";
20:40 masak felher: more generally, there are many times when heredocs "almost" do what I want, and I just make a final transformation to make them fit nicely.
20:40 flussence std: @(q:to/EOT/).join # would be nice if this works :) ␤EOT
20:40 p6eval std 1ad3292: OUTPUT«ok 00:00 41m␤»
20:40 masak felher: like in Perl 5 where indentation is always significant. I just remove it afterwards. sometimes with a custom sub.
20:41 [Coke] S02 has "the .perl method"/"the .pretty method" ... should it not also have "the .gist method" ?
20:41 masak flussence: you can do .lines>>.join
20:41 [Coke] (and do we really need all threde?
20:41 masak er, .lines.join
20:41 [Coke] *three
20:42 * [Coke] hates twiddling strings at runtime! inefficient!
20:42 masak pfah. premature optimization.
20:42 [Coke] hey, is perljam's example optimized at compile time?
20:42 masak [Coke]: I can see "do we really need all N" about a lot of things in the spec these days :/
20:42 felher PerlJam: this is what i currently have. The problem is that if i add a word i can't let my editor re-indent it, because it then moves the '"' on the next line :)
20:42 masak [Coke]: ideally, yes.
20:42 [Coke] masak: there is such a thing as pessimistic optimization. :P
20:43 [Coke] er, what is the opposite of premature... hurm.
20:43 PerlJam cotto: "belated"
20:43 PerlJam er, [Coke]
20:43 [Coke] overdue?
20:44 PerlJam "over the hill"
20:44 masak tardy.
20:44 [Coke] so you are.
20:44 PerlJam [Coke]: there are no hills here  :)
20:44 [Coke] <van halen>I don't FEEL tardy</van halen>
20:44 fsergot Good night #perl6 o/
20:44 felher masak: two things: first: i hoped there is already something for this, as i find me having that problem quite often. Second: Doesn't EOT have to be on a extra line? :)
20:44 masak 'branocm
20:45 masak 'branoc, fsergocie
20:45 pmichaud I can vouch for PerlJam's statement -- definitely no hills in CRP
20:45 flussence ... S02:3739 :)
20:45 [Coke] PerlJam: I remember it well, you're right. highway onramps are the biggest hills.
20:45 pmichaud HOU is hilly compared to CRP, fwiw :)
20:45 masak felher: just because you find yourself having a problem often doesn't mean it deserves a feature that's almost but not quite like heredocs :) I don't understand the second question.
20:46 [Coke] I disbelieve you, but only because houston is so flat to begin with!
20:46 [Coke] the end of the heredoc is a line by itself, yes.
20:46 masak right. is that a problem?
20:47 [Coke] it is verbose. I'd go with perljam's explicit ~ for now and eventually the compiler will optimize it away.
20:47 pmichaud there's always q(...)
20:47 masak consider [~]
20:48 masak r: say [~] "This is a ", 'string in several ', q[parts.]
20:48 p6eval rakudo 3bd91f: OUTPUT«This is a string in several parts.␤»
20:48 pmichaud rakudo:  my $str = q((  This is a string that includes a ) closing paren ));   say $str
20:48 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2␤»
20:48 pmichaud oops
20:48 moritz q() is a function call
20:48 masak q() is a sub call.
20:48 pmichaud rakudo:  my $str = q{{  This is a string that includes a } closing brace }};   say $str
20:48 p6eval rakudo 3bd91f: OUTPUT«  This is a string that includes a } closing brace ␤»
20:48 pmichaud yes, I know -- been doing too much p5 lately
20:49 masak :)
20:49 [Coke] lichtkind: I wonder if you'd be better off moving the tablets into a github repo.
20:49 pmichaud and with q{} you can pick your closing delimiter also
20:49 masak +1
20:49 PerlJam Still ... a quoting construct that would turn interstitial whitespace into a single space char seems like it would be useful.
20:49 [Coke] e.g.: http://www.perlfoundation.org/per​l6/index.cgi?perl_6_basics_tablet has a bunch of small typos and fixes that I'd be happy to give you a pull request for.
20:49 pmichaud my $str = q{{  This is a string }}.cleanup
20:49 masak PerlJam: .subst(/\s+/, ' ', :g)
20:50 PerlJam masak: yeah, but implicit :)
20:50 masak I'm all for utility methods and stuff, but really.
20:50 masak come on. define it in your code and move on in life ;)
20:50 pmichaud well, I'm not sure of the NYI status of .indent
20:50 PerlJam masak: are you saying that would be *too magical* for Perl 6?  ;)
20:50 pmichaud otherwise I'd recommend it :)
20:50 [Coke] (e.g. "embedd", "I many lines" "it's own")
20:50 masak PerlJam: I'm saying I think the use case is very weak.
20:51 pmichaud anyway, I always find q{{{ ... }}}   to be a reasonable long quoting mechanism
20:51 masak PerlJam: I'd include primes and fib sequences ten times before .cleanup
20:51 [Coke] indent is implemented in rakudo & niecza, no?
20:51 [Coke] I swear I stole it from one for 'tother.
20:51 masak not in nom.
20:51 moritz not in nom
20:51 PerlJam [Coke]: was.
20:51 masak moritz: stop doing that! :P
20:51 [Coke] ah, so it's only in niecza now! MUAHAHAHA.
20:51 moritz masak: you're creepy :-)
20:52 masak it's that obvious? :/
20:52 pmichaud I wasn't seriously suggesting ".cleanup" as a builtin
20:52 pmichaud I was simply suggesting it as a place holder for "whatever sort of cleaning up you wish to do"
20:52 PerlJam masak: primes and fibonacci works for me too  ;)
20:53 pmichaud .indent isn't in nom because .... ?
20:53 masak PerlJam: just saying I can see the use case for them. not for "oh hey sometimes I want to collapse spaces, why isn't that in core?"
20:53 * moritz blug: http://perlgeek.de/blog-en/perl-6​/2012-hackathon-preparations.html
20:53 lichtkind [Coke]: why?
20:54 felher masak: right. Thats no reason. But if i have a problem quite often the possibility that there is already a solution for it is higher than for problems i encounter just once. So i thought it might be a good idea to ask. Sure there is no problem with the methods available. But i find all of them kinda ugly. Its just about aesthetics :)
20:54 felher Defining a own quoting form would be a nice solution to me :)
20:55 masak felher: my_fixup(q:to/EOT); # there. pretty.
20:55 masak er, but syntactically correct.
20:56 PerlJam I wonder how many of these "little things" are missing from Perl 6?    Seems like their absence contributes to the barrier to entry.
20:57 felher yeah, there is nothing wrong with that solution. I just don't like a third line after a two-line string :)
20:57 masak I think lack of docs contributes to the barrier to entry. lack of noise outside the echo chamber contributes to the barrier to entry. lagging superstitions about the status of Perl 6 contribute to the barrier of entry.
20:58 masak I don't think the lack of a .cleanup method contributes to the barrier to entry.
20:58 pmichaud 20:52 <pmichaud> I wasn't seriously suggesting ".cleanup" as a builtin
20:58 pmichaud 20:52 <pmichaud> I wasn't seriously suggesting ".cleanup" as a builtin
20:58 masak felher: make the stopper a dot. you'll hardly notice it :)
20:58 pmichaud (oops, sorry for double-paste)
20:58 masak pmichaud: I'm intentionally using your silly name because I think the idea is silly.
20:58 PerlJam masak: no, not that ... I was thinking about q:to/EOT/
20:58 moritz pmichaud: sheesh, you think people will lsiten to you? :-)
20:59 pmichaud moritz: not anymore.  :-)
20:59 PerlJam masak: and .indent
20:59 PerlJam masak: and all of the other "little things"
21:00 pmichaud For a two-line string constant, I'd just use ~
21:00 pmichaud my $str = "first line'
21:00 pmichaud ~ "second line";
21:00 PerlJam sure lack of docs is a problem, but if Perl follows the least surprise principle, then they can discover many things on their own (if they are implementeD)
21:01 [Coke] lichtkind: as I said, for ease of maintenance/patches. in any case, there are the three issues I found in a quick glance.
21:01 felher masak: i think it will be possible one day to define own quoting-operators (maybe through macros? :) ) that handles that stuff? Until then i may very well use your solution. Thanks :)
21:01 masak PerlJam: if you mean that it's surprising/disappointing to discover that things are NYI, then yes, I think you have a point.
21:01 masak we should implement stuff as fast as we can to avoid disappointment.
21:01 PerlJam masak: no just any things; simple, common, every-day things.
21:01 PerlJam s/no/not/
21:01 benabik Does  $foo.&bar.baz mean bar($foo).baz ?
21:02 masak felher: probably quotes will be extensible in various ways, yes. it's just a slang, after all.
21:02 lichtkind [Coke]: what hinders you to edit?
21:02 masak benabik: yes.
21:02 PerlJam It wouldn't surprise or disappoint most people if junctions didn't really exist because, for most programmers, the whole idea is outside the realm of their experience anyway.  But the lack of heredocs freaks them out.
21:02 [Coke] lichtkind: personal dislike of that wiki software.
21:03 PerlJam (for instnace)
21:03 pmichaud is it SocialText?  If so, same here.
21:03 [Coke] pmichaud: aye.
21:03 benabik Thanks, moritz++
21:04 moritz huh? what have I done?
21:04 [Coke] lichtkind: so, certainly don't feel like I'm applying pressure. I just don't find it easy to help you the way things are now. (but I have many other things to devote my time to, so that's ok.)
21:04 pmichaud SocialText (or at least that installation of it) has always been too slow for me, among other annoyances.
21:04 lichtkind [Coke]: yes socialtext sucks but i rather use better wiki that github
21:04 masak moritz: stealing my karma! >:( :P
21:04 benabik moritz: 1) been generally useful, 2) have a name close enough to masak++ that I don't pay attention when I autocomplete
21:04 lichtkind [Coke]: so jsut tellme the errors i can change it
21:05 [Coke] lichtkind: I just did.
21:05 pmichaud lichtkind: it might be better off not as a wiki, but as a set of files that can be cloned, edited, and changes merged
21:05 lichtkind [Coke]: i requested several times tha something better should be installed
21:05 moritz well, sometimes you have take action yourself
21:05 pmichaud it might naturally fit in the perl6 repo, for example.
21:06 lichtkind pmichaud: maybe but where put it nonline?
21:06 pmichaud s/repo/account
21:06 moritz lichtkind: tables.perl6.org?
21:06 masak I think more people here would pay attention to changes/commits if it were on github.
21:06 pmichaud lichtkind: perhaps something like we do for the features page
21:06 pmichaud or perl6.org
21:06 pmichaud both of which are maintained on github
21:06 PerlJam masak: I know I would
21:06 [Coke] lichtkind: http://irclog.perlgeek.de/​perl6/2012-04-10#i_5424740 - there are the errors.
21:06 masak PerlJam: me too.
21:06 moritz lichtkind: if there is a simple-ish script that generates HTML, we can throw it into a directory or subdomain of perl6.org
21:07 pmichaud github also supports some sort of markdown rendering of files
21:07 pmichaud (probably not sophisticated enough for this... but maybe)
21:07 lichtkind moritz: even handwriting html does less pain than now because then i would have clear rules how to handle special character
21:08 moritz lichtkind: well, then it would be even easier to stick them into perl6.org
21:08 lichtkind moritz can you init tablets.perl6.org?
21:09 jaffa4 Is there an advent calendar each year?
21:09 lichtkind yes
21:09 PerlJam jaffa4: so far
21:09 dalek rakudo/nom: 4bacf1a | moritz++ | src/core/Exception.pm:
21:09 dalek rakudo/nom: add line numbers for warnings
21:09 dalek rakudo/nom:
21:09 dalek rakudo/nom: does not yet do the right things for warnings thrown from inside the setting, but warn() calls should be fine
21:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4bacf1a635
21:09 moritz lichtkind: yes, I can
21:09 pmichaud lichtkind: take a look at http://perl6.org/about/ to get some ideas about how it's done for the perl6.org site
21:09 pmichaud (the box that says "Contributing to perl6.org")
21:09 moritz lichtkind: give me a repo with .html files and I'll set it up, along with a cron job that updates it once per hour or so
21:10 pmichaud I'm sure that once sometihng is started in github, you'll get lots of people submitting patches
21:10 tadzik moritz++
21:10 pmichaud (that's what happened with the features page, for example)
21:10 lichtkind mostly i prefer bitbuckte, has it to be github?
21:11 moritz doesn't have to be, but all our stuff is there already
21:11 moritz so if you want people to contribute easily, github is the way to go
21:11 [Coke] I think it if it's git, that's fine, though - nice thing about not under the perl6 umbrella is that he can maintain editorial control, if that's important.
21:11 PerlJam lichtkind: git bitbucket or hg?
21:12 PerlJam what Coke said
21:12 [Coke] if it's git bitbucket, we could probably make the github one a mirror, no?
21:12 moritz aye
21:13 [Coke] and then I can fork from there, and /i/ win, anyway. ;)
21:13 lichtkind non github is ok
21:13 lichtkind i hust try to start a new project under perl 6
21:13 moritz only admins can do that
21:14 moritz wait a sec
21:14 lichtkind but i always thought its easier for other to partisipate with a wiki
21:14 PerlJam lichtkind: not necessarily.
21:14 lichtkind "tablets" not tables
21:14 PerlJam lichtkind: we're programmers; we like to hack code :)
21:14 lichtkind it was for normal people
21:14 [Coke] exactly! none of us is that.
21:14 PerlJam heh
21:14 moritz lichtkind: https://github.com/perl6/tablets
21:16 pmichaud since in the Perl 6 world most things are in some sort of git repository (compiler source, document specifications, book text, examples, Perl 6 modules, etc.) -- it seems natural to expect that most people involved in Perl 6 programming in any form will end up with some familiarity with git
21:16 pmichaud and by Perl 6 programming I also include "writing Perl 6 programs"
21:16 Araq joined #perl6
21:16 pmichaud not just the language implementors/designers
21:17 moritz well, p5 has a very similar trend
21:17 pmichaud yes, that too.
21:17 PerlJam lichtkind: were you hoping for a shared knowledge base built from people's experiences trying to use Perl 6 ?
21:17 * [Coke] realizes he's got some spare time coming up and wonders what he can do on p6.
21:17 moritz all the "big" modules (DBIx::Class, Moose, etc) are in git
21:17 benabik github also makes it to edit these things "in place".  They added simple editing capabilities to the site.
21:17 [Coke] mmm. if you squint, github IS a wiki.
21:18 pmichaud we certainly use it like one for specs / websites / book
21:18 moritz lichtkind: I accidentally added you to the 'nqp' team on github. Don't worry about it, no harm done :-)
21:19 lichtkind moritz: you will regret that :)
21:19 pmichaud moritz: did you see my comment above about :oneline versus something more generalized?  or did you reject it already?
21:19 moritz lichtkind: je ne regrette rien :-)
21:19 benabik (cd nqp; git push origin :master)
21:19 moritz pmichaud: yes, I#ve seen it
21:20 moritz pmichaud: thing is, I want it to be a bit smarter when :oneline is passed
21:20 lichtkind haha
21:20 moritz pmichaud: well, not smarter, more aggressive in search for user code
21:20 benabik That will, of course, fail because it rejects non-fast-forward pushes.  :-)
21:20 pmichaud okay.  could key that off of $lines == 1, but I don't have a strong opinion
21:20 lichtkind moritz: i have my own sorta tutorial which waist for some updates and translation should it be also in a repo?
21:21 lichtkind but its other wise finished
21:21 PerlJam moritz: for smartness, let the user pass a custom formatter (with a reasonable default one that you provide too)
21:21 moritz pmichaud: in a multi line backtrace, it often makes sense to include setting functions. Not if we only ever print a single line
21:21 moritz PerlJam: well, that's always possible, this is just a default formatter
21:22 lichtkind_ joined #perl6
21:22 pmichaud as I said, I don't have a strong opinion;  :oneline just looks a bit smelly to me
21:22 moritz pmichaud: we might make the two things (no of lines and setting fucntions) orthogonal at some point. Or not, we'll see
21:22 jaffa4 Are there records in Perl6 now?
21:22 moritz pmichaud: but a better name wouldn't be amiss
21:22 jaffa4 Are there records/structs in Perl6 now?
21:22 moritz jaffa4: we certainly set records in terms of development time :-)
21:23 [Coke] jaffa4: there are classes and hashes.
21:23 PerlJam jaffa4: do you mean "packed data structures"?
21:23 jaffa4 on change in this respect
21:23 * benabik wonders how hard it would be to do something like ruby's OpenStruct
21:23 jaffa4 yes, something like that
21:24 lichtkind_ moritz: allright we can worrylater about the tutorial
21:24 moritz lichtkind_: in general, putting stuff into repos is good :-)
21:24 pmichaud jaffa4: http://perlcabal.org/syn/S09.html#Compact_structs
21:24 pmichaud NYI, but part of the spec
21:24 moritz lichtkind_: you can also start repos as your own user, and we can then fork them into the perl6 organization
21:25 dalek rakudo/nom: fa2d53c | moritz++ | / (2 files):
21:25 dalek rakudo/nom: first shot at bringing Str.indent back
21:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fa2d53c30c
21:26 lichtkind joined #perl6
21:26 pmichaud moritz++ moritz++
21:26 dalek roast: 7051d3a | moritz++ | S32-str/indent.t:
21:26 dalek roast: fudge and correct indent.t
21:26 dalek roast: review: https://github.com/perl6/roast/commit/7051d3ab20
21:26 moritz ok, there's one new regression in there, which I don't have the energy to track down now
21:26 moritz OTOH we can now properly test for warnings
21:26 moritz with CONTROL { default { pass('we got a warning') } }
21:26 lichtkind since i use github ff crashes all the time
21:27 Araq interesting so apparently perl6 has everything that C has too
21:27 moritz wow. Complain to the Mozilla folks.
21:27 moritz Araq: no pointer arithmetic
21:27 moritz Araq: no inline assembler
21:27 pmichaud There will be modules.
21:27 pmichaud :-)
21:28 Araq what? no inline assembler? that's a strange omission
21:28 PerlJam Araq: yet.
21:29 pmichaud We do have Q:PIR { ... }   :-P
21:29 Araq somehow against the pilosophy of perl6, isn't it?
21:29 moritz well, rakudo has Q:PIR { }
21:29 [Coke] can you write C# in niecza?
21:29 [Coke] or haskell in pugs?
21:30 lichtkind_ joined #perl6
21:31 moritz I think you can write C# in niecza (with that CgOp thing)
21:31 moritz not sure if that works outside the setting though
21:36 tokuhirom joined #perl6
21:40 lichtkind joined #perl6
21:40 lichtkind shit crashed fifth time and tkom  made 24h reset
21:40 lichtkind i could shit bullets
21:40 lichtkind [Coke]: sorry i could not find there any problems under this link
21:42 [Coke] "embedd" is not a word.
21:43 [Coke] "I many lines" is not meaningful. maybe you meant "If" instead of "I"
21:44 [Coke] "it's own" is grammatically incorrect, it should be "its own" (it's == a contraction of it is; its == belonging to it)
21:44 [Coke] those are the 3 issues found in a quick glance.
21:45 [Coke] (doesn't address any issues of style, or coverage of the source material, or whether it's useful from a teaching perspective, etc.)
21:46 lichtkind ah all right
21:46 lichtkind just a min
21:49 lichtkind joined #perl6
21:49 lichtkind that was srash number 7 i could nuke github out of orbit
21:49 [Coke] lichtkind: what version of FF are you running?
21:49 [Coke] (on what platform, and how much memory?)
21:50 lichtkind 11 and newest ubuntu
21:50 * benabik has never found Firefox to be the most stable of browsers, although he hears it's gotten better.
21:52 * jnthn back from beer :)
21:52 colomon joined #perl6
21:52 pmichaud newest ubuntu == 11.10 or 12.04 ?
21:52 pmichaud I'm running 11.10, my firefox is firefox 10
21:53 jnthn My word, I go for 3 pints and you guys generate HOW much backlog? :)
21:53 pmichaud jnthn: We could stop.
21:53 jnthn No, it's fine :P
21:53 jnthn I may just leave it until tomorrow while @student are doing exercises to catch up :)
21:54 [Coke] jnthn: drink more beer, an all'll be well.
21:54 lichtkind joined #perl6
21:54 lichtkind allright 3 crashes later i have another problem
21:55 lichtkind i did the first steps like proposed on github
21:55 Araq left #perl6
21:55 lichtkind but now he wants some git@wxperl.info pwd
21:55 lichtkind wtf
21:56 jnthn [Coke]: I'd love to have, but I am teaching tomorrow, so should be vaguely responsible. :)
21:56 jnthn pmichaud: You're curious to look at Zavolaj? Nice :)
21:56 jnthn pmichaud: It's not the epic hack the version for ng was :)
21:56 benabik lichtkind: I would guess that that's the identification for your SSH key.
21:57 lichtkind benabik: where i can change that?
21:57 jnthn pmichaud: In Oslo I'd like to go through some of the list code with you.
21:57 jnthn pmichaud: I feel I'm missing some things in there.
21:57 benabik lichtkind: Change the key associated with github, or change the ident of the key?
21:58 benabik lichtkind: The latter is `ssh-keygen -c -C "new ident" -f keyfile
21:58 benabik lichtkind: The former is https://github.com/settings/ssh
22:00 jnthn re http://perlcabal.org/syn/S09.html#Compact_structs I'd say that the CStruct REPR partially implements this stuff :)
22:00 lichtkind thank you very much
22:01 lichtkind benabik: WHERE FIND THE KEYFILE?
22:01 lichtkind sorry
22:02 benabik lichtkind: It is usually in ~/.ssh and is one of identity, id_dsa, or id_rsa
22:02 lichtkind i look
22:08 lichtkind [Coke]: all 3 things fixed
22:08 pmichaud jnthn: (review list code)   aye, no problem
22:09 pmichaud I may try to get the .munch fix in place first -- that may resolve quite a few issues
22:09 tadzik good night #perl6
22:09 lichtkind good night tadzik
22:11 lichtkind how can i so git push -u origin master and explicitly tell the pwd for that command
22:11 vlixes joined #perl6
22:13 plobsing joined #perl6
22:17 jnthn pmichaud: Wouldn't surprise me if we can knock qbootstrap's remaning blockers out between us with a bit of time on it too
22:18 pmichaud jnthn: I suspect that depends on qregex improvements; I'm not sure I'll have a lot of tuits for it before the hackathon, and it's hairy enough that doing much *at* the hackathon is not a good use of my time
22:18 pmichaud i.e., if I'm focused on qregex, I'm not really available for much else
22:18 jnthn pmichaud: mark_commit
22:18 jnthn pmichaud: and protoregexes incorporating other protoregexes into their NFA
22:18 pmichaud yes, that's still in my head.  don't we also need the ltm stuff too?
22:19 jnthn pmichaud: Those are the two big ones I know of.
22:19 pmichaud right.  those are a little hairy.
22:19 alester joined #perl6
22:19 vlkv joined #perl6
22:19 jnthn Yeah, because the naive solution explodes as soon as you hit recursion.
22:19 pmichaud mark_commit is less so, but getting the nfa stuff completely integrated in takes a bit of work
22:19 vlkv left #perl6
22:19 jnthn pmichaud: What do you mean by "completely integrated in"?
22:20 pmichaud afaik, qregex doesn't have any ltm semantics at the moment
22:20 jnthn pmichaud: It does.
22:21 jnthn nom: grammar Foo { proto TOP { * }; rule TOP { \w+ }; rule TOP { ab } }; say Foo.parse('abc')
22:21 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Method 'match' not found for invocant of class 'String'␤»
22:21 alester joined #perl6
22:21 jnthn nom: grammar Foo { proto token TOP { * }; rule TOP { \w+ }; rule TOP { ab } }; say Foo.parse('abc')
22:21 p6eval rakudo 3bd91f: OUTPUT«===SORRY!===␤Method 'match' not found for invocant of class 'String'␤»
22:21 jnthn huh...
22:23 jnthn oh, duh :)
22:23 pmichaud wouldn't it need to be something like   proto token abc { * };   rule abc:<w> { \w+ };   rule abc:<ab> { abc };
22:23 pmichaud ?
22:24 jnthn nom: grammar Foo { proto TOP { <...> }; token TOP { \w+ }; token TOP:sym<w> { \w+ }; token TOP:sym<ab> { ab } }; Foo.parse('abc')
22:24 p6eval rakudo 3bd91f:  ( no output )
22:24 jnthn nom: grammar Foo { proto TOP { <...> }; token TOP { \w+ }; token TOP:sym<w> { \w+ }; token TOP:sym<ab> { ab } }; say Foo.parse('abc')
22:24 p6eval rakudo 3bd91f: OUTPUT«=> <abc>␤␤»
22:24 jnthn Right.
22:24 jnthn That is using the NFA.
22:24 jnthn The qregex branch is also using the NFA engine for such things.
22:24 pmichaud okay, so you've extended it beyond where I left off then
22:24 jnthn gha
22:24 jnthn the *qbootstrap* branch
22:24 jnthn Yes, I've done quite a bit of stuff.
22:24 pmichaud okay
22:25 pmichaud checking:
22:25 jnthn Also the qbootstrap branch contains a dumb port of the NFA runner to C that runs 15 times faster than the PIR version.
22:25 jnthn er
22:26 jnthn s/PIR/NQP/
22:26 pmichaud nom: grammar Foo { token TOP { <abc> };  proto abc { <...> }; token abc:<www> { \w+ }; token abc:<ab> { ab }; }; say Foo.parse('abc');
22:26 p6eval rakudo 3bd91f: OUTPUT«Method 'abc' not found for invocant of class 'Foo'␤  in regex TOP at /tmp/jsVMkgq9c1:1␤  in method parse at src/gen/CORE.setting:8415␤  in block <anon> at /tmp/jsVMkgq9c1:1␤␤»
22:27 jnthn Needs to be proto token
22:27 jnthn or proto regex
22:27 pmichaud nom: grammar Foo { token TOP { <abc> };  proto regex abc { <...> }; token abc:<www> { \w+ }; token abc:<ab> { ab }; }; say Foo.parse('abc');
22:27 p6eval rakudo 3bd91f: OUTPUT«#<failed match>␤»
22:27 jnthn proto abc { <...> } is a subroutine.
22:27 pmichaud the version you had seemed to have an extra TOP rule
22:28 pmichaud proto TOP { <...> }; token TOP { \w+ };   # error
22:28 jnthn oh
22:28 jnthn nom: grammar Foo { proto token TOP { <...> }; token TOP:sym<w> { \w+ }; token TOP:sym<ab> { ab } }; Foo.parse('abc')
22:28 p6eval rakudo 3bd91f:  ( no output )
22:29 jnthn nom: grammar Foo { proto token TOP { <...> }; token TOP:sym<w> { \w+ }; token TOP:sym<ab> { ab } }; say Foo.parse('abc')
22:29 p6eval rakudo 3bd91f: OUTPUT«=> <abc>␤␤»
22:29 jnthn That's what I meant.
22:29 pmichaud so why does mine faile?
22:29 pmichaud *fail?
22:29 pmichaud oh, no sym
22:29 pmichaud nom: grammar Foo { token TOP { <abc> };  proto regex abc { <...> }; token abc:sym<www> { \w+ }; token abc:sym<ab> { ab }; }; say Foo.parse('abc');
22:29 p6eval rakudo 3bd91f: OUTPUT«=> <abc>␤ abc => <abc>␤␤»
22:29 pmichaud okay
22:29 jnthn Anyway, it's using the NFA engine.
22:30 jnthn I got that in place months ago.
22:30 pmichaud okay
22:30 jnthn Alternations don't use it yet
22:30 jnthn That is, standalone ones
22:30 jnthn diakopter++ patched the NFA builder to support quantifiers.
22:30 pmichaud so, does it use the nfa engine for subrules?
22:30 jnthn Yeah
22:30 jnthn You implemented merge_subrule
22:31 jnthn It does as much as that.
22:31 jnthn But merge_subrule doesn't consider subrules that are in turn protoregexes.
22:31 jnthn Well, put better
22:31 jnthn protoregexes don't have an NFA.
22:31 pmichaud ah
22:31 pmichaud protoregexes get an NFA that are the alternation of all of the candidates
22:31 jnthn Makes sense. Though NYI. :)
22:32 jnthn Also, I already implemented caching of the computed NFA.
22:32 pmichaud all you have to do is look up the NFAs for each candidate and add them as an alternation
22:32 lichtkind benabik: i got Comments are only supported for RSA1 keys.
22:32 pmichaud the caching is per-grammar, yes?
22:32 jnthn Yes.
22:32 jnthn It's done in the meta-object
22:32 lichtkind but there are no comments
22:32 jnthn So if you were to do a mixin (like we should for derived grammars) then it'd recompute things on demand.
22:33 jnthn pmichaud: fwiw, you may want to build qbootstrap and just look through the test failures.
22:33 pmichaud ummm, that part doesn't make sense to me
22:33 lichtkind_ joined #perl6
22:34 jnthn pmichaud: stage1 builds a stage2 using qregex, so when you "make test" you're testing an NQP that uses qregex for parsing.
22:34 jnthn pmichaud: Maybe I explained badly then.
22:34 gv joined #perl6
22:34 pmichaud jnthn: this is in qbootstrap branch, yes?
22:34 benabik lichtkind: Then perhaps I was wrong?
22:34 jnthn All I mean is, if you have an instance of a grammar and you mix in to it, then that's a type change, and it will not share the cache with the original class. Which means the new tokens will be considered.
22:35 jnthn pmichaud: Yes, what I just said about the stage twiddles is only true of qbootstrap branch
22:35 pmichaud okay
22:35 jnthn pmichaud: Also I created a temporary QHLL
22:35 jnthn This contains things like EXPR updated for QRegex.
22:35 pmichaud how divergent is qbootstrap from master ?
22:35 jnthn Not crazily.
22:36 jnthn I updated it recently
22:36 jnthn It incorporates the last major set of NQP changes (the bs stuff)
22:36 jnthn So it's basically some qregex fixes + QHLL + Makefile changes for the most part.
22:36 jnthn And the C port of the NFA runner, because performance is hosed otherwise. :)
22:37 lichtkind_ has here anyone a clue why git brings up wxperl.info which is in no config
22:37 pmichaud I'm a little surprised by that -- the tests I did with the NFA runner earlier weren't too bad.
22:37 pmichaud but I'm fine with a C port.
22:37 jnthn pmichaud: It was nomming 50% of runtime when I used the profiler on it.
22:37 jnthn pmichaud: that is, when parsing NQP code.
22:37 pmichaud okay
22:38 jnthn pmichaud: When I ported it to C in a naive "just get it done" way, that dropped to 3%
22:38 pmichaud well, I was mainly comparing to the nqp-rx form of protoregex
22:38 jnthn That is to say, we can do better.
22:38 pmichaud not to what the fastest form would be
22:38 jnthn But it was a big enough improvement that I left it there. :)
22:38 miso2217 joined #perl6
22:38 pmichaud well, I'm fine with a C port :)
22:38 jnthn pmichaud: qbootstrap still runs a little slower than master.
22:38 jnthn pmichaud: I'm not entirely sure why yet.
22:38 pmichaud lack of transitive nfas, probably
22:39 jnthn That could well be it.
22:39 pmichaud master (nqp-rx) has transitive protoregexes
22:39 spider-mario joined #perl6
22:39 jnthn aha
22:39 jnthn Another part is that the builtins are written in NQP
22:39 jnthn Not PIR
22:39 benabik lichtkind: What command are you running when it asks for it?
22:39 jnthn *but* that'll get better post-QAST.
22:40 pmichaud okay
22:40 pmichaud (more coming)
22:40 pmichaud the approach I had been taking was not to create a separate branch, but rather create a new NQP compiler (NQPQ) that would use qregex for its regexes, and get it to bootstrap
22:40 pmichaud i.e., do it within a branch instead of separate branches
22:41 pmichaud I'm fine with throwing NQPQ away - it wasn't heavily patched over NQP
22:41 jnthn pmichaud: Oh, NQPQ still exists
22:41 jnthn pmichaud: But just doing it in stage 2 is not enough.
22:41 pmichaud I suspect NQPQ is way out of date though
22:42 jnthn In qbootstrap it is up to date (more)
22:42 pmichaud and I'm not planning to just do it in stage2 -- the intent was to use NQPQ to close the loop
22:42 jnthn It's just that qbootstrap builds now in stage1 *and* stage2.
22:42 jnthn And stage2 adds in QHLL
22:42 jnthn So if you "make bootstrap" the final output of this lot, you should close the loop that way.
22:42 jnthn I guess we have the same goal but reached different conclusions on how to do it... :)
22:43 pmichaud yes, and I'm way confused about the status of any of the pieces.
22:43 pmichaud I'm not really able to keep all of the branches/threads straight in my head
22:43 jnthn pmichaud: I suggest build qbootstrap, make test, glance over the Makefile. :)
22:44 * pmichaud does a 'git diff qbootstrap master'
22:45 jnthn pmichaud: I have the disadvantage of not having been the designer of qregex and the bootstrap system, so largely I've just tried to make the best sense of it I could and do what felt sane. I'm not going to be in the slightest surprised if I've done it differently to how you'd initially envisioned. OTOH, I *think* the path I've led it down so far can work out.
22:45 pmichaud I'm sure it can work out.  I don't know how quickly *I* can make it work out.
22:46 jnthn pmichaud: That's fine. We have both of us. :)
22:46 pmichaud okay, well let me try to make sense of this -- a few q's
22:46 pmichaud does NQPQ have any role in the qbootstrap building process?
22:47 jnthn Yes
22:47 jnthn Well, if you mena what I think you do. :)
22:47 pmichaud I mean:  is it compiled at any point in the build chain
22:47 jnthn stage0 = the PIR files. No qregex, no NQPQ, no QHLL. Nothing new.
22:47 jnthn stage 1 = old HLL, QAST, QRegex, NQPQ
22:47 jnthn stage 2 = QHLL, QAST, QRegex, NQPQ
22:48 jnthn (because you can't meaningfully try a updated HLL until you have your grammars being compiled with QRegex)
22:48 jnthn so NQPQ is in stage 1 and stage 2
22:48 pmichaud okay, so the qbootstrap Makefile basically takes what was the NQPQ target in master and makes it the primary target
22:48 jnthn Correct
22:49 jnthn In fact, the NQP directory itself is perhaps redundant and unused in qbootstrap now
22:49 pmichaud right, that's what I was trying to articulate next.  Good.
22:49 pmichaud You're comfortable that NQPQ is not too far diverged from NQP, then?
22:50 jnthn I spent two hours at the weekend undiverging them. I'm very comfortable. :)
22:50 pmichaud and you undiverged them in the qbootstrap branch
22:50 pmichaud ?
22:50 jnthn Correct.
22:50 pmichaud checking.
22:51 pmichaud okay, I just did a recursive diff -- I'm comfortable with that also.
22:51 jnthn \o/
22:52 pmichaud there are some differences but none extensive (unrelated to QRegex stuff)
22:53 pmichaud so, in qbootstrap, stage0 builds NQP from the .pir files
22:53 pmichaud stage1 then uses that NQP to build QRegex, QAST, HLL, and NQPQ
22:53 jnthn right
22:53 pmichaud stage2 then builds QHLL, QAST, QRegex, and NQPQ using ... ?
22:53 pmichaud NQPQ?
22:53 jnthn Note nqpq actually ends up in nqp.exe
22:54 jnthn stage2 builds everything using stage1
22:54 pmichaud okay
22:54 jnthn er, the clarify
22:54 jnthn we build an nqp.pbc at each stage
22:54 pmichaud right
22:54 jnthn in stage1 and stage2 it's just that NQP::* come from src/nqpq
22:54 pmichaud okay, I got it.
22:54 jnthn And stage2 adds QHLL
22:55 jnthn I did my best shot at porting EXPR and friends.
22:55 pmichaud QHLL is an adaptation of HLL?
22:55 jnthn Yeah
22:55 jnthn In fact
22:55 whiteknight joined #perl6
22:55 jnthn I *think* only Grammar has changes
22:55 pmichaud so, in the qbootstrap branch, src/HLL/ and src/NQP/  are basically unused
22:55 jnthn Certainly only Grammar has substantive changes.
22:55 jnthn wrong (more)
22:56 jnthn src/HLL/ is still used for *stage1*
22:56 pmichaud oh, src/HLL.... right
22:56 havenn joined #perl6
22:56 jnthn Yeah, it has to come in one stage later.
22:56 pmichaud got it. makes sense.
22:56 jnthn That is a big part of why qbootstrap looks the way it does in terms of how I have got stage1 and stage2 in the Makefile.
22:56 pmichaud okay
22:57 pmichaud given that you have protoregexes working in QRegex, at least non-transitively, the rest ought to be fairly straightforward
22:57 jnthn At first I thought I could get away with just doing stuff in stage2. Alas, no :)
22:57 jnthn pmichaud: Oh, I think with transitive NFA + mark commit fixes, we'll be able to count the number of failing files in t/nqp on the fingers of one hand. :)
22:57 pmichaud I think I may be able to close the loop on qbootstrap prior to oslo
22:58 pmichaud then the question becomes, how much of qregex is missing to be able to compile src/Perl6/Grammar.pm
22:58 jnthn Yeah, that I didn't yet look into.
22:59 pmichaud that's the other piece that scares me a bit
22:59 pmichaud let me check my calendar a sec
22:59 jnthn I'm not scared about making it compile.
22:59 jnthn I'm much more scared the impact that having real LTM will have on it. :)
23:00 pmichaud oh, that part doesn't bother me too much. :)
23:00 pmichaud so, since we're each scared about different things, perhaps none of them are truly scary :)
23:00 pmichaud (or both of them are)
23:01 pmichaud have to check calendar with $wife
23:02 jnthn ok
23:02 pmichaud ....who went to the store :-/
23:02 * jnthn also has to sleep soon
23:02 jnthn Well
23:02 jnthn Attempt to
23:02 pmichaud here's my tentative plan
23:02 * jnthn listens
23:03 pmichaud tomorrow I'm basically without tuits -- we'll be at chemo all day tomorrow
23:03 pmichaud thursday I have a bit of work for $otherjob, plus household stuff
23:03 pmichaud so, I may dive into things a bit on Thu or Fri
23:04 pmichaud iiuc, my Sat is completely clear.  So assuming energy/tuit supply is still good, I'll plan to spend Sat closing the qbootstrap loop and getting protoregexes to do transitive ltm
23:05 jnthn I suspect the tran ltm is a prereq for closing the loop :)
23:05 jnthn Anyway, +1, and here's hoping :)
23:05 pmichaud I suspect not, if nqpq is already able to build itself
23:05 jnthn I'll be around on Saturday and contactable somewhat on Thu/Fri.
23:05 pmichaud in that sense, the loop is already closed, I think.
23:06 jnthn My tuit supply this week is unusually low...just result of having been away from $dayjob on vacation and having some backlog there. :)
23:06 jnthn After this week things are normal again.
23:06 pmichaud the problem isn't closing the loop, it's more that the result doesn't have all of the features needed to build rakudo
23:06 pmichaud (or run all of the things that rakudo expects)
23:06 jnthn That could well be an issue, yeah.
23:06 pmichaud if nqpq builds itself, it's "bootstrapped"
23:07 jnthn Well, remember Rakudo already uses QRegex for userland regexes.
23:07 jnthn So it's only really src/Perl6/Grammar.pm that we have to worry much over.
23:07 pmichaud right, I'm mainly concerned with Perl6/Grammar and Perl6/Actions stuff
23:07 jnthn I don't see Actions being a big deal.
23:07 jnthn Grammar a bit more so.
23:07 pmichaud I don't either, unless it's depending on the old Match objects somehow.
23:08 * [Coke] is excited for the perl6 weekend!
23:08 jnthn OK, my class tomorrow will be thankful if I sleep now, so I probably should. :)
23:08 pmichaud because when we switch to a qregex-based parser, the parse nodes are different from what nqp-rx was producing
23:09 pmichaud (but obviously  not too different, if nqpq compiles itself)
23:09 jnthn Yes, that is true.
23:09 pmichaud anyway, I'll prioritize some tuits towards qbootstrap over the next few days, if I have any
23:09 jnthn OK, nice :)
23:10 * jnthn would be really happy if we get qbootstrap landed in the next couple of weeks.
23:10 pmichaud I don't know if we'll want to switch for the 2012.04 release
23:10 jnthn Me either.
23:10 pmichaud I guess we see how this weekend goes.
23:10 jnthn But if we've a branch ready to merge right after it...that's fine too :)
23:10 pmichaud yeah, that works also.
23:10 pmichaud okay, sleep well.  nice work on qbootstrap -- I'm not as scared as I was
23:10 jnthn qbootstrap gets rid of 1 out of our 2 major PIR dependencies. :)
23:11 pmichaud the other being PAST/QAST?
23:11 jnthn Correct.
23:11 jnthn :)
23:11 pmichaud that one ought to be a lot less difficult to fix
23:11 jnthn Yeah. It's do PAST but with better native type handling and some other twiddles. :)
23:11 jnthn And in NQP, not PIR. :)
23:11 pmichaud right
23:11 pmichaud and fix some of the other buglets
23:11 jnthn yeah
23:12 pmichaud then the hard part becomes converting Rakudo to not use PAST :-)
23:12 jnthn I think Oslo will be a good chance for us to sync our ideas. :)
23:12 jnthn We can potentially do that picemeal (more)
23:12 jnthn Since you made QAST/PAST  nestable in each other. :)
23:12 pmichaud that's a bit ugly (my fault!) but yes, we can go that route :)
23:13 jnthn masak++ is also very keen for QAST because then QAST nodes are 6model objects which means they will serialize which means quasi interpolation can work with precompilation :)
23:14 jnthn Well, and AST macros generally :)
23:14 pmichaud yes, I hadn't realized that particular part
23:14 pmichaud definitely another motivation for the switch
23:14 jnthn :)
23:14 jnthn Yeah, lots to be excited about. :)
23:14 pmichaud to some extent I'd also like to make sure we think of qast nodes in terms of eventual nqp:: nodes
23:15 pmichaud e.g., nqp::list, nqp::hash, nqp::if, and the like
23:15 jnthn ah
23:15 pmichaud but that's likely another stage down the road
23:15 jnthn I'm a bit bothered about excessive conflation there
23:15 pmichaud if you just think of nqp::*  translating directly to ast nodes, it makes sense
23:16 jnthn e.g. I'd rather we have a prefix like qast:: for QAST nodes and another one (nqp:: or vm::) for VM op abstraction
23:16 pmichaud instead of translating to opcodes
23:16 jnthn The current nqp:: opcode handling is problematic because it happesn too soon
23:16 jnthn The optimizer, for example, should see the abstract, untranslated op.
23:16 pmichaud I'd be fine with vm:: for vm opcodes
23:17 jnthn And only at the PAST -> backend stage would end trnaslation to the PIR-land or CLR-land or whatever take place.
23:17 jnthn OK, I'm not likely to argue over naming. I'm mostly bothered about being able to write a portable optimizer. :)
23:17 jnthn And ease of writing other backends. :)
23:17 pmichaud anyway, I'm fine with that -- I just like having the nqp::op(...)  functional style of getting to the ast
23:18 jnthn I may arge that wants to be qast::if(...) to be really clear
23:18 jnthn but nqp:: can work too
23:18 jnthn It's just if it's AST nodes, qast:: implies that better.
23:18 pmichaud I'm fine if it's ast:: or similar
23:18 jnthn Yes, or ast:: :)
23:18 pmichaud we can figure out the needed distinction as we get to it.
23:18 pmichaud nqp:: can be the conflated one where we move things around until we know what we ultimately want :)
23:19 jnthn true :)
23:19 pmichaud (at which point nqp:: probably goes away)
23:19 pmichaud okay, I have to prepare for evening's activities.  See you later
23:20 jnthn yeah, sleep... :)
23:20 jnthn o/
23:22 masak good night jnthn, #perl6
23:22 lichtkind o/
23:24 lichtkind whats a good ssh server?
23:27 Tene lichtkind: openssh
23:29 lichtkind i mean server url
23:29 lichtkind excuse me for not being clear
23:30 Tene I'm very curious about what you're looking for, now.  You're looking for an open, public access shell host?
23:31 lichtkind Tene: i just want to set my config properly
23:31 lichtkind im  totally lost now
23:33 [Coke] do you mean "how do I setup ssh locally for use with github"?
23:33 [Coke] r: gist 3
23:33 p6eval rakudo 3bd91f:  ( no output )
23:33 nif joined #perl6
23:34 [Coke] r say gist 3
23:34 [Coke] r: say gist 3 #bother
23:34 p6eval rakudo 3bd91f: OUTPUT«3␤»
23:34 [Coke] n:say gist 3
23:34 [Coke] n: say gist 3
23:34 p6eval niecza v15-6-gefda208: OUTPUT«3␤»
23:34 lichtkind [Coke]: yes
23:35 lichtkind [Coke]: funnily it forked for commits to spec
23:35 lichtkind but now im master
23:35 lichtkind and things turned ugly
23:35 [Coke] lichtkind: http://help.github.com/linux-set-up-git/ has initial setup instructions. if you need something other than that, asking specific questions helps.
23:36 [Coke] like "I run this command and get <foo> but I expect <bar>".
23:36 [Coke] p: say ~3
23:36 p6eval pugs: OUTPUT«3␤»
23:39 [Coke] moritz: if I rebuild pugs now, will it work?
23:39 [Coke] (not ready to do it yet)
23:40 [Coke] p: say gist 3
23:40 p6eval pugs: OUTPUT«*** No such subroutine: "&gist"␤    at /tmp/QluWJTy33n line 1, column 5 - line 2, column 1␤»
23:46 [Coke] question: for spec tests that compare a .WHAT.gist to a literal string (e.g. "Hash") that are not explicitly testing .gist, can those be changed to compare to Hash.gist ?
23:47 [Coke] because the literal is Hash(), and pugs is giving "Hash"
23:47 [Coke] ... eh. nevermind.
23:49 Liutox008 joined #perl6
23:49 [Coke] eh. I WILL change it, but mainly because S02-types/hash.t is inconsistent about it.
23:49 frankaa112 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo