»ö« 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
00:11 itz left
cognominal welcome to North America 00:18
00:20 hoverboard left
cognominal TimToady graduated in Street Pick Up? Oh, no. That's a different acronym. 00:21
00:21 thou left
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
00:46 BenGoldberg joined 00:51 zengargoyle left 01:07 Alula_ joined, Alula left 01:14 jack_rabbit_ joined 01:18 hoverboard joined 01:20 SHODAN joined 01:21 krunen joined 01:32 Pleiades` joined, Su-Shee_ joined 01:36 FROGGS left, Su-Shee left, klapperl joined 01:39 klapperl_ left 01:49 FROGGS joined 01:54 anaeem1 joined 01:59 anaeem1 left 02:00 thou joined 02:02 hoverboard is now known as hovercraft 02:05 thou left 02:37 xragnar_ joined, xragnar left, xragnar_ is now known as xragnar 02:54 carlin left 02:58 SamuraiJack__ joined 03:03 xragnar left 03:06 xragnar joined 03:25 Alula_ left 03:36 Alula_ joined
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
03:43 rurban joined
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
03:44 kaare_ joined 03:48 bjz joined
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
04:16 grondilu left
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
04:25 BenGoldberg left 04:26 SamuraiJack joined 04:27 SamuraiJack__ left 04:32 kaare_ left 05:01 molaf joined 05:02 kaare_ joined 05:06 bcode joined 05:15 FOAD left, Pleiades` left, vendethiel left, pmichaud left, hugme left, jercos left, rurban left, sorear left, xfix left, ivan`` left, dylanwh left, erdic left, PZt left, japhb_ left, rurban_ left, kurahaupo left, ugexe left, Util left, Psyche^ left, lee_ left, klapperl left, lue left, oetiker_ left, haroldwu left, [Sno] left, chenryn left, ribasushi left, rjbs left, baest left 05:16 Alina-malina left 05:20 ugexe joined 05:21 Util joined, Psyche^ joined, lee_ joined 05:25 dj_goku left 05:26 ivan`` joined, rurban_ joined, klapperl joined, Pleiades` joined, lue joined, sorear joined, xfix joined, oetiker_ joined, haroldwu joined, FOAD joined, timotimo joined, atrodo joined, flussence joined, yogan_ joined, tokuhirom joined, risou joined, simcop2387 joined, TimToady joined, lestrrat joined, raydiak joined, Bucciarati joined, mathw joined, ggherdov joined, clkaoud joined, retupmoca joined, amkrankruleuen joined, hoelzro joined, bowtie joined, profan joined, Juerd joined, cibs joined, cooper joined, jercos joined, hugme joined, baest joined, rjbs joined, ribasushi joined, pmichaud joined, vendethiel joined, japhb_ joined, PZt joined, erdic joined, dylanwh joined, chenryn joined, [Sno] joined, verne.freenode.net sets mode: +v hugme 05:28 FOAD left, Pleiades` left, vendethiel left, pmichaud left, hugme left, jercos left, Juerd left, bowtie left, hoelzro left, amkrankruleuen left, retupmoca left, ggherdov left, Bucciarati left, simcop2387 left, TimToady left, lestrrat left, raydiak left, ivan`` left, rurban_ left, sorear left, xfix left, dylanwh left, erdic left, PZt left, japhb_ left, cooper left, clkaoud left, mathw left, profan left, timotimo left, atrodo left, flussence left, yogan_ left, tokuhirom left, risou left, klapperl left, lue left, oetiker_ left, haroldwu left, [Sno] left, chenryn left, ribasushi left, rjbs left, baest left, cibs left 05:31 dj_goku joined 05:32 hovercraft left, xinming joined 05:33 ivan`` joined, rurban_ joined, klapperl joined, Pleiades` joined, lue joined, sorear joined, xfix joined, oetiker_ joined, haroldwu joined, FOAD joined, [Sno] joined, chenryn joined, dylanwh joined, erdic joined, PZt joined, japhb_ joined, vendethiel joined, pmichaud joined, ribasushi joined, rjbs joined, baest joined, hugme joined, jercos joined, cooper joined, cibs joined, Juerd joined, profan joined, bowtie joined, hoelzro joined, amkrankruleuen joined, retupmoca joined, clkaoud joined, ggherdov joined, mathw joined, Bucciarati joined, timotimo joined, atrodo joined, flussence joined, yogan_ joined, tokuhirom joined, risou joined, simcop2387 joined, TimToady joined, lestrrat joined, raydiak joined, verne.freenode.net sets mode: +v hugme 05:39 Diu joined 05:40 Alina-malina joined, Alina-malina left, Alina-malina joined 05:41 water joined, water is now known as hoverboard 05:43 Diu left 05:53 kaleem joined 05:59 oetiker left, oetiker_ left 06:06 oetiker joined 06:24 igorsutton joined 06:26 igorsutton left 06:28 bjz left 06:34 bjz joined, FROGGS left 06:43 sivoais left, sivoais joined, hoverboard left
sergot morning o/ 06:44
06:51 FROGGS joined 06:52 bjz_ joined, bjz left 06:57 darutoko joined 06:58 denis_boyun_ joined 07:03 zakharyas joined
moritz \o 07:03
07:06 bjz_ left, bjz joined
FROGGS o/ 07:08
07:11 anaeem1_ joined 07:12 robinsmidsrod left, robinsmidsrod joined 07:14 raiph joined 07:20 bjz_ joined 07:22 bjz left 07:26 sivoais left 07:38 atroxaper joined
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
07:42 pdcawley joined
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! )
07:54 pdcawley left 07:56 pdcawley joined 07:57 [particle]1 left
xfix (I confused this channel with #perl) 08:01
nwc10 is that a compliment? :-) 08:02
08:02 kaare_ left, kaare__ joined 08:07 [particle] joined
xfix (Well, I typed `int`, thinking it's generic #perl question) 08:13
masak good antenoon, #perl6 08:14
moritz masak o/
08:15 zengargoyle joined
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␤␤»
08:17 anaeem1_ left
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.
08:31 hoverboard joined
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
08:44 Su-Shee_ is now known as Su-Shee
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
08:48 atroxaper left 08:49 denis_boyun_ left
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
08:53 sivoais joined, atroxape_ joined 08:54 anaeem1 joined
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
08:55 spider-mario joined
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 :)
08:58 atroxape_ left
timotimo neato, gentoo is quasi a synonym for "fast" 08:58
08:59 atroxaper joined 09:01 atroxaper left, donaldh joined, atroxaper joined, jack_rabbit_ left 09:02 sqirrel joined, kaare__ left 09:06 hoverboard left 09:09 kaare__ joined 09:10 kaare__ is now known as kaare_ 09:13 thou joined 09:18 thou left
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:
09:27 kurahaupo joined
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?
09:33 SevenWolf left
lizmat well, de-optimized really, as it is now using gather/take than just a map 09:34
09:34 denis_boyun joined 09:35 raiph left 09:36 kurahaupo left 09:37 kivutar joined 09:39 Manojk joined 09:40 Manojk left
masak ah, yes, .uniq is even better :) 09:45
09:47 Psyche^_ joined 09:51 Psyche^ left 09:53 pdcawley left 09:54 kaare_ left 10:01 kaare_ joined
timotimo so ... i could probably build a fastcgi based webserver in perl6 using thread pools and async stuff, couldn't i? 10:01
10:05 smls joined 10:18 pdcawley joined 10:19 sqirrel left 10:20 sqirrel joined
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
10:23 bjz_ left 10:24 virtualsue joined 10:26 tahyat joined 10:27 rindolf joined 10:28 eternaleye left
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
10:30 rindolf left
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
10:35 eternaleye joined
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
10:51 fhelmberger left
FROGGS I had expected fixups to be at the bottom perhaps, and deps at the top 10:51
10:51 fhelmberger joined
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
10:56 fhelmberger left 10:59 xinming_ joined
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
11:01 thou joined 11:02 xinming left
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
11:03 kivutar left
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
11:06 thou left
lizmat and then just use \ in path tests for is-win 11:06
11:07 telex left
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
11:08 telex joined
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.
11:11 atroxaper left, atroxaper joined
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
11:15 atroxaper left
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
11:20 tahyat left
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
11:56 jsn_ joined
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 :-)
11:58 xinming_ left 11:59 xinming joined
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
12:07 kaleem left 12:12 kivutar joined 12:14 pdcawley left 12:17 sqirrel left
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
12:19 kaleem joined
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
12:25 smls left 12:27 kaleem left, kaleem joined 12:28 smls joined 12:29 rurban joined, atroxaper joined 12:37 atroxaper left, atroxaper joined
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
12:42 atroxaper left
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
12:50 yakudzo joined
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
12:52 yakudza left
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
12:55 guru joined 12:56 guru is now known as ajr_, anaeem1 left 12:59 xinming_ joined
timotimo jnthn: working on inlining again today? :) 13:00
13:00 atroxaper joined, atroxaper left
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 :)
13:02 xinming left
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
13:05 pdcawley joined
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
13:10 kaare_ left
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 :)
13:32 smls left 13:33 bjz joined
[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␤»
13:41 anaeem1 joined, jnap joined
masak set's aren't ordered ;) 13:44
13:45 anaeem1 left, anaeem1_ joined 13:47 kaleem left
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
13:49 FROGGS left 13:52 anaeem___ joined
timotimo masak: i think you mean "set's not ordered" 13:53
13:53 anaeem1_ left 13:59 jsn_ left, pdcawley left
jnthn
.oO( Apostrophe catasrophe )
14:00
masak timotimo: oh urgh. no, I meant s/set's/sets/ 14:01
14:01 donaldh left
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
14:05 btyler joined
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.
14:14 thou joined
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.
14:16 FROGGS joined, pdcawley joined, pdcawley left
xfix method value:sym<number>($/) { make +$/.Str } 14:17
14:17 pdcawley joined
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.
14:35 anaeem1_ joined
timotimo i don't see a test for "" 14:35
xfix It happens for me with any JSON object.
14:35 treehug88 joined
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.
14:36 anaeem___ left
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 :)
14:39 rurban left
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
14:51 rurban joined
xfix Now to make logotype... 14:51
And README. 14:53
14:57 guru joined, ajr_ left, guru is now known as Guest61852
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")␤»
15:00 SamuraiJack left
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␤␤»
15:01 Guest61852 is now known as ajr_
cognominal should not it work consistently as a macro? 15:02
15:02 rurban left
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
15:12 obra joined, spintronic joined
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)␤»
15:17 sivoais left 15:18 spintronic left 15:19 sivoais joined, grondilu joined
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
15:27 kaare_ joined
PerlJam TPF pays people to develop it sometimes, does that count? ;) 15:29
timotimo i'd like to get paid doing perl6 stuff :)
15:31 kaleem joined
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.
15:34 Alula_ left
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
15:34 denis_boyun left
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"
15:35 Alula_ joined
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.
15:37 zakharyas left
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.
15:47 bluescreen10 joined
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
15:58 Alina-malina left
nwc10 PerlJam: I don't think it will be grammars at first. I think the first temptation will be concurrency 16:00
16:00 bjz left
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
16:04 erdic left 16:05 erdic joined, virtualsue left
xfix Threading sounds like a reason. 16:06
16:09 Alina-malina joined
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
16:13 sivoais left
flussence what about "look how easy C bindings are!!1" 16:13
16:13 sivoais joined
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
16:19 sivoais left
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
16:20 dwarring left
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
16:22 molaf left
cognominal hopefully, not una bomber 16:23
16:28 zengargoyle left, zengargoyle joined, ajr_ left 16:35 molaf joined 16:37 LLamaRider joined 16:38 denis_boyun_ joined 16:46 anaeem1_ left 16:51 anaeem1 joined 16:52 bluescreen100 joined
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
16:55 bluescreen10 left
PerlJam r: my str $s = ~("m" ~~ /m/); say $s; 16:57
camelia rakudo-{parrot,jvm,moar} 28d672: OUTPUT«m␤»
16:57 jnap left
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
17:02 hoverboard joined
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
17:16 Vlavv left
[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
17:28 denis_boyun_ left, Vlavv joined 17:29 vendethiel left 17:34 itz joined 17:38 jnap joined
TimToady m: sub MAIN ($a, |c) {...} 17:41
camelia rakudo-moar 28d672: OUTPUT«Usage:␤ /tmp/ZC3GonHffi <a> <> ␤»
TimToady hmm
17:42 molaf left
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
17:48 hoverboard left
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
17:51 Rotwang joined
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
17:57 rindolf joined 17:58 p[erlygatekeeper joined, p[erlygatekeeper left
TimToady yes, but what about switches peculiar to cmd or brf 17:58
17:59 perlygatekeeper joined
TimToady foo.p6 cmd --quietly 18:01
foo.p6 brf --loudly
18:01 MilkmanDan joined
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
18:03 itz left
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
18:05 dwarring joined 18:06 anaeem1 left 18:07 anaeem1_ joined
TimToady and do so in such a way that a hierarchical USAGE can be generated 18:07
iow it has to be declarational
18:07 denis_boyun_ joined
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> ␤»
18:10 sivoais joined
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
18:13 treehug88 left
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
18:16 kaleem left
TimToady and with the MAIN binder being smart enough to know which level the switches bind at 18:16
18:17 itz joined, treehug88 joined
TimToady hmm, maybe the subcommand processors would even be declared inside the parent so that global switches are in their outer scope 18:17
18:18 vendethiel joined
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
18:26 perlygatekeeper is now known as PGK, PGK is now known as __END__
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␤␤»
18:26 __END__ is now known as Guest78376 18:27 Guest78376 is now known as perlygatekeeper
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 :)
18:33 LLamaRider left 18:37 sivoais left
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
18:42 treehug8_ joined, treehug8_ left 18:43 hoverboard joined, treehug8_ joined
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
18:45 treehug88 left
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
18:49 kivutar left 18:50 vendethiel left
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
18:50 sivoais joined 18:53 darutoko left
dalek osystem: facac28 | sergot++ | META.list:
HTTP::UserAgent (only :simple so far)
19:11
19:12 dmol left
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)
19:17 smls joined
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 :)
19:20 virtualsue joined
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
19:22 uniejo joined 19:23 rurban joined, mr-foobar left 19:29 treehug8_ left 19:31 uniejo left
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.
19:34 treehug88 joined
geekosaur .oO { it makes a real hash of things? } 19:35
19:38 treehug88 left
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. :)
19:41 dmol joined 19:42 rindolf left
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?
19:43 molaf joined
smls *by 19:43
19:43 guru joined
TimToady you're supposed to be able to do it that way, but it hasn't always been supported 19:43
19:43 guru is now known as Guest7824
smls not always? 19:43
19:43 Guest7824 is now known as ajr_
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
19:49 dmol left
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.
19:58 grondilu_ joined 19:59 grondilu_ left
masak I don't see why it'd change. 20:00
20:01 grondilu left 20:02 vendethiel joined
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
20:11 hoverboard left
[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...
20:14 treehug88 joined
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 :)
20:22 smls_ joined 20:23 treehug88 left 20:24 MilkmanD1n joined, apejens_ joined, lee__ joined, perigrin_ joined 20:25 krunen_ joined 20:26 smls left, perigrin left, apejens left, Util left, krunen left, MilkmanDan left 20:29 Util joined 20:31 lee_ left 20:40 SevenWolf joined, kurahaupo joined 20:49 treehug88 joined 20:56 rurban left 20:57 pdcawley left 20:58 pdcawley joined, perigrin_ is now known as perigrin
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
21:02 MilkmanD1n is now known as MilkmanDan
dwarring will put in an rt 21:03
FROGGS m: say "abc" ~~ / :dba('...') abc / 21:06
camelia rakudo-moar 28d672: OUTPUT«Nil␤»
21:06 bluescreen100 left
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.
21:11 dmol joined
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:…»
21:21 sivoais left, sivoais joined 21:26 perlygatekeeper left 21:29 Rotwang left, jnap left 21:30 btyler left 21:39 Rotwang joined 21:46 jnap joined, virtualsue left 21:48 vendethiel left 21:52 vendethiel joined 21:59 itz left 22:00 treehug88 left 22:03 donaldh joined 22:04 Rotwang left, dmol left
sergot good night! o/ 22:07
jnthn 'night, sergot 22:11
22:13 vendethiel left, spider-mario left 22:14 vendethiel joined 22:18 molaf left
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.
22:30 rurban joined 22:31 vendethiel left 22:32 vendethiel joined 22:33 SevenWolf left 22:35 kurahaupo left, ajr_ left 22:36 dmol joined 22:42 BenGoldberg joined 22:46 donaldh left 22:48 donaldh joined 22:55 smls joined 22:56 smls_ left 22:57 kaare_ left 23:07 donaldh left 23:16 anaeem1_ left 23:22 dmol left 23:30 denis_boyun_ left 23:44 rurban left 23:45 rurban joined, rurban left