»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
Timbus naddiseo, .can 00:00
m: class Foo { method bar($a, :@b) { [@b, $a] } }; my @c = (1,2,3); my &f := Foo.^can('bar')[0].assuming(b => @c); say Foo.&f(4); 00:01
camelia rakudo-moar e86167: OUTPUT«1 2 3 4␤»
Timbus its still a list, but only a problem if theres multimethods 00:02
00:04 erkan left 00:06 erkan joined
Timbus naddiseo, but why is it a method and not a sub? 00:07
if its gotta be a method, just remember they're subs with an extra parameter 00:09
raydiak is mildly surprised that he cannot find in the design docs some syntactic twist which means "return the routine after dispatch resolution, instead of calling it"
Timbus m: class Foo { method bar($a, :@b) { [@b, $a] } }; my @c = (1,2,3); my &f := Foo.^can('bar')[0].assuming(Foo, b => @c); say f(4); 00:10
camelia rakudo-moar e86167: OUTPUT«1 2 3 4␤»
00:10 spider-mario left
Timbus raydiak, i agree 00:11
but from what little I know, the only way is can, or find_method, and then you use .cando on the multi to find the candidate 00:12
.cando takes a Capture of the parameters 00:13
oh, there was another way.. uh. 00:15
m: my $m; class A { $m = method foo() {42} }; say $m(A)
camelia rakudo-moar e86167: OUTPUT«42␤»
Timbus yeah
raydiak that is the least awkward way I've seen so far 00:16
.WALK makes a 4th less-than-optimal solution :)
Timbus using the metamodel is always awkward
but the multis make it especially so
+1 for a gimmie-the-method way to do it 00:19
00:20 telex left 00:22 telex joined
Timbus m: class A { method gimmie-the-method() { method foo {42} } } my $a = A.gimmie-the-method; say $a(A); say A.foo 00:30
camelia rakudo-moar e86167: OUTPUT«===SORRY!=== Error while compiling /tmp/nlxcbfKHTr␤Two terms in a row␤at /tmp/nlxcbfKHTr:1␤------> mie-the-method() { method foo {42} } } ⏏my $a = A.gimmie-the-method; say $a(A); ␤ expecting any of:␤ …»
Timbus aw
m: class A { method gimmie-the-method() { method foo {42} } }; my $a = A.gimmie-the-method; say $a(A); say A.foo
camelia rakudo-moar e86167: OUTPUT«42␤42␤»
raydiak m: class Foo { my &.barref = method bar () {}; }; say Foo.bar; say Foo.barref 00:31
camelia rakudo-moar e86167: OUTPUT«Nil␤bar␤»
raydiak m: class Foo { my &.barref = method bar () {42}; }; say Foo.bar; say Foo.barref
camelia rakudo-moar e86167: OUTPUT«42␤bar␤»
Timbus haha
00:44 atroxaper joined
raydiak m: class A { our method foo () {42} }; my &a = &A::foo; a 00:44
camelia rakudo-moar e86167: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in method foo at /tmp/VR7q0N6a9c:1␤ in block <unit> at /tmp/VR7q0N6a9c:1␤␤»
raydiak m: class A { our method foo () {42} }; my &a = &A::foo; A.&a
camelia ( no output )
raydiak m: class A { our method foo () {42} }; my &a = &A::foo; A.&a.say # you know what I mean :) 00:46
camelia rakudo-moar e86167: OUTPUT«42␤»
Timbus hmmm 00:49
00:52 atroxaper left
raydiak m: say 42 # factored that nasty problem out of my elegant solution... 01:03
camelia rakudo-moar e86167: OUTPUT«42␤»
01:04 BenGoldberg left, BenGoldberg joined 01:27 KCL_ joined 01:30 KCL left, ninjazach left 01:31 wobblingjelly joined, wobblingjelly left 01:42 ninjazach joined 01:50 yeahnoob joined 02:16 Rounin left 02:20 rmgk is now known as Guest39781, rmgk_ joined, Guest39781 left, rmgk_ is now known as rmgk 02:26 Spot__ left 02:27 Spot__ joined 02:38 atroxaper joined 02:44 atroxaper left 02:51 zmisc joined, zmisc is now known as Guest34940 02:52 Guest34940 left 03:12 Mso150_f_x joined 03:49 ninjazach is now known as systemd-borg 03:50 Mso150_f_x left 03:51 noganex_ joined 03:54 noganex left 03:58 atroxaper joined 04:01 systemd-borg left 04:03 atroxaper left 04:18 jack_rabbit joined 04:20 jack_rabbit left 04:21 jack_rabbit joined 04:27 colomon left 04:28 raiph joined 04:38 colomon joined 04:41 dj_goku left 04:56 dj_goku joined, dj_goku left, dj_goku joined 05:08 dj_goku left, dj_goku_ joined 05:09 raiph left 05:18 dj_goku joined, dj_goku left, dj_goku joined 05:19 baest_ joined 05:20 dj_goku_ left 05:21 baest left 05:22 jack_rabbit left
naddiseo Timbus: it doesn't have to be a method, but I was getting "No such method 'bar' for invocant of type 'Foo'" if I use "sub" 05:46
raydiak: that "our" solution is neat, thanks! 05:48
05:49 atroxaper joined
Timbus well, i mean why is it a method. are you using the class? 05:49
naddiseo Yeah, I'm using the class. the sub/method returns a new instance of the class, so I thought it belongs there. 05:50
class A { sub foo($a, :@b) { return A.new($a, @b); }; method new { ... } } 05:51
Timbus oh, i see 05:52
05:56 atroxaper left, Guest98101 left
Timbus .. so do you want to call it without using the class name? 05:57
05:58 yakudza left, cosimo left, cosimo joined, PerlJam left, risou is now known as risou_awy 05:59 risou_awy is now known as risou, MilkmanDan left, bowtie joined, PerlJam joined, bowtie is now known as Guest75194
naddiseo No, I wanted to call it without explictly passing that last parameter. 05:59
05:59 MilkmanDan joined
naddiseo If I were to write it in python, it'd look like: ideone.com/wv0viQ 06:00
06:01 yakudza joined 06:05 mr-foobar left 06:08 BenGoldberg left 06:12 Guest75194 left 06:13 bowtie_ joined 06:15 dayangkun joined 06:17 dayangkun left 06:19 mr-foobar joined
Timbus naddiseo, ooh okay 06:19
well since 'reducer' is just a helper method, why not export it as a sub? 06:24
06:24 perlpilot joined
naddiseo Yeah, I've done that now. Originally I was referring to it via &(Tree.reducer) so it was giving that "not such method reducer for invocant of type Tree" error 06:25
changing to "method" fixed that.
But, now I've changed 'our sub reducer', it works as expected. 06:26
Timbus well i meant like.. class Foo { sub bar($a) is export { Foo.new(a => $a) }; };
06:26 bowtie_ left, PerlJam left
naddiseo Hm, ok., how do I refer to it outside the class? 06:26
Timbus then you can just use bar()
naddiseo Didn't know I could do that.
Timbus if your class is in the same file, youll need to import Foo;
(you won't if its in another file since use Foo; will handle that) 06:27
06:28 bowtie_ joined
naddiseo ^_^ 06:28
Now everything works, and is ~2 lines of code compared to my earlier naive approach that was ~25 06:29
Thanks,
Timbus neat
naddiseo now I can go to bed without having to think about that.
So, thanks again, and happy holidays.
Timbus you too
06:36 avalenn left 06:39 bowtie_ left 06:41 bowtie_ joined 06:48 davido__ left 06:49 davido_ joined 06:50 bowtie_ left
moritz \o good morning 06:50
06:50 bowtie_ joined
moritz masaq: should I kill your irssi session on feather? 06:51
06:54 atroxaper joined 06:55 mr-foobar left 07:02 bowtie_ left 07:12 bowtie joined, bowtie is now known as Guest22354 07:23 darutoko joined 07:45 kaare_ joined 07:47 sunnavy left 07:48 mtj_ left 07:51 petercommand left 07:52 mtj_ joined, jdurand joined, xfix joined, petercommand joined 07:53 sunnavy joined 07:57 jdurand left 08:05 andreoss left 08:06 lue left 08:19 lue joined, darutoko- joined, kjs_ joined 08:21 darutoko left 08:24 Mso150_f_x joined 08:31 mickcy_ca joined
mickcy_ca Merry Christmas to all! 08:31
And ... anyone on here that knows postgresql and connecting to Perl 6 08:32
Maybe with DBIish or DB::ORM::Quicky 08:33
moritz DBIish worked pretty well with postgres, last I tried 08:34
mickcy_ca moritz: Do you know if I need anything but the basic database to get this to work? 08:35
moritz mickcy_ca: what's "the basic database"? 08:36
mickcy_ca postrgresql 9.3 Ubuntu packages ... Do I need the perl drivers? 08:37
08:37 awoodland left
moritz no 08:38
you need the client library
mickcy_ca Looking at the synopsis ... it is clear how to connect to SQlite, by I see no information on other databases.
I have the client installed. 08:39
08:39 awoodland joined
moritz driver is 'Pg', you can pass host, port, database, user and password 08:40
mickcy_ca Thank you ... that is what I was looking for.
08:40 atroxaper left
moritz I guess we do need better documentation for the other drivers 08:40
mickcy_ca That would be appreciated, as if it were there, I would not be bothering you today. 08:41
moritz mickcy_ca: did you read the README.pod? or the pod in lib/DBIish.pm6? 08:42
xfix "Missing <user> config"
Hm, I have a question, why Pg DBIish requires specifying an user?
mickcy_ca I need lib/DBIish.pm6 08:43
moritz: I have all that I need at this end now. 08:44
xfix How to get username in Perl 6? 08:45
moritz xfix: which username?
xfix Current user
moritz xfix: do you want to connect via local socket/pipe?
xfix Yep. 08:46
moritz xfix: then you'll have to patch DBDish::Pg
xfix Oh, right, just not specify user and password.
moritz currently it always connects via network
xfix Ok, gonna do that. 08:47
moritz currently Pg.pm6 always includes the host
xfix Ok, gonna fix it so it could connect using UNIX sockets.
moritz and uses localhost if nonis specified
*none is
a good solution would be to only require username and password when the host is als specified 08:48
xfix With trust setting, password is not needed, but who would use trust for external networks?
08:50 rurban joined
mickcy_ca Okay ... from postgresql to unix domain sockets ... I see lots of P5 examples, any Perl6 options? 08:54
08:54 kjs_ left
mickcy_ca What I mean is are there any options to connect and transfer information on Unix Domain Sockets. 08:55
IO::Socket::INET? 08:56
08:56 virtualsue joined 08:58 virtualsue left 09:00 molaf left 09:03 petercommand left
mickcy_ca I send questions before research ... Sorry to all ... I am still pretty new to Perl 6 and am wondering how I can get that which a method found using .^methods needs for operation. The only way I know to try is to run the code and hopefully debug what exactly is required. 09:04
09:06 kjs_ joined 09:07 sunnavy left
dalek Iish: b56f4e1 | (Konrad Borowski)++ | lib/DBDish/Pg.pm6:
Support local PostgreSQL connections.
09:10
09:11 sunnavy joined, dakkar joined
xfix (by the way, it appears that connections to non-existant databases make a wrong error, even before my change. 09:12
Quite odd...
Cannot look up attributes in a type object, when the object is OpaquePointer.new(170331840). 09:13
Oh, right, I'm calling DBIish incorrectly. 09:14
09:15 kjs_ left
moritz mickcy_ca: well, the canonical answer is to consult the documentation. perl6.org/documentation/ has some pointers, and between doc.perl6.org and design.perl6.org, most methods that are part of the public API should be covered 09:16
09:17 petercommand joined
dalek Iish: 6c3f394 | (Konrad Borowski)++ | lib/DBDish/Pg.pm6:
Properly handle all internal values.

DBDish puts keys like AutoCommit, which DBDish::Pg doesn't use as of now. However, they still have to be handled somehow.
09:19
mickcy_ca moritz: I just need to dig deeper ...
xfix (it was a while since I programmed Perl 6, and I do silly mistakes... oh well)
dalek Iish: 925b33a | (Konrad Borowski)++ | lib/DBDish/Pg.pm6:
Disable all PostgreSQL connection keys with nonlowercase characters.

My previous change allowed keys like `!@#$`. While such keys shouldn't be dangerous, as PostgreSQL would refuse those, they are completely pointless.
09:26
xfix Ok, now PostgreSQL correctly reports errors. That's how it should work. 09:27
NativeCall is neat. 09:28
I once have said that LuaJIT FFI is neat, but this is even easier to use. 09:29
moritz jnthn++, arnsholt_++ # nativecall 09:31
xfix sub PQresultStatus (OpaquePointer $result) returns Int is native(lib) { ... } 09:32
This is amazing.
OpaquePointer is void *, right? 09:33
Timbus well its any kind of pointer
xfix Which is what void * star.
s/star/is/
moritz well, at run time, there are just pointers 09:34
Timbus thats true
moritz void * vs int * vs ... is just C compile time
09:34 koo6 left
moritz pointer type erasure! 09:34
xfix Yes, I know, C pointers don't know their types. 09:35
09:35 yeahnoob left
xfix And you don't know if arbitrary location in memory is a pointer, an 64-bit integer, a double floating point number, or whatever else it is 09:36
09:40 atroxaper joined 09:48 atroxaper left 09:50 sqirrel_ joined 09:56 atroxaper joined 10:02 Akagi201 left 10:03 Akagi201 joined
xfix r: use v7 10:03
camelia ( no output )
xfix In my opinion, this should make an error.
moritz yes 10:07
known issue
feel free to patch :-)
(though in a way that doesn't break v5) 10:08
xfix Of course. 10:09
github.com/rakudo/rakudo/blob/8154....nqp#L1579 10:10
Let's see...
I want stuff like v6.3.4 and v7 to be disallowed, but without disallowing use v5.10.
(and use v6.0.0 should be allowed)
(as well as use v6)
Now I need to analyze how to report an error from "use" statement. 10:12
10:13 spider-mario joined
xfix r: use v6.; 10:13
camelia rakudo-{parrot,moar} e86167: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Missing semicolon.␤at /tmp/tmpfile:1␤------> use v6.⏏;␤»
xfix So, the semicolon is missing between "." and ";".
mickcy_ca How do I encode to utf-8 10:15
moritz $str.encode('UTF-8') 10:16
mickcy_ca Thanks ... 10:18
masaq good antenoon, #perl6 10:23
we have snow! \o/
moritz good *, masaq
tidelibom
10:24 sqirrel_ left
mickcy_ca Snow here too. 10:24
dalek Iish: 833eeaf | moritz++ | / (2 files):
Add some docs, mickcy_ca++
10:29
xfix moritz, what do you think should be exception name for invalid use?
Like "use v7".
moritz xfix: X::Language::Unsupported maybe 10:30
mickcy_ca dalek: Great work.
xfix Good.
mickcy_ca Off to bed ... 03:31 where I am.
moritz good night mickcy_ca, and dream of well-documented drivers :-) 10:31
mickcy_ca Will Do.
10:31 mickcy_ca left
moritz masaq: should I kill your irssi and/or screen session on feather? 10:32
masaq: or re-enable your login so that you can terminate it gracefully?
10:33 andreoss joined
andreoss m: use Shell::Command; 10:35
camelia rakudo-moar e86167: OUTPUT«===SORRY!===␤Could not find Shell::Command in any of: /home/camelia/rakudo-inst-2/languages/perl6/lib, /home/camelia/rakudo-inst-2/languages/perl6␤»
moritz star: use Shell::Command
camelia ( no output )
andreoss Shell::Command and panda are broken with 2014.12 10:36
moritz andreoss: in what way? 10:37
andreoss: and on what backend
xfix How can I disable Rakudo optimizations. Modifying grammar makes it build for a long time.
moritz --optimize=off
andreoss % perl6 -e 'use Shell::Command;' 10:38
Segmentation fault (core dumped)
10:38 dakkar left
andreoss % panda 10:38
===SORRY!===
Segmentation fault (core dumped)
moritz andreoss: which backend is that?
andreoss moritz: moarvm 10:39
This is perl6 version 2014.12-34-ge861672 built on MoarVM version 2014.12
moritz so pretty new
I thought you meant the release
andreoss the release is a branch in git? 10:40
moritz no, a tag 10:41
xfix Should I use typed_sorry or typed_panic?
moritz xfix: panic
xfix (I assume typed_panic, because reporting errors for Perl 7 code is pointless)
moritz andreoss: trying with that revision now 10:42
andreoss: works here; most likely you have some old files in your install directory somewhere 10:43
10:43 rurban left
moritz andreoss: try cleaning it out, and the sour dir too, and rebuild from scratch 10:43
10:48 Mso150_f_x left, sqirrel_ joined 10:53 rurban joined
masaq moritz: preferably re-enable, thank you. sorry for the trouble... :/ 10:54
xfix Is there a way to make grammar compilation faster? 10:59
moritz xfix: yes, through lots of optimizations
masak: login shell reset to /bin/bash 11:00
xfix I don't want to wait 2 minutes for each recompilation (I guess I just should buy a better computer).
11:00 pmurias joined
pmurias hi 11:01
xfix hi
pmurias what would be the best way to create a android app with javascript (which is in turn created with nqp-js)? 11:03
phonegap?
xfix xfix@papaya ~/P/rakudo> ./perl6-m -e 'use v6.0.5' 11:05
===SORRY!=== Error while compiling -e
No compiler available for Perl v6.0.5
ok
11:06 kjs_ joined
xfix By the way, I have a question 11:06
[ <?{ ~$<version><vnum>[0] eq '6' }> {
Should it check for string? This makes `use v06` unrecognized as Perl 6.
11:07 masaq left
moritz comparing by string is fine, I think 11:07
11:07 masak left 11:08 masak joined
masak \o/ 11:09
back in the correct spelling again!
moritz++
xfix Should 'use v05' be recognized as Perl 5 or not?
What about 'use v4'?
11:11 FROGGS joined 11:12 FROGGS left 11:13 FROGGS[tab] joined
pmurias m: use v4; 11:14
camelia ( no output )
pmurias m: use v4;say("hi")
camelia rakudo-moar e86167: OUTPUT«hi␤»
pmurias m: use v5;say("hi")
camelia rakudo-moar e86167: OUTPUT«===SORRY!===␤Could not find Perl5 in any of: /home/camelia/rakudo-inst-2/languages/perl6/lib, /home/camelia/rakudo-inst-2/languages/perl6␤»
xfix Or should "use v4" be an error. It's not that actual Perl 4 ever accepted this syntax. 11:15
Hm, let's go with "use v4" being an error.
11:20 FROGGS_ is now known as FROGGS
FROGGS raydiak: ping 11:20
.tell raydiak github.com/rakudo/rakudo/commit/50...8daabc548f 11:21
yoleaux FROGGS: I'll pass your message to raydiak.
pmurias perl5 accepts v4 11:29
'use v4' is legal perl5 11:30
xfix Sure, but actual Perl 4 doesn't accept "use v4".
Besides, currently "use v4" is interpreted as absolutely nothing. 11:31
(which means running in v6 mode)
FROGGS I'd say that every major version except 6 in a use statement should try to load that module 11:35
xfix Even v7?
FROGGS sure
why not?
like, 'v6' is built in, but everything else needs to be loaded
xfix Ok, so "v4" should be Perl5. 11:36
FROGGS Perl 4 actually
xfix Do you think anyone will write Perl4 module? 11:37
(IMO, Perl 5 is reasonably compatible with Perl 4)
FROGGS I have no idea if somebody will do that
xfix (and "use v4" is not a valid syntax in Perl 4)
FROGGS that does not matter... 11:38
'use COBOL' is also not valid in COBOL I guess
xfix Uhm...
Could not find Perl4 in any of: /home/xfix/Build-dev/languages/perl6/lib, /home/xfix/Build-dev/languages/perl6 11:41
Do you seriously propose this?
FROGGS why not? 11:45
pmurias checking for a Perl4 seems resonable 11:46
we might want to have a better error message if it's missing 11:47
xfix Anyway, rt.perl.org/Public/Bug/Display.html?id=123496 11:49
pmurias OTOH 'use v4' in Perl 5 means Perl 4 or higher 11:52
11:53 atroxaper left 11:54 awoodland left, kjs_ left
xfix r: Inf.Int 11:59
camelia rakudo-parrot e86167: OUTPUT«Cannot coerce Inf or NaN to an Int␤current instr.: 'throw' pc 489664 (src/gen/p-CORE.setting.pir:202104) (gen/parrot/CORE.setting:12241)␤called from Sub 'sink' pc 533358 (src/gen/p-CORE.setting.pir:218004) (gen/parrot/CORE.setting:13817)␤called fro…»
..rakudo-moar e86167: OUTPUT«Unhandled exception: Cannot coerce Inf or NaN to an Int␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13877 (/home/camelia/rakudo-inst-2/languages/perl6/runti…» 12:00
12:15 psch joined, rindolf joined
psch merry christmas, #perl6 o/ 12:15
moritz \o psch, mery christmas to you too 12:16
12:23 erkan left 12:24 erkan joined 12:25 erkan left, erkan joined 12:31 sqirrel_ left 12:32 sqirrel_ joined 12:33 kjs_ joined, kjs_ left 12:34 zakharyas joined 12:43 mvuets joined 12:47 erkan left 12:49 erkan joined 12:50 pmurias left 12:51 mvuets left 12:54 atroxaper joined 12:59 atroxaper left 13:00 TheovandenHeuvel joined 13:06 erkan left 13:08 erkan joined 13:13 telex left
timotimo merry christmas, dear perl6ers 13:14
13:14 telex joined
colomon Merry Christmas! 13:15
TheovandenHeuvel HI, can anyone point me to info on destructors? Can;t seem to find any. 13:18
13:19 atroxaper joined, zakharyas left
timotimo there's only a DESTROY implementation on MoarVM 13:24
and even then it's not guaranteed to run
xfix It's an issue with garbage collectors, you don't know when they get called.
psch DESTROY was implemented for some marshalling case for Inline::Perl5, wasn't it?
something with refcounting in perl5 or so ISTR 13:25
xfix I wonder, does Perl 6 have some syntax to handle destruction of objects... 13:26
(Python has with for that purpose)
13:27 KCL joined
moritz xfix: well yes, DESTROY 13:27
TheovandenHeuvel Ok. I wanted to associate a side effect with the end of scope. I will have to think of another approach.
moritz TheovandenHeuvel: LEAVE phasers
TheovandenHeuvel Ahh. Great. 13:28
moritz m: for ^3 { .say; LEAVE say "leaving $_" }
camelia rakudo-moar e86167: OUTPUT«0␤leaving 0␤1␤leaving 1␤2␤leaving 2␤»
psch m: { say "doing things" for 1..((^5).pick); LEAVE { say "done doing things" } }
camelia rakudo-moar e86167: OUTPUT«doing things␤doing things␤doing things␤done doing things␤»
psch moritz++ # for the less weird example :P
xfix By the way, why Perl 6 specification doesn't mention DESTROY anywhere, and the only reference to it is one test in roast? 13:30
13:30 KCL_ left
moritz xfix: yes, it has been unspecced and needs to be respecced 13:30
13:39 erkan left 13:41 erkan joined
masak what's the magic Unix command to make hack.p6c.org play better with UTF-8? it's been too long since I last did this -- don't even know what to Google for. :) 13:50
moritz masak: perlgeek.de/en/article/set-up-a-cle...nvironment 13:51
masak: UTF-8 locales are installed, so you can skip this part :-)
xfix Set up LANG environment variable. 13:52
13:52 erkan left
xfix For example, en_US.UTF-8 13:52
masak moritz++ 13:53
moritz with screen, that's sometimes not enough
xfix alias screen='screen -U' IMO.
masak oh, I always run screen with -U
moritz /set term_charset utf-8
/set recode_autodetect_utf8 ON 13:54
if you use irssi
xfix Unicode is so hard.
moritz /set recode ON
xfix: getting better
masak hm, I've now done all this, but the newlines from camelia still come out as "NL" :/
moritz masak: then it might be a missing font 13:55
masak: if it were an UTF-8 problem, it would come out as Mojibake instead
masak well, it worked on feather, and I haven't changed fonts.
xfix »ö« is purely ISO-8859-1, I don't think it's font problem ;-).
13:55 rindolf left
masak camelia in the topic comes out as >>o<< 13:56
moritz ouch
xfix Then your client converts characters into ASCII.
masak yes, thank you.
that much is clear.
moritz masak: do the usual debugging steps: first copy&paste on your terminal; if that works, do the ssh to hack and test there again; if that works, test it inside screen too 13:57
xfix /set term_charset utf-8
Oh wait, moritz already gave this command.
I'm somewhat curious what the issue is, but I don't have feather server access, and screen in my system supports Unicode without specifying -U. 13:58
moritz masak: oh, irssi has the recode_transliterate option; you might want to try to switch that off 13:59
xfix That's probably why. 14:00
Except recode_transliterate should only trigger when the character set doesn't have a character.
So probably disabling it will make "?" appear instead.
moritz "If enabled, irssi tells iconv to try and replace characters that don't recode well with similar looking ones that exist in the target character set." 14:01
now it'd be interesting to know what "don't recode well" means
masak test: ☺
xfix Doesn't exist in target character set.
:-)
masak that comes out right in the irc logs. 14:02
xfix Read UTF-8 correctly.
masak but it looks like question mark, X, question mark on my monitor.
moritz tromsø
masak yep, got the ø correctly.
that one looks right. only the ☺ doesn't. 14:03
FROGGS »ö«
xfix question mark, X, and question mark... hm...
moritz the difference is that ø is in Latin-1, the ☺ doesn't
masak FROGGS: looks fine, too.
FROGGS that's enough then :o)
moritz as are » and «
xfix ☺ is 0xE2 0x98 0xBA.
FROGGS m: say "a" ~~ /a/ 14:04
masak even the ☺ looks fine as long as it is on my input line in irssi. when it ends up in the backlog in irssi, it turns wrong. :/
camelia rakudo-moar e86167: OUTPUT«「a」␤␤»
FROGGS that might be important to see right
masak oh, now the camelia newlines show up as question-mark, P, question-mark. improvement :)
xfix 0x98 is ~ in Windows-1252... 14:05
moritz masak: ok, at least now we know it's an irssi issue, not screen or locale
masak but the camelia logo in the topic is still ">>o<<"
xfix Odd.
masak, probably wasn't refreshed, or something.
moritz masak: the irssi versions on feather and hack differ only slightly. Might I suggest you rsync your .irssi dir from feather to hack? 14:06
unless you've already done that, of course :-)
masak that's a good idea. will do.
14:07 masak left 14:08 masak joined
masak m: say 3 14:09
camelia rakudo-moar e86167: OUTPUT«3␤»
masak ok, back to "NL".
grr
Unicode is not my friend today. 14:10
moritz ansible all -m apt -a 'update_cache=yes upgrade=yes' # ♥ 14:14
xfix Old feather feels so dead. Only I'm online... 14:22
sergot masak: ping :) 14:26
masak sergot: pong 14:28
xfix Hm... >>?<< 14:29
masak, can you run `/script exec print $ENV{LANG}`, and check main buffer? 14:31
masak xfix: en_US.UTF-8
xfix As it should be. Odd... 14:32
14:33 mvuets joined 14:36 frew left 14:41 BenGoldberg joined, sqirrel_ left 14:59 koo6 joined 15:00 Guest19298 is now known as felher
xfix moritz, sent you an e-mail 15:09
15:16 davido_ left, davido_ joined 15:17 mvuets left 15:23 rindolf joined 15:33 rurban left 15:34 zakharyas joined
arnsholt_ now has to learn group theory, due to Christmas 15:39
Yay, I guess? :-D 15:40
masak yay! \o/
arnsholt_: I am here for all your group theory needs :D
arnsholt_ Good to know :-) 15:41
Although I'll persevere for a bit longer before resorting to cheat codes
masak makes sense. 15:42
arnsholt_ The cube was confiscated at various points last night though 15:44
Apparently my attention was a bit divided ^_^
colomon The cube? 15:45
masak a Rubik one, presumably.
arnsholt_ Yep. But with Christmas themed pictures on the sides, rather than the classic one 15:46
A very vexing gift :-)
masak .oO( ho ** 3 ) 15:47
arnsholt_ So far I've managed to assemble one complete face (including the bits of the neighbouring faces). But that just makes it that much harder 15:53
15:55 arnsholt_ is now known as arnsholt
masak :) 15:55
dalek href="https://perl6.org:">perl6.org: e8e4314 | timotimo++ | includes/header:
On small-screen devices, don't try for three columns.
15:56
timotimo ^- i hope this doesn't break things
dalek href="https://perl6.org:">perl6.org: f4dbe8d | timotimo++ | source/ (5 files):
optipng gives ~15% decrease, or 21% for p6-overview.png
16:00
16:08 zakharyas left 16:14 andreoss left
colomon got a Rubik's cube for Christmas, oh, 30-something years ago. :) 16:15
TimToady actually had a lot more fun with his Soma cube 16:17
16:17 DarthGandalf left
xfix ho ** 3 == hohoho 16:17
TimToady m: say 'ho' xx 3 16:18
camelia rakudo-moar e86167: OUTPUT«ho ho ho␤»
rindolf TimToady: what is xx?
TimToady list repetition
rindolf TimToady: ah. 16:19
TimToady same as ('ho') x 3 in Perl 5
rindolf TimToady: ah.
TimToady: nice.
TimToady: Happy Christmas.
TimToady: what's up?
timotimo TimToady: happy christmas :)
xfix I don't really like that parenthesis thing. x is like the only thing in Perl that behaves like that.
Forcing me to write (@list) x $count instead of logical @list x $count.
TimToady yes, that was a wart 16:20
xfix (well, and `my ($item) = stuff`, but at least in this case it isn't that bad)
TimToady rindolf: the small ones have been up for more than two hours already, processing the contents of their stockings 16:21
I don't know how why it started, but these days the christmas stockings serve primarily as a diversion to keep the kids from tearing into the regular presents before the adults are out of bed :) 16:22
or the grandkids and grandadults, in this case :)
timotimo perl6.org used to be rated this for mobile: 91 / 100User Experience 16:23
er, no. *is now* rated this 16:24
TimToady well, it was certainly designed for wide screens, not so much for skinny ones 16:25
but we did design it to degrade as whole boxes when narrow
the box ordering makes less sense though 16:26
timotimo the /community/ page still has 65 / 100User Experience 16:27
because of tiny font sizes
TimToady we have a tiny community
timotimo correct, it's designed to degrade as whole boxes, but if you don't put a viewport thingie, it'll try to scale the page so that it fills the width of the screen as if it were a desktop
TimToady "God bless us, every one!" --Tiny TimToady 16:28
timotimo so it gave you three columns on phones in portrait
TimToady: every god bless us? :)
TimToady timotimo: works for monotheistic logicians :)
timotimo indeed
sadly, the change i made to the header include doesn't fix the other pages for mobile
it seems to use a different snippet/include/thingie 16:29
16:30 sqirrel_ joined 16:34 xfix left 16:40 DarthGandalf joined 16:42 atroxaper left, atroxaper joined 16:43 atroxaper left 16:44 anaeem1_ joined 16:53 rurban joined
masak rindolf: the rindolf spec at www.shlomifish.org/rindolf/rindolf-spec.xml seems to cut off after "LISP-like Features\nRe-usable Virtual Machines Instances". I was eager to read the rest... 17:02
17:04 mr-foobar joined
rindolf masak: I neglected it. 17:04
masak: and didn't see too much point to it.
17:11 ptc_p6 joined 17:19 sqirrel_ left
gtodd hmm there are a lot of wise persons on camels in here :-) 17:20
t'is the way of the camel ...
psch 120 less lines in the invokedynamic logic for shortname interop methods \o/ 17:27
i've also been wondering if i should hook up perl6 .gist to java .toString(), it seems sensible on first glance
oh, actually i should hook up .Str to .toString() i guess 17:28
17:37 dakkar joined
masak rindolf: oh, so there never was more? 17:38
moritz: hack.p6c.org is on Zulu time? 17:39
17:41 BenGoldberg left
rindolf masak: no, there was not. 17:42
masak rindolf: I'm fascinated by rindolf in its role as one of the more well-defined "alternatives" to Perl 6. 17:43
17:43 atroxaper joined
vendethiel by rindolf? 17:44
oh
masak rindolf: I'm curious what your current thoughts about Perl 5 and Perl 6 are.
vendethiel: www.shlomifish.org/rindolf/rindolf-spec.xml
rindolf masak: well, I'm still using Perl 5.
vendethiel read it
rindolf masak: I played a little with Perl 6 implementations, and they were too incomplete, buggy and slow. Maybe it's better now. 17:45
moritz masak: yes, it's on UTC 17:47
17:51 atroxaper left
masak rindolf: a little, yes. 17:52
18:00 gtodd left
vendethiel masak: it's still a bit slow, but incomplete? not really 18:00
18:00 gtodd joined 18:07 xfix joined
masak vendethiel: it's much better, but I don't want to oversell it either. 18:09
vendethiel: there will be a day when I can say that we're fast and virtually bug free. but it's not today.
vendethiel masak: we're slow. That's a given, even with the JIT 18:10
masak complete? depends what you mean. I'm working on macros. we still have GLR and other stuff left.
vendethiel masak: but I think that we have most features I use completly working
masak we're much closer to completion than we were back in 2005 when I joined.
much, much closer.
xfix Perl 6 is still slow, but it's like 1,000 times faster than 5 years ago.
18:10 Mso150 joined
vendethiel xfix: which is both interesting and not interesting, depending from where you look at it :p 18:11
xfix In any case, improvements are still done. 18:12
Currently, the work is on MoarVM, a virtual machine designed to run Perl 6.
masak that's a bit one-sided. work is still ongoing on the JVM and Parrot backends, too. 18:13
xfix Yes, of course.
FROGGS not only designed to run Perl 6 - it also was created after knowing what Perl 6 is
(MoarVM)
xfix www.moarvm.com/roadmap.html - there is still lots to improve, but MoarVM is getting here. 18:14
JVM and Parrot also get improvements.
(NQP ports that is, JVM itself is very stable) 18:15
But well, it also has to be admitted that Perl 6 is a quite complex language, which makes optimizations more complex. 18:16
JIT somewhat reduces the issue, but it's still here. 18:17
Other languages have similar issues. For example, in JavaScript, __proto__ causes huge performance issues. 18:18
18:20 dakkar left 18:28 ptc_p6 left 18:35 Mso150_a joined 18:36 Mso150 left
gtodd at Xmas there's often lots of gifts .... :-) 18:36
'inspration to perl5' => [ perl6 , rindolf , rust, [ sub { ... # returns a long list } ] ] ; 18:37
xfix s/# returns a long list/#`(returns a long list)/
gtodd :-D 18:38
psch .oO( unsp, unsp, unsp baby )
vendethiel xfix: which is why it's nonstandart :p
xfix vendethiel, EcmaScript 6 made it standard because browsers implemented it. 18:39
vendethiel xfix: oh, it's standardized now? that's the wrong way of standardizing stuff :p
xfix (because they had do in order to support mobile websites written for WebKit)
psch m: 1 R= my $x; say $x 18:47
camelia rakudo-moar e86167: OUTPUT«1␤»
psch std: 1 R= my $x; say $x
camelia std 76ccee1: OUTPUT«===SORRY!===␤Cannot reverse the args of = because list assignment operators are too fiddly at /tmp/PktMvnXTmB line 1:␤------> 1 R=⏏ my $x; say $x␤Check failed␤FAILED 00:00 138m␤»
psch i think that ties into RT #77114 as well, doesn't it
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77114
18:47 pmurias joined
psch looks like can_meta should be used more... 18:47
xfix m: roll 20, 1..20 18:50
camelia ( no output )
xfix m: say roll 20, 1..20
camelia rakudo-moar e86167: OUTPUT«12 3 16 16 14 9 14 13 13 7 13 7 13 9 8 6 12 1 8 1␤»
xfix Neat. 18:51
m: say [+] roll 20, 1..20
camelia rakudo-moar e86167: OUTPUT«242␤»
xfix m: say [+](roll 20, 1..20) xx 20
camelia rakudo-moar e86167: OUTPUT«187 243 152 223 186 236 215 235 209 218 232 217 184 242 197 205 157 183 188 209␤»
vendethiel xfix: xx autothunks
xfix I know. 18:52
vendethiel just checking :p
xfix And this is generally what user wants. The user doesn't want [] xx 20 to return 20 identical objects.
moritz are you guys interested in web stats for the various *.perl6.org sites? 18:53
and if yes, what software would you recommend for generating them? (from apache logs; I don't want to embed any tracking JS into the sites)
xfix Write the software in Perl 6 (just kidding). 18:54
(although, I wonder... perhaps)
[] xx 20 in Perl 6 definitely shouldn't do gist.github.com/xfix/f972708d972e6912e9e7
(that's actually harmful, in my opinion)
18:55 FROGGS[tab] left
moritz that's the main reason it thunks 18:55
xfix And then Python users write code like ([] for e in range(20)) 18:56
19:14 rindolf left 19:18 ptc_p6 joined
timotimo m: say 128, 128, -> $a, $b { (($a div 2) .. ($b + 1)).roll(2) } ... * < 16 19:18
camelia rakudo-moar e86167: OUTPUT«128 128 120 97 74 90 78 66 56 49 45 43 23 28 26 16 16 13␤»
timotimo m: say 128, 128, -> $a, $b { (($a div 2) .. ($b + 1)).roll(3) } ... * < 16 19:19
camelia rakudo-moar e86167: OUTPUT«128 128 124 74 84 70 56 73 47 53 72 54 43 39 33 26 25 25 14 13␤»
masak m: macro foo { quasi { BEGIN { say "merry christmas!" } } }; foo; foo 19:25
camelia rakudo-moar e86167: OUTPUT«merry christmas!␤»
masak m: macro foo { quasi { BEGIN say "merry christmas!" } }; BEGIN say "jingle bells"; foo; foo 19:26
camelia rakudo-moar e86167: OUTPUT«merry christmas!␤jingle bells␤»
masak is of the opinion that this should actually print "jingle bells" and then "merry christmas" twice
turns out I blogged about this back in April 2012: strangelyconsistent.org/blog/reveng...-hackathon 19:27
but then I didn't have an opinion, just an explosion.
mst surely the BEGIN means it should say merry christmas twice at compile time, then jingle bells once at runtime 19:28
masak `BEGIN say "jingle bells";` 19:29
my main rationale is this: quasis are "inert code"; they are in a sense not participating in the code document yet; a bit like "shadow DOM". 19:30
mst oh, I'd misread it and missed that BEGIN 19:31
ok, then I agree with you
masak if a BEGIN document fires ASAP but once the compiler reaches the end of the BEGIN block, then it should fire after macro insertion.
because the BEGIN block in the quasi is just a ghost.
mst right
masak my lesser rationale is that if you want code to fire while parsing a macro, you don't need to put it in the quasi at all. 19:32
xfix By the way, "But braces? In Python? I thought that was SyntaxError: not a chance." 19:33
masak .oO( what happens when an unstoppable BEGIN block meets an immovable quasi )
xfix Only for flow control blocks. Sets, dictionaries use braces.
masak xfix: that's true.
xfix: it was more poking fun than rational argument. 19:34
xfix I personally like Python 3 formatting.
It's quite neat in my opinion.
masak I like it too.
xfix The reason why formatting strings exist is localization. 19:35
masak then again, it's not that hard to improve on the C string formatting format.
xfix Sure, you can have "My name is $name.", but good luck translating that, when Perl internally sees it as concatenation..
Of course, I'm sure there are solutions for this problem. 19:36
TimToady your internationalization can key on 'My name is $name' 19:37
xfix Something like ECMAScript quasis.
TimToady we just need, like, macros or something 19:38
masak xfix: ECMAScript doesn't have quasis.
xfix Sure it doesn't.
mst masak: LISPCEPTION
xfix I just refer to one of ECMAScript proposals.
wiki.ecmascript.org/doku.php?id=harmony:quasis
masak oh dear :) 19:39
xfix The issues with "My name is $name." is that it's internally just "My name is " ~ $name ~ ".".
TimToady not at macro time
xfix Hm, interesting.
masak there are senses in which it is and senses in which it ain't.
xfix So, macros could do something like _("My name is $name."). 19:40
TimToady well, sure
macros are all about "unwarranted chumminess with the compiler"
a good argument for not only having AST macros, perhaps 19:41
either that, or some way of AST tree matching in the rewrite rules
or both, this being Perl :) 19:42
xfix It would be neat if something like i18n("My name is $name.") could be translated to something like python-format(gettext("My name is {name}."), name => $name).
(:$name is shorter, but whatever)
mst xfix: like p3rl.org/i18n 19:43
TimToady well, $:name is a nmaed parameter
named, even
xfix Macros are a neat thing. You don't have preprocess code. 19:47
19:48 FROGGS_ joined
TimToady notes that the match tree of a quote notionally can return either the original text or the parsed structure 19:50
so you could even use the normal quote parser, but just give it a different action
19:51 virtualsue joined 19:52 Sqirrel left, FROGGS left
xfix Extensible syntax is also interesting. 19:52
It allows you to do stuff like E4X in Perl 6.
my $sales = <sales vendor="John" />; 19:53
TimToady you could say that <foo bar> is a tag, while < foo bar > is a qw 19:54
xfix Oh, right, it conflicts with qw[]. 19:55
19:55 dakkar joined
TimToady there's always tradeoffs 19:55
and even if you use code that is currently a syntax error, the tradeoff is that you'll get worse syntax errors :) 19:56
xfix So, my $sales = xml <sales vendor="John" />; 19:57
That could be an interesting module.
19:57 Sqirrel joined 19:58 darutoko- left
TimToady my $sales = xml qw:s<sales vendor="$who" />; 19:58
unfortunately, «sales vendor="$who" /» is not gonna dwim 19:59
or dwym
or dwtm
FROGGS_ .oO( dwwm )
xfix In E4X, it would look like <sales vendor={who}>, so in Perl 6 it would be like <sales vendor=$who>. 20:00
TimToady well, my point is that «» loses the quotes
if you want {} instead of $, that's easily arranged with qw:c instead of qw:s 20:01
and eventually xml itself could be a quote macro that does qw:c or so 20:02
well, could do that now if we had text macros
20:14 PZt left
itz what's the best graphics lib binding to just plot simple coloured points? SDL? 20:26
moritz itz: SVG 20:27
naddiseo m: sub reducer($l, $r, :@ops) { [$l, @ops, $r] }; say reduce(&reducer.assuming(opts => ('+', )), (1, 2)); 20:29
camelia rakudo-moar e86167: OUTPUT«␤ in sub reducer at /tmp/DzFK1QiHfF:1␤ in sub CURRIED at src/gen/m-CORE.setting:3572␤ in method reduce at src/gen/m-CORE.setting:1␤ in sub reduce at src/gen/m-CORE.setting:9371␤ in block <unit> at /tmp/DzFK1QiHfF:1␤␤»
naddiseo Bug, or no?
It's caused by a spelling error, but doesn't tell me what the error is
xfix Empty error message for me. Yeah, I'm pretty sure it's a bug. 20:30
naddiseo K next, bug with perl6, or moar... 20:32
xfix Probably Perl 6.
pj: sub reducer($l, $r, :@ops) { [$l, @ops, $r] }; say reduce(&reducer.assuming(opts => ('+', )), (1, 2));
p: sub reducer($l, $r, :@ops) { [$l, @ops, $r] }; say reduce(&reducer.assuming(opts => ('+', )), (1, 2));
camelia rakudo-parrot e86167: OUTPUT«Unexpected named parameter 'opts' passed␤ in sub reducer at /tmp/gswWQu_a1p:1␤ in sub CURRIED at gen/parrot/CORE.setting:3577␤ in method reduce at gen/parrot/CORE.setting:9215␤ in sub reduce at gen/parrot/CORE.setting:9303␤ in block <unit>…»
xfix Ok, Moar. 20:33
psch opts <> ops
xfix psch, the issue is error message.
Yes, the code should error, but it shouldn't error with empty message.
psch ohh
naddiseo I spent an hour trying to track that down.
psch yeah, just saw the last eval, my bad :)
.assuming needs work, in any case 20:34
xfix It does.
naddiseo all because I'm more used to typing "opts" than "ops"
Okay, so do I report the bug on github, or is does moar have another bug tracker somewhere? 20:35
xfix You probably should report the error to Perl 6.
It may be issue with Perl 6 code handling MoarVM.
20:37 FROGGS[tab] joined
xfix Speaking of, I'm not sure if it should work this way. 20:37
r: sub reducer($l, $r, :$ops) { [$l, $ops, $r] }; say reduce(&reducer.assuming(opts => ('+', )), (1, 2));
camelia rakudo-moar e86167: OUTPUT«1 (Any) 2␤»
..rakudo-parrot e86167: OUTPUT«Unexpected named parameter 'opts' passed␤ in sub reducer at /tmp/tmpfile:1␤ in sub CURRIED at gen/parrot/CORE.setting:3577␤ in method reduce at gen/parrot/CORE.setting:9215␤ in sub reduce at gen/parrot/CORE.setting:9303␤ in block <unit> at…»
xfix Yeah, something is really wrong here.
It SHOULDN'T work. 20:38
naddiseo yup
which bug tracker should I use? since there seems to be so many.l. 20:39
FROGGS_ report it to [email@hidden.address] 20:40
xfix [email@hidden.address]
psch m: sub foo(&s, *%nameds) { return &s(|%nameds) }; sub bar(:$a) { }; foo :b(1) 20:41
camelia rakudo-moar e86167: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in sub foo at /tmp/5x5KFYv8lc:1␤ in block <unit> at /tmp/5x5KFYv8lc:1␤␤»
psch m: sub foo(&s, *%nameds) { return &s(|%nameds) }; sub bar(:$a) { }; foo &bar, :b(1)
camelia ( no output )
psch that's about what .assuming does :/
p: sub foo(&s, *%nameds) { return &s(|%nameds) }; sub bar(:$a) { }; foo &bar, :b(1)
camelia rakudo-parrot e86167: OUTPUT«Unexpected named parameter 'b' passed␤ in sub bar at /tmp/bcvAexqlQI:1␤ in sub foo at /tmp/bcvAexqlQI:1␤ in block <unit> at /tmp/bcvAexqlQI:1␤␤»
20:44 atroxaper joined
dalek ast: 4c74616 | (Konrad Borowski)++ | S06-currying/named.t:
Add a test case for unknown named parameter in assuming.
20:46
20:48 dakkar left, Alula left, anaeem1_ left
naddiseo That test case works fine for me.. 20:48
20:48 anaeem1_ joined, atroxaper left 20:49 Alula joined
xfix r: sub {}.assuming(named => True)() 20:49
camelia rakudo-parrot e86167: OUTPUT«Unexpected named parameter 'named' passed␤ in sub at /tmp/tmpfile:1␤ in sub CURRIED at gen/parrot/CORE.setting:3577␤ in block <unit> at /tmp/tmpfile:1␤␤»
( no output )
naddiseo hm, yeah, works on moar 20:50
xfix The thing is, the test tests whether it fails.
Because dies_ok.
psch std: my @a>>= 1,2,3 20:52
camelia std 76ccee1: OUTPUT«===SORRY!===␤Missing << or >> at /tmp/uzRMyGVZ_T line 1:␤------> my @a>>=⏏ 1,2,3␤ expecting infix_circumfix_meta_operator␤Parse failed␤FAILED 00:00 136m␤»
psch std: my @a >>=>> 1,2,3
camelia std 76ccee1: OUTPUT«===SORRY!===␤Missing << or >> at /tmp/1XnsOlpXye line 1:␤------> my @a >>=>⏏> 1,2,3␤ expecting infix_circumfix_meta_operator␤Parse failed␤FAILED 00:00 136m␤»
psch std: my @a >>[=]>> 1,2,3 20:53
camelia std 76ccee1: OUTPUT«===SORRY!===␤Cannot hyper with = because list assignment operators are too fiddly at /tmp/fHqHr8OVSo line 1:␤------> my @a >>[=]>>⏏ 1,2,3␤Check failed␤FAILED 00:00 138m␤»
psch m: my @a >>[=]>> 1,2,3
camelia ( no output )
naddiseo p: sub (:@a) {}.assuming(named => (2,))(); 20:55
camelia rakudo-parrot e86167: OUTPUT«Unexpected named parameter 'named' passed␤ in sub at /tmp/ojDCTDF3eH:1␤ in sub CURRIED at gen/parrot/CORE.setting:3577␤ in block <unit> at /tmp/ojDCTDF3eH:1␤␤»
naddiseo m: sub (:@a) {}.assuming(named => (2,))();
camelia rakudo-moar e86167: OUTPUT«␤ in sub at /tmp/fkksuznGI4:1␤ in sub CURRIED at src/gen/m-CORE.setting:3572␤ in block <unit> at /tmp/fkksuznGI4:1␤␤»
20:55 virtualsue left
naddiseo that's the minimal I got it down to 20:55
needs the parameters in the signature for it to fail on moar
20:56 beastd joined
naddiseo and needs to be an array, 20:56
I got no error with a scalar
21:00 kaare_ left
moritz the error it should produce is "Unexpected named parameter 'named' passed" 21:02
naddiseo yeah
21:04 Mso150_a left
moritz p: sub (:@a) {}.assuming(named => (2,))(); 21:04
camelia rakudo-parrot e86167: OUTPUT«Unexpected named parameter 'named' passed␤ in sub at /tmp/SU05Q0PEvg:1␤ in sub CURRIED at gen/parrot/CORE.setting:3577␤ in block <unit> at /tmp/SU05Q0PEvg:1␤␤»
naddiseo Reported as perl #123498 21:05
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123498
xfix naddiseo, Thanks :-).
21:06 Mso150_a joined
xfix I was curious what issue 123456 was. 21:06
A spam, apparently :-(.
naddiseo No problem, xfix. Glad to help, I sort of wish I could actually fix it myself, but the code base would probably take too long to learn. 21:08
xfix No problem, sending bug reports is a great help :-).
psch considering it depends on the backend it probably would take a bit, yeah 21:09
it's not --optimize, that much i found out already :)
i forget what the mvm env vars are to turn off OSR and all those fancy things or i'd have looked there
moritz psch: there's a moar.pod in the MoarVM repo that documents them 21:10
21:11 Mso150_a left
naddiseo well, I'm off to game with my siblings. thanks guys, have a good christmas! 21:11
xfix github.com/rakudo/rakudo/blob/7270...nd.c#L1065 21:12
This code reports an error in Parrot.
21:13 Mso150 joined
xfix This is probably why it behaves so in Moar. 21:13
moritz with --ll-exception I get a backtrace into the bind_sig
xfix JVM version also has similar code.
21:14 ptc_p6 left 21:15 gfldex left
xfix r: sub {}(|{named => True}) 21:18
camelia rakudo-parrot e86167: OUTPUT«Unexpected named parameter 'named' passed␤ in sub at /tmp/tmpfile:1␤ in block <unit> at /tmp/tmpfile:1␤␤»
( no output )
moritz m: sub {}(named => True)
camelia rakudo-moar e86167: OUTPUT«Unexpected named parameter 'named' passed␤ in sub at /tmp/Qn4wD95KYO:1␤ in block <unit> at /tmp/Qn4wD95KYO:1␤␤»
moritz xfix++
xfix r: sub {}(|:named) 21:20
camelia ( no output )
..rakudo-parrot e86167: OUTPUT«Unexpected named parameter 'named' passed␤ in sub at /tmp/tmpfile:1␤ in block <unit> at /tmp/tmpfile:1␤␤»
xfix The issue is with | and named parameters.
21:20 virtualsue joined 21:21 gfldex joined
moritz I think I know where the error is coming from 21:24
21:26 virtualsue left
moritz ./perl6-m -e 'sub (:@a) {}.assuming(named => (2,))()' 21:29
eeks
Unexpected named parameter 'named' passed in sub at -e:1 in sub CURRIED at src/gen/m-CORE.setting:3572 in block <unit> at -e:1
psch moritz++
moritz spectesting now
moritz shouldn't commit debug output from the signature binder, that could turn out weird :-) 21:30
xfix Yes, you should avoid accidentally committing debug output.
(I saw it a few times back when I was responsible for "Perl 6 updates" long time ago) 21:31
moritz and pretty much every code uses the binder, so that would be double bad
xfix By the way, once again, timotimo++
TimToady it's especially peculiar if you put it to stdout, and then use it in the build to, say, concatenate files for compilation...oops... 21:32
moritz hopes for new weeklys, now that advent is over
TimToady so in nqp I've started to avoid say() and use nqp::printfh(nqp::getstderr(), ...)
TimToady keeps wishing for note() in nqp 21:33
moritz TimToady: which isn't impossible, given that this is BOOTSTRAP.nqp :-)
(I mean, accidentally printing into generated files)
TimToady: add it to NQP's setting?
TimToady should probably live right next to say(), wherever that is...
moritz git grep 'sub say' 21:34
points to src/core/IO.nqp
TimToady otoh, if it has to look up stderr every time, that's something I tend to factor out with my $err := nqp::getstderr() in routines that use it a lot
TimToady doesn't know what the overhead of nqp::getstderr() is 21:35
xfix Probably not high, if used for debugging output removed before committing ;-).
TimToady has left debugging code all over the NFA stuff because I *know* I'll be coming back there again :) 21:36
FROGGS_ TimToady: I just tripped over an nqp::say() messing up the nqp build 30 minutes ago :o) 21:38
moritz m: sub {}.assuming(named => True)() 21:39
camelia ( no output )
masak 'night, #perl6 21:41
21:41 BenGoldberg joined
dalek kudo/nom: 964e0dd | moritz++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
RT #123498: Empty binding error in some cases (partial fix)

On MoarVM, if unexpected named parameters came in through capture or hash interpolation, the error message would be empty.
An "if $error" would be false in the case, because $error is usually an empty array. Changing it to an "if nqp::defined($error)" as the rest of the code uses should prevent error messages from going missing.
21:41
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123498
moritz this fixes the case ./perl6-m -e 'sub (:@a) {}.assuming(named => (2,))()' 21:42
but not with empty signature :(
sub () {}.assuming(named => (2,))() # still no error :( 21:43
xfix So, the test I pushed to roast still fails.
dalek ast: 3f00b5b | peschwa++ | S03-metaops/ (4 files):
Add tests for RT #77114 and related cases.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77114
moritz xfix: aye 21:45
xfix: at least the case with the empty error message is now gone
psch github.com/rakudo/rakudo/pull/340 to go with the tests, assuming travis agrees with my local compile success :) 21:46
although i have to say <1 R= my $x> is kind of entrancing :) 21:47
xfix It's definitely different. 21:48
moritz jnthn: any reason why the $BIND_RESULT_ consts in NQP are not declared as 'int' ?
xfix I hope that Perl 6 won't ever have `(1, 2)R something` 21:54
psch space is (luckily?) not an operator 21:55
21:55 Sqirrel left
psch hm, meta'ing circumfix... say R. R)1,2,3( # o.o 21:56
that's definitely luckily not legal :P 21:57
21:57 xfix left
dalek kudo/nom: 0521a3c | moritz++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
native-type some constants in the binder

should not make things slower, I hope :-)
22:02
TimToady m: sub postfix:<R>(\c) { c.reverse }; say (1,2)R 22:07
camelia rakudo-moar e86167: OUTPUT«2 1␤»
TimToady oh, didn't see the 'something' :)
22:09 koo6 left
moritz TimToady: do you happen to know if the |c in a sub call mysub(|c) is flattened in the binder? Or somewhere else? 22:10
or maybe there is a shortcut somewhere for subs with empty signatures? 22:13
22:17 ChanServ sets mode: +o moritz
moritz »ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, niecza:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! 22:18
moritz »ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
moritz sets mode: -o moritz 22:23 Mso150 left
dalek ast: 4c48e78 | moritz++ | S06-currying/mixed.t:
remove S06-currying/mixed.t

it was based on the assumption that you cah fill positionals by name, which has been abolished a few years ago
22:30
22:30 Rounin joined 22:31 virtualsue joined
dalek ast: 0367948 | moritz++ | S06-currying/named.t:
Fudge failing test for RT 123498
22:33
22:33 virtualsue left 22:35 pmurias left
vendethiel "subset ... where &.assuming" wow 22:36
22:36 atroxaper joined 22:38 anaeem1_ left 22:40 atroxaper left 22:42 awoodland joined 22:46 davido_ left 22:47 davido_ joined
dalek kudo/nom: 8e5c5e9 | moritz++ | src/core/Routine.pm:
Micro-optimize Routine.assuming
22:47
psch sleeps & 22:56
vendethiel convinced two friends to give perl6 a go with the advent calendar, and is pretty happy with that 22:57
moritz vendethiel++ 22:58
vendethiel moritz: i.imgur.com/bF7fBKF.png ! yay!
23:00 psch left 23:06 virtualsue joined 23:25 Alula left, Alula joined 23:30 TheovandenHeuvel left 23:34 telex left, virtualsue left 23:36 telex joined 23:47 rurban left