»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:00 awwaiid left
sorear generally, that means that some code tried to use $!foo when "self" isn't defined 00:00
it can be secondary to trying to call methods on undefined values 00:01
00:02 supernovus left 00:03 bro_grammer joined 00:04 Circlepuller_ joined 00:06 hash_table left, Circlepuller left
[Coke] hurm. thanks. 00:08
I suspect this is an issue with the conversion of everything to a method. 00:10
00:17 tokuhiro_ joined 00:22 tokuhiro_ left
[Coke] nqp: class EEK {}; my $a:= EEK.new(); say +$a; 00:23
p6eval nqp: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤␤current instr.: 'Numeric' pc 3450 (src/stage2/gen/NQPCORE.setting.pir:1608) (src/stage2/NQPCORE.setting:171)␤»
[Coke] nqp: class EEK {method Numeric() {return 3}}; my $a:= EEK.new(); say(+$a);
p6eval nqp: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤␤current instr.: 'Numeric' pc 3450 (src/stage2/gen/NQPCORE.setting.pir:1608) (src/stage2/NQPCORE.setting:171)␤»
[Coke] how do I fix that one?
cognominal TimToady, I wish one could write .%a for %a{$_} so that (*++).%a became { %a{$_}++ } # need sleep to say if it make any sense. See you tomorrow. 00:27
[Coke] r: class EEK {method Numeric() {return 3}}; my $a:= EEK.new(); say(+$a); 00:29
p6eval rakudo fb11f1: OUTPUT«3␤»
[Coke] hurm. nqpbug?
sorear good question; no clue. 00:31
[Coke] : class EEK {method Numeric() {return 3}}; my $a:= EEK.new(); say(+$a); 00:32
n: class EEK {method Numeric() {return 3}}; my $a:= EEK.new(); say(+$a);
p6eval niecza v22-6-g9e5350d: OUTPUT«3␤»
00:32 aharoni left
[Coke] github.com/perl6/nqp/issues/59 00:34
00:39 kst left 00:48 kst joined 00:53 cognominal left, cognominal joined 00:54 sivoais left
[Coke] nqp: module String { sub eek() { say("eek");} } String::eek(); 01:08
p6eval nqp: OUTPUT«Confused at line 2, near "module Str"␤current instr.: 'panic' pc 19999 (src/stage2/gen/NQPHLL.pir:7315) (src/stage2/gen/NQPHLL.pm:324)␤»
[Coke] nqp: module String { sub eek() { say("eek");} }; String::eek();
p6eval nqp: OUTPUT«invoke() not implemented in class 'NQPMu'␤current instr.: '' pc 91 ((file unknown):53) (/tmp/sA6ucNekpn:1)␤»
[Coke] rakudo: module String { sub eek() { say("eek");} }; String::eek();
p6eval rakudo fb11f1: OUTPUT«Could not find symbol '&eek'␤ in method <anon> at src/gen/CORE.setting:9934␤ in at src/gen/Metamodel.pm:2380␤ in any find_method_fallback at src/gen/Metamodel.pm:2368␤ in any find_method at src/gen/Metamodel.pm:922␤ in at src/gen/BOOTSTRAP.pm:827␤ in any a…
[Coke] rakudo: module ring { sub eek() { say("eek");} }; ring::eek(); 01:09
p6eval rakudo fb11f1: OUTPUT«Could not find symbol '&eek'␤ in method <anon> at src/gen/CORE.setting:9934␤ in at src/gen/Metamodel.pm:2380␤ in any find_method_fallback at src/gen/Metamodel.pm:2368␤ in any find_method at src/gen/Metamodel.pm:922␤ in at src/gen/BOOTSTRAP.pm:827␤ in any a…
[Coke] Should that work (in rakudo or nqp?)
01:25 kurahaupo left 01:30 Targen left 01:31 fgomez joined 02:00 arnsholt left 02:01 jaldhar joined 02:04 arnsholt joined 02:14 cognominal left, jaldhar left
sorear [Coke]: last one should not work, since subs are "my" by default. 02:15
02:15 jaldhar joined
sorear nr: module ring { our sub eek() { say("eek");} }; ring::eek(); 02:16
p6eval rakudo fb11f1, niecza v22-6-g9e5350d: OUTPUT«eek␤»
sorear nqp: module ring { our sub eek() { say("eek");} }; ring::eek();
p6eval nqp: OUTPUT«eek␤»
02:17 macae joined 02:23 sivoais joined 02:39 skids joined 02:40 simcop2387 left 02:41 fgomez left, simcop2387 joined 02:42 orafu left, orafu joined 02:49 VXZ joined 02:57 raiph joined 02:58 fgomez joined 03:15 kst left 03:27 VXZ left, xinming_ left 03:28 fgomez left 03:29 xinming joined 03:30 fgomez joined 03:36 sftp left 03:42 adeux joined
adeux helo 03:43
hello
sorear ehlo 03:44
03:45 skids left
adeux i think i have to have lunch 03:46
03:57 adeux left 04:00 gootle joined 04:17 seedlings joined 04:20 popl joined 04:21 telex left 04:22 seedlings left, telex joined 04:26 kaleem joined 04:31 telex left 04:32 fgomez left 04:38 VXZ joined, telex joined 04:40 fgomez joined 04:44 mjreed joined
mjreed is HLL supposed to work in NQP still? 05:00
sorear What do you mean by HLL?
Also, which of the three incompatible languages named NQP do you mean? 05:01
mjreed in this case, the one I get when I configure rakudo star with --gen-nqp.
and by HLL I mean the high-level-language compiler parent classes loaded by 'use HLL' from inside said NQP. 05:02
> use HLL;
A method named 'backtrack' already exists in class 'PAST;Regex'. It may have been supplied by a role.
> class TinyLang::Grammar is HLL::Grammar { }
Null PMC access in find_method('new')
05:03 kst joined 05:10 mjreed1 joined
sorear mjreed1: it's certainly still possible to write hll compilers in the new nqp which rakudo star has shipped with for a year or less. it's possible some details have changed 05:10
05:12 mjreed left
mjreed1 ok, I'll poke around some more.. 05:17
guess my example code is out o fdate
sorear quite likely 05:18
05:18 sjohnson left
sorear alas I'm not much use as an nqp resourse 05:18
mjreed1 np. thanks for answering! 05:19
05:19 mjreed1 left 05:20 bro_grammer left 05:22 sjohnson joined 05:23 sweet_kid left 05:25 _daniel-s__ joined 05:28 daniel-s__ left, aharoni joined, hoelzro|away left, hoelzro|away joined 05:31 changedNicks joined 05:49 birdwindupbird joined
moritz good morning 05:53
sorear good morning moritz. 05:54
moritz \o sorear 05:56
05:59 kst left 06:00 VXZ left 06:04 wtw joined
raiph hi sorear, moritz 06:05
sorear hello raiph 06:06
06:06 sjohnson left, sjohnson joined 06:07 mikemol left
raiph I emailed Viacheslav Tykhanovskyi who runs perltuts.com/. He said "Perl6 would be nice. ... isn't a problem if it's a .deb package. .. As for motivation... That's simple. A tutorial in Perl6 ;)" I said I'd share this on #perl6. 06:20
06:21 jaldhar left 06:30 mikemol joined 06:36 VXZ joined 06:43 flightrecorder joined 06:49 FROGGS joined 07:07 popl left
raiph exit 07:17
07:17 raiph left 07:28 VXZ left 07:32 hoelzro|away is now known as hoelzro 07:38 Patterner left 07:40 Psyche^ joined, Psyche^ is now known as Patterner, flightrecorder left, FROGGS left 07:41 flightrecorder joined, FROGGS joined 07:50 grondilu joined
grondilu n: say pack "s", -1 07:50
phenny grondilu: 03 Oct 21:25Z <_edwin> tell grondilu you could use the known digest of some constant data to find out (e.g. digest of empty message)
grondilu: 03 Oct 21:25Z <sorear> tell grondilu Why not just have the digest function return a Buf?
p6eval niecza v22-6-g9e5350d: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'pack' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) ␤ at /home…
grondilu r: say pack "s", -1 07:52
p6eval rakudo fb11f1: OUTPUT«Unrecognized directive 's'␤ in block at src/gen/CORE.setting:7231␤ in method reify at src/gen/CORE.setting:5282␤ in method reify at src/gen/CORE.setting:5184␤ in method reify at src/gen/CORE.setting:5184␤ in method gimme at src/gen/CORE.setting:5562␤ in meth…
grondilu if I submit a patch for signed integers in pack/unpack, do I have submit one for the spectest as well? 07:53
moritz it would be nice if you did 07:54
07:54 am0c joined 08:00 fhelmberger joined 08:05 kst joined 08:07 Chillance left 08:11 kresike joined
kresike good morning all you happy perl6 people 08:11
08:14 xinming left 08:21 flightrecorder left, FROGGS left, flightrecorder joined 08:22 FROGGS joined 08:30 broquain1 is now known as broquaint 08:31 dakkar joined, daniel-s joined 08:35 _daniel-s__ left
tadzik hello #perl6 08:45
sorear tadzik! 08:46
tadzik sorear! 08:48
08:49 kurahaupo joined
kresike hello tadzik o/ 08:49
08:51 SamuraiJack joined
grondilu I've noticed something. If I make a modif in one of src/core/ module (Buf.pm for instance), I must recomple everything thing to test it, right? Is there a way not to? 08:53
moritz you can augment classes and redefine subroutines from outside the setting 08:54
grondilu Oh I can redefine subroutines? I thought I had tried that with no success once. I'll try again. It's MONKEY_PATCH or something, right? 08:57
tadzik r: my &sort = sub (*@a) { say @a.perl }; sort <a b c> 08:58
p6eval rakudo fb11f1: OUTPUT«Array.new("a", "b", "c")␤»
tadzik this way probably
grondilu would it work with class methods? 08:59
tadzik for that you probably have to augment class 09:00
and use MONKEY_TYPING I think
09:00 spider-mario joined
grondilu that's what I tried once. I could add methods, but I don't think I managed to redefine one. 09:01
09:01 xinming joined
tadzik maybe what you want is to subclass it 09:03
grondilu yeah that's probably the best, but I'll have to use a custom name everywhere in the code. But I guess that makes sense for a customization. 09:04
grondilu will do that. 09:05
moritz grondilu: you can also remove the method from the class once, recompile 09:06
then augment
and once you're done, you can copy the method back in
09:07 lorn left 09:09 lorn joined
grondilu moritz: oh yeah, that's smart 09:09
though if I remove a method form a core class, isn't there a risk that compilation fails? 09:12
moritz only for something central as Attribute or List or so 09:13
if you remove some helper method, or from IO/Buf/Version/... it won't care
tadzik do we catch missing methods in compile time?
moritz no
the compilation can only fail if the compiler calls that method
tadzik right
grondilu has an other question about panda 09:14
tadzik go ahead 09:15
grondilu Once I added a personal module in ~/.perl6/lib, and panda messed it up when I reboostraped it.
tadzik oh yes, sorry for that :(
panda clears ~/.perl6/lib when you rebootstrap
grondilu that's not nice 09:16
tadzik it should probably only clear things that it installed before
I know, sorry
grondilu :)
no problem.
moritz I now firmly believe that panda should never touch ~/.perl6/lib 09:17
and that we shouldn't look there by default either
grondilu it was a symlink anyway, so panda did not actually remove anything.
moritz it makes it impossible to use two different rakudos
grondilu moritz: where should I put my personal modules, then?
tadzik true
moritz grondilu: rakudo should offer a variable containing an install path for that specific rakudo version 09:18
r: say @*INC
p6eval rakudo fb11f1: OUTPUT«/home/p6eval/.perl6/lib /home/p6eval/nom-inst/lib/parrot/4.8.0-devel/languages/perl6/lib␤»
moritz so probably $INSTALL/lib/parrot/$PARROT_VERSION/languages/perl6/custom-lib/ or so
grondilu so you advise me to put *my* modules there?
moritz once we have that mechanism in place, yes 09:19
if you still want a global location, you can just set PERL6LIB
sorear sleep&
grondilu ok 09:20
r: role Foo { method gist { "Foo" } }; my $x = Mu but Foo; say $x; 09:26
p6eval rakudo fb11f1: OUTPUT«Foo␤»
09:27 domidumont left
grondilu ^ maybe I can use this to redefine methods? 09:27
r: role Foo { method gist { "Foo" } }; my $x = Mu but Foo; say $x.WHAT;
p6eval rakudo fb11f1: OUTPUT«Foo␤»
09:27 domidumont joined
grondilu ah, no actually. Nevermind. 09:29
09:36 xinming left 09:38 xinming joined 09:52 spider-mario left 09:54 daxim joined 10:00 wk left 10:01 mtk left 10:15 mtk joined 10:28 grondilu left 10:31 jlaire left 10:33 jlaire joined 10:44 jaldhar joined 10:48 kurahaupo left 10:51 mucker joined 10:58 wk joined 11:02 kurahaupo joined 11:03 spider-mario joined 11:04 gootle left 11:05 Su-Shee_ joined 11:07 Su-Shee left 11:08 Su-Shee_ is now known as Su-Shee
dalek rlito: 805d42e | (Flavio S. Glock)++ | / (2 files):
Perlito5 - perl5 - fix emitted code for $$x[0]
11:11
jnthn evening o/ 11:12
phenny jnthn: 03 Oct 20:15Z <moritz> ask jnthn to please check my latest reply to rt.perl.org/rt3/Ticket/Display.html?id=75640 for sanity
jnthn: 03 Oct 20:30Z <mathw> tell jnthn his YAPC::Asia talk is awesome
jnthn moritz: In your "if we work around..." section, it looks like you mean tto add "multi", but forgot? 11:13
moritz jnthn: erm, yes 11:15
copy&paste gone wrong :(
r: proto sub f(Int) { nextsame }; multi sub f() { }; f(3)
p6eval rakudo fb11f1: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'f' will never work with argument types (int) (line 1)␤ Expected any of:␤ :()␤»
moritz r: proto sub f(Int) { nextsame }; multi sub f(*@) { }; f(3) 11:16
p6eval rakudo fb11f1: OUTPUT«nextsame is not in the dynamic scope of a dispatcher␤ in block at src/gen/CORE.setting:485␤ in sub f at /tmp/7oyYakAueD:1␤ in block at /tmp/7oyYakAueD:1␤␤»
moritz and I think the line above is a premature optimization
jnthn hm...
moritz but the real question from that ticket is if 'nextsame is not in the dynamic scope of a dispatcher' is the correct error message
or if nextsame should try to re-dispatch to the multis of the proto 11:17
jnthn r: sub foo() { nextsame }
p6eval rakudo fb11f1: ( no output )
jnthn er
r: sub foo() { nextsame }; foo()
p6eval rakudo fb11f1: OUTPUT«nextsame is not in the dynamic scope of a dispatcher␤ in block at src/gen/CORE.setting:485␤ in sub foo at /tmp/REGItfmhny:1␤ in block at /tmp/REGItfmhny:1␤␤»
jnthn I expect consistency with that, which is what we have
No, the syntax for entering the dispatcher is {*}. nextsame is for iterating in a dispatch that is already ongoing, not for entering a dispatcher.
Plus nextsame in a proto method already has a meaning :) 11:18
moritz ok, then what I wrote in the ticket seems fine
modulo copy&paste error
jnthn aye
12:18 benabik left 12:26 kurahaupo left 12:29 GlitchMr joined 12:33 benabik joined 12:42 macae left 12:49 gootle joined 12:50 tokuhiro_ joined 12:51 tokuhiro_ left 12:52 tokuhiro_ joined, orafu left 12:56 PacoAir joined 12:57 skids joined 12:58 leprevost joined, hash_table joined 13:03 MayDaniel joined
dalek rlito: 27eaafa | (Flavio S. Glock)++ | / (5 files):
Perlito5 - js - fix local(); use hash and array through accessors
13:03
13:04 leprevost left 13:05 PacoAir left, PacoAir joined 13:06 sftp joined, changedNicks left 13:07 SamuraiJack_ joined, SamuraiJack left, daniel-s_ joined 13:10 hoelzro left, hoelzro joined 13:11 SamuraiJack_ left 13:12 sjn joined, daniel-s left, changedNicks joined 13:14 benabik left 13:22 skids left 13:26 mucker left, grondilu joined
grondilu ==> Testing MongoDB 13:27
t/find.t .... 3/9 No such method 'id' for invocant of type 'Any'
13:31 hash_table left
[Coke] sorear++ for the my/our sub note. now my little sample works, but partcl is still complaining that it can't find the sub in the module. hurm. 13:35
13:37 Patterner left
[Coke] ah. the module is being defined /inside/ a class. 13:40
13:40 integral left
[Coke] nqp: class One { module Two { our sub Three() {say(3)} } ; method Four() {Two::Three()} }; One.new().Four() # can Four be written in a way that invokes Three? 13:41
p6eval nqp: OUTPUT«3␤»
[Coke] ... locally that doesn't work. hurm.
can we get nqp to tell us which version it's running?
Bother. wonder if I hadn't run "make install" on my nqp build in a few days. 13:43
moritz it wouldn't hurt to add the NQP revision to the evalbot output
just needs doing
[Coke] argh. now /that/ sample works, but partcl still doesn't. ;) 13:45
13:48 mucker joined, PacoAir left, PacoAir joined 13:49 changedNicks left, changedNicks joined, changedNicks is now known as sweet_kid, integral joined, integral left, integral joined 13:50 daniel-s__ joined, tokuhiro_ left 13:52 user_2239 joined 13:53 hoelzro left, user_2239 left, changedNicks joined, hoelzro joined, sweet_kid left 13:54 changedNicks is now known as sweet_kid, daniel-s_ left
grondilu what's the equivalent of perl 5's -X File ? 13:55
13:55 rindolf joined
grondilu I mean "file test", like -f, -r, -x and so on. 13:56
flussence star: say '.'.IO.d 13:57
p6eval star 2012.07: OUTPUT«True␤»
moritz r: say '.'.path.d
p6eval rakudo fb11f1: OUTPUT«True␤»
moritz .IO will be deprecated eventually
(or will open the path)
jnthn Oh? 13:58
jnthn didn't know that :)
flussence on everything? or just dirs?
grondilu ok, thanks. But once it's deprecated, what will be used?
moritz .path
grondilu even for a file? 13:59
moritz the idea is that if you want to deal with paths, you use .path
and if you want to deal with file or dir *HANDLES*, you use .io or .IO or some such
or maybe .open
grondilu ok 14:00
moritz wonders if anybody ever read his huge refactorings to S32::IO
grondilu moritz: I will. I swear :) 14:01
yet I kind of liked Perl5's syntax for this.
14:02 stopbit joined 14:03 flightrecorder left
moritz in p6 you can say if $p.path ~~ :d { say "$p is a directory" } 14:03
if you like that better
14:04 FROGGS left
grondilu not bad indeed 14:04
14:05 flightrecorder joined, flightrecorder left
jnthn sleep & 14:07
14:09 jlaire left
grondilu how do I negate a smart match in a 'when'? 14:10
r: given "foo" { when not /z/ { say "no match" } }
p6eval rakudo fb11f1: OUTPUT«No such method 'match' for invocant of type 'Any'␤ in method Bool at src/gen/CORE.setting:10182␤ in sub prefix:<not> at src/gen/CORE.setting:2312␤ in block at /tmp/D4H9u_ayrW:1␤␤»
grondilu see what I mean? 14:11
timotimo yeah, when takes an object to match against, not takes a thing that can Bool and returns the other Bool
colomon moritz: where are your refactorings?
moritz in the specs repo
grondilu r: given "foo" { when not $_ ~~ /z/ { say "no match" } }
p6eval rakudo fb11f1: OUTPUT«no match␤»
moritz done about 2 months ago or so
grondilu r: given "foo" { when not $_ ~~ /z/ { say "not very elegant" } } 14:12
p6eval rakudo fb11f1: OUTPUT«not very elegant␤»
[Coke] nqp: class Builtins { method concat() { say(String::trim()) }; module String { our sub trim() { say("ALIVE") } } }; say(Builtins.new().concat());
p6eval nqp: OUTPUT«invoke() not implemented in class 'NQPMu'␤current instr.: 'concat' pc 195 ((file unknown):95) (/tmp/aWEIm6KA__:1)␤»
[Coke] there we go.
14:12 sirrobert left
moritz r: given 'foo' { when !/z/ { say "oh hai" } } 14:13
p6eval rakudo fb11f1: OUTPUT«No such method 'match' for invocant of type 'Any'␤ in method Bool at src/gen/CORE.setting:10182␤ in sub prefix:<!> at src/gen/CORE.setting:2308␤ in block at /tmp/PwjtiOuuyV:1␤␤»
[Coke] Should that work?
grondilu would like to write: given "foo" { not when /z/ { say "no match" } }
14:14 jlaire joined
grondilu r: given "foo" { unless /z/ { say "no match" } } 14:15
p6eval rakudo fb11f1: OUTPUT«no match␤»
14:15 kaare__ joined
grondilu ^ is that the same? 14:15
colomon grondilu: no 14:16
grondilu: I agree that not when would be handy. or when not? 14:17
moritz: is it S32 or S16?
grondilu maybe a whennot or notwhen keyword? 14:18
moritz colomon: I've changes some stuff in S16 too, but mostly S32::io
[Coke] jnthn: any ideas on nqp#59?
r: class Builtins { method concat() { say(String::trim()) }; module String { our sub trim() { say("ALIVE") } } }; say(Builtins.new().concat());
p6eval rakudo fb11f1: OUTPUT«Could not find symbol '&trim'␤ in method <anon> at src/gen/CORE.setting:9934␤ in at src/gen/Metamodel.pm:2380␤ in any find_method_fallback at src/gen/Metamodel.pm:2368␤ in any find_method at src/gen/Metamodel.pm:922␤ in at src/gen/BOOTSTRAP.pm:827␤ in any … 14:19
grondilu n: given "foo" { when not /z/ { say "no match" } } 14:22
p6eval niecza v22-6-g9e5350d: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/lib/CORE.setting line 1289 (warn @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 266 (Mu.Str @ 15) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting…
colomon moritz: actually, S32 IO looks pretty good to me now. The only thing that gives me any hesitation is IO as a role which does nothing... should it just be a module? (p6 doesn't have namespaces, right?) 14:23
moritz: how much of that works in rakudo now? 14:24
dalek rlito: bd0dff3 | (Flavio S. Glock)++ | / (5 files):
Perlito5 - js - tie() placeholder
colomon should have said moritz++ moritz++ and apologized for negative comments on the state of S32 IO -- I hadn't seen the new stuff. (Or at least, I hadn't remembered seeing the new stuff.)
14:27 wk left
moritz colomon: (re IO being a role that does nothing) that's called a "tag role", ie it's used to identify stuff as being IO related 14:29
colomon: and if it were just a module, we would have to check the name of classes, instead of doing a typecheck (if we want to know if they are related to IO) 14:30
colomon moritz: but when would you want to know if something was "related" to IO?
14:31 Kim_Breitwieser joined
moritz colomon: when you write something that tries to DWIM 14:31
colomon example? 14:32
moritz colomon: or maybe filter out any potentially dangerous object from a list, or so
colomon: for example a template system that has a "source" parameter
and if it's IO, it tries to read from it (or open it, and then read, or whatever)
and otherwise it treats it as a string
not saying it's a great use case, just saying it doesn't hurt to have such a thing 14:33
colomon but wouldn't that be more clearly handled as "If it's IO::Handle, it reads from it; if it's IO::Path, it tries to open it; otherwise it treats it as a string"?
moritz that doesn sound cleaner 14:35
14:40 hash_table joined
grondilu rn: constant x = "foo" ~~ /bar/; 14:41
p6eval niecza v22-6-g9e5350d: ( no output )
..rakudo fb11f1: OUTPUT«===SORRY!===␤Cannot assign to a non-container␤»
colomon moritz: actually, this is a pretty good mental exercise.
because how do you open an IO::Path? 14:42
14:42 flightrecorder joined
colomon moritz: right now the only way I'm seeing is open($path.Str, ... blah) which seems like it would work but is less than awesome 14:43
moritz IO::Path.open
r: say "README".path.open.get
p6eval rakudo fb11f1: OUTPUT«Unable to open filehandle from path 'README'␤ in method open at src/gen/CORE.setting:7338␤ in sub open at src/gen/CORE.setting:7585␤ in method open at src/gen/CORE.setting:7524␤ in block at /tmp/hK64ZcELEO:1␤␤»
moritz is that missing from S32::IO? 14:44
r: say "nom/README".path.open.get
p6eval rakudo fb11f1: OUTPUT«Rakudo Perl 6␤»
colomon yes
at least, it's not in S32 IO on perlcabal 14:45
moritz I don't have a secrect copy with extra stuff :-)
colomon but sometimes perlcabal is slow to match spec changes
but in this case, it's not there either. 14:46
hey, with git it's easy enough to have secret copies with extra stuff.
colomon has had entire months where his version of niecza had special, not quite working functions in it... 14:47
14:54 Psyche^ joined, Psyche^ is now known as Patterner 14:57 FROGGS joined, sirrobert joined 14:58 skids joined
dalek rlito: bc4bbb3 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - js - tie() placeholder; more
14:59
15:03 mucker left, mars__ joined 15:04 mucker joined 15:07 sirrobert left 15:09 sirrobert joined 15:13 am0c left
colomon just got a "Malformed UTF-8 string" error from Rakudo 15:13
15:15 sirrobert left
kresike bye folks 15:18
15:18 kresike left 15:21 GlitchMr left 15:22 hoelzro is now known as hoelzro|away 15:24 GlitchMr joined
dalek rlito: 9a2d51f | (Flavio S. Glock)++ | / (5 files):
Perlito5 - js - tie() emitter
15:31
15:37 fgomez left 15:53 Kim_Breitwieser left 15:55 fgomez joined 15:58 bluescreen10 joined 16:10 spider-mario left, spider-mario joined 16:11 kaleem left 16:13 bbobby joined 16:14 bbobby left 16:19 jerome_ joined, jerome_ left 16:30 mucker left 16:34 benabik joined 16:38 mjreed joined 16:41 daxim left 16:43 cognominal joined, Vlavv` joined 16:46 Vlavv_ left 16:47 birdwindupbird left, sirrobert joined 16:49 cognominal left 16:51 SamuraiJack_ joined, cognominal joined 16:54 fgomez left 16:58 _edwin joined
_edwin hi perl6! 16:58
TimToady++, nice cleanups of my rosettacode contribution 16:59
sirrobert \o
_edwin I especially like the my $M = 1 + [+] (numers Z/ denoms) ... * < 1e-6; # wouldn't hace thought of this 17:00
have* 17:01
sorear, I think your gut feeling about the longest trail problem being NP-complete was right 17:03
because it is possible to transform the longest path problem into a longest trail problem by splitting each vertex into two vertices, one with all the incoming edges, one with all the outgoing edges, and a new edge inbetween 17:04
TimToady glad you liked it. these days I tend to think of "shift" as a code smell, an imperative smell, if not exactly a bad smell 17:05
I'm also tending to use \foo declarations for SSA-style naming of temp results 17:06
sirrobert r: "abc:def".subst(/<-[ A..Z a..z 0..9 ]>/, *.ord.fmt("%%%02X"), :g); 17:07
p6eval rakudo fb11f1: OUTPUT«===SORRY!===␤Invalid hard reference syntax at line 2, near "%%02X\"), :"␤»
sirrobert That's the "url-encode" example from Rosetta Code 17:08
rosettacode.org/wiki/URL_encoding#Perl_6
Not sure what a "hard reference syntax" means
any tips? =)
_edwin that lends itself particularly well to (sequences of) mathematical expressions, i think (resp. sigilless style)
TimToady especially when the original was specified using mathematical italics and such, since Unicode has those :) 17:09
sirrobert: it doesn't like the %%%
n: "abc:def".subst(/<-[ A..Z a..z 0..9 ]>/, *.ord.fmt("%%%02X"), :g); 17:10
p6eval niecza v22-6-g9e5350d: OUTPUT«===SORRY!===␤␤Invalid hard reference syntax at /tmp/1QjgREgqT7 line 1:␤------> st(/<-[ A..Z a..z 0..9 ]>/, *.ord.fmt("%⏏%%02X"), :g);␤␤Parse failed␤␤»
TimToady try single quotes
sirrobert TimToady: Ok, hm
trying
yeah, thanks
might be worth fixing in Rosetta Code 17:11
17:11 fhelmberger left
TimToady it tests the %% before it realizes there's no {}, which might or might not be easy to fix 17:11
feel free to fix RC, it's a wiki :)
sirrobert =) 17:12
17:12 wk joined, pmurias joined, fhelmberger_ joined 17:13 fhelmberger_ left, kaleem joined 17:15 fhelmberger_ joined
TimToady rosettacode.org/wiki/Kaprekar_numbe...8fast.29_2 17:15
I had to write the loops using loop rather than for
using 'for' was very slow 17:16
sirrobert huh
TimToady slower than the non-casting-out-nines solution
(under niecza, but probably under rakudo as well, except it blew up my memory first)
we could probably use an optimizer that recognizes when a for can be rewritten into a loop 17:17
or find some way to expedite binding of simple loop variables 17:19
maybe we're getting bit by unnecessary closure cloning or some such
17:21 hoelzro|away is now known as hoelzro
TimToady or maybe it's the "not realizing the loop is in sink context" problem again 17:21
17:22 dakkar left
TimToady (a gather is supposed to sink its innards) 17:23
propagating sink context to avoid storing stuff is going to be another important optimization 17:25
17:25 SamuraiJack_ left 17:26 cognominal left 17:28 mjreed left, SamuraiJack joined
TimToady seems to leak badly in rakudo even if I explicitly sink the loops 17:30
17:30 benabik left
TimToady here's the 'for' version if anyone wants to fiddle with it: wall.org/~larry/kap9for.p6 17:31
(doesn't leak in niecza, is just slowwww) 17:32
compared to the 'loop' version on RC, that is
17:34 cognominal joined, fhelmberger_ left, fhelmberger joined
diakopter explicitly sink? 17:38
TimToady putting a () after and/or putting sink before 17:40
diakopter how long does it take in rakudo and niecza 17:41
17:42 Chillance joined 17:49 kaleem left 17:55 snearch joined 17:56 mjreed joined 18:00 kaleem joined 18:08 integral left
_edwin is it possible to tell eval not to introduce a lexical scope? 18:10
18:11 integral joined, integral left, integral joined 18:13 benabik joined
_edwin I thought of doing something like 'file.pl'.path.open.slurp.eval; for rosettacode.org/wiki/Include_a_file 18:14
18:15 kaleem left 18:18 mjreed1 joined, mjreed left
_edwin but it does not "splice" into the current lexical scope. I see that it is cleaner this way, but is it possible to force an "unhygienic" eval? 18:19
18:20 GlitchMr42 joined, GlitchMr left
_edwin nr: BEGIN { eval 'say "foo"' } 18:21
p6eval rakudo fb11f1, niecza v22-6-g9e5350d: OUTPUT«foo␤»
_edwin hm, missing somthing, I got a "Confused" locally 18:22
18:23 cognominal left 18:24 cognominal joined, GlitchMr42 is now known as GlitchMr
_edwin nr: BEGIN { eval 'say "foo"' }␤say "bar" 18:26
p6eval niecza v22-6-g9e5350d: OUTPUT«foo␤bar␤»
..rakudo fb11f1: OUTPUT«foo␤===SORRY!===␤Confused␤at /tmp/q40bpgnGUA:1␤»
_edwin that's the one
18:27 fgomez joined
timotimo r: BEGIN { eval 'say "foo"' }; say "bar" 18:27
p6eval rakudo fb11f1: OUTPUT«foo␤bar␤»
timotimo go figure!
_edwin rakudobug?
std: BEGIN { eval 'say "foo"' }␤say "bar" 18:28
18:28 birdwindupbird joined
p6eval std 77327a4: OUTPUT«ok 00:00 43m␤» 18:28
18:30 mars__ left 18:31 GlitchMr42 joined 18:32 GlitchMr left, GlitchMr42 is now known as GlitchMr
timotimo seems like a rakudobug indeed. 18:33
sorear good * #perl6 18:35
18:37 broquaint left 18:41 sirrobert left 18:42 cognominal left 18:45 fhelmberger_ joined 18:47 fhelmberger left 18:52 broquaint joined
rindolf sorear: hello. 18:53
18:56 sudokode left, sudokode joined 18:59 sudokode left, sudokode joined 19:01 sudokode is now known as gtmanfrzzzz 19:02 gtmanfrzzzz is now known as sudokode
TimToady nr: proto infix:<of> (|) is equiv(&infix:<X>) {*}; multi infix:<of>(\slice, @a) { @a[slice] }; multi infix:<of>(\slice, %h) { %h{slice} }; say 'HOME','SHELL' of %*ENV; 19:08
p6eval niecza v22-6-g9e5350d: OUTPUT«/home/p6eval /bin/bash␤»
..rakudo fb11f1: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Mu:U $child, Mu:U $parent)␤:(Attribute:D $attr, :rw(:$rw)!)␤:(Attribute:D $attr, :readonly(:$readonly)!)␤:(Attribute:D $attr, :box_target(:$box_target)!)␤:(Routine:D $r, :rw(:$rw)!)␤:(Rout…
19:09 kurahaupo joined
TimToady interesting, my rakudo gives Null PMC access in get_string() 19:09
updating to see if that helps 19:10
_edwin hi sorear! I think your gut feeling about the longest trail problem being NP-complete was right 19:11
because it is possible to transform the longest path problem into a longest trail problem by splitting each vertex into two vertices, one with all the incoming edges, one with all the outgoing edges, and a new edge inbetween
dalek rlito: 74e2045 | (Flavio S. Glock)++ | / (5 files):
Perlito5 - js - TIEARRAY, STORE, FETCH; add tie() example to html/perlito5.html
19:12 fhelmberger_ left 19:13 Circlepuller joined
TimToady nr: proto infix:<of> (|) {*}; multi infix:<of>(\slice, @a) { @a[slice] }; multi infix:<of>(\slice, %h) { %h{slice} }; say 'HOME','SHELL' of %*ENV; 19:14
p6eval rakudo fb11f1, niecza v22-6-g9e5350d: OUTPUT«HOME/bin/bash␤» 19:15
dalek rlito: 9536f4a | (Flavio S. Glock)++ | / (2 files):
Perlito5 - ChangeLog
TimToady nr: proto infix:<of> (|) {*}; multi infix:<of>(\slice, @a) { @a[slice] }; multi infix:<of>(\slice, %h) { %h{slice} }; say *-1 of lines;
p6eval rakudo fb11f1: OUTPUT«WhateverCode.new()␤»
..niecza v22-6-g9e5350d: OUTPUT«{ ... }␤»
19:16 Circlepuller_ left, Circlepuller_ joined
TimToady nr: proto infix:<of> (|) {*}; multi infix:<of>(\slice, @a) { @a[slice] }; multi infix:<of>(\slice, %h) { %h{slice} }; say *-1 of @(lines); 19:16
p6eval rakudo fb11f1: OUTPUT«WhateverCode.new()␤»
..niecza v22-6-g9e5350d: OUTPUT«{ ... }␤»
TimToady nr: proto infix:<of> (|) {*}; multi infix:<of>(\slice, @a) { @a[slice] }; multi infix:<of>(\slice, %h) { %h{slice} }; say 0 of @(lines); 19:17
p6eval rakudo fb11f1: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
..niecza v22-6-g9e5350d: OUTPUT«Land der Berge, Land am Strome,␤»
TimToady umm...
_edwin hm, how can I pass a Str argument to a macro (instead of an AST)?
19:18 Circlepuller left
TimToady still get the Null PMC locally 19:18
do you mean foo("string") or foo(string)? 19:19
the latter would be $ast.Str or some such
the former would require evaluating the $ast 19:20
but I believe that everything comes in as AST currently
_edwin I meant the former 19:21
TimToady might need an inside helper macro to evaluate an OUTER::<$ast> 19:22
though presumably there's some more direct way
that is probably non-portable
_edwin $ast.Str gives me something like AST<-993599824> in rakudo :/
tadzik _edwin: I don't think string macros are implemented 19:23
TimToady if $ast gives you positional info you could extract the string from the original text, I suppose 19:24
but a helper macro might be cleaner and more portable
you'd just have to call the helper macro from the body of the outer macro 19:25
assuming the helper macro can see your outer $ast somehow
_edwin tadzik: ah, that might be why I get "too few positional arguments: 2 passed, 3 (or more) expected" when trying to return a string 19:26
TimToady, you mean something like returning the AST from the inner macro so it is evaluated in the body of the outer macro? 19:27
TimToady nodnod
_edwin ok, thanks
TimToady we should probably spec something that just does that though 19:28
19:30 aramisf left
TimToady nr: proto infix:<of> (|) {*}; multi infix:<of>(\slice, @a) { @a[|slice] }; multi infix:<of>(\slice, %h) { %h{|slice} }; say 0 of lines; 19:30
p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Unable to resolve method Capture in type Int␤ at /home/p6eval/niecza/lib/CORE.setting line 3278 (prefix:<|> @ 4) ␤ at /tmp/Y3_BA0ynWR line 1 (infix:<of> @ 4) ␤ at /tmp/Y3_BA0ynWR line 1 (mainline @ 7) ␤ at /home/p6eval/niecza/lib/CO…
..rakudo fb11f1: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (lines 1, 1)␤»
_edwin when I try to call the inner macro I always get "too few positional arguments: 2 passed, 3 (or more) expected" 19:31
regardless of the signature I declare for the inner macro 19:32
TimToady ENOKLOO
all our domain experts are vacating at the moment, I suspect 19:33
19:36 cognominal joined, cognominal left, cognominal joined
TimToady or prioritizing their family, as they should be 19:37
19:40 Circlepuller_ left 19:41 Circlepuller joined
TimToady nr: proto infix:<of> (|) {*}; multi infix:<of>(\slice, @a) { @a[|slice] }; multi infix:<of>(\slice, %h) { %h{|slice} }; my @lines = lines; say 0 of @lines; 19:42
p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Unable to resolve method Capture in type Int␤ at /home/p6eval/niecza/lib/CORE.setting line 3278 (prefix:<|> @ 4) ␤ at /tmp/SHKejJ6D38 line 1 (infix:<of> @ 4) ␤ at /tmp/SHKejJ6D38 line 1 (mainline @ 8) ␤ at /home/p6eval/niecza/lib/CO…
..rakudo fb11f1: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (lines 1, 1)␤»
19:42 cognominal left
TimToady nr: proto infix:<of> (|) {*}; multi infix:<of>(\slice, @a) { @a[slice] }; multi infix:<of>(\slice, %h) { %h{slice} }; my @lines = lines; say 0 of @lines; 19:42
p6eval rakudo fb11f1: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
..niecza v22-6-g9e5350d: OUTPUT«Land der Berge, Land am Strome,␤»
TimToady nr: proto infix:<of> (|) {*}; multi infix:<of>(\slice, @a) { @a[slice] }; multi infix:<of>(\slice, %h) { %h{slice} }; my @lines = lines; say *-1 of @lines;
p6eval rakudo fb11f1: OUTPUT«WhateverCode.new()␤»
..niecza v22-6-g9e5350d: OUTPUT«{ ... }␤»
TimToady nr: proto infix:<of> (|) {*}; multi infix:<of>(\slice, @a) { @a[slice] }; multi infix:<of>(\slice, %h) { %h{slice} }; my @lines = lines; say (*-1) of @lines; 19:43
p6eval rakudo fb11f1: OUTPUT«WhateverCode.new()␤»
..niecza v22-6-g9e5350d: OUTPUT«{ ... }␤»
TimToady nr: say lines[0]
p6eval rakudo fb11f1: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
..niecza v22-6-g9e5350d: OUTPUT«Land der Berge, Land am Strome,␤»
TimToady sure looks like a rakudobug to me 19:44
b: say lines[0]
p6eval b 922500: OUTPUT«Land der Berge, Land am Strome,␤»
TimToady a regression, in fact
p: say lines[0]
p6eval pugs: OUTPUT«*** No such subroutine: "&lines"␤ at /tmp/cfZa6ba0ww line 1, column 5 - line 2, column 1␤»
19:46 cognominal joined
_edwin submitted rakudobug about the BEGIN { eval } confusion: rt.perl.org/rt3/Public/Bug/Display...?id=115134 19:47
rindolf TimToady: did you see Shmuel's comment here: mail.perl.org.il/pipermail/perl/201...12838.html ?
19:47 fgomez left
_edwin is it worthwhile to also submit a spectest for a rakudobug (if I'm pretty sure it is a bug)? 19:51
TimToady spectests are a good thing
but if you don't, the fixer will presumably write one 19:52
flussence
.oO( why would someone go to a perl conference then complain that people are talking about perl there all the time? )
rindolf flussence: are you referring to Shmuel's comment? 19:53
flussence yeah. it just comes off as needlessly bitter.
diakopter flussence: yes, if one doesn't include "Perl 6" in "Perl"
19:54 hash_table left
_edwin what is the preferred way to contribute to roast? pull request or something? I didn't find something about that in the README 19:54
flussence _edwin: usually you ask and then end up getting a commit bit anyway :) 19:55
_edwin ok, that would be nice :)
TimToady is just amused by the slippage into the typical phraseology of old religion advocates vs new religion evangelists: "stuff it down our throats" 19:56
_edwin: do you have a github id? 19:57
[Coke] gives up on modules in classes and re-refactors partcl
19:58 snearch left
_edwin TimToady, hm I really have to check . o O (ETOOMANYWEBSITEACCOUNTS) 19:58
19:59 simcop2387 left 20:01 Targen joined 20:02 GlitchMr left, kurahaupo left, simcop2387 joined
_edwin no, I haven't. going to get myself one 20:03
TimToady not terribly hard, but you do have to have to privide an RSA public key 20:06
*provide
20:06 Circlepuller_ joined 20:08 bruges joined 20:09 Circlepuller left 20:10 bruges_ left
sjohnson openssl -genrsa technology 20:10
github has all the instructions though for you
20:11 mjreed1 left 20:14 spider-mario left, sirrobert joined 20:16 spider-mario joined 20:19 spider-mario left, mjreed joined 20:20 spider-mario joined, birdwindupbird left
colomon www.johndcook.com/blog/2012/10/02/s...th-powers/ 20:20
_edwin TimToady, I think I made it. id "edwinst" 20:22
TimToady hugme: add edwinst 20:25
hugme: hug someone 20:26
hugme hugs someone
sjohnson hugs 20:27
i wonder if hugme has any STDs yet 20:28
colomon on the sum-of-4th-powers: gist.github.com/3836214 # not sure if I should be proud of this or ashamed
sorear comment on 5th powers: for all large w, below w^5, there are about w fifth powers and therefore about w^2 sums of two fifth powers. making the (very unjustifiable) assumption that sums of two fifth powers are distributed randomly, by the birthday bounds there is about a w^-1 chance of finding a number which is a sum of two fifth powers, so there probably aren't any. 20:33
colomon interesting, niecza is nearly 10x faster than rakudo for that script. I thought rakudo had pretty much caught up with niecza these days... 20:34
TimToady _edwin: okay, you should have commit access to the repos that the perl6 team can modify, including roast 20:35
dunno why hugme didn't work, offhand...
20:36 skids left
_edwin TimToady, thanks, that's awsome 20:36
20:37 rindolf left
sorear TimToady: I don't think hugme has worked since we converted perl6 to an org acct 20:37
20:38 kurahaupo joined 20:40 mjreed left
TimToady I seem to recall seeing moritz making it work, so maybe I'm just not on the right list... 20:41
grondilu nr: my @a = [ <a b> ], [ <d e> ]; say @a».[0] 20:42
p6eval rakudo fb11f1, niecza v22-6-g9e5350d: OUTPUT«a b d e␤»
grondilu was expecting "a d"
_edwin installing niecza to crosscheck potential spectests
sorear grondilu: that's how it's supposed to work but nobody implements the new spec yet 20:43
TimToady grondilu: that would be correct if either niecza or rakudo followed current spec
20:43 hoelzro is now known as hoelzro|away
grondilu ok. Good to know. 20:44
TimToady or even if either followed the previously specced duckmap semantics :)
but they both do deepmap currently
so follow .[] structure in preference to calling .[] on top level 20:45
mst Bedamned quack cartographers going round mapping our ducks ... 20:48
20:49 mjreed joined
grondilu r: say (<a b>)»[*] 20:50
p6eval rakudo fb11f1: OUTPUT«a b␤»
grondilu cool 20:51
So I don't actualy need to type the period between » and [ ?
20:51 raiph joined
sorear correct, you don't 20:51
grondilu nice
sorear r: say <a b>.».[*] # this works too 20:52
p6eval rakudo fb11f1: OUTPUT«===SORRY!===␤Confused␤at /tmp/ahPbN0oART:1␤»
sorear n: say <a b>.».[*] # this works too
p6eval niecza v22-6-g9e5350d: OUTPUT«a b␤»
sorear std: say <a b>.».[*] # this works too
p6eval std 77327a4: OUTPUT«ok 00:00 43m␤»
sorear rakudobug?
grondilu r: say <a b>»[*]
p6eval rakudo fb11f1: OUTPUT«a b␤»
sorear r: $_.++
p6eval rakudo fb11f1: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&postfix:<.>' called (line 1)␤»
sorear std: $_.++
p6eval std 77327a4: OUTPUT«ok 00:00 41m␤»
20:53 cognominal left
sorear seems rakudo doesn't support dots before postfixes in general 20:53
r: .++
p6eval rakudo fb11f1: OUTPUT«===SORRY!===␤Method 'unshift' not found for invocant of class 'NQPMu'␤»
20:54 hash_table joined
sorear std: .++ 20:54
p6eval std 77327a4: OUTPUT«ok 00:00 41m␤»
sorear phenny: tell masak possible rakudobugs, "r: .++" and "r: $_.++"; STD is fine with both; are they known?
phenny sorear: I'll pass that on when masak is around.
sorear phenny: tell masak well, rakudobugs for sure, possibly *new* 20:55
phenny sorear: I'll pass that on when masak is around.
20:57 mjreed1 joined 20:58 cognominal joined 20:59 benabik left, mjreed left
grondilu the same shortcut does not work with function, though: 21:00
r: say (&cos, &sin)»(pi) 21:01
p6eval rakudo fb11f1: OUTPUT«Too many positional parameters passed; got 3 but expected 2␤ in sub METAOP_HYPER_POSTFIX at src/gen/CORE.setting:12161␤ in block at /tmp/fQtKotv0au:1␤␤»
grondilu n: say (&cos, &sin)»(pi)
p6eval niecza v22-6-g9e5350d: OUTPUT«-1 1.2246063538223773E-16␤»
grondilu r: say (&cos, &sin)».(pi) # here the period is needed
p6eval rakudo fb11f1: OUTPUT«-1 -3.52688866664137e-10␤» 21:02
raiph n: gist.github.com/3836214 # don't understand why colomon wouldn't be proud of this and post it at the original blog 21:03
p6eval niecza v22-6-g9e5350d: OUTPUT«===SORRY!===␤␤Confused at /tmp/f0MznW5rjS line 1:␤------> https⏏://gist.github.com/3836214 # don't under␤␤Undeclared routine:␤ 'https' used at line 1␤␤Parse failed␤␤»
21:04 integral left
raiph n: my @fourth-powers = (1..*).map(* ** 4) ... * >= 635318657; my %counts; for @fourth-powers X+ @fourth-powers -> $sum { %counts{$sum}++; }; for %counts.keys.grep({ %counts{$_} > 2 }) -> $sum { say "$sum has { %counts{$sum} } fourth power sums"; } 21:04
p6eval niecza v22-6-g9e5350d: OUTPUT«635318657 has 4 fourth power sums␤»
21:04 cognominal left
colomon raiph: its kind of excessively brute force even as it is kind of elegant 21:04
it's 21:05
also that version has a factor of two error in its reported output. :) 21:06
raiph colomon: ah. My answer to the first concern is "You have to love brute force" (from the comments). But, yeah, I glossed over the factor of two error... 21:08
21:08 bbkr_ joined
colomon it's minor and unimportant as far as errors go. :) 21:09
the thing that impressed me was that our p6 implements are now fast enough that a brute force approach is fine. 21:10
*implementations # typing sideways while hanging out with a 4yo 21:11
21:12 benabik joined, integral joined, integral left, integral joined
colomon n: gist.github.com/3836214 21:15
p6eval niecza v22-6-g9e5350d: OUTPUT«635318657 has 2 fourth power sums␤»
TimToady grondilu: I believe you're looking for "when none /z/"
raiph colomon: i'm impressed. gonna post it to the blog? 21:16
21:16 benabik left
colomon maybe? 21:16
21:19 bluescreen10 left
grondilu r: given "Foo" { when none /z/ { say "no match" } } 21:20
p6eval rakudo fb11f1: OUTPUT«no match␤»
grondilu TimToady: indeed. Thanks.
colomon I love the first line and the X+. It's the rest of it that seems slightly inelegant to me. 21:21
21:23 xubu joined, xubu left 21:24 SamuraiJack left
grondilu TimToady: yet I confess I don't understand how it works. I thought 'none' was a junction, and /z/ is not a scalar. 21:25
sorear here's a question for the ages: how MANY numbers can be expressed as a sum of two squares of squares in two different ways?
my heuristic argument from above suggests that the answer is not infinity, but does not prove any specific value
shachaf «I went to visit him while he was lying ill at the hospital. I had come in taxi cab number 14 and remarked that it was a rather dull number. "No" he replied, "it is a very interesting number. It's the smallest number expressible as the product of 7 and 2 in two different ways."» 21:26
sorear shachaf, what's your point here?
21:26 mjreed1 left
shachaf No mathematical point. 21:27
Hmm, squares of squares.
sorear is your point that you don't like our discussion?
TimToady sorear: you're taking it wrong, I think 21:28
7*2 and 2*7 is a very uninteresting interesting way to make 14
shachaf Your discussion is great!
sorear I guess that's possible
grondilu I think shachaf for a second thought that "two different ways" meant "in a different order".
TimToady it's more of a linguistic point 21:29
shachaf Point? It's just a joke that I found very funny the first time I came across it.
TimToady was amused by it
sorear ah, I did not see it as a joke, my apologies 21:30
I see I too have a problem with seeing cloaked insults where there are none
diakopter hm, I wonder if there's a limit to the number of interesting comments on particular numbers 21:31
TimToady yes, well, most of us here are not at the neurotypical end of the spectrum :)
_edwin sorear, but if you find one such number, isn't it that you can generate an infinity of them? a^4+b^4 = c^4+d^4 --> (na)^4+(nb)^4 = (nc)^4+(nd)^4 for any n
colomon wait, classify! 21:33
sorear diakopter: have you encountered en.wikipedia.org/wiki/Interesting_...er_paradox ? 21:35
_edwin: ooo 21:36
raiph colomon: re first line: I don't like seeing ^ used with > instead of just >=
sorear _edwin: integral points on a homogenous polynomial eh. someday I need to properly learn algebraic geometry
colomon raiph: it's not the same thing. ^ and > there means "up to and not including the first value > N" ; just >= would be "up to and including the first value >= N" 21:39
sorear _edwin: now you can interpret (a,b,c,d) as the homogenous coordinates of a point in projective 3-space, your polynomial describes an algebraic surface in 3-space, and we're talking about rational points *waves hands vigorously* 21:41
the obvious question is then "what does this projective variety look like" 21:43
raiph colomon: d'oh
_edwin right, you could collapse these uninteresting multiples this way
hehe, i like this paradox 21:44
I'm afraid my mono build hangs :(
colomon n: say (^10).classify({ * %% 2 ?? "even" !! "odd" }).perl
p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Unable to resolve method classify in type Range␤ at /tmp/KQtr9CypON line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4199 (module-CORE @ 574) ␤ at /h…
sorear to which I say: let x^4 + y^4 = 1 + z^4 ; the constant-z cross sections are superellipses
diakopter sorear: no 21:45
colomon r: say (^10).classify({ * %% 2 ?? "even" !! "odd" }).perl
p6eval rakudo fb11f1: OUTPUT«("even" => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]).hash␤»
21:45 benabik joined
colomon r: say (^10).classify({ $_ %% 2 ?? "even" !! "odd" }).perl 21:45
p6eval rakudo fb11f1: OUTPUT«("even" => [0, 2, 4, 6, 8], "odd" => [1, 3, 5, 7, 9]).hash␤»
colomon n: say (^10).classify({ $_ %% 2 ?? "even" !! "odd" }).perl
p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Unable to resolve method classify in type Range␤ at /tmp/fKVEyDHo38 line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4199 (module-CORE @ 574) ␤ at /h…
_edwin r: say (^10).classify(* %% 2 ?? "even" !! "odd" ).perl 21:46
p6eval rakudo fb11f1: OUTPUT«Nominal type check failed for parameter '&t'; expected Callable but got Str instead␤ in method classify at src/gen/CORE.setting:1143␤ in block at /tmp/02jL5p_sZj:1␤␤»
grondilu sorear: circles rather than ellipses, no?
sorear I'll just call this thing a squircular hyperboloid and leave it for someone who knows more about projective varieties to pick up 21:47
_edwin * does not thunk enough of the code for this to work, i think
grondilu they are not projective anymore since you reduced to 3 parameters. You already projected.
TimToady jetlag nap attack & 21:49
colomon n: say (^10).list.classify({ $_ %% 2 ?? "even" !! "odd" }).perl
p6eval niecza v22-6-g9e5350d: OUTPUT«("even" => [0, 2, 4, 6, 8], "odd" => [1, 3, 5, 7, 9]).list␤»
_edwin rn: (* %% 2).WHAT 21:50
p6eval rakudo fb11f1, niecza v22-6-g9e5350d: ( no output )
_edwin rn: (* %% 2).WHAT.say
p6eval rakudo fb11f1: OUTPUT«WhateverCode()␤»
..niecza v22-6-g9e5350d: ( no output )
21:50 benabik left
_edwin rn: (* %% 2 ?? 1 !! 2).WHAT.say 21:51
p6eval rakudo fb11f1, niecza v22-6-g9e5350d: OUTPUT«Int()␤»
sorear
.oO( hmm, I think this would be a great shape for a hat. maybe I'll bring one to austin )
21:52
_edwin * ?? ... !! ... does not autothunk at all. is that intentional?
grondilu sorear: actually you just reduced the search domain, but not all the points are solutions. They are still tricky to find. 21:57
22:00 kaare__ left
sorear grondilu: I think that all the rational points of the new affine variety are solutions, except for those lying on a finite number of trivial planes corresponding to non-solutions like x^4 + y^4 = x^4 + y^4 22:00
grondilu I very much doubt so. 22:01
sorear suppose (x/d), (y/d), (z/d) is a rational point
grondilu hang on 22:02
sorear that is (x/d)^4 + (y/d)^4 = (z/d)^4 + 1
multiply through by d^4, x^4 + y^4 = z^4 + d^4
grondilu sorry, you were right. It's just that finding such rationals is tricky.
22:03 fgomez joined, pmurias left
grondilu probably just as tricky as the problem in its initial formulation. 22:05
sorear I get the impression that if I knew more algebraic geometry, I'd have tools I could use to help solve rational point problems 22:07
grondilu That would help. Indeed algebraic geometry is notoriously linked to number theory. 22:09
as far as I know anyway. 22:10
sorear Actually that variety has no nontrivial rational points at infinity. 22:15
Fermat's last theorem.
dalek rlito: 1ec6ea0 | (Flavio S. Glock)++ | / (6 files):
Perlito5 - js - add UNTIE
sorear Oops I got a sign wrong, it's more corset-shaped than hat-shaped 22:19
grondilu btw, can a variety "cut through space" without enountering any rational? That would be weird.
22:19 taggart joined
sorear sure, try the plane z = pi 22:19
22:19 Khisanth left
grondilu sorear: indeed. 22:20
sorear or z^3 + z = 1 if you want it to be algebraic over Z
22:21 cognominal joined 22:22 sizz left
taggart I am looking for documentation on the perl6 "form" built-in, pointers? 22:22
sorear a couple years back formats were kicked out of the perl 6 core and into a module, Perl6::Form, which I don't know if it's maintained 22:23
22:25 sizz joined 22:26 Circlepuller joined
taggart sorear: I found this one github.com/mathw/form/ and in perl5 there is Perl6::Form (pretty old now) 22:28
22:29 Circlepuller_ left, spider-mario left 22:36 Khisanth joined 22:37 stopbit left 22:40 Circlepuller_ joined 22:42 grondilu left 22:43 Circlepuller left, Circlepuller joined 22:44 Circlepuller_ left, MayDaniel left 22:46 PacoAir left 22:52 taggart left 22:59 cognominal left 23:00 cognominal joined 23:03 _edwin left 23:06 sizz left, sizz joined 23:08 aharoni left 23:15 whiteknight joined 23:25 macae joined 23:30 cibs left, cibs joined 23:31 Circlepuller_ joined 23:33 Circlepuller left 23:34 Circlepuller_ left, Circlepuller_ joined 23:38 Circlepuller joined 23:39 Circlepuller_ left 23:54 Circlepuller_ joined 23:56 Circlepuller__ joined, Circlepuller left 23:58 Circlepuller_ left