Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-11-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:07 lucas_ joined #perl6
00:08 lucas_ m: my Nil $a; $a = Any
00:08 camelia rakudo-moar ae1cde: OUTPUT«Type check failed in assignment to '$a'; expected 'Any' but got 'Any'␤  in block <unit> at /tmp/a99HILvlHe:1␤␤»
00:12 BenGoldberg joined #perl6
00:22 colomon joined #perl6
00:25 bowtie joined #perl6
00:31 bowtie_ joined #perl6
00:39 bowtie_ joined #perl6
00:44 mephinet joined #perl6
00:50 erkan joined #perl6
00:51 bowtie_ joined #perl6
00:53 timotimo2 joined #perl6
00:53 timotimo2 something's wrong with the server that hosts my irc session :\
00:59 bowtie_ joined #perl6
01:18 cognominal joined #perl6
01:18 bowtie_ joined #perl6
01:23 timotimo2 .tell japhb i get "not expected output" for divide and conquer for 4 and timed out for 5, is that expected?
01:23 yoleaux timotimo2: I'll pass your message to japhb.
01:27 regreg joined #perl6
01:30 BenGoldberg m: sub d-and-c (\n, \d, \f) { d > 0 ?? [+] await do for ^f { start { d-and-c n/f, d-1, f } } !! n }; say d-and-c 42, 2, 3;
01:30 camelia rakudo-moar ae1cde: OUTPUT«Memory allocation failed; could not allocate 8872 bytes␤»
01:30 BenGoldberg That ^ divide and conquer?  Or a different one?
01:32 immortal joined #perl6
01:32 immortal joined #perl6
01:33 timotimo2 the one from perl6-bench
01:33 timotimo2 not sure if it's that
01:36 TimToady my compile time for moar's setting has more than doubled
01:37 japhb timotimo: That's why it's a stress test.  It really is causing r-m and r-j to fail (though in different ways).
01:37 yoleaux 01:23Z <timotimo2> japhb: i get "not expected output" for divide and conquer for 4 and timed out for 5, is that expected?
01:37 timotimo2 OK
01:37 timotimo2 i'm running a few rakudo-moars with the current benchmarks now
01:37 timotimo2 oh, i didn't git pull bench before i started >_<
01:37 japhb BenGoldberg: The perl6-bench divide-and-conquer is basically the long form of what you pasted
01:40 japhb Note that failure information is being collected during normal benchmarking, it's just the defaults (number of runs per scale, number of runs that can fail before giving up, default set of tests, etc.) that vary between the two types of timeall testing.  But both will collect both timing and failure data.
01:40 timotimo2 ah
01:40 timotimo2 yeah that seems clever
01:41 timotimo2 TimToady: are you measuring only the core setting or all of it?
01:41 timotimo2 i've only been looking at core setting's stages
01:41 TimToady not slower on my other machine, so something strange is going on on my laptop
01:42 TimToady load avg only .4 though, on a 4 core machine
01:43 TimToady oh, probably because I was trying to use gprof (unsuccessfully)
01:44 japhb That would do it
01:46 bowtie joined #perl6
01:53 thou joined #perl6
01:54 tinyblak joined #perl6
01:57 timotimo2 jnthn said he'd be starting on shaped arrays, i'm looking forward to that :3
02:02 japhb Yes, definitely.  :-)
02:03 japhb Though we really need to fix some of the stability issues and flapping tests and such, too.
02:03 bowtie_ joined #perl6
02:05 timotimo2 well, i'm having a hard time reproducing stuff ;(
02:13 bowtie_ joined #perl6
02:18 japhb Have we thrown ThreadSanitizer against r-m yet?  (I know we've done AddressSanitizer quite a bit)
02:19 bowtie_ joined #perl6
02:19 japhb MemorySanitizer as well ...
02:20 xenoterracide joined #perl6
02:21 dj_goku so the panda reporter branch does that get sent to testers.perl6.org site?
02:23 japhb dj_goku: IIRC, you need to set an env var to make it happen.
02:28 KCL joined #perl6
02:29 timotimo2 correct
02:38 erkan joined #perl6
02:40 bowtie joined #perl6
02:41 dj_goku japhb: right I did, but I don't see the results on the most recent reports
02:47 chenryn joined #perl6
02:49 nhayashi left #perl6
02:54 thou joined #perl6
03:09 Mso150_x joined #perl6
03:13 bowtie_ joined #perl6
03:24 Mouq joined #perl6
03:26 telex joined #perl6
03:28 bowtie_ joined #perl6
03:29 adu joined #perl6
03:36 timotimo2 interestingly, 2014.09 had been rather regressive in comparison to 2014.08
03:43 TimToady .oO(jitrot?)
03:45 TimToady we might, at some point, try to do what I did for Perl 5, and figure out what are all the very hottest C routines, and put them all together in one spot to at least get some secondary cache effects
03:46 lue joined #perl6
03:46 TimToady lue: o/
03:46 lue o/
03:56 kaare_ joined #perl6
04:03 bowtie joined #perl6
04:06 rmgk joined #perl6
04:10 bowtie_ joined #perl6
04:18 chenryn joined #perl6
04:31 thou joined #perl6
04:54 bowtie joined #perl6
05:17 kaare_ joined #perl6
05:19 chenryn joined #perl6
05:23 xenoterracide joined #perl6
05:29 xenoterracide joined #perl6
05:33 ugexe p: say Buf.new(1..10).subbuf(9, 5);
05:33 camelia rakudo-parrot ae1cde: OUTPUT«VMArray: index out of bounds␤  in method subbuf at gen/parrot/CORE.setting:5738␤  in block <unit> at /tmp/0L9c9B25V2:1␤␤»
05:33 ugexe M: say Buf.new(1..10).subbuf(9, 5);
05:33 ugexe m: say Buf.new(1..10).subbuf(9, 5);
05:33 camelia rakudo-moar ae1cde: OUTPUT«Buf:0x<0a 00 00 00 00>␤»
05:33 ugexe j: say Buf.new(1..10).subbuf(9, 5);
05:33 camelia rakudo-jvm ae1cde: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
05:34 ugexe it seems parrots behavior does not match the docs statement of "(or less if the buffer is shorter"
05:39 tinyblak joined #perl6
05:49 TimToady the moar behavior is also incorrect, just differently
05:59 Mouq Hm. Mixing into Perl6::Actions is not so easy
06:04 anaeem1 joined #perl6
06:04 zakharyas joined #perl6
06:16 Mouq :o it worked!
06:19 chenryn joined #perl6
06:30 rurban joined #perl6
06:34 kaleem joined #perl6
06:45 kjs_ joined #perl6
06:55 chenryn joined #perl6
06:56 kjs_ joined #perl6
06:57 dalek nqp: 306da23 | Mouq++ | src/ (2 files):
06:57 dalek nqp: Change NQPMatch!make to NQPMatch.make
06:57 dalek nqp:
06:57 dalek nqp: Not sure why it was private in the first place, when it was written in
06:57 dalek nqp: 2012 by jnthn++, but having it public makes it much easier to work with
06:57 dalek nqp: $/ when crossing the Perl6/NQP border
06:57 dalek nqp: review: https://github.com/perl6/nqp/commit/306da23b78
06:57 dalek rakudo/nom: 93083fc | Mouq++ | src/Perl6/Grammar.nqp:
06:57 dalek rakudo/nom: Eat the terminator before changing languages
06:57 dalek rakudo/nom:
06:57 dalek rakudo/nom: Note this doesn't eat any whitespace, so generally something like:
06:57 dalek rakudo/nom:
06:57 dalek rakudo/nom:     rule statementlist { '' … }
06:57 dalek rakudo/nom:
06:57 dalek rakudo/nom: will be wanted to eat the leading whitespace after the use statement, if
06:57 dalek rakudo/nom: the language is whitespace-insignificant.
06:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/93083fc1f7
06:57 dalek rakudo/nom: 0c0b4c4 | Mouq++ | src/Perl6/Grammar.nqp:
06:57 dalek rakudo/nom: Merge branch 'nom' of http://github.com/rakudo/rakudo into nom
06:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0c0b4c4532
06:57 dalek rakudo/nom: dedba74 | Mouq++ | src/Perl6/Actions.nqp:
07:05 kjs_ joined #perl6
07:05 jnthn morning, #perl6
07:07 TimToady o/
07:07 nwc10 good *, #perl6
07:10 dalek rakudo/nom: 76b5059 | TimToady++ | src/core/Buf.pm:
07:10 dalek rakudo/nom: fix .subbuf when overlapping the end
07:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/76b505908d
07:10 TimToady ugexe: ^^^
07:10 TimToady ugexe++ too
07:12 kjs_ joined #perl6
07:14 rindolf joined #perl6
07:16 jfredett joined #perl6
07:29 kaleem joined #perl6
07:36 masak_webchat joined #perl6
07:36 masak_webchat morning, #perl6
07:36 masak_webchat wow. ssh refuses to connect to feather.perl6.nl
07:36 masak_webchat anyone have any idea why?
07:37 masak_webchat also, when I try to `whois feather.perl6.nl`, I get "Error: invalid domain name" :(
07:41 nwc10 try whois perl6.nl
07:42 nwc10 $ telnet feather.perl6.nl ssh
07:42 nwc10 Trying 193.200.132.135...
07:42 nwc10 Connected to feather.perl6.nl.
07:42 nwc10 Escape character is '^]'.
07:42 nwc10 SSH-2.0-OpenSSH_6.6.1p1 Debian-8
07:42 nwc10 so, sshd is up. What's firewalling you?
07:47 FROGGS joined #perl6
07:49 rurban try the ip
07:50 masak_webchat same result with the ip
07:50 masak_webchat but yeah, maybe it's my network, or my provider
07:51 masak_webchat nwc10: the telnet command works o.O
07:56 nwc10 masak_webchat: very strange. Have you tried turning the Internet off and on again?
07:56 * masak_webchat tries that
07:57 masak_webchat didn't help much
07:57 masak_webchat oh well. time to head to work
07:57 masak_webchat &
07:57 tinyblak joined #perl6
07:57 Mouq https://github.com/Mouq/p6-Grammar-Mixin (requires latest NQP)
07:59 Mouq FROGGS: ^
07:59 FROGGS yeah, already looking at it
08:01 Mouq Only took 3 hours XP
08:04 FROGGS would be nice to only have one (good working) slang helper module in the end
08:04 FROGGS so I might take parts of it for mine, or I might send PR's to yours :o)
08:06 FROGGS also, we can happily turn the stuff in this &EXPORT into: augment slang $~MAIN { token ... } - https://github.com/FROGGS/p6-Slang-T​uxic/blob/master/lib/Slang/Tuxic.pm
08:07 FROGGS and this could hopefully also do the hllizing of the $/
08:07 Mouq :) I actually wanted this so I could try stuff with your Slangy.pm, because I'm too lazy to copy&paste stuff from the original token to the overriding one
08:08 Mouq FROGGS: Or augment slang $~Regex { … } as the case may be
08:09 FROGGS true
08:10 FROGGS and I propose we also introduce a augment actions $~MAIN
08:11 Mouq +1, if we're doing the above
08:13 tinyblak joined #perl6
08:15 darutoko joined #perl6
08:17 ghostlines joined #perl6
08:23 [Sno] joined #perl6
08:24 dalek rakudo/nom: a7cbe30 | Mouq++ | src/Perl6/Grammar.nqp:
08:24 dalek rakudo/nom: Add twigil ~ to the grammar
08:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a7cbe30abb
08:25 Mouq NYI, before anyone gets excited :P
08:25 FROGGS *g*
08:27 FROGGS would be nice to compile it to a lookup to %*LANG{~$<identifier>} with a fallback to something like: "Can only access slang variables in EXPORT routines in unit" or so
08:27 FROGGS (including "... for now")
08:32 tinyblak_ joined #perl6
08:39 azawawi joined #perl6
08:39 azawawi hi
08:39 azawawi lizmat: ping
08:40 azawawi is there a way to show deprecations as warnings in perl6 without running it? that is... perl6 -c
08:43 azawawi .tell lizmat is there a way to show deprecations as warnings in perl6 without running it? that is... perl6 -c
08:43 yoleaux azawawi: I'll pass your message to lizmat.
08:44 abraxxa joined #perl6
08:46 salv0 joined #perl6
08:48 molaf__ joined #perl6
08:52 FROGGS joined #perl6
08:55 tinyblak joined #perl6
08:57 virtualsue joined #perl6
08:59 ptc_p6 joined #perl6
09:05 regreg joined #perl6
09:06 virtualsue_ joined #perl6
09:09 slavik joined #perl6
09:10 masaq joined #perl6
09:10 masaq *sigh*
09:10 masaq rebooted the laptop. removed entries in known_hosts. still can't access feather.
09:15 jnthn fwiw, I cna't SSH to feather.perl6.nl either
09:15 moritz $ ssh feather
09:15 moritz Connection closed by 193.200.132.135
09:15 masaq oh
09:15 masaq ok, so it's not just me.
09:15 masaq *phew*
09:15 jnthn For once.
09:15 masaq jnthn: love you too :P
09:15 moritz feather2 and feather3 still respond
09:16 moritz does anybody have a shell still open on feather?
09:18 nwc10 OK, so the server is up, but closes the connection pretty soon after you do anything.
09:18 ugator joined #perl6
09:18 nwc10 (I infer the latter. I don't have an account, but I have telnet and ssh clients)
09:19 FROGGS joined #perl6
09:23 tinyblak joined #perl6
09:25 masaq apparently "Masaq" is a village in Kazakhstan.
09:26 fhelmberger joined #perl6
09:27 tinyblak_ joined #perl6
09:28 ugator my int32 $t=0; $t.say; in the rakudo-shell will produce «Unhandled lexical type in lexprimspec for '$t'» after any command I type afterwards, have to ctr-c out of perl
09:30 ugator only in rakudo-moar
09:30 masaq ugator: confirmed locally.
09:30 jnthn Interesting. Please file a book
09:30 jnthn a *bug*
09:30 ugator k
09:30 masaq and yes, it happens in the command after.
09:30 * jnthn really needs more coffee
09:31 dakkar joined #perl6
09:32 slavik joined #perl6
09:36 cognominal joined #perl6
09:46 masaq vendethiel: statically typed Lisp: https://gist.github.com/chrisdone/5​16489f4f27846712225#file-anintro-md
09:47 masaq HN discussion (with one comment so far): https://news.ycombinator.com/item?id=8593261
09:51 moritz fwiw we've had the same bug (natively typed lexicals confusing the REPL) in parrot already
09:51 moritz in rakudo-p, I should say
09:53 espadrine` joined #perl6
09:54 pmurias joined #perl6
09:57 not_tadzik joined #perl6
09:57 not_tadzik feather's broken for me too :)
09:57 not_tadzik also "Connection closed by bla bla bla", both on v4 and v6, both from home and from work
09:58 not_tadzik I can't even access my archive of fatfaces to express my confusion :o
10:08 GibbaTheHutt joined #perl6
10:08 ugator moritz: [perl #102254] seems to be exactly the same problem, but it looks like it fixed itself....
10:08 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=102254
10:09 pecastro joined #perl6
10:11 Mouq joined #perl6
10:16 masaq ugator: I think this deserves a new ticket, though.
10:17 ugator opened one already^^
10:25 virtualsue joined #perl6
10:28 masaq ugator++
10:41 tinyblak joined #perl6
10:45 myp joined #perl6
10:53 sqirrel_ joined #perl6
10:54 bjz joined #perl6
10:54 denis_boyun_ joined #perl6
10:55 anaeem1 joined #perl6
11:04 ggoebel111111117 joined #perl6
11:08 virtualsue joined #perl6
11:16 anaeem1 joined #perl6
11:16 espadrine` joined #perl6
11:33 timotimo2 joined #perl6
11:33 dj_goku joined #perl6
11:33 dj_goku joined #perl6
11:40 timotimo o/
11:41 not_tadzik is feather back for you?
11:44 colomon *** glibc detected *** /home/smoker/.rakudobrew/m​oar-HEAD/install/bin/moar: malloc(): smallbin double linked list corrupted: 0x000000000714e130 ***
11:44 colomon Segmentation fault (core dumped)
11:44 colomon not what I like to see at the "end" of a emmentaler run.  :(
11:46 yakudza Hello perl6.
11:49 colomon \o
11:53 chenryn joined #perl6
11:59 tinyblak_ joined #perl6
12:04 kaleem joined #perl6
12:04 Mouq joined #perl6
12:10 rindolf joined #perl6
12:17 bwisti joined #perl6
12:19 tinyblak joined #perl6
12:24 leont joined #perl6
12:26 masaq not_tadzik: feather not back for me.
13:00 erkan joined #perl6
13:00 erkan joined #perl6
13:22 tinyblak joined #perl6
13:23 tinyblak_ joined #perl6
13:33 tinyblak joined #perl6
13:33 PerlPilot joined #perl6
13:38 telex joined #perl6
13:39 arnsholt joined #perl6
13:48 guru joined #perl6
13:49 xenoterracide joined #perl6
13:53 dalek perl6-roast-data: 4564c1f | coke++ | / (5 files):
13:53 dalek perl6-roast-data: today (automated commit)
13:53 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/4564c1f00a
13:54 xtreak joined #perl6
13:56 nebuchad` joined #perl6
13:57 sorear joined #perl6
13:57 jfredett joined #perl6
14:01 spider-mario joined #perl6
14:19 woolfy left #perl6
14:21 woolfy joined #perl6
14:24 colomon woolfy!  o/
14:28 KCL_ joined #perl6
14:28 lizmat colomon \o
14:28 yoleaux 08:43Z <azawawi> lizmat: is there a way to show deprecations as warnings in perl6 without running it? that is... perl6 -c
14:29 lizmat .tell azawawi don't think so, deprecations are basically runtime call to a special internal sub
14:29 yoleaux lizmat: I'll pass your message to azawawi.
14:31 colomon lizmat!  \o/
14:32 jnthn colomon: Any chance of a debug build and backtrace on that SEGV? Or better, ASAN?
14:32 raiph joined #perl6
14:32 colomon jnthn: probably not
14:33 bjz joined #perl6
14:33 rurban colomon: looks like a wrong free to me
14:33 colomon thought I guess I might be able to figure out which day's run triggered it and load up the appropriate commit and try again.
14:34 woolfy colomon \o/
14:36 jnthn colomon: Ah, I'd assumed it was from today's run
14:36 colomon jnthn: I got the results this morning.  but that was because two day's runs were wedged.
14:36 jnthn ah.
14:36 colomon jnthn: I'm trying to see if I can duplicate it now, I think it happened under abd2bc5
14:37 colomon I launched a run this morning that worked just fine, so it may be an intermittent issue, or it may have been fixed.
14:37 jnthn Well, more likely it's heisenbug...
14:38 jnthn But if it can be reproduced at a certain version and we can get a backtrace or other data, it may help
14:43 colomon well, I've got moar-abd2bc5 built now
14:46 jnthn colomon++
14:49 kaleem joined #perl6
14:59 Mouq joined #perl6
15:04 thou joined #perl6
15:07 kjs_ joined #perl6
15:28 chenryn joined #perl6
15:36 TimToady good cometlanding, everyone.
15:36 lizmat TimToady++  :-)
15:37 timotimo well, just about to ... or so i've heard
15:37 lizmat http://new.livestream.com/ESA/cometlanding  for those in the dark  :-)
15:38 timotimo oh yes. also: you may have to do some additional computer sciency things to turn that widget from "show me what happened 10 hours ago" to "show me what's happening now"
15:38 TimToady which runs about 13 seconds and hangs here due to some kind of throttling, but picking it up on nasa's feed, which is apparently not throttled
15:38 timotimo what frequency do i have to tune my radio to to hear the beeps and boops of rosetta?
15:38 timotimo when does it pass over germany?
15:38 timotimo :P
15:39 timotimo will rosetta bring a bit of gas from the comet home so we can have "space fragrance"?
15:39 TimToady you'll need really big ears to hear rosetta since it's so far away
15:39 araujo joined #perl6
15:39 TimToady no, this is a one-way mission
15:39 timotimo so no recycling?
15:40 TimToady yes, very wasteful
15:40 timotimo is the spelling of "rendezuous" really correct?
15:40 timotimo because i really don't think it is
15:40 geekosaur it's a weird font
15:40 TimToady if you're Roman it's okay
15:40 timotimo ah, of course
15:40 geekosaur if you look closely, the v is rounded and the u is square at rightr bottom
15:40 timotimo oh!
15:41 timotimo OK
15:41 timotimo for some reason i thought the correct spelling had to begin with "round"
15:41 geekosaur the kind of font that makes me think some font designers have lost sight of the idea that words are meant to be read
15:41 TimToady hmm, lost sound
15:41 lizmat faces are not looking happy  :-(
15:41 geekosaur rendez-vous
15:41 geekosaur french
15:41 timotimo they are probably just tired and anxious
15:42 timotimo when i forget i have cameras on my face, i usually also don't smile terribly much
15:42 timotimo especially when my space robots are about to land on space comets
15:42 TimToady I wish they'd show us telemetry instead of faces
15:42 timotimo i observe i'm being sillier than my usual
15:43 lizmat the NSA agrees
15:43 TimToady obviously you need to raise your average
15:43 leont I rather like xkcd's status report :-p
15:44 timotimo who might this "prime minister" be?
15:46 lizmat one that can only be divided by 1 and himself?
15:46 TimToady no, he just enforces it
15:46 * lizmat notices some silliness level rising as well
15:46 TimToady couldn't have anything to do with me getting online...
15:47 brrt joined #perl6
15:47 brrt \o #perl6
15:47 treehug88 joined #perl6
15:47 lizmat brrt o/
15:47 brrt \o lizmat
15:47 brrt iirc leont complained recently about being unable to do something like 'gdb perl6'
15:48 brrt which is an annoyance i've also faced
15:48 timotimo me, too
15:48 timotimo but i'm used to cat (which perl6) now :P
15:48 brrt and my solution has been to introduce an environment variable in the runner script which is imposed between the exec and the moar executable
15:49 brrt which allows you to do something like MVM_DEBUG="gdb --args" perl6
15:49 brrt and have it start gdb :-)
15:49 * leont was thinking about such a solution
15:49 * brrt has implemented such a solution :-)
15:49 brrt my only question i
15:49 brrt is
15:49 brrt what should be the name of our environment variable
15:50 brrt i'm torn between PERL6_DEBUG, PERL6_RUN, MVM_RUN, MVM_DEBUG
15:50 brrt etc
15:50 brrt nb. - this will not work on windows
15:53 arnsholt I looked into making ./perl6 --gdb work, but option parsing in (portable) shell script is just ridiculously painful
15:53 arnsholt Also, no idea how to fix the Windows-side BAT file
15:54 brrt also, note that macs do not ship with gdb
15:54 TimToady rewrite the runner in perl?  :)
15:54 brrt .... no
15:55 brrt ultimately we want to ship perl6 to people who don't have perl5
15:55 timotimo that's why people have discussed rewriting Configure.pl in nqp and shipping a bootstrapped nqp with moarvm
15:55 nwc10 why do we need a runner at all?
15:55 leont Yeah, what nwc10 said
15:55 brrt hmmmm
15:56 brrt you could.. potentially.. write a 'bootstrapper' in c
15:56 tinyblak_ joined #perl6
15:56 * nwc10 is only half awake, having been at work since 07:30
15:56 leont This is exposing the moar/nqp/perl6 split to a user level in a way that's not functional
15:56 brrt that would work
15:56 timotimo well, froggs already had a little prototype that bundled .moarvm bytecode files within the same binary that runs
15:56 nwc10 it's more the "bundle all the bytecode" thing that I'm wondering about
15:56 timotimo somewhat similar to how parrot has the pmc2exe thing
15:56 nwc10 a binary
15:56 arnsholt I suppose we could do the same thing as Parrot does and make a C thing that basically just contains the bytecode and stuffs that into the interpreter
15:57 nwc10 more awesome would be to take the address of the bytecoe, and pass that direct to the bytecode loader
15:57 nwc10 which I think you can do pretty much portably by converting the bytecode to a massive array of unsigned char, in a C source file
15:57 nwc10 compiling that, and linking it
15:58 nwc10 I figure that this approach is portable, given that Encode uses this for perl 5
15:58 moritz which is exactly what parrot's "fakexecutables" do, no?
15:58 arnsholt Yeah, that's more or less what Parrot does I think
15:58 nwc10 excellent
15:58 brrt hmmm
15:58 * nwc10 goes back to sleep
15:58 * brrt is not against, but not directly for it, either
15:59 nwc10 I don't mind. I'd like to avoid the gdb pain, as I hit it sometimes
15:59 lizmat meanwhile, all I can say is AAAAAAAAAAAAAAAAA!
15:59 nwc10 but I have other itches I need to scratch first
15:59 brrt why lizmat? :-)
15:59 lizmat #CometLanding
16:00 brrt oh yes, very wow
16:00 lizmat also: http://xkcd1446.org
16:01 leont lizmat: just like a whale? ;-)
16:01 timotimo i'm now failing to watch the live stream
16:01 timotimo or maybe not?
16:01 timotimo who knows.
16:01 lizmat yeah, I guess there's too many of us  ...
16:04 timotimo i only see "loading"
16:04 timotimo damn it
16:04 lizmat BBC says landing successful!
16:04 tinyblak joined #perl6
16:04 woolfy landing indeed successfull...
16:05 timotimo i want to see, too
16:05 timotimo it's 2014, how the hell can video live streaming from one place on the earth to another be so difficult?
16:05 brrt because networks
16:05 timotimo ah, finally i can see stuff
16:05 timotimo brrt: networks and browsers and adobe flash players
16:06 timotimo i'm going to get every new frame by hitting F5 and maybe i'll get a video-like experience from that
16:07 moritz timotimo: now it's time to install a tool that sends the F5 key event in rapid succession :-)
16:07 timotimo it's called "a little stone on the key" :)
16:08 moritz don't be so last-millenium!
16:08 timotimo when do we finally get working multicast on the internets?
16:08 moritz never
16:08 timotimo don't be so defeatist
16:08 moritz would be very easy to abuse for DDoS
16:09 brrt hmmm
16:09 timotimo will we at least ever get rid of adobe flash player for video streaming and watching?
16:09 moritz so basically all edge routers discard multicast packages
16:09 timotimo oh
16:09 timotimo it would be easy to abuse for DDoS?
16:10 moritz you'd just configure your bots to multicast all traffic both to the intended IP and to the ones you want to DDoS
16:10 TimToady well, everyone cheered
16:11 moritz then they'd the same amount as traffic as ever, and still attack several targets at the same time
16:11 TimToady and they've announce it's talking and reporting it's on the comet
16:11 timotimo um ... but your targets have to subscribe to your address to even get anything at all
16:11 timotimo how do you get your victim to subscribe to the multicast streams of all your bots?
16:11 brrt i think multicasts are just forwarded by default
16:12 brrt but i'm not sure
16:13 tinyblak_ joined #perl6
16:13 timotimo ... don't you need to get a multicast address from your ISP to even multicast in the first place?
16:13 moritz woah, .NET framework is being open-sourced (MIT license)
16:14 moritz timotimo: yes, because normally, the ISP's routers are configured to discard multicast packets
16:14 timotimo oh, that is the reason? :)
16:14 moritz basically all IP stacks implement multicast
16:14 kaleem joined #perl6
16:14 moritz the ISPs just don't trust it
16:15 timotimo maybe i should read up on multicast some more
16:16 timotimo perhaps the next release should be called Philae.pm? :P
16:17 geekosaur multicast addresses aren't assigned to hosts, but to protocols
16:17 geekosaur you subscribe a host to an address
16:17 geekosaur but if the router drops multicast packets, that won't work
16:18 brrt hmm you can locally-multicast timotimo
16:19 brrt but yeah, you need an address
16:23 brrt very awesome philae
16:23 tinyblak joined #perl6
16:24 tinyblak joined #perl6
16:24 TimToady pictures or it didn't happen :)
16:26 brrt :-D
16:26 tinyblak_ joined #perl6
16:31 * brrt afk :-)
16:31 brrt left #perl6
16:38 ugator joined #perl6
16:42 kjs_ joined #perl6
16:43 colomon joined #perl6
16:43 d4l3k_ joined #perl6
16:45 anaeem1 joined #perl6
16:46 felher joined #perl6
16:48 cognominal joined #perl6
16:49 guru joined #perl6
16:50 colomon joined #perl6
17:00 lucas__ joined #perl6
17:03 lucas__ hello
17:03 lucas__ m: my &c; &c := sub {}
17:03 camelia rakudo-moar a7cbe3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/xg0pOdT15nâ�¤Cannot use bind operator with this left-hand sideâ�¤at /tmp/xg0pOdT15n:1â�¤------> [32mmy &c; &c := sub {}[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        statement listâ�¤    â€¦Â»
17:04 lucas__ I can't bind to lexical sub?
17:04 TimToady m: my &c; &c = sub {}
17:04 camelia rakudo-moar a7cbe3: ( no output )
17:04 TimToady assignment works
17:05 TimToady not entirely clear why binding doesn't
17:05 lucas__ m: my &c := sub {}
17:05 camelia rakudo-moar a7cbe3: ( no output )
17:05 lucas__ this is ok ^^^
17:05 TimToady probably is ignoring the : there
17:05 psch joined #perl6
17:06 psch hi #perl6 o/
17:06 TimToady pseudo assignment gets the information on = vs := vs ::= but each kind of initialization can choose how to treat each of those
17:06 * psch has his computer set up finally in the new place
17:06 TimToady \o
17:07 psch re binding of subs: bind_op in actions doesn't do the right thing with & lexicals
17:07 psch as in, the QAST that comes in for & lexicals has a :op(ifnull) around
17:08 psch additionally, <sub foo { }> doesn't register a container
17:08 psch i had looked at both of those recently, but didn't quite figure it out
17:08 timotimo the harpoon diddn't fire?
17:08 psch s/actions/Actions.nqp/
17:09 TimToady timotimo: where do you get that?
17:09 timotimo https://twitter.com/ESA_Roset​ta/status/532579871202238464
17:15 esaym153 joined #perl6
17:19 [Sno] joined #perl6
17:22 cognominal TimToady, what is a coercion type?
17:24 cognominal acking 'coercion type' on the specs gives me 3 lines and I am not wiser reading it
17:27 TimToady S02:563
17:27 synopsebot Link: http://perlcabal.org/syn/S02.html#line_563
17:31 TimToady so, I guess someone needs to port rakudo to .NET now that it's being open sourced
17:44 japhb Now if we could just get back a certain .NET/Mono expert ...
17:45 moritz japhb: iirc jnthn++ is quite well-versed in .NET too. Though I also guess he has enough on his plate :-)
17:47 timotimo japhb: how do you feel about a tiny tool that gets us the commit ids for each day between two given commits?
17:56 ab5tract joined #perl6
17:56 ab5tract o/ #perl6
18:00 kjs_ joined #perl6
18:03 timotimo hey you
18:03 amkrankruleuen joined #perl6
18:03 amkrankruleuen joined #perl6
18:08 aghbas joined #perl6
18:08 jnthn fwiw, the shell script that launches moar and gives it the Perl 6 bytecode thing was done because it was expedient rather than out of any particular technical preference. :)
18:08 jnthn Well, aside from the "something works now" preference :P
18:10 jnthn Open source .Net under MIT license?! :D
18:11 arnsholt Hehe. I figured you might like that =)
18:11 jnthn Mostly, it's "At darn last!" :)
18:11 Diederich so damn cool: https://pbs.twimg.com/media​/B2Qm0T-IMAErh5H.png:large
18:12 Diederich Philae 3km above the surface
18:12 jnthn Wow
18:12 Diederich haven't checked backscroll here, but it is confirmed landed and 'harpoon'd' into the surface for stability.  lots more images coming.
18:13 Diederich oh never mind, the harpoons didn't fire...but it's still stable.
18:13 Diederich heh
18:15 FROGGS joined #perl6
18:16 psch timotimo: fwiw, i un-dynvar'd the CPU, http://peschwa.github.io/pr​ofile-1415813798.01796.html is a (x86, so no jit) profile
18:16 ab5tract i've been sitting on the two approaches to the 'unified set comparators'
18:16 ab5tract both are working as expected, it seems :)
18:17 psch it's short because i don't feel like writing much asm :P
18:17 psch i just took the longest test i have
18:17 vendethiel yay for open source .net ;-)
18:17 ab5tract however, there was a question of which is faster. any suggestions on making a scientific analysis of the two approaches are welcome
18:18 vendethiel masak: the author said it was not that important as a statically-typed list
18:18 vendethiel (after all, there exists shen, core.typed, typed racket, and some others)
18:18 jnthn psch: What is this a profile of?
18:18 jnthn The time spent on dyn opt is high.
18:19 psch jnthn: https://github.com/peschwa/h6809, specifically https://github.com/peschwa/H680​9/blob/master/t/01-basic.t#L90
18:19 ab5tract also, i don't believe there are any tests at all for mix interactions with set operators
18:20 naxa joined #perl6
18:20 ab5tract which makes sense, as none of them support Mixes as Mixes
18:20 vendethiel oh whoops, anime downloads have made my hard drive full >_> no wonder I was laggy.
18:20 jnthn psch: Seems it spends quite a lot of time auto-threading junctions, glancing the profile further.
18:21 jack_rabbit joined #perl6
18:21 jnthn Quite a bit in trans as well
18:21 psch yeah, that's the grammar
18:21 FROGGS TimToady: does this magic value has to be that large? https://github.com/perl6/nqp/commit/30​47e975d2f8eff5c6fbccf93e9ced648c1f2350
18:22 FROGGS TimToady: would be nice if it was <= 0x7FFFFFFF, because that would unbreak nqp on parrot
18:22 FROGGS TimToady: if that is not possible or sane, then I have to hunt this bug, which is a bad (un)sign
18:23 psch i should probably rewrite the few .trans calls in the grammar to substrings, especially considering i almost always want to strip up to the first two chars
18:23 psch s/substrings/substr/
18:24 psch hm, except the " " => "0" are kind of finicky, although filling up with '0' x * or somesuch might work
18:27 psch well, the code has potential for optimization :)
18:27 ingy moritz: yes please
18:28 ingy there was a bit of dissent but I think I've worked through it with everyone.
18:31 grondilu joined #perl6
18:31 * grondilu wonders if jnthn has seen http://www.wired.com/2014/11/microsoft-o​pen-sources-net-says-will-run-linux-mac/
18:33 tony-o are there really millions of developers using .net or millions of apps
18:34 naxa left #perl6
18:42 moritz tony-o: http://szabgab.com/the-size​-of-the-perl-community.html estimates the number of perl users/programmers to be 100..500k
18:42 gfldex joined #perl6
18:42 moritz tony-o: it's entirely thinkable that there are a million or more .net developers
18:45 raiph joined #perl6
18:49 jnthn grondilu: Yes. :)
18:51 timotimo jnthn: have you had any chance to look into why the benchmark that shouldn't allocate at all fills up entire nurseries with huge amounts of MVMStaticFrames (and a more or less negligible amount of P6Opaque)
18:52 araujo joined #perl6
18:52 jnthn timotimo: Not yet
18:52 timotimo what i do know about it is that it doesn't call the gc_allocate that's in the MVMStaticFrame REPR_ops struct
18:55 araujo joined #perl6
18:55 japhb timotimo: re: 'japhb: how do you feel about a tiny tool that gets us the commit ids for each day between two given commits?' ... what are you asking for that isn't just standard git functionality?
18:59 TimToady FROGGS: it could be 0xFFFFFF for 16-million fates I suppose
18:59 TimToady but that's not the only place it would have to change
18:59 FROGGS TimToady: I am testing now if a stage0 update helps...
19:11 denis_boyun_ joined #perl6
19:11 timotimo japhb: i would have to type the git command out manually :)
19:11 guru joined #perl6
19:17 espadrine` joined #perl6
19:24 TimToady FROGGS: but then we'd need another stage0 update to fix it
19:25 FROGGS TimToady: we'd just need one stage0 update
19:27 TimToady the funny thing is that that particular line is probably redundant anyway, since the NFA repr already does &= 0xffffffff
19:27 ptc_p6 joined #perl6
19:28 FROGGS ohh, would be nice to get rid of it then :o)
19:28 FROGGS jnthn: did you know that nqp always rebuilds when I invoke `nmake p-test` and other rules?
19:32 japhb timotimo: I'm partial to the following in bash:
19:32 japhb alias glr='git log -p --reverse'
19:32 japhb gpr () { cur=`git rev-parse HEAD`; git pull; git log -p --reverse $cur...; }
19:32 japhb glg () { git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative "$@" | less -R ; }
19:32 TimToady if only the glr were that easy...
19:32 timotimo hehe.
19:32 timotimo i've done a few timings now
19:32 timotimo of commits between 2014.10 and nom-now
19:33 * TimToady hopes it's his fault
19:35 ab5tract joined #perl6
19:37 dalek snake: 4e498fa | (Arne Skjærholt)++ | src/Snake/ (2 files):
19:37 dalek snake: Basic while implementation.
19:37 dalek snake: review: https://github.com/arnshol​t/snake/commit/4e498fa2d8
19:38 kaare_ joined #perl6
19:41 FROGGS TimToady: a stage0 update does not help
19:41 arnsholt nqp: say(nqp::getlex('$foo'))
19:41 camelia nqp-jvm: OUTPUT«(signal ABRT)#␤# A fatal error has been detected by the Java Runtime Environment:␤[t#  ␤SIGSEGV (0xb) at pc=0x00007f70fbe56b29, pid=7710, tid=140123260208896␤#␤# JRE version:  (7.0_51) (build )␤# Java VM: OpenJDK 64-Bit Server VM (24.45-b08 mixed mode lin…»
19:41 camelia ..nqp-moarvm: OUTPUT«␤»
19:41 camelia ..nqp-parrot: OUTPUT«Null PMC access in get_string()␤current instr.: 'print' pc 709 (gen/parrot/stage2/NQPCORE.setting.pir:322) (gen/parrot/stage2/NQPCORE.setting:673)␤»
19:42 arnsholt jnthn: Is that just above intended behaviour?
19:42 japhb .oO( Sheesh, now I need to add fuzz tests to my list .... )
19:42 FROGGS TimToady: so am I allowed to revert it because of its redundantness? https://github.com/perl6/nqp/commit/30​47e975d2f8eff5c6fbccf93e9ced648c1f2350
19:43 japhb arnsholt: SEGV is never good
19:43 arnsholt Yeah, that's true. I didn't actually know about that
19:43 FROGGS but keep in mind that some ops have to be really cheap
19:44 FROGGS and we can not check everything at that level while keeping it cheep
19:44 arnsholt I've been doing this on Moar, which simply appears to do something different from what the NQP docs say: "An error is thrown if [the variable does not exist or if the type is incorrect."
19:45 jnthn arnsholt: getlex, iirc, gives null if the symbol ain't found
19:45 japhb FROGGS: If we write the ops to have a fast path and a slow path, then we can leave it to spesh to prove we can drop the slow path.
19:45 dalek nqp: 09cee28 | TimToady++ | src/QRegex/ (2 files):
19:45 dalek nqp: reduce fates to 24 bits, remove redundant AND
19:45 dalek nqp: review: https://github.com/perl6/nqp/commit/09cee28b17
19:46 * FROGGS tries
19:47 arnsholt jnthn: Right, that's what I suspected. I'll update the docs
19:48 jnthn FROGGS: (nmake p-test) I haven't built nqp-p for a good while...
19:48 FROGGS jnthn: I can imagine :o)
19:49 FROGGS though, not everybody is in that position :P
19:51 timotimo is there a good overview of what features made it into perl5 (and cpan) from perl6 development, except for moose and smart matching?
19:51 timotimo i think lexical $_?
19:52 FROGGS subroutine signatures
19:52 FROGGS lexical subs too, right?
19:52 timotimo can they really be called "a perl6 feature"?
19:52 timotimo they are kind of pretty weaksauce
19:53 FROGGS like smart matching
19:53 moritz no, they are really 6y features
19:53 moritz say()
19:53 moritz //
19:53 FROGGS slurp
19:55 perltricks joined #perl6
19:55 FROGGS (given/when)
19:56 timotimo is given/when not the same as smart matching?
19:56 timotimo or at least "the same batch of features"?
19:56 FROGGS it is connected, aye
19:57 ugator mhh sry I'm a cs noob, but one question: Isn't every float a rational number? so it should be possible to convert any float to FatRat? That would be interesting
19:57 timotimo that's not quite how floats work
19:58 timotimo as defined by the IEEE, floats are one part fixed-comma-numbers and an exponent
19:59 ugator but that will give you a rational?
19:59 kjs_ joined #perl6
20:00 timotimo it depends on what you say is a rational number
20:00 masaq joined #perl6
20:00 timotimo our rational numbers are made up of a numerator and a denominator
20:00 masaq evening, #perl6
20:00 ugator a/b with a,b int?
20:00 FROGGS timotimo: I understand the question as: can floats be turned into FatRats without loss of information
20:00 timotimo yes
20:00 jnthn In which case I'd say yes, they can
20:01 timotimo you can't 1/3 as a float properly
20:01 ugator thats what I mean^^
20:01 ugator of course, but the other direction would work?
20:01 timotimo the other direction ought to work
20:02 japhb Not every float is a number.
20:02 japhb m: say FatRat.new(NaN)
20:02 camelia rakudo-moar a7cbe3: OUTPUT«Type check failed in binding nu; expected 'Int' but got 'Num'␤  in method new at src/gen/m-CORE.setting:11170␤  in block <unit> at /tmp/Dowjzjdrko:1␤␤»
20:02 timotimo yeah, there's floats that are Not A Number
20:03 pecastro joined #perl6
20:03 japhb m: say NaN.FatRat
20:03 camelia rakudo-moar a7cbe3: OUTPUT«NaN␤»
20:03 arnsholt I guess all number floats should be rationals though
20:03 japhb YEs
20:12 telex joined #perl6
20:13 Mouq joined #perl6
20:17 timotimo the number of all floats is a rational, too
20:18 TimToady in fact, its denomintor is 1 :)
20:18 TimToady *nator
20:20 colomon joined #perl6
20:25 masaq timotimo: which is the same way as saying that most reals can not be expressed as floats or doubles. :)
20:25 * masaq .oO( how do I love thee? let me uncountable the ways... )
20:27 TimToady masaq: pretty darn near all of them, in terms of percentages
20:29 masaq TimToady: yes, that's what "almost all" means in mathematics. https://en.wikipedia.org/wiki/Almost_all
20:33 denis_boyun_ joined #perl6
20:35 ab5tract joined #perl6
20:36 ab5tract timotimo: smart matching is not a good example for features from p6. it's use is strongly discouraged. this casts a gloom over given/when as well
20:37 ab5tract it's a good example for why p6 needed a complete rewrite, though :)
20:44 ab5tract i guess i mean 'good' in the sense of 'positive', there
20:47 * masaq is writing Perl 5 code, and has just defined helper subs eq_any and any_eq
20:57 dalek snake: b7cdff1 | (Arne Skjærholt)++ | src/Snake/Grammar.nqp:
20:57 dalek snake: Fix bug where compound statements ate the indent of following line.
20:57 dalek snake: review: https://github.com/arnshol​t/snake/commit/b7cdff10c5
20:57 dalek snake: c7bc09f | (Arne Skjærholt)++ | src/Snake/ (2 files):
20:57 dalek snake: Basic loop control implementation.
20:57 dalek snake: review: https://github.com/arnshol​t/snake/commit/c7bc09fe26
20:59 timotimo Q4kh76666666666666666666666​66666666666666666hhhhhhhhhh
20:59 timotimo sorry, cat sat on my keyboard
20:59 FROGGS *g*
20:59 arnsholt I was about to type cat-like typing detected =D
21:11 bbkr joined #perl6
21:12 bbkr retupmoca: hi, is it safe to use single Net::DNS object across many asynchronous Promises?
21:17 bwisti joined #perl6
21:18 masaq 'night, #perl6
21:19 ab5tract m: say set ( this => 10, that => 20, for => 5 ).hash
21:19 camelia rakudo-moar a7cbe3: OUTPUT«set("this" => 10, "that" => 20, "for" => 5)␤»
21:20 ab5tract m: say ( this => 10, that => 20, for => 5 ).hash.Set
21:20 camelia rakudo-moar a7cbe3: OUTPUT«set(this, that, for)␤»
21:22 * ab5tract ponders whether set in subroutine form is evil
21:25 perltricks joined #perl6
21:25 timotimo should it be?
21:26 perltricks hey all, quick question: is the $*IN.input-line-separator() as defined in s28 implemented? I'm trying to set it for a 1 liner
21:26 yoleaux 4 Jul 2014 06:57Z <FROGGS_> perltricks: I would put EVAL where try/CATCH is, so P5er see how P5's eval became try *or* EVAL
21:27 ab5tract timotimo: should it be evil? i would argue, no
21:28 ab5tract there is a test failing in S02-types/set.t
21:28 timotimo perltricks: well, froggs just worked on making multiple (as well as multi-char) line separators work
21:28 timotimo but i think that's still in a branch
21:28 retupmoca bbkr: I *think* the only possible issue with threading is two lookups using the same request id - which should be ok, as each lookup happens over its own TCP connection
21:28 FROGGS timotimo: aye, needs review/talk by/with jnthn
21:28 retupmoca bbkr: note that I have not tested this, and it's based on a 5-minute glance over the code
21:29 perltricks all right, so for now it's fixed at "\n" right? That's fine, just want to check
21:29 FROGGS perltricks: only one-char separators are supported atm
21:31 perltricks ok when you open a file using a one liner arg like -n or -p, can I change the value of $*IN.input-line-separator() ?
21:31 FROGGS dev/rakudo$ perl6-m -e 'say open("README.md", :nl<e>).lines[0]'
21:31 FROGGS # Rakudo Pe
21:31 FROGGS hmmm
21:32 psch ab5tract: the distinction between "set of pairs" and "set from pairs" seems useful, but i agree that it should be more obvious which one gets and why
21:33 ab5tract psch: i agree about the distinction, but in my opinion the ().hash already negates any expectation for a set of pairs
21:34 ab5tract as a set made out of a hash is defined behavior, making a set out of its keys
21:34 ab5tract m: set ( this => 5, that => 4 )
21:34 camelia rakudo-moar a7cbe3: ( no output )
21:34 ab5tract m: say set ( this => 5, that => 4 )
21:34 camelia rakudo-moar a7cbe3: OUTPUT«set("this" => 5, "that" => 4)␤»
21:35 ab5tract m: say (this => 5, that => 4).Set
21:35 camelia rakudo-moar a7cbe3: OUTPUT«set(this, that)␤»
21:35 psch ab5tract: sounds like we'd want a multi set(%a) { Setty.new-from-pairs(%a.pairs) }
21:35 bbkr retupmoca: I'll stress test Net::DNS it a bit. Got over 5_000_000 domains to check :)
21:35 retupmoca bbkr: note that Net::DNS.new() doesn't do any work, either - so there shouldn't be any real performance difference compared to keeping the object alive
21:35 ab5tract ok, so it goes deeper than i thought
21:35 FROGGS perltricks: I try to wire it up, gimme a second
21:35 retupmoca bbkr: ooh, please open issues :D
21:36 psch ab5tract: src/core/set_operators.pm:253
21:36 ab5tract psch: the more i poke at it, the more the entire set architecture seems to fall apart :(
21:37 psch ab5tract: the GLR semantic change might also matter; i.e. flattening methods and non-flattening subs (or was it the other way around..?)
21:37 ab5tract but has the GLR already occured?
21:37 timotimo non-flattening method calls
21:37 perltricks FROGGS: thanks for looking, appreciate it
21:38 psch although i think we're not considering <"quoted" => "key"> vs <non-quoted => "key"> as any kind of flattening
21:38 btyler_ any NativeCall experts, what's the 'right' way to render something like this snippet: https://libgit2.github.com/docs/guides​/101-samples/#repositories_init_simple ? my C is weak and I feel like specifying a CStruct repr with a single int8 member is an awfully hacky way to get to **
21:38 colomon joined #perl6
21:40 ab5tract m: say Set.new( (this => 5, that => 4) )
21:40 camelia rakudo-moar a7cbe3: OUTPUT«set("this" => 5, "that" => 4)␤»
21:40 ab5tract m: say (this => 5, that => 4).Set
21:40 camelia rakudo-moar a7cbe3: OUTPUT«set(this, that)␤»
21:40 psch m: say Setty.new-from-pairs( this => 5, that => 5 )
21:40 camelia rakudo-moar a7cbe3: OUTPUT«Setty.new()␤»
21:40 ab5tract that is just not SWIM
21:40 ab5tract DWIM
21:41 timotimo Setty is a role that's rpobably not intended to be punned
21:41 timotimo at least i think so
21:41 ab5tract timotimo: punned?
21:41 psch m: say Set.new-from-pairs(this => 5, that => 3)
21:41 camelia rakudo-moar a7cbe3: OUTPUT«set()␤»
21:41 timotimo a pun is a class that's created from a role by basically mixing the role into an empty class
21:41 psch m: say Set.new-from-pairs("this" => 5, "that" => 3)
21:41 camelia rakudo-moar a7cbe3: OUTPUT«set(this, that)␤»
21:42 ab5tract under what expectations is a dev supposed to think of ().Set and Set.new() as having different meanings
21:42 psch ^ that's what i meant... :)
21:42 bbkr retupmoca: I'm just reading the code. Indeed .new in every Promise is the best option without performance penalty. Unfortunately it will be already 50% slower than p5 due to lack of UDP. Because I already have linear P5 version I'm refactoring I'll let them race - linear p5 on XS and UDP VS. pure threaded P6 - and hope to get some conclusions for next blog post :)
21:42 psch ab5tract: i'd almost argue the other way.  new-from-pairs exists for a reason, and .Set should do what Set.new does
21:42 ab5tract i'm not against you there
21:43 ab5tract my main concern is that it should be consistent
21:43 retupmoca bbkr: yeah, no UDP in rakudo yet :(
21:43 timotimo new-from-pairs is a performance optimization that's rather internal
21:43 timotimo i don't think new-from-pairs is specced
21:44 ab5tract i think if this is a list of pairs: "a" => "thing", "an" => "other"
21:44 ab5tract then any of set/().Set/Set.new() should create a set of pairs
21:45 ab5tract if you want a set of the keys, call hash on the set of pairs
21:45 ab5tract erm, list of pairs
21:47 ab5tract honestly folks, the state of sets/bags/mixes worries me
21:47 dalek rakudo/nom: 1d3d97f | (Tobias Leich)++ | src/core/IO/Handle.pm:
21:47 dalek rakudo/nom: implement IO::Handle.input-line-separator
21:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1d3d97f1eb
21:47 FROGGS perltricks: that patch seems to make this work: dev/rakudo$ cat README.md | perl6 -p -e '$*IN.input-line-separator = "e"'
21:48 lizmat ab5tract: new-from-pairs is supposed to be an internal method
21:48 psch m: say Set(%(a => 1, b => 2)) # coercion NYI :/
21:48 camelia rakudo-moar a7cbe3: OUTPUT«set(a, b)␤»
21:48 psch ooh
21:48 psch that's there
21:48 psch ab5tract: S32/Containers#Set
21:48 ab5tract lizmat: that's fine, none of my examples are related to new-from-pairs
21:48 FROGGS perltricks: though, since \n is the default, the first line will end with a \n, even when it contains an e
21:48 ab5tract they are related to what i would expect would be every day use cases for sets
21:49 lizmat ab5tract: so what worries you then?
21:49 btyler_ FROGGS: can I borrow your brain for a moment? would love some NativeCall wisdom, playing around with libgit2 and flailing a bit
21:49 FROGGS btyler_: sure, ask
21:49 timotimo i may be able to lend some wisdom, too
21:49 timotimo i've done a bit of nativecall stuff recently as well :)
21:50 ab5tract m: say Set.new( (this => 5, that => 4) ) # expected
21:50 camelia rakudo-moar a7cbe3: OUTPUT«set("this" => 5, "that" => 4)␤»
21:50 btyler_ http://irclog.perlgeek.de/​perl6/2014-11-12#i_9650257
21:50 ab5tract m: say (this => 5, that => 4).Set # expected
21:50 camelia rakudo-moar a7cbe3: OUTPUT«set(this, that)␤»
21:50 btyler_ next time I'll just ping one of you guys :) timotimo, yeah, was just reading through cairo-p6
21:50 ab5tract wait, sorry
21:51 timotimo :)
21:51 ab5tract m: say Set.new( (this => 5, that => 4) ); say set (this => 5, that => 4); say (this => 5, that => 4).Set;
21:51 camelia rakudo-moar a7cbe3: OUTPUT«set("this" => 5, "that" => 4)␤set("this" => 5, "that" => 4)␤set(this, that)␤»
21:52 timotimo btyler_: i would use a CArray[uint8] for a &int parameter
21:52 ab5tract wait..
21:52 ab5tract m: say ((this => 5, that => 4)).Set
21:52 camelia rakudo-moar a7cbe3: OUTPUT«set(this, that)␤»
21:52 timotimo (but i always forget to .= new those, leading to gnarly errors)
21:52 ab5tract right, so ().Set is my concern lizmat
21:53 psch m: say Set(a => 1, b => 2) # .Set as something sub-y
21:53 camelia rakudo-moar a7cbe3: OUTPUT«Cannot coerce to Set with named parameters␤  in block <unit> at /tmp/L0hVnsQuj3:1␤␤»
21:53 timotimo (if the function i'm wrapping isn't checking for null pointers)
21:53 psch grml
21:53 psch m: say Set("a" => 1, "b" => 2) # .Set as something sub-y
21:53 camelia rakudo-moar a7cbe3: OUTPUT«set(a, b)␤»
21:53 psch everything there, naming might be non-obvious
21:53 psch *is there
21:53 ab5tract ....
21:54 ab5tract psch: how is Set() having a different behavior than set() "everything there"
21:54 btyler_ timotimo: in this case it is. see: https://github.com/libgit2/libgit2/​blob/master/src/repository.c#L1473
21:54 timotimo good
21:55 psch ab5tract: "set of pairs" and "set from pairs" exist both as method and sub form, was my thought, but i think that was wrong, apologies
21:55 ab5tract again, if you want a set of keys from a list of pairs, make it a has first
21:55 timotimo and you also have to $arr[0] = 0
21:55 ab5tract psch: i see what you mean, and it does seem to imply that Set() is implemented as .new-fp and set() as .new
21:55 perltricks FROGGS: thanks!
21:56 ab5tract lizmat: does my concern make sense to you?
21:56 lizmat the odd thing is that I don't see how Set() actually works
21:56 lizmat there is no 'sub Set()' in the settings, so I wonder where this behaviour is coming from
21:57 colomon m: my %a = a => 2, b => 3; say Set.new(%a); say %a.Set
21:57 camelia rakudo-moar a7cbe3: OUTPUT«set("a" => 2, "b" => 3)␤set(a, b)␤»
21:57 colomon m: my %a = a => 2, b => 3; say Set.new(%a).elems; say %a.Set
21:57 camelia rakudo-moar a7cbe3: OUTPUT«2␤set(a, b)␤»
21:57 timotimo class Set must have some invocation thingie handled
21:58 colomon m: my %a = a => 2, b => 3, c => 0; say Set.new(%a).elems; say %a.Set
21:58 camelia rakudo-moar a7cbe3: OUTPUT«3␤set(a, b)␤»
21:58 lizmat aha... I see
21:59 timotimo oh?
21:59 timotimo i don't see it yet
21:59 lizmat m: say Int("20")
21:59 camelia rakudo-moar a7cbe3: OUTPUT«20␤»
21:59 lizmat m: say "20".Int
21:59 camelia rakudo-moar a7cbe3: OUTPUT«20␤»
21:59 colomon lizmat: is Set.new(%a) behaving properly?  I thought it was supposed to make a Set with a Hash in it.
22:00 lizmat Foo(bar) will call the method Foo on bar
22:00 colomon lizmat: !!!
22:01 bbkr_ joined #perl6
22:01 timotimo oh
22:01 timotimo that thing is in here now
22:01 lizmat m: say DateTime(23)
22:01 camelia rakudo-moar a7cbe3: OUTPUT«Cannot find method 'DateTime'␤  in block <unit> at /tmp/knnAfLcf7S:1␤␤»
22:01 timotimo i find that slightly awkward
22:01 ab5tract lizmat: ah, i thought that was designed behavior
22:01 colomon m: class Foo { method bar { say "Hello!"; }; }; bar(Foo.new)
22:01 camelia rakudo-moar a7cbe3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/S11YLKkvmDâ�¤Undeclared routine:â�¤    bar used at line 1. Did you mean 'bag'?â�¤â�¤Â»
22:01 lizmat it is, but you only need to create an Any.method for that
22:02 ab5tract lizmat: that still does not address the discrepancy between set()/().Set/Set.new
22:02 TimToady set is *supposed* to be different from Set
22:02 colomon ab5tract: the idea is this: Set.new is supposed to construct exactly what you tell it to.
22:03 colomon ab5tract: .Set is supposed to convert an object into an "equivalent" set
22:03 FROGGS timotimo: I have problems understanding it...
22:03 TimToady they are different by design
22:03 FROGGS timotimo: that's the definition: libgit2/include/git2/types.h:105:typedef struct git_repository git_repository;
22:03 ab5tract TimToady: i'm afraid that it will mean a lot of headaches in the long run
22:03 TimToady not doing will make more
22:03 timotimo FROGGS: excuse me?
22:03 FROGGS timotimo: how is that equal to CArray[uint8] ?
22:03 timotimo are we looking at the same thing?
22:04 timotimo let me re-read
22:04 colomon ab5tract: so if you have a Hash %a which you've been using like a set, then %a.Set makes the Set which is equivalent to that Hash.
22:04 colomon ab5tract: which is nothing at all like the Set of the pairs in the Hash
22:04 TimToady composers are not coercers
22:04 ab5tract ok
22:04 ab5tract that is clearer
22:04 timotimo "a CStruct repr with a single int8 member" - this part threw me off
22:04 timotimo apparently
22:05 FROGGS yes, but I don't see any sign of a int8 member
22:05 btyler_ timotimo: sorry, my question was unclear -- I mentioned the int8 because it's the same size as a pointer in my understanding of C
22:05 FROGGS err
22:05 timotimo oh!
22:05 timotimo no, that's very not correct :)
22:05 psch only sometimes, maybe
22:05 btyler_ heh, right, yeah. not a C programmer, just read it sometimes
22:05 timotimo the size of a pointer is sizeof(void *)
22:05 timotimo which you should not assume to be the same as 32bit or 64bit
22:06 FROGGS btyler_: I'd do: class git_repository is repr('CPointer') { }
22:06 timotimo and 8bit is rather seldomly found in modern machines
22:06 FROGGS btyler_: the you can use that as the type in your sub declaration
22:06 lizmat m: sub a(*@a) { .say for @a }; my %h = a=>1, b=>2; a %h    # colomon: is this behaviour correct?
22:06 camelia rakudo-moar a7cbe3: OUTPUT«"a" => 1␤"b" => 2␤»
22:06 ab5tract TimToady: then i think that makes the case of 'sub set()' begin evil a bit stronger.. ().Set vs Set.new() can be distinguished by the general rule of composers <> coercers
22:07 lizmat colomon: aka, is it ok that a slurpy array turns a hash into a list of pairs ?
22:07 FROGGS star-m: class git_repository is repr('CPointer') { }; say git_repository; say git_repository.new
22:07 camelia star-m 2014.09: OUTPUT«(git_repository)␤git_repository.new()␤»
22:07 ab5tract but set() doesn't make itself clear
22:07 colomon lizmat: …. I have no idea
22:07 TimToady set is a composer, sugar for Set.new
22:07 TimToady that's all
22:07 colomon lizmat: it's certainly not what I would expect
22:07 ab5tract right, but not every composer has sugar
22:07 TimToady Set() is a coercer, if you want it to look like a function
22:07 timotimo btyler_: or do you mean an 8 byte integer?
22:08 timotimo m: say 64 / 8
22:08 camelia rakudo-moar a7cbe3: OUTPUT«8␤»
22:08 lizmat m: sub a(*@a) { .say for @a }; my %h = a=>1, b=>2; a %h    # TimToady: is this correct ?
22:08 camelia rakudo-moar a7cbe3: OUTPUT«"a" => 1␤"b" => 2␤»
22:08 timotimo because in perl6, int8 means a single byte
22:08 colomon timotimo: he surely thought int8 was an 8-byte int.  He even had me convinced for a minute there...
22:08 TimToady lizmat: yes, looks right to me
22:08 TimToady listifying a hash produces pairs
22:08 lizmat so a slurpy turns a hash into a list of pairs
22:09 btyler_ don't bother trying to plumb the depths of my C ignorance, I'm afraid it'll take you a while to hit rock bottom. sorry for the mix up!
22:09 lizmat Set.new is currently implemented with a slurpy, so I guess that is correct as well then?
22:09 FROGGS *g*
22:09 timotimo :D
22:09 TimToady gotta go afk for the afternoon, since I'm on vacation
22:09 TimToady lizmat: yes
22:09 ab5tract TimToady: enjoy!
22:10 TimToady laters &
22:10 lizmat TimToady: have fun!
22:10 colomon lizmat, TimToady: then how do you create a Set of Hashes?
22:10 perltricks FROGGS: do you know if $*IN.ins is working? perl6 -ne 'say $*IN.ins' /path/to/file      prints zero for each line
22:11 timotimo could be it's NYI :(
22:11 FROGGS no, it is supposed to work
22:11 perltricks yah sorry I might be jumping the gun. Trying to write a collection of one liners in p6 :)
22:11 lizmat m: my @a={a=>1,b=>2},{c=>3}; say Set.new(@a).perl   # colomon: like this ?
22:11 camelia rakudo-moar a7cbe3: OUTPUT«set({"b" => 2, "a" => 1},{"c" => 3})␤»
22:11 FROGGS because -n calls .lines, and .lines increments $!ins
22:12 colomon lizmat: that… seems odd.  The same goes for a Set of Lists?
22:12 colomon lizmat: mind you, I guess it works.
22:12 lizmat m: say Set.new({a => 1}).perl
22:12 camelia rakudo-moar a7cbe3: OUTPUT«set({"a" => 1})␤»
22:13 psch m: say set(%(a => 1, b => 2), %(c => 3, d => 4))
22:13 camelia rakudo-moar a7cbe3: OUTPUT«set("a" => 1, "b" => 2, "c" => 3, "d" => 4)␤»
22:13 psch right, that flattens
22:13 lizmat m: sub a(*@a) { .say for @a }; my %h = a=>1, b=>2; a $%h    # avoid flattening
22:13 camelia rakudo-moar a7cbe3: OUTPUT«"a" => 1, "b" => 2␤»
22:13 FROGGS perltricks: but yeah, I can confirm that one gets zeros
22:13 psch i think it shouldn't, cf. S32/Containers.html#Set
22:14 lizmat m: my %h=a=>1,b=>2; say Set.new($%h).perl   # itemizing also works
22:14 camelia rakudo-moar a7cbe3: OUTPUT«set({"a" => 1, "b" => 2})␤»
22:14 psch "The set composer will very literally make a Set of whatever you pass it;"
22:14 ab5tract psch: i was just noticing that difference in behavior between %() and {} too
22:14 psch oh, right
22:14 psch i wasn't passing hashes
22:15 FROGGS perltricks: dev/rakudo$ perl6 -ne 'say $*ARGFILES.ins' README.md
22:15 FROGGS 1
22:15 FROGGS 2
22:15 psch m: sub a($b) { $b.perl }; say a %(a => 1, b => 2)
22:15 camelia rakudo-moar a7cbe3: OUTPUT«{"b" => 2, "a" => 1}␤»
22:15 psch well, now i'm confused :)
22:16 FROGGS perltricks: if you pass a filename like that, it is not $*IN anymore
22:16 ab5tract m: say set (this => 5, that => 4).hash, (other => 3, than => 2).hash
22:16 camelia rakudo-moar a7cbe3: OUTPUT«set("this" => 5, "that" => 4, "other" => 3, "than" => 2)␤»
22:16 psch m: say set({a => 1, b => 2}, {c => 3, d => 4})
22:16 lizmat ab5tract: so now you're the proud owner of a set with 5 pairs
22:16 camelia rakudo-moar a7cbe3: OUTPUT«set("a" => 1, "b" => 2, "c" => 3, "d" => 4)␤»
22:16 lizmat *4
22:16 perltricks FROGGS: gotcha, thanks
22:17 psch maybe i'm misinterpreting "quite literally" from the quoted bit of spec
22:17 ab5tract m: say ((this => 5, that => 4).hash, (other => 3, than => 2).hash).Set
22:17 camelia rakudo-moar a7cbe3: OUTPUT«set(this, that, other, than)␤»
22:18 ab5tract lizmat: it seems that i'm dense regarding the distinction between
22:18 ab5tract m: (this => 5, that => 4).hash.perl.say
22:18 camelia rakudo-moar a7cbe3: OUTPUT«("this" => 5, "that" => 4).hash␤»
22:19 ab5tract m: {this => 5, that => 4}.perl.say
22:19 camelia rakudo-moar a7cbe3: OUTPUT«{"this" => 5, "that" => 4}␤»
22:20 hoelzro is there a way to declare a trait for grammars such that grammar MyGrammar is case_insensitive { ... } will work?
22:20 hoelzro multi trait_mod:is<case_insensitive(|) {} doesn't do the trick
22:23 lizmat ab5tract: the latter is itemized, the former isn't
22:23 lizmat in P5 terms, the latter is a reference, the former is not
22:23 ab5tract m: say [&&] (this => 5, that => 4).hash ~~ Hash, {this => 5, that => 4} ~~ Hash
22:23 camelia rakudo-moar 1d3d97: OUTPUT«True␤»
22:24 ab5tract if it smokes like a hash..
22:24 lizmat m: say [] ~~ Array; say Array.new ~~ Array
22:24 camelia rakudo-moar 1d3d97: OUTPUT«True␤True␤»
22:24 ab5tract lizmat: okay, that seems pretty clear. but then i see something like this:
22:25 ab5tract m: say all {this => 5, that => 4}, {that => 5, this => 4}
22:25 camelia rakudo-moar 1d3d97: OUTPUT«all("that" => 4, "this" => 5, "that" => 5, "this" => 4)␤»
22:25 psch m: sub a (\b) { .say for b }; a {a => 1, b => 2}; a %(a => 1, b => 2)
22:25 ab5tract why does itemization not count there?
22:25 camelia rakudo-moar 1d3d97: OUTPUT«"a" => 1, "b" => 2␤"a" => 1␤"b" => 2␤»
22:25 lizmat m: say all({this => 5, that => 4}, {that => 5, this => 4}).perl
22:25 camelia rakudo-moar 1d3d97: OUTPUT«all({"this" => 5, "that" => 4}, {"that" => 5, "this" => 4})␤»
22:26 * psch is off to bed o/
22:26 timotimo gnite psch
22:26 lizmat goodnight psch
22:26 ab5tract lizmat: ah, okay that's ...
22:26 ab5tract ciao psch, thanks for golfing with me :)
22:26 lizmat you're created a junction with 2 hashes
22:27 lizmat *you've
22:27 ab5tract yeah, as i was expecting. i just would have expected  $junction.say and $junction.perl.say to show the same internal structure. i'm pretty new to all this still
22:27 lizmat ab5tract: .gist is *not* always 100% correct
22:27 ab5tract so i see :)
22:28 lizmat .gist is for humans, for quick interrogation
22:28 lizmat always use .perl if you want to be sure
22:28 ab5tract duly noted
22:29 * lizmat is going to make it an early night
22:29 lizmat a long commute to Copenhagen is in order tomorrow
22:30 lizmat sleep&
22:30 ab5tract ciao lizmat!
22:44 Mouq joined #perl6
23:05 colomon joined #perl6
23:24 Mouq hoelzro: I don't think there's really a way to do that :/
23:37 timotimo so in this example code i have here, infix:<<> gets inlined a few times here and there and if we follow the fact that p6bool is "basically" a box_i instruction... that'd really be worth something
23:37 timotimo especially since that happens in postcircumfix:<[ ]>
23:49 ugexe nqp: sub xx (*@vars) { my int $elem := nqp::shift_i(@vars); return $elem; }; nqp::say(xx(1,2,3,4));
23:49 camelia nqp-parrot: OUTPUT«1␤»
23:49 camelia ..nqp-moarvm: OUTPUT«MVMArray: shift expected object register␤   at /tmp/tmpfile:1  (<ephemeral file>:xx:5)␤ from /tmp/tmpfile:1  (<ephemeral file>:<mainline>:35)␤ from gen/moar/stage2/NQPHLL.nqp:1234  (/home/camelia/rakudo-inst-2/languag​es/nqp/lib/NQPHLL.moarvm:eval:172)␤ fro…»
23:49 camelia ..nqp-jvm: OUTPUT«(signal ABRT)»
23:51 timotimo you cannot shift an _i out of a generic list
23:51 timotimo (on moar and jvm)
23:51 ugexe ah thanks
23:53 ugexe nqp: sub xx (*@vars) { my $elem := nqp::shift(@vars); return $elem; }; nqp::say(xx(1,2,3,4));
23:53 camelia nqp-{moarvm,parrot}: OUTPUT«1␤»
23:53 camelia ..nqp-jvm: OUTPUT«(signal ABRT)»
23:53 timotimo if you nqp::shift into an int variable it should correctly coerce for you
23:53 timotimo hm

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

Perl 6 | Reference Documentation | Rakudo