»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
TimToady some nutjob shot up my alma mater while you were nomming too; I know people who work in that building... :( 00:11
cognominal welcome to North America 00:18
cognominal TimToady graduated in Street Pick Up? Oh, no. That's a different acronym. 00:21
cognominal spu.edu/depts/ugadm/etc/missionary-to-geeks.asp 00:22
I did not know that TimToady rubbed elbows with Bill Gates.
Somehow appropriate that the page on TimToady ends up in /etc, so unixy 00:25
TimToady turns out my nephew was actually in the building at the time, and it's a building that I have lectured in 03:43
so I'm a little creeped out
TimToady I know exactly what that foyer looks like, with a sunken central lounge that probably looked like a "killing field" to the shooter 03:44
TimToady the science kids put up there displays there when they're having the annual science exhibit, and I've been to math and CS parties there 03:51
was very fortunate there were not more people there at the time
Pleiades` ? 03:54
Canadian shooting thing?
TimToady no, Seattle Pacific University 04:00
Pleiades` oh wow.. 04:01
TimToady shooter wasn't a student, apparently a random crazy
the picture at www.komonews.com/news/local/Police-...43001.html is actually taken from that sunken area I mentioned, you can see the steps 04:02
the head of the CS department had their office just off the right of the picture, at least until recently 04:03
(she was also one of my piano accompanists when I was studying violin...) 04:04
funny how we both ended up in computers
Pleiades` I wish these events weren't publicized so much..
TimToady yeah, might just be a copycat fo the Isla Vista thing; both my sons are in Santa Barbara currently, so that's also creepy 04:05
one of our quizzer kids at church knew one of the victims down there, small world 04:06
we hunted for apartments for Aron in Isla Vista, but he ended up a bit further west, thankfully 04:07
(quietfanatic++ is just finishing up at Westmont, other end of Santa Barbara) 04:08
cognominal In Europe, shootings are between gangs members or by political terrorists, and that's pretty rare. There is no gun culture outside hunting. So there is still the risk to be shot by a stupid hunter in nature. And some suicidal people who may kill their family as well. 04:18
Pleiades` let's not get into a gun debate..
cognominal that was more a cultural remark. 04:19
Pleiades` ah
sergot morning o/ 06:44
moritz \o 07:03
FROGGS o/ 07:08
atroxaper Hello, #perl6 ! 07:38
I have an easy question. If a have a number 5.7. How can i get 5 and 7 separately? 07:39
xfix $number - int $number 07:40
atroxaper Oh! Many thanks! 07:41
moritz $number - $number.Int 07:44
there's not int prefix op in p6
atroxaper I used Int($number) 07:45
Have we function for runding (i'm not sure if it is right term). I mean something like: round(5.7) = 6 07:46
Just for my information :) 07:47
moritz m: say round 5.7 07:48
camelia rakudo-moar 28d672: OUTPUT«6␤»
atroxaper This is the best election of terms! I love Perl 6! )
xfix (I confused this channel with #perl) 08:01
nwc10 is that a compliment? :-) 08:02
xfix (Well, I typed `int`, thinking it's generic #perl question) 08:13
masak good antenoon, #perl6 08:14
moritz masak o/
timotimo o/ 08:15
zengargoyle morning world 08:16
xfix r: say 4.8 % 1
camelia rakudo-jvm 28d672: OUTPUT«0.7999999999999998␤»
..rakudo-{parrot,moar} 28d672: OUTPUT«0.8␤»
xfix r: say 4.8 div 1 08:17
camelia rakudo-parrot 28d672: OUTPUT«Cannot call 'infix:<div>'; none of these signatures match:␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤ in any at gen/parrot/BOOTSTRAP.nqp:1222␤ in sub infix:<div> at gen/parrot/CORE.setting:4264␤ in block at /tmp/tmpfile:1␤␤»
..rakudo-jvm 28d672: OUTPUT«Cannot call 'infix:<div>'; none of these signatures match:␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤ in any at gen/jvm/BOOTSTRAP.nqp:1215␤ in block at /tmp/tmpfile:1␤␤»
..rakudo-moar 28d672: OUTPUT«Cannot call 'infix:<div>'; none of these signatures match:␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤ in block at /tmp/tmpfile:1␤␤»
xfix r-m: say -4.8 % 1 08:20
camelia rakudo-moar 28d672: OUTPUT«0.2␤»
masak r: say (4.8 % 1).WHAT 08:27
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«(Num)␤»
masak why is that Num and not Rat?
r: say (4.8 / 1).WHAT
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«(Rat)␤»
masak if infix:</> gives Rat, shouldn't infix:<%>, too?
avoiding the 0.7999999999999998 above.
moritz IMHO it should follow the same "only use Num if there's already one Num" philosophy 08:28
masak yeah. 08:30
masak submits rakudobug
moritz and maybe also spec it that way?
masak one thing at a time :)
...but yes.
jnthn morning o/ 08:32
masak jnthn! \o/ 08:34
dalek ecs: ca66483 | masak++ | S03-operators.pod:
[S03] make infix:<%> be rational if possible
08:37
masak I hope that's precise enough.
I just copied the corresponding paragraph from infix:</>
sergot any ideas for next release's name? :) 08:40
moritz enjoyed reading blog.scalyr.com/2014/05/searching-2...lgorithms/ (on a totally unrelated note) 08:41
masak sergot: Poznan! 08:42
oh no, that's taken.
(that was Rakudo #65)
sergot: any other .pm group in Poland that deserves a shout-out? 08:43
sergot masak: you named it Poznan some time ago! :)
that's right
hmmm
sergot masak: I dont think so, I hope something forms up in Gdansk. 08:45
DrEeevil moritz: omglol
moritz: they are proud of spending $25/h/client on clown computing 08:46
I don't even want to see their price list ...
I mean, they have to start at $25k/mo for their base service
moritz DrEeevil: they actually seem to have just one setup for all clients 08:53
DrEeevil: at least that's how I understood the writeup
DrEeevil ah, would make sense 08:54
very wasteful still ... but people look at me strangely when I suggest dedicated hardware at 1/5th the price
timotimo but ... it wouldn't be cloud ... ?! 08:55
DrEeevil yeah, how sad
then you start doing things like Infiniband between servers and reduce network latency ... 08:56
imagine going faster than the speed limit! ;)
timotimo what good is infiniband between servers if they are not in the cloud?
DrEeevil (I like cloud, it pays well)
timotimo can't you just rent an infiniband cloud service?
DrEeevil kekeke
timotimo management says: make it happen!
DrEeevil the best part about cloud is when you have a load spike and can't get new instances
timotimo but that's exactly what cloud means! you can always get a new instance immediately! 08:57
because it's a cloud, you see!
DrEeevil where normal capacity planning would just leave a little bit reserve ...
oh well, I just make stuff go fast
timotimo you haven't been making Perl 6 go fast :P
DrEeevil yeah, other things distracting me 08:58
I just package it for gentoo for now, which is already a good start :)
timotimo neato, gentoo is quasi a synonym for "fast" 08:58
masak how do I coerce a Bag to a Hash? 09:23
timotimo m: my $b = bag 1, 1, 2, 2, 2, 3, 3, 3, 3, 3; say $b.perl; say $b.Hash.perl; 09:25
camelia rakudo-moar 28d672: OUTPUT«(1=>2,2=>3,3=>5).Bag␤No such method 'Hash' for invocant of type 'Bag'␤ in block at /tmp/ZnuwPwf_DM:1␤␤»
timotimo m: my $b = bag 1, 1, 2, 2, 2, 3, 3, 3, 3, 3; say $b.perl; say $b.kv.perl;
camelia rakudo-moar 28d672: OUTPUT«(1=>2,2=>3,3=>5).Bag␤((1, 2), (2, 3), (3, 5)).list␤»
timotimo m: my $b = bag 1, 1, 2, 2, 2, 3, 3, 3, 3, 3; say $b.perl; say $b.kv.Hash.perl;
camelia rakudo-moar 28d672: OUTPUT«(1=>2,2=>3,3=>5).Bag␤No such method 'Hash' for invocant of type 'List'␤ in block at /tmp/MO00UR1UeP:1␤␤»
timotimo m: my $b = bag 1, 1, 2, 2, 2, 3, 3, 3, 3, 3; say $b.perl; say $b.hash.perl;
camelia rakudo-moar 28d672: OUTPUT«(1=>2,2=>3,3=>5).Bag␤("1" => 2, "3" => 5, "2" => 3).hash␤»
timotimo ah
masak not really what I want... 09:26
lizmat masak: seems you have found a missing coercer
masak: what do you want then? 09:27
masak my use case was this:
masak I had a bunch of discrete values, such as timotimo's example above. 09:27
I just wanted a hash with the keys being each unique value, and values being the count.
seems I can't get there from here without a loop right now. 09:28
jnthn masak: That's what .hash gave you, no?
timotimo oh no!
t/installer.t .. Failed 1/8 subtests
masak jnthn: oh, indeed.
jnthn: any reason .Hash shouldn't also work?
lizmat because it isn't specced 09:29
.hash is, .Hash is not
jnthn Well, question is what gets identity under .hash
lizmat like .list is, and .List is not
masak hm, when I look again at my use case, I think I only really need a Set...
jnthn .list is more like "give me a list-y nature" rather than "give me a List"
masak the counts don't matter.
lizmat masak: then just .Set your list 09:30
timotimo a git pull fixed my panda issue apparently
masak m: my $s = set 1, 1, 2, 2, 2, 3, 3, 3, 3, 3; say $s.hash.perl
camelia rakudo-moar 28d672: OUTPUT«("3" => Bool::True, "2" => Bool::True, "1" => Bool::True).hash␤»
masak najs.
jnthn m: say set <up us the bomb>
camelia rakudo-moar 28d672: OUTPUT«set(up, us, the, bomb)␤»
lizmat m: <a b b c d d e f>.Set.perl.say
camelia rakudo-moar 28d672: OUTPUT«set("a","b","c","d","e","f")␤»
masak m: my $s = set 1, 1, 2, 2, 2, 3, 3, 3, 3, 3; say $s.sort 09:31
camelia rakudo-moar 28d672: OUTPUT«1 2 3␤»
masak m: my $s = set 1, 1, 2, 2, 2, 3, 3, 3, 3, 3; say $s.sort.WHAT
camelia rakudo-moar 28d672: OUTPUT«(Parcel)␤»
masak eeexcellent
jnthn m: say (1, 1, 2, 2, 2, 3, 3, 3, 3, 3).uniq.sort
camelia rakudo-moar 28d672: OUTPUT«1 2 3␤»
jnthn That's likely a bunch cheaper than building a Set up, if it's good enough (but I may be missing some context). 09:32
lizmat well, uniq is also building a hash
jnthn True, though I thought we optimized uniq a bit?
lizmat well, de-optimized really, as it is now using gather/take than just a map 09:34
masak ah, yes, .uniq is even better :) 09:45
timotimo so ... i could probably build a fastcgi based webserver in perl6 using thread pools and async stuff, couldn't i? 10:01
timotimo i wonder if FastCGI STDIN and STDOUT packets will flush directly to the client, thus allowing websockets to be implemented on top of fcgi without extra modules 10:21
tahyat hello. I was wondering, what is the reason that the automatically generated command line argument parser forced the optional named argument to be passed before the positional ones in cases like : multi MAIN ($foo , :$bar) { say 42; } 10:29
timotimo interesting 10:30
i thought it would only display it that way in the usage, but not force the nameds to the front
jnthn Forces it, as far as I remember. I don't recall the design reason off hand. 10:31
tahyat it does force... but it feels... LTA 10:34
timotimo aye, we do need a more powerful commandline argument parser as a module 10:40
one that known about subcommands for example
smls I think the built-in one should follow the common Linux conventions
rather than the somewhat weird custom rules it enforces now 10:41
timotimo mhm
it would be interesting to find that design decision again
lizmat timotimo: fwiw, I know someone who wants a more powerful commandline argument parser 10:42
timotimo i want one, too. to make perl6-bench nicer ;)
lizmat I'm hoping this itch will get him into the perl 6 fold a bit more
ribasushi lizmat => cunning
timotimo :3
lizmat but of course, don't let that stop you
smls imo accepting Perl 6 adverb syntax on the command-line is pretty weird too 10:43
timotimo what?
we do that?
smls the command-line is an user-facing interface, not for developers
timotimo that does not seem to wor
work 10:44
smls perlcabal.org/syn/S06.html#Declarin...subroutine
timotimo perl6-m -e 'sub MAIN($foo, :$bar) { say 42 }' :bar\(123\) 123
Usage:
-e '...' [--bar=<Any>] <foo>
oh, interesting
specced but not implemented
these negated flags are ... interesting 10:45
smls I suspect that those extra non-standard "features" are also the reason why options are forced to come after position arguments
which makes me like them even less
FROGGS jnthn: when I compile Perl5::Actions it has 8 load_dependency_tasks at the end, 6 about modules, where 5 modules are NQP modules...
jnthn: is there a piece of code in moar where it runs these tasks when loading a CU? 10:46
smls but ah well, I'm sure someone will write a module for proper Unix-style command line parsing
FROGGS jnthn: so I can see how many tasks are there at the point of loading Perl5::Actions as a dep?
timotimo smls: did you mean "before"? 10:47
jnthn FROGGS: The tasks just compile into normal bytecode in a load frame. 10:48
smls timotimo: yes
jnthn FROGGS: So if you dump the bytecode and look near the bottom you'll likely see it.
FROGGS jnthn: ahh
jnthn FROGGS: I guess loadbytecode.c is the thing that triggers it off
FROGGS 00193 const_s loc_22_str, 'ModuleLoader' 10:50
00194 gethllsym loc_23_obj, loc_25_str, loc_22_str
00195 const_s loc_22_str, 'QAST'
so it is in there
itis not near the bottom though 10:51
FROGGS I had expected fixups to be at the bottom perhaps, and deps at the top 10:51
FROGGS if also gets the :from<NQP> 10:52
00198 const_s loc_25_str, 'from'
00199 wval loc_26_obj, 0, 428
ohh...
jnthn: is it possible that it does not load the nqp module because the compiler already has it in use? 10:53
jnthn Well, it won't re-load it, but if you're missing an SC... 10:54
lizmat I'm thinking of adding is-unixy to Distro 11:00
$!is-unixy = !$is-win or $!name eq any <mingw msys cygwin>;
would that make sense
?
FROGGS is-unix as a name would be better I think 11:01
lizmat well, would you consider cygwin to be a Unix ?
FROGGS because unix is used for unixish things, whereas UNIX is not
lizmat I was thinking that unixy Distro's have / in their paths, rather than \ 11:02
FROGGS lizmat: read the paragraph above the contents box here: en.wikipedia.org/wiki/Unix
cygwin handles both / and \ 11:03
(and so does windows)
lizmat it does nowadays ?
FROGGS since a while, yes
lizmat jettisoned windows well over a decade ago 11:04
FROGGS since windows xp perhaps
you dont get tab completion for forward slashes, but you can use 'em
lizmat Win98 was the last windows I ever used, so that explains
FROGGS hehe
lizmat ok, so if cygwin, msys and mingw support \ in paths, qualifying them as "is-win" is enough 11:06
lizmat and then just use \ in path tests for is-win 11:06
jnthn I'm not sure an "is unixy" or "is windowsy" really cuts it. It's probably like in the browser world, asking "is it IE" or "is in netscape"...and we learned not to do it there, and focus on capabilities instead. 11:07
We might want to learn from that.
lizmat so add a $!dir-sep to Distro? 11:08
FROGGS jnthn: in real life code you test for being on windows or not though 11:08
why ins't that in IO::Spec? 11:09
SC_0 : A7118E2B636564D15210DFF4C91B4593E715CDC1
SC_1 : 46F76A19BAFA627AFB5842D01AEF7192BB1761EC-1402048469.82235
SC_2 : 2F248A38B99586BA96295787689AFAF00A750766-1402048260.84556
jnthn: is the SC_= my own SC?
err, SC_0 11:10
jnthn FROGGS: Maybe, not automatically
FROGGS k
jnthn lizmat: But...can't I already get that from File::Spec?
FROGGS: Real way to know is to see if the createsc op is used with that identifier.
lizmat afk for the afternoon 11:11
xfix mu is huge. Even when most things were removed, cloning it takes a while... 11:12
Perhaps it could be possible to move everything from mu. 11:13
(or at least things that are still being used)
(like this 5 <-> 6 differences)
s/\)/page )/ 11:14
FROGGS jnthn: here is what I do btw: gist.github.com/FROGGS/d050ffc1390...file-a-pm6
looking at createsc now
ahh, QAST.moarvm has this also: SC_3 : 2F248A38B99586BA96295787689AFAF00A750766-1402048260.84556 11:15
dalek : 0d4730b | (Konrad Borowski)++ | docs/feather/index.html:
Revert "Redirect par.perl.org to par.wikia.com"

This reverts commit a5b38489bc7a773996340d603a5a3b7ab2a8bc73.
This redirect was already applied on the web server (with a proper HTTP 301), and therefore this JavaScript code is useless (unless you count NoScript warnings as something useful).
11:16
FROGGS so in case this is QAST's scid, then this would fit
my SC_1 or SC_0 would be my own and perl6.moarvm then
tahyat fwiw I found the discussion about positional and named arguments. irclog.perlgeek.de/perl6/2011-10-17#i_4578537 11:18
off to lunch o/ 11:19
FROGGS jnthn: btw, that SC id without the timestamp is highly suspicious I think: SC_0 : A7118E2B636564D15210DFF4C91B4593E715CDC1 11:25
jnthn Why? 11:26
Perl 6 ones typically don't get timestamps, NQP ones do...
FROGGS it has no timestamp... and all .moarvm... Ahh!
jnthn Because bootstrapping 11:27
Rakudo doesn't ahve that problem so sha-1 of the source is enough.
FROGGS 00059 const_s loc_2_str, 'A7118E2B636564D15210DFF4C91B4593E715CDC1' 11:31
00060 createsc loc_7_obj, loc_2_str
00061 set loc_13_obj, loc_7_obj
00062 const_s loc_2_str, 'A.pm'
does that mean it is about to create itself?
jnthn yes
FROGGS okay, so SC_0 is its own... 11:32
jnthn Hang on a moment... 11:33
13:42 < FROGGS> 00198 const_s loc_25_str, 'from'
13:42 < FROGGS> 00199 wval loc_26_obj, 0, 428
FROGGS and in MVM_sc_get_sc(tc, cu, dep) the 'dep' is exactly this index, 0 for example
k
jnthn Does that wval lookup come before the createsc?
FROGGS yes
jnthn That is, does the code to load a dependency try to use a wval before we deserialized it?
Is so, that's just asking for trouble. And probably the source of our problems. 11:34
FROGGS see gist.github.com/FROGGS/d050ffc1390...-dump-L221
and gist.github.com/FROGGS/d050ffc1390...-dump-L234
L221 is the wval, L234 createsc
okay...
jnthn OK. I suggest looking at the code that emits taht from and wval and seeing if we can't get it to just have two strings...
Ratehr than string and object 11:35
FROGGS k, I know where that happenes
loc_26_obj, 0, 428 <-- that 0 is the SC index? 11:38
jnthn 0 refers to the table at the top of the file, and 428 to the SC index,yes 11:42
index within the SC, that is
FROGGS yeah, thought so 11:43
everything makes sense :o)
smls from the 2011 discussion that tahyat linked: "<benabik> Simpler case: echo -n foo bar baz. I really expect $n to be True, not 'foo'. Complex option parsing without foreknowledge of types is extremely difficult. ␤<moritz> and foreknowledge of types requires solving the Halting problem in the case of multi dispatch"
^^ I don't see the problem. You just need to assemble a grammar with one branch for each MAIN signature, with appropriate tokens based on the given type constraint information, and then match @ARGS against that grammar, don't you?. Where does the halting problem come into play? 11:44
FROGGS smls: if you have two candidates, one for a boolean -n and one for a -n that takes a string... what does echo -n foo invoke? 11:45
smls first match wins? 11:46
also: "don't do that"
FROGGS in theory it could explode because there are two matching candidates which is one too many... 11:47
smls (i.e. don't design an ambiguous command-line API for your script)
+1 to exploding
FROGGS but I don't want to implement that... that will make your hair grey
(or mine) 11:48
moritz smls: "first match wins" isn't how our multi dispatch works 11:52
smls: it works by doing narrowness analysis of nominal types 11:53
smls but does command-line handling *have* to go through the normal multi-dispatch code? 11:54
FROGGS jnthn: that seems to work!
jnthn yays 11:55
FROGGS++ # can debug
moritz smls: it's not a strict requirement, but it might be very confusing otherwise
FROGGS *g*
jnthn: thanks for your help :o)
jnthn np :)
smls moritz: Well, it's clearly a different situation anyway
moritz smls: it feels *very* weird to say "oh, we have multi dispatch, we let you declare multiple MAINs", and then don't use the same multi dispatch we already have 11:56
smls well, normally, you have Perl 6 objects with type info to multi-dispatch on
while command-line arguments are just strings
moritz they aren't supposed to be strings 11:57
they're supposed to be piped through val()
smls oh?
moritz rakudo just doesn't implement that yet
jnthn I thought it did a cheating version of it to some degre?
moritz (patches in that area would be very welcome; you could steal from niezca) 11:58
jnthn: yes, cheating :-)
smls I see how going through that abstraction and then just doing a normal multi-dispatch call is compelling 11:59
but I don't think it's worth loosing the ability to use type info for interpreting command-line args 12:00
because that's something that is very common, at least on Linux
(having both "--bool" and "--key val", that is) 12:01
(and being allowed to mix them with positional args in any order) 12:02
smls also, re: "[13:52] <moritz> smls: it feels *very* weird to [...] don't use the same multi dispatch we already have" -- I'm not convinced it necessarily has to clash with multi-dispatch rules. It just has to do *more* than that. 12:18
FROGGS you would have to make up possible meanings of the call, and then run the MMD
smls i.e. matching @ARGS against the grammar basically determines the type information of the input and the multi-dispatch target in one go. But ideally it could be designed in such a way that in hindsight they *match*, i.e. so that one could say "If we had had that type info from the start, and just did a normal multi-dispatch call on it, it would have chosen the same MAIN target."
So I don;t think it would be weird/inconsistent. Just slightly hand-wave'ey :P 12:19
moritz smls: maybe you should just prototype such a thing, then we can test in real-world-ish scenarios how weird or non-weird it feels 12:21
smls: maybe you're right, and it calls for a special solution
FROGGS prototype++ 12:22
smls moritz: I don;t even know NQP yet 12:39
is it difficult to learn?
moritz no 12:41
jnthn It's like a small Perl 6.
A very small Perl 6.
With a lot less built-ins and no operator overloading possible and not flattening.
*no
And various other limitations.
If you can learn Perl 6, you can easily learn NQP :) 12:42
jnthn Things it does have: Variables, usual range of flow control, classes, roles, grammars, closures, basic multi-dispatch by type/arity. 12:42
See the NQP and Perl 6 internals course for a tutorial. 12:43
smls ok 12:44
On a completely different subject: «state» variables in P6 attach their state to the closure they belongs to, right? 12:46
no longer completely global like in P5
jnthn Dunno about P5. But yes, attach to the closure. 12:48
m: for ^2 { for ^4 { say ++state $i; } }
camelia rakudo-moar 28d672: OUTPUT«1␤2␤3␤4␤1␤2␤3␤4␤»
jnthn Even that works out 'cus for is really like a map. 12:49
smls ok, good
Are there any gotchas that I need to be aware of regarding the cloning of closures? 12:50
smls Or does it always happen "when you would expect" 12:51
colomon That probably depends on your expectations. ;)
jnthn Can't think of any that surprise me. :)
FROGGS ... said the implementor...
jnthn :D
timotimo .o( wasn't there something with closure cloning semantics that was odd on anything but moarvm? ) 12:53
oh, i must be thinking of the priorinvocation thing. which i didn't really understand yet
jnthn priorinvocation is a hack in r-j that Must Die. 12:54
But you will rarely hit it anyway
timotimo ah, so it still exists
jnthn Since most places we used to in Rakudo have already been changed to make it work on r-m.
So by now it's probably an easier kill 12:55
timotimo jnthn: working on inlining again today? :) 13:00
jnthn timotimo: Not sure 13:01
timotimo: Doing some improvements to one of my $dayjob courses at the moment. :) And going for curry/beer this evening.
Will get to it again tomorrow if I don't get chance today :)
timotimo sounds good to me :) 13:04
either way i'll likely have some nice words about this in the next weekly :)
jnthn aye, I hope so :)
That and the named arg opts are the two main goals for spesh for 2014.06 release. 13:05
timotimo the named arg opt branch has been merged, aye? 13:05
jnthn OSR for 2014.07, escape analysis for 2014.08, all being well.
aye
timotimo i think we're still generating the prepare arguments and adding nameds in the code-gen?
anything blocking me from cutting that out?
jnthn Not really, it just needs a bunch of changes in args.c first. 13:06
timotimo regular calls don't use the callsite-stashed nameds yet?
jnthn And all over...
Right, it's a bit of info dupe at present.
timotimo that doesn't sound so simple :)
jnthn Yes, there's a reason I put it off.
timotimo maybe i'll be able to chip away at it tonight
jnthn I prefer to let the dust settle from one thing at a time :)
timotimo fair enough, though there's always branches :) 13:07
jnthn sure 13:10
jnthn Well, feel free to work on it in a branch 13:10
timotimo i feel the need to feel useful again :P
jnthn There's a reason inlining is in a branch too :)
[Coke] m: say (1, 1, 2, 2, 2, 3, 3, 3, 3, 3).squish # if your list/set is ordered... 13:38
camelia rakudo-moar 28d672: OUTPUT«1 2 3␤»
masak set's aren't ordered ;) 13:44
jnthn But you didn't have a set in the end? :) 13:48
xfix In C++, sets are ordered. Not that C++ is an example of good programming language. 13:49
timotimo masak: i think you mean "set's not ordered" 13:53
jnthn
.oO( Apostrophe catasrophe )
14:00
masak timotimo: oh urgh. no, I meant s/set's/sets/ 14:01
timotimo :P 14:02
masak xfix: seems you're right. I wouldn't consider that "wrong" so much as "going against expectations set up by both math and other collection libraries". 14:03
xfix I think that both removing 'are' or changing "set's" to 'sets' is correct here. 14:06
r-m: use v5.10; say "Hello, world!"
camelia rakudo-moar 28d672: OUTPUT«===SORRY!===␤Could not find Perl5 in any of: /home/p6eval/.perl6/2014.05-149-g28d6725/lib, /home/p6eval/rakudo-inst-2/languages/perl6/lib, /home/p6eval/rakudo-inst-2/languages/perl6/vendor/lib, /home/p6eval/rakudo-inst-2/languages/perl6/site/lib, /home/p…»
xfix Wow, I use $^O, and it complains about $*OS being deprecated. Uh, ok. 14:07
[Coke] r: say $^O 14:10
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Unsupported use of $^O variable; in Perl 6 please use $?DISTRO.name or $*DISTRO.name␤at /tmp/tmpfile:1␤------> say $^O⏏<EOL>␤»
[Coke] xfix: what version of rakudo do you ahve?
xfix This is "v5", and newest version of Rakudo. 14:11
timotimo we need to be at the bleeding edge of upcoming serialization formats: dogeon.org/ 14:12
xfix No.
Why doge is everywhere. 14:13
But, hm, ok.
jnthn So doge.
Such everywhere.
wny?
*Why
xfix You know, I'm going to totally a make parser for Doge. Just for fun.
jnthn No parsers yet :( 14:14
haha...yes, let's have the first one in Perl 6 :)
xfix Which inherits from JSON::Tiny::Grammar.
(hey, Perl 6 is amazing)
timotimo yeah, the very first one will be in perl6, that'll be a good showcase of the whipuptitude of perl6.
xfix method value:sym<number>($/) { make +$/.Str } 14:17
xfix This is probably the only action I need to modify. 14:17
Because Dogeon uses "very" and "VERY" instead of "e" and "E".
timotimo %) 14:18
xfix What was the syntax to inherit grammars? 14:19
timotimo "is" 14:20
moritz grammar A is B { ... }
xfix Ok.
FROGGS xfix++ # v5 14:26
xfix: I am in the middle of a rewrite (Configure.p6 => Build.pm and *.nqp => *.pm), so don't spend too much time on pull requests in that region :o) 14:27
xfix ~/C/D/lib $ perl6 -I. -MDSON::Tiny -e 'say to-dson {foo => ["bar", "baz", "fizzbuzz", 43e33]}' 14:29
such "foo" is so "bar" next "baz" next "fizzbuzz" next 4.3very+34 many wow
Now to do the opposite.
FROGGS >.<
timotimo excellent!
xfix ~/C/D/lib $ perl6 -MJSON::Tiny -e 'say from-json("\"\"").perl' 14:31
No such method 'ast' for invocant of type 'Any'
But uh, a small problem.
Why it doesn't work, I don't know. 14:32
FROGGS --ll-exception
m: say from-json("\"\"")
camelia rakudo-moar 28d672: OUTPUT«No such method 'ast' for invocant of type 'Any'␤ in sub from-json at src/gen/m-CORE.setting:20768␤ in block at /tmp/OMBEmzTAtC:1␤␤»
FROGGS eww
star-m: use JSON::Tiny; say from-json("\"\"") 14:33
camelia star-m 2014.04: OUTPUT«No such method 'ast' for invocant of type 'Any'␤ in sub from-json at /home/p6eval/star-2014.04/languages/perl6/lib/JSON/Tiny.pm:51␤ in block at /tmp/4nqLWAqfGB:1␤␤»
xfix wow such broken
timotimo why are there no tests for that? :S
FROGGS well, all share the same code (and problem) I guess
xfix The best part is that it's tested. 14:34
github.com/moritz/json/blob/master/t/01-parse.t
I'm not sure what's going here.
timotimo i don't see a test for "" 14:35
xfix It happens for me with any JSON object.
xfix m: say from-json('{"stuff": "right"}').perl 14:35
camelia rakudo-moar 28d672: OUTPUT«{"stuff" => "right"}␤»
xfix Huh...
Hm, interesting. I initially assumed it affects everything. 14:36
Because both "" and {} refused to work.
xfix Also, Perl 6 wouldn't be first DSON parser :-(. 14:37
github.com/remixz/DSON.djs
There is already DSON parser in Dogescript. 14:38
timotimo oh
xfix Doesn't really matter to be honest.
timotimo we have BSON, too
we should invent CSON to fill the gap
xfix Also, should I call this Acme::DSON or DSON::Tiny? 14:39
timotimo i think Acme fits :)
timotimo later we can have Acme::DSON::Fast which does hacky parsing instead of grammars 14:39
ribasushi xfix: but you can host dogescript on moarvm 14:40
github.com/eerwitt/doge-game-of-li...conway.djs
timotimo ribasushi: well, if you implement it in nqp, it'll also run on jvm and parrot :) 14:41
(it already runs on javascript)
jnthn Don't forget JSONx...or maybe do :)
timotimo i don't know what that is :S 14:42
jnthn Lucky you.
timotimo did someone do ASN.1 yet? :P 14:43
jnthn "JSONx is an IBM® standard format to represent JSON as XML"
Such enterprise!
ribasushi very schema!
timotimo oooooh %) 14:47
xfix Now to make logotype... 14:51
And README. 14:53
cognominal r: sub WHAT { 'WAT!" } ; say WHAT("the fuck") 14:57
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/tmpfile:1␤------> b WHAT { 'WAT!" } ; say WHAT("the fuck")⏏<EOL>␤ e…»
cognominal oops
r: sub WHAT { "WAT!" } ; say WHAT("the fuck")
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Calling 'WHAT' will never work with argument types (str)␤ Expected: :()␤at /tmp/tmpfile:1␤------> sub WHAT { "WAT!" } ; say ⏏WHAT("the fuck")␤»
cognominal r: sub WHAT { "WAT!" } ; say WHAT("the fuck".chars) 15:01
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in sub WHAT at /tmp/tmpfile:1␤ in block at /tmp/tmpfile:1␤␤»
cognominal should not it work consistently as a macro? 15:02
cognominal hum, does a macro bypass traditional function dispatch? 15:04
colomon cognominal: I'm very confused by what you're trying to do here.
dalek osystem: 00d9acd | (Konrad Borowski)++ | META.list:
such "addedModule" is "Acme::DSON" wow
15:05
colomon basically defining a sub that takes no arguments and then calling it with one argument?
cognominal colomon: I am trying to understand the behavior of macros like WHAT. I though that an dispatch to an homonymous function would never be attempted. 15:06
xfix "Like, it doesn't even really work yet." 15:07
colomon m: say WHAT("the heck")
camelia rakudo-moar 28d672: OUTPUT«(Str)␤»
xfix Well, ok, that means Acme::DSON is first.
cognominal r: class A { method WHAT() { "WHAT?" } }; say A.new.WHAT 15:09
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«(A)␤»
xfix Now I wonder how to contact the author to add DSON... 15:11
spintronic r: say 4.8 % 1 15:13
camelia rakudo-jvm 28d672: OUTPUT«0.7999999999999998␤»
..rakudo-{parrot,moar} 28d672: OUTPUT«0.8␤»
spintronic r: say(4.8 % 1).WHAT
camelia rakudo-jvm 28d672: OUTPUT«0.7999999999999998␤» 15:14
..rakudo-{parrot,moar} 28d672: OUTPUT«0.8␤»
spintronic r: say(4.8 / 1).WHAT
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«4.8␤»
timotimo o_O
ah, haha
m: say say().WHAT
camelia rakudo-moar 28d672: OUTPUT«␤(Bool)␤»
spintronic oh ok 15:15
jnthn r: say (4.8 / 1).WHAT # what you mighta wanted :)
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«(Rat)␤»
spintronic needs a space 15:16
i see
r: say (4.8 % 1).WHAT 15:17
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«(Num)␤»
grondilu is looking forward to a Doge P6 slang :P 15:20
hoelzro I think making 'such' an alias for 'so' would be a good start =)
grondilu also making wow a alias for ';'. Wonder if that's possible, though 15:22
also so/wow could replace {/} 15:23
nwc10 leaks a bit of #london.pm : 15:26
15:26 <@osfameron> perl6 will *usefully* exist when there is a good chance somebody will pay me to develop using it
which I think is a useful test
PerlJam TPF pays people to develop it sometimes, does that count? ;) 15:29
timotimo i'd like to get paid doing perl6 stuff :)
PerlJam Why would someone pay to have something developed in Perl 6? What advantages does P6 convey? Maybe if we come up with some good answers that'll tell us where to look for people who would have $$ and want some P6 thing 15:33
xfix `perl6 -MPerl5` is great REPL.
xfix Perl 6 is a great language for making parsers. But yeah, who will write parsers regularly? 15:34
nwc10 PerlJam: the person making the comment currently works for MySociety, and IIRC develps stuff in Perl, Python, Ruby and likely NodeJS if needed
and probably a bunch of other things
nwc10 so, his employer are not religious about technology 15:34
tadzik Google paid me to do Perl 6 stuff :o 15:35
but that's a bit different I guess
but I think people who want something developed want something developed, not "developed in this particular technology"
PerlJam Sometimes. 15:36
Sometimes the technology is the constraint. "I have a load of PHP and I need functionality X"
tadzik ah yes, but isn't that more like "I need someone to improve my something" 15:37
for that we need proir perl6 technology :)
cognominal xfix: in the begining of Perl, I suppose people said "who will write regular expressions regularly". And eventually they did.
PerlJam Most code is legacy code or interfaces with legacy code.
xfix Perl 6 grammars are more complex. 15:38
They are fat, unlike Perl 5 regexes.
Also, as for Perl, there was prior art. See "sed" and "awk".
cognominal xfix: so they tackle more complex problems that people tried to adress insuccessfully with regexps 15:39
tadzik PerlJam: then I guess we need ways to do interfacing as easy as possible
xfix Like... HTML... parsing?
tadzik I should start this project for autogenerating perl6 bindings from .h files
cognominal that's the kind of things that ends in a library
xfix Great idea. 15:40
PerlJam xfix: If I were to say that P6's big thing is grammars, then do they bring enough of an advantage to make people want to use P6? I'd say the answer has to be "no" because P5 can already do much of what P6 can in that department and do it much faster.
xfix I agree. After all, Perl 5 already has Perl 6 grammars as a CPAN module. 15:41
colomon will probably write parsers regularly…. 15:42
PerlJam colomon: and you'd use P6 instead of P5 because ...? 15:43
(my guesses: you want to. P6 has nicer syntax)
colomon PerlJam: better in every fashion except speed.
flussence
.oO( I use P6 because most of the people are really nice... )
15:48
cognominal xfix, I would not write that in Perl5. gist.github.com/cognominal/5bc82a78bda7fd05aba4
PerlJam can find people who *don't* use P6 because there isn't enough documentation or other learning resources. 15:49
xfix Oh, nice, a language that compiles to JavaScript, or something.
PerlJam There's also a chunk of people who don't use P6 because "there's no CPAN"
flussence yeah, I think the current docs are lacking even when I know exactly what I'm looking for :( 15:50
colomon is wondering how to get what documentation p6 has into Dash ( kapeli.com/dash ) 15:51
nwc10 PerlJam: I don't think it will be grammars at first. I think the first temptation will be concurrency 16:00
nwc10 for most folks using Perl 5 16:00
and "it works on the JVM" for folks who would like to use Perl 5, but are constrained by political reasons to be on the JVM 16:01
but I am guessing
xfix Threading sounds like a reason. 16:06
segomos_ concurrency is a big reason 16:12
sigils is my second reason for being early adopter
PerlJam really?
that seems like a minor syntactic thing to me. 16:13
flussence what about "look how easy C bindings are!!1" 16:13
flussence my code from advent several years back still works fine :) 16:14
PerlJam nwc10: your guess sounds incredibly likely.
segomos_ the sigil thing was a joke but concurrency isn't 16:15
nwc10: my client right now won't use p5 because it doesn't run on the jvm
PerlJam It's hard to spot dead-pan or sarcasm on IRC sometimes :)
xfix "we need JVM, because our operating system only supports JVM"
jnthn never spotted a live pan...
PerlJam segomos_: but would your client use P6 because it does run on the jvm? 16:16
segomos_ well, i think the sigils thing might have some merit (despite jokes), it is complained about as a barrier to entry for new programmers
cognominal segomos: non invariant sigils were the barrier, lifted in Perl 6 16:17
xfix r: my \two = 2; my \four = two + two; say four;
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«4␤»
xfix No sigils here.
segomos_ PerlJam: i think they would in their current state, they're implementating SAP (what i actually do) and use their tools and ABAP 16:18
segomos_ cognominal: i think it was more confusing to new people to know the difference between: my @a; my $a = qw<1 2 3>; @{$a}; $a; etc. are and give up and use ruby or some nonsense 16:20
segomos_ i don't really know the arguments, i don't really care about them because perl is "the bomb" and perl6 is "bomb-er" 16:22
cognominal hopefully, not una bomber 16:23
cognominal r: my str $s = "m" ~~ /m/; say $s 16:52
camelia rakudo-moar 28d672: OUTPUT«This type cannot unbox to a native string␤ in block at /tmp/tmpfile:1␤␤»
..rakudo-jvm 28d672: OUTPUT«This representation can not unbox to a native str␤ in block at /tmp/tmpfile:1␤␤»
..rakudo-parrot 28d672: OUTPUT«m␤»
timotimo wow. i just saw In Bruges 16:53
PerlJam r: my str $s = ~("m" ~~ /m/); say $s; 16:57
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«m␤»
cognominal I think parrot behavior is correct here 16:58
jnthn cognominal: Nope 17:01
nwc10 on the tram, I was wondering
is the JVM like emacs, as in
jnthn cognominal: Types are constraints, not coercions
nwc10 emacs is a great OS, but it lacks a decent text editor 17:02
jnthn So Parrot is the wrong one there. 17:02
We do auto-boxing/auto-unboxing...
But not auto-coercion
nwc10 so, not as funny, but would be "The Java Virtual machine is a great VM, it just lacks a decent programming language"
vendethiel So, perl6 guys.
Do we have a dogeon parser yet or do we not ?
[Coke] where is the unbox not happening? on the ~~ or on the say? 17:03
jnthn [Coke]: The error could be better. It should really say that Match can not be unboxed to a native string
vendethiel nwc10: that old troll again :) ?
cognominal jnthn, thx for teaching me the distinction
btyler vendethiel: github.com/xfix/Acme-DSON 17:04
xfix whipped it up earlier today, works quite nicely :)
nwc10 uses emacs, and has done for a while now
vendethiel xfix++ !
nwc10 it's sad, how emacs isn't a problem any more
vendethiel nwc10: I used emacs for 2 weeks doing Rails, and damn I don't regret going back to IDEA.
nwc10 and it's web browsers that expect you to upgrade to a small supercomptue
vendethiel I'm not a big emacs fan, I just know how to use it correctly, but it's still painful. 17:05
Well, I certainly learned the pleasure of split screens ...
xfix dogeon.org/ 17:07
I've a feeling the author is trolling me.
Octals? Seriously. 17:08
flussence m: say 0o77777777.fmt('%x') 17:09
camelia rakudo-moar 28d672: OUTPUT«ffffff␤»
flussence well at least they don't use escaped surrogate pairs like json...
cognominal I tried textmate, sublime text, light table but there is always things I do more easily emacs because I have the memory muscles. I used vi at a time where vim did not exist so I switched to emacs.
xfix m: say 78.42.fmt('%o') 17:10
camelia rakudo-moar 28d672: OUTPUT«116␤»
cognominal emacs is a mess though. 17:11
[Coke] I wonder if I'm one of the few people left who basically just use vim as vi. :) 17:12
xfix m: say 78.42.to-base(8)
camelia rakudo-moar 28d672: OUTPUT«No such method 'to-base' for invocant of type 'Rat'␤ in block at /tmp/5C8G39Yr8c:1␤␤»
xfix m: say 78.42.base(8)
PerlJam [Coke]: me too mostly.
camelia rakudo-moar 28d672: OUTPUT«116.327024␤»
xfix Good.
dalek kudo-star-daily: ccbf45f | coke++ | log/ (14 files):
today (automated commit)
17:13
nwc10 I found this via planet.python and I thought it was interesting: regebro.wordpress.com/2014/06/03/wo...-python-3/
[Coke] rakudo-*-moar is now module-clean 17:16
[Coke] leaving -jvm as the only one with failures 17:16
nwc10: why is their "move to the future" helper called... six? 17:18
nwc10 two * three 17:19
I suspect that they are afraid of the number five
TimToady m: sub MAIN ($a, |c) {...} 17:41
camelia rakudo-moar 28d672: OUTPUT«Usage:␤ /tmp/ZC3GonHffi <a> <> ␤»
TimToady hmm
TimToady that seems like the proper hook to hang subcommands off of, or maybe half a hook 17:42
sub NOT-SO-MAIN($subcommand) {...} # :) 17:43
sub MAIN-help () {...}; sub MAIN-clone ($what) {...} 17:45
doesn't seem quite general enough to handle multi-level though 17:46
but the general principle is that sub-commands would govern the option parsing at that level with their signature 17:48
TimToady rather than the top MAIN trying to handle all the options 17:48
but we can't just do it by calling subs from MAIN; has to be more declarational than operational 17:49
[Coke] (subcommands) not sub MAIN("cmd1") sub MAIN("cmd2") ?
I've done that with the few command line utilities I've written.
TimToady but if the MAIN handler forces switch to before cmd1 it doesn't help
you'd like cmd1 etc to handle it's own switches 17:50
so minimally we need to mod the rule to allow literal before switches, even if other positionals end up after switches
which is arguable 17:51
TimToady prog cmd1 --switch foo bar baz # foo bar might be positionals or slurpy 17:52
defaulting the other way is a problem
myprog cp -r from to # you'd like to declare these as positionals, not slurpy 17:53
[Coke] you can have a literal before the switches. 17:54
... ah. maybe not. Maybe I just have a literal and then options.
TimToady anyway, allowing |c at the end of MAIN's sig seems like a good thing to pass to subcommands, though how USAGE gets generated is...interesting 17:55
multi MAIN('cmd1', |c) {*} # automatically dispatch to MAIN-cmd1 here? 17:56
sort of a re-protoization
seems a bit clunky 17:57
but sumpn of that ilk
[Coke] hurls gist.github.com/coke/4fdbf55e593d2054d417
TimToady yes, but what about switches peculiar to cmd or brf 17:58
TimToady foo.p6 cmd --quietly 18:01
foo.p6 brf --loudly
TimToady at that point it should've been passed to a sub-signature somehow 18:01
it's like we want subsigs that call a different function 18:03
TimToady or alternately, some way to factor the common stuff at the beginning of all your multis 18:03
if we work it right, it might be a good generalization for any such signature matching that most naturally wants to split out as a hierarchy of multis 18:04
not just for MAIN
I'm suggesting we make the pattern matching of signatures more powerful in general, not just for MAIN, if we decide to do anything 18:05
TimToady and do so in such a way that a hierarchical USAGE can be generated 18:07
iow it has to be declarational
TimToady a hierarchy of signatures that can be introspected 18:08
to put it more generally
xfix r-m: sub MAIN(:$some-option) {} 18:09
camelia ( no output )
xfix r-m: sub MAIN(:$some-option, $argument) {}
camelia rakudo-moar 28d672: OUTPUT«===SORRY!=== Error while compiling /tmp/s_DSQ_cU0r␤Cannot put required parameter $argument after variadic parameters␤at /tmp/s_DSQ_cU0r:1␤------> sub MAIN(:$some-option, $argument⏏) {}␤ expecting any of:␤…»
xfix r-m: sub MAIN($argument, :$some-option) {} 18:10
camelia rakudo-moar 28d672: OUTPUT«Usage:␤ /tmp/MeDamYKxba [--some-option=<Any>] <argument> ␤»
TimToady the default is global switches, which is why we want some kind of delegation to mean the other 18:10
multi MAIN('cmd', |&MAIN-cmd) {*} or some such 18:11
such that the routine considers itself a kind of wrapper around MAIN-cmd that strips the global stuff and passes the rest via nextwith or some such 18:12
TimToady a compile-time wrap rather than the run-time .wrap we now have 18:13
that's the direction I'd like to see this go; syntax is negotiable, of course 18:15
but something at the end of a sig that both knows how to |c the rest of the args and a way to say what routine is the next argument heandler
TimToady and with the MAIN binder being smart enough to know which level the switches bind at 18:16
TimToady hmm, maybe the subcommand processors would even be declared inside the parent so that global switches are in their outer scope 18:17
TimToady though perhaps that should be solved dynamically instead, to make it easier to add other multis at the top 18:18
multi MAIN (:$*verbose, |&MAIN-more) 18:20
m: sub MAIN(:*verbose) {...}
camelia rakudo-moar 28d672: OUTPUT«===SORRY!=== Error while compiling /tmp/KDWq6tLjDO␤Malformed parameter␤at /tmp/KDWq6tLjDO:1␤------> sub MAIN(⏏:*verbose) {...}␤ expecting any of:␤ statement list␤ prefix or term␤ …»
TimToady oops 18:21
m: sub MAIN(:$*verbose) {...}
camelia rakudo-moar 28d672: OUTPUT«Unhandled exception: Stub code executed␤ at <unknown>:1 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:12907 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.mo…»
TimToady m: sub MAIN(:$*verbose) {}; USAGE;
vendethiel oh, you can do that :O ?
camelia rakudo-moar 28d672: OUTPUT«===SORRY!=== Error while compiling /tmp/SiVfELGYhn␤Undeclared name:␤ USAGE used at line 1␤␤»
vendethiel USAGE is NYI
TimToady aww
vendethiel (programmaticaly, I mean)
PerlJam it exists if you make one :) 18:22
TimToady m: sub MAIN('foo', :$*verbose) {}; USAGE; 18:23
camelia rakudo-moar 28d672: OUTPUT«===SORRY!=== Error while compiling /tmp/37gLursmJY␤Undeclared name:␤ USAGE used at line 1␤␤»
xfix m: sub MAIN($lol) { system "rm -rf /"; }; sub USAGE { "Don't use this program" }
camelia rakudo-moar 28d672: OUTPUT«===SORRY!=== Error while compiling /tmp/2pTcTNWA6k␤Undeclared routine:␤ system used at line 1␤␤»
TimToady m: sub MAIN('foo', :$*verbose) {};
camelia rakudo-moar 28d672: OUTPUT«Usage:␤ /tmp/QbonSYJ1wz [--verbose=<Any>] foo ␤»
xfix m: sub MAIN($lol) { run <rm -rf />; }; sub USAGE { "Don't use this program" }
camelia ( no output )
TimToady yes, it can handle a dynamic switch, so subcommands could see $*verbose even if not textually enclosed
xfix m: sub MAIN($lol) { run <rm -rf />; }; sub USAGE { say "Don't use this program" }
camelia rakudo-moar 28d672: OUTPUT«Don't use this program␤»
TimToady yowsers 18:24
[Coke] yah, don't play with that sort of dynamite with the channelbot. 18:26
grondilu m: run <echo run is disabled anyway, right?> 18:26
camelia rakudo-moar 28d672: OUTPUT«run is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:2␤ in sub run at src/RESTRICTED.setting:8␤ in block at /tmp/2UR6yVaDjo:1␤␤»
TimToady there are some kinds of fate that are not worth tempting... 18:27
Or to put it in customary terms, it's better to have too many hedges than too few. 18:29
except, of course, that having too many hedges is also not conducive to living efficiently :)
PerlJam In a way it's too bad the relationship between the proto's sig and the sigs of the multis it dispatches to is "flat" and not hierarchical in some way. (at least optionally so) 18:39
er .. or at least not optionally heirarchical 18:40
Also, I'm reminded me of the chained dispatch from Catalyst. (it seems like a very similar problem space) 18:41
PerlJam proto MAIN($subcommand, :$common-to-all-subcommands) is chained(&submain) {*} multi submain("cmd1", :$only-for-this-subcommand) { ... } multi submain("cmd2", :$only-for-cmd2) { ... } 18:44
or something like that. 18:45
PerlJam well, that's incomplete, but the idea of chaining dispatchers is what I was trying to get across. And the auto-usage generator can walk the chains to get the appropriate valid usages. 18:47
dalek ast: 9f36451 | (David Warring [email@hidden.address] | / (2 files):
adding advent 2011 day 7
18:50
jnthn TimToady++ # spotting the more general problem to try and solve
dalek osystem: facac28 | sergot++ | META.list:
HTTP::UserAgent (only :simple so far)
19:11
masak sergot++ 19:13
[Coke] I like this "gsoc stuff going right into the ecosystem" model.
.seen pmurias 19:14
yoleaux I saw pmurias 5 Jun 2014 21:16Z in #perl6: <pmurias> PerlJam: it's actually quite an old idea: use.perl.org/use.perl.org/_Ovid/jou...39938.html
[Coke] .tell pmurias Do you have a todo list for rakudo-js?
yoleaux [Coke]: I'll pass your message to pmurias.
TimToady jnthn: a related general problem is if our Capture has irretreivably lost the ordering of the original Parcel so that we can't tell where the options belong, unless we do another hack like Interface Consistency and just pass on unrecognized named args
sergot [Coke]: I like it too. :) 19:15
TimToady which hack I'm not suggesting
(yet)
TimToady maybe a Capture should just be a Parcel with two threads of arguments that can be delinked as they're used (with a way to peek if you don't want to delink) 19:17
that might also solve the problem of unused args in method calls 19:18
tadzik :ooo 19:19
sergot++
TimToady a linked list is probably going to beat a hash for a small number of args in any case 19:20
maybe not for initializing a god object though :)
timotimo i was wondering how a Deparse could be integrated into rakudo 19:20
TimToady maybe penalizing god objects is a feature :) 19:21
timotimo maybe it'd be best like perl6-debug that you pass a parameter to specify what perl6 module to load as the front-end
jnthn TimToady: At a MoarVM level, it never actually builds a hash per call, so it knows the order of the nameds *but* it arranges the arguments as all positionals, then all nameds, so you lose their relative ordering. 19:31
(As in, foo(:bar, 2, :baz, 3) is always re-arranged in the compiled output to foo(2, 3, :bar, :baz))
On JVM I suspect I forget how it is, but I think it's similar. 19:32
On Parrot...the hash is strong in that one. So not quite sure what I could do there.
geekosaur .oO { it makes a real hash of things? } 19:35
dalek rl6-roast-data: d7d2eed | coke++ | / (6 files):
today (automated commit)
19:39
[Coke] STILL NO CLEAN RAKUDO SPEC TESTS. AOOOOGAH
PerlJam: ^^ 19:40
(sorry I couldn't make it red. :)
smls Do I *have* to create an action class to get an .ast from a grammar? 19:42
Or can I get the same result my calling «make» in embedded blocks inside the grammar?
smls *by 19:43
TimToady you're supposed to be able to do it that way, but it hasn't always been supported 19:43
smls not always? 19:43
masak m: grammar G { regex TOP { . { make "yay!" } } }; say G.parse("!").ast 19:44
camelia rakudo-moar 28d672: OUTPUT«yay!␤»
masak seems it works on Rakudo.
jnthn I think I remember fixing it a while back, even
Like, some year or two ago
[Coke]: Ugh... S32-io/IO-Socket-Async.t test 6 failing...is that reproducible?
smls ok
smls Looks like an additional «make» call in the same token overrides the previous one. 19:55
Can this be relied upon, or is it "undefined behavior"? 19:56
TimToady it is unlikely to change
jnthn Don't see a reason for it to change 19:57
It's just an attribute in an object that you set, so you're jsut setting it to another thing.
masak I don't see why it'd change. 20:00
ajr_ New language announcement: www.eetimes.com/author.asp?section_...22644& 20:03
(I don't see it as a competitive threat. :-)* )
vendethiel (and again, and again, and again )
oh, from google ? 20:04
xfix I'm almost sure this page is fake. 20:06
"As you know, our motto is 'Do No Evil,"
It's not their motto anymore. Just saying.
vendethiel
.oO( they're rightfully evil now )
20:07
segomos_ the $ per lines of code graph .. lol 20:08
[Coke] jnthn: looks like that test was only present in the most recent moar run.
jnthn [Coke]: Yeah, that's a new feature. 20:09
[Coke]: But all passes here.
masak hm, Swift's playground looks very much like some of Bret Victor's interactivity/playing-with-time visions...
jnthn masak: I think I read somewhere that was one of their inspirations.
[Coke] jnthn: heisenbug. run it 20 times, that test fails about 4 times 20:10
test 4 failed 1x
jnthn Ugh
[Coke] I don't like the hardcoded port 5000, but that's probably not it. 20:11
yup, 4 and 6 are both dodgy. 20:12
just ran PERL6LIB=lib prove -v -e ./perl6 t/spec/S32-io/IO-Socket-Async.t many times with "up arrow return" ad naseum. 20:13
TimToady well, at least it's not trying for the 6th 9...
jnthn [Coke]: OK, I'll have to see if I can reproduce that. 20:14
[Coke] I'm running those on host07, if you have an account there. 20:17
masak 'night, #perl6 20:18
btyler found the same locally (osx 10.9): ran that test 200 times, #6 failed twice 20:21
under moar. trying r-j now, but it'll take a bit longer to run it 200 times :)
btyler r-j run still in progress, but one failure so far - #4 20:59
dwarring doc init seems to be broken 21:00
perl6-m --doc -e'DOC INIT {}'
gives me...
===SORRY!=== Cannot find method 'cuid'
was working here - perl6advent.wordpress.com/2011/12/1...ng-perl-6/ 21:01
dwarring will put in an rt 21:03
FROGGS m: say "abc" ~~ / :dba('...') abc / 21:06
camelia rakudo-moar 28d672: OUTPUT«Nil␤»
FROGGS :o( 21:07
jnthn hmm 21:08
m: say "...abc" ~~ / :dba('...') abc /
camelia rakudo-moar 28d672: OUTPUT«「...abc」␤ 0 => 「...」␤␤»
jnthn oh my...
FROGGS uhh
jnthn Yeah, I guess Rakudo doesn't know about :dba :)
FROGGS jnthn: that is one thing I have to change in v5's grammar :o)
(one of many)
jnthn FROGGS: Or...just change Rakudo? :) 21:09
We should be able to teaching it :dba without too much work
FROGGS hmmm
damn
btw, I had assimilate HLL::Grammar :/ 21:10
jnthn Yeah, you're treading Rakudo/NQP interop ground others haven't tried to yet.
FROGGS I mean, if this works out it is wonderful 21:11
since a change in nqp does not have to break v5 anymore
nqp-m: say( "abc" ~~ / :dba('...') abx / ) 21:12
camelia nqp-moarvm: OUTPUT«Substring length (-6) cannot be negative␤ at gen/moar/stage2/QRegex.nqp:1162 (/home/p6eval/rakudo-inst-2/languages/nqp/lib/QRegex.moarvm:Str:18)␤ from gen/moar/stage2/NQPCORE.setting:681 (/home/p6eval/rakudo-inst-2/languages/nqp/lib/NQPCORE.setting.moarvm:…»
sergot good night! o/ 22:07
jnthn 'night, sergot 22:11
donaldh .tell Coke re irclog.perlgeek.de/perl6/2014-06-06#i_8834904 I don't like the hardcoded port 5000 either. I plan to extract the port finding code from IO-Socket-INET.t into a separate package and use that. 22:19
yoleaux donaldh: I'll pass your message to Coke.