Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-10-24

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:01 lue joined #perl6
00:03 sorear lue!!!
00:04 cognominal joined #perl6
00:04 ranguard joined #perl6
00:09 bluescreen10 joined #perl6
00:13 [Coke] joined #perl6
00:23 cognominal joined #perl6
00:33 gdey joined #perl6
00:37 mtk joined #perl6
00:53 nlpplz joined #perl6
00:56 anuby joined #perl6
01:08 nghthawk76 joined #perl6
01:09 hypolin joined #perl6
01:13 diakopter rn: class A { has &.foo = sub { say 455 } }; A.new.foo.(); A.new.foo = sub { say 32 }; A.new.foo.()
01:13 p6eval niecza v22-14-g136ddcf: OUTPUT«455␤455␤»
01:13 p6eval ..rakudo 714593: OUTPUT«455␤Cannot assign to a readonly variable or a value␤  in block  at /tmp/1rcRVxgkUb:1␤␤»
01:13 diakopter hm
01:17 fgomez joined #perl6
01:46 sorear diakopter: needs "is rw"
01:47 sorear known nieczabug
01:49 diakopter oh
02:02 benabik joined #perl6
02:05 diakopter benabik: what's new in parrotland
02:06 benabik diakopter: Various attempts to fix up I/O, and then fix those fixes, as far as I know.  I've been rather out of it.  My PhD program is a bit more demanding of my time than my MS was.
02:06 shachaf Hmm, Parrot is still around?
02:07 diakopter shachaf: what would replace it? :)
02:08 shachaf diakopter: Well, plenty of irreplaceable things are no longer around.
02:10 diakopter ;)
02:12 diakopter shachaf: do you work on VMs?
02:13 shachaf Nope, though I occasionally look at them from a distance.
02:13 diakopter me2
02:13 shachaf I went to a few talks about Parrot years ago.
02:27 * [Coke] hopes it wasn't his.
02:31 japhb [Coke], why's that?
02:33 japhb sorear, Can all versions of niecza be built with the newest ZIP file?
02:33 sorear japhb: No
02:34 japhb I'm preparing to build a lot (potentially all) releases of niecza, and would like to avoid wasting network bandwidth to download a separate ZIP for every release if I don't have to.
02:34 japhb sorear, awww.  OK
02:35 sorear Now I'm curious :D
02:35 diakopter benchmark!
02:36 shachaf japhb: Can't you get the git repository and use tags?
02:36 sorear shachaf: the bootstrap binaries are not checked into git.  perhaps they should be?
02:36 sorear it's about 30M of zip files
02:37 japhb diakopter has of course guessed correctly.
02:37 shachaf Oh, I see what the question was now.
02:37 shachaf Never mind.
02:38 shachaf [Coke]: I think it was Allison Randal and chromatic.
02:38 simcop2387 joined #perl6
02:38 japhb shachaf, I can do that for getting the source tree (which I am -- I'm making bare clones of all components I'm benchmarking, and then just doing a LOT of checkouts),  But unfortunately niecza wants to download a ZIP file of a pre-built version of itself for bootstrapping during the build process.
02:38 shachaf japhb: Right, I see now.
02:39 CharellKing joined #perl6
02:40 japhb sorear: That would just make the git repo really darned big, I think, without much benefit to users.
02:41 japhb I'm already having to work around Rakudo wanting to pull a 30 MB NQP repo and a 150 MB Parrot repo, without a way to override the origin URL.  :-/
02:41 japhb s/pull/clone/
02:43 japhb My solution is going to be to checkout each Rakudo from a local clone, then check out nqp and parrot trees into the rakudo checkout before even running Configure.pl in Rakudo.
02:43 japhb (from other local clones, of course)
02:47 japhb sorear, is there any point in trying to figure out which ZIPs can build multiple releases, or is that rare enough to be not worth the potential optimization?
02:49 diakopter there's not that many releases
02:50 japhb diakopter, 23 so far.  But I expect that once this procedure is ironed out, other people will want to run the tests on their own platforms (HW/OS/etc.), so any savings I find now will benefit everyone who runs the benchmark suite.
02:59 sorear japhb: at a rough guess I'd say that each zip can build an average of 3 releases
03:26 japhb sorear, hmmm.  What's the best way to tell if a given zip is going to work with a particular release?  Or were you good about only bumping the zip rev when you needed to?
03:27 sorear japhb: best way = TIAS, sorrhy.
03:27 fgomez joined #perl6
03:27 sorear i bump whenever there is an advantage to doing so
03:28 sorear which is usually "ASAP" because many niecza releases are better than the one before
03:29 japhb sorear, fair enough.
03:41 sizz joined #perl6
03:47 Rix joined #perl6
03:52 fgomez joined #perl6
03:53 c1sung joined #perl6
03:58 CharellKing joined #perl6
03:58 CharellKing you find the bugs for the perl6 project or design some libraries for it ?
03:59 sorear I don't follow.
04:08 thou joined #perl6
04:29 gootle joined #perl6
04:34 CharellKing joined #perl6
04:38 thou joined #perl6
04:40 dalek perl6-bench: 09d1e76 | (Geoffrey Broadwell)++ | components.json:
04:40 dalek perl6-bench: Reorder components.json so components are listed in sorted order
04:40 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/09d1e76a67
04:40 dalek perl6-bench: ab72549 | (Geoffrey Broadwell)++ | bench:
04:40 dalek perl6-bench: Display known components in config command output
04:40 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/ab72549cf9
04:40 dalek perl6-bench: 4092f98 | (Geoffrey Broadwell)++ | bench:
04:40 dalek perl6-bench: Don't check out any tags for a component if no tag regex is defined
04:40 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/4092f98e20
04:40 dalek perl6-bench: 6451e9a | (Geoffrey Broadwell)++ | components.json:
04:40 dalek perl6-bench: Add nqp and parrot components to components.json
04:40 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/6451e9a069
04:40 dalek perl6-bench: 296b8fc | (Geoffrey Broadwell)++ | bench:
04:40 dalek perl6-bench: Display already cloned message during setup if cloning already complete for a given component
04:40 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/296b8fc5f4
05:00 dalek perl6-bench: c76c6ef | (Geoffrey Broadwell)++ | bench:
05:00 dalek perl6-bench: Factor out some common boilerplate from individual commands into explode-components()
05:00 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/c76c6ef5b8
05:00 dalek perl6-bench: f6a057c | (Geoffrey Broadwell)++ | bench:
05:00 dalek perl6-bench: Convert more commands to use latest explode-components(): build just drops some boilerplate, extract-releases converts from manual component calculation; fetch adds the ability to specify components
05:00 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/f6a057c25d
05:08 CharellKing Hi
05:08 sorear Hello CharellKing
05:09 CharellKing Heihei, you are always here
05:13 CharellKing Now I hava a rest
05:13 CharellKing it's 13:13 now
05:20 sftp_ joined #perl6
05:21 birdwindupbird joined #perl6
05:24 moritz good morning
05:26 sorear o/ moritz
05:26 japhb o/
05:31 GlitchMr joined #perl6
05:34 diakopter phenny: tell TimToady I think http://rosettacode.org/wiki/Man_or_boy_test#Perl_6 could be improved dramatically in efficiency by putting the assignment to &B (closure creation) inside the else block. Also maybe use ?? !!
05:34 phenny diakopter: I'll pass that on when TimToady is around.
05:37 dalek perl6-bench: bb03ad1 | (Geoffrey Broadwell)++ | bench:
05:37 dalek perl6-bench: Considerably nerf clean and realclean commands
05:37 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/bb03ad1f2a
05:38 diakopter japhb: nerf?
05:39 diakopter oh.
05:40 japhb :-)
05:55 grondilu joined #perl6
05:55 dalek perl6-bench: 9ab1c92 | (Geoffrey Broadwell)++ | bench:
05:55 dalek perl6-bench: Flip default to True for explode-components() flag that turned out to always be turned on by caller
05:55 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/9ab1c92da3
05:55 dalek perl6-bench: eb6fc7e | (Geoffrey Broadwell)++ | bench:
05:55 dalek perl6-bench: Move all utility subs down below all command multis; no actual code changes, just moving lines and two new comments as section markers
05:55 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/eb6fc7e364
05:55 grondilu rn: .say if True for <mixing if and for>;
05:56 p6eval rakudo 714593, niecza v22-14-g136ddcf: OUTPUT«mixing␤if␤and␤for␤»
05:56 baked joined #perl6
06:09 diakopter ooo found a real bug
06:09 diakopter golfing it
06:09 baked joined #perl6
06:11 diakopter nm
06:12 diakopter my error
06:12 diakopter rn: say (sub A($k is copy,&c,&d,&e,&f,&g) {$k <=0??f+g!!(sub B {A(--$k,&B,&c,&d,&e,&f)})()}​)(10,{1},{-1},{-1},{1},{0})
06:12 p6eval rakudo 714593, niecza v22-14-g136ddcf: OUTPUT«-67␤»
06:12 diakopter golfed man or boy
06:12 diakopter rn: say (sub A($k is copy,&c,&d,&e,&f,&g) {$k <=0??f+g!!(sub B {A(--$k,&B,&c,&d,&e,&f)})()}​)(12,{1},{-1},{-1},{1},{0})
06:12 p6eval rakudo 714593, niecza v22-14-g136ddcf: OUTPUT«-291␤»
06:12 diakopter rn: say (sub A($k is copy,&c,&d,&e,&f,&g) {$k <=0??f+g!!(sub B {A(--$k,&B,&c,&d,&e,&f)})()}​)(15,{1},{-1},{-1},{1},{0})
06:12 p6eval rakudo 714593, niecza v22-14-g136ddcf: OUTPUT«-3250␤»
06:16 CharellKing maybe nobody can't appear error
06:17 diakopter ?
06:17 woosley left #perl6
06:21 CharellKing before you take out your works, what you can do is checking and checking
06:22 sorear CharellKing: I do not understand you
06:22 CharellKing hah
06:22 CharellKing it's chinese english
06:23 CharellKing sorry
06:24 CharellKing chinese english means most of chinese speak english with the habit of chinese language
06:28 CharellKing it's same as that before you speak chinese, you convert your english to chinese in your brain
06:30 bonsaikitten CharellKing: for greater goodness!
06:32 colomon joined #perl6
06:47 bloonix joined #perl6
06:49 diakopter rn: say (sub A(\k is copy,\c,\d,\e,\f,\g) {k <=0??f+g!!(sub B {A(--k,&B,c,d,e,f)})()})(10​000,{1},{-1},{-1},{1},{0}) # answer is https://gist.github.com/3944439 but would take more heap space than atoms in the universe
06:49 p6eval rakudo 714593: OUTPUT«Cannot assign to a non-container␤  in sub prefix:<--> at src/gen/CORE.setting:2913␤  in sub B at /tmp/j_1elykgmZ:1␤  in sub A at /tmp/j_1elykgmZ:1␤  in block  at /tmp/j_1elykgmZ:1␤␤»
06:49 p6eval ..niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Writing to readonly scalar␤  at /tmp/ENM9vIZCDM line 1 (B @ 4) ␤  at /tmp/ENM9vIZCDM line 1 (A @ 4) ␤  at /tmp/ENM9vIZCDM line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/l…
06:49 diakopter er
06:50 baked joined #perl6
06:50 diakopter rn: say (sub A($k is copy,&c,&d,&e,&f,&g) {$k <=0??f+g!!(sub B {A(--$k,&B,&c,&d,&e,&f)})()})​(10000,{1},{-1},{-1},{1},{0}) # answer is https://gist.github.com/3944439 but would take more heap space than atoms in the universe
06:51 p6eval niecza v22-14-g136ddcf: OUTPUT«(timeout)»
06:51 p6eval ..rakudo 714593: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 88386 (src/gen/CORE.setting.pir:42460) (src/gen/CORE.setting:9089)␤called from Sub 'prefix:<-->' pc 53870 (src/gen/CORE.setting.pir:25720) (src/gen/CORE.setting:2910)␤called from Sub 'B' pc 438 (…
06:57 flightrecorder joined #perl6
06:59 domidumont joined #perl6
07:00 cognominal joined #perl6
07:02 FROGGS joined #perl6
07:03 brrt joined #perl6
07:14 baked joined #perl6
07:15 azawawi joined #perl6
07:19 marloshouse joined #perl6
07:22 grondilu r: my $x = 0, 1; my $y = ^2; say "$x $y";
07:22 p6eval rakudo 714593: OUTPUT«0 0 1␤»
07:22 grondilu r: my $x = 0, 1; my $y = ^2; say "$x, $y";
07:22 p6eval rakudo 714593: OUTPUT«0, 0 1␤»
07:23 * grondilu expected $x to equal $y
07:23 moritz your expectations were wrong
07:23 moritz first, item assignment has tighter precedence than infix:<,>
07:24 grondilu oops, I totally forgot that
07:24 moritz and if you write my $x = (0, 1); then it's still a Parcel
07:24 moritz and ^2 is a Range
07:24 grondilu ok
07:25 nlpplz joined #perl6
07:26 FROGGS r: my $x = 0..1; my $y = ^2; say "$x, $y";
07:26 p6eval rakudo 714593: OUTPUT«0 1, 0 1␤»
07:26 birdwindupbird joined #perl6
07:26 FROGGS ^2 is pretty cool actually
07:32 domidumont joined #perl6
07:33 Bucciarati joined #perl6
07:33 sqirrel joined #perl6
07:35 kresike joined #perl6
07:35 kresike good morning all you happy perl6 people
07:41 azawawi kresike: good morning
07:41 brrt hi kresike
07:42 kresike azawawi, brrt, o/
07:46 birdwindupbird joined #perl6
07:52 gootle joined #perl6
07:54 pmurias joined #perl6
08:12 azawawi star: use URI;
08:12 p6eval star 2012.07:  ( no output )
08:12 azawawi r: use URI;
08:12 Chillance joined #perl6
08:12 p6eval rakudo 714593: OUTPUT«===SORRY!===␤Could not find URI in any of: /home/p6eval/nom-inst/lib/parrot/​4.8.0-devel/languages/perl6/lib, /home/p6eval/nom-inst/lib/parrot/4.8​.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/4.​8.0-devel/languages/perl6/site/lib, /home/p6eval…
08:13 azawawi rakudo: use URI;
08:13 p6eval rakudo 714593: OUTPUT«===SORRY!===␤Could not find URI in any of: /home/p6eval/nom-inst/lib/parrot/​4.8.0-devel/languages/perl6/lib, /home/p6eval/nom-inst/lib/parrot/4.8​.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/4.​8.0-devel/languages/perl6/site/lib, /home/p6eval…
08:16 cognominal joined #perl6
08:18 cognominal my $a='a'; say $a ~ "b"  # what is the syntax if I want to shove the $a under the double quote to avoid the tilda?
08:25 moritz "{$a}b"
08:26 azawawi i dont know if this is a bug or feature... perl6 --doc=html test.p6  vs perl6 --doc=HTML test.p6
08:26 FROGGS azawawi: what happens?
08:26 azawawi the html or HTML make perl6 require Pod::To::html  or Pod::To::HTML
08:26 moritz that's a feature
08:27 tadzik yep
08:27 FROGGS ahh
08:27 FROGGS I see
08:27 tadzik you can have any Pod::To and --doc will look for it
08:27 azawawi what's the one bundled in perl6 by default?
08:27 moritz Text
08:27 dakkar joined #perl6
08:27 moritz star: use Pod::To::HTML;
08:27 p6eval star 2012.07:  ( no output )
08:27 moritz and star includes HTML too
08:27 cognominal moritz++  # I dont know why I kept wanting writing it "${a}b"
08:28 doy "${a}b" is how it works in perl5 and sh
08:32 cognominal doy++ # that's why, may be it could be supported as well in Perl 6 or give a more sensible error message even if the other syntax is of more general use
08:33 cognominal rn: my $a='a'; "${a}b";
08:33 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of ${a}; in Perl 6 please use {$a} at /tmp/4Ox2EvUcyk line 1:â�¤------> [32mmy $a='a'; "${a}[33mâ��[31mb";[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
08:33 p6eval ..rakudo 714593: OUTPUT«===SORRY!===␤Non-variable \$ must be backslashed at line 2, near "${a}b\";"␤»
08:33 cognominal niecza++
08:39 LordVorp joined #perl6
08:55 cognominal joined #perl6
09:03 flightrecorder joined #perl6
09:05 birdwindupbird joined #perl6
09:09 jnthn morning o/
09:10 moritz \o
09:11 LordVorp joined #perl6
09:17 masak morning, #perl6
09:17 moritz \masak/
09:18 masak \:D/
09:19 CharellKing joined #perl6
09:19 flightrecorder joined #perl6
09:21 FROGGS joined #perl6
09:22 cosimo joined #perl6
09:24 domidumont joined #perl6
09:26 dalek perl6-examples: ff087ef | (Gerhard R)++ | euler/prob009-gerdr.pl:
09:26 dalek perl6-examples: [euler/prob009] add O(N) version
09:26 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/ff087ef2c3
09:29 brrt why does python break my flow of thought so many times
09:29 brrt answer, because of the huge number of keywords
09:29 brrt and 'special' functions
09:30 tadzik funny, I was just writing some python yesterday
09:30 tadzik I mainly didn't like assignment being a statement rather than an expression
09:30 brrt that, too
09:31 brrt that really was ehm… a surprise
09:31 tadzik and no ++ and +=
09:31 brrt i can't recall a language that really split statements and expressions
09:31 tadzik and the way to print() without a trailing \n... seriously?
09:31 brrt C, in a way,  but assingments?
09:31 tadzik in Go x++ is a statement
09:32 tadzik I can live with that
09:32 tadzik you can put it in for anyway
09:32 brrt oh, yes, that is true, they had a reason for it
09:32 tadzik I can understand that
09:32 brrt because of the whole post-preincrmeent thing
09:32 brrt i liked that in c, felt kind of hacky
09:32 tadzik I can understand assignment being statement too, but understanding it doesn't make me like it :)
09:33 brrt i use assignment-as-expression literally all the time
09:33 brrt .. except in python
09:34 tadzik oh, and the fact that if you stringify a list, it calls __repr__ on individual elements, not __str__
09:34 tadzik whywouldyoudothat.png
09:35 tadzik but rambling aside it wasn't that bad of an experience
09:35 shachaf tadzik: What, in Python?
09:35 tadzik shachaf: yeah
09:35 shachaf That makes sense to me.
09:35 tadzik no to me )
09:35 thou joined #perl6
09:35 tadzik :)
09:35 brrt python is friendly, but it has some weird and annoying habits
09:35 shachaf You want ["abc","def"] to be displayed as "[abc,def]"?
09:35 tadzik I define __str__ for my objects. Then I stringify the list of objects, and I get stuff like <object Something 1293814>
09:36 shachaf Well, I'm not sure a general-purpose __str__ for lists makes sense. What should it do?
09:36 shachaf (Note: I don't even use Python.)
09:36 tadzik okay. I expect that if I define stringification for my objects, the method will be used when they need to be stringified
09:37 tadzik when I stringify a list, I expect it to stringify its elements
09:37 tadzik that's not happening, and that confuses me
09:37 brrt probably you should use a list comprehension?
09:37 tadzik possibly
09:37 brrt speaking of hacky special purpose things
09:37 tadzik I'm sure there's a Right Way to do it that's not confusing :)
09:38 tadzik I'm probably just doing things wrong
09:38 brrt yes, but if you're like me, having to find out the 'right way' from the internet documentation is annoying
09:39 brrt also, foo.append() and foo.pop, what sense is thta
09:39 brrt that
09:59 masak tadzik++ # "whatever floats your goat" :D
09:59 tadzik masak: http://littlewhitelion.com/wp-content/uplo​ads/2012/06/whatever-floats-your-goat.jpg
10:00 masak <jnthn> Perl ain't too much into making hard things impossible though. :)
10:00 masak yes, this was my thesis yesterday. though I still concede diakopter has a point.
10:00 eiro hello
10:00 masak tadzik: oh, wow. of course people actually did that. :P
10:00 masak eiro! \o/
10:01 eiro s:g/T/U/; what's up guys ?
10:01 tadzik hello eiro
10:01 eiro oops
10:04 masak eiro: are you transcribing DNA into RNA? :P
10:06 cognominal joined #perl6
10:09 silug joined #perl6
10:13 eiro masak, yep :)
10:14 eiro it will be some part of the perl6 article. but this code fail. i don't know why for now
10:14 masak rn: my $_ = 'gattaca'; s:g/t/u/; .say
10:14 p6eval niecza v22-14-g136ddcf: OUTPUT«Potential difficulties:â�¤  Useless redeclaration of variable $_ (see  line 0) at /tmp/VtdfrNwtGK line 1:â�¤------> [32mmy $_ [33mâ��[31m= 'gattaca'; s:g/t/u/; .say[0mâ�¤â�¤gauuacaâ�¤Â»
10:14 p6eval ..rakudo 714593: OUTPUT«===SORRY!===␤Redeclaration of symbol $_␤at /tmp/xkL6iUzOX9:1␤»
10:15 masak er.
10:15 masak rn: $_ = 'gattaca'; s:g/t/u/; .say
10:15 p6eval rakudo 714593, niecza v22-14-g136ddcf: OUTPUT«gauuaca␤»
10:15 masak \o/
10:20 masak rn: my $dna = 'gattaca'; my $rna = $dna.subst(rx/t/, 'u', :g); say $rna
10:20 p6eval rakudo 714593, niecza v22-14-g136ddcf: OUTPUT«gauuaca␤»
10:20 masak rn: my $dna = 'gattaca'; my $rna = $dna.subst(rx:g/t/, 'u'); say $rna
10:20 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Regex modifier g not valid on regex literal at /tmp/hDlckGp871 line 1:â�¤------> [32ma = 'gattaca'; my $rna = $dna.subst(rx:g[33mâ��[31m/t/, 'u'); say $rna[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot…
10:20 p6eval ..rakudo 714593: OUTPUT«===SORRY!===␤Adverb g not allowed on rx␤at /tmp/yL9qniiiUs:1␤»
10:20 masak oh, interesting. didn't know that.
10:20 eiro i don't like the pythonic way :) s/// fits my vision of the world
10:21 eiro brb
10:26 masak different usages for different use cases, I guess :)
10:26 masak I've been migrating away from "clone data, then mutate it step by step" as a model for string manipulation.
10:27 masak prefer to defined whole steps as whole transformations without side effects.
10:27 masak define*
10:27 moritz so, what is your model now? parse and re-assemble?
10:28 rindolf joined #perl6
10:28 masak what I just said. whole steps, each of which is essentially a transformation.
10:29 masak so parsing (or whatever) proceeds in stages.
10:29 Juerd You'll learn to stop cloning data anyway, when your strings reach hundreds of megabytes :)
10:29 masak heh :)
10:29 Juerd God didn't give us cheap RAM to waste it all on caches.
10:30 masak moritz: the other day I thought I'd cheat and do things the old, sloppy way, by just s///-ing the same string until I had what I wanted. about one hour into development, that way of doing things had properly painted me into a corner. so I fell back to doing things with a parser.
10:31 masak the problem with repeated s/// is that there's no distinction between "old data, transform this" and "new data, don't touch this".
10:31 masak they're all in the same string.
10:31 Juerd Unless it's all in one big s///g
10:32 Juerd I'm guilty of having written multi-page s[]{}ge expressions.
10:32 Juerd This was before the regex engine was re-entrant, so the same code could probably be much leaner in modern day Perl 5
10:33 masak was gonna say.
10:33 masak with today's Perl 5 regex features, you could probably write a decent parser that way.
10:33 masak using empty named captures to mark up tokens, for example.
10:34 Juerd Yeah, renumbering sucked enormously
10:36 thou_ joined #perl6
10:41 masak though I wouldn't say that clone-and-rewrite is worthless. here's a striking example of when it clearly wins: http://strangelyconsistent.org/blog​/speed-up-by-a-factor-of-6-million
10:43 _jaldhar_ joined #perl6
10:46 masak heh. "In a very real way, this program solves the problem by eating it." :)
10:51 arnsholt masak: Not only can you write a recursive descent parser with the new regex features, it's how Regexp::Grammars works AFAIK
10:53 cognominal joined #perl6
10:59 masak nod.
11:00 FROGGS masak: what are t4 configurations?
11:00 masak FROGGS: see http://strangelyconsistent.org/​blog/counting-t4-configurations
11:00 FROGGS k
11:01 masak wow, that is less than a year ago. feels like a different life.
11:01 FROGGS heh
11:05 Su-Shee_ joined #perl6
11:07 am0c joined #perl6
11:07 kel joined #perl6
11:21 sqirrel joined #perl6
11:27 colomon huh.  my good old case-replace program which has worked for ages and ages is suddenly getting weird results with the latest rakudo.  Like .lines is arbitrarily inserting newlines in my code.  (This is under Rakudo.)
11:28 moritz .lines is know to have problems :(
11:28 moritz r: say lines()[0]
11:28 p6eval rakudo 714593: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunfts␤»
11:28 colomon loop is basically for $*IN.lines() -> $test is copy { say $text; }
11:28 moritz r: say lines().lines[0[
11:28 p6eval rakudo 714593: OUTPUT«===SORRY!===␤Unable to parse expression in subscript; couldn't find final ']' at line 2, near ""␤»
11:28 moritz r: say lines().lines[0]
11:28 p6eval rakudo 714593: OUTPUT«No such method 'lines' for invocant of type 'List'␤  in block  at /tmp/94sw5Ax3ya:1␤␤»
11:28 moritz r: say lines()[0].lines[0]
11:28 p6eval rakudo 714593: OUTPUT«Land der Berge, Land am Strome,␤»
11:29 baked joined #perl6
11:31 colomon don't have time to investigate due to $work, switching to niecza is an adequate workaround for me atm.
11:38 cognominal joined #perl6
11:39 jnthn Why on earth did lines start to have problems? I thought we backed out the switch to the new Parrot I/O stuff, which I know has line issues...
11:48 masak maybe some workaround in Rakudo for the new Parrot I/O remained after we backed out the switch?
11:48 jnthn hm, perhaps
11:49 jnthn I think the Parrot IO issue in question may have been fixed recently.
11:49 jnthn (the stdin one)
11:52 havenn joined #perl6
11:53 sftp_ joined #perl6
11:55 birdwindupbird joined #perl6
11:58 eiro back
12:00 birdwindupbird joined #perl6
12:12 jnthn n: my $a = 1; my @foo = << '$a' "$a" lol :wut >>; say @foo.perl
12:12 p6eval niecza v22-14-g136ddcf: OUTPUT«["'1'", "\"1\"", "lol", ":wut"].list␤»
12:14 jnthn if I understand S0 correctly, the output should have been ["\$a", "1", "lol", :wut] ?
12:15 jnthn er, S02 :)
12:16 gootle joined #perl6
12:17 * masak .oO( S0, the secret synopsis. it says when Perl 6 will be released )
12:18 masak jnthn: yeah, that's my understanding too.
12:18 jnthn Niecza got green for quote words in features, so I thought I'd check it gave what I expected... :)
12:18 masak jnthn: I believe this deficiency of the current impl is already RT's.
12:18 jnthn Then started wondering who was right :)
12:18 jnthn masak: Note I did "n" above. I'm looking at what it'd take the get Rakudo to do << ... >> right.
12:19 masak ah.
12:31 dalek perl6-examples: e18dc35 | (Gerhard R)++ | euler/prob009-gerdr.pl:
12:31 dalek perl6-examples: [euler/prob009] tighten loop constraint and add explanation
12:31 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/e18dc3541a
12:35 bbkr_ joined #perl6
12:46 * [Coke] got a little further with partcl-nqp; stole how to do an HLL mapping from nqp itself (yay) but can't seem to hll map an nqp class (awww)
12:46 cibs joined #perl6
12:47 fgomez joined #perl6
12:55 [Coke] get a "Null PMC access in type()" when trying to map to a TclString.
12:56 PacoAir joined #perl6
12:59 hash_table joined #perl6
13:04 sftp_ joined #perl6
13:04 Psyche^ joined #perl6
13:06 benabik joined #perl6
13:17 gdey joined #perl6
13:25 masak [Coke]: that could be anything. it just means that the mapping didn't work.
13:25 dalek nqp: d65184d | jnthn++ | src/HLL/Grammar.pm:
13:25 dalek nqp: Translate quote_EXPR and peek_delimiters to NQP.
13:25 dalek nqp: review: https://github.com/perl6/nqp/commit/d65184d859
13:25 dalek nqp: 8716278 | jnthn++ | src/QAST/Operations.nqp:
13:25 dalek nqp: Add findcclass to go with findnotcclass.
13:25 dalek nqp: review: https://github.com/perl6/nqp/commit/871627850c
13:25 dalek nqp: 597cb7e | jnthn++ | src/stage0/ (9 files):
13:25 dalek nqp: Update bootstrap.
13:25 dalek nqp: review: https://github.com/perl6/nqp/commit/597cb7e7a7
13:25 dalek nqp: 334de3b | jnthn++ | src/HLL/Grammar.pm:
13:25 dalek nqp: Port split_words to NQP.
13:25 dalek nqp: review: https://github.com/perl6/nqp/commit/334de3b150
13:26 bluescreen10 joined #perl6
13:26 jnthn [Coke]: I'm wonder if it's that Parrot's hll_map doesn't quite knows what to with an NQP class.
13:36 sftp joined #perl6
13:41 kaare_ joined #perl6
13:44 jnthn > my $a = 1; my @foo = << '$a' "$a" lol :wut >>; say @foo.perl
13:44 jnthn Array.new("\$a", "1", "lol", "wut" => Bool::True)
13:44 jnthn \o/
13:47 masak \o/
13:47 bakedb_ joined #perl6
13:47 moritz \o/
13:47 masak jnthn: << "$a $a" >> ?
13:48 jnthn > my $a = 1; my @foo = << "$a $a" >>; say @foo.perl
13:48 jnthn Array.new("1 1")
13:48 masak \o/
13:48 masak jnthn++
13:49 jnthn Probably somewhere it's not perfect, but it's a lot righter than it was and it hurts no spectests.
13:49 jnthn In fact, 3 todos pass.
13:51 dalek rakudo/nom: c0ac36d | jnthn++ | src/Perl6/ (2 files):
13:51 dalek rakudo/nom: Prepare for splitting up <...> and <<...>>.
13:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c0ac36dbfa
13:51 dalek rakudo/nom: 8abdf74 | jnthn++ | src/Perl6/ (2 files):
13:51 dalek rakudo/nom: First crack at doing << ... >> quotes properly.
13:51 dalek rakudo/nom:
13:51 dalek rakudo/nom: Respects nested quoting (which follow proper interpolation rules by
13:51 dalek rakudo/nom: single vs double quotes) and leaves colonpairs intact.
13:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8abdf743ff
13:52 masak yay
13:57 bbeans joined #perl6
14:00 * PerlJam just had a weird moment ...
14:01 PerlJam I have several windows open, some with perl 5 and some with perl 6.   I was switching between windows and couldn't tell right off which Perl I was looking at.
14:01 dalek roast: 81a684c | jnthn++ | S02-literals/quoting.t:
14:01 dalek roast: Unfudge some quoting tests for Rakudo.
14:01 dalek roast:
14:01 dalek roast: Also a fix to avoid a test that's long failed on Win32 doing so (a
14:01 dalek roast: \r issue).
14:01 dalek roast: review: https://github.com/perl6/roast/commit/81a684c293
14:01 brrt joined #perl6
14:01 jnthn Well, all those pass so I'm gonna give us green on it for features. :)
14:02 stopbit joined #perl6
14:05 dalek features: b711785 | jnthn++ | features.json:
14:05 dalek features: Rakudo updates.
14:05 dalek features: review: https://github.com/perl6/f​eatures/commit/b711785566
14:05 moritz I think <<2 3>> should produce a parcel of IntStr objects, or so
14:05 gdey joined #perl6
14:05 jnthn Yeah, that whole allomorphy thing is a separate bunch of stuff and shows up in more places than just <<...>>
14:07 moritz right, MAIN args for example
14:07 moritz and, what was the name? val(), I think
14:07 jnthn val() yeah
14:07 flightrecorder joined #perl6
14:07 jnthn That's in ROADMAP
14:08 jnthn I think...
14:08 jnthn yes, it is
14:08 masak val() is like a data version of eval()
14:08 jnthn Yeah
14:09 jnthn japhb++ has his name next to it on ROADMAP
14:09 masak so now we just have to think of a cute way "e" stands for in "eval". :P something like "more than just data".
14:09 masak s/way/thing/
14:09 moritz execution
14:10 jnthn executable
14:10 moritz execution + data = win
14:10 moritz erm, = eval :-)
14:13 masak ;)
14:14 dalek rakudo/nom: 74a8835 | jnthn++ | docs/ChangeLog:
14:14 dalek rakudo/nom: Update ChangeLog.
14:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/74a88356e6
14:18 GlitchMr joined #perl6
14:19 arlinius joined #perl6
14:21 dalek Perlito: 2aefb24 | (Anthony Hinsinger)++ | src5/lib/Perlito5/Javascript (2 files):
14:21 dalek Perlito: Fixed a bug in javascript function p5get_class_for_method
14:21 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/2aefb2428a
14:21 dalek Perlito: f73a4c8 | (Anthony Hinsinger)++ | perlito5.pl:
14:21 dalek Perlito: Re-bootstrap perlito5.pl with javascript bug fixed
14:21 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/f73a4c8ff4
14:21 dalek Perlito: a96fa40 | (Flavio S. Glock)++ | / (3 files):
14:21 dalek Perlito: Merge pull request #14 from atoy40/master
14:21 dalek Perlito:
14:21 dalek Perlito: Bug in javascript function p5get_class_for_method
14:21 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/a96fa40a66
14:22 FROGGS joined #perl6
14:22 jlaire joined #perl6
14:30 Vlavv` joined #perl6
14:37 azawawi_ joined #perl6
14:37 hash_table joined #perl6
14:50 sirrobert joined #perl6
14:52 xinming joined #perl6
14:53 colomon joined #perl6
14:55 cognominal joined #perl6
15:15 brrt left #perl6
15:21 MayDaniel joined #perl6
15:24 dalek nqp: 323c6fa | jnthn++ | src/pmc/owned (2 files):
15:24 dalek nqp: Add some missing provides directives.
15:24 dalek nqp:
15:24 dalek nqp: Fixes parametric role precompilation bug from RT#115240.
15:24 dalek nqp: review: https://github.com/perl6/nqp/commit/323c6fadc8
15:24 tadzik jnthn, jnthn
15:24 tadzik did you have a moment to look at this Bailador-related bug I sent you?
15:27 kresike bye folks
15:28 dalek rakudo-debugger: 68f1a36 | jnthn++ | lib/Debugger/UI/CommandLine.pm:
15:28 dalek rakudo-debugger: Fix off-by-one in tracepoints.
15:28 dalek rakudo-debugger: review: https://github.com/jnthn/raku​do-debugger/commit/68f1a3659b
15:29 cognominal joined #perl6
15:30 am0c joined #perl6
15:34 rindolf joined #perl6
15:40 jnthn tadzik: Is it pre-comp related?
15:40 * jnthn blug: http://6guts.wordpress.com/2012​/10/24/rakudo-debugger-updates/
15:41 masak \o/ jnthn++
15:42 dalek rakudo/nom: 7bc0961 | jnthn++ | tools/build/NQP_REVISION:
15:42 dalek rakudo/nom: Bump NQP_REVISION for a pre-comp fix.
15:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7bc0961ce6
15:52 japhb Oooh, sounds like I actually need to throw some tuits at val/*Str
15:55 am0c_ joined #perl6
15:56 cognominal joined #perl6
15:57 masak <@gitinfo> Yes, if you understand the implications of FETCH_HEAD it can technically be done, but really it is easier to just fetch the whole remote
15:58 masak oops, ww.
15:58 SamuraiJack joined #perl6
16:02 moritz so pmc inheritance doesn't inherit "provides"-directives?
16:02 jnthn moritz: Apparently not.
16:02 jnthn moritz: Surprised me.
16:04 japhb jnthn++ # << >>
16:04 japhb jnthn++ # blog
16:04 japhb jnthn++ # debugger improvements
16:04 japhb :-)
16:05 jnthn Things on my todo list for the coming couple of weeks: quote adverbs, heredocs, interactive mode cleanup (get rid of last remaining .pir source file in NQP on the way, handle native lexicals properly, etc.), try and kill the remaining pre-comp bugs in RT.
16:05 japhb alt.pir.die.die.die
16:06 japhb Sounds like an excellent todo list
16:06 jnthn Oh, and work out the last kinks on my precedence traits work that keep us from passing S06-traits/precedence.t.
16:07 japhb :-)
16:07 jnthn japhb: tuits thrown at val would be awesome :)
16:08 average_drifter joined #perl6
16:08 LoRe joined #perl6
16:08 japhb joined #perl6
16:08 bluescreen10 joined #perl6
16:08 bbkr joined #perl6
16:08 sorear joined #perl6
16:08 stopbit joined #perl6
16:09 cognominal joined #perl6
16:10 rking joined #perl6
16:13 japhb Are there existing tests for the allomorphic types?
16:14 TimToady IntStr does not appear in roast
16:14 phenny TimToady: 05:34Z <diakopter> tell TimToady I think http://rosettacode.org/wiki/Man_or_boy_test#Perl_6 could be improved dramatically in efficiency by putting the assignment to &B (closure creation) inside the else block. Also maybe use ?? !!
16:15 rindolf Hi all.
16:15 jnthn japhb: heh, I just discovered the same as TimToady...
16:15 fgomez joined #perl6
16:16 japhb Will trade implementation for tests.  ;-)
16:16 TimToady phenny: tell diakopter Man_or_boy isn't about efficiency, but correctness.
16:16 phenny TimToady: I'll pass that on when diakopter is around.
16:16 japhb (Hi au!)
16:19 * masak finds himself writing 'my $local_sub = sub { ... };' in Perl 5 nowadays, just because he is so used to lexically scoped subs from Perl 6
16:21 doy (perl 5.18 will be getting real lexical subs!)
16:22 japhb W00t!  doy, that is excellent news.
16:24 masak oh right, it will.
16:24 masak by default, or with 'my sub'?
16:24 doy with 'my sub'
16:24 masak that's what I seemed to recall.
16:28 tadzik jnthn: it is
16:37 jnthn tadzik: I think it's related or same cause as one that's already in RT, iirc.
16:37 jaffa4 joined #perl6
16:37 tadzik mhm
16:38 jnthn dinner, bbl
16:39 rummik- joined #perl6
16:40 diakopter TimToady: ok, but the P6 version is so much slower than the other versions; I thought it needed some help
16:40 phenny diakopter: 16:16Z <TimToady> tell diakopter Man_or_boy isn't about efficiency, but correctness.
16:44 TimToady that's fine, but I just now edited it for a bit more readability; golfing is not something we push in P6
16:45 diakopter ok
16:46 * TimToady is tempted to make the else line read: !! do .() given my &B = { A(--$k, &B, &x1, &x2, &x3, &x4) }
16:46 TimToady but perhaps that multiplying entities
16:47 TimToady *that's
16:47 diakopter that does give the benefit of fewer nail clippings
16:48 TimToady but harder for a newbie to grok, I fear
16:48 cognominal joined #perl6
16:48 masak man or boy is not about newbies being able to grok :P
16:48 diakopter heh
16:48 TimToady there is that too
16:49 TimToady if it's about CS professors being able to grok, then the do/given might look elegant to someone
16:50 moritz /msg jnthn seems I accidentally sent you an email I wanted to send to somebody else. Please just ignore it.
16:50 moritz dammit
16:50 cognominal joined #perl6
16:50 diakopter fyi here is Knuth's way to compute the output without computing it... I got it up to k=4700 before DrRacket ran out of memory (just for the huge integers I guess, not stack space) http://weinholt.se/hacks/man-or-boy.scm
16:50 * moritz not well concentrated today :-)
16:50 diakopter I accidentally accidentally
16:50 TimToady moritz: that's a cute (almost-)autopun
16:51 TimToady if you'd just said "message" instead of "email"...
16:51 moritz TimToady: :-)
16:52 diakopter ..not that I have any clue how to read that Scheme program
16:53 moritz like any other program, really :-)
16:53 diakopter /o\ yes I know my code reading skills are bad :P
17:06 dalek perl6-examples: 3705102 | (Gerhard R)++ | euler/prob021-gerdr.pl:
17:06 dalek perl6-examples: [euler/prob021] add problem 21
17:06 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/37051028f3
17:07 dalek rakudo/nom: 26c0aaa | moritz++ | src/core/stubs.pm:
17:07 dalek rakudo/nom: fix error reporting for not-found dynamic variables
17:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/26c0aaa4bf
17:13 TimToady pnr: my @a = <The quick brown fox>; @a[1,2] .= reverse; say @a;
17:13 p6eval pugs: OUTPUT«Thebrownquickfox␤»
17:13 p6eval ..niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to resolve method reverse in type Parcel␤  at /tmp/qdv5sM8r7p line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4216 (module-CORE @ 579) ␤  at /…
17:13 p6eval ..rakudo 26c0aa: OUTPUT«The brown quick fox␤»
17:15 TimToady pnr: my @a = <The quick brown fox>; say @a[1,2].WHAT
17:15 p6eval pugs: OUTPUT«Array::Slice()␤»
17:15 p6eval ..rakudo 26c0aa, niecza v22-14-g136ddcf: OUTPUT«Parcel()␤»
17:15 TimToady LHF in niecza to get Parcel.=reverse to work, maybe
17:16 supernovus joined #perl6
17:20 supernovus hmm, just updated rakudo, and now when trying to run it, I get this: Serialized data too short to read a version number (< 4 bytes)
17:20 supernovus current instr.: '' pc 981 (src/gen/perl6.pir:346) (src/main.nqp src/gen/main-version.nqp:46)
17:20 moritz supernovus: do you have old, pre-generated PIR files anywhere?
17:21 supernovus Not that it should be loading. I'll do a full distclean and rebuild from scratch.
17:22 am0c_ joined #perl6
17:24 cognominal joined #perl6
17:24 moritz r: class A { has $.name handles <Str>; }; say A.new(name => 'bla')
17:24 p6eval rakudo 26c0aa: OUTPUT«A.new(name => "bla")␤»
17:24 masak diakopter: I believe moritz' comment generalized to all people reading all programs, not you reading all programs.
17:24 diakopter I know; I was kidding
17:24 * moritz too, mostly
17:24 masak diakopter: oh! :)
17:25 moritz IMHO ack and git-grep are invaluable when reading opaque source code
17:26 masak rn: my @a = <The quick brown fox>; @a[2, 3] .= rotate; @a[3] .= ucfirst; say @a
17:26 p6eval niecza v22-14-g136ddcf: OUTPUT«The quick fox Brown␤»
17:26 p6eval ..rakudo 26c0aa: OUTPUT«No such method 'rotate' for invocant of type 'Parcel'␤  in method dispatch:<.=> at src/gen/CORE.setting:940␤  in block  at /tmp/eJ1P16gYJU:1␤␤»
17:26 masak Niecza++
17:26 * masak submits rakudobug
17:26 moritz somehow we have a problem in our type system
17:27 masak I agree-ish.
17:27 TimToady only one?
17:27 moritz if Parcel doesn't automatically get those methods it should have, it means we lack a common role or so
17:27 masak aye.
17:27 moritz TimToady: only one that is obvious from these examples
17:27 supernovus Fwew, 'make distclean && make install' worked.
17:29 TimToady or Parcel should be delegating unrecognized methods to List maybe
17:29 moritz r: class A { has $.name handles <gist>; }; say A.new(name => 'bla')
17:29 p6eval rakudo 26c0aa: OUTPUT«bla␤»
17:31 TimToady possibly delegate to List via Any
17:31 am0c joined #perl6
17:33 fgomez joined #perl6
17:35 moritz http://www.perlmonks.org/?node_id=1000670 # /me couldn't resist a p6 answer to a p5 question
17:38 masak "delegate unrecognized methods"? are you suggesting we reinvent parts of inheritance, badly?
17:38 jaffa4 current compilation speed of rakudo is about 250 lines/s
17:40 masak what was sorear's target? 2000 lines/s ?
17:40 jaffa4 Are you asking me?
17:41 masak I'm asking the room. but if you know, feel free to answer :)
17:41 jaffa4 for niecza?
17:43 arnsholt moritz: I like how you exploit a stable sort. Barring special performance criteria, I think that's perhaps the cleanest approach
17:44 daniel-s_ joined #perl6
17:47 grondilu I'm editing the french Perl6 article and when I was about to mention the synopsis(es),  I noticed there is no copyright or license in them.  Aren't they copyrightd by the Perl foundation or something?
17:54 masak jaffa4: yes, for Niecza.
17:54 jaffa4 masak, what is its speed now?
17:55 masak jaffa4: I don't know. I don't even know which of Niecza and Rakudo parses files faster these days.
17:56 spider-mario joined #perl6
17:59 masak would be an interesting comparison to make.
17:59 moritz grondilu: I'd say it's copyright by the authors, and under the Artistic License 2
18:00 masak ...which, even though it's a software license, probably works fine here...
18:03 FROGGS joined #perl6
18:03 flightrecorder joined #perl6
18:04 jaffa4 niecza gives better error messages
18:04 jaffa4 It noticed an undeclared variable which Rakudo did not notice
18:06 marloshouse joined #perl6
18:07 flussence niecza's repl isn't quite as nice though. or fast to start.
18:09 flussence (I guess that'll change once it gets its own serialisation)
18:09 masak jaffa4: oh! was the variable inside a string?
18:09 jaffa4 yes
18:10 masak oh, phew. known one.
18:10 masak agree about the error messages, though. Rakudo is slowly getting better there.
18:10 masak (as it converges on STD.pm6)
18:10 moritz well, parse errors
18:10 jaffa4 Like a camel?
18:10 moritz I find rakudo's runtime errors generally a bit better
18:10 masak hm, troo.
18:11 supernovus is there a known problem with $socket.read() at the moment?
18:11 moritz supernovus: I think so, yes
18:11 diakopter TimToady: does rosettacode log you out after not very long?
18:11 jaffa4 I wonder if this was called the way of rocket.
18:12 jaffa4 nomen est omen?
18:12 masak jaffa4: you're making very little sense, I'm afraid.
18:13 jaffa4 Rakudo = the way of Camel.
18:13 * TimToady is sorely tempted to allow shadowing of types/methods/etc. only if you shout the scope declarator: MY class Int {...}; HAS method new {...}
18:13 masak jaffa4: are you implying that including the word "rocket" in the name may have made the implementation faster?
18:13 jaffa4 who knows?
18:14 * moritz knows
18:14 TimToady if you polish your car it runs better, everyone knows that :)
18:14 jaffa4 I am playing with the idea
18:14 masak no, no, if you *rename* your car.
18:14 TimToady diakopter: you want to click the remember-me-for-30-days button
18:15 moritz be careful not to rename your care over file system boundaries, that's generally not supported
18:15 diakopter I don't know where to find a Polish car
18:15 jnthn In Poland?
18:15 TimToady diakopter: no, no, just put it into reverse polish
18:15 jnthn TimToady: OH MY...
18:16 diakopter rpn: do {}
18:16 p6eval rakudo 26c0aa, niecza v22-14-g136ddcf, pugs:  ( no output )
18:16 jaffa4 r: print "${b}_somethingelse";
18:16 p6eval rakudo 26c0aa: OUTPUT«===SORRY!===␤Non-variable \$ must be backslashed at line 2, near "${b}_somet"␤»
18:16 jnthn TimToady: We could always spell MY as supercede or something... :)
18:16 cognominal joined #perl6
18:17 jaffa4 r: print "{${b}}_somethingelse";
18:17 p6eval rakudo 26c0aa: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name␤at /tmp/h41clHX8WL:1␤»
18:17 jaffa4 r: print "{$b}_somethingelse";
18:17 p6eval rakudo 26c0aa: OUTPUT«===SORRY!===␤Variable $b is not declared␤at /tmp/62fqCQdhsc:1␤»
18:17 jnthn jaffa4: {$b} is what you're looking for.
18:17 TimToady except supercede is supposed to be a globalish thing, just as augment is supposed to augment for everyone
18:17 jnthn TimToady: Hm, true
18:17 jaffa4 jnthn: ok
18:18 diakopter C# calls it non-sealed
18:18 jnthn std: ${b}
18:18 p6eval std 64edd1c: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of ${b}; in Perl 6 please use $b at /tmp/mNaWkBi1io line 1:�------> [32m${b}[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 41m�»
18:18 diakopter wait.
18:18 TimToady I think it'd be good to mark intent to override/shadow somehow, and it needs to be something that is not as dehuffmanized as "is override"
18:18 diakopter scratch that last. stupid today.
18:18 moritz rats, cats, seals
18:19 jnthn Hm, where on earth does STD emit that message from...
18:19 jnthn TimToady: The problem with putting anything like this in a trait is that by the time we see the trait it's kinda too late.
18:19 diakopter jnthn: I found it the other day...
18:19 jnthn diakopter: I was expecting it to be in variable...
18:19 jnthn std: my $b; say ${b}
18:19 p6eval std 64edd1c: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of ${b}; in Perl 6 please use $b at /tmp/uK6FCbtjLn line 1:�------> [32mmy $b; say ${b}[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 42m�»
18:20 diakopter 'new' preface?
18:20 diakopter .m/e ducks
18:20 * diakopter ducks
18:21 TimToady jnthn: line 2351 or so
18:21 masak <jnthn> TimToady: We could always spell MY as supercede or something... :)
18:21 masak jnthn: this was what I thought, too!
18:21 moritz regex special_variable:sym<${ }> {
18:21 TimToady but there are good reason to shadow a parent's method if you're doing it on purpose
18:22 TimToady we just need to capture intent
18:22 moritz for methods it's very common
18:22 moritz for built-in classes less so
18:22 masak for methods it's the default.
18:22 masak if I didn't want shadowing, I'd declare my methods multi.
18:23 masak I'm not sure I agree about a strong parallel between method shadowing and class shadowing, actually.
18:23 masak they work in different scoping dimensions, for one.
18:23 TimToady but see "regex new"
18:23 masak not even sure I want to solve that problem.
18:23 moritz well, the problem is that people seem to think that regexes live in some kind of other dimension than methods
18:24 masak just make it behave not too confusingly when people do declare a 'new' rule...
18:24 moritz it's mostly an educational problem, IMHO
18:24 masak TimToady: we used to have a *much* bigger namespace exposed through grammars (in Rakudo), and it was hurting us.
18:24 TimToady yes, outlaw it unless they declare intent to shadow
18:24 masak today, not so much. 'new' is an exception, I think.
18:25 masak TimToady: outlaw seems to have been diakopter's line yesterday.
18:25 moritz methods from Any used to cause problems. Now it's only Mu
18:26 * masak .oO( get rid of those top types of the type hierarchy, they're just causing problems ) :P
18:26 moritz yeah, let's run on category theory instead
18:30 * masak .oO( your distaste of type hierarchies is an instance of the free monoid )
18:32 sorear o/
18:33 PerlJam It's too bad "new" isn't spelled "NEW" (or something else less likely to be used by ordinary unsuspecting folk
18:33 PerlJam )
18:34 arlinius joined #perl6
18:34 masak sorear! \o/
18:35 masak sorear: what's the parsing speed, in lines/s, of Niecza nowadays?
18:35 flussence .oO( that should be cycles per line... )
18:38 bapa joined #perl6
18:43 sorear dunno
18:46 cognominal joined #perl6
18:46 am0c joined #perl6
18:52 dalek rakudo/nom: 0e866af | jnthn++ | src/Perl6/Grammar.pm:
18:52 dalek rakudo/nom: Better error for ${whale}.
18:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0e866afb33
18:59 leont joined #perl6
19:00 snearch joined #perl6
19:01 leont joined #perl6
19:12 proller joined #perl6
19:14 proller joined #perl6
19:14 skids joined #perl6
19:18 proller joined #perl6
19:19 bbkr whoever_invented_Failure_type++ # this is very useful part of language
19:19 azawawi joined #perl6
19:19 azawawi hi
19:19 azawawi jnthn: ping
19:22 masak bbkr: I'm still a little afraid of Failure and its semantics. seems to me the idea behind it is to separate the error reporting from where the error happened. though to be honest, I haven't yet been burned by it, or seen someone else get burned by it.
19:24 moritz well, occasionally it has burned me, because we don't have sink context yet
19:24 moritz and thus occasionally a Failure is silent that shouldn't be
19:27 moritz maybe with QAST now being firmly in place, I should take another stab at sink context
19:28 bbkr masak: my use-case takes place in JSON::RPC::Client. when one request fails it throws exception of specific type, for example JSON::RPC::Error::InvalidParams. but JSON-RPC also has something called batches and client may get array of responses, some of them may be ok but some should be converted to exceptions. Failure allows to implement clean way of catching them while iterating over response results, like @response = $client.some_batch_call(); for @response -> $res
19:28 bbkr ponse { try { $response.perl.say; CATCH { when JSON::RPC { say "ooops" } } }
19:29 bbkr so in general failure is handy when you have exceptions in some kind of data structure
19:30 bbkr i'm not sure what "sinks" are, but in my case Failure did the trick
19:30 masak why wouldn't plain exceptions work here?
19:31 masak sinks are what's called "void context" in Perl 5.
19:31 azawawi phenny: tell jnthn web-based rakudo debugger api are a great idea. Hopefully i could integrate them into Padre and Farabi6 :)
19:31 phenny azawawi: I'll pass that on when jnthn is around.
19:31 masak that is, you call something without doing anything with the return value.
19:31 bbkr because exception object retuned somewhere in array cannot throw himself when accessed
19:32 azawawi tadzik: ping
19:32 tadzik azawawi: pong
19:33 jnthn azawawi: pong
19:33 phenny jnthn: 19:31Z <azawawi> tell jnthn web-based rakudo debugger api are a great idea. Hopefully i could integrate them into Padre and Farabi6 :)
19:33 jnthn azawawi: Yes, the idea is if it's a web based API everybody can integrate :)
19:33 azawawi tadzik: suppose panda install Some::Module breaks down because of a new commit at Some::Module
19:33 azawawi tadzik: like what happened to me just now (Farabi6.... because of HTTP::Easy)
19:34 tadzik yeah, that sometimes happens :)
19:34 wollmers joined #perl6
19:34 azawawi tadzik: is there a way to install it from another github? :)
19:34 tadzik hmm
19:34 tadzik you can install from a local directory
19:34 cognominal joined #perl6
19:34 tadzik or tune your ~/.panda/projects.json
19:34 azawawi what the command for that?
19:34 tadzik panda install ./path/
19:35 wollmers hi all
19:35 tadzik hello wollmers
19:37 * grondilu made a lot of changes on the french perl6 wikipedia article.  Check it out if you speak/understand french.
19:37 masak wollmers: long time no see.
19:38 azawawi tadzik: q{panda --help} no tell me that :)
19:38 sorear hi wollmers.  do I know you?
19:39 azawawi tadzik: any chance you could add that info to panda --help ?
19:39 wollmers Sometimes I would like to use a prolog-like style to describe problems in Perl. Does Perl6 support this paradigma (rule-based, logic programming) or are there plans to do it?
19:39 masak grondilu: under "Types de données", I think the type names should all start with a capital letter: Int, Num, Str.
19:39 tadzik azawawi: I don't know. Can you? :P
19:39 tadzik sure I can
19:40 masak wollmers: you can already exploit the regex engine for Prolog-like semantics.
19:40 masak wollmers: by having it bracktrack on failure.
19:40 azawawi tadzik: thx
19:40 grondilu masak: ok but native types are types as well.
19:41 masak sure.
19:41 masak but I'm not sure we have a 'str'.
19:41 tadzik azawawi: I'll just open a ticket for now
19:41 jnthn masak: Rakudo is fairly sure it has one ;)
19:42 wollmers masak: Yes, regexes can backtrack. But what's about the 'or' (alternative rules) and bidirectional parameters?
19:42 masak grondilu: sub faire_quelquechose(Str $chose, Int $autre) { ... } # the _ is not visible on the Wikipedia page
19:42 masak wollmers: regexes have | and || for 'or'
19:42 masak wollmers: I don't know offhand what could emulate bidi params.
19:42 masak grondilu: same with my_split further down.
19:42 zby_home joined #perl6
19:43 masak rn: class Point is rw { has $.x }; my Point $p .= new; say $p.x = 42
19:43 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Unhandled trait rw for this context at /tmp/WoR1BfgyH7 line 1:â�¤------> [32mclass Point is rw [33mâ��[31m{ has $.x }; my Point $p .= new; say $p.[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE…
19:43 p6eval ..rakudo 0e866a: OUTPUT«42␤»
19:43 wollmers masak: OK, maybe I should try typical Prolog examples in Perl6-rules.
19:44 masak sorear: ^^
19:44 masak wollmers: that would be cool/helpful.
19:44 grondilu masak: I can see the underscores, but ok I'll change to single dash
19:44 masak grondilu: for some reason they don't show up here.
19:44 sirrobert joined #perl6
19:45 azawawi so basically LWP::Simple is not so simple to install via panda :)
19:46 masak "Expressions rationnelles". huh. had I had to guess what the translation is in French, I would've guessed "régulières"
19:46 masak though "fermetures" is spot on, and cute :)
19:46 masak as is "contrôle de flot" :D
19:47 masak rn: my int @integers = 0..Inf; say "alive"
19:47 p6eval rakudo 0e866a: OUTPUT«No such method 'STORE' for invocant of type 'Int'␤  in block  at /tmp/jzOT2iXzlt:1␤␤»
19:47 p6eval ..niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed my at /tmp/AgFEfHLbPl line 1:�------> [32mmy[33m�[31m int @integers = 0..Inf; say "alive"[0m��Parse failed��»
19:47 masak grondilu: ^ this is probably not a good example.
19:48 eiro http://tablets.perl6.org/appendix-e-exciting.html is there an error there ?
19:48 eiro @content = lines "poetry.txt";
19:48 grondilu rn: my int @ = 0 .. *;
19:48 masak "jonctions"! :D
19:48 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed my at /tmp/CxvNG8GE1I line 1:�------> [32mmy[33m�[31m int @ = 0 .. *;[0m��Parse failed��»
19:48 p6eval ..rakudo 0e866a: OUTPUT«No such method 'STORE' for invocant of type 'Int'␤  in block  at /tmp/yh3vk5r3hC:1␤␤»
19:49 eiro .say for lines "/etc/passwd"; # it says "/etc/passwd"
19:49 masak grondilu: for some reason, the underscore in get_tint is visible.
19:49 grondilu masak: I don't know about that.
19:49 eiro rn: lines "/etc/passwd"
19:49 p6eval rakudo 0e866a, niecza v22-14-g136ddcf:  ( no output )
19:49 masak grondilu: for all(@array) { ...} # this is copied from the English Wikipedia page. just as wrong there. that's never going to work.
19:49 eiro rn: lines("/etc/passwd").join("")
19:49 p6eval rakudo 0e866a, niecza v22-14-g136ddcf:  ( no output )
19:50 masak eiro: 'say'
19:51 masak eiro: also, please don't give actually malicious people too many ideas...
19:51 grondilu not even in future?
19:51 masak grondilu: not even in future.
19:51 grondilu masak: ^
19:51 mathw hello hello
19:51 grondilu ok
19:51 masak grondilu: it's a big misunderstanding of parallelism. please remove it.
19:51 masak mathw! \o/
19:52 eiro haha :) sorry masak: it was just the example i use on my own system :)
19:52 masak grondilu: junctions autothread, but you won't get a parallel for loop by looping over a junction. you'll just get autothreading and a loop over one element.
19:52 masak eiro: I don't know if the risk is actually that big here. but better safe than sorry. :)
19:53 eiro yep
19:53 grondilu masak: removed.  Do you have an example of parallelism with junctions?
19:53 masak grondilu: I think 'hyper for @normal_array { ... }' is the syntax.
19:53 masak grondilu: junctions are meant to be (potentially) parallel by default.
19:53 eiro btw: i'm unable to use lines
19:54 sirrobert grondilu:  Just FYI, the hash in your META.info for SSL is malformed (https://raw.github.com/grondi​lu/openssl/master/META.info)
19:54 phenny sirrobert: 20 Oct 10:13Z <moritz> tell sirrobert https://raw.github.com/sirrobert/Se​mantic-Versioning/master/META.info has a space in "name ":, that's no good
19:54 havenn joined #perl6
19:54 sirrobert Thanks, phenny-- I fixed that =)
19:54 sirrobert ;)
19:55 mathw hi masak, everyone
19:55 sirrobert hallow mathw
19:56 jnthn eiro: lines on a string just splits the string into its lines.
19:56 jnthn eiro: Pass it an IO object if you want it to read the lines from that.
19:56 cognominal joined #perl6
19:56 rafl joined #perl6
19:56 grondilu sirrobert: I don't see what's wrong in it
19:56 sirrobert grondilu: you have... "source-url" : "git@github.com:grondilu/openssl.git"
19:57 sirrobert I think the format should use: "git://github.com/sirrobert/Masquerade.git"
19:57 sirrobert (I wasn't able to install the SSL module, anyway, and I think that's the issue)
19:57 sirrobert if not, ignore me =)  just in case it's helpful.
19:57 tadzik anyone planning to go to GPW 2013? It's in Berlin
19:59 eiro jnthn, that's what i tried to say: the exemple is not good
19:59 sirrobert too long a drive this year, tadzik =)
19:59 grondilu sirrobert: edited and pushed on github
19:59 eiro (i think)
19:59 sirrobert grondilu: cool
20:00 eiro also there is an unfair comparaison with perl5
20:00 eiro $a = defined $b ? $b : $c;                      $a = $b // $c;
20:00 grondilu sirrobert: If you're interested in this module, be aware that it doesn't work with non-ascii strings.  I wasn't able to fix that.
20:00 sirrobert grondilu: thanks for the heads-up ... I was just looking around for now.
20:00 masak tadzik: when is it?
20:01 tadzik masak: 13-15 of March
20:02 eiro is there a documentation that compares perl5 and perl6 the way the coffeescript does? ( http://coffeescript.org/ )
20:02 eiro it would be really usefull for perl5 programmers
20:02 masak tadzik: sounds possible, although $future is a bit hazy right now.
20:03 masak eiro: I once saw such a document in the Pugs repo, yes.
20:03 masak eiro: maybe it's in the Mu repo now.
20:04 wollmers masak: Looking at http://rosettacode.org/wiki/Fibonacci_sequence the Perl6-recursive using multi looks better then the Prolog example. But what's about http://maheshexp.wordpress.com/2006​/09/23/symbolic-computation-differe​ntial-calculus-using-prolog-part-2/ for example written by a Perl6 expert?
20:04 havenn joined #perl6
20:04 Su-Shee in case some of you are planning THE ULTIMATE TESTING FRAMEWORK: http://www.amd64.org/support/aut​omated-test-infrastructure.html (Perl..)
20:05 eiro if someone confirms it's an error: i fix the tablets repo
20:06 diakopter eiro: it appears the coffeescript comparisons compare the coffeescript input to what JS the coffeescript compiler outputs. Why would Perl 5 be on there for Perl 6?
20:07 eiro diakopter, it's just about the 2 colums rendering
20:08 masak Su-Shee: that looks... rather impressive.
20:08 sirrobert r: class A { }; role B { }; say (A does B).new.perl;
20:08 p6eval rakudo 0e866a: OUTPUT«Cannot use 'does' operator with a type object.␤  in sub infix:<does> at src/gen/CORE.setting:11788␤  in block  at /tmp/hEaw7fiCwK:1␤␤»
20:08 eiro http://tablets.perl6.org/appendix-e-exciting.html < diakopter this is closer in terms of content
20:08 Su-Shee masak: we're actually speechless next door.. it looks like the candy store of testing and it's some serious perlish perl, moose based, good use of modules, readable code from what I see while browsing around..
20:09 sirrobert What's the best way to create an instance of an object doing a certain role before passing in constructor params?
20:09 eiro (but i really would like to be more fair with perl5)
20:09 sirrobert r: my %p = (a=>1); class A { }; role B { }; say (A does B).new(|%p).perl;
20:09 p6eval rakudo 0e866a: OUTPUT«Cannot use 'does' operator with a type object.␤  in sub infix:<does> at src/gen/CORE.setting:11788␤  in block  at /tmp/p0cIolgIha:1␤␤»
20:09 Su-Shee masak: and it's... VAST (I think :)
20:11 jnthn sirrobert: Try "but" there.
20:11 sirrobert r: my %p = (a=>1); class A { }; role B { }; say (A but B).new(|%p).perl;
20:11 p6eval rakudo 0e866a: OUTPUT«A+{B}.new()␤»
20:11 sirrobert huh, ok
20:11 jnthn Maybe the error should say that :)
20:11 sirrobert heh
20:11 jnthn sirrobert: does mutates an existing object.
20:11 jnthn sirrobert: You can't mutate a type object.
20:12 sirrobert ok, I was using "but" and "does" slightly differently
20:12 sirrobert with a different interpretation (that worked =)
20:12 sirrobert thanks
20:13 jnthn sirrobert: If you didn't already see it, http://6guts.wordpress.com/2012​/10/24/rakudo-debugger-updates/
20:13 masak Su-Shee: looking at the CPAN Pod right now. cool.
20:13 sirrobert aha!  great
20:13 sirrobert jnthn++: thanks
20:14 Su-Shee masak: I'm installing heavily :)
20:14 armitage81 joined #perl6
20:14 sirrobert jnthn: I have the 2012-09 rakudo star installed... how do I get the updated debugger?
20:14 masak https://metacpan.org/release/Task-BeLike-AMD # of *course* I want to be like AMD!
20:15 birdwindupbird joined #perl6
20:15 Su-Shee masak: Task::Tapper installs the whole shebang (I think..)
20:15 wollmers Su-Shee: also https://github.com/ingydotnet/testml-pm -- a portable test case language (usable across programming languages) looks like a nice idea. That way it would be possible to have one set of test cases (e.g. for some standard like Unicode).
20:16 jnthn sirrobert: Easiest way: wait a couple of days for this month's R* release :)
20:16 sirrobert jnthn: heh, deal
20:16 Su-Shee wollmers: I wasn't actively looking, I just gotting pointed to this Tapper thingie and were impressed so I spread it :)
20:16 tadzik so, what is this Tapper thing all about?
20:17 sirrobert jnthn: have you put any thought to a good way to add breakpoints to code in file (rather than in debugger-runtime)?
20:17 fibo joined #perl6
20:18 jnthn sirrobert: I'm wondering about trying to hijack comments in some way.
20:18 Su-Shee tadzik: well it looks like the ultimate testing framework infrastructure thingie with EVERYTHING.
20:19 Su-Shee tadzik: I can't really tell yet, it still installs
20:19 masak tadzik: oh, just a very awesome-looking big testing framework that AMD built.
20:19 tadzik a central TAP database
20:19 tadzik so like CPANTesters? :)
20:19 armitage81 joined #perl6
20:19 tadzik Internally it is based on technology known from the CPAN testing infrastructure, extending it with automation and advanced querying.
20:19 tadzik fair enuff
20:19 tadzik LIKE
20:19 tadzik I want that for emmentaler :)
20:19 sirrobert jnthn: yeah...  I had an idea that you might make a Perl6::Debug module that exports "bp", "tp" functions (or maybe proto functions?) then handle them specially in the debugger.
20:20 Su-Shee tadzik: skim throught it, much more I think. it looks like everything from running, queueing, setting up, spreading, reporting
20:20 armitage81 joined #perl6
20:20 masak tadzik: engage stealing mode. :D
20:20 jnthn sirrobert: That's another option. But I'm not so keen on it.
20:20 sirrobert jnthn:  I think it would be important for the debugger keywords to have very short names
20:20 sirrobert jnthn:  Why's that?
20:20 masak for future IRC archaeologists: I wasn't talking about *actual* stealing. just open source.
20:21 * masak sometimes feels the future backlogging him, and gets fidgety
20:21 jnthn sirrobert: If you are debugging a module, you may add Perl6::Debug. Then you ship your module, accidentally leaving the use declaration in. Somebody tries to install it and boom.
20:21 jnthn Unless they have Perl6::Debug too, then it's just a wasted module load.
20:21 masak not fidgety as in cleptomaniac, just mildly uncomfortable. :P
20:22 sorear plaigerize!...that's why God gaveyoueyes!...but call it reasearch
20:22 masak Lehrer++
20:22 eiro 'night perl6 people
20:22 jnthn o/ eiro
20:23 jnthn sirrobert: How would something like:
20:23 jnthn #?bp
20:23 sirrobert jnthn:  it wouldn't break though, would it?  If you defined things like:  sub bp () {}
20:23 jnthn #?tp "foo is $foo"
20:23 jnthn And the like?
20:23 sirrobert jnthn:  yeah, that would work
20:23 jnthn I mean, the way I implement things I can go peeking at comments.
20:23 sirrobert jnthn: cool; I think that's plenty short
20:24 jnthn sirrobert: I'm worried about people shipping code that accidentally depends on a debugger, or having to remember to add the declaration, or importing short names that may collide with other things they want short names for in their domain.
20:24 sirrobert jnthn:  also, if it's easy (I see you already know what line you're executing), is it possible to add line numbers before each line of code?
20:24 * sorear thinks it's _k_leptomaniac
20:24 sirrobert jnthn: that makes sense
20:25 sirrobert s/possible/easy/
20:25 jnthn sirrobert: I was hoping the range it gives you just above the code snippet was enough.
20:25 sirrobert jnthn:  it is... but I code with line numbers, so it takes some extra cognitive work =)  Maybe a ENV setting?
20:26 cognominal joined #perl6
20:26 jnthn I suspect it's only so long before the debugger gets things that people want to configure, yeah...
20:26 masak sorear: I think you're right.
20:26 * masak checks the etymology
20:26 sirrobert jnthn: better than an env var, actually, would be a conf file (~/.perl6-debug, or the like)
20:26 masak sounds Greek.
20:27 jnthn sirrobert: Yeah
20:27 sirrobert jnthn:  anyway, thanks a LOT.  Most useful ecosystem add-on for me so far.
20:27 jnthn sirrobert: Feel free to file an issue about the line number thing you want.
20:27 diakopter lolz IRC archaeologists
20:27 jnthn I'm reluctant to make it the default, but I can quite happily do it as an option.
20:28 jnthn (it's not hard)
20:28 kurahaupo joined #perl6
20:28 masak both "kléptēs" and "manía" are Greek, originally. "theft madness".
20:28 sirrobert jnthn: cool, will do.
20:28 masak or "thief madness", more exactly.
20:29 sirrobert jnthn: if I have some cycles, would you want me to fork/modify/pull-request?
20:29 sirrobert or prefer that I just add issues?
20:29 jnthn sirrobert: If you want to contribute code also, that's fine :)
20:29 sirrobert cool =)
20:31 TimToady 'kléptō' means "I steal"
20:32 kurahaupo κλεπτψ?
20:32 TimToady that's a psi, not an omega
20:32 jnthn .oO( gee, that's some really messed up cyrill...oh, wait... )
20:32 sorear needs more diacriticals
20:34 masak TimToady: dictionary.com had the word coming from grc:'kleptes', en:'thief'.
20:34 kurahaupo ooops, that'll teach me to touch-type on a USA-ASCII keyboard: the ψ and ω are on the (adjacent) C & V keys
20:34 sorear masak: Your strange neologism for today is "kleptography"
20:35 masak 'thief writing'?
20:35 masak I like it, but I have no idea what it means :)
20:35 kurahaupo bad cheques?
20:36 masak :D
20:36 sorear nothing to do with the crime which is known in the US as "mail fraud", either
20:37 kurahaupo the process of writing a keylogger?
20:43 TimToady masak: a better translation of kleptes might be "stealer", since they didn't keep a separate word for it as English does
20:44 TimToady and my gut feeling is that the verb is the more basic
20:45 masak I'll take your word for it.
20:46 masak that "-es" ending, is it productive in ancient Greek?
20:46 cognominal joined #perl6
20:47 PerlJam many years from now someone will be reading the encyclopedia galactica and find an entry that reads "because Larry Wall said so"
20:47 TimToady it's just a typical noun ending
20:48 diakopter reading will exist in the future?
20:48 sorear diakopter: Yes
20:48 TimToady we can't have readonly variables without it
20:48 PerlJam diakopter: perhaps it will be more like "thought transcription" but we'll call it reading anyway
20:48 sorear Whatever the dominant means of paging information into your local storage is, it will be called reading
20:49 Pompel_ joined #perl6
20:49 PerlJam sorear: we'll have pages in the future?  ;)
20:49 sorear also, I suspect history will remember TimToady mostly as the author of patch(1) :/
20:49 TimToady yes, you have it right, and the SF authors have it wrong: they always make up a new word for the thing, and what people do is just reuse the old word
20:50 sorear TimToady: to be fair I never gave it any thought until Gloria++ brought up newsletters and mailboxes cerca YAPC::Europe
20:50 TimToady sorear: well, whether they remember me for patch may depend on whether you finish niecza :D
20:50 masak Gloria++
20:51 masak what's funny about words being re-used is that you can spend the whole future making puns between the old meanings and the new.
20:51 PerlJam sorear: that's tantamount to saying that they'll forget Perl
20:51 TimToady they'll forget patch too :)
20:52 masak "Did you check your *mailbox*. No, not that one!" <laughter>
20:52 diakopter patch? you mean that thing git does?
20:52 PerlJam TimToady: you only think that people reuse words because you keep using Perl for different things  ;>
20:52 masak diakopter: that's either mean or funny :)
20:52 TimToady masak: the two are not mutually exclusive
20:52 diakopter masak: or ignorant
20:53 masak diakopter: right.
20:53 TimToady I dunno
20:53 masak but "darcs" would've been more apt than "git", because git calls'em "commits".
20:53 PerlJam diakopter: in a way you're right.  There are a number of people who come to #git asking is there's a way to apply a patch without git.
20:53 PerlJam s/is/if/
20:53 mathw 'patch'? :)
20:54 PerlJam mathw: oddly, that's always the answer.
20:54 mathw I wonder why...
20:54 masak well-named command.
20:55 * geekosaur *eyeroll*
20:55 diakopter masak: I didn't intend to be hurtful/mean
20:55 geekosaur (probably not eyerolling as hard as TimToady is...)
20:55 sorear diakopter: apparently TimToady was one of the first people to think of using diff output as programmatic instructions for _robustly_ modifying source code
20:56 TimToady masak: diakopter was merely channelling the naive user there, but forgot the quotes
20:56 sorear diakopter: then a few years later someone else wrote a couple of shell scripts on top of patch, called it the Concurrent Versioning System, and the rest is history
20:56 diakopter yes. it was a joke. :D
20:56 masak diakopter: don't worry, I saw what you were doing. :)
20:56 PerlJam sorear: parsing diff output was harder back then.  TimToady was the only one crazy enough to do it ;)
20:57 TimToady I was the only one who didn't think, "Gee, if I want to automate this, I'd just use 'diff -e' to spit out an ed script."
20:57 TimToady I suspect if diff hadn't had the -e option, someone would have written patch much earlier
20:58 sorear yeah but diff -e generates _line numbers_
20:58 sorear I think the real genius of patch is --fuzz
20:58 TimToady no it doesn't
20:58 grondilu rn: say 4668235368676520077888364252103.is-prime
20:58 p6eval rakudo 0e866a, niecza v22-14-g136ddcf: OUTPUT«False␤»
20:59 grondilu rn: say my @ = 4668235368676520077888364252103.is-prime
20:59 p6eval rakudo 0e866a, niecza v22-14-g136ddcf: OUTPUT«False␤»
20:59 grondilu shouldn't it give me the list of prime divisors in list context?
20:59 TimToady no, since it doesn't know them
21:00 sorear TimToady: GNU diffutils 2.8.1 on Mac OS X 10.7.5 with the basic -e option produces commands like 7,15c
21:00 TimToady that's an ed script
21:00 sorear did pre-GNU diffs produce regex output?
21:01 PerlJam grondilu: wouldn't that be called something more like "factor" ?
21:01 masak PerlJam++
21:03 grondilu indeed, my bad
21:04 grondilu (still, is-prime could do its best and give me some, if not all)
21:05 flussence rn: sub prefix:<h>(\string) { string.trans(« < > & " » => <&lt; &gt; &amp; &quot;>) }; h'<blink>'
21:06 flussence rn: sub prefix:<h>(\string) { string.trans(« < > & " » => <&lt; &gt; &amp; &quot;>) }; say h'<blink>'
21:06 p6eval rakudo 0e866a, niecza v22-14-g136ddcf:  ( no output )
21:06 p6eval rakudo 0e866a, niecza v22-14-g136ddcf: OUTPUT«&lt;blink&gt;␤»
21:07 sirrobert r: role B { }; role C { }; class A does B does C { }; say A.new.^mro;
21:07 p6eval rakudo 0e866a: OUTPUT«A() Any() Mu()␤»
21:07 sirrobert What manner of introspection sorcery can I do to see that A.new has roles B and C?
21:07 sorear grondilu: is-prime uses the Rabin-Miller probabilistic primality test, which does not produce *any* prime factors in the vast majority of casxes
21:08 flussence star: use URI::Escape; sub prefix:<%>(\string) { uri_escape(string) }; say %'oranges & lemons'
21:08 p6eval star 2012.07: OUTPUT«===SORRY!===␤Malformed parameter␤at /tmp/6idibSzeUe:1␤»
21:08 grondilu sorear: ok
21:08 sirrobert r: role B { }; role C { }; class A { submethod BUILD { self does B; self does C; }; say A.new.^mro;
21:08 p6eval rakudo 0e866a: OUTPUT«===SORRY!===␤Unable to parse expression in block; couldn't find final '}' at line 2, near ""␤»
21:08 TimToady grondilu: that is not the job of is-prime, and you really want something more like http://rosettacode.org/wik​i/Count_in_factors#Perl_6
21:08 sirrobert r: role B { }; role C { }; class A { submethod BUILD { self does B; self does C; } }; say A.new.^mro;
21:08 p6eval rakudo 0e866a: OUTPUT«A+{B}+{C}() A+{B}() A() Any() Mu()␤»
21:08 sirrobert for some reason it works for that version, but not for the other ...
21:09 flussence star: use URI::Escape; sub prefix:<ue>(\string) { uri_escape(string) }; say ue'oranges & lemons'
21:09 p6eval star 2012.07: OUTPUT«===SORRY!===␤Malformed parameter␤at /tmp/z8Y9HxeGIa:1␤»
21:09 flussence oh.
21:09 flussence star: use URI::Escape; sub prefix:<%>($string) { uri_escape($string) }; say %'oranges & lemons'
21:09 p6eval star 2012.07: OUTPUT«oranges%20%26%20lemons␤»
21:09 flussence wait, that ain't right...
21:10 flussence q{ } should translate to q{+}, according to this source code...
21:11 sorear grondilu: note, the rabin-miller test runs in time Õ( N**2 ) where N = chars($num.base(2))
21:12 sorear the best known algorithm that _does_ give a factor runs in time O( exp(cbrt(N)) )
21:12 sorear also, it's based on maths that I don't understand D:
21:12 diakopter rn: sub prefix:<h . >(\i) { i }; say h.h.h.h.5
21:12 p6eval rakudo 0e866a: OUTPUT«===SORRY!===␤Confused␤at /tmp/CYeOn2v66d:1␤»
21:12 p6eval ..niecza v22-14-g136ddcf: OUTPUT«5␤»
21:13 masak waitwait. math that sorear doesn't understand? o.O
21:14 thou joined #perl6
21:14 sorear the general number field sieve is... something
21:16 diakopter rn: sub postfix:< >(\i) { i*2 }; say 5
21:16 p6eval niecza v22-14-g136ddcf: OUTPUT«(timeout)»
21:16 p6eval ..rakudo 0e866a: OUTPUT«5␤»
21:16 havenn Started going through Perl6 book porting code to Ruby, just to learn. Was surprised how similar they look to each other: https://gist.github.com/3928203
21:16 telex joined #perl6
21:16 diakopter sorear: timeout ^^
21:20 masak havenn: nice!
21:20 masak havenn: wow, but 'Hash.new 0' looks weird from a Perl 6 perspective. I read it and think "hey, that's two terms in a row!"
21:21 flussence .oO( but that's an Array! )
21:21 masak havenn: you're right -- the two look very similar in structure and syntax.
21:21 UncleFester6 joined #perl6
21:21 havenn masak: Hrmm, yeah, could have made that one line (@matches = @sets = Hash.new(0)) or @matches = {}; @matches.default 0
21:22 havenn masak: In Ruby somehow you've got to get the default value of the Array set, or it won't add. :)
21:23 diakopter rn: sub postfix:< >(\i) { i+i}; sub prefix:<(>(\i){i*i}; sub postfix:<)>(\i){i+4}; sub postfix:<(>(\i){i-4}; say ((((((5)()))((())(()))))(
21:23 p6eval niecza v22-14-g136ddcf: OUTPUT«(timeout)»
21:23 p6eval ..rakudo 0e866a: OUTPUT«4188271851027274266670020743752976432915​773724299403513508038881183728210190544679681␤»
21:23 masak havenn: oh! default.
21:23 masak havenn: I thought it was the initial length, which seemed a bit redundant.
21:24 masak havenn: in Perl 6, the default is whatever the first operation is. if it's '+=', the default is 0.
21:24 havenn masak: Yeah, too many classes have += in Ruby, so it doesn't know what you're trying to do.
21:26 diakopter masak: too bad it won't let me prefix<)>
21:27 masak havenn: right. Perl is operator-oriented, so it knows infix:<+> is to do with numbers.
21:28 diakopter why aren't *fix:<here> regexes at here
21:28 shmup joined #perl6
21:28 masak why should they be? you're declaring names.
21:30 armitage81 joined #perl6
21:31 masak good night, #perl6
21:52 havenn The Pythonista version looks nothing at all like Perl6 or Ruby >.>: https://gist.github.com/3928203
21:55 UncleFester6 left #perl6
22:04 jnthn sleep &
22:08 whiteknight joined #perl6
22:08 wknight8111 joined #perl6
22:08 wknight_ joined #perl6
22:22 havenn joined #perl6
22:25 hash_table joined #perl6
22:26 * grondilu just watched an interesting video with a guy saying "code is art":  http://www.youtube.com/watch?v=6akcfoJ05Aw
22:36 Moukeddar joined #perl6
22:58 tokuhiro_ joined #perl6
23:06 gdey joined #perl6
23:18 thou joined #perl6
23:35 hypolin joined #perl6

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

Perl 6 | Reference Documentation | Rakudo