Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-10-03

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:34 jnthn morning, #perl6
00:34 sorear o/ jnthn
00:35 sorear not back in .sv I take it
00:35 sorear er, .se
00:36 * sorear must've been thinking Svenska, not El Salvador
00:36 jnthn :)
00:37 jnthn No, in Tokyo right now, but going out to Hakone for a few days before I head back to Sweden.
00:45 cognominal joined #perl6
01:00 cognominal joined #perl6
01:08 sjohnson jnthn: hi.  long time no chat.  you're still a win user, right?
01:09 jnthn sjohnson: yes
01:09 diakopter win ftw
01:10 sjohnson diakopter: you too?
01:10 diakopter yes
01:10 sjohnson nice
01:10 sjohnson me too.  :)
01:10 sjohnson i use windows 7 x64
01:10 diakopter win8 here
01:10 sjohnson i was worried making the chance from XP a few years ago, but it was a smart move.
01:11 sjohnson for the longest time i've wanted to grab stdout to the clipboard in windows
01:11 sjohnson thinking it was impossible and determined to write me own, i looked for available names i could use under cmd.exe
01:11 sjohnson i thought of clip.  checked for it, and sure enough, it already exists
01:11 sjohnson dir | clip
01:11 sjohnson .. i wish I knew that years ago!
01:12 sjohnson i wanted to share that with jnthn, but you too diakopter
01:12 diakopter that's neat; thanks
01:13 jnthn omgz!
01:13 jnthn sjohnson++
01:13 jnthn I'm gonna use that, like, quite a bit :)
01:13 sjohnson happy to share
01:13 diakopter now what about paste
01:13 sjohnson you mean to print clipboard stuff to pipe to something else?
01:14 colomon It's pbpaste / pbcopy on OS X.  ;)
01:15 sjohnson diakopter: http://unxutils.sourceforge.net/  (look for gclip.exe)
01:15 sjohnson if i read your question right
01:15 sjohnson then again, it might be possible in windows 7 too, not sure what the command would be
01:16 sjohnson probably not though.
01:16 sjohnson diakopter: sorry, pclip.exe
01:34 Targen joined #perl6
01:40 mtk joined #perl6
02:47 orafu joined #perl6
02:49 jerome joined #perl6
03:01 benabik joined #perl6
03:04 tokuhiro_ joined #perl6
03:07 mtk joined #perl6
03:33 jerome joined #perl6
03:34 * TimToady @ LAX
03:34 mikemol joined #perl6
03:36 sorear yay!
03:39 TimToady still need to hop to SJC in some kind of puddle jumper
03:40 sorear I thought you lived in Pasadena these days
03:40 sorear or Palo Alto
03:40 TimToady I haven't lived in Pasadena since 1963 :)
03:41 TimToady Mountain View
03:41 TimToady which is next door to Palo Alto
03:41 sorear and closer to SJC than LAX then
03:41 TimToady but Palo Alto is about 350 miles from Pasadena
03:47 TimToady 残念ですが、風邪をひきました。。。
03:47 lestrrat oh no!
03:47 * diakopter squints upside down
03:48 sorear vocabulary page fault
03:49 sorear eep
03:50 TimToady ~。~。
03:52 TimToady ・え
03:52 TimToady ~。
03:54 TimToady heh
03:54 TimToady no wonder ~. didn't work, I was still in anthy...
03:55 sorear oh, you were trying to kill ssh?
03:55 sorear what is .e?
03:55 geekosaur heh
03:55 TimToady we probably trying to type /e
03:55 * geekosaur was actually wondering if that was what was going on
03:56 TimToady which goes back to then end of my window
03:56 TimToady but I lost the backchannel, so was typing blind
03:56 TimToady s/we/was/
03:56 TimToady wifi a a bit flakey here at LAX
03:57 sorear meh, TimToady, we know you're a plural entity
03:57 TimToady we are sometimes amused
04:25 kaleem joined #perl6
04:28 dalek nqp: 82452e6 | jonathan++ | / (4 files):
04:28 dalek nqp: Implement (?i) modifier.
04:28 dalek nqp: review: https://github.com/perl6/nqp/commit/82452e60bc
04:34 telex joined #perl6
04:52 * jnthn &
05:32 GlitchMr joined #perl6
05:48 birdwindupbird joined #perl6
06:44 aharoni joined #perl6
06:57 replore joined #perl6
07:06 flightrecorder joined #perl6
07:10 moritz good morning
07:16 kurahaupo joined #perl6
07:23 cognominal joined #perl6
07:24 sorear good morning
07:30 cognominal joined #perl6
07:32 cognominal joined #perl6
07:34 Psyche^ joined #perl6
07:35 cognominal joined #perl6
07:36 * TimToady -> home
07:36 kurahaupo joined #perl6
07:39 SamuraiJack joined #perl6
07:39 cognominal joined #perl6
07:41 kresike joined #perl6
07:42 kresike good morning all you happy perl6 people
07:43 cognominal joined #perl6
07:45 * sorear is a little suprised TimToady found a flight departing at 12:36a local time
07:48 * TimToady is at home, not leaving for home
07:49 cognominal joined #perl6
07:51 sorear ah!  welcome home.
07:52 frettled moritz: happy happy
08:00 cognominal joined #perl6
08:04 cognominal joined #perl6
08:09 perigrin joined #perl6
08:10 cognominal joined #perl6
08:11 fgomez joined #perl6
08:17 gerhard_ joined #perl6
08:19 gerhard2 joined #perl6
08:26 Chillance joined #perl6
08:32 dakkar joined #perl6
08:40 kaleem_ joined #perl6
08:41 cognominal joined #perl6
08:43 fuleo joined #perl6
08:44 am0c joined #perl6
08:44 kaleem joined #perl6
08:45 kaleem_ joined #perl6
08:49 cognominal_ joined #perl6
08:49 kaleem joined #perl6
08:49 wk joined #perl6
08:51 kaleem_ joined #perl6
08:52 brrt joined #perl6
08:58 kaleem_ joined #perl6
09:04 kaleem_ joined #perl6
09:06 kaleem joined #perl6
09:09 kaleem_ joined #perl6
09:11 kaleem joined #perl6
09:12 kaleem joined #perl6
09:12 cognominal_ joined #perl6
09:14 kaleem_ joined #perl6
09:20 kaleem_ joined #perl6
09:22 kaleem joined #perl6
09:24 kaleem_ joined #perl6
09:27 kaleem joined #perl6
09:31 kaleem_ joined #perl6
09:32 kaleem joined #perl6
09:36 kaleem_ joined #perl6
09:37 kaleem joined #perl6
09:42 kaleem joined #perl6
09:43 kaleem_ joined #perl6
09:46 cognominal joined #perl6
09:47 kaleem joined #perl6
09:49 kaleem_ joined #perl6
09:51 daxim joined #perl6
09:54 kaleem_ joined #perl6
09:58 kaleem joined #perl6
10:00 kaleem_ joined #perl6
10:02 cognominal joined #perl6
10:03 kaleem joined #perl6
10:06 kaleem_ joined #perl6
10:11 kaleem_ joined #perl6
10:15 kaleem joined #perl6
10:16 kaleem_ joined #perl6
10:19 kaleem joined #perl6
10:21 kaleem_ joined #perl6
10:23 kresike everyone who thinks kaleem should switch internet providers raise their arms and hands high :)
10:23 kresike \o/
10:34 replor___ joined #perl6
10:40 xinming_ joined #perl6
10:45 tadzik ¯\_(ツ)_/¯
10:49 replore_ joined #perl6
11:05 Su-Shee_ joined #perl6
11:16 fhelmberger joined #perl6
11:49 rindolf joined #perl6
11:55 jnthn evening o/
11:56 moritz good morning jnthn
11:56 rindolf jnthn: goof afternoon.
11:57 jnthn For a Japanese hotel room, this place is oddly spacious :)
11:58 jnthn Benefit of being in the countryside. Downside: everything seems to close by 7pm!
11:58 moritz do Japanese hotel rooms have awesome internet connection?
11:59 jnthn moritz: This one seems to. :)
11:59 moritz \o/
11:59 jnthn Also a fridge loaded with rather large beer bottles :)
11:59 moritz those are just decoration :-)
11:59 jnthn no, they really do contain beer :D
12:02 jnthn eval "b" =~ /(a)|(b)/; $1
12:02 jnthn eval: "b" =~ /(a)|(b)/; $1
12:02 jnthn Hmm, didn't we have a Perl 5 evalbot...
12:03 jnthn r: "b" ~~ /(a)|(b)/; $1
12:03 p6eval rakudo c1ddea:  ( no output )
12:03 jnthn r: "b" ~~ /(a)|(b)/; say $1
12:03 p6eval rakudo c1ddea: OUTPUT«Any()␤»
12:03 jnthn r: "b" ~~ /(a)|(b)/; say $0
12:03 p6eval rakudo c1ddea: OUTPUT«「b」␤␤»
12:03 jnthn rn: "b" ~~ /(a)|(b)/; say $0
12:03 p6eval niecza v22-6-g9e5350d: OUTPUT«#<match from(0) to(1) text(b) pos([].list) named({}.hash)>␤»
12:03 p6eval ..rakudo c1ddea: OUTPUT«「b」␤␤»
12:04 jnthn rn: "b" ~~ /(a)|(b)/; say $1
12:04 p6eval rakudo c1ddea, niecza v22-6-g9e5350d: OUTPUT«Any()␤»
12:05 buubot_backup joined #perl6
12:10 telex joined #perl6
12:11 aharoni There's only one bug marked as [EASY] in Perlbug, and it doesn't seem very easy to me.
12:12 aharoni I understand the problem, but I have no idea how to start solving it.
12:12 aharoni https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=82308
12:12 aharoni If anybody thinks that it's really easy and can give me some guidance, I can try solving it.
12:14 jnthn It's easy in so far as it can be solved completely by writing Perl 6 code and all the pre-requisite bits are there. It's tricky in so far as it's an unslvable problem in general ;)
12:15 jnthn It's mostly about implementing a Signature.ACCEPTS candidate that takes another Signature
12:15 jnthn It then involves looking through the parameters and considering those
12:17 * jnthn finds another 89 pasing tests
12:17 dalek nqp: 94286df | jonathan++ | src/QRegex/P5Regex/Actions.nqp:
12:17 dalek nqp: Perl 5 capture/alternation semantics.
12:17 dalek nqp: review: https://github.com/perl6/nqp/commit/94286dfa00
12:22 cognominal joined #perl6
12:24 dalek roast: 5efc2af | jonathan++ | S05-modifier/perl5_3.t:
12:24 dalek roast: Fudge a rx:P5/.../ test file for Rakudo.
12:24 dalek roast: review: https://github.com/perl6/roast/commit/5efc2af842
12:25 aharoni jnthn, so... solvable or unsolvable?
12:26 aharoni And can you update the bug report with whatever thought that you have about it?
12:27 rindolf aharoni: hi.
12:27 dalek rakudo/nom: fb11f13 | jonathan++ | t (2 files):
12:27 dalek rakudo/nom: Run S05-modifiers/perl5_3.t.
12:27 dalek rakudo/nom:
12:27 dalek rakudo/nom: Also bumps NQP_REVISION to get (?i) support and alternation fix.
12:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fb11f13cda
12:27 aharoni shalom rindolf.
12:27 rindolf aharoni: what's new?
12:27 rindolf aharoni: Hag Same'ach.
12:27 jnthn aharoni: Well, making as much as the bug report noted didn't work happen is fairly easy at least.
12:28 * jnthn looks to see if there's any tests etc.
12:28 jnthn hm, seems not, at least in S03-smartmatch
12:29 jnthn moritz++ may know if we have some elsewhere that I didn't find...
12:29 * [Coke] drinks a coffee, trying to clear the cobwebs from his head. ACHOOO. oh, not exactly cobwebs, whoops.
12:30 jnthn eww :P
12:30 aharoni rindolf,  I've got a new laptop to replace my 2006 rust bucket, and among other things I can finally try to hack on Perl 6. I dreamt about this for a long time.
12:30 rindolf aharoni: nice.
12:30 rindolf aharoni: what are your laptop's SPECs?
12:31 aharoni lenovo, 8gb RAM, i7. nothing fancy except that, but that's more than enough to git clone, run tests, and try to fix a thing or two.
12:32 rindolf aharoni: ah.
12:32 buubot_backup joined #perl6
12:32 rindolf aharoni: I have 8GB of RAM and Core i3.
12:33 felher I know there is '.^parents' in rakudo. Is there also something like '.^children'?
12:33 felher o/ everybody, btw :)
12:33 rindolf felher: hello.
12:33 aharoni rindolf,  if you have time and mood, you're welcome to take a look at https://github.com/perl6/roast/pull/25
12:34 jnthn aharoni: Quicky and dirty example to get you started: https://gist.github.com/3826700
12:34 rindolf aharoni: I'm not a Perl 6 committer.
12:34 flussence .^children would have to search the entire lexpad for objects using that class as a parent. Doesn't sound like something that would be available by default.
12:35 jnthn felher: There's nothing like that so far.
12:35 jnthn felher: And I don't think it'd be good to have it by default as it would lead to leaks, I expect.
12:36 felher flussence, jnthn: okay, thnx :)
12:36 rindolf aharoni:  https://github.com/amire80/roast/commit/​7d2883b9250e2d8b55dfeb3b26e753fb6dd4ea37 - I think you should extract a function for the until+unlink lines.
12:36 felher i build my own list of Events then :)
12:37 aharoni rindolf++, the eternal refactorer :)
12:37 rindolf aharoni: thanks. :-)
12:38 aharoni is there any reason why you aren't a Perl 6 committer?
12:38 jnthn aharoni: I suggest building up a set of tests for signature comparison. My example doesn't care about positional vs named, or optional vs required.
12:39 jnthn aharoni: Developing by augmenting means you can experiemnt quickly without having to rebuild CORE.setting each time you change something :)
12:39 [Coke] jnthn: I have several things here covered in snot which would agree with you.
12:39 cognominal joined #perl6
12:40 jnthn [Coke]: Hopefully not cow orkers :)
12:40 cognominal joined #perl6
12:41 leprevost joined #perl6
12:51 aharoni jnthn, I guess that I'll need an explanation about a few things. To begin with, I suppose that <Signature:D:> is the invocant parameter, according to S06... but what exactly is an invocant parameter?
12:51 aharoni Why is it needed if it's already in class Signature?
12:53 aharoni (that said, I mostly understand the code; I just want to be sure that I get all the bits and pieces.)
12:54 mucker joined #perl6
12:56 [Coke] invocant == self
12:57 jnthn aharoni: Because we only want to take invocants that are instances, not the type object.
12:57 jnthn Consider Signature ~~ Signature vs :(Str) ~~ :(Str)
12:58 atrodo joined #perl6
12:59 PacoAir joined #perl6
13:00 hash_table joined #perl6
13:30 fhelmberger joined #perl6
13:35 birdwindupbird joined #perl6
14:00 stopbit joined #perl6
14:00 [Coke] ~[ ●_● ]~ . o O (ooh, more unimotes)
14:01 benabik joined #perl6
14:02 * colomon just wrote a little p5 script, and is impressed both at how fast it is and how relatively clumsy to code compared to p6
14:08 * colomon discovered (as a result), that eliminating the ten slowest files from his test suite should speed it up by three or four hours.
14:09 daxim show the clumsy code, I want to see what can be backported next
14:09 colomon I don't think it's really much of a candidate for backporting.
14:10 colomon I'm thinking join('', map { sprintf("%02d", $_); } split(/\:/, DateCalc($start, $end)))
14:10 colomon versus DateCalc($start, $end).split(":").map({ sprintf("%02d", $_); }).join('')
14:11 daxim yeah, already fix'd in perl5i/autobox::Core
14:11 flussence .map(*.fmt('%02d')) :)
14:11 colomon also foreach syntax, if (bool) versus if bool, etc
14:11 colomon daxim: really?
14:12 colomon (pulls up documentation) interesting...
14:14 colomon I suppose for a really proper comparison I should rewrite the code in p6, but that would involve porting Date::Manip.
14:15 GlitchMr joined #perl6
14:18 cognominal joined #perl6
14:22 dalek nqp: 2d70bfa | jonathan++ | src/QRegex/P5Regex/ (2 files):
14:22 dalek nqp: Lookahead, positive and negative.
14:22 dalek nqp: review: https://github.com/perl6/nqp/commit/2d70bfa342
14:23 nyuszika7h joined #perl6
14:24 jnthn 'night o/
14:24 diakopter o/
14:31 bluescreen10 joined #perl6
14:35 flussence r: for ^10 { state $ = warn 'warn once' } # neat thing I just found out I could do in perl5 too
14:35 p6eval rakudo fb11f1: OUTPUT«warn once  in block  at /tmp/c2AuYCtAnY:1␤␤»
14:40 moritz eval: for (0..10) { state $ = warn "once" }
14:41 moritz ENOBUUBOT
14:41 hash_table joined #perl6
14:41 moritz ah, but you need to name the variable :-)
14:42 aindilis joined #perl6
14:46 Exodist joined #perl6
14:46 kaare__ joined #perl6
15:05 tokuhiro_ joined #perl6
15:06 rindolf joined #perl6
15:16 cognominal_ joined #perl6
15:21 aharoni This is spam: https://rt.perl.org/rt3/Tic​ket/Display.html?id=115094 . How can I mark it for removal?
15:21 aharoni Or closing or whatever.
15:21 Circlepuller joined #perl6
15:23 [Coke] I got it.
15:23 [Coke] I have a "mark spam" button when looking at that in the "open, take" menu on the top right. doy ou?
15:24 [Coke] (if so, mark it. if not, I'll get it.)
15:25 aharoni [Coke], I have "Comment · Reply" on top right... is it near that?
15:33 skids joined #perl6
15:35 kresike bye folks
15:39 kurahaupo1 joined #perl6
15:45 bphillips joined #perl6
15:45 moritz jnthn++ # blag
15:46 zby_home joined #perl6
15:46 GlitchMr Why spam bots even attempt to spam bug tracker with robots.txt: https://rt.perl.org/robots.txt
15:46 GlitchMr No search engine will notice those attempts
15:47 GlitchMr oh, wait, it's not website spam
15:47 bphillips hi - is there a Term::Readline equivalent for perl6 yet?
15:47 GlitchMr I know that Rakudo REPL uses Readline
15:48 GlitchMr But... I dunno...
15:48 moritz I don't think there are user-space bindings available
15:50 moritz though it seems it should be easy to use with NativeCall.pm6
15:50 bphillips I was just watching jnthn++ 's YAPC::Asia talk and was getting inspired to try writing something :-)
15:51 bphillips (but writing lower-level libraries is a bit intimidating as an entry point)
15:51 moritz star: use NativeCall; sub readline(Str) returns Str is native('libreadline') { ... }; say readline('foo:')
15:51 p6eval star 2012.07: OUTPUT«Cannot locate native library 'libreadline.so'␤  in method postcircumfix:<( )> at /home/p6eval/star/lib/parrot/4.6.0/la​nguages/perl6/lib/NativeCall.pm6:102␤  in <anon> at src/gen/BOOTSTRAP.pm:811␤  in any <anon> at src/gen/BOOTSTRAP.pm:807␤  in block <anon> at /tmp/n…
15:52 moritz star: use NativeCall; sub readline(Str) returns Str is native('libreadline5') { ... }; say readline('foo:')
15:52 p6eval star 2012.07: OUTPUT«Cannot locate native library 'libreadline5.so'␤  in method postcircumfix:<( )> at /home/p6eval/star/lib/parrot/4.6.0/la​nguages/perl6/lib/NativeCall.pm6:102␤  in <anon> at src/gen/BOOTSTRAP.pm:811␤  in any <anon> at src/gen/BOOTSTRAP.pm:807␤  in block <anon> at /tmp/…
15:53 moritz star: use NativeCall; sub readline(Str) returns Str is native('libreadline.so.5') { ... }; say readline('foo:')
15:53 p6eval star 2012.07: OUTPUT«foo:Land der Berge, Land am Strome,␤Land der Berge, Land am Strome,␤»
15:53 bphillips very cool
16:00 moritz I have a mini module locally that can read from readline, but segfaults when I press the Arrow-Up key
16:01 moritz https://gist.github.com/3827804
16:01 tokuhiro_ joined #perl6
16:04 [Coke] aharoni: yes, it's in that menu. I'll mark it.
16:06 GlitchMr Shouldn't prompt use ReadLine?
16:06 MayDaniel joined #perl6
16:10 baarthor joined #perl6
16:10 tokuhiro_ joined #perl6
16:17 [Coke] as opposed to the vm builtin? possibly. rakudo doesn't always use the parrot builtins.
16:24 aharoni jnthn, I submitted two pull requests about that Signature bug we discussed earlier. I'm a newbie, so they are probably naive. Thanks for any constructive criticism.
16:25 aharoni (And rebuilding CORE.setting wasn't that bad. Do you suggest to avoid it and use augment just because it takes some time in the build process?)
16:27 moritz if you need 10 recompiles instead of 2, you think differently :-)
16:29 aharoni But it's just a matter of getting it automatically rebuilt during `make', right? It's all automatic.
16:29 aharoni The re-building is a good time to focus on $dayjob.
16:29 moritz aye
16:29 [Coke] yah, it's mainly because it takes so long. used to take even longer.
16:30 * [Coke] does wish he could get paid to perl for his dayjob.
16:30 * aharoni writes PHP at $dayjob, but otherwise it's fantastic.
16:31 nyuszika7h joined #perl6
16:32 dalek roast: 748aace | (Amir E. Aharoni)++ | S03-smartmatch/signature-signature.t:
16:32 dalek roast: Add a test for smartmatching Signature and Signature
16:32 dalek roast: review: https://github.com/perl6/roast/commit/748aace951
16:32 dalek roast: e50ae20 | (Конрад Боровски)++ | S03-smartmatch/signature-signature.t:
16:32 dalek roast: Merge pull request #27 from amire80/bug82308_signature_smartmatch_tests
16:32 dalek roast:
16:32 dalek roast: Add a test for smartmatching Signature and Signature
16:32 dalek roast: review: https://github.com/perl6/roast/commit/e50ae20bfd
16:32 nyuszika7h joined #perl6
16:33 [Coke] aharoni: I have you beat, I write CF at $DAYJOB.
16:34 aharoni Retro cool.
16:34 moritz rewriting the segfaultiing program in C stops it from segfaulting :/
16:35 thou joined #perl6
16:35 aharoni GlitchMr++, thanks for merging :)
16:35 moritz I wonder if add_history gets a different pointer when going through nativecall
16:36 moritz aharoni: can't you push directly too?
16:36 tokuhiro_ joined #perl6
16:36 moritz I thought I gave you a commit bit the other day
16:36 aharoni I can, you gave me the permission. I'm just trying to be modest while I'm doing the first steps.
16:36 aharoni I can push directly, if you prefer.
16:37 moritz it's just less work for us others if you push directly
16:37 tokuhiro_ joined #perl6
16:47 wk joined #perl6
16:51 cognominal joined #perl6
16:52 cognominal rakudo: Int.WHAT == Int
16:52 p6eval rakudo fb11f1: OUTPUT«Parameter '' requires an instance, but a type object was passed␤  in method Bridge at src/gen/CORE.setting:2837␤  in sub infix:<==> at src/gen/CORE.setting:2760␤  in block  at /tmp/CfNL5w6qtP:1␤␤»
16:56 cognominal question out of pure curiosity. how to test that an value is class?
16:56 cognominal the previous expression was an attempt at that
16:59 aharoni jnthn, GlitchMr, moritz, now I'm dying to know whether https://github.com/rakudo/rakudo/pull/84 is any good.
16:59 wk joined #perl6
16:59 [Coke] rakudo: say Int.WHAT == 3.WHAT
16:59 p6eval rakudo fb11f1: OUTPUT«Parameter '' requires an instance, but a type object was passed␤  in method Bridge at src/gen/CORE.setting:2837␤  in sub infix:<==> at src/gen/CORE.setting:2760␤  in block  at /tmp/90RKP_yjV0:1␤␤»
17:00 [Coke] rakudo: say 3.WHAT == Int
17:00 p6eval rakudo fb11f1: OUTPUT«Parameter '' requires an instance, but a type object was passed␤  in method Bridge at src/gen/CORE.setting:2837␤  in sub infix:<==> at src/gen/CORE.setting:2760␤  in block  at /tmp/1fPAoSNwhM:1␤␤»
17:00 cognominal rakudo: Int.WHAT === Int
17:00 p6eval rakudo fb11f1:  ( no output )
17:00 cognominal rakudo: say Int.WHAT === Int
17:00 p6eval rakudo fb11f1: OUTPUT«True␤»
17:00 [Coke] ah, there you go.
17:01 cognominal == must be numeric equality
17:03 rjbs Why does this happen:
17:03 rjbs rakudo: role SomeRole { } say 1
17:03 p6eval rakudo fb11f1: OUTPUT«===SORRY!===␤Confused␤at /tmp/xAyDIGQMIq:1␤»
17:04 rjbs Ah, I need a ;
17:04 [Coke] rjbs++
17:04 rjbs rakudo: role X {} ; say X.WHAT === X
17:04 p6eval rakudo fb11f1: OUTPUT«True␤»
17:04 rjbs So, That doesn't tell us that X is a class.
17:05 rjbs (Unless I misunderstand the class:role relationship in 6.)
17:06 cognominal rjbs, can we do anything in Perl runtime with a role without instanciating it? :)
17:06 [Coke] no, but it tells us that X is an X.
17:06 rjbs cognominal: Can you instantiate a role *at all*?
17:06 [Coke] I assumed he meant a particular class, not any ole class.
17:07 rjbs [Coke]: I'm just wondering how to answer the question as asked:  how do you tell that X is a class?
17:07 [Coke] rakudo: role X {}; my $x = X.new();
17:07 p6eval rakudo fb11f1:  ( no output )
17:07 rjbs Or, if he didn't mean that, then I'm wondering!
17:08 [Coke] rakudo has 637 open tickets, with 80 blocking on tests.
17:09 [Coke] 'one'); doit('two'); doit('three');
17:09 [Coke] ww
17:11 [Coke] masak: can you please re-evaluate https://rt.perl.org/rt3/Ti​cket/Display.html?id=62224 ?
17:12 SamuraiJack joined #perl6
17:14 sivoais joined #perl6
17:17 cognominal rjbs: I meant, it is instanciated into a class by the runtime.
17:19 pyrimidine joined #perl6
17:22 cognominal Another question. I fail to understand the  difference between a container type as defined in S02:1693 and representation defined in s12:2188 .  Currently rereading them both.
17:24 cognominal I don't see where it is tested in the *.t files
17:30 [Coke] moritz: please recheck https://rt.perl.org/rt3/Ti​cket/Display.html?id=75640 - is that behavior better?
17:33 jeffreykegler joined #perl6
17:33 [Coke] cognominal: cn we close out https://rt.perl.org/rt3/Tic​ket/Display.html?id=101562 ?
17:37 cognominal [coke] I think so. We don't want implementers wasting time making internals user friendly
17:46 bluescreen10 joined #perl6
17:48 wk joined #perl6
17:51 jlaire joined #perl6
17:52 [Coke] r: "abcd".substr(2,*);
17:52 p6eval rakudo fb11f1: OUTPUT«No such method 'Int' for invocant of type 'Whatever'␤  in method substr at src/gen/CORE.setting:3639␤  in block  at /tmp/m1A_vN7zaR:1␤␤»
17:53 cognominal_ joined #perl6
18:00 benabik_ joined #perl6
18:15 sirrobert joined #perl6
18:15 sirrobert hallo p6
18:16 sorear hello.
18:20 _nyuszika7h_ joined #perl6
18:21 [Coke] Guten abend.
18:21 [Coke] the best kind of ABEND.
18:24 GlitchMr aharoni: back - the patch looks fine, but I don't work on Rakudo ;-)
18:25 GlitchMr But thanks for interest :-)
18:27 cognominal joined #perl6
18:28 Targen joined #perl6
18:29 wk joined #perl6
18:29 dalek roast: af67d0b | GlitchMr++ | S03-smartmatch/signature-signature.t:
18:29 dalek roast: Instead of !(), we can use nok() function
18:29 dalek roast: review: https://github.com/perl6/roast/commit/af67d0bfc4
18:29 dalek roast: 5249f85 | GlitchMr++ | S03-smartmatch/signature-signature.t:
18:29 dalek roast: Remove useless block.
18:29 dalek roast: review: https://github.com/perl6/roast/commit/5249f858db
18:35 rindolf joined #perl6
18:37 cognominal joined #perl6
18:44 supernovus joined #perl6
18:45 supernovus Who would I talk to about getting https://gist.github.com/3812996 merged in rakudo/nom?
18:51 GlitchMr Send a patch. I think that Rakudo repository has instructions for that
18:51 GlitchMr supernovus: https://github.com/rakudo/rakudo
18:51 GlitchMr Read "Submitting patches" section
18:53 supernovus GlitchMr: Ah, thank you! I'd done this a few times before, but it's been a while.
18:56 supernovus There, sent.
19:02 felher Is there a Perl6 solution for testing parts of a module that you wouldn't like to export?
19:14 erkan joined #perl6
19:14 erkan joined #perl6
19:22 birdwindupbird joined #perl6
19:23 supernovus Okay, IO::Socket::INET.recv() returns a Str, but I need a Buf... the spec docs for IO could use some tweaking. Maybe once I figure out all the methods that exist, and that should exist, I'll update them...
19:24 sorear I think you can use .read() ?
19:26 * colomon thinks the spec docs for IO could use a rewrite, unless something has changed since the last time he looked....
19:26 supernovus I think .read() will work. I need to change how streams are done anyway, as I need to read the header first, figure out the content-length of the record, then read that much in. Rinse, repeat.
19:37 supernovus Well, I've gotten farther... now some debugging, I love an error like "This type cannot unbox to a native integer"
19:45 supernovus Well, break's over, back to paid work. I'm so close to having FastCGI working, but hobby code doesn't pay the bills. Catch ya'll later #perl6 ! :-)
19:56 benabik_ joined #perl6
20:15 moritz phenny: ask jnthn to please check my latest reply to https://rt.perl.org/rt3/Ti​cket/Display.html?id=75640 for sanity
20:15 phenny moritz: I'll pass that on when jnthn is around.
20:16 cognominal "ProjectRosalind: @cognominal We'll fix it soon, thank you for notifying us!"
20:17 cognominal apparently, we will soon be able to type code with $_ in their comment system
20:18 mst hahahahahahaha
20:19 sorear *blink*
20:26 _edwin joined #perl6
20:26 * _edwin added http://rosettacode.org/wiki/Verify_distri​bution_uniformity/Chi-squared_test#Perl_6
20:27 sorear cool, _edwin++
20:27 sorear welcome to #perl6
20:27 _edwin thanks
20:27 _edwin comments welcome, especially if someone has an idea to improve the numerical stability
20:28 _edwin these gamma functions are tough to compute
20:30 sorear be aware that perl 6 likes to switch between computing using exact rationals and floating point
20:30 mathw phenny: tell jnthn his YAPC::Asia talk is awesome
20:30 phenny mathw: I'll pass that on when jnthn is around.
20:30 sorear code that is numerically stable when implemented using consistant double-precision floating point *may* not be if p6 is allowed to chose representations
20:31 _edwin yes. I cannot claim to understand what effect the different numerical types have in my implementation
20:31 _edwin :)
20:32 _edwin before I had a version using continued fractions. that was more fun, but even more unstable :/
20:46 sirrobert joined #perl6
20:47 grondilu joined #perl6
20:49 grondilu how would you check endianess?
20:50 grondilu r: printf "%08x", my int $ = 1;
20:50 p6eval rakudo fb11f1: OUTPUT«00000001»
20:50 grondilu r: printf "%08x", my int $ = -1;
20:50 p6eval rakudo fb11f1: OUTPUT«ffffffff»
20:50 grondilu r: printf "%08x", my int $ = -2;
20:50 p6eval rakudo fb11f1: OUTPUT«fffffffe»
20:50 grondilu ^ does that mean little endian?
20:51 _edwin I don't think so
20:51 grondilu yeah I don't think either on second thought.
20:51 _edwin it would be a bug if you could find out about endianness this way, I guess
20:52 grondilu unless using pack, which is mostly NYI, is there a way, then?
20:53 sorear you could probably find out using NativeCall
20:55 _edwin somehow you have to get around the type system if you want to derive endianness from the data representation
20:56 grondilu can't I use a int overflow or something?
20:58 _edwin I don't see how. It could tell you something about the ALU you are running on, but not about endianness I think
21:01 _edwin endianness pretty much only shows its ugly head when you reinterpret one data type as another one
21:01 supernovus joined #perl6
21:03 grondilu Isn't there an environnement variable about it?
21:04 dalek ecosystem: db6baab | (Timothy Totten)++ | META.list:
21:04 dalek ecosystem: Added FastCGI
21:04 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/db6baabb73
21:06 sorear grondilu: ints don't overflow in perl 6
21:06 sorear grondilu: why do you want to know endianness?
21:07 supernovus Well, SCGI is still faster (by far) but those needing FastCGI can use it. Like SCGI, it uses a PSGI compliant interface so it'll work with WWW::Request (included in WWW::App)
21:08 grondilu sorear: I want to read an Array[int] returned by a native call of a digest function.
21:10 supernovus For 2.0 I'll look at renaming FastCGI::Protocol to FastCGI::Protocol::PP and adding FastCGI::Protocol::NativeCall, which may increase the speed significantly.
21:15 grondilu nevermind, I'll figure out something
21:17 hash_table joined #perl6
21:17 * colomon has a vague memory he meant to be adding gamma to p6?
21:17 ashleydev joined #perl6
21:19 supernovus Basic importing of subs and constants works in Rakudo. How about re-exporting imported stuff? The spec talks about an :EXPORT flag to the 'use' statement, but that seems to be NYI.
21:19 kurahaupo joined #perl6
21:23 _edwin grondilu: you could use the known digest of some constant data to find out
21:24 _edwin e.g. digest of empty message
21:25 _edwin phenny: tell grondilu you could use the known digest of some constant data to find out (e.g. digest of empty message)
21:25 phenny _edwin: I'll pass that on when grondilu is around.
21:25 sorear phenny: tell grondilu Why not just have the digest function return a Buf?
21:25 phenny sorear: I'll pass that on when grondilu is around.
21:27 _edwin maybe Buf is NYI for native calls? otherwise I certainly agree
21:28 _edwin colomon++ (meaning to add the gamma function)
21:28 supernovus Oh, and it occurred to me, FastCGI won't work until the patch I submitted earlier is added to rakudo.
21:29 pmurias joined #perl6
21:35 _edwin anyone know a good algorithm for this problem: find a longest path in a directed multi-edge graph that uses each edge at most once? (repeated vertices allowed)
21:36 sorear I'd be suprised if that problem *wasn't* NP-complete
21:37 sorear wait
21:37 _edwin too bad, because that's basically the pokemon concatenation problem :}
21:37 _edwin http://rosettacode.org/wiki/L​ast_letter-first_letter#Perl
21:37 _edwin good thing is there can be at most 26 vertices
21:39 _edwin but the number of edges is unbounded (or only bounded by the imagination of pokemon creators)
21:41 _edwin I did not yet check how smart the existing solutions for this task are
21:43 sorear a path in a directed multi-edge graph that uses each edge at most once is called a trail, according to w:Glossary_of_graph_therory
21:45 sorear my google-fu is failing me for 'longest trail problem np-complete'
21:45 _edwin thanks, didn't know that. o O (it is impossible to read #perl6 and not learn something new :)
21:46 sorear I can tell you right now that if you require *vertices* to be used once, it's NP-complete by reduction to DIRECTED HAMILTONIAN CIRCUIT
21:47 sorear _edwin: so you're not actually new here?
21:48 _edwin i must confess I am a long-time lurker :)
21:51 _edwin a couple of years ago I wrote a blog with perl6-related mailing list summaries for some time: http://lith-ology.blogspot.co.at/2010/02/​seven-days-between-parrot-and-camel.html
21:51 _edwin couldn't keep that up due to tuit shortage unfortunately
21:52 sorear ah, well, I joined #perl6 in feb 10 and I have never seen anything actually relevant discussed on the mailing lists
21:53 cognominal joined #perl6
21:53 _edwin i never knew doing summaries was *that* much work. I have a lot of respect for anyone who can keep it up over a significant time
21:54 _edwin ISTR mailing lists were more active back then. but I also used IRC and commits as sources IIRC
21:54 _edwin IRC is even harder to summarize
21:55 sorear yeah, raiph++ just started doing irc summaries
21:55 _edwin raiph++ indeed
21:55 supernovus Wow, the speed difference between my SCGI and FastCGI libraries is far more significant than I'd have imagined. SCGI request returning "Hello World" takes between 0.015s and 0.025s on my machine. FastCGI requests with the same output take 0.420 and 0.650 seconds.
21:56 sorear supernovus: why is there a difference?
21:59 supernovus sorear: I figured there would be a slight difference due to the vast differences in protocols, SCGI is far simpler and requires no calls to pack/unpack. It also has no support for multiplexing requests, and uses a single request record for input/output where FastCGI uses multiple records (some of them are streams). My next version of FastCGI I want to try making a NativeCall wrapper to libfcgi as an alternative to the pure perl im
21:59 supernovus plementation and see how big of a difference that makes.
21:59 _edwin time to sleep here, bye
22:00 sirrobert wave
22:00 sirrobert supernovus++:  I've been using your SCGI bit and it's working great.  Thanks =)
22:02 supernovus sirrobert: I recently rewrote SCGI, introducing version 2.0 which is a little more complex. It requires a Perl 6 implementation that supports exporting constants (I know it works with recent rakudo builds.)
22:02 sirrobert ok!  I'll check it out
22:02 sirrobert I'm using rakudo-star 2012-09 right now
22:02 sirrobert so no prob there
22:06 supernovus I'm not sure when rakudo added the ability to import/export constants, but 2012-09 should be new enough. It's probably a bad habit of mine, but I use a custom compiled rakudo from bleeding edge git. Actually the version on my computer is currently more customized, as it has my own "add 'x' to pack()" patch applied so I can test FastCGI.
22:06 sirrobert worst case scenario:  I'll revert to v1 until rakudo catches up
22:09 sirrobert I know it's a small thing (in some ways), but being able to off-load logic paths to method sigs is a HUGE convenience.
22:09 sirrobert over p5, I mean
22:10 supernovus Module versioning in rakudo and panda would be nice. So both versions could live side by side.
22:11 sirrobert yeah
22:11 sirrobert Especially, it would be great for panda to default to local path installation of modules
22:11 sirrobert so you could specify per-project
22:11 sirrobert There's a setting for that, but ... =)
22:27 whiteknight joined #perl6
22:27 supernovus Well, shaved a bit off of the FastCGI speed with a quick optimization.
22:27 sirrobert =)
22:28 supernovus I realized it was parsing the header twice, no need for that.
22:28 tokuhiro_ joined #perl6
22:28 sirrobert nice
22:28 sirrobert what was the time loss on that?
22:28 sirrobert ooc
22:29 supernovus not much I'm afraid, but instead of 0.420 to 0.650, I seem to be getting 0.380 to 0.600 now.
22:29 sirrobert every bit helps =)
22:30 supernovus 50ms if I'm reading those numbers correctly. Not too shabby.
22:31 supernovus For reference, I'm using lighttpd as the web server, and wget as the client for all of these tests.
22:32 sirrobert I've been using lighttpd in front too.  It's been very smooth for me
22:32 Circlepuller_ joined #perl6
22:34 supernovus It seems to work really well with both SCGI and FastCGI.
22:40 Circlepuller joined #perl6
22:55 Psyche^ joined #perl6
23:00 Psyche^ joined #perl6
23:02 benabik joined #perl6
23:05 sirrobert r: say (<a b> X <c d> X <1 2>).perl
23:05 p6eval rakudo fb11f1: OUTPUT«(("a", "c", "1"), ("a", "c", "2"), ("a", "d", "1"), ("a", "d", "2"), ("b", "c", "1"), ("b", "c", "2"), ("b", "d", "1"), ("b", "d", "2")).list␤»
23:05 sirrobert how do I convert that into an array of arrays?
23:05 sirrobert r: say (<a b> X <c d> X <1 2>).Array.perl
23:05 p6eval rakudo fb11f1: OUTPUT«Array.new("a", "c", "1", "a", "c", "2", "a", "d", "1", "a", "d", "2", "b", "c", "1", "b", "c", "2", "b", "d", "1", "b", "d", "2")␤»
23:05 sirrobert r: say (<a b> X <c d> X <1 2>)>>.Array.perl
23:05 p6eval rakudo fb11f1: OUTPUT«(Array.new("a"), Array.new("c"), Array.new("1"), Array.new("a"), Array.new("c"), Array.new("2"), Array.new("a"), Array.new("d"), Array.new("1"), Array.new("a"), Array.new("d"), Array.new("2"), Array.new("b"), Array.new("c"), Array.new("1"), Array.new("b"), Array.ne…
23:05 sirrobert neither of those is right ...
23:06 TimToady r: say (<a b> X <c d> X <1 2>).lol.perl  # in theory
23:06 p6eval rakudo fb11f1: OUTPUT«LoL.new(ListIter.new())␤»
23:06 sirrobert hmmm list of lists
23:06 TimToady maybe in practice
23:06 TimToady r: say (<a b> X <c d> X <1 2>).tree.perl
23:06 p6eval rakudo fb11f1: OUTPUT«(["a", "c", "1"], ["a", "c", "2"], ["a", "d", "1"], ["a", "d", "2"], ["b", "c", "1"], ["b", "c", "2"], ["b", "d", "1"], ["b", "d", "2"]).list␤»
23:06 sirrobert ahh
23:07 sirrobert never heard of 'tree' before =)
23:08 sirrobert thanks
23:08 diakopter you [re]learn something new every day
23:08 TimToady n: say (<a b> X <c d> X <1 2>).tree.perl
23:08 p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Unable to resolve method tree in type List␤  at /tmp/qBlX6NPX2G line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4199 (module-CORE @ 574) ␤  at /home/p…
23:08 TimToady n: say (<a b> X <c d> X <1 2>).lol.perl
23:08 p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Unable to resolve method lol in type List␤  at /tmp/PKBpj4JkEQ line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4199 (module-CORE @ 574) ␤  at /home/p6…
23:09 TimToady looks like rakudo is a bit ahead here
23:09 sirrobert this is kind of interesting:
23:09 sirrobert say ((1) X (2)).tree.perl; say ((1, 2) X (2)).tree.perl;
23:09 sirrobert r: say ((1) X (2)).tree.perl; say ((1, 2) X (2)).tree.perl;
23:09 p6eval rakudo fb11f1: OUTPUT«([1, 2],).list␤([1, 2], [2, 2]).list␤»
23:09 sirrobert the first version has an empty element in the second position
23:10 TimToady r: say ((2)).perl
23:10 p6eval rakudo fb11f1: OUTPUT«2␤»
23:11 TimToady r: say (\(2)).perl
23:11 p6eval rakudo fb11f1: OUTPUT«Capture.new( list => (2,).list, hash => EnumMap.new())␤»
23:11 TimToady r: say ((2,)).perl
23:11 sirrobert is there a version of X that will give, say, 2 out of 3?
23:11 p6eval rakudo fb11f1: OUTPUT«(2,)␤»
23:11 sorear singleton Parcels are marked with a trailing comma, a la Python
23:11 sorear this does not mean that there is an empty second element
23:11 TimToady sirrobert: don't understand your Q
23:11 diakopter r: say X:: X X:: # lolz timeout
23:11 sirrobert (e.g. <a b c> to (a,b),(b,c),(c,a))
23:11 p6eval rakudo fb11f1: OUTPUT«(timeout)use of uninitialized value of type Inheritance in string context  in block  at /tmp/qOgox2Z0hp:1␤␤use of uninitialized value of type Inheritance in string context  in block  at /tmp/qOgox2Z0hp:1␤␤use of uninitialized value of type Inheritance in string con…
23:12 diakopter what's type Inheritance
23:12 sorear I think it might be referring to the role Perl6::Metamodel::Inheritance
23:13 sorear r: say Perl6::Metamodel::Inheritance
23:13 p6eval rakudo fb11f1: OUTPUT«Could not find symbol '&Inheritance'␤  in method <anon> at src/gen/CORE.setting:9934␤  in  at src/gen/Metamodel.pm:2380␤  in any find_method_fallback at src/gen/Metamodel.pm:2368␤  in any find_method at src/gen/Metamodel.pm:922␤  in  at src/gen/BOOTSTRAP.pm:827␤  i…
23:13 diakopter is that leaky?
23:14 sorear seems wrong to me
23:14 diakopter I wonder why it times out
23:14 sirrobert TimToady:  something like that passes in <a b c> and gets out all combinations with at most two elements
23:14 TimToady r: say <a b c>.rotate
23:14 sorear infinite print loop
23:14 p6eval rakudo fb11f1: OUTPUT«No such method 'rotate' for invocant of type 'Parcel'␤  in block  at /tmp/v2h8GwDKll:1␤␤»
23:14 TimToady r: say [<a b c>].rotate
23:14 p6eval rakudo fb11f1: OUTPUT«b c a␤»
23:14 TimToady r: say [<a b c>].rotate.rotate
23:14 p6eval rakudo fb11f1: OUTPUT«c a b␤»
23:15 TimToady is that the sort of thing you're talking about, modulo a .[0,1] or two?
23:15 TimToady or are you looking for combinations taken 2 at a time?
23:15 sirrobert r: say [1,2,3].rotate: 2;
23:15 p6eval rakudo fb11f1: OUTPUT«3 1 2␤»
23:15 sirrobert combinations taken 2 at a time
23:15 sirrobert or x at a time
23:15 sirrobert $x
23:15 TimToady but you only took the ordered ones
23:16 sirrobert trying to get combinations with at most Int $x elements
23:20 sirrobert r: my @list = 1, 2, 3; for 1..@list.elems { say @list.rotate($_).[0,1]; }
23:20 p6eval rakudo fb11f1: OUTPUT«2 3␤3 1␤1 2␤»
23:21 Psyche^ joined #perl6
23:25 TimToady rotate will not work as a generic k-combinations generator for more complicated examples
23:29 cognominal joined #perl6
23:29 Chillance joined #perl6
23:40 flussence from playing around I've managed to get rakudo to spit out some completely bizarre errors...
23:40 flussence r: https://gist.github.com/3830585
23:40 p6eval rakudo fb11f1: OUTPUT«50␤47␤51␤56␤47␤86␤51␤next without loop construct␤  in block  at src/gen/CORE.setting:378␤  in block  at src/gen/CORE.setting:441␤  in block  at /tmp/n7gmaIBTZR:2␤  in block  at /tmp/n7gmaIBTZR:1␤␤»
23:41 flussence (I won't spam the backlog with them, the code's there though)
23:58 supernovus Well, I've tracked down the parse_params() function in FastCGI::Protocol as eating about 0.280 seconds. I'll leave the task of optimizing it for another day. Good * #perl6 :-)
23:59 * [Coke] is getting this error in nqp: Cannot look up attributes in a type object

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

Perl 6 | Reference Documentation | Rakudo