Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-03-26

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:13 LlamaRider joined #perl6
00:14 xantamoc left #perl6
00:27 dalek Heuristic branch merge: pushed 17 commits to nqp/vmarray-list by arnsholt
00:33 xinming_ joined #perl6
00:50 leprevost joined #perl6
00:52 lustlife joined #perl6
01:13 dalek rakudo/vmarray-list: 696b0f5 | (Arne Skjærholt)++ | src/Perl6/Metamodel/ClassHOW.pm:
01:13 dalek rakudo/vmarray-list: Explicitly numify a list in Metamodel/ClassHOW.pm,
01:13 dalek rakudo/vmarray-list: review: https://github.com/rakudo/rakudo/commit/696b0f5920
01:13 dalek rakudo/vmarray-list: bfa0b9a | (Arne Skjærholt)++ | src/Perl6/World.pm:
01:13 dalek rakudo/vmarray-list: Make an nqp::list into an nqp::list_s in Perl6/World.pm.
01:13 dalek rakudo/vmarray-list: review: https://github.com/rakudo/rakudo/commit/bfa0b9ae73
01:13 dalek rakudo/vmarray-list: 5e00152 | (Arne Skjærholt)++ | src/ (13 files):
01:13 dalek rakudo/vmarray-list: Change all instances of nqp::join to NQP's join sub.
01:13 dalek rakudo/vmarray-list:
01:13 dalek rakudo/vmarray-list: This is because nqp::join maps to pir::join, which will only work with a
01:13 dalek rakudo/vmarray-list: list_s and not anything else, due to how pir::join works internally. Longer
01:13 dalek rakudo/vmarray-list: term, we may want to implement a smarter nqp::join and revert this commit.
01:13 dalek rakudo/vmarray-list: review: https://github.com/rakudo/rakudo/commit/5e00152e14
01:13 dalek rakudo/vmarray-list: 6105cc6 | (Arne Skjærholt)++ | src/Perl6/Actions.pm:
01:13 dalek rakudo/vmarray-list: Make named_names and type_captures in Actions.pm list_s.
01:13 dalek rakudo/vmarray-list: review: https://github.com/rakudo/rakudo/commit/6105cc6f04
01:15 hypolin joined #perl6
01:30 cognominal__ joined #perl6
01:31 Liz joined #perl6
01:43 cognominal__ joined #perl6
01:56 LlamaRider joined #perl6
02:01 swarley-freenode joined #perl6
02:28 cognominal__ joined #perl6
02:29 diakopter twirssi is the coolest
02:29 thundergnat joined #perl6
02:35 thundergnat It seems to me that first() on a lazy list isn't working correctly in Rakudo, at least in some cases.
02:36 thundergnat nr: my @h := gather for 1 .. * { take $_ if $_ %% [+] .comb }; say @h.first({$^a > 100});
02:36 p6eval rakudo b972ca: OUTPUT«(timeout)»
02:36 p6eval ..niecza v24-35-g5c06e28: OUTPUT«102␤»
02:37 thundergnat nr: my @h := gather for 1 .. * { take $_ if $_ %% [+] .comb }; say @h.first({$^a > 2});
02:37 p6eval rakudo b972ca: OUTPUT«(timeout)»
02:37 p6eval ..niecza v24-35-g5c06e28: OUTPUT«3␤»
02:37 sorear nr: my @h := gather for 1 .. * { take $_ if $_ %% [+] .comb }; say 42
02:37 p6eval niecza v24-35-g5c06e28: OUTPUT«Potential difficulties:�  @h is declared but not used at /tmp/r13d0GTDMq line 1:�------> [32mmy [33m�[31m@h := gather for 1 .. * { take $_ if $_ [0m��42�»
02:37 p6eval ..rakudo b972ca: OUTPUT«42␤»
02:38 thundergnat Locally, Rakudo just sits there and churns away and never produces anything.
02:39 thundergnat r: my @h := gather for 1 .. * { take $_ if $_ %% [+] .comb }; map { say @h[$_] and last if @h[$_] > 100 }, 0 .. *;
02:39 p6eval rakudo b972ca: OUTPUT«102␤»
02:39 diakopter r: is that in the repl?
02:39 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/n3QzunRGUQ:1�------> [32mis that in the repl[33m�[31m?[0m�    expecting any of:�        argument list�        postfix�        infix stopper�        infix or meta-infix�        statement end�        state…
02:40 diakopter it's possible the repl places it in sink context
02:40 diakopter er
02:40 diakopter thundergnat: I mean
02:40 FROGGS_ joined #perl6
02:40 thundergnat No, running it from a file.
02:42 thundergnat Seems buggy to me, but it is possible my expectations don't match reality.
02:42 thundergnat Niecza seems to agree with me though.
02:42 dayangkun joined #perl6
02:44 sorear thundergnat: If lazy lists are involved, niecza is probably wrong.  General rule.
02:44 thundergnat heh
02:44 thundergnat Not exactly a glowing endorsement there...
02:45 moritz mostly an understatement
02:45 cognominal joined #perl6
02:47 thundergnat At any rate, see http://rosettacode.org/wiki/Harshad_or_Niven_series#Perl_6 for the use case.
02:49 thundergnat left #perl6
02:54 Targen joined #perl6
03:06 cognominal joined #perl6
03:06 orafu joined #perl6
03:19 cognominal joined #perl6
03:19 preflex_ joined #perl6
03:26 kurahaupo joined #perl6
03:33 cognominal joined #perl6
04:35 rindolf joined #perl6
04:42 sevin joined #perl6
04:56 SamuraiJack joined #perl6
05:21 SamuraiJack joined #perl6
05:21 kaare_ joined #perl6
05:35 dmol joined #perl6
06:03 dmol joined #perl6
06:14 dwoldrich joined #perl6
06:27 kaleem joined #perl6
06:30 wingfold joined #perl6
07:00 wingfold joined #perl6
07:07 wingfold joined #perl6
07:09 domidumont joined #perl6
07:20 dwoldrich joined #perl6
07:26 rindolf joined #perl6
07:27 wk joined #perl6
07:35 rindolf joined #perl6
07:37 wingfold joined #perl6
07:42 domidumont joined #perl6
07:44 jerome joined #perl6
07:44 FROGGS_ joined #perl6
07:45 domidumont joined #perl6
07:47 rindolf joined #perl6
07:48 shlomif joined #perl6
07:50 wingfold joined #perl6
07:53 am0c joined #perl6
07:54 rindolf joined #perl6
08:02 rindolf joined #perl6
08:09 Targen joined #perl6
08:18 rindolf joined #perl6
08:20 wingfold joined #perl6
08:21 fhelmberger joined #perl6
08:33 sqirrel joined #perl6
08:34 raiph http://adambard.com/blog/PHP-ruby-python-clojure-webapps-by-example/ # folk have added TWO Go implementations and a JS one. No Perl...
08:41 rindolf joined #perl6
08:44 woolfy joined #perl6
09:19 _ilbot joined #perl6
09:19 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! | YAPC::NA talk submissions due end of Month. Have you submitted your talk?
09:27 wingfold joined #perl6
09:36 wingfold joined #perl6
09:39 masak marnin', #perl6
09:42 sqirrel joined #perl6
09:44 moritz \a
09:46 dakkar joined #perl6
09:48 Heather joined #perl6
09:48 Heather how to check if @ is empty
09:49 Heather hi #perl6
09:51 wingfold joined #perl6
10:05 masak r: my @a; say ?@a; say !@a
10:05 p6eval rakudo b972ca: OUTPUT«False␤True␤»
10:05 masak r: my @a; say +@a
10:05 p6eval rakudo b972ca: OUTPUT«0␤»
10:05 masak Heather: does that answer your question?
10:05 Heather jm...
10:05 Heather Yes
10:05 Heather masak thank you
10:06 masak r: my @a = 1, 2, 3; for 1..2 { if @a { say "non-empty in iteration $_" }; @a = () }
10:06 p6eval rakudo b972ca: OUTPUT«non-empty in iteration 1␤»
10:06 masak Heather: happy to help. :)
10:06 Heather masak Happy that you happy to help ^__^
10:07 masak hehe
10:07 masak infinite recursion detected near masak and Heather. bailing out.
10:07 daxim joined #perl6
10:11 domidumont joined #perl6
10:22 wingfold joined #perl6
10:27 domidumont joined #perl6
10:52 masak r: class Vatican { my $set = 0; has $!pope; method pope { Proxy.new(FETCH => { $!pope }, STORE => -> $, $newpope { die "Can only set pope twice" if ++$set > 2; $!pope = $newpope }) } }; given Vatican.new { say .pope = "Benedict XVI"; say .pope = "vacant"; say .pope = "Hilarius II" }
10:52 p6eval rakudo b972ca: OUTPUT«Benedict XVI␤vacant␤Can only set pope twice␤  in block  at /tmp/ymAKR5uN5R:1␤␤»
10:53 masak r: class A { my $!priv; method publ { Proxy.new(FETCH => { $!priv }, STORE => { $!priv }) } }; given A.new { say .publ }
10:53 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot use ! twigil on my variable�at /tmp/75B1RIW5lm:1�------> [32mclass A { my $!priv[33m�[31m; method publ { Proxy.new(FETCH => { $!p[0m�    expecting any of:�        scoped declarator�        constraint�»
10:53 masak oops.
10:53 masak r: class A { has $!priv; method publ { Proxy.new(FETCH => { $!priv }, STORE => { $!priv }) } }; given A.new { say .publ }
10:53 p6eval rakudo b972ca: OUTPUT«(Any)␤»
10:53 masak r: class A { has $!priv = 0; method publ { Proxy.new(FETCH => { $!priv }, STORE => { $!priv }) } }; given A.new { say .publ }
10:53 p6eval rakudo b972ca: OUTPUT«0␤»
10:54 masak r: class A { has $!priv = 0; method publ { Proxy.new(FETCH => { $!priv }, STORE => { $!priv }) } }; given A.new { say .publ; .publ++; say .publ }
10:54 p6eval rakudo b972ca: OUTPUT«0␤Too many positional parameters passed; got 2 but expected between 0 and 1␤  in block  at /tmp/tD9Rtyfyth:1␤␤»
10:54 masak aww.
10:54 masak I would like to be able to ++ a Proxy...
10:54 masak r: class A { has $!priv = 0; method publ { Proxy.new(FETCH => { $!priv }, STORE => { $!priv }) } }; given A.new { say .publ; .publ += 1; say .publ }
10:54 p6eval rakudo b972ca: OUTPUT«0␤Too many positional parameters passed; got 2 but expected between 0 and 1␤  in block  at /tmp/aVkhhmrKnW:1␤␤»
10:55 masak :/
10:55 masak where am I assuming something I shouldn't?
10:57 moritz STORE takes two params
10:57 moritz because it's called as a method, or something
10:57 moritz so you have to ignore the first (the invocant)
10:58 masak oh!
10:58 masak r: class A { has $!priv = 0; method publ { Proxy.new(FETCH => { $!priv }, STORE => -> $ { $!priv }) } }; given A.new { say .publ; .publ += 1; say .publ }
10:58 p6eval rakudo b972ca: OUTPUT«0␤Too many positional parameters passed; got 2 but expected 1␤  in block  at /tmp/PHuOBUTZOj:1␤␤»
10:58 masak r: class A { has $!priv = 0; method publ { Proxy.new(FETCH => { $!priv }, STORE => -> $, $ { $!priv }) } }; given A.new { say .publ; .publ += 1; say .publ }
10:58 p6eval rakudo b972ca: OUTPUT«0␤0␤»
10:58 masak ok.
10:58 masak that's error-free, but wrong :)
10:58 masak r: class A { has $!priv = 0; method publ { Proxy.new(FETCH => { $!priv }, STORE => -> $, $ { $!priv }) } }; given A.new { say .publ; .publ++; say .publ }
10:58 p6eval rakudo b972ca: OUTPUT«0␤0␤»
10:58 moritz well, you don't store anything STORE
10:59 moritz what do you expect to happen?
10:59 masak if I += something, I expect it to change value
10:59 masak similarly ++
10:59 moritz but you don't store anything in STORE
10:59 masak oh!
10:59 moritz so you're discarding the write operation
10:59 masak yes, message received :)
10:59 * masak tries again
10:59 masak r: class A { has $!priv = 0; method publ { Proxy.new(FETCH => { $!priv }, STORE => -> $, $new { $!priv = $new }) } }; given A.new { say .publ; .publ++; say .publ }
10:59 moritz also you should say  method publ is rw
10:59 p6eval rakudo b972ca: OUTPUT«0␤1␤»
10:59 masak \o/
11:00 masak moritz: because of future-compat?
11:00 masak it works now.
11:00 masak ok, Proxy++
11:00 moritz I don't think it should work right now, but I'm not entirely sure
11:00 masak r: class A { has $!priv = 0; method publ { Proxy.new(FETCH => { $!priv }, STORE => -> $, $new { $!priv = $new }) } }; given A.new { say .publ; .publ += 42; say .publ }
11:00 p6eval rakudo b972ca: OUTPUT«0␤42␤»
11:01 masak how come, by the way, that an invocant is sent to STORE, but not to FETCH? that feels assymmetric somehow.
11:01 moritz r: class A { has $!priv = 0; method publ is rw { $!priv } }; given A.new { say .publ; .publ += 42; say .publ }
11:01 p6eval rakudo b972ca: OUTPUT«0␤42␤»
11:01 moritz no need to proxy here
11:03 masak oh, in this simple case, no.
11:03 masak I'm going to need Proxy for my observers, though.
11:18 Heather How to get name of the current directory ? not full path, just dir name?
11:20 Heather r: dir('.')
11:20 p6eval rakudo b972ca:  ( no output )
11:20 Heather r: say dir('.')
11:20 p6eval rakudo b972ca: OUTPUT«star src .bashrc nom-inst1 toqast test3.pl .profile t nom-inst2 nom-inst toqast-inst toqast-inst2 examples Makefile .gitignore lib test2.pl .local bin rakudo p1 VERSION simple-tests .perlbrew std obj main.pl .lesshst nom niecza test.pl .cpanm log .bash_logout run T…
11:21 Heather r: say dir('.').name
11:21 p6eval rakudo b972ca: OUTPUT«No such method 'name' for invocant of type 'Array'␤  in block  at /tmp/GyTF7CcUzX:1␤␤»
11:21 Heather r: say dir('.').basename
11:21 p6eval rakudo b972ca: OUTPUT«No such method 'basename' for invocant of type 'Array'␤  in block  at /tmp/X5NPek8V1j:1␤␤»
11:22 Heather r: say (dir('.')).basename
11:22 p6eval rakudo b972ca: OUTPUT«No such method 'basename' for invocant of type 'Array'␤  in block  at /tmp/eIQAV0lybE:1␤␤»
11:23 Heather r: say basename '.'
11:23 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    basename used at line 1. Did you mean '&rename'?��»
11:23 tadzik r: '.'.IO.basename.say
11:23 p6eval rakudo b972ca: OUTPUT«No such method 'basename' for invocant of type 'IO'␤  in block  at /tmp/EVhrVBCH4F:1␤␤»
11:23 tadzik r: '.'.IO.path.basename.say
11:23 p6eval rakudo b972ca: OUTPUT«No such method 'basename' for invocant of type 'Str'␤  in block  at /tmp/MaYgcQTjQ8:1␤␤»
11:24 Heather r: dirname '.'
11:24 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    dirname used at line 1��»
11:24 FROGGS_ r: say '.'.IO.^methods
11:24 p6eval rakudo b972ca: OUTPUT«open close eof get getc lines read seek tell write opened t print slurp copy chmod Str flush d e f l r s w x z modified accessed changed say <anon> <anon> <anon>␤»
11:24 FROGGS_ r: say '.'.IO.patch.^methods
11:24 p6eval rakudo b972ca: OUTPUT«No such method 'patch' for invocant of type 'IO'␤  in block  at /tmp/VPC5twyN9u:1␤␤»
11:24 FROGGS_ r: say '.'.IO.path.^methods
11:24 p6eval rakudo b972ca: OUTPUT«BUILD Int Num chomp chop substr pred succ match ords lines samecase samespace trim-leading trim-trailing trim words encode capitalize wordcase trans indent codes tclc path WHICH Bool Str ACCEPTS Numeric gist perl comb subst split␤»
11:25 tadzik .path is a Str I think
11:25 FROGGS_ looks like
11:25 FROGGS_ r: say '.'.IO.d.WHAT
11:25 p6eval rakudo b972ca: OUTPUT«(Bool)␤»
11:25 FROGGS_ could be an object that tells you stuff though
11:26 Heather r: say '.'.IO
11:26 p6eval rakudo b972ca: OUTPUT«IO.new(ins => 0, chomp => Bool::True, path => ".")␤»
11:27 Heather r: say '../.'.IO
11:27 p6eval rakudo b972ca: OUTPUT«IO.new(ins => 0, chomp => Bool::True, path => "../.")␤»
11:27 Heather r: say dirname '.'.IO
11:27 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    dirname used at line 1��»
11:27 Heather r: say basename '.'.IO
11:27 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    basename used at line 1. Did you mean '&rename'?��»
11:28 Heather r: say WHAT '.'.IO
11:28 p6eval rakudo b972ca: OUTPUT«(IO)␤»
11:29 moritz r: say dir('.')[0].perl
11:29 p6eval rakudo b972ca: OUTPUT«IO::Path.new(basename => "star", directory => ".")␤»
11:30 Heather r: say dir('.')[0].perl.basename
11:30 p6eval rakudo b972ca: OUTPUT«No such method 'basename' for invocant of type 'Str'␤  in block  at /tmp/_L0TWzr4nx:1␤␤»
11:30 moritz without .perl
11:30 Heather r: say dir('.')[0]
11:30 p6eval rakudo b972ca: OUTPUT«IO::Path<star>␤»
11:32 Heather moritz how to convert it to string
11:32 moritz Heather: .Str
11:32 moritz r: say .Str for dir('.')
11:32 p6eval rakudo b972ca: OUTPUT«star␤src␤.bashrc␤nom-inst1␤toqast␤test3.pl␤.profile␤t␤nom-inst2␤nom-inst␤toqast-inst␤toqast-inst2␤examples␤Makefile␤.gitignore␤lib␤test2.pl␤.local␤bin␤rakudo␤p1␤VERSION␤simple-tests␤.perlbrew␤std␤obj␤main.pl␤.lesshst␤nom␤niecza␤test.pl␤.cpanm␤log␤.bash_logout␤run␤T…
11:33 Heather moritz no it returns 1st dir in folder, no folder itself :(
11:33 crab2313 joined #perl6
11:33 moritz ah
11:34 moritz yes
11:34 moritz so, you want an IO::Path object from the current directory?
11:34 moritz IO::Path.new('.')
11:35 Heather I need current dir name :)
11:35 moritz yes, it's .
11:35 moritz r: say IO.cwd
11:35 p6eval rakudo b972ca: OUTPUT«No such method 'cwd' for invocant of type 'IO'␤  in block  at /tmp/9QFy4YvlWb:1␤␤»
11:35 Heather r: say {cwd}
11:35 p6eval rakudo b972ca: OUTPUT«Block.new()␤»
11:35 moritz r: say cwd
11:35 Heather r: say {cwd}[0]
11:35 p6eval rakudo b972ca: OUTPUT«/home/p6eval␤»
11:35 p6eval rakudo b972ca: OUTPUT«Block.new()␤»
11:37 Heather moritz yes, it is, thanks
11:37 domidumont joined #perl6
11:38 masak r: say cwd.^name
11:38 p6eval rakudo b972ca: OUTPUT«Str␤»
11:40 Heather how to check if there is bin folder )
11:40 Heather IO.d ?
11:40 FROGGS_ r: say (cwd ~ '/bin').d
11:40 p6eval rakudo b972ca: OUTPUT«Cannot call 'cwd'; none of these signatures match:␤:()␤  in sub cwd at src/gen/CORE.setting:8046␤  in block  at /tmp/AXhrJoLzCk:1␤␤»
11:40 Heather r: say IO.d 'src'
11:40 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/ElKe3IS4iE:1�------> [32msay IO.d [33m�[31m'src'[0m�    expecting any of:�        method arguments�        postfix�        infix stopper�        infix or meta-infix�        statement end�        statemen…
11:40 FROGGS_ r: say (cwd() ~ '/bin').d
11:40 p6eval rakudo b972ca: OUTPUT«No such method 'd' for invocant of type 'Str'␤  in block  at /tmp/sC5HOc1RT7:1␤␤»
11:41 FROGGS_ r: say (cwd() ~ '/bin').IO.d
11:41 p6eval rakudo b972ca: OUTPUT«True␤»
11:41 FROGGS_ r: say (cwd() ~ '/hurz').IO.d
11:41 p6eval rakudo b972ca: OUTPUT«False␤»
11:41 Heather FROGGS_ thanks
11:41 FROGGS_ Heather: you're welcome
11:43 Heather now ... how to move all the files from this bin directory :)
11:44 Heather I've got only this : sub mv(*@args) is export {     ???
11:44 Heather so I guess I can cp -> rm_rf
11:45 FROGGS_ Heather: where do you see this sub mv?
11:45 Heather PERL6-FILE-TOOLS/BLOB/MASTER/LIB/SHELL/COMMAND.PM
11:46 Heather but it's not implemented
11:46 FROGGS_ ahh, it is a stub
11:47 FROGGS_ well then, copy a file and if it exists within the target folder delete the source, otherwise die
11:47 FROGGS_ and better check that target and source are not equal
11:48 Heather so...
11:49 Heather I need to check all the files in folder A, remember file names and then remove them in folder B...
11:49 Heather oh .. well .. it's weird design
11:49 Heather I need compose something else...
11:59 Liz_ joined #perl6
12:02 Heather https://gist.github.com/Heather/5244889
12:06 masak r: say cwd
12:06 p6eval rakudo b972ca: OUTPUT«/home/p6eval␤»
12:06 masak r: say cwd.split('/')[*-1]
12:06 p6eval rakudo b972ca: OUTPUT«p6eval␤»
12:07 masak Heather: I'd get the name of the current directory that way.
12:07 Heather masak let me try
12:07 masak Heather: also, style tip/shortcut: srcdir => $srcdir better written :$srcdir
12:08 masak (it names the parameter and ties it to a variable at the same time)
12:08 masak (which has caused me to often name my variables like the parameters, where it makes sense, so that I can use that trick)
12:09 Heather aha
12:09 Heather masak thank you
12:10 masak you're quite welcome.
12:20 am0c_ joined #perl6
12:26 am0c joined #perl6
12:27 Heather masak when I have *@x im arguments how to get second?
12:27 Heather in
12:28 Heather @x[1] returns False
12:28 Heather when @x[0] is proper
12:28 moritz @x[1] is OK for the second argument
12:28 moritz r: sub a(*@a) { say @a[1] }; a(1, 2, 3) # I expect 2
12:28 p6eval rakudo b972ca: OUTPUT«2␤»
12:30 Heather ahhh....
12:30 Heather I get It
12:30 Heather used ~~ to merge strings >_<
12:30 Heather my fault
12:31 Heather *concat
12:31 Heather it's ~
12:39 Heather what's stub code
12:43 dalek tablets: 3c93764 | (Herbert Breunung)++ | docs/tablet- (2 files):
12:43 dalek tablets: fixed links in 3 and 4
12:43 dalek tablets: review: https://github.com/perl6/tablets/commit/3c93764bc5
12:43 denisboyun_ joined #perl6
12:45 FROGGS_ Heather: you can mark code as stub when for example it is not implemented yet
12:45 FROGGS_ r: sub do_something() { ... }; do_something()
12:45 p6eval rakudo b972ca: OUTPUT«Stub code executed␤current instr.: 'throw' pc 350303 (src/gen/CORE.setting.pir:152936) (src/gen/CORE.setting:9353)␤called from Sub 'sink' pc 381956 (src/gen/CORE.setting.pir:165283) (src/gen/CORE.setting:10618)␤called from Sub 'MAIN' pc 381 (src/gen/perl6.pir:147) …
12:46 FROGGS_ so you can define a bunch of subs or class methods, but make sure the user dont think it really does something
12:47 Heather I see
12:49 felher +1 to :dba("voting +1 on moritz' idea").
12:51 Heather IO.copy changes file mode ! :(
12:51 Heather it's not 777 anymoar
12:51 felher I guess this is inteded. Its just like 'cp' on the commandline works.
12:51 Heather I need some kind of IO.move
12:52 Heather r: '.bashrc'.IO.move('.bashrc-tmp')
12:52 p6eval rakudo b972ca: OUTPUT«No such method 'move' for invocant of type 'IO'␤  in block  at /tmp/J8PmgkKIFO:1␤␤»
12:53 domidumont joined #perl6
13:08 xinming joined #perl6
13:08 skids joined #perl6
13:09 dalek perl6-roast-data: f61cf21 | coke++ | / (4 files):
13:09 dalek perl6-roast-data: today (automated commit)
13:09 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/f61cf214ff
13:10 kivutar joined #perl6
13:16 [Coke] FROGGS_: pong
13:16 brrt joined #perl6
13:22 Heather see you o/
13:24 [Coke] Adios.
13:26 dalek Perlito: 93d8ea1 | (Flavio S. Glock)++ | / (2 files):
13:26 dalek Perlito: Perlito5::X64::Assembler - add conditional jmp
13:26 dalek Perlito: review: https://github.com/fglock/Perlito/commit/93d8ea1d61
13:29 FROGGS_ [Coke]: I made a perl 5 roast, if perlito will use it too, will you make a perl5-roast-data repo?
13:30 [Coke] Sure?
13:30 geekosaur joined #perl6
13:30 [Coke] I assume you're asking if I can write code, not just host a repo...
13:31 bluescreen10 joined #perl6
13:33 Celelibi joined #perl6
13:33 [Coke] also, I had trouble trying to get perlito-6 to run roast; if that's the part you need help with for 5, I am probably not the guy to help.
13:34 dalek Perlito: 30cbca0 | (Flavio S. Glock)++ | src5/lib/Perlito5/X64/Assembler.pm:
13:34 dalek Perlito: Perlito5::X64::Assembler - add a proper Perl5 pod
13:34 dalek Perlito: review: https://github.com/fglock/Perlito/commit/30cbca0c84
13:35 FROGGS_ [Coke]: okay, if perlito5 doesnt work with that way out of the box we should wait
13:35 FROGGS_ having pass rates for only one project (v5) doesn't make that much sense to me
13:41 sqirrel joined #perl6
13:44 rjbs joined #perl6
13:45 xinming joined #perl6
13:52 SmokeMachine joined #perl6
14:06 sahadev joined #perl6
14:07 [Coke] FROGGS_: I can try again to see if I can get it to run any of the roast tests...
14:08 SmokeMachine joined #perl6
14:09 FROGGS_ [Coke]: I can do that too, but till now I never touched Perlito
14:15 philroc joined #perl6
14:15 PacoAir joined #perl6
14:16 wingfold joined #perl6
14:16 philroc Hello, lets say I have a sub called foo which is declared as sub foo($a,$b,$c) { say "$a, $b, $c"; }. Why doesn't foo.WHAT return "sub"?
14:18 FROGGS_ philroc: because .WHAT tells you the type
14:18 FROGGS_ r: say "abc".WHAT
14:18 p6eval rakudo b972ca: OUTPUT«(Str)␤»
14:18 PerlJam philroc: I'm not sure what you're asking ...  &foo.WHAT *does* tell you it's a sub.
14:18 PerlJam philroc: Are you asking why not elide the & ?
14:18 PerlJam er, why it doesn't work when you elide the &
14:19 xilo joined #perl6
14:19 FROGGS_ r: sub sub foo($a,$b,$c) { say "$a, $b, $c"; }; say &foo.WHAT
14:19 philroc Forgot the elide. Thanks.
14:19 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Missing block�at /tmp/GY4a2EbHGS:1�------> [32msub sub [33m�[31mfoo($a,$b,$c) { say "$a, $b, $c"; }; say[0m�    expecting any of:�        statement list�        prefix or term�        prefix or meta-prefix�        new name to be d…
14:19 FROGGS_ r: sub foo($a,$b,$c) { say "$a, $b, $c"; }; say &foo.WHAT
14:19 p6eval rakudo b972ca: OUTPUT«(Sub)␤»
14:20 FROGGS_ r: sub foo($a,$b,$c) { say "$a, $b, $c"; }; say foo.WHAT
14:20 p6eval rakudo b972ca: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'foo' will never work with no arguments (lines 1, 1)␤    Expected: :($a, $b, $c)␤»
14:20 FROGGS_ hmmm, this could be catched
14:20 PerlJam FROGGS_: "sub sub" ... for when you want to emphasize the fact that it's a subroutine declaration  :)
14:20 FROGGS_ :o)
14:23 philroc Tried &foo.WHAT with multi-methods and it works too, [ although it just says "sub" ]
14:25 arnsholt Yeah, a multi-method call calls a dispatcher that in turn invokes the correct candidate
14:27 timotimo_ r: multi sub foo($a, $b) { }; multi sub foo($a) { }; say &foo.^candidates;
14:27 p6eval rakudo b972ca: OUTPUT«No such method 'candidates' for invocant of type 'Perl6::Metamodel::ClassHOW'␤  in block  at /tmp/iKl9swMU90:1␤␤»
14:27 timotimo_ hm, wasn't there a way?
14:27 timotimo_ r: multi sub foo($a, $b) { }; multi sub foo($a) { }; say &foo.^methods;
14:27 p6eval rakudo b972ca: OUTPUT«No such method 'gist' for invocant of type 'Sub'␤  in method gist at src/gen/CORE.setting:5165␤  in method gist at src/gen/CORE.setting:902␤  in sub say at src/gen/CORE.setting:7634␤  in block  at /tmp/6Ke05BO9dA:1␤␤»
14:27 timotimo_ oh, that.
14:28 [Coke] r: multi sub foo() {}; say &foo.HOW.^methods
14:28 p6eval rakudo b972ca: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤  in method gist at src/gen/CORE.setting:5165␤  in method gist at src/gen/CORE.setting:902␤  in sub say at src/gen/CORE.setting:7634␤  in block  at /tmp/F16cYkVKZh:1␤␤»
14:28 Psyche^ joined #perl6
14:31 timotimo_ hm, ADT doesn't show up in the modules list. did i add it wrong to the ecosystem or does it just need to be manually updated?
14:33 moritz it should be updated hourly
14:34 timotimo_ then it's obvious that i made a mistake.
14:34 moritz "This page is generated from the files in the modules.perl6.org repository
14:34 moritz (last update 2013-03-26 14:18:36 GMT)."
14:34 moritz timotimo_: or maybe the update mechanism is stuck-ish
14:35 moritz timotimo_: https://raw.github.com/timo/ADT/master/META.info has a trailing comma, so it's not valid JSON
14:35 moritz (yes, I hate that rule too)
14:35 timotimo_ oh
14:35 timotimo_ more importantly, there's a comma missing in the line above
14:36 timotimo_ also, repo-url and repo-type are obsolete, are they not?
14:36 * moritz wouldn't know
14:37 timotimo_ okay, should be in the next update then :)
14:38 tadzik yeah, they are
14:42 masak JSON disallows trailing commas because JavaScript disallows trailing commas. different browsers are lax to different extent, and in different ways, about actual trailing commas in JavaScript arrays/objects.
14:43 [Coke] perhaps a validation step somewhere?
14:45 daxim that annoys the everlasting climate pirate out of me.  in sql, too
14:45 timotimo_ tadzik: feel like helping me get panda back up and running?
14:46 masak even C allows trailing commas :)
14:46 timotimo_ htop
14:46 timotimo_ er
14:46 timotimo_ what just happened :|
14:47 timotimo_ ah, my ram is almost completely free. must mean panda's rebootstrap started the OOM killer
14:48 tadzik timotimo_: what's wrong with it?
14:49 timotimo_ for one, panda taking more ram than a firefox with 8 tabs open is ... o_O  -  but that's got nothing to do with you
14:49 xilo what's the best way to do an enum structure in perl6?
14:50 timotimo_ r: enum Xilo <happy excited exstatic>; say happy.WHAT;
14:50 p6eval rakudo b972ca: OUTPUT«(Xilo)␤»
14:50 timotimo_ tadzik: ah, thanks, you made it work again!
14:50 tadzik timotimo_: yay, you're welcome :P
14:51 xilo ah
14:55 SunilJoshi joined #perl6
15:04 philroc left #perl6
15:12 dalek perl6-most-wanted: 6819578 | timo++ | most-wanted/bindings.md:
15:12 dalek perl6-most-wanted: added mrhdias' GD binding
15:12 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/6819578375
15:12 timotimo_ hm, a ++ should have been there instead of the ' i guess
15:16 domidumont joined #perl6
15:18 [Coke] perl6-most-wanted contains "Devel::NYTProf" - is "--profile" sufficient for this?
15:21 moritz not really
15:21 tadzik NYTProf has an awesome HTML formatter
15:22 [Coke] profile has kcachegrind
15:22 timotimo_ hm, there ought to be a html formatter for that format somewhere
15:23 [Coke] (if our current profiling isn't sufficient, it would be helpful to note what's missing - we don't need a devel-nytprof-a-like, but we need <foo>"
15:40 dalek Perlito: dce89b2 | (Flavio S. Glock)++ | / (2 files):
15:40 dalek Perlito: Perlito5::X64::Assembler - add a jmp to register
15:40 dalek Perlito: review: https://github.com/fglock/Perlito/commit/dce89b2d8f
15:46 LlamaRider joined #perl6
15:56 dalek v5: 01f24df | (Tobias Leich)++ | lib/Perl6/P5Grammar.pm:
15:56 dalek v5: added "use strict" pragma
15:56 dalek v5:
15:56 dalek v5: This currently takes no parameters and does only
15:56 dalek v5: care about undeclared variables.
15:56 dalek v5: review: https://github.com/rakudo-p5/v5/commit/01f24df3e0
16:04 thou joined #perl6
16:09 mtk joined #perl6
16:09 renormalist joined #perl6
16:11 jeffreykegler joined #perl6
16:12 dalek v5: 594772a | (Tobias Leich)++ | Makefile:
16:12 dalek v5: fixed parameter for "use perl5;"
16:12 dalek v5: review: https://github.com/rakudo-p5/v5/commit/594772a3d6
16:14 dalek Perlito: 4b83c35 | (Flavio S. Glock)++ | / (2 files):
16:14 dalek Perlito: Perlito5::X64::Assembler - add syscall; try out a "Hello, world"
16:14 dalek Perlito: review: https://github.com/fglock/Perlito/commit/4b83c35f10
16:20 xantamoc joined #perl6
16:29 [Coke] so, is this adding an assembly backend to perlito?
16:30 [Coke] (will it be available for p6 & p5?)
16:31 FROGGS_ [Coke]: I guess you can compile Perl <[56]> to ASM then
16:31 timotimo_ what, that's crazy
16:31 FROGGS_ timotimo_: have a look at its README
16:32 FROGGS_ r: my $x = "0"; $x eq $x && (print "ok\n")
16:32 p6eval rakudo b972ca: OUTPUT«ok␤»
16:33 FROGGS_ r: my $x = "0"; $x ne $x && (print "ok\n")
16:33 p6eval rakudo b972ca:  ( no output )
16:33 wingfold joined #perl6
16:33 timotimo_ how is that even ...
16:34 wingfold joined #perl6
16:35 timotimo_ so, in theory this could compile parts of a program that's meant to be run on rakudo into assembler code and run that inline?
16:36 timotimo_ Inline::Perlito::ASM
16:36 FROGGS_ timotimo_: no, I believe it is implemented in javascript
16:37 FROGGS_ at least the Perl 5 and 6 interpreter
16:37 FROGGS_ if you compile to another backend (python for example) I think you just get a file you can run later
16:37 timotimo_ apparently 30% js, 70% perl
16:37 kresike bye folks
16:37 masak o/
16:39 FROGGS_ v5$ perl6 -e 'use perl5; 0 && say(1)'
16:39 FROGGS_ 1
16:39 FROGGS_ :/
16:40 masak that's wrong. :)
16:40 FROGGS_ dont you say :P
16:41 tadzik wrong && right :P
16:42 xantamoc left #perl6
16:44 dalek v5: 2822c65 | (Tobias Leich)++ | lib/Perl6/P5Grammar.pm:
16:44 dalek v5: comment out token infix && and ||
16:44 dalek v5: review: https://github.com/rakudo-p5/v5/commit/2822c652ef
16:44 dalek v5: 2d0ff07 | (Tobias Leich)++ | t/spectest.data:
16:44 dalek v5: we currently pass 3 test files
16:44 dalek v5: review: https://github.com/rakudo-p5/v5/commit/2d0ff073c4
16:45 sqirrel joined #perl6
16:48 daxim joined #perl6
16:49 kaleem joined #perl6
16:53 dmol joined #perl6
16:59 japhb_ joined #perl6
17:02 Chillance joined #perl6
17:21 kaleem joined #perl6
17:27 FROGGS joined #perl6
17:29 SunilJoshi joined #perl6
17:36 SunilJoshi joined #perl6
17:46 SunilJoshi joined #perl6
17:51 moritz does anybody want to proof-read a German article about exceptions in Perl 6?
17:56 timotimo_ i'd like to
17:56 timotimo_ i can only proof the grammar and spelling competently though :P
17:56 domidumont joined #perl6
17:56 timotimo_ except i got the blunt end of three spelling reforms in my school career, so maybe i'm not to be trusted on spelling
17:57 masak moritz: sure, bring it on.
17:57 masak technically, I don't know German, but I can proof on general structure and disposition, and facts.
17:58 moritz masak: http://perlpunks.de/paste/show/5151e1e5.5355.235
17:59 moritz and no, I couldn't resist. It contains an implementation of the ":dba on routines" idea I had yesterday night
18:00 FROGGS fwiw, I vote for keeping the name 'dba'
18:01 timotimo_ hehe, that's good, moritz. it means you're turning your procrastination into positivity. although it was positivity all along!
18:01 timotimo_ moritz: the play on words "die 'fehlermeldung';" amuses me
18:02 census joined #perl6
18:03 pmichaud ...should there be a .throw on the X::Disco::TooYoung thingy?
18:03 timotimo_ Kontrollcode kann etwa temporär  +e IMO
18:04 pmichaud oh, there's a "die"
18:04 pmichaud never mind
18:04 timotimo_ line 96 btw
18:05 timotimo_ say $!.WHAkT;           # (X::AdHoc); - a k snuck in there
18:05 timotimo_ say "lebending"; - a n snuck in there
18:05 timotimo_ or maybe it was a pun, dunno?
18:06 xilo joined #perl6
18:06 pmichaud article (as viewed through Google Translate) looks reasonable to me!  Good length and good choices of examples.
18:07 timotimo_ line 166 could get an "überhaupt" or something for style
18:09 moritz timotimo_: thanks for your suggests
18:09 moritz timotimo_++, FROGGS++, masak++, pmichaud++
18:09 * masak didn't get to reading it yet ;)
18:09 timotimo_ seems nice otherwise
18:10 moritz masak: consider your ++ to be a prefix until you do :-)
18:10 moritz fwiw I ran all the test code
18:10 pmichaud masak: your ++ is a virtual one... you get the karma point now for effort you will perform later.  :)
18:12 moritz masak: I'm especially interested in your opinion on the opionon on the :dba stuff which I brought up yesterday (and which finds its way into the article), because it adresses your dislike for stacktraces at some level
18:13 moritz strike that double opinion :-)
18:17 moritz oh, and I have a DateTime feature request: I want an easy to way to deal with UTC dates/times
18:20 [Coke] moritz: step 1: lobby your politician to abolish DST.
18:21 SunilJoshi joined #perl6
18:22 moritz well, the equivalent of the perl5 gmtime would be a good start already
18:23 pmichaud well, UTC doesn't have  DST so that should make it easier already :)
18:24 spider-mario joined #perl6
18:24 masak moritz: in a first read-through, I focused on the code.
18:24 masak moritz: and yes, I see what you mean by "addresses dislike for stacktraces". kinda neat.
18:26 SunilJoshi joined #perl6
18:27 moritz I could live in a world where that's the default, and perl6 --dev $program gives you the backtraces we have now
18:28 lue hello world o/
18:33 arnsholt moritz: I think I'd prefer to have file:line information in a paren as well, in the human-readable stack-traces
18:35 moritz arnsholt: as a program user, do you honstly care about the location of an error?
18:37 lue .oO(better bug reports)
18:38 dalek perl6-roast-data: 0119237 | coke++ | / (3 files):
18:38 dalek perl6-roast-data: today (automated commit)
18:38 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/0119237fcf
18:38 SunilJoshi joined #perl6
18:40 [Coke] anyone bored, those 2 pugs failures fail intermittentently - we should skip those tests.
18:45 arnsholt moritz: Tru dat. But that kind of trace also doubles as part of a bug report, in which case I'd argue it does matter
18:45 timotimo_ honestly i would show both, but make the "user facing" stand out more
18:46 timotimo_ the traceback can still be copypasted into a bugreport that way
18:46 timotimo_ but the user could also understand what's going on if it's not the program's fault (just an LTA error)
18:46 moritz aye; or maybe dump the backtrace into a temp file
18:46 arnsholt Definitely make the understandable bits prominent
18:46 arnsholt I was thinking something along the lines of "doing business as (file:line)"
18:47 lue I suspect slangs "just" require treating them as a shorthand for modifying the appropriate grammar.
18:57 xilo joined #perl6
19:02 jferrero left #perl6
19:02 jferrero joined #perl6
19:10 sorear lue: do not modify existing grammars.  subclass them instead
19:10 masak how the heck can a Kindle edition of a book be more expensive than the hardcover!?
19:10 masak how does that even happen?
19:11 sorear masak: format translators want money?  amazon rent-seeking?
19:11 lue sorear: ah yes, of course. (I wrote that last statement from the user's perspective it seems)
19:11 sorear hardcover being sold as a loss leader / otherwise subsidized by bookstores?
19:12 sorear hardcover experiences surplus production and must be sold at any cost?
19:12 jferrero joined #perl6
19:13 sorear they think people are willing to pay more for the convenience of a massless book?
19:13 sorear give away the razor and make the difference on the blades?
19:14 geekosaur amazon's model is sell the kindle at a loss and profit on the ebooks; sounds like maybe it's backfiring on them...
19:14 lue .oO(Free Printer! [$70.00 Ink not included])
19:15 masak sorear: it... just seems to me they'd *obviously* sell more Kindle versions if it were cheaper than paper. and that it shouldn't be so hard, since the production cost has to be lower than for a dead-tree book.
19:15 sorear so my last suggestion then, flavored with a bit of the 2nd
19:15 colomon it's not unusual for a paperback to be more expensive than a hardcover of the same book... why would kindle edition be any different?
19:15 lue I'm guessing the Instantaneous Shipping is crazy expensive.
19:15 masak because it doesn't have to be physically shipped, for one.
19:16 pecastro joined #perl6
19:16 SamuraiJack joined #perl6
19:17 masak it's as if a fruit vendor went "yeah, tell you what. I'll give you this fruit juice concentrate instead. actually, it's just artificial flavors, so it's much cheaper to produce. but the quality is great. welcome to the future! that'll be {1.5 the price of equivalent fruit}."
19:18 sorear masak: people might be willing to pay more for instant availability and low space consumption
19:18 PerlJam amazon is trying to recoup it's up-front costs in the near term rather than the long term.
19:18 sorear "sure the paper version is cheaper, but I'd have to WAIT and I'd have to find room for it"
19:19 PerlJam (and once the bar is set for too expensive books, they can selectively low it in the future while still making a huge profit)
19:19 PerlJam s/low/lower/
19:20 colomon PerlJam: odds are really good it's the publisher setting the eBook price, not Amazon.
19:20 lue .oO(It's a test to see how much you depend on your Kindle)
19:20 PerlJam colomon: well ... we don't know the price difference, but you're probably right.
19:21 sorear also, setting prices based on costs is un-American.
19:21 masak I wonder if we'll eventually stabilize on expensive dead-tree versions and cheap kindle versions.
19:21 masak sorear: :P
19:21 PerlJam masak: we'll at least get to some sort of price uniformity.
19:22 kaare_ joined #perl6
19:22 bluescreen10 joined #perl6
19:30 dalek tablets: 58901a8 | (Herbert Breunung)++ | docs/tablet- (7 files):
19:30 dalek tablets: fixed rest of links and added some dummy headings for better linkage
19:30 dalek tablets: review: https://github.com/perl6/tablets/commit/58901a8f96
19:34 timotimo_ i get test failures on zavolaj :(
19:35 lichtkind joined #perl6
19:36 lue n: use MONKEY_TYPING; class Foo { method A { say "hi" } }; Foo.A; { augment class Foo { method A { say "2" } }; Foo.A }; Foo.A; # is niecza right? (rakudo errors on this)
19:36 p6eval niecza v24-35-g5c06e28: OUTPUT«2␤2␤2␤»
19:37 sorear r: use MONKEY_TYPING; class Foo { method A { say "hi" } }; Foo.A; { augment class Foo { method A { say "2" } }; Foo.A }; Foo.A;
19:37 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Package 'Foo' already has a method 'A' (did you mean to declare a multi-method?)�at /tmp/aIdQEpKcoB:1�------> �»
19:37 timotimo_ oh? when i use -Ilib, i run all 9 tests, but 4 of the 9 just say "ok" without a number, so the TAP is invalid
19:37 sorear r: use MONKEY_TYPING; class Foo { method A { say "hi" } }; Foo.B; { augment class Foo { method B { say "2" } }; Foo.B }; Foo.B;
19:37 p6eval rakudo b972ca: OUTPUT«2␤2␤2␤»
19:37 timotimo_ when using -Iblib/lib, i get a segfault at the end of that
19:38 cognominal joined #perl6
19:38 sorear lue: there are two things going on here.  both rakudo and niecza augment at BEGIN time, so you can use Foo.B "before" adding it
19:38 arnsholt timotimo_: Zavolaj library or something else?
19:38 sorear r: use MONKEY_TYPING; class Foo { method A { say "hi" } }; Foo.A; { augment class Foo { supercede method A { say "2" } }; Foo.A }; Foo.A;
19:38 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Package 'Foo' already has a method 'A' (did you mean to declare a multi-method?)�at /tmp/LSkX4ZoUNJ:1�------> �»
19:39 sorear lue: the other thing is that niecza applies implicit "supercede" semantics to methods in an augment, which is probably wrong, but more useful than not supporting supercede at all
19:39 timotimo_ arnsholt: er, wha? i don't understand the question
19:41 masak rn: my @dirs = </home/user1/tmp/coverage/test /home/user1/tmp/covert/operator /home/user1/tmp/coven/members>; sub is_prefix_of($prefix, $str) { $prefix eq $str.substr(0, $prefix.chars) }; say ([\~] @dirs.comb(/\/\w+/))>>.join.reverse.first: { is_prefix_of($_, all @dirs) }
19:41 p6eval rakudo b972ca, niecza v24-35-g5c06e28: OUTPUT«/home/user1/tmp␤»
19:41 masak to me, this is the *obvious* solution to http://rosettacode.org/wiki/Find_common_directory_path
19:41 masak :)
19:41 masak mind if I add it to that page?
19:41 lue At least now I know how to handle slang augmenting differently in the Grammar/Actions
19:42 arnsholt timotimo_: Does the code you find the segfault in use Zavolaj, sorry =)
19:42 mikemol Go right ahead. :P
19:43 timotimo_ arnsholt: it's t/08-callbacks.t, so yes, it does use zavolaj
19:43 timotimo_ it's from the zavolaj test suite
19:44 arnsholt Right. In that case it's probably a bug in the dyncall related stuff in NQP
19:44 timotimo_ should i try getting a newer nqp?
19:44 timotimo_ oh, no new commits on the master branch
19:47 cognominal joined #perl6
19:48 masak mikemol: added. final version came out looking a little different. but still better, in my opinion ;)
19:50 mikemol masak: I was joking; there shouldn't be any typical need for anyone to ask me permission to add code to RC.
19:50 mikemol Though sometimes it's up in the air whether there should be multiple solutions to a language/task pair, or just one.
19:50 mikemol Opinions differ widely, but mostly based on who thinks their code is the One True Way...
19:51 masak *nod*
19:51 colomon but... but.... there's more than one way to do it!
19:52 PerlJam RC has python solutions too  ;)
19:52 masak in this case, now there's three :)
19:54 arnsholt timotimo_: Didn't say I'd fixed it, did I? O:)
19:54 arnsholt timotimo_: More seriously, a backtrace might shed some light
19:55 timotimo_ a backtrace, hmm.
19:55 dalek v5: 7aeeebc | (Tobias Leich)++ | t/spectest.data:
19:55 dalek v5: we actually pass 4 tests
19:55 dalek v5: review: https://github.com/rakudo-p5/v5/commit/7aeeebc8bf
19:55 henry__ joined #perl6
19:55 timotimo_ #0  0x00007f270d4da90d in Parrot_pa_remove (ptr=0x21, interp=<optimized out>, self=<optimized out>) at ./include/parrot/pointer_array.h:141
19:58 arnsholt Aww, that doesn't look promising. Nothing NQP-looking further up the stack?
19:58 cognominal r:  say Pod::Block.new.WHAT
19:58 p6eval rakudo b972ca: OUTPUT«Cannot look up attributes in a type object␤  in method <anon> at src/gen/CORE.setting:1868␤  in sub pod-gist at src/gen/CORE.setting:12186␤  in method gist at src/gen/CORE.setting:12208␤  in sub say at src/gen/CORE.setting:7634␤  in block  at /tmp/iICjoKRkCV:1␤␤»…
19:59 cognominal weird
19:59 timotimo_ dunno what looks nqp-ish
20:00 cognominal I can't see in what way Pod::Block is so différent it can't execute .WHAT
20:02 xilo joined #perl6
20:02 genehack joined #perl6
20:02 lue r: say Int.WHAT; say Pod::Block.WHAT;
20:02 p6eval rakudo b972ca: OUTPUT«(Int)␤Cannot look up attributes in a type object␤  in method <anon> at src/gen/CORE.setting:1868␤  in sub pod-gist at src/gen/CORE.setting:12186␤  in method gist at src/gen/CORE.setting:12208␤  in sub say at src/gen/CORE.setting:7634␤  in block  at /tmp/KM9RwF88gm:…
20:03 lue r: say Pod::Block.^methods; say Pod::Block.gist;
20:03 p6eval rakudo b972ca: OUTPUT«gist <anon> <anon>␤Cannot look up attributes in a type object␤  in method <anon> at src/gen/CORE.setting:1868␤  in sub pod-gist at src/gen/CORE.setting:12186␤  in method gist at src/gen/CORE.setting:12208␤  in block  at /tmp/92nOELlxY7:1␤␤»
20:03 diakopter r: print Int.WHAT; print Pod::Block.WHAT;
20:03 p6eval rakudo b972ca: OUTPUT«use of uninitialized variable $v of type Int in string context  in block  at /tmp/xKYxl2RlyI:1␤␤use of uninitialized variable $v of type Pod::Block in string context  in block  at /tmp/xKYxl2RlyI:1␤␤»
20:03 diakopter r: print Int.WHAT;
20:03 p6eval rakudo b972ca: OUTPUT«use of uninitialized variable $v of type Int in string context  in block  at /tmp/48FKrtBy1O:1␤␤»
20:04 diakopter r: print Int.WHAT.perl
20:04 p6eval rakudo b972ca: OUTPUT«Int»
20:04 arnsholt timotimo_: I'll try to remember to look at it tomorrow. Have to rebuild NQP and Rakudo and stuff to test it right now
20:04 timotimo_ thanks
20:08 sahadev masak: in your last solution to the Find_common_directory_path problem, can you explain what is ».join doing there? I get the same output without that part.
20:08 cognominal joined #perl6
20:09 cognominal ho, I called WHAT on an instance instead of a class
20:10 cognominal it should have the same result, no?
20:11 masak sahadev: oh! yeah. thinko on my part. the [\~] already does that for me, d'oh.
20:11 * masak edits
20:11 masak "better do this operation twice, in case the computer doesn't get it the first time..."
20:12 cognominal r:  say Pod::Block.WHAT
20:12 p6eval rakudo b972ca: OUTPUT«Cannot look up attributes in a type object␤  in method <anon> at src/gen/CORE.setting:1868␤  in sub pod-gist at src/gen/CORE.setting:12186␤  in method gist at src/gen/CORE.setting:12208␤  in sub say at src/gen/CORE.setting:7634␤  in block  at /tmp/wLgTQ0mEVI:1␤␤»…
20:12 masak sahadev++ # debugging
20:12 cognominal same difference
20:13 cognominal r:  say Pod::Block.gist
20:13 p6eval rakudo b972ca: OUTPUT«Cannot look up attributes in a type object␤  in method <anon> at src/gen/CORE.setting:1868␤  in sub pod-gist at src/gen/CORE.setting:12186␤  in method gist at src/gen/CORE.setting:12208␤  in block  at /tmp/3POupl2KkK:1␤␤»
20:14 pmichaud cognominal: Pod::Block in Rakudo isn't built as a standard Perl 6 object...
20:14 [Coke] r: say (Pod::Block).WHAT
20:14 p6eval rakudo b972ca: OUTPUT«Cannot look up attributes in a type object␤  in method <anon> at src/gen/CORE.setting:1868␤  in sub pod-gist at src/gen/CORE.setting:12186␤  in method gist at src/gen/CORE.setting:12208␤  in sub say at src/gen/CORE.setting:7634␤  in block  at /tmp/3B0XFgQ9bH:1␤␤»…
20:14 pmichaud it's part of the compiler at the moment.
20:14 pmichaud in particular, Pod::Block isn't derived from Any or Mu
20:15 pmichaud oh, wait, maybe it is.  Hmm.
20:15 pmichaud (Looking.)
20:15 masak should be at this point, I think.
20:15 cognominal No, that pod-gist that is unable to deal with the class itself
20:15 cognominal …versus object of that class
20:16 cognominal it tries to print attributes
20:16 pmichaud say Pod::Block ~~ Any
20:16 pmichaud r: say Pod::Block ~~ Any
20:16 p6eval rakudo b972ca: OUTPUT«True␤»
20:16 pmichaud oh.
20:16 pmichaud probably missing a :D somewhere then.
20:16 pmichaud method gist {
20:16 pmichaud that would be the problem.
20:16 cognominal yes
20:17 pmichaud needs to be multi method gist(Pod::Block:D:) {
20:17 cognominal I always forget about :D and :U   pmichaud++
20:18 pmichaud ack 'method\s+\w+\s+\{' src   # reveals a lot of potential troublemakers
20:20 Chillance joined #perl6
20:20 kurahaupo joined #perl6
20:28 cognominal joined #perl6
20:29 dalek v5: 81c0bb9 | (Tobias Leich)++ | lib/Perl6/P5Grammar.pm:
20:29 dalek v5: make ternary operator work
20:29 dalek v5: review: https://github.com/rakudo-p5/v5/commit/81c0bb9aa7
20:42 cognominal joined #perl6
20:52 masak just found this. https://en.wikipedia.org/wiki/Wicked_problem
20:52 masak reminds me of programming language design. :)
20:53 masak "no definitive formulation", "no stopping rule", "not true-or-false, but better or worse"...
20:53 masak sounds about right :)
20:53 diakopter your mom is a gordian knot
20:58 cognominal joined #perl6
21:01 dmol1 joined #perl6
21:01 cognominal pmichaud: probably the compiler should warn when non multi are used in derived classes when multi are used in parent   or method signatures from derived classes are less specific than their parent. That would  have catched that one. In some cases, that could be doable.
21:02 cognominal pmichaud: why multi are not the default for methods? Not that it fixes the present Pod problem without proper signatures
21:03 moritz fwiw warnings should be a means of last resort
21:04 moritz warnings are always annoying both ways: when they catch an error, they should have been errors intead. When they are false positives, one has to explicitly disable or work around them
21:04 moritz so by default they don't make anybody happy
21:04 cognominal masak:  About wicked problems. I supposed that what De Gaulle meant in this exchange  someone: "mort aux cons", De Gaulle : "vaste problème"
21:06 cognominal moritz, that's true, but there could be a non default compiler mode that warns.
21:07 masak cognominal: "death to conservatives"?
21:08 cognominal mask. nope, con means cunt, both in denotation and derogative connotation.
21:10 masak ah, now Google Translate got it right.
21:12 cognominal (google translate)--  does not say in what language register(s) a word belong and how derogative a word is.
21:13 cognominal well you can hess from it that 'con' is a very versatile word in French
21:13 masak indeed.
21:14 masak it's unusual for such a word to be in a very formal register. ;)
21:14 masak Pinker has a wonderful TED talk where he mis-uses registers in sentences. causing the audience to laugh out of pure confusion. :)
21:14 cognominal It is somewhere in between 'yo' and 'bitch' used by Pinkman in Breaking bad.
21:15 masak haven't seen, sorry.
21:15 cognominal masak: nope, con is nerved used in a formal register. That's why I complained about google translate
21:15 cognominal *never
21:16 cognominal masak, do you know 'breaking bad'?
21:16 cognominal http://www.youtube.com/watch?v=kXFSmMlx6f4
21:17 cognominal I don't know the name for that kind of word.
21:17 arnsholt Speaking of registers, do you know what an important part of the training data for Google translate it? =)
21:17 sorear vulgar?
21:18 cognominal nope, I mean 'yo'.
21:18 arnsholt sorear: Quite the opposite
21:18 cognominal it has no semantic value. But Jesse alternatively use 'bitch' that has semantic value
21:19 arnsholt An important part is a corpus called EuroParl. Transcribed translations of parliamentary debates in the EU parliament
21:19 sorear arnsholt: answering cognominal, thought "never used in formal register" ... "name for kind of word" was connected
21:19 arnsholt Oh, right. Sorry
21:19 * sorear keeps thinking cognominal rhymes with polynomial
21:19 cognominal In south France, you can use with friends 'con' for emphasis. It has no derogative meaning.
21:19 arnsholt Anyways, part of making an SMT system good is fixining the weirdness of the corpus =)
21:20 masak cognominal: I'm not sure I agree with your definition of 'semantic value', whatever it is. it sounds very old-skool. :P
21:21 sorear i wonder if there are any interesting anomalies resulting from {en,de}.wikipedia.org
21:21 masak cognominal: conversation is just bit-twiddling in someone else's brain, using a (generally) agreed-upon API. that's all.
21:21 masak or s/conversation/language/ if you will.
21:22 sorear cognominal: interjections have no grammatical role
21:22 sorear masak: no semantic value makes me think of "IT is raining"
21:22 sorear which I think is also an example from Pinker...
21:23 cognominal my youtube video does not give the whole sentences :(
21:24 masak sorear: oh, I thought "it" was just a short-hand referent for "the weather"...
21:25 cognominal sorear: Interjections, that's the word.  my point is that 'yo' and 'bitch' used by pinkman  has semantic value. 'yo' as emphasis, and 'bitch' as insult.
21:26 masak "Interjections", at least, are clearly defined. they're probably the least "grammatical" parts of speech, though. :) they don't compose at all.
21:27 timotimo_ where is that ted talk masak? :)
21:27 masak timotimo_: hold on.
21:29 masak timotimo_: http://www.ted.com/talks/steven_pinker_on_language_and_thought.html
21:29 timotimo_ thank you :)
21:34 masak the example around ~4:00 that compares "give X to Y" or "give Y X" shows up in programming as well. you want to emphasize various things at different times.
21:34 masak that's one reason we have both subs and methods. :)
21:34 masak and that's why I tend to spend a lot of though thinking about expression end-weight when I program.
21:35 masak ...this, and more, will be topics in my online IRC course -- date to be announced. sign up today! :D
21:35 cognominal where do I sign?
21:36 cognominal :)
21:36 masak right here, on my cast :P
21:36 masak (consider yourself signed) :)
21:37 masak aaaah. if I could homestead inside Pinker's brain, I would.
21:38 sorear masak: get the books.  all of them.
21:40 sorear (maybe not _all_, you can skip _The Blank Slate_ and _Better Angels_ if you aren't into sociology)
21:40 aindilis joined #perl6
21:43 arnsholt I really should read The language instinct
21:44 arnsholt I'm not a fan of Chomsky and the associated theories, but I should probably read the books anyways
21:45 diakopter rn: fork() && die
21:45 p6eval niecza v24-35-g5c06e28: OUTPUT«[31m===[0mSORRY![31m===[0m��Undeclared routine:�     'fork' used at line 1��Unhandled exception: Check failed��  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) �  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) �  at /hom…
21:45 p6eval ..rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    fork used at line 1��»
21:48 masak sorear: at some point, I will definitely read "Better Angels". so far I've only read "The Language Instinct", but I really liked that one.
21:50 cognominal joined #perl6
21:54 sorear masak: pretty sure the "give X to Y / give Y X" thing is from "The Stuff of Thought", you should prioritize that one too
21:56 masak yes, I gathered as much from the talk abstract.
21:57 sorear seems I'm at 5.5/11. need to track down the older books
22:01 Targen joined #perl6
22:08 lue added some thoughts on slang's special handling of augment and supersede: https://gist.github.com/lue/5241230
22:10 Woodi joined #perl6
22:20 masak lue: congratulations, you've now reached the "need to hash this out with TimToady" level. :)
22:20 lue Really? I didn't feel the ride up. :)
22:20 masak and TimToady is out of commission for about a week, so you'll have to be patient.
22:21 diakopter 1 week, plus or minus a lot of weeks
22:21 lue Yeah. (I knew this last night when I talked about wanting to know what the original slang creator thought a slang encompassed (grammar or grammar+actions) )
22:22 lue .oO(Here's to a safe recovery for TimToady++)
22:27 masak lue: I think you're making good headway. it's a tough problem, which is why it's still inconsistent in the spec. but someone needs to dig down into the veins of possibility, mining for a sane solution. geep going. :)
22:27 masak keep*
22:27 anocelot .oO("Geep" would make an excellent word.  But what would it mean...?)
22:30 jeffreykegler joined #perl6
22:30 masak anocelot: https://duckduckgo.com/?q=what+does+%22geep%22+mean%3F
22:31 jeffreykegler Yes, a speedy recover to TimToady++
22:31 jeffreykegler I very much look forward to the exchange re slang's, etc.
22:32 * masak .oO( maybe even several exchange's... )
22:32 thou joined #perl6
22:33 lue https://duckduckgo.com/?q=definition+of+geep
22:38 sjohnson joined #perl6
22:39 anocelot (None of the deffs I say were very satisfactory.)
22:40 xilo joined #perl6
22:43 cognominal joined #perl6
22:43 lue "geep" sounds to me like "to make high-pitched, nervous noises." ==> "geep going" = "make high-pitched noises while going"
22:45 sorear o/ jeffreykegler
22:45 jeffreykegler hi
22:58 cognominal joined #perl6
23:29 woolfy left #perl6
23:33 cognominal joined #perl6
23:38 armitage joined #perl6

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

Perl 6 | Reference Documentation | Rakudo