Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-10-05

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:10 drbean joined #perl6
00:13 estrai joined #perl6
00:20 cognominal joined #perl6
00:21 tokuhiro_ joined #perl6
00:26 Circlepuller joined #perl6
00:28 benabik joined #perl6
00:36 benabik joined #perl6
00:44 Circlepuller joined #perl6
00:48 cognominal joined #perl6
01:07 cognominal joined #perl6
01:18 flightrecorder joined #perl6
01:29 fgomez joined #perl6
01:42 colomon raiph: I've got it down to a two-liner now.  ;)
01:44 colomon raiph: https://gist.github.com/3837592
01:44 colomon bad news is it no longer works under niecza, so I've got a niecza bug to fix.
01:51 raiph colomon: that's a LONG line. ;)
02:02 colomon raiph: I've since rewritten it as a three-liner, with the last line taking over the ending map and making it prettier.  ;)
02:05 popl joined #perl6
02:06 colomon raiph: improved version https://gist.github.com/3837592
02:07 raiph colomon: what happens if you replace the intermediate arrays with feeds (<== etc.)
02:08 colomon Hmmm... I've never really used feeds.
02:09 raiph i think this is exactly the sort of thing they're meant for
02:10 raiph back to 4 or so lines, but pretty
02:14 fgomez joined #perl6
02:18 skids joined #perl6
02:19 crtxc joined #perl6
02:29 sorear (-.&~: # [) (, </~ i. 170x) # (, +/~ ^&4 i. 170x)
02:29 sorear 635318657
02:29 sorear this can probably be improved
02:35 colomon loliblogged: http://justrakudoit.wordpress.com/2012/10/05/sums-of-fourth-powers/
02:35 TimToady sorear: by writing it in a different language? :P
02:36 colomon TimToady: checked the spec recently?  ;)
02:37 TimToady the spec isn't checked--last I knew, it was more like a paisley
02:39 benabik joined #perl6
02:41 japhb TimToady, perhaps a zoomed Mandelbrot Set, maybe something in Seahorse Valley?
02:52 Circlepuller_ joined #perl6
02:55 sunnavy_ joined #perl6
02:55 mikec_ joined #perl6
02:57 _daniel-s__ joined #perl6
03:05 sevvie joined #perl6
03:05 quietfanatic joined #perl6
03:05 topo joined #perl6
03:05 szbalint joined #perl6
03:05 shachaf joined #perl6
03:05 smash joined #perl6
03:05 hugme joined #perl6
03:05 apejens joined #perl6
03:05 BooK joined #perl6
03:05 flightrecorder joined #perl6
03:06 japhb joined #perl6
03:17 fgomez joined #perl6
03:26 xinming_ joined #perl6
03:39 thou joined #perl6
03:55 TimToady http://rosettacode.org/wiki/Extend_your_language#Perl_6
04:20 popl TimToady: That's neat.
04:21 telex joined #perl6
04:21 Circlepuller joined #perl6
04:32 macae joined #perl6
04:38 telex joined #perl6
04:46 aharoni joined #perl6
05:09 crtxc joined #perl6
05:17 SamuraiJack joined #perl6
05:20 fgomez joined #perl6
05:22 bonsaikitten sorear: niecza-22 ... missing makefile? I'm having trouble finding any way to build from source
05:22 phenny bonsaikitten: 25 Sep 06:53Z <sorear> tell bonsaikitten Just for you, I made sure the v22 tag would build with itself, rather than requiring v21 :D
05:25 sorear niecza-22.zip does not contain a Makefile, or any nonessential source code for that matter
05:25 sorear it is, as the file description says, a binary release
05:25 sorear the v22 tag references a commit which references a tree which contains an entry "Makefile"
05:26 bonsaikitten hrm, let me see what github did there
05:27 bonsaikitten it's one of those hate-hate relationships ;)
05:29 bonsaikitten retards
05:29 gootle joined #perl6
05:29 bonsaikitten ... that's not the right tarball, github
05:29 moritz good morning
05:29 birdwindupbird joined #perl6
05:29 sorear morning moritz
05:31 bonsaikitten hmm, that one is quite different. maybe it actually works now? :D
05:35 GlitchMr joined #perl6
05:40 moritz .u union
05:40 phenny U+222A UNION (∪)
05:40 moritz .u intersection
05:40 phenny U+2229 INTERSECTION (∩)
05:40 sorear .u roundabout
05:40 phenny sorear: Sorry, no results for 'roundabout'.
05:43 TimToady .u direct
05:43 phenny U+2393 DIRECT CURRENT SYMBOL FORM TWO (⎓)
06:04 Circlepuller joined #perl6
06:04 fgomez joined #perl6
06:11 dalek glitchmr.github.com: ca710f0 | GlitchMr++ | _posts/2012-10-05-yet-another-duckduckgo-goodie.md:
06:11 dalek glitchmr.github.com: Yet another DuckDuckGo goodie blog post
06:11 dalek glitchmr.github.com: review: https://github.com/GlitchMr/glitchmr.github.com/commit/ca710f0a03
06:12 GlitchMr I'm going to do GlitchMr--. It has nothing with Perl 6
06:12 GlitchMr (I hope it worked)
06:12 TimToady surely IO::Dir(@_)->new is wrong
06:12 GlitchMr oops
06:13 TimToady TimToady-- for being offtopic as well :)
06:13 wk_ joined #perl6
06:13 GlitchMr http://rosettacode.org/mw/index.php?title=Empty_directory&amp;action=history
06:13 GlitchMr You have your ++ there
06:29 rindolf joined #perl6
06:34 DarthGandalf joined #perl6
06:41 fgomez joined #perl6
06:59 imarcusthis joined #perl6
07:01 crtxc joined #perl6
07:04 brrt joined #perl6
07:19 macae joined #perl6
07:25 flightrecorder joined #perl6
07:34 fhelmberger joined #perl6
07:35 crtxc left #perl6
07:51 FROGGS joined #perl6
07:52 mucker joined #perl6
07:59 kresike joined #perl6
07:59 kresike hello all you happy perl6 people
08:00 brrt hello kresike!
08:00 kresike brrt, o/
08:01 FROGGS gmorning
08:01 kresike FROGGS, o/
08:03 rindolf kresike: hi.
08:03 rindolf Hi all.
08:03 kresike rindolf, o/
08:14 wk joined #perl6
08:28 grondilu joined #perl6
08:29 grondilu r: say #`( wait for it... )  "hello world!"
08:29 p6eval rakudo fb11f1: OUTPUT«hello world!␤»
08:29 grondilu ^ this would be in more fun example for embedded comment in S02
08:30 GlitchMr Those block comments are way better than CoffeeScript block comments (which probably use worst syntax possible)
08:30 GlitchMr Block comments are between ### and ### in CoffeeScript.
08:31 * brrt wonders why everybody feels the need to improve javascript
08:32 jnthn evening o/
08:33 moritz \o jnthn
08:33 moritz brrt: because a lot of people are (or feel) forced to use it
08:33 brrt a lot of people are forced to use java
08:33 arnsholt Also, JavaScript has some pretty weird warts
08:33 GlitchMr Isn't Perlito better JavaScript?
08:33 brrt well, a lot of people try to fix java, too
08:34 brrt nobody, on the other hand, tries to fix php
08:34 brrt as far as i can tell
08:34 GlitchMr It's impossible to fix
08:34 GlitchMr And I think I've seen language that compiles to PHP
08:34 brrt javascript has arguments.callee and thats all i'll ever need
08:34 arnsholt Oh, I think there are PHP core hackers trying to improve it, but it's a big job
08:35 arnsholt Also, backwards compatibility means many of the worst flaws can't really be fixed
08:36 brrt but on the other hand, dart, coffeescript, typescript
08:36 brrt most of them add nothing but 'we look a bit more like what you're used too'
08:36 GlitchMr PHP is so inconsistent to be used.
08:36 GlitchMr JavaScript IS consistent.
08:37 GlitchMr If you would rename most of PHP functions, could you call it PHP?
08:37 GlitchMr If you wouldn't, it still would suck
08:37 GlitchMr But perhaps I should make improved PHP some day
08:37 GlitchMr Which would be mostly compatible
08:38 GlitchMr (means, you still could use inconsistent APIs like strpos(), but you can use 'cat'->index('a'))
08:38 GlitchMr And ->index on failure would report false. On success with 0, it would return Perl 6 style '0 but true'
08:39 brrt but, why bother? if you change 90% of php to make it sane
08:40 am0c joined #perl6
08:40 brrt (i.e., you keep only the syntax)
08:40 brrt then mediawiki is never going to run, and neither is wordpress, or drupal
08:40 brrt or magento, and any of the other software packages
08:40 brrt that simply Make People Money
08:41 brrt the whole and only reason for the continued existance of php is economics
08:41 GlitchMr And things like "use autodie" which would convers warnings to exceptions.
08:42 GlitchMr convert*
08:42 GlitchMr ... is it Perl 6?
08:46 dakkar joined #perl6
08:48 gootle joined #perl6
08:50 kaleem joined #perl6
08:56 gootle joined #perl6
08:58 baest joined #perl6
09:14 SamuraiJack joined #perl6
09:22 gootle joined #perl6
09:25 manner joined #perl6
09:28 manner phenny: tell moritz SVG::Plot has an error.No such method 'key' for invocant of type 'List'.in method serialize at lib/SVG.pm:12
09:28 phenny manner: I'll pass that on when moritz is around.
09:29 manner phenny:thanks!
09:30 manner phenny: bye!see you tomorrow.
09:55 bbkr rakudo: sub foo (Mu $id?) { $id.WHAT.say }; foo(); foo(Any); # nice way to distinguish lack of params from undefined value of params :)
09:55 p6eval rakudo fb11f1: OUTPUT«Mu()␤Any()␤»
09:58 moritz phenny: tell manner please open an issue at https://github.com/moritz/svg-plot/issues/new including steps to reproduce the error
09:58 phenny moritz: I'll pass that on when manner is around.
09:58 phenny moritz: 09:28Z <manner> tell moritz SVG::Plot has an error.No such method 'key' for invocant of type 'List'.in method serialize at lib/SVG.pm:12
10:11 HD68 joined #perl6
10:26 chinaxing joined #perl6
10:32 HD68 joined #perl6
10:40 mucker joined #perl6
11:05 Su-Shee_ joined #perl6
11:10 brrt joined #perl6
11:12 flightrecorder joined #perl6
11:29 FROGGS joined #perl6
11:38 GlitchMr joined #perl6
11:51 integral joined #perl6
11:51 integral joined #perl6
11:56 cognominal joined #perl6
12:19 dalek glitchmr.github.com: 47a5e15 | GlitchMr++ | _posts/2012-10-05-yet-another-duckduckgo-goodie.md:
12:19 dalek glitchmr.github.com: It's post, not posts.
12:19 dalek glitchmr.github.com: review: https://github.com/GlitchMr/glitchmr.github.com/commit/47a5e15c0e
12:20 tadzik GlitchMr: btw, why are those announcements here?
12:21 GlitchMr ...
12:22 GlitchMr I've enabled those for my Perl 6 modules... but, well... I think I went too far
12:23 sirrobert joined #perl6
12:23 GlitchMr I would remove them, but for some reason I cannot because of GitHub's CSRF protection.
12:23 GlitchMr "There was a problem with your request."
12:23 GlitchMr At least I think it is...
12:23 GlitchMr "Usually this means that your user authenticity token is incorrect. This can happen when you visit a page with a form, then sign in from a separate window, and then return to resubmit the form. Here's what you can try next:"
12:24 GlitchMr No idea why it happens
12:25 GlitchMr Because of that error I cannot remove service hook, even if I could've added it before
12:25 GlitchMr It's probably temponary problem
12:32 moritz or you could try a different browser
12:37 brrt joined #perl6
12:37 wk joined #perl6
12:46 dalek Perlito: a57f236 | (Flavio S. Glock)++ | / (6 files):
12:46 dalek Perlito: Perlito5 - js - more array tie methods
12:46 dalek Perlito: review: https://github.com/fglock/Perlito/commit/a57f236eb5
12:48 integral joined #perl6
12:48 integral joined #perl6
12:48 sivoais joined #perl6
12:57 wk joined #perl6
13:02 hash_table joined #perl6
13:24 bluescreen10 joined #perl6
13:29 * [Coke] yawns.
13:29 brrt yeah, me2
13:46 lestrrat jnthn: may we link your blog http://6guts.wordpress.com/2012/10/03/yapcasia-2012/ from http://yapcasia.org/2012/news/yapcasia-2012-blog.html ?
13:54 [Coke] ... it's the internet. Seems legit. ;)
13:57 colomon joined #perl6
13:57 colomon n
13:57 colomon sigh
13:57 colomon o/
13:58 [Coke] no/ ?
13:59 [Coke] that kind of looks like "I'm a little teapot".
14:00 colomon I'm not short.  ;)
14:01 colomon the "n" was an import from another window.  Colloquy is a nice client, but right when it opens the IRC window for the first time it steals focus, and if you're in the middle of typing something else...
14:02 flightrecorder joined #perl6
14:02 _ilbot joined #perl6
14:02 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
14:03 [Coke] I would like to use a more GUI client, but need something that works more like running irssi-in-screen on teh backend so I don't lose my place.
14:03 [Coke] ... so I just run irssi-in-screen because I'm lazy
14:04 PacoAir joined #perl6
14:04 FROGGS joined #perl6
14:05 tokuhiro_ joined #perl6
14:06 moritz iirc that's what bouncers are for
14:06 moritz but I too use irssi-in-screen
14:06 [Coke] ^5 lazy.
14:06 brrt jnthn: nice presentation
14:10 moritz yay, two of "my" modules mentioned \o/
14:12 cognominal joined #perl6
14:13 stopbit joined #perl6
14:20 wtw joined #perl6
14:23 flussence joined #perl6
14:24 rindolf joined #perl6
14:24 cognominal joined #perl6
14:25 hash_table joined #perl6
14:26 birdwindupbird joined #perl6
14:26 rindolf Hi Perl sixers.
14:27 brrt \o rindolf
14:27 rindolf brrt: hi.
14:27 rindolf brrt: what's up?
14:28 brrt not much, nearly weekend
14:28 brrt how are you?
14:29 rindolf brrt: I'm fine. Refactoring the perl debugger.
14:29 rindolf brrt: it's an ongoing process as part of my grant.
14:30 rindolf brrt: and I slept during the afternoon.
14:30 brrt oh, thats nice
14:30 rindolf brrt: what is?
14:30 brrt sleeping in the afternoon :-)
14:30 brrt and fixing the perl debugger, too
14:30 rindolf brrt: OK.
14:31 cognominal_ joined #perl6
14:31 brrt the old- perl debugger?
14:32 rindolf brrt: yes.
14:32 rindolf brrt: perl -d
14:32 brrt don't think i've ever used that
14:32 brrt should have
14:35 rindolf $@ and $@ =~ s/ at .*//, &warn($@), next CMD; ==> this is the kind of thing I have to deal with.
14:35 Circlepuller_ joined #perl6
14:38 brrt oh, that looks ehm...
14:38 brrt well, legible, somehow
14:42 Circlepuller joined #perl6
14:43 kresike bye folks
14:44 cognominal joined #perl6
14:52 Psyche^ joined #perl6
14:56 cognominal joined #perl6
15:12 integral joined #perl6
15:12 integral joined #perl6
15:17 tokuhiro_ joined #perl6
15:24 GlitchMr42 joined #perl6
15:25 m0ss joined #perl6
15:27 colomon phenny: tell sorear I'm getting a distressing number of "Unhandled exception: System.MissingMethodException: Method not found: 'Cursor..ctor'." errors in niecza -- possibly all coming from calls to subst?
15:27 phenny colomon: I'll pass that on when sorear is around.
15:28 colomon r: my $a = "This /* has a comment */"; $a .= subst(rx["/*" .*? "*/"], " ", :global); say $a
15:28 p6eval rakudo fb11f1: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 2, near "\"/*\" .*? \""␤»
15:28 colomon r: my $a = "This /* has a comment */"; $a .= subst(/"/*" .*? "*/"/, " ", :global); say $a
15:28 p6eval rakudo fb11f1: OUTPUT«This  ␤»
15:29 thou joined #perl6
15:35 kaare__ joined #perl6
15:36 Circlepuller_ joined #perl6
15:37 Circlepuller_ joined #perl6
15:56 mucker joined #perl6
16:06 colomon jnthn++ # Grammar::Tracer
16:14 flussence is that working currently? I tried using it a few days/weeks ago and got some low level error
16:14 colomon flussence: it's working great for me at the moment.
16:15 flussence hm, I'll have to give it another look then
16:19 Targen_ joined #perl6
16:29 Vlavv_ joined #perl6
16:29 sergot hi ! o/o/
16:34 MayDaniel joined #perl6
16:41 cognominal joined #perl6
16:48 kaleem joined #perl6
16:57 sjohnson word up
17:00 spider-mario joined #perl6
17:02 cognominal joined #perl6
17:06 snearch joined #perl6
17:07 dalek specs: ebd2436 | larry++ | S05-regex.pod:
17:07 dalek specs: :ii implies :i, :mm implies :m
17:07 dalek specs: review: https://github.com/perl6/specs/commit/ebd24364a0
17:07 TimToady r: $_ = "He said that he said."; s:ii:g/he/she/; .say
17:07 p6eval rakudo fb11f1: OUTPUT«He said that she said.␤»
17:08 TimToady r: $_ = "He said that he said."; s:i:ii:g/he/she/; .say
17:08 p6eval rakudo fb11f1: OUTPUT«She said that she said.␤»
17:08 TimToady rakudobug
17:10 cognominal joined #perl6
17:11 moritz you mean :ii should imply :i?
17:12 TimToady that was always the intent
17:12 TimToady but I realized the spec was unclear
17:12 cognominal joined #perl6
17:13 moritz I can probably fix rakudo, I just need to find the right place to do it
17:13 TimToady same deal for :m and :mm
17:13 moritz which we don't implement
17:13 moritz does :samespace imply :sigspace?#
17:13 TimToady sure we do, it's just lazy :)
17:14 _edwin joined #perl6
17:14 TimToady yes
17:14 * moritz wonders if there's a real application for :samemark
17:15 TimToady perhaps not in Indo-European languages :)
17:16 moritz I'd be also curious about real-world examples from non-Indo-European languages
17:16 TimToady but there are plenty of marks that are more independent of letter identity than á
17:16 TimToady .u combining
17:16 phenny U+031B COMBINING HORN (◌̛)
17:16 arnsholt There's spiritus asper/lenis in Greek, which is even Indo/European
17:17 arnsholt Modulo wrong keyboard layout spelling
17:18 TimToady I'm thinking things more like o̲
17:18 TimToady .u o̲
17:18 phenny U+006F LATIN SMALL LETTER O (o)
17:18 phenny U+0332 COMBINING LOW LINE (◌̲)
17:20 mucker TimToady: odd of me to say it i guess, but you have very talented children -- http://summonedcreature.com/ :)
17:21 manner joined #perl6
17:22 TimToady and that's just the girls!
17:22 manner phenny: tell moritz my steps about svg-plot https://gist.github.com/3841112
17:22 phenny manner: I'll pass that on when moritz is around.
17:22 phenny manner: 09:58Z <moritz> tell manner please open an issue at https://github.com/moritz/svg-plot/issues/new including steps to reproduce the error
17:24 mikemol_ joined #perl6
17:24 cognominal joined #perl6
17:31 sjohnson phenny: tell hugme to fulfill its hugging quota
17:31 phenny sjohnson: I'll pass that on when hugme is around.
17:35 moritz manner: for a bug report, please open a ticket. Thanks.
17:35 phenny moritz: 17:22Z <manner> tell moritz my steps about svg-plot https://gist.github.com/3841112
17:36 manner moritz: thanks.
17:37 orafu joined #perl6
17:38 spider-mario when I try to build Rakudo Star 2012.09 for packaging, I get: "load_bytecode" couldn't find file 'Perl6/Grammar.pbc'
17:38 moritz :(
17:38 moritz that's probably during building the debugger
17:38 moritz I've seen that error before mentioned in here
17:39 spider-mario I get that error when running make myself in src/modules/rakudo-debugger indeed
17:39 spider-mario thanks
17:39 spider-mario I’ll probably do without the debugger for now
17:42 spider-mario or maybe rebuilding the package when it’s already installed will solve the problem
17:44 cognominal joined #perl6
17:47 dalek roast: a7483be | (Edwin Steiner)++ | S04-phasers/eval-in-begin.t:
17:47 dalek roast: Add test for RT #115134: [BUG] BEGIN { eval "..." } Confuses Rakudo.
17:47 dalek roast: review: https://github.com/perl6/roast/commit/a7483bec00
17:58 cognominal joined #perl6
17:59 spider-mario having a system-wide, incomplete installation of rakudo star seems to solve the problem
17:59 spider-mario it can then be rebuilt more completely
18:07 sirrobert joined #perl6
18:12 dalek rakudo/nom: 321d57b | moritz++ | src/Perl6/Actions.pm:
18:12 dalek rakudo/nom: :ii regex adverb implies :i
18:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/321d57bc39
18:12 dalek rakudo/nom: ebc730c | moritz++ | src/core/ (2 files):
18:12 dalek rakudo/nom: typed exception for symbol lookup failure
18:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ebc730c249
18:14 _edwin .u plus
18:14 phenny U+2214 DOT PLUS (∔)
18:15 aharoni joined #perl6
18:17 _edwin .u 2295
18:17 phenny U+2295 CIRCLED PLUS (⊕)
18:19 TimToady .u SPRECHGESANG
18:19 phenny TimToady: Sorry, no results for 'SPRECHGESANG'.
18:20 TimToady stupid antique phenny
18:21 [Coke] seems like the sort of thing that'd be amenable to hooking up to an irc sixbot.
18:22 integral joined #perl6
18:22 integral joined #perl6
18:36 sirrobert joined #perl6
18:42 sirrobert joined #perl6
18:42 Targen joined #perl6
18:46 integral joined #perl6
18:46 integral joined #perl6
18:47 _edwin ouch, had >+ instead of +> in an expression. took a while to find why it came out wrong :/
18:48 moritz r: say (1 >+ 2)
18:48 p6eval rakudo fb11f1: OUTPUT«False␤»
18:51 _edwin rn: say (0x80000000 +| (1 >+ 2))
18:51 p6eval rakudo fb11f1: OUTPUT«2147483648␤»
18:51 p6eval ..niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
18:51 moritz rn: say (1 >+ 2)
18:51 p6eval rakudo fb11f1, niecza v22-6-g9e5350d: OUTPUT«False␤»
18:51 _edwin it was hidden by the +|
18:52 sirrobert why does this happen:
18:52 moritz rn: say 0x80000000 +| False
18:52 p6eval rakudo fb11f1: OUTPUT«2147483648␤»
18:52 p6eval ..niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
18:52 sirrobert r: my $str ~= "foo"; say $str;
18:52 p6eval rakudo fb11f1: OUTPUT«foo␤»
18:52 sirrobert well...
18:52 moritz rn: say 0x80000000 +| 0
18:52 p6eval rakudo fb11f1: OUTPUT«2147483648␤»
18:52 p6eval ..niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
18:53 moritz sirrobert: the op= forms usually special-case an undefined LHS
18:53 sirrobert ok, fair enough
18:53 moritz was your question why it doesn't warn?
18:53 moritz r: my %h; %h<a> *= 4; %h<b> += 5; say %h.perl
18:53 p6eval rakudo fb11f1: OUTPUT«("a" => 4, "b" => 5).hash␤»
18:53 sirrobert well, I did something that generated a null string
18:54 sirrobert should have tested my demo code first= )
18:54 sirrobert =)
18:54 _edwin rn: say 0x80000000
18:54 p6eval rakudo fb11f1, niecza v22-6-g9e5350d: OUTPUT«2147483648␤»
19:04 wk_ joined #perl6
19:11 nodmonkey joined #perl6
19:12 cognominal joined #perl6
19:24 birdwindupbird joined #perl6
19:24 sirrobert Type check failed in assignment to '$!app'; expected 'Timber' but got 'Timber'
19:24 _edwin is it somehow possible to use backreferences like A[n-16] in a lazy sequence?
19:25 _edwin when generating a lazy sequence I menat
19:25 _edwin meant*
19:26 moritz my @a := gather { take $_ for ^10; take @a[$_ - 5] ** 2 for 10..20 }; say @a[15]
19:26 moritz r: my @a := gather { take $_ for ^10; take @a[$_ - 5] ** 2 for 10..20 }; say @a[15]
19:26 p6eval rakudo ebc730: OUTPUT«use of uninitialized value of type Nil in numeric context  in block  at /tmp/z056gc1ILW:1␤␤use of uninitialized value of type Nil in numeric context  in block  at /tmp/z056gc1ILW:1␤␤use of uninitialized value of type Nil in numeric context  in block  at /tmp/z056gc…
19:26 TimToady _edwin: you're supposed to be able to, but there are bugs
19:26 moritz and if you just want the previous few elements, a sequence might be what you want
19:27 moritz nr: my @a := 1, 1, *+* ... *; say  @a[15]
19:27 p6eval rakudo ebc730, niecza v22-6-g9e5350d: OUTPUT«987␤»
19:27 moritz that uses the last two elements
19:29 * colomon has finally usefully used inheritance in a grammar!
19:29 TimToady I'd like to get to the point where we can do hamming numbers self referentially
19:29 TimToady constant @hamming = 1, dedup (@hamming X* 2) M (@hamming X* 3) M (@hamming X* 5);
19:29 sirrobert colomon:  nice =)
19:30 TimToady but no implementation is up to that yet
19:30 TimToady where M is a lazy list merge infix
19:30 TimToady and dedup does what it says
19:31 colomon TimToady: M, eh?
19:31 moritz our metaop particle zoo is growing :-)
19:31 moritz R, S, X, Z, soon M
19:31 TimToady M isn't a metaop, at least not until you start saying Mleg and such
19:32 moritz we need some vowels in there too
19:32 arnsholt colomon: What did you use inheritance for, OOC?
19:32 colomon is $a M $b just "take one from $a, one from $b, repeat"?
19:33 TimToady list infixes don't unpack items like that
19:33 colomon arnsholt: To distinguish between a formal grammar (ie, if your string passes this it is formally correct) and an informal grammar (ie this is some of the crap that occurs in real world files)
19:33 _edwin that would be $a Z $b
19:33 arnsholt Ah, cool!
19:33 TimToady _edwin: no, that doesn't work either
19:33 _edwin eh @a Z @b
19:33 TimToady better
19:34 TimToady or @$a Z @$b
19:34 cognominal joined #perl6
19:34 moritz colomon: I think @a M @b is  more like gather { while @a && @b { take @a[0] before @b[0] ?? @a.pop !! @b.pop } }
19:34 moritz erm
19:34 sirrobert arnsholt & colomon:  I recently used grammar inheritance for a dispatch framework.  The request is in ascii, a grammar munges it around and dispatches.
19:34 TimToady moritz: shift
19:35 moritz gather { while @a && @b { take @a[0] before @b[0] ?? @a.shift !! @b.shift }; take $_ for @a, @b }
19:35 sirrobert arnsholt & colomon:  The top grammar provides key functionality, the lower is for domain-specific dispatches =)
19:35 colomon TimToady, moritz: so it's the merge of a merge sort?
19:35 TimToady yes, or of a definition of hamming numbers :)
19:35 moritz colomon: as far as I understand, yes
19:36 colomon and if you have @a M @b M @c it's merging all three at once?
19:36 arnsholt sirrobert: Sounds cool! I remember some people playing with ideas along those lines previously. Is your code on github or something?
19:36 TimToady colomon: yes, list infixes are list associative
19:36 sirrobert arnsholt: not at the moment (maybe later).  It's private internals ATM.
19:36 colomon TimToady: is it spec'd yet?
19:37 TimToady no
19:37 sirrobert arnsholt: but it's super slick... the grammar and controller are very clean and only take a few lines
19:37 TimToady but I keep wanting it to have been specced :)
19:38 TimToady it's not so clear how to set up the metaop form though
19:39 TimToady Mbefore is probably default
19:39 colomon TimToady: hurm.  that seems like it would be straightforward for the metaop form.  What's the complication?
19:40 TimToady but should it distinguish Mlt from Mle, for instance?
19:40 colomon seems like an arbitrary decision is called for!  and let real world experience sort it out.  ;)
19:42 arnsholt sirrobert: Sounds awesome!
19:42 sirrobert arnsholt: once we're a little further down (maybe v2) I'll see if we can release it.
19:44 arnsholt Cool
19:46 sorear good * #perl6
19:46 phenny sorear: 15:27Z <colomon> tell sorear I'm getting a distressing number of "Unhandled exception: System.MissingMethodException: Method not found: 'Cursor..ctor'." errors in niecza -- possibly all coming from calls to subst?
19:46 sorear colomon: I blame stale compiled modules
19:46 colomon sorear: actually, that appears to have been a case of a completely hosed niecza build
19:47 colomon ... or maybe that?
19:47 colomon where are they again?
19:50 sorear ~/.local/share/NieczaModuleCache
19:51 sirrobert does bareword POST mean something in p6?
19:51 sirrobert or POST:foo
19:51 colomon sorear++
19:52 sirrobert or (maybe from a different angle)...
19:52 flussence sorear: there's a ~/.cache directory too, you know... :)
19:52 sirrobert is there any reason I should use a colon in a sub name?
19:52 sirrobert like...    method foo:bar () { ... }
19:55 sorear flussence: that would have required platform-testing code
20:00 flussence hm, I was under the impression they all come as a set (with ~/.config)... does OS X have some of these and not others?
20:03 sorear it's currently using System.Environment.GetSpecialFolderPath(LocalApplicationData)
20:03 flussence oh, right
20:04 geekosaur OS X doesn't use any of those normally
20:04 geekosaur the native local application data would be ~/Library/Application Support/appname although unixy stuff probably would continue to use freedesktop.org paths; it just has to create them first
20:10 flussence that's annoying, I just looked it up and mono/.net doesn't have an equivalent for $XDG_CACHE_HOME there.
20:13 flussence (unless you're expected to use Temporary Internet Files for it on windows, blegh)
20:14 preflex joined #perl6
20:15 sirrobert what's the syntax for:  Class A is B does C ?  I'm getting:
20:15 sirrobert Unable to parse $*PKGDECL definition at line 18, near "does
20:16 sorear class A is B does C { }
20:16 sirrobert hmmm
20:16 TimToady std: class A is B does C { }
20:16 p6eval std 77327a4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Invalid role name at /tmp/tpUOX1Iftl line 1:â�¤------> [32mclass A is B does [33mâ��[31mC { }[0mâ�¤    expecting typenameâ�¤Parse failedâ�¤FAILED 00:00 41mâ�¤Â»
20:16 TimToady heh
20:16 sirrobert heh
20:16 TimToady std: class A is Cool does Positional { }
20:16 sirrobert r: class B; role C; class A is B does C {};
20:16 p6eval std 77327a4: OUTPUT«ok 00:00 42m␤»
20:16 p6eval rakudo ebc730: OUTPUT«===SORRY!===␤Too late for semicolon form of $*PKGDECL definition at line 2, near "class A is"␤»
20:17 sirrobert r: class B {}; role C {}; class A is B does C {};
20:17 p6eval rakudo ebc730:  ( no output )
20:17 erkan joined #perl6
20:17 sirrobert hm
20:17 TimToady "$*PKGDECL" is a bug
20:17 TimToady std: class B {}; role C {}; class A is B does C {};
20:17 p6eval std 77327a4: OUTPUT«ok 00:00 42m␤»
20:18 TimToady hmm
20:18 sorear ENOTENOUGHINTERPOLATION
20:18 TimToady oh
20:18 TimToady std: class B; role C; class A is B does C {}
20:18 p6eval std 77327a4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Too late for semicolon form of role definition at /tmp/9VNVRcMJZg line 1:â�¤------> [32mclass B; role C[33mâ��[31m; class A is B does C {}[0mâ�¤    expecting any of:â�¤ nameâ�¤   traitâ�¤Parse failedâ�¤FAILED 00:00 41mâ�¤Â»
20:18 TimToady what it should say
20:19 sirrobert ok, gotta go.  have a good weekend =)
20:21 raiph joined #perl6
20:25 raiph sirrobert: expected Blah but got Blah: http://irclog.perlgeek.de/perl6/2012-03-01 discussion starts at 15:30
20:42 kurahaupo joined #perl6
20:44 _edwin nr: 128 X+> 1...2
20:44 p6eval niecza v22-6-g9e5350d: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤"X+>" and "..." are non-associative and require parens at /tmp/RDuow3ly6S line 1:â�¤------> [32m128 X+> 1...[33mâ��[31m2[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5…
20:44 p6eval ..rakudo ebc730:  ( no output )
20:45 _edwin nr: say(128 X+> 1...2)
20:45 p6eval rakudo ebc730: OUTPUT«64 32␤»
20:45 p6eval ..niecza v22-6-g9e5350d: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤"X+>" and "..." are non-associative and require parens at /tmp/roFHh88Vs6 line 1:â�¤------> [32msay(128 X+> 1...[33mâ��[31m2)[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (di…
20:45 _edwin who's right?
20:46 doy std: 128 X+> 1...2
20:46 p6eval std 77327a4: OUTPUT«[31m===[0mSORRY![31m===[0m�"X+>" and "..." are non-associative and require parens at /tmp/4gKFjf0fMl line 1:�------> [32m128 X+> 1...[33m�[31m2[0m�Check failed�FAILED 00:00 42m�»
20:46 _edwin ok, thanks. will submit rakudobug later
20:49 kurahaupo left #perl6
20:50 _edwin nr: 'a'.encode
20:50 p6eval rakudo ebc730:  ( no output )
20:50 p6eval ..niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: No value for parameter '$enc' in 'Str.encode'␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Str.encode @ 1) ␤  at /tmp/BjfDAT0znK line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤  at /home/p6ev…
20:50 _edwin nr: 'a'.encode.say
20:50 p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: No value for parameter '$enc' in 'Str.encode'␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Str.encode @ 1) ␤  at /tmp/uSekb8h0ZJ line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤  at /home/p6ev…
20:51 p6eval ..rakudo ebc730: OUTPUT«Buf:0x<61>␤»
20:51 _edwin nieczabug this time I think, right? the spec mentions a default for $enc
20:53 benabik joined #perl6
21:01 _edwin http://rosettacode.org/wiki/SHA-1#Perl_6
21:02 * flussence notes wiki/SHA-3 doesn't yet exist...
21:03 _edwin hm, the stupid highlighting of x and X does not become this code :/
21:04 flussence well, they *are* built-in operators already...
21:04 _edwin the padding part is still a bit awkward
21:05 _edwin yes, it's just that the highlighter is not smart enough to detect where they are and where they are not the x and X operators
21:06 _edwin I had a lot of fights with negative number vs. bitwise ops while writing this code
21:07 _edwin this came as a surprise to me, for example:
21:07 _edwin nr: (-4062448665 +& 0xffffffff).say
21:07 _edwin nr: (-4062448665 +& 0xffffffff).say
21:07 _edwin nr: (-4062448665 +& 0xffffffff).say
21:07 p6eval niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
21:07 p6eval ..rakudo ebc730: OUTPUT«-35916825␤»
21:07 p6eval niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
21:07 p6eval ..rakudo ebc730: OUTPUT«-35916825␤»
21:07 p6eval niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
21:07 _edwin oops, sorry for spamming
21:07 p6eval ..rakudo ebc730: OUTPUT«-35916825␤»
21:08 _edwin hm, the difference between rakudo and niecza is also interesting
21:09 _edwin I ended up doing * % 0x1_000_000
21:09 _edwin eh, four zeroes
21:10 _edwin niecza dies on this code with "Unhandled exception: Cannot unbox a Int32 from an object of repr P6box[Byte[]]"
21:11 _edwin not sure if it is my fault or niecza's
21:11 _edwin . o O (it's too late, I'm talking to myself already :)
21:13 sorear sounds like you passed a Buf to something that expects an Int
21:16 _edwin nr: 'abc'.encode('ascii').list.say
21:16 p6eval niecza v22-6-g9e5350d: OUTPUT«Buf.new(...)␤»
21:16 p6eval ..rakudo ebc730: OUTPUT«97 98 99␤»
21:16 _edwin that makes the difference
21:16 Iskorptix_ joined #perl6
21:16 Iskorptix_ left #perl6
21:22 _edwin I did not find Buf.list explicitly in the spec so far, but as Buf does Positional, rakudo might be right here
21:22 _edwin sorear, your take on this?
21:24 Circlepuller__ joined #perl6
21:24 Circlepuller__ joined #perl6
21:26 sorear _edwin: rakudo is clearly right
21:27 tokuhiro_ joined #perl6
21:27 _edwin sorear is there a nieczabug tracker where I should file it?
21:27 raiph phenny, tell sirrobert expected Blah but got Blah: http://irclog.perlgeek.de/perl6/2012-03-01 discussion starts at 15:30
21:27 phenny raiph: I'll pass that on when sirrobert is around.
21:31 sorear _edwin: yes, but I don't think it's useful to file separate bugs for all of the things missing from Niecza's Buf
21:31 sorear it's like 5% implemented
21:31 sorear just enough for Bailador
21:33 dalek roast: 20918f0 | (Edwin Steiner)++ | S32-str/encode.t:
21:33 dalek roast: Test that Buf.list gives the list of codepoints.
21:33 dalek roast: review: https://github.com/perl6/roast/commit/20918f02b9
21:34 _edwin ok, anyway I added a spectest
21:39 sorear _edwin++
21:40 rindolf joined #perl6
21:53 hash_table joined #perl6
21:55 leont joined #perl6
22:00 dalek roast: a5a1b21 | (Edwin Steiner)++ | S03-operators/precedence.t:
22:00 dalek roast: Add test related to RT #77848, 'X+>' must not associate with '...'.
22:00 dalek roast: review: https://github.com/perl6/roast/commit/a5a1b211da
22:02 _edwin std: 4 X+> 1...2
22:02 p6eval std 77327a4: OUTPUT«[31m===[0mSORRY![31m===[0m�"X+>" and "..." are non-associative and require parens at /tmp/zlLrFa_Dc2 line 1:�------> [32m4 X+> 1...[33m�[31m2[0m�Check failed�FAILED 00:00 42m�»
22:09 _edwin nr: (-4062448665 +& 0xf).say
22:09 p6eval rakudo ebc730: OUTPUT«7␤»
22:09 p6eval ..niecza v22-6-g9e5350d: OUTPUT«0␤»
22:10 Iskorptix_ joined #perl6
22:10 Iskorptix_ left #perl6
22:14 _edwin nr: (-4062448665 X+& 0xffffff,(*+1)*2-1...0xffff_ffff).say
22:14 p6eval niecza v22-6-g9e5350d: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤"X+&" and "..." are non-associative and require parens at /tmp/tsLPxPygrX line 1:â�¤------> [32m(-4062448665 X+& 0xffffff,(*+1)*2-1...[33mâ��[31m0xffff_ffff).say[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza…
22:14 p6eval ..rakudo ebc730: OUTPUT«14414823 31192039 31192039 98300903 -35916825 -35916825 -35916825 -35916825 -35916825␤»
22:14 _edwin nr: (-4062448665 X+& (0xffffff,(*+1)*2-1...0xffff_ffff)).say
22:14 p6eval niecza v22-6-g9e5350d: OUTPUT«0 0 0 0 0 0 0 0 -2147483648␤»
22:14 p6eval ..rakudo ebc730: OUTPUT«14414823 31192039 31192039 98300903 -35916825 -35916825 -35916825 -35916825 -35916825␤»
22:15 _edwin I don't get it :/
22:16 sorear _edwin: what don't you get?
22:16 _edwin how these number come to be
22:17 sorear n: say (-4062448665) +| 0
22:17 p6eval niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
22:17 _edwin in rakudo the result becomes negative when the mask changes from 27 to 28 '1' bits
22:17 sorear your numbers are too big.
22:17 sorear try smaller numbers.
22:17 sorear afaik neither rakudo nor niecza properly handles bitops on bignums yet
22:17 _edwin I'd like to have predictable bitwise ops also for big numbers
22:18 _edwin oh
22:18 sorear niecza's is more predictable because it always uses int32 :p
22:18 sorear rakudo uses platform intos
22:18 sorear ints
22:18 sorear actually platform intptr_ts
22:19 grondilu joined #perl6
22:21 grondilu Normally for binary "strings", I should use Buf.  But can I use Str instead, as I would in Perl5?  Can I use: "my Str $x = [~] @some-array-of-bytes;" and not lose the information in @some-array-of-bytes?
22:22 sorear what is the type of the values in @some-array-of-bytes?
22:23 grondilu just bytes (integers from 0 to 256)
22:24 _edwin nr: Buf.new([97.98]).decode('ascii').say
22:24 p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Cannot call new; none of these signatures match:␤    Mu, *%_␤  at /tmp/ZRdQj52iM7 line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4199 (module-CORE @ …
22:24 p6eval ..rakudo ebc730: OUTPUT«This type cannot unbox to a native integer␤  in method set_codes at src/gen/CORE.setting:6992␤  in method new at src/gen/CORE.setting:6984␤  in block  at /tmp/lQqsM_D4wD:1␤␤»
22:24 _edwin nr: Buf.new([97,98]).decode('ascii').say
22:24 p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Cannot call new; none of these signatures match:␤    Mu, *%_␤  at /tmp/FBTogmcgqx line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4199 (module-CORE @ …
22:24 p6eval ..rakudo ebc730: OUTPUT«This type cannot unbox to a native integer␤  in method set_codes at src/gen/CORE.setting:6992␤  in method new at src/gen/CORE.setting:6984␤  in block  at /tmp/NhFOUsgyGL:1␤␤»
22:24 grondilu r: my @a = (^256).roll(100); my Str $x = [~] map &chr, @a; say @a ~~ $x.ords;
22:24 p6eval rakudo ebc730: OUTPUT«True␤»
22:24 _edwin the rakudo message is strange
22:25 grondilu r: my @a = (^256).roll(100000); my Str $x = [~] map &chr, @a; say @a ~~ $x.ords;
22:25 _edwin in the spec Buf.new is used like that
22:25 p6eval rakudo ebc730: OUTPUT«(timeout)»
22:25 grondilu r: my @a = (^256).roll(1000); my Str $x = [~] map &chr, @a; say @a ~~ $x.ords;
22:25 p6eval rakudo ebc730: OUTPUT«True␤»
22:26 grondilu Seems ok anyway.
22:26 * _edwin -> sleep, bye
22:36 integral joined #perl6
22:36 integral joined #perl6
22:42 Circlepuller__ joined #perl6
23:10 grondilu_ joined #perl6
23:10 grondilu_ nr: say 16.sprintf: "%x"
23:10 p6eval rakudo ebc730: OUTPUT«16␤»
23:10 p6eval ..niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Unable to resolve method sprintf in type Int␤  at /tmp/jEMNZxleyY line 1 (mainline @ 3) ␤  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…
23:12 grondilu_ how do I write an integer in hexadecimal already?
23:13 sorear 0x123
23:14 * grondilu_ found it
23:15 grondilu_ r:say 16.base(16)
23:15 grondilu_ ?
23:15 grondilu_ r: say 16.base(16)
23:15 p6eval rakudo ebc730: OUTPUT«10␤»
23:17 grondilu sorear: I did not mean a literal
23:17 [Coke] r: say eval ":16({16.base(16)})"
23:17 p6eval rakudo ebc730: OUTPUT«Nominal type check failed for parameter '$str'; expected Str but got Int instead␤  in sub unbase at src/gen/CORE.setting:4620␤  in block  at eval_0:1␤  in  at eval_0:1␤  in sub eval at src/gen/CORE.setting:530␤  in block  at /tmp/RzTeHkDZ11:1␤␤»
23:18 [Coke] r: say eval ":16~({16.base(16)})"
23:18 p6eval rakudo ebc730: OUTPUT«===SORRY!===␤Malformed radix number␤at eval_0:1␤»
23:18 [Coke] r: say eval ":16(~{16.base(16)})"
23:18 p6eval rakudo ebc730: OUTPUT«16␤»
23:25 PacoAir joined #perl6
23:35 whiteknight joined #perl6
23:41 dalek specs: 02ad938 | larry++ | S05-regex.pod:
23:41 dalek specs: :ss implies :s too, moritz++
23:41 dalek specs: review: https://github.com/perl6/specs/commit/02ad9389af

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

Perl 6 | Reference Documentation | Rakudo