»ö« 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. |
|||
TimToady | will try it again with inlining disabled | 00:01 | |
anyway, this is also on an I7, so we're not being shabby :) | 00:03 | ||
hmm, actually, it ran faster with inlining disabled, so I'm confused | 00:06 | ||
assuming MVM_SPESH_INLINE_DISABLE=1 time b2b3b is the correct incantation | 00:07 | ||
jnthn | Hm, weird. | 00:09 | |
TimToady | maybe some distortion from inserting instrumentation | 00:13 | |
jnthn | Mebbe | ||
TimToady | it was only slightly faster, and I do have that bogus loop that only runs once each time through the outer looop | ||
fixing that, and retiming | |||
jnthn | I did spot some rather weird deopts going on the other day when fixing the OSR bug, which I still need to look into. | 00:14 | |
TimToady | but I rather suspect my 9 minutes was the JVM number | 00:15 | |
jnthn | OK. | ||
00:18
Psyche^_ joined,
BenGoldberg joined
|
|||
TimToady | huh, taking out the inner loop added 10 seconds o.O | 00:18 | |
jnthn | o.O | 00:19 | |
TimToady | 4:47 to 4:58 | ||
trying the disabled inline version again without the loop, just for kicks | 00:20 | ||
TimToady wonders if he keeps reporting timings every five minutes, he can keep jnthn++ up all night... | 00:21 | ||
00:22
Psyche^ left
|
|||
colomon | go go go! | 00:23 | |
TimToady | now slower with inline disabled, 5:04 | 00:24 | |
though this time I uttered: time (MVM_SPESH_INLINE_DISABLE=1 ./b2b3b) | 00:25 | ||
so as to use the shell timer rather than /usr/bin/time | 00:26 | ||
maybe that does something weird | |||
00:28
Alina-malina left
|
|||
BenGoldberg | If your test program is single-threaded, and if your computer is multi-cored, then you should be able to time a few different variations at once, without them interfering with one another. | 00:28 | |
[Coke] | m: use Test; try { try { die 'qwerty'} ; say ~$!; die }; say $!; | ||
camelia | rakudo-moar 6cc807: OUTPUT«qwerty in block at /tmp/5fkXk0S2J0:1» | ||
[Coke] | we have a test that expects that second usage of $! to have qwerty in it. | 00:29 | |
00:29
figoe left
|
|||
BenGoldberg | m: use Test; try { try { die 'qwerty'} ; say ~$!; die ~$! }; say $!; | 00:30 | |
camelia | rakudo-moar 6cc807: OUTPUT«qwertyqwerty in block at /tmp/xxrMqArP8c:1» | ||
BenGoldberg | m: use Test; try { try { die 'qwerty'} ; say ~$!; die $! }; say $!; | ||
camelia | rakudo-moar 6cc807: OUTPUT«qwertyqwerty in block at /tmp/bjpTjQZ_NA:1 in block at /tmp/bjpTjQZ_NA:1» | ||
TimToady | updated the RC entry to avoid the loop | ||
BenGoldberg | [Coke], What is 'die' supposed to do when not given any args? | 00:31 | |
TimToady | in p5 it uses "Died" for the message | ||
[Coke] | test says: | 00:32 | |
die; # use the default argument | |||
TimToady | m: die | ||
camelia | rakudo-moar 6cc807: OUTPUT« in block at /tmp/R6AwNcpnQr:1» | ||
BenGoldberg | p56: die | ||
camelia | p5-to-p6 : OUTPUT«die» | ||
00:33
Alina-malina joined
|
|||
BenGoldberg | m: use Test; try { try { die 'qwerty'} ; say ~$!; die $_ }; say $!; | 00:33 | |
camelia | rakudo-moar 6cc807: OUTPUT«qwertyuse of uninitialized value of type Any in string context in block at /tmp/ELgL8teQhc:1use of uninitialized value of type Any in string context in block at /tmp/ELgL8teQhc:1 in block at /tmp/ELgL8teQhc:1» | ||
TimToady | eval: die; # do we have this one currently? | ||
jnthn | Well, the summer heat is doing a fairly good job of keeping me awake... | ||
BenGoldberg | m: die $_ | ||
camelia | rakudo-moar 6cc807: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/X_jC_qlE9u:1Error while creating error string: No exception handler located for warn» | ||
jnthn | ...what? | 00:34 | |
TimToady | maybe it should just asy "Confused" :) | 00:35 | |
*say | |||
00:36
rurban1 left
|
|||
lue | "Insulting programmer detected in block ..." | 00:37 | |
00:38
nbrown joined,
BenGoldberg left
|
|||
TimToady | mabye ti sluohd jsut asy "Cufsenod" | 00:39 | |
jnthn | :P | ||
jnthn goes to try and rest | 00:40 | ||
TimToady | o/ | ||
jnthn | Should have more time again for Perl 6 things soon :) | ||
o/ | |||
TimToady | oh, removing the *.base(3) makes it faster again | ||
00:40
BenGoldberg joined
|
|||
TimToady | so maybe it's the extra map and closure | 00:40 | |
BenGoldberg | n: die; | 00:41 | |
camelia | niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Died at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5)  at /tmp/SaZx9WvbdC line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line…» | ||
BenGoldberg | "Died" just like p5 | 00:42 | |
TimToady | plus the map was disabling the for-range optimization | 00:43 | |
00:43
nbrown left,
hoverboard left
|
|||
carlin | masak: $real-life interfered, but am still hunting | 00:44 | |
[Coke] | ok, removing test. | 00:45 | |
dalek | ast: 4aab931 | coke++ | S02-types/compact.t: use standard "NYI" |
00:46 | |
ast: 6600ef0 | coke++ | S02-magicals/dollar_bang.t: Remove incorrect test die with no args does NOT reuse $! |
|||
BenGoldberg | rn: try { die }; say $!.perl | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«"Died"» | ||
..rakudo-{parrot,jvm,moar} 6cc807: OUTPUT«X::AdHoc.new(payload => "")» | |||
00:47
Alina-malina left,
Alina-malina joined
|
|||
lue | I almost want to say that arg-less &die should generate a warning, or maybe die with an appropriate message :) . | 00:48 | |
[Coke] | m: say ( 1 ^^ 42 ).perl | 00:50 | |
camelia | rakudo-moar 6cc807: OUTPUT«Nil» | ||
BenGoldberg | arg-less die should warn that the behavior of arg-less die is not yet specced ;) | ||
TimToady | could usefully say "Died ($! was 'such and so')" when $! is set | ||
[Coke] | ^^ should that be False? | ||
n: say ( 1 ^^ 42 ).perl | 00:51 | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object at Niecza.StashCursor.Core (System.String key, Boolean final, Niecza.StashCursor& sc, Niecza.Variable& v, Niecza.Variable bind_to) [0x00000] i…» | ||
TimToady | given that it's trying to return one or the other, I think Nil makes sense | ||
(and is false) | |||
[Coke] | updating test... | 00:52 | |
00:52
Akagi201 joined
|
|||
TimToady | m: say [^^] 0,0,42 | 00:53 | |
camelia | rakudo-moar 6cc807: OUTPUT«42» | ||
TimToady | m: say [^^] 0,1,42 | ||
camelia | rakudo-moar 6cc807: OUTPUT«Nil» | ||
TimToady | m: say [^^] 3,1,42 | ||
camelia | rakudo-moar 6cc807: OUTPUT«Nil» | ||
TimToady | n: say Nil.perl | 00:54 | |
camelia | niecza v24-109-g48a8de3: OUTPUT«Nil» | ||
TimToady | m: say 1 ^^ 42 | ||
camelia | rakudo-moar 6cc807: OUTPUT«Nil» | ||
TimToady | odd | ||
m: say (1 ^^ 42).defined | 00:55 | ||
camelia | rakudo-moar 6cc807: OUTPUT«False» | ||
dalek | ast: fe656e4 | coke++ | S03-operators/short-circuit.t: fix expected return type: 20:51 < TimToady> given that it's trying to return one or the other, I think Nil makes sense |
||
00:57
Akagi201 left
|
|||
[Coke] | m: say ( 7 ^^ 7 ).WHAT | 00:57 | |
camelia | rakudo-moar 6cc807: OUTPUT«Nil» | ||
TimToady | otoh, maybe it should return () | 00:58 | |
since it's specced to do that in list context | |||
and Nil doesn't make () anymore | |||
well, isn't supposed to | |||
m: say ( 7 ^^ 8 ).list.perl | 00:59 | ||
camelia | rakudo-moar 6cc807: OUTPUT«().list» | ||
TimToady | m: say Nil.list.perl | ||
camelia | rakudo-moar 6cc807: OUTPUT«().list» | ||
TimToady | that's probably a bug | ||
00:59
dojmi joined
|
|||
dalek | ast: 9766670 | coke++ | S03-operators/short-circuit.t: fix expected return type: 20:51 < TimToady> given that it's trying to return one or the other, I think Nil makes sense ... is what TimToady said about the first one. "close enough!" |
00:59 | |
TimToady | m: say ()[0].perl | ||
camelia | rakudo-moar 6cc807: OUTPUT«Nil» | ||
01:00
dojmi left
01:04
dayangkun joined,
kurahaupo joined
|
|||
[Coke] | m: Mu ~~ 0 | 01:05 | |
camelia | rakudo-moar 6cc807: OUTPUT«Type check failed in binding <anon>; expected 'Any' but got 'Mu' in method ACCEPTS at src/gen/m-CORE.setting:1480 in block at /tmp/G1dWK8MLkP:1» | ||
[Coke] | ^^ tests expect this to work. | ||
01:05
thou joined
|
|||
TimToady | offhand, don't see a good reason why it shoudn't | 01:06 | |
m: Mu ~~ Junction | |||
camelia | ( no output ) | ||
TimToady | just needs to have an ACCEPTS Mu and then rejects it :) | 01:07 | |
01:07
rurban1 joined
|
|||
TimToady | ACCEPTS that accepts Mu* | 01:07 | |
m: Mu ~~ 'foo' | |||
camelia | rakudo-moar 6cc807: OUTPUT«Type check failed in binding <anon>; expected 'Any' but got 'Mu' in method ACCEPTS at src/gen/m-CORE.setting:1480 in block at /tmp/1hGHK6byNI:1» | ||
TimToady | that too | ||
unless people are expecting junctions to autothread on the left, and I don't think they should | 01:08 | ||
m: say 1 | 2 ~~ Junction | 01:09 | ||
camelia | rakudo-moar 6cc807: OUTPUT«True» | ||
TimToady | m: Mu ~~ Int | ||
camelia | ( no output ) | ||
TimToady | so it's just the :D case | ||
01:09
thou left
01:10
FROGGS__ joined
01:11
rurban1 left
|
|||
dalek | ecs: 533c76b | TimToady++ | S03-operators.pod: make ^^ return Nil on too many trues |
01:12 | |
TimToady | that might change again, as we force Nil to not produce () in list context | 01:14 | |
01:14
FROGGS_ left
|
|||
TimToady | if list comprehensions are depending on that behavior of Nil | 01:14 | |
dalek | ast: 0c689b3 | coke++ | S03-smartmatch/any- (2 files): mark some tests for RT #122395 |
01:15 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122395 | ||
01:15
kurahaupo left
|
|||
TimToady | would be funny if all our logical operators had to return () for false, but maybe they do, since 'if' is really just an 'and' in disguise | 01:17 | |
must cogitate on that smore | 01:18 | ||
01:21
rindolf joined
01:29
nbrown joined
01:33
nbrown left
01:44
SevenWolf joined
01:46
telex left
01:48
telex joined
01:50
klapperl joined
01:51
chenryn joined
01:53
Akagi201 joined,
klapperl_ left
01:57
figoe joined,
Akagi201 left
02:07
noganex_ joined
02:10
noganex left
|
|||
Mouq | m: say(1;2) # wtf | 02:12 | |
camelia | rakudo-moar 6cc807: OUTPUT«12» | ||
Mouq | m: say(my $a = 42; ' ';$a = 15) | ||
camelia | rakudo-moar 6cc807: OUTPUT«15 15» | ||
Mouq | Why. | ||
std: say(my $a = 42; ' ';$a = 15) | 02:13 | ||
camelia | std 0f2049c: OUTPUT«ok 00:01 125m» | ||
Mouq | TimToady: Should this be illegal? | ||
m: say((my $a = 42; ' ';$a = 15)) | 02:14 | ||
camelia | rakudo-moar 6cc807: OUTPUT«WARNINGS:Useless use of constant string " " in sink context (line 1)15» | ||
BenGoldberg | n: say(my $a = 42; ' ';$a = 15); | 02:15 | |
camelia | niecza v24-109-g48a8de3: OUTPUT«===SORRY!===Slicel lists are NYI at /tmp/Uvbc4gXmBm line 1:------> say(my $a = 42; ' ';$a = 15)⏏;Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die…» | ||
ventica | Can we create a "Try Perl6" page using Rakudo on JVM... like this page for Arc?: tryarc.org/ | 02:22 | |
BenGoldberg | A java applet with a jakudo REPL would be cool :) | 02:23 | |
02:23
lustlife joined
|
|||
hoelzro | Try Perl 6 would be awesome | 02:31 | |
BenGoldberg | The tryarc.org page uses ajax to send the user's typed-in code to the web server. | 02:32 | |
hoelzro | I'm still hoping that the JS backend matures | ||
02:33
kaare_ joined
02:34
silug left,
bjz_ joined,
silug joined
02:36
bjz_ left
02:39
hoverboard joined
02:41
Akagi201 joined
|
|||
TimToady | std: say( $_ for 1..10 ) | 02:43 | |
camelia | std 0f2049c: OUTPUT«===SORRY!===Unable to parse argument list at /tmp/HY9zRL6JzR line 1:------> say⏏( $_ for 1..10 )Couldn't find final ')'; gave up at /tmp/HY9zRL6JzR line 1:------> say( $_ ⏏for 1..10 )Parse…» | ||
TimToady | at least that's illegal | ||
hoelzro | if anyone's interested, I made a gist on some ideas/questions I had about the Perl 6 language: gist.github.com/hoelzro/71b65aec6cdc2574da60 | 02:45 | |
TimToady | I would consider all those to be declarations | 02:47 | |
but generally people would use the #= form on parameters and return values | |||
hoelzro | TimToady: thanks for taking the time to look! should you even be reading right now? =) | 02:48 | |
TimToady | and yes, they're intended to merge | ||
this particular makes sense for the #| form | |||
*ly | |||
which is likely to be a paragraph | 02:49 | ||
the problem with advanced filehandle options is that some VMs make it really hard | |||
hoelzro | alright, good to see that my thinking was right on that | ||
hoelzro .oO( and that I don't have to change the implementation... ) | 02:50 | ||
ah ha | |||
TimToady | we should probably provide such facilities with warnings that they may not be portable | ||
hoelzro | maybe instead of including them within the language itself, there could be third party modules that only work on particular VMs? | 02:51 | |
TimToady | or that, but you'd like things to be portable by feature, and not by "use MyOS;" | ||
hoelzro | use IO::Dup; or something could provide a candidate for open(IO::Handle) | 02:52 | |
TimToady | right | ||
hoelzro | but would IO::Dup be provided with the interpreter? or by a third party lib? | ||
or does it matter? | |||
TimToady | well, it only matters what names we make available by default; whether something gets pulled in on first use should in many cases be transparent | 02:53 | |
02:53
btyler joined,
thou joined
|
|||
TimToady | of course, there are the features like "augment" that we require them to also declare monkey business of some sort | 02:54 | |
there may also be some features that can be emulated, but sometimes emulations are partial | 02:55 | ||
see 'fork' for P5 on Windows for instance | |||
hoelzro | that was the exact example I'd thought of =) | 02:56 | |
TimToady | or maybe can emulate it, but it runs 10000 times slower | ||
at what point does performance become part of the API? | |||
and it's okay for me to read in moderation, so irc seems fine | 02:57 | ||
it's the backlog that gets tiresome to my eyes | 02:58 | ||
02:58
thou left
|
|||
hoelzro | good thing I caught you now, then! | 02:58 | |
TimToady | otoh, I'm kinda the only person who is not allowed to declare backlog bankrupcy :) | ||
hoelzro | =) | 02:59 | |
TimToady | actually, at the moment I'm only in arrears on July 16-21 | 03:00 | |
and only in #perl6, I already caught up in #moarvm | 03:01 | ||
hoelzro | well, it's not going anywhere! | 03:04 | |
TimToady | that's what people have been saying for years :) | 03:05 | |
03:08
rurban1 joined
|
|||
TimToady | in a year or so, I'd like to buy a big billboard in the middle of silicon valley that says "Perl 6 lives. You were wrong." :) | 03:09 | |
hoelzro | hehe | 03:10 | |
TimToady | or just photoshop one and let it go viral :) | ||
hoelzro | I think I've been a regular for 2 years now | ||
like, as of tomorrow | |||
it's amazing how much it's progressed | |||
TimToady | happy anniverserary | 03:11 | |
hoelzro | thanks! | ||
I just hope that others like it as much as I do! | |||
although that won't stop *me* from writing it | |||
TimToady | it's the most gratifying thing to continue to see new participants, to make up for all those developers dropping like flies along the way :) | 03:12 | |
hoelzro | =) | ||
03:13
rurban1 left
|
|||
[Coke] | TimToady++ | 03:13 | |
TimToady | well, you're obviously from hardier stock :) | 03:14 | |
03:14
rurban1 joined
|
|||
TimToady | maybe some hobbit ancestry :) | 03:15 | |
I obviously have some, since my toes are hairy, I love mushrooms, and I'm hard to kill off... | 03:16 | ||
historian: Please s/some/some hobbit ancestry/ if you're putting me into a quotes file someday. Pray omit the brackets. | 03:18 | ||
actually, if I'm to recapitulate Tolkien, I should wait about ten years, and then "Perl 6 lives!" will appear as grafitti in a New York subway. | 03:20 | ||
[Coke] | dd | 03:27 | |
hoelzro | Cannot make changes, 'modifiable' is off | 03:28 | |
TimToady | 0+0 records in | 03:32 | |
0+0 records out | |||
0 bytes (0 B) copied, 2.17737 s, 0.0 kB/s | |||
hoelzro | and now we see which 'dd' [Coke] wanted =) | 03:33 | |
03:34
hoverboard left
|
|||
btyler | are bindings meant to evaporate after a statement is completed in the repl? "my @foo = 1 .. 5; <enter>" --> 1 .. 5 "@foo; <enter>" --> nothing | 03:37 | |
the variable is declared in scope, but there's nothing there anymore | |||
sorry, my @foo := 1 .. 5; | |||
TimToady | looks like a bug to me | 03:42 | |
at some point the current REPL needs to be scrapped and integrated correctly with the compiler so that we know when multi-line constructs are being entered, and when we can just continue the compilation from line to line. | 03:44 | ||
at that point I think a lot of these issues will go away | |||
in fact, that's why there's a line in STD.pm6's ws that reads: | $ { $¢.moreinput } | 03:47 | ||
btyler | hmmm. that would be really nifty | 03:48 | |
I was investigating a better representation for lazy things in the repl, since I keep accidentally hitting enter on (1..Inf).grep({ ... something }) and then locking the repl and losing my state | 03:49 | ||
TimToady | you'd also have to notice the parser state and decide whether to execute immediately or just add to the accumulation | ||
it ought to be use .gist for the output, which should not try to print something infinite | |||
m: say 1..Inf | 03:50 | ||
camelia | rakudo-moar 6cc807: OUTPUT«1..Inf» | ||
hoelzro | what does the REPL do atm? .Str? | ||
TimToady | m: say (1..Inf).grep(20) | ||
dunno | |||
hoelzro | .gist would make more sense, imo | ||
camelia | rakudo-moar 6cc807: OUTPUT«(timeout)» | ||
TimToady | looks like an infinite grep is not considered infinite though | ||
btyler | right | 03:51 | |
TimToady | it should get tired after a while, for .gist purposes :) | ||
btyler | it does .gist, line 36 of rakudo src/Perl6/Compiler.nqp | ||
unless the thing in question doesn't know how to gist, then it just presents the string coercion (I think) | |||
TimToady | maybe gist is a context like eager, lazy, etc. | 03:52 | |
be eager till it starts to hurt, then quit :) | 03:53 | ||
btyler | worth noting that infinite greps have the same issue in .perl | 03:54 | |
TimToady | well, in that case, .perl should obviously return (1..Inf).grep(20) :) | 03:55 | |
btyler | how does one roundtrip a list that's been partially reified? | ||
(if that matters) | |||
dalek | blets: 6598f3d | (Herbert Breunung)++ | docs/ (2 files): basic quoting |
||
btyler | I suppose it ought not to matter how much of the list has been computed | 03:56 | |
TimToady | In theory, theory is better than practice, but in practice, practice is better than theory. | 03:57 | |
don't remember who said that... | |||
BenGoldberg | In theory, theory is the same as practice, but in practice, they are different. | ||
03:58
lichtkind joined
|
|||
lichtkind | chhers | 03:59 | |
did anybody lookes into my asking? | 04:00 | ||
04:04
gfldex joined
|
|||
dalek | ast/S26-WHY: 329d202 | (Rob Hoelz)++ | S26-documentation/why- (3 files): Test documentation of anonymous parameters |
04:08 | |
ast/S26-WHY: 4575233 | (Rob Hoelz)++ | S26-documentation/why- (3 files): Test documenting invocants |
|||
ast/S26-WHY: caf4161 | (Rob Hoelz)++ | S26-documentation/module-comment.t: Add test for module + semicolon comment |
|||
ast/S26-WHY: 248eccb | (Rob Hoelz)++ | S26-documentation/wacky.t: Add test for stranger commenting scenarios |
|||
ast/S26-WHY: 9461c28 | (Rob Hoelz)++ | S26-TODO: Remove tests I've added from TODO |
|||
ast/S26-WHY: 28c3aef | (Rob Hoelz)++ | S26-TODO: Add question to TODO |
|||
hoelzro | lichtkind: which would that be | ||
? | |||
lichtkind | change the heading of the tablets | 04:09 | |
04:15
nbrown joined
|
|||
dalek | ast: 1dffa82 | (Rob Hoelz)++ | S26-documentation/10-doc-cli.t: Fix broken RT reference |
04:18 | |
Heuristic branch merge: pushed 58 commits to roast/S26-WHY by hoelzro | |||
04:19
nbrown left
04:26
dayangkun left
04:31
PotatoGim joined
04:33
chenryn left
04:42
thou joined
04:43
dayangkun joined
04:45
[Sno] left,
slavik joined
04:46
thou left,
btyler left
04:49
woolfy joined,
lizmat joined
04:51
slavik left
04:58
BenGoldberg left
05:00
chenryn joined
05:06
jack_rabbit left
05:07
jack_rabbit joined
|
|||
lue wonders what it would take for sized native types to work properly... | 05:09 | ||
TimToady | a champion, of course... :) | 05:10 | |
lue | it'd be nice if I couldn't do my uint8 $a = 256, mainly :) | 05:11 | |
TimToady | m: subset uint8ish of uint8 where * < 256; my uint8ish $a = 256; | 05:15 | |
camelia | rakudo-moar 6cc807: OUTPUT«Type check failed in assignment to '$a'; expected 'uint8ish' but got 'Int' in block at /tmp/3E1WkaVWtt:1» | ||
TimToady | hmm | ||
m: subset uint8ish of uint8 where * < 256; my uint8 $a = 256.uint8ish; | 05:17 | ||
camelia | rakudo-moar 6cc807: OUTPUT«No such method 'uint8ish' for invocant of type 'Int' in block at /tmp/YH3gSU2fQZ:1» | ||
TimToady | m: subset uint8ish of uint8 where * < 256; my uint8 $a = uint8ish(256); | ||
camelia | rakudo-moar 6cc807: OUTPUT«Cannot invoke this object (REPR: Uninstantiable, cs = 0) in block at /tmp/r9HxiaHQja:1» | ||
05:17
rurban1 left
|
|||
TimToady | m: my uint8 $a = uint8(256); | 05:18 | |
camelia | rakudo-moar 6cc807: OUTPUT«Cannot invoke this object (REPR: P6int, cs = 0) in block at /tmp/to6LXUMw0Y:1» | ||
TimToady | m: my uint8 $a = Uint8(256); | ||
camelia | rakudo-moar 6cc807: OUTPUT«===SORRY!=== Error while compiling /tmp/o9oE4IxP0pUndeclared name: Uint8 used at line 1. Did you mean 'int8', 'uint8'?» | ||
lue | or maybe trying to assign a too large number will store just the LSB (effectively large-num % 256). In any case my uint8 $a = 300; say $a; should not output 300 | 05:19 | |
TimToady | nodnod | 05:20 | |
05:26
chenryn left
|
|||
dalek | blets: d32f641 | (Herbert Breunung)++ | docs/ (2 files): interpolation of quotes |
05:27 | |
05:33
chenryn joined
05:41
xinming_ left
05:47
xinming joined
05:48
rurban1 joined
05:51
gfldex left
05:52
rurban1 left
06:18
nbrown joined
06:21
nbrown left
|
|||
zengargoyle | TimToady: Debain's fortune-mod science has: In theory, there is no difference between theory and practice. In practice, there is. -- with no attribution. google / wikiquotes gives many possible sources amongst which is Yogi Berra and a couple CS UML peeps. | 06:22 | |
TimToady | so it was probably Abe Lincoln, or maybe Paul Bunyan... | 06:23 | |
zengargoyle | www.nature.com/neuro/journal/v8/n12...-1627.html says: Nobel laureate chemist Manfred Eigen | ||
06:30
thou joined
06:31
hoverboard joined
06:33
[Sno] joined
06:35
thou left
06:42
anaeem1_ joined
06:43
kaleem joined
06:48
chenryn left
06:49
rurban1 joined
|
|||
Mouq | m: say join ', ', &trait_mod:<is>.candidates.map({ .signature.params.grep({.named & ! .optional & ! .slurpy}) })>>.name.uniq | 06:53 | |
camelia | rakudo-moar 6cc807: OUTPUT«$DEPRECATED, $rw, $nativesize, $unsigned, $hidden, $array_type, $readonly, $box_target, $parcel, $default, $inlinable, $onlystar, %spec, &equiv, &tighter, &looser, $assoc, $copy, $required, $export, $SYMBOL, $docs, $hidden_from_backtrace, $pure, $dynamic, …» | ||
06:53
rurban1 left,
Alina-malina left
06:55
zakharyas joined
06:57
brrt joined
07:00
Alina-malina joined
07:04
ventica left,
ventica joined,
ventica_desktop left
|
|||
ventica | . | 07:05 | |
m: my Dog $spot; say $spot.WHAT; | |||
camelia | rakudo-moar 6cc807: OUTPUT«===SORRY!===Type 'Dog' is not declaredat /tmp/_2Zjs59RYN:1------> my Dog⏏ $spot; say $spot.WHAT;Malformed myat /tmp/_2Zjs59RYN:1------> my ⏏Dog $spot; say $spot.WHAT; expec…» | ||
ventica | m: my $spot; say $spot.WHAT | 07:06 | |
camelia | rakudo-moar 6cc807: OUTPUT«(Any)» | ||
07:06
ventica_desktop joined
|
|||
ventica | m: my Int $i; say $i.WHAT; | 07:06 | |
camelia | rakudo-moar 6cc807: OUTPUT«(Int)» | ||
ventica | m: my $num; my $type=Int; say ($type($num)).WHAT; | 07:07 | |
camelia | rakudo-moar 6cc807: OUTPUT«Cannot find method 'Int' in block at /tmp/YE11BBhkjq:1» | ||
ventica | .oO(S02 must outdated) |
||
m: my int $i; my Int $j; say $i.WHAT == $j.WHAT; | 07:09 | ||
camelia | rakudo-moar 6cc807: OUTPUT«Invocant requires an instance, but a type object was passed in method Bridge at src/gen/m-CORE.setting:4498 in sub infix:<==> at src/gen/m-CORE.setting:4415 in block at /tmp/PypFkUEfJD:1» | ||
avuserow | now I feel a bit silly. turns out that the deprecation warnings I saw previously in the rakudo star modules were previously fixed by FROGGS++ moritz++ supernovus++ and retupmoca++, so now I have what appears to be a happy MoarVM build, and a promising parrot test run in progress | 07:11 | |
that just leaves release announcement editing, sanity checking, and the final upload, unless I'm missing something? | 07:12 | ||
TimToady | m: my int $i; my Int $j; say $i.WHAT === $j.WHAT; | ||
camelia | rakudo-moar 6cc807: OUTPUT«True» | ||
TimToady | ventica: you picked numeric equality there | 07:13 | |
airen | I need to look at the moarvm ebuild for gentoo. Gives errors and says it's looking for things in /var/tmp/portage | ||
Which is just hilariously wrong | |||
ventica | hrm, was worried abt that | ||
why is it true thought | 07:14 | ||
though? | |||
moritz | m: say so 1|2|3 ~~ 2 | 07:15 | |
camelia | rakudo-moar 6cc807: OUTPUT«True» | ||
TimToady | probably because native types are only kind of implemented | ||
ventica | ok... so spec-behavior will return false? | 07:16 | |
TimToady | probably oughta | ||
ventica | m: say "foo".WHAT; # experiment... | ||
camelia | rakudo-moar 6cc807: OUTPUT«(Str)» | ||
ventica | k | 07:17 | |
TimToady | but types on natives have to be carried by the native descriptor rather than the object, so it might be cheating currently | ||
ventica | m: my Str $s; say $s.WHAT === "foo".WHAT; | ||
camelia | rakudo-moar 6cc807: OUTPUT«True» | ||
TimToady | r: my uint64 $i; say $i.WHAT | 07:18 | |
07:18
PZt left
|
|||
camelia | rakudo-{parrot,jvm,moar} 6cc807: OUTPUT«(Int)» | 07:18 | |
ventica | mhmm | 07:19 | |
TimToady | otoh, storage types are kind of like subset types, which have a constraint, and a base type, which would be Int in such a case | ||
psch | morning #perl6 | 07:20 | |
TimToady | int8 would be like a subset of Int where * < 256 | ||
moritz | and a lower boundary too :-) | ||
TimToady | er, where * ~~ -128 .. 127 | ||
psch | airen: re ebuild: holysword was here two nights ago; apparently there's about 10 tickets on the gentoo tracker for the moarvm ebuild already | ||
lue++ had some idea after holysword left afair | 07:21 | ||
ventica | m: my Str $s="foo"; say $s[0]; | ||
camelia | rakudo-moar 6cc807: OUTPUT«foo» | ||
psch | irclog.perlgeek.de/perl6/2014-07-23#i_9065693 | ||
ventica surprised | |||
07:23
Mouq left
|
|||
ventica | m: my Str $s="foo"; say $s.substr(0); | 07:24 | |
camelia | rakudo-moar 6cc807: OUTPUT«foo» | ||
ventica | oh | ||
m: my Str $s="foo"; $s.substr(0).say; | |||
camelia | rakudo-moar 6cc807: OUTPUT«foo» | ||
ventica argh | |||
ohhhh | 07:25 | ||
m: my Str $s="foo"; $s.substr(0,1).say; | |||
camelia | rakudo-moar 6cc807: OUTPUT«f» | ||
ventica | ha | ||
sergot | o/ | ||
psch | m: "foo".substr(*, 1).say | ||
ventica | \o | ||
camelia | rakudo-moar 6cc807: OUTPUT«No such method 'Int' for invocant of type 'Whatever' in method substr at src/gen/m-CORE.setting:5797 in block at /tmp/we94kCMUrz:1» | ||
07:26
Ven joined
|
|||
psch | m: my &letters = "foo".substr(*, 1); say letters($_) for 0..2 | 07:26 | |
camelia | rakudo-moar 6cc807: OUTPUT«No such method 'Int' for invocant of type 'Whatever' in method substr at src/gen/m-CORE.setting:5797 in block at /tmp/i21O_7dom8:1» | ||
07:26
FROGGS__ is now known as FROGGS
|
|||
psch | m: my &letters = "foo".substr({*}, 1); say letters($_) for 0..2 | 07:26 | |
camelia | rakudo-moar 6cc807: OUTPUT«===SORRY!=== Error while compiling /tmp/YPZXhQLuD7{*} may only appear in protoat /tmp/YPZXhQLuD7:1------> my &letters = "foo".substr({*}⏏, 1); say letters($_) for 0..2 expecting any of: method…» | ||
ventica | m: say *.WHAT; | 07:27 | |
camelia | rakudo-moar 6cc807: OUTPUT«(Whatever)» | ||
Ven | psch: are you just looking for $_ here ? | 07:28 | |
psch | m: my &letters = { $^a.substr: $^b, 1 }; say for letters( "foo", 0..2 ) | ||
camelia | rakudo-moar 6cc807: OUTPUT«» | ||
Ven | oh. you're trying to partial apply it | ||
psch | Ven: right, i think so :) | ||
psch is tempted to just leave it at that with a "eh, Whatever" | 07:29 | ||
m: my &letters = -> $a, $b { $a.substr: $b, 1 }; say for letters( "foo", 0..2 ) | |||
camelia | rakudo-moar 6cc807: OUTPUT«» | ||
psch | oh hm | ||
m: my &letters = -> $a, $b { $a.substr: $b, 1 }; say letters( "foo", $_ ) for 0..2 | 07:30 | ||
camelia | rakudo-moar 6cc807: OUTPUT«foo» | ||
psch | there it is | ||
ventica 0_0 @ -> | |||
what is the term for the arrow there? (need to go read up on it) | 07:31 | ||
Ven | ventica: closure? | ||
TimToady | pointy block? lambda? | ||
Ven | m: my &letters = { $^a.substr($^b, 1) }; say letters("foo", $_) for 0..2 | 07:32 | |
camelia | rakudo-moar 6cc807: OUTPUT«foo» | ||
ventica | as used above ... (12:30:13 AM) psch: m: my &letters = -> $a, $b { $a.substr: $b, 1 }; say letters( "foo", $_ ) for 0..2 | ||
Ven | psch: ^ | ||
psch | Ven++: yeah, that's more concise | ||
Ven | ventica: what TimToady++ just said :-) | ||
ventica | an equal followed by an arrow looks like alien-speak to my eyes | ||
psch | a block with placeholders implies a thin arrow? | 07:33 | |
ventica | ok | ||
Ven | ventica: he's assigning (`=`) a pointy block (`->`) to "&letters" | ||
ventica | ok... and pointy-block is how a lambda looks in perl6 , correct? | 07:34 | |
TimToady | m: say (-> $a, $b { $a * $b })(2,21) | ||
camelia | rakudo-moar 6cc807: OUTPUT«42» | ||
ventica | aha, thx TimToady | ||
ventica lightbulb | |||
TimToady | m: say (-> $a, $b { $a * $b }).WHAT | 07:35 | |
camelia | rakudo-moar 6cc807: OUTPUT«(Block)» | ||
psch answers his own question with "yes", refering to S06:1931 | |||
synopsebot Link: perlcabal.org/syn/S06.html#line_1931 | |||
Ven | psch: {} and -> {} are basically the same, really. One can be confused with hashes, and the other allows for parameters, but AFAIK, it's the same otherwise. | 07:36 | |
07:37
darutoko joined
|
|||
TimToady | m: say { $_ * 2 }(21) | 07:37 | |
camelia | rakudo-moar 6cc807: OUTPUT«42» | ||
TimToady | m: say { [*] @_ }(2,21) | 07:38 | |
camelia | rakudo-moar 6cc807: OUTPUT«42» | ||
FROGGS | ohh noes... another RT ticket to solve :/ | ||
ohh what does my irc client here? O.o | 07:39 | ||
07:39
FROGGS left,
FROGGS joined
07:40
jack_rabbit left
|
|||
ventica | m: my $foo = {$_ * 2}; say $foo.WHAT; | 07:42 | |
camelia | rakudo-moar 6cc807: OUTPUT«(Block)» | ||
psch | m: ({$^a}).signature.say | 07:43 | |
camelia | rakudo-moar 6cc807: OUTPUT«:($a)» | ||
psch | m: ({ }).signature.say | ||
camelia | rakudo-moar 6cc807: OUTPUT«No such method 'signature' for invocant of type 'Hash' in block at /tmp/HADtyUZ3BK:1» | ||
ventica | u made camelia sad | ||
:P | |||
TimToady | m: {;}.signature.say | ||
camelia | rakudo-moar 6cc807: OUTPUT«:($_? is parcel)» | ||
07:44
dwarring left,
pecastro left
|
|||
psch | oh, @_ and %_ are only supposed to show up in the signature when they're referenced inside the block i gather | 07:44 | |
TimToady | yes | ||
psch | that does make sense | 07:45 | |
07:50
rurban1 joined
07:51
jack_rabbit joined
|
|||
FROGGS | japhb: the 'weird' work estimate is that way so that there are more measurements with lower values and less with higher... | 07:52 | |
07:52
dmol joined
|
|||
ventica | my %foo = {"bar" => 42}; say %foo.perl; | 07:53 | |
uho | |||
uhoh& | |||
FROGGS | japhb: scaling=>double was kinda useless because the old code cannot handle codepoints > 0xFFFF or so, so there where not much measurement points at all | ||
japhb: and scaling=>linear will take ages to complete | 07:54 | ||
07:54
Alina-malina left,
rurban1 left
|
|||
FROGGS | japhb: feel free to make it available as scaling=>weird :P | 07:54 | |
07:55
Alina-malina joined
|
|||
ventica | m: my %foo = {"bar" => 42}; say %foo.perl; #oops | 07:56 | |
camelia | rakudo-moar 6cc807: OUTPUT«("bar" => 42).hashSaw 1 call to deprecated code during execution.================================================================================%foo = itemized hash called at: /tmp/MvapE_RPyC, line 1Please use %foo = %(itemized hash) inste…» | ||
ventica | m: my %foo = {"bar" => 42}; say %foo<bar>; | ||
camelia | rakudo-moar 6cc807: OUTPUT«42Saw 1 call to deprecated code during execution.================================================================================%foo = itemized hash called at: /tmp/ZIXLyrG1Qt, line 1Please use %foo = %(itemized hash) instead.----------…» | ||
ventica | oh | 07:57 | |
nvm | |||
ventica_desktop | m: my Int $i; my $whatter = {$_.WHAT}; say $whatter($i); | 08:02 | |
camelia | rakudo-moar 6cc807: OUTPUT«(Int)» | ||
08:05
denis_boyun_ joined
|
|||
psch | m: my &renew = -> { $^a = ::($a.WHAT).new }; my $a = 5; say $a; renew $a; say $a; | 08:05 | |
camelia | rakudo-moar 6cc807: OUTPUT«===SORRY!=== Error while compiling /tmp/e47wRWQvsiPlaceholder variable '$^a' cannot override existing signatureat /tmp/e47wRWQvsi:1------> my &renew = -> { $^a = ::($a.WHAT).new }⏏; my $a = 5; say $a; renew $a; s…» | ||
psch | m: my &renew = { $^a = ::($a.WHAT).new }; my $a = 5; say $a; renew $a; say $a; | ||
camelia | rakudo-moar 6cc807: OUTPUT«5use of uninitialized value of type Int in string context in block at /tmp/Sy35ui90N3:1Not enough positional parameters passed; got 1 but expected 2 in method new at src/gen/m-CORE.setting:12869 in block at /tmp/Sy35ui90N3:1» | ||
psch | that probably would work better with a non-core class | 08:06 | |
moritz | no | ||
your problem is that .WHAT returns the type object | |||
not the name | |||
psch | ahh | ||
moritz | use $a.^name instead | ||
psch | so i don't even need the lookup | ||
or that, yes | |||
moritz | right, you can say $a.WHAT.new | 08:07 | |
ventica_desktop | o.O | ||
psch | m: class A {my &renew = { $^a = $a.WHAT.new }; my $a = 5; say $a; renew $a; say $a; | ||
camelia | rakudo-moar 6cc807: OUTPUT«===SORRY!=== Error while compiling /tmp/sVQloWZ23iUnable to parse expression in block; couldn't find final '}' at /tmp/sVQloWZ23i:1------> }; my $a = 5; say $a; renew $a; say $a;⏏<EOL> expecting any of…» | ||
masak | good antenoon, #perl6 | ||
psch | uh | ||
ventica_desktop | o/ | 08:08 | |
psch | m: my &renew = { $^a = $a.WHAT.new }; my $a = 5; say $a; renew $a; say $a; | ||
camelia | rakudo-moar 6cc807: OUTPUT«5Cannot assign to a readonly variable or a value in block at /tmp/Pmg8cECwW0:1» | ||
psch | m: my &renew = -> $a is rw { $a = $a.WHAT.new }; my $a = 5; say $a; renew $a; say $a; | ||
camelia | rakudo-moar 6cc807: OUTPUT«50» | ||
psch | masak o/ | ||
moritz | m: my &renew = <-> $a { $a = $a.WHAT.new }; my $a = 5; say $a; renew $a; say $a; | ||
camelia | rakudo-moar 6cc807: OUTPUT«50» | ||
psch | ah, more shortcuts :) | ||
moritz | a bit syntactic sugar for RW arguments :-) | ||
psch | moritz: did you see my update to PR #295, ooc? | ||
masak | psch: $a.new should work, too | 08:09 | |
psch | m: my &renew = <-> $a { $a = $a.new }; my $a = 5; say $a; renew $a; say $a; # does it? | ||
camelia | rakudo-moar 6cc807: OUTPUT«50» | ||
ventica_desktop | is there a way to get back the lexical name of $foo? Something like "$foo.^myname" === "foo" | 08:10 | |
moritz | psch: I saw what you wrote, but I didn't get around to an actual code review. Sorry | ||
ventica_desktop: $foo.VAR.name | |||
ventica_desktop | ah | ||
psch | moritz: no worries, i just wanted to mention the spec change and all, whenever you (or anyone else, really) has time | ||
08:10
isBEKaml joined
|
|||
ventica_desktop | nice | 08:10 | |
so much better than $$foo ! | 08:11 | ||
ooh, .fmt is nice | 08:13 | ||
Ven | ventica_desktop: trying out Perl 6? :) | 08:17 | |
08:18
hoverboard left,
thou joined
|
|||
ventica_desktop | Ven: yes; hoping to contribute | 08:19 | |
wud like to work on MoarVM | |||
longtime P5 user... been cautiously waiting on the sidelines for P6... now feels like the time to jump in :) | 08:20 | ||
moritz | \o/ | ||
and I see you already found #moarvm | |||
ventica_desktop | yeah, chatted with jnthn on what needs doing | ||
Ven | ventica_desktop: if you're still in your "first learning" stage, feel free to try out github.com/Nami-Doc/learnxinyminut...l.markdown :P | 08:21 | |
ventica_desktop | he recommended work on Asyn Socket I/o | ||
Ven: thx for the tip.... bookmarked | |||
Ven | (you're definitely not a guinea pig for my tutorial :P) | ||
ventica_desktop | Ven: I know you're hiding food pellets... | 08:22 | |
08:23
thou left
08:25
fhelmberger joined
|
|||
FROGGS | avuserow: that sounds promising! please let me know if you have a release candidate I could test | 08:25 | |
08:28
xinming left,
xinming joined
08:29
jack_rabbit left
|
|||
masak | ventica_desktop: \o/ | 08:33 | |
moritz | avuserow: do you need a commit bit for rakudo/star ? | ||
Ven doesn't see avuserow's messages :o) | 08:35 | ||
Ven realizes he just doesn't have enough backlog here | 08:36 | ||
08:38
brrt left
08:40
isBEKaml|2 joined
08:42
isBEKaml left,
isBEKaml|2 is now known as isBEKaml,
isBEKaml left,
isBEKaml joined
|
|||
ventica_desktop | o/ masak | 08:43 | |
Ven: I'm not grokking the :<value><name> named-parameter syntax... I mean, I think I am but a part of me is very surprised by it... | 08:45 | ||
Ven | ventica_desktop: you mean f(:a(1)) ? | 08:46 | |
ventica_desktop | no, f(:1a) | ||
me no likey | 08:47 | ||
Ven | oh, alright. It's mainly for (:2th) and such. | ||
(maybe I shouldn't talk about it ? Or is the explanation confusing ?) | 08:48 | ||
ventica_desktop | explanation is clear | ||
I just don't like the feature... or I think it may only have limited +ve application, like the one you just mentioned | |||
its my experiecne that blub programmers have a tendency to misapply this kind of feature | 08:49 | ||
Ven | well, I'm not the one responsible for the feature :P. | ||
ventica_desktop | Can you write f(:"bar"foo) ? | ||
psch | m: $_ = "foo"; s:2nd/o/u/; .say | ||
camelia | rakudo-moar 6cc807: OUTPUT«fou» | ||
Ven | ventica_desktop: no, don't think so | ||
psch | that's the reason for the feature - i've never considered it in a general case | ||
Ven | then I probably shouldn't explain it here | 08:50 | |
ventica_desktop | as long as a person follows best practice, ican see how t's nice | ||
08:50
jack_rabbit joined
|
|||
psch | see S06:635 | 08:50 | |
synopsebot | Link: perlcabal.org/syn/S06.html#line_635 | ||
08:51
rurban1 joined
|
|||
Ven realizes he needs to explain but and does. | 08:51 | ||
(as separate ones, I mean) | |||
08:53
SevenWolf left
08:55
rurban1 left
|
|||
psch | m: sub foo(Int :$named) { say $named }; foo :5named | 08:56 | |
camelia | rakudo-moar 6cc807: OUTPUT«5» | ||
ventica_desktop | 8| | ||
psch | it's *probably* not a great idea to use it like that, but there is this "don't forbid insanity" thingy... :) | 08:57 | |
m: sub foo(Int :$named) { say $named }; foo :"bork"named | |||
camelia | rakudo-moar 6cc807: OUTPUT«===SORRY!=== Error while compiling /tmp/rQGUpEFbc4Two terms in a rowat /tmp/rQGUpEFbc4:1------> ub foo(Int :$named) { say $named }; foo ⏏:"bork"named expecting any of: argument list …» | ||
08:58
jack_rabbit left
|
|||
Ven | psch: that's not allowed (and it's good) :P | 08:58 | |
Ven likes to forbid insanity far more than usual #perl6ers++ | 08:59 | ||
ventica_desktop relieved | |||
ventica | wait, so an idiomatic for(@arr) is actually taking a lambda? | 09:02 | |
for @arr -> $arr { ... } ; the -> is a "pointy-block"? | |||
jnthn | Yes | ||
ventica | nice | ||
jnthn | Meaning that you can go over things two at a time just by giving it two args, for example. | ||
*params | |||
ventica | oh that is so sweet | 09:03 | |
two-at-a-time in P5 is a pain | |||
09:03
isBEKaml left
|
|||
moritz | m: for <a b c> Z 1..* -> $char, $number { say "$char: $number" } | 09:03 | |
camelia | rakudo-moar 6cc807: OUTPUT«a: 1b: 2c: 3» | ||
ventica | :) | 09:04 | |
jnthn | The other really common idiom with 2-at-a-time is | ||
Ven | ventica: it's even greater than what you think, because it means $_ is the same everywhere ! | ||
jnthn | m: my %h = a => 2, b => 3; for %h.kv -> $key, $value { say "$key = $value" } | ||
camelia | rakudo-moar 6cc807: OUTPUT«a = 2b = 3» | ||
Ven | That's what I like when I "teach" people p6, I just can say "you remember that $_ you could use in lambdas ? Well, you pass a lambda to for, so gg !" | 09:05 | |
jnthn | Where .kv makes a (key, value, key, value, ...) | ||
ventica | jnthn: super nice | ||
Ven | m: my %h = <a 2 b 3>; for %h.kv -> $k, $v { say "$k = $v. " } # ventica: you can init hashes that way too | 09:06 | |
camelia | rakudo-moar 6cc807: OUTPUT«a = 2. b = 3. » | ||
ventica | mhmm | ||
m: say (1,2) eqv (1,3); | 09:08 | ||
camelia | rakudo-moar 6cc807: OUTPUT«False» | ||
ventica | m: my $a=1; say ($a,2) eqv (1,2); | ||
camelia | rakudo-moar 6cc807: OUTPUT«True» | ||
Ven doesn't really like that there's so much equality operator | |||
ventica | hmm ok | ||
was thinking something different | |||
Ven thinks it hurts transitivity | 09:09 | ||
ventica | yeah but that's really part of Perl culture | ||
we always had a lot of kinds of equalities | |||
Ven hasn't done any perl 5 :) | 09:10 | ||
ventica | ah | ||
jnthn | Generally, there are plenty of operators, 'cus if you don't statically know the types of data, you really want to know the semantics of the operation. | ||
Thus the split of + and ~ also. | |||
ventica | there are lots of P5 stackexchange questions of the variety 'why is "" false AND 0 false??' | 09:11 | |
Ven: as u note, break transitivity... :P | |||
breaks* | |||
m: my @a = 1 .. 3; say @a; | 09:13 | ||
camelia | rakudo-moar 6cc807: OUTPUT«1 2 3» | ||
ventica | m: my @a = 3 ..1; say @a; | ||
camelia | rakudo-moar 6cc807: OUTPUT«» | ||
ventica | mkay | ||
Ven is just worried of non-commutative equality, like in some languages | |||
masak | "" and 0 are both false because there are natural transformations Str => Bool and Numeric => Bool which work very well when "" and 0 map that way. | 09:14 | |
moritz | ~~ is explicitlz non-commutatative | ||
Ven | yeah, it makes sense for ~~. | ||
moritz | but the rest (==, eq, ===, eqv) are all commutative and associative | ||
and transitive | 09:15 | ||
masak | well, s/associative/chaining/ | ||
moritz | right | ||
psch | that reminds me of how little i understood of trying to make ~~ chaining | 09:16 | |
other chaining ops map to vm operations, ~~ maps to an ast | |||
wrapping that whole in an :op<chain> doesn't work, wrapping everything also doesn't | |||
moritz | en.wikipedia.org/wiki/Transitive_r..._relations is interesting | ||
psch | i.e. #81336 (i think it was?) is still out of my reach :P | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=81336 | ||
ventica | masak: Yeah, but I think what hangs up non-Perlers is that if False === "" and False == 0, then "" === 0, but that's obviously not true | ||
correction: False === 0 | 09:17 | ||
moritz | psch: personally, I think that ~~ shouldn't be chaining | ||
masak | ventica: that's not what === means :) | ||
m: say False === 0 | |||
camelia | rakudo-moar 6cc807: OUTPUT«False» | ||
ventica | masak: I'm shaky in p6 equivalences... i mean it in pseudocode | ||
psch | moritz: jnthn recommended a patch to see how it'd work, but if anything i also think it rather shouldnt | ||
moritz | ventica: those people confuse identity and coercion. That's forgivable | 09:18 | |
psch | well, "recommended" is maybe too strong a word | ||
masak | ventica: I think the proper way to think about it is *mappings*. if everything gets flattened to Bool, then False is 0 is "" | ||
ventica: if everything isn't, then... they're not equal, in general. | |||
moritz | the same argument can be made the other way too, you know? if 2 is True and 3 is True, does that mean that 2 and 3 are the same? | ||
ventica | masak: Sure... and I totallythink that way... I think this is a problem that comes from the blackboard (or whiteboard as the case may be) | ||
moritz | if you do it for True values, you quickly realize how silly that approach of thinking is | 09:19 | |
ventica | moritz: I think the people who object to "" == 0 == False, will also struggle with 2 == True | ||
since 1 == True | |||
so are you saying 1 == 2? | |||
09:19
nbrown joined
|
|||
masak .oO( the mapping isn't injective! ) | 09:20 | ||
ventica | my opinion is that ppl that think that way should probably stick to Mathematica... :P | ||
09:20
pecastro joined
|
|||
masak | I see nothing wrong with basing your language on established theory. | 09:21 | |
better than basing it on a hunch :) | |||
Ven groans | 09:22 | ||
ventica | *+* wth is that?? | ||
masak | m: my $c = * + *; say $c(40, 2) | ||
camelia | rakudo-moar 6cc807: OUTPUT«42» | ||
Ven | ventica: if you're reading it in my tutorial, it's probably explained :) | 09:23 | |
ventica | my @primes = 1, 1, *+* ... *; # lazy infinite list of prime numbers, computed using a closure ! | ||
Ven | right to the right or below | ||
Tene | These days I'm pretty unhappy with implicit coercion. | ||
masak | it's a closure that takes two parameters, and adds them. hence the + | ||
Ven | Tene: coercion is not DWIMmy :P | ||
ventica | hmm, going to need some time to beat that one into my skull | ||
09:23
nbrown left
|
|||
masak | Tene: I teach Python, so I see what you mean. but I feel Python goes to the other extreme, and wants every coercion to be explicit. | 09:24 | |
Tene | These days I prefer "" == 0 to be TYPE ERROR | ||
ventica | wait, what? : say @primes[^10]; #=> 1 1 2 3 5 8 13 21 34 55 | ||
primes = fib seq? | |||
masak | ;) | ||
ventica: wrong name for the array, methinks. | |||
is that from Ven's tutorial? | |||
ventica | yeah | ||
Ven | yeah haha, I think I changed it to be fib, but didn't change the explanation | ||
Tene | But, haskell is there for me already; no need for Perl to also be haskell | 09:25 | |
Ven | comments getting out of date hahaha. | ||
Also, you're getting confused with *+* because I used to explain * before, but I've moved it below, and now everything is broken | |||
ventica | the section on list comprehensions is pretty crazy... it's not ven's fault, list comprehensions in p6 appear to be mandatory insanity... | ||
psch | m: my &whatever = * + *; my &placeholder = { $^a + $^b }; say whatever 5, 5; placeholder 5, 5; # pretty similar actually | ||
camelia | rakudo-moar 6cc807: OUTPUT«10» | ||
ventica | Ven: ah, makes sense | ||
psch | ENOSAY :( | ||
Ven | ventica: you can jump to that part: "# You can also use the "whatever star" to create an anonymous function" | ||
masak | Tene: Haskell has too much explicit pattern matching. pattern matching is boilerplate, repeating the same "shape" of a type over and over again. I'm waiting for a language that solves that. | ||
Ven | masak: too much explicit pattern matching ? | 09:26 | |
masak | too much explicit pattern matching. | ||
psch | m: my @fib = 1, 1, $^a + $^b ... 20; say @fib | ||
camelia | rakudo-moar 6cc807: OUTPUT«===SORRY!=== Error while compiling /tmp/EwYggOtot9Cannot use placeholder parameter $^a in the mainlineat /tmp/EwYggOtot9:1------> my @fib = 1, 1, $^a⏏ + $^b ... 20; say @fib» | ||
Ven | psch: mising those {}. | ||
masak | psch: need curlies. | ||
psch | right. i did it right the first time... :) | 09:27 | |
Ven | masak: well, it's easy: import Prelude hiding (.); a . b = b a | ||
masak: then you can do data.field :P | |||
09:27
lelf joined
|
|||
ventica | Haskell... to use a phrase I learned from Doug Hofstadter... exceeds my abstraction limit :P | 09:27 | |
masak | Ven: I think we are talking about different things. | 09:28 | |
Ven | masak: you don't need to extract a shape that way ;) | ||
psch | m: my @fib = 1, 1, { $^a + $^b } ... 20; say @fib # where do they go? or is this broken? | ||
camelia | rakudo-moar 6cc807: OUTPUT«(timeout)» | ||
Ven | psch: it's not broken -- 20 is just never "hit" | 09:29 | |
jnthn | 20 isn't a fib? | ||
psch | oh right | ||
ventica | its' not | ||
21 | |||
8+13=21 | |||
psch | i'm assuming too much magic it seems | ||
Ven | m: my @fib = 1, 1, { $^a + $^b } ... * > 20; say @fib # psch <- safety | ||
camelia | rakudo-moar 6cc807: OUTPUT«1 1 2 3 5 8 13 21» | ||
Ven | ventica: updated the tutorial to be saner in its ordering :) | 09:31 | |
ventica | subset Even of Int where * %% 2; # <-- this is quite aesthetic, but how in the world can it possibly be efficiently implemented?? | ||
Ven | ventica: what do you mean, efficiently implemented ? | ||
ventica | Ven: Cool... still working through... about the 50% mark now | ||
Ven | You'd have to do the checks yourself, it's just doing it For You. | ||
ventica | Ven: I mean, in P6 guts | ||
Ven | ventica: you should see the explanation for whatever star, just a little below (I just modified it to be at the Correct Place) | ||
ventica | Ven: ok... I get the basic idea... but laziness seems so dangerous to me | 09:32 | |
Ven | embrace it :) | ||
ventica | like, hang bugs hiding behind every corner... | ||
jnthn | We did have it more magical in the past. | ||
ventica | btw, what is the P6 def'n of "closure"... that word is heavily overloaded in the industry, seems to mean a dfferent thing to everyone | 09:34 | |
im happy with a pointer into the synopses... | |||
moritz | ventica: a code object that contains references to outer lexicals | 09:35 | |
ventica | just it's next wider scope? | ||
i mean parent scope? | |||
incl. globals, of course | |||
moritz | lexicals from any outer scoper | ||
ventica | k... I was always fuzzy on P5 scoping, so this is going to be a bit of a chore to get straight in my head | 09:36 | |
moritz | and since the setting (which provides the operators and built-in classes) is provided as an outer context, every non-trivial piece of code is a closure | ||
Ven now realizes why he moved it in the first place ... erm | |||
ventica | the P5 classic-scoping/my/our scoping is ... bleh | ||
09:43
lelf left
|
|||
Ven is now moving everything in his tutorial ... sigh | 09:44 | ||
ventica | i like the concept of flip-flop (my background is comp. H/W) but the syntax is a bit awkward i think | ||
Ven | I moved it because I needed to have loops explained. Sigh. | ||
so either I rollback everything and I move the sequence operator "later", either I don't know. | 09:45 | ||
ventica | Ven: The 55% of the tutoral i got thru is good... it's a difficult subject :P | 09:46 | |
Ven | you skipped the OO part ? | 09:47 | |
because I think flip flop is near the end | |||
ventica | yeah, i've see the ff operator before and was curious | ||
besides, I hate OO | |||
too bureaucratic for my tastes | |||
in fact, the lack of OO is one of the reasons i fell in love with P5 | |||
i mean, ignoring all the 'bless' yuckiness | 09:48 | ||
masak | I used to think OO was too bureaucratic. then I saw it done well. | ||
most of it isn't done well, it's cargo-culted to the max. | |||
ventica | masak: I'm not religious abt it, but I pretty much don't think it can be done well... i know others disagree | ||
Ven | I used to love OO. Then I just realized I just wanted a better module system ... | ||
ventica | yup | 09:49 | |
Ven | Well, except for one thing: subtyping is both terryfying me and exciting me. | ||
masak | I'm not religious about it either. and yes, modules/encapsulation go a long way. | ||
OO inheritance is way overplayed. | |||
ventica | the p6 way of doing type-restrictions are the ideal, IMO | ||
Ven | damn those C++ guys :P | ||
ventica | personally, I think typing is mostly a lot of hot air | ||
Ven | ventica: thanks for proof-reading :p | ||
masak | I blame Plato. | ||
ventica | exactly, it really is plato | 09:50 | |
strange how a guy dead for nearly 2,500 years is dictating our PL paradigms... | |||
Ven | not that one :P. | ||
Ven chuckles | 09:51 | ||
ventica | Ven: yw... i can't go any further tonight... i'm already up way too late | ||
Ven | (well, at least, I don't think so hahahaha) | ||
09:52
rurban1 joined
|
|||
Ven mumbles something about typing being the movable image of the immovable thingies | 09:52 | ||
ventica | lol | 09:53 | |
m: my $foo = *; #<-- all the typing I will ever need.... | |||
camelia | ( no output ) | ||
Ven | To each his own :) | ||
ventica: do you think the tutorial is "good enough" to be "unveiled to the real world" :P ? | 09:54 | ||
ventica | Ven: What I've gone thru so far is good | ||
good balance between detail and parsimoniousness | 09:55 | ||
Ven | 'hope that convinced you to use some perl 6 here and there :P | ||
ventica | oh, i've already been on board for years... just been waiting for it to get stabler | ||
(if stabler is a word... :P) | 09:56 | ||
09:56
rurban1 left
|
|||
ventica | Ven: I think ur tutorial is hitting a sweet-spot... the docs are thorough but take too long to go through... the test suite is too terse and doesn't explain what anything is doing | 09:57 | |
i feel like goldilocks | |||
Ven | haha yeah, I started using it really fast for my personal projects, where I can just do Whatever I Want. | 09:58 | |
jnthn wonders if Ven++'s tutorial - Ven willing, of course - might deserve inclusion in doc.perl6.org too, since that lacks a good introduction | |||
Ven | jnthn: well, you'll have to tell me. But it was built exactly for this purpose | ||
masak is happy that ventica-goldilocks can bear the tutorial :P | |||
Ven | masak: I'm happy it's not too big a serving, or too hot, to stomach :). | 09:59 | |
ventica | lolol | ||
or too hard to sleep on | |||
masak | that remains to be seen. | ||
psch | it does seem a bit hard to sleep on | ||
Ven | watcha doing to my tutorial. | ||
ventica | lol | ||
psch | seeing as you're still up ventica :P | ||
ventica | true | ||
i threw the idea of a rakudo+JVM "Try Perl 6" page out earlier today (no, I don't have the web programming skills to make it happen)... that + a Ven-style tutorial would definitely not be too hard or soft to sleep on.... | 10:00 | ||
you know, just click the line of code to copy/paste it over into the webtoy REPL | 10:01 | ||
psch | was it pugs that was behind try.perl6.org when it was still up? (which might well have been a few years ago) | ||
ventica | psch: now u mention it, i'm vaguely remembering that | 10:02 | |
psch | i dimly remember that having existed at one point, long before i really considered trying to do thinks with perl6 | ||
ventica | I was thinking of Try Arc (I love Arc, it's a cute little language) | ||
yeah, p6 was strictly PoC at that time | |||
something like this ---> tryarc.org | 10:03 | ||
masak | psch: yes. that was Pugs. | ||
ventica | tryarc.org/ | ||
oops | |||
arc> (+ 1 1) | |||
2 | |||
masak | psch: would be great to get to the point where we have a try.perl6.org again. | ||
10:04
chenryn joined
|
|||
ventica | arc> (pr "Me and Perl6 are best buds") | 10:04 | |
Me and Perl6 are best buds"Me and Perl6 are best buds" | |||
masak: exactly | |||
Ven | Arc is kinda dead, though :( | 10:05 | |
masak | except that it still drives HN. | 10:06 | |
there does seem to be a little bit of life in Anarki. | |||
ventica | Ven: it lacks a BDFL ... which is kind of a necessary thing for a language to actually develop into something useful... | ||
Ven | paul graham would be the one, but he stopped in 2009 right ? | ||
ventica | last i heard | ||
masak | the fact that the link at arclanguage.org/install 404s is a bloody embarassment. | ||
10:06
thou joined
|
|||
colomon | hmmm, big batch of build failures on host07.perl6.com:8080/report last night. :\ | 10:07 | |
10:08
chenryn left
|
|||
jnthn | colomon: Ugh. Any way to get the build log? | 10:08 | |
psch | how much would go wrong with stuffing m-camelia into a chroot or jail and slapping a website onto the front, ooc? | ||
and maybe also "what would go wrong" | |||
(feel free to stop enumerating at the biggest show stopper) | 10:09 | ||
colomon | jnthn: no. was just trying to duplicate it here. | ||
psch | the obvious thing i can see is persistence | ||
ventica | psch: Not a showstopper for a Try* | ||
colomon has been trying to resist posting a p6 fib implementation here: news.ycombinator.com/item?id=8084354 | 10:10 | ||
psch | i guess any efforts in that direction are better served with "fix the REPL" | ||
masak checks what went wrong in Druid | |||
colomon is building latest rakudo-moar | 10:11 | ||
ventica | psch: yeah, but, what use is a REPL if no one is using it? | ||
10:11
thou left
|
|||
ventica | I haven't been following p6 news for the last year or so... I had no idea how healthy it acually is | 10:11 | |
masak | ventica: it's hard to see from the outside. | 10:12 | |
ventica | don't laugh | ||
masak | not laughing. | ||
ventica | masak: I know | ||
masak | the echo chamber is a real thing. it's difficult for stuff to get out. | ||
ventica | i'm just thinking that there are probably a lot of old P5ers like me assuming the same thing that I was "yeah, p6 will be here one day... when I'm ready to retire" | ||
masak | "Perl 6 is the future, and always will be" | 10:13 | |
ventica | hehe | ||
psch | ventica: well, camelia has her own set of problems, the REPL could probably be put onto try.perl6.org easier | ||
masak | that meme/joke/preconception is really hard to get rid of. | ||
colomon | jnthn: my first try failed to duplicate the build failure (Math::Vector) | ||
jnthn: secnd try as well | 10:14 | ||
masak | same here. | ||
Druid builds/tests fine here. | |||
Ven | masak: I don't believe it's hard to get rid off. I just believe we're not really "trying" yet, because we don't feel ready | 10:15 | |
psch | additionally the backlog says something about perl6-js for try.perl6.org i think, which does seem the neatest | ||
masak | Ven: I don't believe it's an on/off switch. | ||
Ven | masak: that's not what I said, though. | ||
That's something that has to be started. | |||
masak | Ven: it's more an area-under-the-curve thing. the more ready we are, the more users we can unleash on the thing. | 10:16 | |
colomon | jnthn: I'm calling random transient failure. will rerun smoke test now and see what happens. | ||
Ven | masak: definitely. But "publicizing the language" hasn't started yet | 10:17 | |
masak | Ven: I have no idea what that means. | 10:18 | |
Ven: some days I feel like everyone is doing their own "but is it *released*!?" shell game. | |||
Ven | masak: exactly what I've said. You don't hear about it on hackernews, you don't see articles explaining how X did Y with it on /r/programming, you don't ... | ||
No, I think that's what you see because you're used to seeing that. I don't see that. | 10:19 | ||
masak | I'm tired of it. I'm using Perl 6, I've been using it since 2005. there's no release I'm looking forward to. | ||
Ven | To the outside world, Perl 6 is not even something known to exist. They don't hear about it, so they don't know about it. So they don't learn it, use | ||
They don't happen to read a blog post that uses it for examples, etc. | |||
ren1us | I think a lot of that is more prejudice against the perl label than perl6 specifically. | 10:20 | |
masak | I'm tired of theories explaining why people don't care or don't get the right information. I just want to write Perl 6 code, and help improve Perl 6. | ||
I want to do things that *matter*, not engage in useless games of semantics. | |||
colomon | masak: "no release I'm looking forward to" -- that's a great point. | ||
Ven | masak: Then do. But don't be annoyed that people don't understand you, because you're not opening yourself to explanations | 10:21 | |
masak | I'm sick and tired of trying to PR things right. | ||
colomon | I'm using p6 pretty much every day for $work and for accomplishing useful things | ||
masak | I want to build things. | ||
Ven | Definitely. Perl has an insanely bad reputation among programmers. That's why, when I start speaking about Perl 6, I usually correct them when they say "perl" | ||
masak | Ven: I'm not annoyed that people don't understand me. I *don't care*. | ||
I have a *great language* at my fingertips. I think I understand better than most how great it is, because I used it back when it was a feeble, non-great thing. | 10:22 | ||
Ven | masak: well, you seemed to be annoyed, considering how you spoke of it | ||
colomon wants to point out that $work and "accomplishing useful things" are not mutually exclusive. ;) | |||
ventica | Encouraging developers - especially P5ers - to try Perl6 is not PR... it's just common sense. I think a webtoy (Rakudo+JVM or whatever) should be made available ASAP ... I would have been here a year or two ago at least | 10:23 | |
Ven | colomon: exactly. When I did my talk, I started off with something like "I started using in prod Perl 6 around 2 months after learning it" | ||
masak | Ven: well, concepts like "ready", "release" and "production" *are* important. they're just not important to *me* and what I do. others are welcome to drown themselves in those matters. | 10:24 | |
Ven | masak: I disagree. You have plenty of users not interested in these notions | ||
masak | fine. | ||
Ven | You are (or were). I am. And we can teach those people just fine -- It's a good way to build an userbase. Even though that's probably not right for the "perl phiolosphy" | 10:25 | |
ventica | m: my $work; my $useful_things; say $work === $useful_things; | 10:26 | |
camelia | rakudo-moar 6cc807: OUTPUT«True» | ||
masak | here's what I want to do with my life: I want to use Perl 6. I want to find delight in the code I write. I want to occasionally blog about it, and delight others. I want to learn about programming, and compilers, and VMs, and optimization. I want to help people find delight in all those things. | ||
ventica | Looks like you're right colomon :P | ||
ren1us | I think a webtoy is a great asset, but I also think that a big obstacle for people is the learning curve and lack of information. As tutorials start popping up, more answers appear on stackoverflow, etc, more people (especially younger people first exposed to python) are probably going to stick with the language. | 10:27 | |
masak | I don't want to spend my days on reddit arguing against people who don't want to be convinced that the product I'm using every day is worthy of their respect and attention. | ||
ventica | masak: Exactly. Roll out a webtoy and silence the critics. | 10:28 | |
masak | I don't want to spend brain cycles teasing out the exact nuances of "ready" or "production". | ||
because *it doesn't matter*. to me. | |||
ventica: I'm glad you found your way here. sorry about the rant. | |||
ventica | masak: np... I understand the feeling overall... the general public is always unreasonably judgment, and from a position of complete ignorance too | 10:29 | |
judgmental* | |||
masak | ventica: got it in one. | ||
10:29
Su-Shee joined
|
|||
Su-Shee | good morning folks.. | 10:29 | |
masak | ahoj Su-Shee. | 10:30 | |
Su-Shee | lemme remind you all of yapc::eu coming up and that there's room for lightning talks we would happily fill with some showing off of Perl 6. | ||
because.. YOU KNOW.. ONLY THREE PEOPLE SUBMITTED PERL6 STUFF. ;) | |||
masak | oh, that bad, eh? | 10:31 | |
Su-Shee | masak: very. | ||
masak | well, as it happens, I have a Perl 6 lightning talk ready to submit. | ||
Su-Shee | masak: you, jnthn, lichtkind. | ||
masak | it's called "Camel <--> Butterfly" | ||
Su-Shee | masak: haha.. :) | ||
masak goes ahead and submits it | |||
Su-Shee | good. | 10:32 | |
because not that I don't like the two of you speaking, it would be nice if people actually started showing off more things.. | |||
masak | yeah, only three p6 speakers. that's surprising. | ||
Su-Shee: thanks for the heads-up. | 10:33 | ||
jnthn thought lizmat had a talk too | |||
Su-Shee | jnthn: yes, the cocooning talk. | ||
masak | ok, so four. | ||
and jnthn has two talks, no? | |||
jnthn | Well, it's fairly Perl 6 :) | ||
Yeah, I submitted two so now I need to think of two lots of things :P | |||
FROGGS | *g* | 10:34 | |
Su-Shee | masak: yes. but that's not even the same number of .. dancer talks alone! | ||
jnthn | heh, on Twitter: "Yes, speakers go ahead, submit MOAR lightning talks!" | ||
Su-Shee | sadly, I thought too late of it, otherwise I would have just ordered a range of talks and left you to fill it ;) | ||
jnthn | Moar? :) | ||
Su-Shee | jnthn: yeah, I can't tweet stiffly ;) | 10:35 | |
jnthn could do a lightning talk on Moar :) | |||
Su-Shee | jnthn: you already have a talk talk about it :)) | ||
jnthn | True :) | ||
Maybe I'll find some other nice lighting talk idea :) | |||
Su-Shee | jnthn: I'm well aware that I can fill an entire yapc with you alone. which I would totally do because you're a great speaker. a nice yajc ;) | 10:36 | |
colomon | "Repeated character (') unexpectedly found in character class" -- warning during rakudo-moar build in smoke test (last night) | ||
masak | Su-Shee: lightning talk submit'd. | ||
Su-Shee | masak: merci. | ||
masak | de rien. | ||
colomon: I also get the warning during the build of src/Perl6/Grammar.nqp | 10:37 | ||
colomon: no line number, though :/ | |||
jnthn | Su-Shee: Gee, I'd have to write a lot of slides for that :P | 10:39 | |
Su-Shee | jnthn: no, you'd have to write a program for writing your slides. and that would be talk nr 1 ;) | 10:40 | |
FROGGS | masak: grep for ['/' | ||
jnthn | That's not a bad idea :) | ||
10:40
Ven left
|
|||
Su-Shee | jnthn: considering that the output format doesn't have to be powerpoint necessarily.. | 10:40 | |
colomon 's son just woke up and the first words out of his mouth were "What's a synonym for synonym?" | 10:41 | ||
masak | colomon: "equivalent", "metonym" | 10:42 | |
colomon: "analogue" | |||
jnthn | .oO( "digitale" ) |
||
psch found the same stackexchange question as masak it seems | |||
masak | psch: no, I went for thesaurus.com :) | 10:43 | |
FROGGS: no such luck :/ | |||
anyway, Druid still builds just fine here. | |||
psch | masak: ah, that's clearly more direct | ||
FROGGS | m: my $path = ""; $path ~~ s:g { '/.'+ ['/' | $] } = '/'; # xx/././xx -> xx/xx | 10:45 | |
camelia | ( no output ) | ||
colomon | masak++ :) | 10:46 | |
10:46
lustlife left
10:47
Ven joined
|
|||
Ven submits github.com/adambard/learnxinyminut...s/pull/687 | 10:47 | ||
masak | Ven++ | 10:48 | |
FROGGS | m: "''" ~~ / <[']>+ / | 10:49 | |
camelia | ( no output ) | ||
Ven | (WTB proof-reading, thanks :P) | ||
masak | I opened it in a tab. will read it later today. | 10:50 | |
Ven | thanks :) | ||
10:52
rurban1 joined
|
|||
Ven will try again later tonight | 10:53 | ||
10:57
rurban1 left
|
|||
FROGGS | ohh, there is a <?['.']> | 11:00 | |
masak | FROGGS++ | 11:02 | |
FROGGS | rakudo/src/Perl6/Grammar.nqp:3498: || <?{ $*QSIGIL }> <?['.']> <?> | ||
masak | git blame: jnthn, 0f60583f, Jul 31 2011. | 11:03 | |
jnthn | bah, what an idiot | ||
masak | jnthn++ | ||
moritz | git config --global alias.praise blame | ||
masak | git confic --global alias.whodunit blame | 11:04 | |
g* | |||
11:05
lelf joined,
erdic left
11:06
tempire_ left,
tempire joined
|
|||
FROGGS | jnthn: that was probably when we changed it from <?before, and there the quotes where valid :o) | 11:07 | |
jnthn | Ah, true :) | ||
11:07
erdic joined
|
|||
FROGGS | damn, we did sooo much things in the past I barely remember :D | 11:07 | |
dalek | ast: 2944d8b | (Tobias Leich)++ | S03-smartmatch/any-num.t: fix fudge line |
11:17 | |
11:21
nbrown joined
11:26
nbrown left
|
|||
dalek | kudo/nom: 8ff995d | (Tobias Leich)++ | src/Perl6/Grammar.nqp: remove quotes from character class Things inside a character class should not be quoted, since the quotes would be picked up as characters to match. Thankfully the compiler warns now about these mistakes. |
11:26 | |
11:27
lelf left
11:38
PZt joined
|
|||
hoelzro | morning #perl6 | 11:39 | |
11:39
skids left
11:44
brrt joined
|
|||
hoelzro | I showed this to TimToady last night, but I thought I'd repost it in case someone else missed it and wanted to comment: gist.github.com/hoelzro/71b65aec6cdc2574da60 | 11:44 | |
11:53
rurban1 joined,
ggoebel111116 left
|
|||
FROGGS | hoelzro: I know it won't help but I don't like #= and #| :o( | 11:53 | |
11:53
rindolf left
|
|||
hoelzro | FROGGS: I've seen a couple express a similar opinion; what would *you* prefer? | 11:54 | |
FROGGS | #^ instead of #= ? | 11:55 | |
11:55
thou joined
|
|||
FROGGS | so one can *see* where it belongs to, and does not have to memorize it | 11:55 | |
hoelzro | yeah, I like that | ||
what about if it's on the same line, though? | |||
#< ? | |||
FROGGS | hmmm | ||
well | 11:56 | ||
same line or after the statement is kinda the same | |||
so #> and #< would be enough for all cases | |||
hoelzro | that sounds great to me | ||
11:57
rurban1 left
|
|||
FROGGS | let's wait for the dark lord's intervention first :o) | 11:57 | |
11:58
anaeem1_ left
|
|||
hoelzro | which one? =P | 11:58 | |
FROGGS | *g* | ||
moritz | #> and #< can come from putting an old-style diff into a comment | ||
FROGGS | true, he's more like Dumbledore... Guido is perhaps more like the Dark Lord (without trying to be offensive) | 11:59 | |
moritz | (am I a dark lord now for trying to intervene?) | ||
FROGGS | moritz: is that a problem within a comment? | ||
we'll see | |||
11:59
thou left,
anaeem1_ joined
|
|||
hoelzro | I think that all of the core contributors are dark lords/ladies in their own ways =) | 11:59 | |
FROGGS | yeah, we speak Parcel >.< | 12:00 | |
Ven | .oO( I don't know the specifics, I was just told I'd get cookies ) |
12:01 | |
hoelzro | buh-dum tsch | ||
12:02
anaeem1 joined,
anaeem1_ left
|
|||
sergot | m: "a".encode('windows-1252'); | 12:03 | |
camelia | rakudo-moar 6cc807: OUTPUT«Unknown string encoding: 'windows-1252' in method encode at src/gen/m-CORE.setting:6553 in block at /tmp/3vFX77EfuQ:1» | ||
sergot | m: "a".encode('cp-1252'); | ||
camelia | rakudo-moar 6cc807: OUTPUT«Unknown string encoding: 'cp-1252' in method encode at src/gen/m-CORE.setting:6553 in block at /tmp/YMaI4F3uYV:1» | ||
sergot | m: "a".encode('windows1252'); | 12:08 | |
camelia | rakudo-moar 6cc807: OUTPUT«Unknown string encoding: 'windows1252' in method encode at src/gen/m-CORE.setting:6553 in block at /tmp/rrNuuDhVV2:1» | ||
FROGGS | perhaps it is not wired up correctly | 12:09 | |
but I know that MoarVM supports it | 12:10 | ||
sergot | What aboout parrot and jvm? | 12:12 | |
p: "a".encode('windows1252'); | |||
camelia | rakudo-parrot 6cc807: OUTPUT«encoding #-1 not found in method encode at gen/parrot/CORE.setting:6559 in block at /tmp/VIFWJ8IrrM:1» | ||
FROGGS | jvm probably yes | ||
sergot | p: "a".encode('windows-1252'); | ||
camelia | rakudo-parrot 6cc807: OUTPUT«encoding #-1 not found in method encode at gen/parrot/CORE.setting:6559 in block at /tmp/hZSdkqxOE5:1» | ||
sergot | j: "a".encode('windows-1252'); | ||
camelia | rakudo-jvm 6cc807: OUTPUT«Unknown encoding 'windows-1252' in method encode at gen/jvm/CORE.setting:6553 in block at /tmp/JGWAcUsuJc:1» | ||
FROGGS | :o( | ||
12:13
anaeem1 left
|
|||
sergot | So, it's better to write it in the Encode module | 12:13 | |
FROGGS | yeah | ||
sergot | .u € | 12:14 | |
yoleaux | U+20AC EURO SIGN [Sc] (€) | ||
12:19
kivutar joined
12:26
troydm left
12:28
kurahaupo_mobile joined
12:29
kaare__ joined,
rurban1 joined
12:33
hummeleBop joined,
kaare_ left
|
|||
colomon | much better this time around: host07.perl6.com:8080/report | 12:34 | |
12:34
hummeleBop left
|
|||
sergot | FROGGS: done :) | 12:35 | |
masak | colomon: what was amiss? | ||
colomon | masak: no clue | ||
masak | huh. | ||
colomon | I was running $work tests on the machine last night too, might have just run out of memory or something. | 12:36 | |
12:36
brrt left
|
|||
colomon | Seems like we have transient errors once or twice a month. | 12:36 | |
masak | that sounds... bearable. | 12:42 | |
hoelzro | m: say($!.VAR.WHERE); say($_.VAR.WHERE) | ||
camelia | rakudo-moar 8ff995: OUTPUT«2296977622969776» | ||
hoelzro | interesting...I'm guessing that's some sort of special scalar | 12:43 | |
12:44
chenryn joined,
chenryn left
|
|||
FROGGS | sergot++ # :o) | 12:45 | |
12:45
chenryn joined
|
|||
sergot | m: say 1 if 0 for 1..2; | 12:46 | |
camelia | ( no output ) | ||
sergot | m: say 1 if 1 for 1..2; | ||
camelia | rakudo-moar 8ff995: OUTPUT«11» | ||
[Coke] | FROGGS++ #thanks for fixing my misfudge. | 12:47 | |
sergot | Is it only me: gist.github.com/sergot/ac3c90fcef831274a22a ? | 12:51 | |
12:51
figoe left
12:53
brrt joined
|
|||
dalek | kudo/nom: c506f5d | (Tobias Leich)++ | docs/ChangeLog: log my changes of the last week |
12:57 | |
FROGGS | eww | ||
Ven | FROGGS++ | 12:58 | |
13:02
jnap joined
|
|||
lichtkind | hai FROGGS | 13:02 | |
FROGGS | hi lichtkind | ||
dalek | kudo/nom: 0e65385 | (Tobias Leich)++ | docs/ChangeLog: fix sentence in changelog |
13:03 | |
lichtkind | FROGGS: do you have write acess to github perl6 master repo? | 13:04 | |
FROGGS | lichtkind: I think spo | ||
so* | |||
lichtkind | could you please change the main description of the tablets repo | 13:05 | |
it now says "Perl 6 tablets -- tabular Perl 6 documentation" | 13:06 | ||
masak .oO( "Take three a day; morning, lunch, dinner" ) | |||
lichtkind | and i prefer Perl 6 tablets -- hypertext Perl 6 documentation | ||
FROGGS | lichtkind: no, sorry, can't edit it | 13:07 | |
lichtkind | FROGGS: can anyone do it? | 13:08 | |
masak can't | |||
PerlJam can't either | |||
lichtkind: did you not create that repo? | |||
13:09
chenryn left
|
|||
moritz | lichtkind: description updated | 13:10 | |
13:11
chenryn joined,
jnap left
|
|||
moritz | FTR, the "owners" team that can administrate perl6/ repos contains pmichaud, me, TimToady, sorear, jnthn and diakopter | 13:11 | |
I wonder if it's time to remove sorear, and add FROGGS, timotimo and lizmat | 13:12 | ||
PerlJam | moritz: +1 | ||
FROGGS | -1 | ||
masak | sounds good. | ||
FROGGS | :P | ||
moritz | (other suggestions based on activity and general trustworthiness are welcome) | ||
Ven | +1 :P | ||
jnthn | I don't trust me :P | ||
moritz | FROGGS: -1 to which part? you becoming admin? | ||
masak | he was joking. | 13:13 | |
FROGGS | moritz: that smells like more work :o) | ||
PerlJam | moritz: also, you don't have to remove sorear IMHO | ||
13:13
brrt left
|
|||
lichtkind | thanks a lot moritz++ | 13:13 | |
moritz | PerlJam: I'll just drop him an e-mail and ask for his preferences, I suppose | ||
jnthn | Aye. Anyway, +1 to the additions. | 13:14 | |
13:15
chenryn left
|
|||
PerlJam | moritz: add masak too. :) | 13:16 | |
moritz | +1 to masak | 13:17 | |
masak | <insert variation on jnthn's and FROGGS' jokes about trustworthiness here> | ||
FROGGS | hehe | ||
moritz | FROGGS: fwiw being a perl6 'owner' isn't much work, I usually do one or two actions in that role per week, usually just a few clicks | 13:18 | |
sometimes adding people to the 'perl6' team, sometimes creating a repository on behalf of a user | |||
FROGGS | moritz: yes I know, hence the ':P' adverb :o) | ||
moritz | ok :-) | ||
(oh, I forgot: sometimes adding a post-commit hook to notify dalek) | |||
ok, I'll wait 'till tomorrow for more feedback, and then I'll take action | 13:19 | ||
masak | moritz++ # delegating responsibility | ||
moritz | please remind me if I forget it :-) | ||
13:19
lelf joined
|
|||
PerlJam | Is there a way in github for non-owners to get a list of who the owners are? | 13:19 | |
moritz | PerlJam: I don't think so, which is why I listed them above | 13:20 | |
13:20
lelf left
|
|||
psch | there is, from the organisations homepage -> People -> Teams | 13:21 | |
PerlJam | bummer. That would have been a nice link for lichtkind in the first place (had it existed and we knew where to point him) | ||
13:21
[Sno] left
|
|||
psch | i.e. github.com/perl6 -> People -> Groups | 13:21 | |
PerlJam | oh | ||
github.com/orgs/perl6/teams/owners | |||
nice | |||
psch | err, Teams, not Groups :) | ||
PerlJam | psch++ | ||
moritz | I tried that link in a browser where I wasn't logged in, and it asked for my password | 13:22 | |
colomon | icfpcontest.org/specification.html | ||
psch | it might well depend on belonging to the organisation | ||
PerlJam | aye, you have to have a github account and be logged in, but I think it works if you meet those criteria | ||
FROGGS | m: sub a(int $i) is cached { return unless $i; a($i-1) }; say a(4); | 13:24 | |
camelia | rakudo-moar 8ff995: OUTPUT«Cannot find method 'gist': no method cache and no .^find_method in method gist at src/gen/m-CORE.setting:7088 in block at src/gen/m-CORE.setting:3329 in any enter at src/gen/m-Metamodel.nqp:3051 in method postcircumfix:<( )> at src/gen/m-C…» | ||
FROGGS | m: my $N = 32; my $rx = "a?" x $N ~ "a" x $N; say "a" x $N ~~ /<$rx>/ | 13:26 | |
camelia | rakudo-moar 8ff995: OUTPUT«(timeout)» | ||
13:29
skids joined
|
|||
jnthn | There's a lot of ways to back off there :) | 13:31 | |
PerlJam | does it not timeout with $N = 31? :) | ||
jnthn | m: my $N = 4; my $rx = "a?" x $N ~ '{ $*x++ }' ~ "a" x $N; my $*x = 0; say "a" x $N ~~ /<$rx>/; say $*x | 13:33 | |
camelia | rakudo-moar 8ff995: OUTPUT«===SORRY!=== Error while compiling EVAL_0Two terms in a rowat EVAL_0:1------> anon regex { ^a?a?a?a?{\c[32]⏏$*x++\c[32]}aaaa} expecting any of: postfix statement end statem…» | ||
PerlJam | huh. It is reasonably quick with $N = 20 | ||
jnthn | m: my $N = 4; my $rx = "a?" x $N ~ ' { $*x++ } ' ~ "a" x $N; my $*x = 0; say "a" x $N ~~ /<$rx>/; say $*x | ||
camelia | rakudo-moar 8ff995: OUTPUT«===SORRY!=== Error while compiling EVAL_0Two terms in a rowat EVAL_0:1------> anon regex { ^a?a?a?a?\c[32]{\c[32]⏏$*x++\c[32]}\c[32]aaaa} expecting any of: postfix statement end …» | ||
moritz | but shouldn't it build a super-efficient NFA for us? | ||
FROGGS | N=20 takes 0.7s and N=23 takes 2.9s | 13:34 | |
jnthn | m: my $N = 4; my $rx = "a?" x $N ~ '{$*x++}' ~ "a" x $N; my $*x = 0; say "a" x $N ~~ /<$rx>/; say $*x | ||
camelia | rakudo-moar 8ff995: OUTPUT«「aaaa」16» | ||
jnthn | m: my $N = 5; my $rx = "a?" x $N ~ '{$*x++}' ~ "a" x $N; my $*x = 0; say "a" x $N ~~ /<$rx>/; say $*x | 13:35 | |
camelia | rakudo-moar 8ff995: OUTPUT«「aaaaa」32» | ||
jnthn | m: my $N = 15; my $rx = "a?" x $N ~ '{$*x++}' ~ "a" x $N; my $*x = 0; say "a" x $N ~~ /<$rx>/; say $*x | ||
camelia | rakudo-moar 8ff995: OUTPUT«「aaaaaaaaaaaaaaa」32768» | ||
FROGGS | wow | ||
why ó.ò... just adding the dynquant method to nqp-p's regex compiler makes many tests do nothing :o( | 13:39 | ||
hmm no, it's not that, must be something in the actions or so... | 13:41 | ||
13:41
Alula_ left
13:42
kaleem left,
Alula_ joined
13:43
thou joined
|
|||
FROGGS | p: use Test; ok 1, "" | 13:45 | |
camelia | ( no output ) | ||
FROGGS | m: use Test; ok 1, "" | ||
camelia | rakudo-moar 0e6538: OUTPUT«ok 1 - » | ||
FROGGS | what the hell is going on | ||
hoelzro: have you tested on parrot also before doing the PR? | 13:46 | ||
13:47
jnap joined
|
|||
FROGGS reverts 011048d and crosses fingers | 13:48 | ||
13:48
thou left
|
|||
timotimo | FWIW, the "super efficient NFA" doesn't mean we don't have to run the winning branch through the regular grammar again ;( | 13:48 | |
moritz | oh right, there's that :( | ||
timotimo | i wanted to build a bit of an optimization for that that will replace all fixed-width matchings at the start of the declarative prefix that come after an "alt" | 13:49 | |
replace them with "move the cursor forwards" | |||
needless to say, i didn't make it ;) | 13:50 | ||
jnthn | I think it can be a bit more general than that. | ||
FROGGS | hoelzro: 011048d needs to be either fixed or reverted... simple test case: perl6-p -e 'use Test; ok 1, ""' | ||
timotimo | jnthn: when i thought that up, i wasn't good at the regex stuff at all; i'm not that much better yet, to be honest | 13:51 | |
i don't really understand how all the match recording stuff works, for example | |||
FROGGS | isnt there a rxtype capture? | 13:52 | |
which is a method on the regex compiler? | |||
13:52
fhelmberger left
|
|||
timotimo | something like that; i was refering more to the data structure and generated vm-level code | 13:53 | |
jnthn: penny for your thoughts? :) | |||
jnthn | "It's tricky" | ||
timotimo | hah :D | ||
moritz | I bet it is. | 13:54 | |
timotimo | ISTR that PCRE has a trick that makes code like "a*a" less pessimal with regards to backtracking | ||
hm, not a*a, but there's some famous super-pessimal regex that'll cause backtracking hell for "naive" implementations | |||
jnthn | I *think* I'd probably look at introducing an edge type in the NFA that marks the end of the fast-forwardable bit | ||
13:55
pmurias joined
|
|||
timotimo | do you think it'd be a good idea to introduce something that does the recording after fast-forwarding? | 13:55 | |
...(..)... for example seems fast-forwardable and you can see from the beginning what piece needs to get captured | 13:56 | ||
[Coke] | huh. perl5 regexen now have ::: (but spell it very differently) | ||
timotimo | otherwise the fast-forwardable part would have to end at the 3rd . | ||
[Coke]: huh, what does ::: do? | |||
i know about : for backtracking control | |||
[Coke] | :, ::, :::, and :::: are all backtracking control, as i recall. | 13:57 | |
timotimo | oh, yikes :) | ||
does one of them mean the same as <cut>? | |||
moritz has lost the overview over all those too | 13:58 | ||
13:58
lichtkind_ joined
|
|||
timotimo | also, is <cut> actually hard to implement or is it just that nobody championed it yet? | 13:58 | |
i don't see any spectests with <cut> in them o_O | 13:59 | ||
13:59
nbrown joined
|
|||
FROGGS | I dunno | 13:59 | |
<commit> might be easy, right? | |||
14:00
thou joined
|
|||
timotimo | we do have a tiny amount of commit tests in the spectest suite | 14:00 | |
tbh, i don't know what the difference between cut and commit is, should probably have a look :) | |||
14:01
lichtkind left
|
|||
timotimo | oh | 14:01 | |
yeah, i confused commit and cut | |||
FROGGS | okay, now that I have test output I see that dynquant also works on parrot :o) | 14:02 | |
timotimo | awesome! :) | ||
FROGGS | only one backend left -.- | ||
timotimo looks for pom-poms | |||
masak | [Coke]: <cut> is the actual spelling of :::: | 14:03 | |
timotimo | so, <commit> without an argument seems easy to implement, it'd just be "backtrack into this and we fail completely forever" | ||
masak | er, or was it <commit>... | ||
14:03
nbrown left
|
|||
timotimo | commit with an argument seems like more work | 14:03 | |
dalek | p/dynquant: a12b1b3 | (Tobias Leich)++ | src/vm/parrot/QAST/Compiler.nqp: support code blocks as quantifiers on parrot too |
14:04 | |
14:04
brrt joined
|
|||
dalek | p/dynquant: 6319608 | (Tobias Leich)++ | src/vm/moar/QAST/QASTRegexCompilerMAST.nqp: cleanup dynquant on moarvm |
14:08 | |
timotimo | FROGGS: i appreciate your work! | 14:10 | |
14:10
jnap left
|
|||
timotimo | jnthn: can moarvm's spesh kick in for the "where" part of a type? | 14:11 | |
like, in-line it? | |||
FROGGS | timotimo: well, it is fun :o) | ||
timotimo | i'd think we'd need a special case for istype that checks if the RHS is something with an attached code | ||
dalek | kudo/dynquant: 85550e5 | (Tobias Leich)++ | lib/Test.pm: Revert "Test: Copy filehandles if we can" This reverts commit 011048d4e862057537f1e5f682378fc505737d8f. |
||
kudo/nom: 189d1ce | (Tobias Leich)++ | lib/Test.pm: Revert "Test: Copy filehandles if we can" This reverts commit 011048d4e862057537f1e5f682378fc505737d8f. |
14:12 | ||
timotimo | jnthn: it seems like depessimizing where blocks on type constraints would be a worthy cause; i haven't actually measured the performance of that, but i suspect its pretty bad | 14:14 | |
PerlJam | timotimo: re pessimal regex, were you talking about the one in swtch.com/~rsc/regexp/regexp1.html or something else? | 14:15 | |
timotimo | that's the one i was thinking about, i believe | ||
i seem to recall masak writing about that one, too | |||
maybe | |||
jnthn | timotimo: I suspect we can de-sugar the check to a method call which could then be subject to inlining, perhaps | 14:16 | |
PerlJam | so, that's basically what FROGGS was doing earlier. | ||
timotimo | no, i don't think so, PerlJam | ||
what froggs is doing is allowing code in regexes like / "foo" ** { $foo .. $bar } / | 14:17 | ||
masak | \o/ | ||
hoelzro | FROGGS: nope =( | ||
my mistake | 14:18 | ||
PerlJam | no, I mean the poorly performing regex he was using earlier is the same as from Russ Cox | ||
FROGGS | hoelzro: no problem | ||
PerlJam | <FROGGS> m: my $N = 32; my $rx = "a?" x $N ~ "a" x $N; say "a" x $N ~~ /<$rx>/ # this one | ||
timotimo | oh? is that so? | ||
FROGGS | PerlJam: that is just from an RT ticket | ||
timotimo | ah, thought so :( | ||
if we knew (through escape analysis or something like that?) that we only want the boolean result value of the match, we could totally skip the non-NFA in this case | 14:19 | ||
but that seems like a thoroughly restricted application case | |||
14:19
jnap joined
|
|||
moritz | for most regexes, the non-matching case is the one with problematic performance | 14:19 | |
14:20
lichtkind_ is now known as lichtkind
|
|||
moritz | I mean, for exponential regexes and the like | 14:20 | |
timotimo | hmm | ||
so a simple-ish check for "is the declarative prefix == the regex" after non-matching with the NFA would give us much faster failure? | 14:22 | ||
14:24
BenGoldberg joined
|
|||
moritz | I don't think so | 14:30 | |
14:30
djanatyn left
14:31
djanatyn joined
|
|||
timotimo | how about if a regex seems to be performing poorly we automatically post it to irc and have a majority vote | 14:31 | |
moritz | +0.92 | 14:33 | |
14:38
jnap left
|
|||
Ven | + 0..92 %% '.' | 14:43 | |
14:47
treehug88 joined
14:48
lizmat left
14:49
lizmat joined
14:50
user3 joined
|
|||
[Coke] | moritz: I am fine with Mu not smartmatching. Would you say the current error is LTA? | 14:58 | |
(RT #122395) | 14:59 | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122395 | ||
masak | "expected 'Any' but got 'Mu'" feels pretty accurate to me. | 15:06 | |
how could it be improved? | |||
[Coke] | m: say Mu ~~ 0 | 15:07 | |
camelia | rakudo-moar 0e6538: OUTPUT«Type check failed in binding <anon>; expected 'Any' but got 'Mu' in method ACCEPTS at src/gen/m-CORE.setting:1480 in block at /tmp/_KO2qkuHiT:1» | ||
15:07
dayangkun left
|
|||
[Coke] | ... yah, ok. was remember the backtrace more than the top level message. | 15:07 | |
*ering | |||
TimToady | so why shouldn't ACCEPTS accept a Mu argument in this case? | ||
[Coke] | Ok. I'll reject the ticket and fix the tests, since ISTR that timtoady was of two minds; we'll pick one for him. | ||
... unless he's awake! curses! | |||
TimToady | I thought we already decide this last night... | 15:08 | |
*ded | |||
[Coke] | m: say 1|2|3 ~~ 2 | ||
camelia | rakudo-moar 0e6538: OUTPUT«any(False, True, False)» | ||
[Coke] | ^^ moritz wants that to keep working. | ||
ISTR that was the edge case you weren't sure of. | |||
15:08
denis_boyun_ left
|
|||
TimToady | well, I kinda want it to stop working | 15:09 | |
why does moritz want it? | |||
I guess I should backlog first | |||
[Coke] | ok, I'll let you two thunderdome. | ||
TimToady: here: rt.perl.org/Ticket/Display.html?id=122395 | |||
last two comments, moritz & froggs. | |||
15:11
user3 left
|
|||
PerlJam | TimToady: why do you want it to stop working? | 15:12 | |
colomon | m: say ().hash.perl | 15:13 | |
camelia | rakudo-moar 0e6538: OUTPUT«().hash» | ||
colomon | m: say [].hash.perl | ||
camelia | rakudo-moar 0e6538: OUTPUT«().hash» | ||
15:13
btyler joined
|
|||
colomon | How do I stop a CATCH block from exiting the function it is in? | 15:14 | |
hoelzro | FROGGS: what corner case did you come across that I didn't account for? | ||
I'd like to fix that commit over the weekend | |||
15:14
[Sno] joined
|
|||
moritz | TimToady: just general DWIMiness | 15:14 | |
[Coke] | ISTR there's a resumy thing. | 15:15 | |
moritz | TimToady: I didn't read yesterday's backlog, so I can't contribute much to the discussion | ||
[Coke] | colomon: I thik "resumable exceptions" are the answer to that, but have no idea if that works. | 15:16 | |
colomon | [Coke]: Does CATCH always return, then? | 15:17 | |
[Coke] | no, return returns. | ||
do you have a short example that demonstrates the WAT you are having? | 15:18 | ||
PerlJam | colomon: do you mean for when the CATCH block doesn't handle the exception? i.e. you just want to ignore it? | ||
TimToady | sounds like a 'goto' to me | ||
colomon | …. no, I want to know what happens when CATCH *does* handle the exception. | ||
hoelzro | oh, just saw your test case =) | 15:19 | |
colomon | ie I'm trying to CATCH, report the error, and return something emptyish | ||
colomon is a bit stumped he cannot figure out this basic thing. | 15:20 | ||
PerlJam | colomon: I'd need to see some code to understand the difficulty I think. | 15:23 | |
TimToady | moritz: well, I was just thinking about the Mu vs Any case, but I just thought of another reason: it makes it very difficult to optimize 'when 2' into using a jump table if you can't coerce the given to a single integer, unless we can figure out how to goto 3 different places in parallel... | ||
and one of the major goals of mayking ~~ asymmetric was to allow for just such an optimization | 15:24 | ||
*making | |||
psch | m: sub foo { die "ded"; say "never here"; CATCH { default { say "whoops! " ~ .^name; return "we didn't make it" } } }; my $x = foo; say $x; # something like this colomon? | 15:25 | |
camelia | rakudo-moar 0e6538: OUTPUT«whoops! X::AdHocwe didn't make it» | ||
PerlJam | colomon: handle the exception and return something sounds like CATCH { when SomeException { say "blah"; return "something" } } to me. | ||
colomon | I've got it figured out, I think. | ||
15:25
kivutar left
|
|||
colomon | PerlJam++ [Coke]++ | 15:25 | |
BenGoldberg | m: sub foo { die "no"; say "never"; CATCH { default { "oww" } } }; say foo; | 15:26 | |
camelia | rakudo-moar 0e6538: OUTPUT«Nil» | ||
BenGoldberg | m: sub foo { die "no"; say "never"; CATCH { default { return "oww" } } }; say foo; | ||
camelia | rakudo-moar 0e6538: OUTPUT«oww» | ||
TimToady | I don't see any problem with using return from within CATCH; that sort of thing is why return is lexotic, and why we don't unwind the stack till after the CATCH | 15:28 | |
colomon | PerlJam, [Coke]: quick explanation of my issue: gist.github.com/colomon/c3123119436ad6c7db71 | ||
15:30
Ven left
15:31
raiph joined
|
|||
colomon realizes part of his problem was that he was looking at the wrong MAIN for some of his debugging, which didn't help matters in the least. | 15:32 | ||
dalek | p-js: b486a9e | (Pawel Murias)++ | tools/build/Makefile-JS.in: Avoid conflict between parrot and js backend makefiles. |
||
p-js: 78be7f1 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp: Handle charrange. |
|||
p-js: bca9dec | (Pawel Murias)++ | tools/build/gen-js-makefile.nqp: Started creating a script to generate the Makefile for the js backend. |
|||
p-js: 196806c | (Pawel Murias)++ | tools/build/ (2 files): Generate a tools/build/Makefile-JS.in which allows the passing of the nqp-js tests. |
|||
TimToady | m: sub mystery { 1 | 2 | 3 }; given mystery() { when 1 { say 'one' }; when 2 { say 'two' }; when 3 { say 'three' } } | 15:34 | |
camelia | rakudo-moar 189d1c: OUTPUT«one» | ||
TimToady | that's the case that can't be optimized | ||
it also doesn't jive with this: | 15:36 | ||
m: say 1 | 2 | 3 ~~ Junction | |||
camelia | rakudo-moar 189d1c: OUTPUT«True» | ||
TimToady | that case doesn't autothread the left | 15:37 | |
15:37
figoe joined,
woolfy left
|
|||
FROGGS | m: say /\w+/ ~~ "foo" | 15:37 | |
camelia | rakudo-moar 189d1c: OUTPUT«False» | ||
TimToady | we broke the symmetry of smartmatch in order to wrest control of semantics from the LHS, and this is just another case of that | 15:38 | |
FROGGS | the RHS tells us how to smart match... so 1|2 ~~ 2 does not make much sense, unless Ints know about Junctions on the left | ||
TimToady | when 2 should allow us to say: coerce to 2, and is it ==? | 15:39 | |
er, coerce to Int | |||
15:39
woolfy joined
|
|||
FROGGS | afk again | 15:40 | |
15:45
spider-mario joined
15:46
kivutar joined
|
|||
[Coke] | colomon: i have lost probably days of my life debugging the wrong thing. | 15:49 | |
dalek | kudo-star-daily: bb1e404 | coke++ | log/ (13 files): today (automated commit) |
15:50 | |
rl6-roast-data: b6314be | coke++ | / (5 files): today (automated commit) |
|||
PerlJam | [Coke]: I'm pretty sure most, if not all, of us have. | 15:51 | |
colomon | I think I may have gotten up to a month or so wasted debugging a single wrong thing | 15:52 | |
dalek | blets: af060ce | (Herbert Breunung)++ | docs/appendix-g-glossary.txt: added glossary terms stub |
15:54 | |
masak | "chasing ghosts" -- when you change and change and change something, but don't notice an effect; turns out you're changing one thing and measuring another. | ||
15:57
brrt left
|
|||
colomon is starting to vividly remember why he gave up on Windows | 15:58 | ||
TimToady | that's not as bad as what happens when someone swaps the left and right monitor cables to the stage, where every time you think you're fixing it, you're making it worse for the performers on the other side of the stage... | ||
it's a pernicious feedback loop (dunno whether the pun was intended...) | 15:59 | ||
16:00
kivutar left
16:03
kivutar joined,
kivutar left
16:07
jnap joined
16:08
denis_boyun joined
16:15
jnap left
16:19
brrt joined,
denis_boyun left
16:23
zakharyas left
|
|||
timotimo | pmurias: hey, do you have time to work on nqp-js again? :) | 16:23 | |
16:27
kaare__ left
16:29
kivutar joined
|
|||
awwaiid | ICFP contest today, great way to show off perl6! | 16:31 | |
TimToady | ooh, go for it | ||
16:34
dmol left
|
|||
colomon | …. my impression was you had to use their (custom designed) languages for this iteration of the competition? | 16:34 | |
TimToady | write a rakudo backend? | ||
timotimo | and then surprise people with the good performance that results from using moarvm's jit and how easy it is to deploy because we have a jvm backend :P | 16:38 | |
pmurias | timotimo: hi | ||
timotimo | pmurias: wishes for a rakudo-js came up a few times this week for having a "try perl6" website thingie that doesn't need a sandboxed compiler on one of our servers (because they are always leaky. always) | 16:40 | |
TimToady | Eternal fame and fortune awaits you! | 16:41 | |
pmurias | ;) | ||
16:41
Rotwang joined
|
|||
timotimo | pmurias: some left-over time might be well spent writing up a short roadmap or todo list or something like that | 16:42 | |
hoelzro | +1 | 16:43 | |
timotimo | otherwise, spending your time on coding stuff would obviously be good, too :) | ||
TimToady | there are probably lots of people who would be willing to help shove it down the road | ||
hoelzro | I would lend some of my not-copious time | 16:44 | |
timotimo | there's a TODO file that has been last edited on 22 dec 2012, so no clue if it can be "trusted" :) | ||
hoelzro | I would even go so far as to set up a "bug bounty" for it | ||
I'd chip in a bit of money for whomever finishes it =) | |||
TimToady | but when will it be ready for production? :P | 16:45 | |
timotimo | that's like only giving EXP for the player to get the last hit/shot in on the boss :P | ||
hoelzro | heh | ||
timotimo: maybe it would be weighted by # commits or # lines changed | |||
on the honor system, I guess | |||
[Coke] | (bug bounty) I am reminded that gittip is a thing. | ||
TimToady | quick, change all the whitespace | ||
timotimo | yo tadzik; in Steroids, your @.controllers starts out with a Controller object in it and in the constructor you add another Controller object for each controller reported by SDL, is that off-by-one? | 16:46 | |
hoelzro | [Coke]: I thought of asking pmurias if he was on gittip | ||
16:46
akaseki joined
|
|||
tadzik | timotimo: it mite be, let me see | 16:46 | |
[Coke] points at www.gittip.com/for/perl-6/ | 16:47 | ||
timotimo | tadzik: got a clue how tiles and tile rendering might best be integrated into steroids? | ||
tadzik | timotimo: I had some code doing that, but it was pretty stupid :P | ||
pmurias | timotimo: re the TODO is not to be trusted, the current work is in a different repo ;) | ||
timotimo | github.com/pmurias/rakudo-js - this one is the wrong one? | 16:48 | |
hoelzro | [Coke]: nice, I hadn't noticed that | ||
tadzik | I joined that group :) | ||
timotimo | pmurias: also, don't let us discourage you by only asking for you to finish it; your work so far has been pretty cool; pmurias++ # nqp-js | 16:49 | |
pmurias | timotimo: github.com/pmurias/nqp-js | ||
16:49
aoseki left
|
|||
pmurias | timotimo: I'm not discouraged at all, to the contrary ;) | 16:49 | |
timotimo | \o/ | ||
hoelzro | indeed, pmurias++ | 16:50 | |
tadzik | timotimo: eck, where in steroids is that? | ||
pmurias | currently I'm porting over things to integrate into the nqp build system | ||
timotimo | github.com/tadzik/steroids/blob/ma...ids.pm#L16 | ||
and the BUILD submethod | 16:51 | ||
tadzik | oh, @.gamepads :) | ||
timotimo | aye, i misremembered the name of that | ||
tadzik | yes, it's probably a thinko | ||
timotimo | not a dangerous one; just means the list is one bigger; you always access them by id anyway, don't you? | ||
pmurias | I plan to spend today on it, once it's done I'll see what would the tasks for a TODO/ROADMAP be | 16:52 | |
timotimo | i like the sound of that! :) | ||
pmurias | got to go& | ||
timotimo | see you later! | ||
tadzik | timotimo: right | ||
16:52
pmurias left
16:56
kaleem joined
|
|||
[Coke] goes through and finds more people on gittip | 16:58 | ||
17:01
gfldex joined
|
|||
TimToady | [Coke]: so the answer is that ~~ must not autothread the LHS | 17:01 | |
17:01
nbrown joined
|
|||
TimToady | dwimmery of the LHS is only allowable by the RHS, and Int is not gonna allow it, or we can't optimize switch statements that are all integers. | 17:02 | |
17:04
kivutar left
|
|||
TimToady | also, we're are unlikely change #| or #=, since #| creates a fake left margin for a paragraph of text, and #= naturally alludes to the A = B meme from math | 17:05 | |
maybe we should allow #v at the bottom end of the row of #| so it's an arraw pointing down | |||
*row | |||
17:06
nbrown left
|
|||
TimToady | of course, you can always put #v there anyway, but text on the line would not currently be added to the #| paragraph | 17:06 | |
17:08
molaf joined
|
|||
TimToady | or maybe allow ↓ as an alternative to | | 17:09 | |
but ^ is pointing the wrong direction entirely, and > is 90° off :) | 17:10 | ||
17:10
ggoebel111116 joined
|
|||
TimToady | visual metaphors usually trump semantic metaphors to my mind | 17:11 | |
17:12
brrt left
|
|||
TimToady | there's also ↓ but that's skinnier than | in my current font, so probably best to stick with v | 17:17 | |
17:18
Akagi201 left
|
|||
itz_ | there's a Perl Hack Day happening in Sept in London and I'm hoping there will be some beginners working on P6. Any pointers for low hanging fruit? | 17:25 | |
jnthn | Stuff in module space, perhaps. | 17:26 | |
Potentially testneeded tickets also | |||
17:27
treehug88 left
|
|||
masak | sometimes just trying stuff out and asking questions here on channel helps drive things forward in various ways. | 17:27 | |
timotimo | aye, but that's usually a wishy-washy thing | ||
can't really point people towards anything in particular; may end up disappointing them/driving them away | 17:28 | ||
17:28
pecastro left
|
|||
masak | may be insufficiently concrete for some, yes. | 17:28 | |
itz_ | hmmm going through tickets is an objective and demostrating some perl 5 v perl 6 differences | ||
17:28
btyler left
|
|||
timotimo | maybe we could pretend we had a RakudoInABrowser or OnASecureServer and offer the task of writing a try.perl6.org html/js/css thingie that could interface with that | 17:29 | |
dalek | ecs: 3fa5859 | TimToady++ | S26-documentation.pod: document semantics of multiple #| or #= |
||
17:29
kaleem left
|
|||
hoelzro | TimToady: since you're thinking about #| and #=, did you see FROGGS' earlier comment on them? | 17:30 | |
TimToady | that's what I was responding to | ||
hoelzro | oh, perfect =) | 17:31 | |
hoelzro needs to be more diligent about backlogging | |||
vendethiel realized he learned quite some stuff about P6 while writing his tutorial | 17:32 | ||
TimToady needs to be more diligent about highlighting others | |||
vendethiel | (doesn't mean you should make them write a tutorial :p) | ||
FROGGS | hoelzro: what do you mean by corner case? | 17:33 | |
hoelzro | FROGGS: I was asking for a test case, not realizing you'd provided one =) | 17:34 | |
I figured it out, though | |||
FROGGS | hoelzro: awesome :o) | ||
hoelzro | =) | ||
17:36
atroxaper joined
17:37
atroxaper left
17:43
brrt joined
17:45
dwarring joined
|
|||
carlin | it seems on OpenBSD, libtommath's mp_rand is only giving results that `mod 2` == 0, so nqp::rand_I(2, Int) won't return 1 | 17:52 | |
masak | carlin: o.O | 17:54 | |
carlin: that's crazy. | |||
carlin++ # finding the bug | |||
carlin: does this mean that we could call mp_rand with twice the upper limit, and then divide by 2, and it'll work? | 17:55 | ||
jnthn | wat... | ||
ventica_desktop | libtom* are a little sketchy, IMO | 17:56 | |
was planning to use them in a project of my own, but then started digging into the internals and got scared away | 17:57 | ||
masak | this is the first gotcha I'm aware of. | ||
BenGoldberg | p: srand(3); print nqp::rand_I(10,Int) for 1..10; | 17:59 | |
camelia | rakudo-parrot 189d1c: OUTPUT«5708404403» | ||
rakudo-parrot 189d1c: OUTPUT«3021355780» | |||
ventica_desktop | some of those look like odd numbers to me ... :\ | 18:00 | |
BenGoldberg | But it does demonstrate a bug! | ||
ventica_desktop | ? | ||
TimToady | srand being ignored | ||
ventica_desktop | oh | 18:01 | |
BenGoldberg | srand isn't doing anything to reset the state of libtommath | ||
ventica_desktop | haha | ||
yeah | |||
gtodd | when I start up scala to get into the REPL and then quite as soon as it loads it takes about 13 seconds on my machine ... | ||
with perl6-j about 7 seconds | 18:02 | ||
masak | nice. | 18:04 | |
gtodd | but it does seem that perl6-j takes longer to actually be up and running compared to scala which seems to start up some sort of REPL up pretty fast .... | ||
perl6-j must load parse more to get "ready" than scala does | 18:05 | ||
it just led me to wonder if there was an easy REPL could be "optimized " for each type of rakudo that was running it | 18:06 | ||
or if that is already the case | |||
ventica_desktop | it appears to me that libtommath just calls stdlib rand()... | ||
nwc10 | OK, why is t/spec/integration/99problems-51-to-60.t failing when run as part of the spectest but not stand alone? | 18:07 | |
gtodd | of course start up time for the REPL is not a sexy language design goal and it is mostly good enough so ... :) | 18:08 | |
18:14
kaare__ joined
18:15
Ven joined
|
|||
[Coke] | nwc10: memory pressure? | 18:21 | |
18:25
dmol joined,
treehug88 joined
|
|||
carlin | here's the result of mp_rand 100,000 times on OpenBSD: gist.githubusercontent.com/carbin/...tfile1.txt | 18:26 | |
and the same thing on linux: gist.githubusercontent.com/carbin/...tfile1.txt | |||
that's the result that is set here: github.com/MoarVM/MoarVM/blob/mast...ops.c#L784 | |||
18:28
btyler joined
|
|||
Ven | I'll take advantage of the fact that more people are here and ask for proof-reading of github.com/adambard/learnxinyminut...s/pull/687 :) | 18:33 | |
18:33
BenGoldberg left
18:34
pecastro joined,
nbrown joined
|
|||
hoelzro | Ven: you should probably use ```perl6 instead of ```perl | 18:35 | |
Ven | hoelzro: nah, perl6 has terrible comments highlighting. | 18:36 | |
hoelzro | ='( | ||
Ven | hoelzro: try the oldest commits, you'll see how bad it looks | ||
hoelzro | which oldest commits? | ||
btyler | (Ven: hoelzro is the author of the linguist perl6 support, which is what github uses for syntax highlighting) | ||
Ven | hoelzro: I mean in the PR :) | 18:37 | |
hoelzro: github.com/Nami-Doc/learnxinyminut...l.markdown only the multilines ones are highlighted | |||
hoelzro | wtf | ||
Ven | and it's reading pretty bad ... so I had to go back to perl :( | ||
18:38
hoverboard joined,
SamuraiJack__ joined
|
|||
hoelzro | WTF | 18:38 | |
what did GH do | |||
Ven | hahaha | ||
18:39
nbrown left
|
|||
hoelzro | I hadn't ever noticed how bad the single line ones were | 18:39 | |
it works fine with just pygments | |||
I just don't understand | 18:40 | ||
apparently it has the single line comment class applied to it | 18:41 | ||
Ven | now you know why I changed to perl5's P | ||
hoelzro | yeah | ||
I just don't understand | |||
why it's so bad on GH | 18:42 | ||
also, Ven++ for writing this | |||
Ven | hoelzro++ # highlighting, aka insanity :P | 18:43 | |
gtodd | hmm I can't build rakudo today .... paste.scsys.co.uk/409550 | 18:44 | |
hoelzro | I see now | 18:45 | |
they don't have a class for Comment.Singleline | |||
this drives me nuts, because I don't think this is fixable | 18:46 | ||
FROGGS | gtodd: that looks like as if parts of your build is pretty old | ||
like 3rdparty in nqp | |||
18:47
ggoebel111116 left
|
|||
gtodd | hmm git pulled | 18:47 | |
maybe I'm ont in my usual directory ... I did a few house cleaning tasks | |||
18:48
ggoebel111116 joined
|
|||
gtodd | rm -rf nqp etc etc maybe I'll just do totally fresh checkout ... | 18:48 | |
18:48
vendethiel- joined
18:49
Su-Shee left
|
|||
masak | it just struck me that it's really silly whenever I have an enum, say Player, with two values, say Player.WHITE and Player.BLACK, and I end up doing the `$player = $player === WHITE ?? BLACK !! WHITE;` dance | 18:49 | |
flussence | rakudo-m just built fine for me (wow... that was fast) | 18:50 | |
masak | what I really want to do is say to the language, "ok, we both know this enum can biject (in whatever way) onto Bool. $player = !$player" | ||
:) | |||
18:51
Ven left,
vendethiel left
|
|||
masak | well, it's Perl 6. I guess I can just custom-define prefix:<!> | 18:51 | |
jnthn | multi prefix:<!>(Player $p) { ... } | ||
masak | but I'm after something slightly deeper. | ||
namely, sometimes types act like other types. | |||
gtodd | masak: then you need InfinitePlayer ;-) | ||
masak | there will be other circumstances when a type will "act like" a numeric type, or a string, or an array, without *being* either of those. | 18:52 | |
dalek | p/dynquant: dbb0832 | (Tobias Leich)++ | src/vm/parrot/QAST/Compiler.nqp: align to the standard about label prefix in dynquant |
||
masak | in the case of Bool, I want to "do prefix:<!> under the Player->Bool transform". | ||
the closest analogue I can think of is `handles`, actually. | 18:54 | ||
but `handles` assumes aggregation/delegation. this doesn't. | 18:55 | ||
it just assumes that there's an isomorphism between my type and some other type where the operation is defined. | |||
TimToady | m: enum P of Bool <Me Them>; my P $p = Me; $p = not $p; say $p | 18:57 | |
camelia | rakudo-moar 189d1c: OUTPUT«===SORRY!=== Error while compiling /tmp/LsfkUrYUitMethod 'set_of' not found for invocant of class 'Perl6::Metamodel::EnumHOW'at /tmp/LsfkUrYUit:1------> » | 18:58 | |
TimToady | aww | ||
18:58
SamuraiJack__ left
18:59
spider-mario left
|
|||
masak | that would... definitely be a start. | 18:59 | |
TimToady | m: enum P <Me Them>; my P $p = Me; $p = P(not $p); say $p | ||
camelia | rakudo-moar 189d1c: OUTPUT«(P)» | ||
masak | aww :) | 19:00 | |
19:00
darutoko left
|
|||
masak | yes, what I'm mainly trying to avoid is that casting back to P | 19:00 | |
moritz | ok, sorear++ answered that he's fine with being removed as an admin from the perl6/ org | ||
masak | good bye, sorear++. it was very good knowing you. good luck with everything. | ||
flussence | sorear++ :) | 19:01 | |
moritz | quoth "I haven't been feeling the Perl 6 so much lately" | 19:02 | |
jnthn hopes he might be lucky enough to run into sorear++ again some day, in some context | |||
19:02
raiph left
|
|||
TimToady | m: enum P <Me Them>; my P $p = Me; $p = P(1); say $p | 19:03 | |
camelia | rakudo-moar 189d1c: OUTPUT«Them» | ||
TimToady | m: enum P <Me Them>; my P $p = Me; $p = P(+!$p); say $p | ||
camelia | rakudo-moar 189d1c: OUTPUT«Them» | ||
TimToady | with coercive types we could just write $p = +!$p | ||
if we declared my P() $p | 19:04 | ||
kind of a shame that it requires the + on the +!$p | |||
jnthn | ...now there's a declaration not to say out loud :P | ||
19:05
dmol left
|
|||
ventica_desktop | who is sorear? | 19:06 | |
TimToady | m: use MONKEY_TYPING; enum P <Me Them>; augment class P { method other { P(+!self) } }; my P $p = Me; $p.=other; say $p | 19:07 | |
camelia | rakudo-moar 189d1c: OUTPUT«===SORRY!=== Error while compiling /tmp/Ane4KEOPNRCannot augment P because it is closedat /tmp/Ane4KEOPNR:1------> PING; enum P <Me Them>; augment class P ⏏{ method other { P(+!self) } }; my P $p  expec…» | ||
TimToady | ooh | ||
vendethiel- | ventica_desktop: the old niecza guy | 19:08 | |
TimToady | m: use MONKEY_TYPING; enum P <Me Them>; augment enum P { method other { P(+!self) } }; my P $p = Me; $p.=other; say $p | 19:09 | |
camelia | rakudo-moar 189d1c: OUTPUT«===SORRY!=== Error while compiling /tmp/tLqhx7ourBRedeclaration of symbol Pat /tmp/tLqhx7ourB:1------> TYPING; enum P <Me Them>; augment enum P⏏ { method other { P(+!self) } }; my P $p» | ||
19:09
rurban1 left
|
|||
vendethiel- | (so long and thanks for niecza, sorear++ :).) | 19:09 | |
ventica_desktop | vendethiel-: ok, cool... I don't know any #perl6 nicks, that's why i asked | ||
besides TimToady, of course | |||
vendethiel- didn't know TimToady | |||
I think I bumped into him a few times before realizing who he was, hehe | 19:10 | ||
TimToady doesn't know himself | |||
PerlJam | sorear isn't that old, really ;) | ||
vendethiel- | PerlJam: it took far too long for somebody to decide to make that joke =) | ||
TimToady thought of it | |||
masak | sorear taught me a bunch of category theory. | 19:11 | |
hoelzro | that's a bummer | ||
masak | I wish I knew as much math when I was his age. | ||
hoelzro | (about sorear) | ||
but people move on, I guess | |||
PerlJam | vendethiel-: I was too busy wondering why you didn't actually say, "so long and thanks for all the niecza" | ||
vendethiel- | masak: nothing wrong with learning later :) | ||
masak | vendethiel-: oh, totally working on it. | ||
ventica_desktop | I was a bit underwhelmed with cat. theory after attending a talk last year and realizing it's just graph relations... :\ | 19:12 | |
TimToady | well, he's certainly welcome back any time; I wish everyone burned their bridges as well as sorear++...oh wait...no I don't... | ||
ventica_desktop | graph relations + logic operators = cat. theory | ||
masak | ventica_desktop: I beg to differ. | ||
ventica_desktop | *shrug | 19:13 | |
masak | ventica_desktop: cat. theory has relatively little to do with graph relations. that's just the way they like to draw things. | ||
PerlJam | .oO( "I'm not bad, I'm just drawn that way" ) |
||
masak | it's taking one very powerful idea, functional composition, and building a whole math out of it. | ||
ventica_desktop | indeed, the subject matter can be anything... but the connectives indeed have the properties of graphs | ||
masak | I wouldn't say "graphs" captures it very well. | 19:14 | |
TimToady | PerlJam: we're discussing cats, not rabbits | ||
masak | though graphs can indeed also be cast in a cat-theoretic light. | ||
ventica_desktop | masak: I understand... it's just how my brain groks it | ||
PerlJam | :-) | ||
masak | one of the best quotes I saw was "Category theory is just mathematicians finally learning to program against interfaces." | 19:15 | |
ventica_desktop | an interface with no specification, however | ||
unless you believe that math conventions are internally consistent! | |||
ventica_desktop snickers at the thought | |||
to be more clear, I mean the category (yes, category) of *all* math conventions | 19:16 | ||
masak | urgh. no, I don't believe that :) | ||
ventica_desktop | .oO(At least per6 has a spec... more than can be said for adv. mathematics...) |
19:17 | |
vendethiel- | masak: hehe, well, maybe we'll get to chat at some point | ||
masak | vendethiel-: the macros thing? yes, I hope so. | 19:18 | |
vendethiel- | well, chatting in general, really :). I like discussing thingies with people | ||
masak | ooh, that's something we have in common :) | ||
vendethiel- | I think lizmat++ can tell how chatty I am :P | 19:19 | |
Well, the perl 6 tutorial is now going on the .com website, yay :) | |||
masak | \o/ | 19:20 | |
jnthn | vendethiel-++ | 19:21 | |
19:21
vendethiel- is now known as vendethiel
|
|||
PerlJam | the perl.com website? | 19:22 | |
(that one is in need of some updates) | |||
vendethiel | PerlJam: the learnxinyminutes one (to start with ;-).) | ||
vendethiel is kinda sad the maintainers there didn't review it, whereas I reviewed every single french tutorial PR *very* thoroughly :P | |||
learnxinyminutes.com/docs/perl6/ here it is :-) | 19:23 | ||
ventica_desktop | I did 0.55*x in z minutes last night | 19:24 | |
Still 0.45*x to go... | |||
19:25
raiph joined
|
|||
vendethiel | hoelzro: another reason not to use perl6: I don't believe it's supported with our (learnxiny) highlighter | 19:25 | |
ventica_desktop | m: my $a = 1|2; say $a; | ||
camelia | rakudo-moar 189d1c: OUTPUT«any(1, 2)» | ||
PerlJam | vendethiel: fix it! | ||
vendethiel | he? | ||
hoelzro | the learnxiny person probably doesn't use GH markdown =/ | 19:26 | |
gtodd | flussence: hmm still won't build on fresh checkout... here's how I configure: perl Configure.pl --backends=moar,parrot,jvm --gen-nqp --gen-parrot --gen-moar --prefix=/home/user/perl6 | ||
ventica_desktop | m: my $a="foo" ~ "bar" & "bop"; say $a; | 19:27 | |
camelia | rakudo-moar 189d1c: OUTPUT«all(foobar, bop)» | ||
ventica_desktop | uh? | ||
oh | |||
PerlJam | precedence | ||
19:28
brrt left
|
|||
ventica_desktop | yup | 19:28 | |
tut bug | |||
ok... perl6 arch. question ... is there a "minimal perl6" spec? | 19:29 | ||
flussence | gtodd: I usually `git clean -dfx` in rakudo/ and its sub-repos first before building, that wipes out any panda state if you use the default install location though, so be careful | 19:30 | |
gtodd | hmm | ||
19:34
BenGoldberg joined
|
|||
gtodd | seems I just needed to blow away ~/perl6/ too bad :) | 19:34 | |
hoelzro | ventica_desktop: what do you mean, exactly? | 19:35 | |
gtodd | not sure why but the build sometimes grabs stuff from in there and works and sometimes doesn't grab stuff and works and sometimes grabs libs etc and breaks | 19:36 | |
ventica_desktop | hoelzro: Well, the full p6 spec/test-suite is quite daunting... I can imagine writing a toy implementation of some of it just for fun... but the whole thing, no way | ||
gtodd | I think it's my shell env ... I blame bash :) | ||
ventica_desktop | Maybe the consensus is that toy implementations are a bad thing... | ||
hoelzro | hmm | ||
well, more power to you if you want to try it | 19:37 | ||
ventica_desktop | haha | ||
jnthn | Well, there's NQP (which isn't spec'd) which is a restricted Perl 6 | ||
hoelzro | I mean, even the most compliant impls don't impl the whole thing | ||
gtodd | ventica you mean a perl6 embedded ala libperl.so ? | ||
ventica_desktop | not at present... besides, I don't have godlike Haskell skills | ||
hoelzro | oh, jnthn brings up a very good point | ||
ventica_desktop | jnthn: ah true... forgot abt that | ||
so maybe I'm thinking of a spec'd NQP? | |||
jnthn | Maybe :) | 19:38 | |
ventica_desktop | gtodd: no... that's nice, too, but i meant a spec to implement it in a new language, e.g. Racket or something | ||
not saying it's a good idea... it's an idea :P | |||
19:39
rurban1 joined
19:42
raiph left
|
|||
hoelzro | ventica_desktop: you could probably just start picking "simple" things to implement | 19:42 | |
masak | +1 | ||
build things up step by step. | |||
19:45
rurban1 left
|
|||
gtodd | hmm so what about libperl.so type things ... e.g. postgresql has plperl ... is there a "opposite" of NativeCall that is amazing :-) | 19:45 | |
ventica_desktop | ok, back to tutorial... question... how to get two junctions to invoke a function in a "cartesian product" manner... f(a,b) gets invoked for each value of aXb ? | 19:46 | |
vendethiel | ventica_desktop: `for @a X @b -> $a, $b {f($a, $b) }` | 19:47 | |
ventica_desktop | oh | ||
masak | ventica_desktop: if it's really junctions you want, this also works: f(any(@a), any(@b)) | 19:48 | |
but usually these days, I find it's lists I want, not junctions. | 19:49 | ||
or sets. sometimes sets. | |||
lue | r: say "ABC".encode».WHAT; | ||
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«(utf8)» | ||
masak | I want junctions more or less exactly when I'm asking "is there any...?" or "are all...?" type questions. | ||
lue | I'm not convinced » on a Buf should do that. :) | 19:50 | |
dwarring | ventica_desktop: rakudo has some a small sanity test suite github.com/rakudo/rakudo/tree/nom/t/01-sanity | ||
masak | lue: I believe it's a no-op in that case. | 19:51 | |
BenGoldberg | m: "ABC".encode.WHAT.say | ||
camelia | rakudo-moar 189d1c: OUTPUT«(utf8)» | ||
masak | lue: which is why you get only one value out of it. | ||
dwarring | maybe you could use that? | ||
lue | masak: interesting. Still feels like the wrong answer to me. :) | ||
vendethiel | masak: you can do that with any Oo | 19:52 | |
masak | lue: seems pretty consistent to me. | ||
TimToady | r: say "ABC".encode[]».WHAT; | ||
vendethiel | now I'm surprised | ||
masak | vendethiel: yep. | ||
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«(Array)» | ||
masak | vendethiel: they nest. | ||
TimToady | r: say "ABC".encode[*]».WHAT; | ||
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«(Parcel)» | ||
vendethiel | god help us :) | ||
lue | r: say "ABC".encode[0..*-1]».WHAT | ||
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«(Parcel)» | ||
masak | m: say any("foo", "bar", "baz") eq any("gloop", "maz", "foo") | ||
camelia | rakudo-moar 189d1c: OUTPUT«any(any(False, False, True), any(False, False, False), any(False, False, False))» | ||
TimToady | r: say "ABC".encode.list».WHAT; | 19:53 | |
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«(Array)» | ||
lue | r: say "ABC".encode.list.perl | ||
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«Array.new(65, 66, 67)» | ||
TimToady | that seems...wrongish... | ||
r: say "ABC".encode.values».WHAT; | 19:54 | ||
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«(Array)» | ||
TimToady | why Array? | ||
ventica_desktop | dwarring: Thanks, I'll take a look | ||
lue | Aside from my general complaint that Bufs should be more like arrays and less like strings, I'd expect at least the to-list conversion to work right with » | ||
TimToady | r: say "ABC".encode.values.list».WHAT; | ||
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«(Array)» | ||
lue | r: say Array.new(65, 66, 67)».WHAT; # sanity check | 19:55 | |
FROGGS | r: say "ABC".encode.values.list».^name | ||
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«(Array)» | ||
rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«Int Int Int» | |||
FROGGS | .WHAT might be WAT | ||
TimToady | r: say "ABC".encode.ords; | 19:56 | |
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«No such method 'ords' for invocant of type 'utf8' in block at /tmp/tmpfile:1» | ||
jnthn | TimToady: What did you expect .list on a Blob to be? Identity? | 19:57 | |
ventica_desktop | hehe my first segfault of ./perl6 :P | ||
TimToady | well, I expected it to work more like an immutable Buf | ||
m: say Buf.new(65,66,67).list | 19:58 | ||
camelia | rakudo-moar 189d1c: OUTPUT«65 66 67» | ||
TimToady | m: say Buf.new(65,66,67).list.WHAT | ||
camelia | rakudo-moar 189d1c: OUTPUT«(Array)» | ||
jnthn | Well, it does, apparently :P | ||
Buf inherits, or does, Blob, iirc | |||
TimToady | it seems a bit difficult to pry out the values as a list | 19:59 | |
gtodd | hmm the build still gives me this: /usr/bin/ld: ../../../../3rdparty/dyncall/dyncall/libdyncall_s.a(dyncall_api.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC | ||
TimToady | m: say [1,2,3]».WHAT | 20:00 | |
camelia | rakudo-moar 189d1c: OUTPUT«(Array)» | ||
TimToady | I guess that's waiting completion of 'is nodal' | ||
lue | r: say "ABC".encode.list».WHAT; say "ABC".encode.list[0].WHAT; | ||
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«(Array)(Int)» | ||
20:01
rurban1 joined
|
|||
TimToady | m: say [1,2,3][]».WHAT | 20:01 | |
camelia | rakudo-moar 189d1c: OUTPUT«(Array)» | ||
TimToady | m: my @array = 1,2,3; say @array».WHAT | ||
camelia | rakudo-moar 189d1c: OUTPUT«(Array)» | ||
TimToady | that seems quite wrongish | 20:02 | |
lue | o_o so I guess something broke then | ||
TimToady | m: my @array = 1,2,3; say @array».succ | ||
camelia | rakudo-moar 189d1c: OUTPUT«2 3 4» | ||
TimToady | I guess it's the macroness that's breaking WHAT | ||
jnthn | I suspect that it's that .WHAT is actual macro-y | ||
20:02
psch left
|
|||
jnthn | It may well be ignoring the hyper completely... | 20:03 | |
20:03
psch joined,
woolfy left
|
|||
TimToady | m: say Buf.new(65,66,67)».succ | 20:03 | |
camelia | rakudo-moar 189d1c: OUTPUT«No such method 'succ' for invocant of type 'Buf' in method dispatch:<hyper> at src/gen/m-CORE.setting:1236 in block at /tmp/S3Y80VVYV7:1» | ||
jnthn | m: say Buf ~~ Iterable # what should this come out as? | 20:04 | |
camelia | rakudo-moar 189d1c: OUTPUT«False» | ||
TimToady | m: say Buf.new(65,66,67)[$_] for 0..2 | ||
camelia | rakudo-moar 189d1c: OUTPUT«656667» | ||
lue | r: say "ABC".encode».perl; "ABC".encode.list».perl; # this is still an issue, though I suppose .list is fine enough for me right now | ||
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«utf8.new(65, 66, 67)» | ||
jnthn | m: say Buf ~~ Positional # and this | ||
lue | r: say "ABC".encode».perl; say "ABC".encode.list».perl; # this is still an issue, though I suppose .list is fine enough for me right now | ||
camelia | rakudo-moar 189d1c: OUTPUT«True» | ||
rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«utf8.new(65, 66, 67)65 66 67» | |||
TimToady | m: say Buf.new(65,66,67)[*] | ||
camelia | rakudo-moar 189d1c: OUTPUT«65 66 67» | ||
TimToady | m: say Buf.new(65,66,67)[*].WHAT | 20:05 | |
camelia | rakudo-moar 189d1c: OUTPUT«(Parcel)» | ||
avuserow | FROGGS: hoping to have one up tonight (in the 8 to 12 hour range), so I can collect feedback and testing results over the weekend. I have an afternoon of $dayjob between now and then, so I'm hoping I'm still up for it then. Looks promising regarding tests though. | ||
20:05
raiph joined
|
|||
FROGGS | avuserow++ | 20:05 | |
avuserow | moritz: at some point, possibly. I was planning on doing a PR for now and sorting out the logistical bits later | ||
dalek | blets: b6a6b2a | (Herbert Breunung)++ | docs/appendix-a-index.txt: added tc and tclc |
||
20:06
ventica_desktop left
|
|||
jnthn | avuserow++ # thanks for working on this | 20:06 | |
avuserow | I just wanna show off the cool bits that #perl6++ has created :) | 20:07 | |
Ven: yeah I backlog online, partially for that reason | 20:08 | ||
looks like modules-test is non-clean on parrot... I'll investigate and try to ask specific questions to get that resolved later | 20:10 | ||
vendethiel doesn't even remember what he told avuserow++ :P | |||
20:11
Sqirrel joined
|
|||
timotimo | 20:11 | ||
vendethiel | welp, timotimo broke IRC | 20:12 | |
20:14
nbrown joined
|
|||
avuserow | vendethiel: you said you didn't see my messages :P | 20:15 | |
avuserow .oO( how appropriate ) | 20:16 | ||
20:18
dmol joined
20:21
nbrown left
|
|||
avuserow | sigh. I'm seeing a segfault on parrot for jsonrpc's test, but it goes away when I run it under gdb. what does one do in this scenario? | 20:23 | |
20:23
lizmat left
|
|||
rurban1 | printf debugging usually | 20:25 | |
-t will not help I guess | 20:26 | ||
dalek | ast: d5f7eb6 | (David Warring [email@hidden.address] | integration/99problems-01-to-10.t: is() => is_deeply(). Corrections/unfudges, Deleted one invalid test. |
||
20:29
kurahaupo_mobile is now known as kurahaupo_
|
|||
retupmoca | avuserow: enable core dumps, examine dump file in gdb? | 20:29 | |
timotimo | vendethiel: i'm sorry, just call the number on the back of your IRC and support should send you a free replacement | 20:31 | |
vendethiel | timotimo: well, I've tried turning it off and on and it's not fixed, how come ? | 20:32 | |
timotimo | well, is it plugged in? | 20:37 | |
vendethiel | timotimo: oh, I forgot to switch on the multi-outlet, I'm sorry! thanks for your help, though. | 20:38 | |
timotimo | sure no problem | ||
# Hashes are actually arrays of Pairs (`Key => Value`), "flattened" to remove duplicated keys. ← this sounds weird to me | 20:40 | ||
and arrays "start with @" and "stored in variable, they use `&`" sounds strange to my ears, too | 20:41 | ||
maybe just put "their name" in the appropriate slot? | |||
20:42
kaare__ left,
brrt joined
|
|||
dalek | ast: c8a47be | (David Warring [email@hidden.address] | integration/99problems-01-to-10.t: resurrected a test. removed guff |
20:43 | |
timotimo | vendethiel: it may be a good idea to mention that using non-autoquoted or colonpair-syntax named arguments gives you a positional parameter filled with a Pair object instead | 20:44 | |
which is a gotcha that probably surprises many people | 20:45 | ||
with-mandatory-named(str => "My String"); #=> My String ← it ought to have a ! in the output, too | |||
m: my $x = 42; sub mod() is rw { $x }; mod = 52; say $x | 20:47 | ||
camelia | rakudo-moar 189d1c: OUTPUT«===SORRY!=== Error while compiling /tmp/p2miM4Ioa0Preceding context expects a term, but found infix = insteadat /tmp/p2miM4Ioa0:1------> y $x = 42; sub mod() is rw { $x }; mod =⏏ 52; say $x» | ||
timotimo | m: my $x = 42; sub modifythis() is rw { $x }; modifythis = 52; say $x | ||
camelia | rakudo-moar 189d1c: OUTPUT«===SORRY!=== Error while compiling /tmp/udkr6xnvnUPreceding context expects a term, but found infix = insteadat /tmp/udkr6xnvnU:1------> modifythis() is rw { $x }; modifythis =⏏ 52; say $x» | ||
timotimo | ah | ||
TimToady | if you don't want it parsed as a listop, you have to declare it term:<mod> | 20:48 | |
timotimo | because the paren-less form is more like a list prefix | ||
listop, aye. | |||
vendethiel: will you put some newlines into long comments or automatically hardwrap or something? | |||
20:52
Sqirrel left
|
|||
timotimo | vendethiel: does <=> and leg seem like worth mentioning? | 20:53 | |
20:54
skids left
|
|||
timotimo | the sub-signature matching/unpacking thing seems like it's coming out of nowhere | 20:55 | |
i'm confused by the key-of sub, where does :qua($qua)) come from? it doesn't seem to be referenced in the example that actually calls key-of | 20:56 | ||
vendethiel | timotimo: they're mentioned deep down | 20:58 | |
(<=> and leg) | |||
timotimo | oh, ok | 20:59 | |
i don't know what exactly "even in a `if`" refers to for truthy-array | |||
vendethiel | "[22:48] <timotimo> vendethiel: will you put some newlines into long comments or automatically hardwrap or something?" < what does that mean ? | 21:00 | |
timotimo | # Note : those are sorted lexicographically. `{ $^b / $^a }` is like `-> $a, b { $ b / $a }` | 21:01 | |
there's a stray space in "$ b" | |||
the comments extend beyond the border of the code section for me | |||
vendethiel | ... uh ? | ||
oh :(. that's sad | |||
lue | timotimo: what do you mean by "using non-autoquoted or colonpair-syntax named arguments gives you a positional parameter filled with a Pair object instead" ? | 21:02 | |
vendethiel | lue: a(a => 1) and a('a' => 1) is not the same | ||
timotimo | m: sub surprise(*@a, *%b) { say @a; say %b; }; surprise(foo => 1); surprise("foo" => 1) | ||
camelia | rakudo-moar 189d1c: OUTPUT«("foo" => 1).hash"foo" => 1().hash» | ||
lue | but how are colonpairs the same as not-autoquoted ? | 21:03 | |
vendethiel | well, a(:a(1)) is the same as a(a => 1) but not the same as a('a' => 1) | ||
21:03
rurban1 left
|
|||
lue | timotimo's statement implies that 'a' => 1 and :a(1) are the same, though | 21:04 | |
vendethiel | no; the opposite | ||
well, at least I'm explaining *the opposite*; sooo :P | |||
lue | I parse his statement as {'a' => 1} || {:a(1)} -> positional Pair | 21:05 | |
vendethiel | m: sub f(:$a) { say $a }; f(:a(1)); # uh ? | 21:06 | |
camelia | rakudo-moar 189d1c: OUTPUT«1» | ||
vendethiel | lue: ^ doesn't seem to be the case, tho | ||
timotimo | sorry, i must have written that wrong | ||
vendethiel | yeah, that's what I thought :P. "I can't be that wrong !" | ||
lue | OK, I was wondering if there was some NYI weirdness when timotimo's statement didn't hold up. | ||
timotimo | yes, wtf did i do there %) | 21:07 | |
vendethiel | timotimo: I didn't explain that difference, like I didn't explain flattening, because I want to think about it thoroughly before explaining them. | ||
They're gonna make a *LOT* of people WAT. | 21:08 | ||
timotimo | mhm | ||
we don't actually call perl6's object model "p6model", we call it "sixmodel" | 21:11 | ||
masak | partly because it's not limited to Perl 6. | 21:12 | |
vendethiel | well, anyway, only non-auto-quoted gives a pair positional, right ? | ||
timotimo: " the sub-signature matching/unpacking" <- alas, I need to explain that after explain some more things; soo ... | 21:13 | ||
timotimo | ok | 21:14 | |
vendethiel | oops, I just realized I left "in this last paragraph" when explaining it, hehe | 21:18 | |
21:18
ssutch joined
|
|||
vendethiel | timotimo: I admit I don't know what i meant with that If thing >_> | 21:22 | |
vendethiel pushes his fixes | 21:23 | ||
21:23
brrt left
21:24
lichtkind left
21:26
gfldex left
21:27
telex left
21:28
telex joined
21:30
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
|
|||
raydiak | good afternoon, #perl6 | 21:36 | |
raiph | \o | 21:37 | |
raydiak | o/ what are you up to, raiph? anything interesting? | 21:38 | |
raiph | glancing thru learnxinyminutes.com/docs/perl6/ | 21:39 | |
vendethiel | raiph++ # putting up with my english all the time :p | 21:40 | |
raydiak | ah nice... vendethiel, you did that? | 21:41 | |
vendethiel | raydiak: I did :) | ||
raydiak | vendethiel++ :) | ||
21:42
silug left
|
|||
vendethiel | .u ஓ | 21:42 | |
yoleaux | U+0B93 TAMIL LETTER OO [Lo] (ஓ) | ||
21:43
kivutar joined
21:45
btyler left
|
|||
raiph | vendethiel++ # user doc | 21:47 | |
vendethiel | .u Ժ | 21:48 | |
yoleaux | U+053A ARMENIAN CAPITAL LETTER ZHE [Lu] (Ժ) | ||
21:50
raiph left
21:55
raiph joined
21:56
silug joined
|
|||
dalek | p/dynquant: 85b29a4 | (Tobias Leich)++ | src/vm/jvm/QAST/Compiler.nqp: support code blocks as quantifiers on jvm as well |
21:59 | |
22:01
ssutch left,
ssutch joined
22:02
ventica left,
ssutch left,
ssutch joined
|
|||
timotimo | FROGGS: good job! | 22:03 | |
FROGGS | :o) | 22:04 | |
22:05
skids joined
22:06
nbrown joined
22:11
nbrown left
22:17
skids left
|
|||
dalek | p: 3097e14 | (Tobias Leich)++ | src/ (5 files): allow code block in ** quantifiers, / foo ** { $a := 42 } / In NQP the block can either provide a single item, which would be handled as foo**42, means that it must match exactly $item times. If the block provides a list [$min, $max], then the first two elems are used, like in foo**0..3. Note that the behaviour in rakudo is different, since we have Range objects there. |
22:20 | |
p: 83e13b6 | (Tobias Leich)++ | src/QRegex/P6Regex/Actions.nqp: fix separator use with code block in quantifier |
|||
timotimo | sweet! :) | ||
masak | FROGGS++ | ||
dalek | p: 04cb706 | (Tobias Leich)++ | src/vm/parrot/QAST/Compiler.nqp: support code blocks as quantifiers on parrot too |
||
p: 0be70eb | (Tobias Leich)++ | src/vm/moar/QAST/QASTRegexCompilerMAST.nqp: cleanup dynquant on moarvm |
|||
p: 17cabc1 | (Tobias Leich)++ | src/vm/parrot/QAST/Compiler.nqp: align to the standard about label prefix in dynquant |
|||
p: 0d5fabb | (Tobias Leich)++ | src/vm/jvm/QAST/Compiler.nqp: support code blocks as quantifiers on jvm as well |
|||
kudo/nom: b772b66 | (Tobias Leich)++ | src/ (2 files): allow code block in ** quantifiers, / foo ** { $three..$seven } / The code block in a quantifier can either provide a range object that is used for min and maximum quantity, or it provides a single numeric item that is used to match exactly that many times. |
22:21 | ||
masak | it just won't stop! :) | ||
timotimo | keep 'em coming! :) | ||
dalek | kudo/nom: a6b2af7 | (Tobias Leich)++ | tools/build/NQP_REVISION: bump nqp rev for dynquant implementation |
||
FROGGS | :P | ||
masak | vendethiel: reading learnxinyminutes.com/docs/perl6/ now | 22:25 | |
vendethiel: it's very good. thanks for doing this. | |||
vendethiel | thanks ! | ||
timotimo | wow, masak is a fast reader! | ||
masak | vendethiel: the first line I reacted on was `when $_.chars > 50` -- I would probably not write the $_ there | ||
vendethiel: I guess pedagogically it can be argued both ways, but... | 22:26 | ||
vendethiel: ...pragmatically, one of the nice things with $_ is all the places it can be skipped :) | |||
22:26
Ven joined
|
|||
Ven | masak: that might be true, but I still think I need to explain it at some point. | 22:26 | |
masak | *nod* | ||
Ven | alright, let me check the order I've left it in. | ||
masak | just letting you know it stood out. | 22:27 | |
lue | masak: I personally tend to write $_ , I happen to like how it says "GENERIC VALUE HERE" :) | ||
FROGGS | gnight | ||
masak | beyond that, it's a pity that the syntax highlighting and the lines overflowing their parent container horizontally conspire against your excellent content. | ||
timotimo | aye | ||
masak | night, FROGGS++ | ||
timotimo | gnite froggs | 22:28 | |
Ven | 'night FROGGS :). | ||
masak: I kinda need to explain it here. I'll do it better, though. It used to be before, explained with blocks, but I've moved them down, since I needed if/for/operators out of the way | |||
timotimo | maybe it'd be a neat thing to have a find, rename and ack that supports p6 regex | ||
22:28
ventica joined
|
|||
ventica | . | 22:29 | |
lue | timotimo: it'd be nice to get most things to dump their old P5-inspired regexes for P6-inspired ones :) | ||
masak | Ven: consider why you feel fine with `when /foo/` but not `when .chars > 50` | ||
Ven: the former elides $_, the latter doesn't. | |||
Ven | I probably don't even explain the no-topic form, hmm. | ||
timotimo | lue: not that easy to do :P | ||
lue still thinks // matchers shouldn't clobber $_, grumble grumble... | 22:30 | ||
or, sorry, ~~ | |||
~~ is the one that's to blame for clobbering :) | |||
Ven | $_, "implicit variable" ? Not sure using "implicit argument" makes sense with given | ||
masak | lue: "clobbering" tends to imply that things aren't local and don't return to normal after the operation. | 22:31 | |
Ven: "the topic variable" | |||
lue | masak: "clobber" in the sense that I lose access to $_ within the // in $thing ~~ /match stuff {something with $_}/ | 22:32 | |
masak | lue: well, you would anyway, since any block that mentions $_ will get it as an (implicit) parameter. | ||
m: my &b = { say "OH HAI, $_ }; &b('world') | 22:33 | ||
camelia | rakudo-moar 189d1c: OUTPUT«===SORRY!=== Error while compiling /tmp/X9u_pWUKaoUnable to parse expression in double quotes; couldn't find final '"' at /tmp/X9u_pWUKao:1------> my &b = { say "OH HAI, $_ }; &b('world')⏏<EOL> expectin…» | ||
lue | and IIRC no amount of OUTER:: or CALLER:: would get me the $_ I wanted to use. | ||
masak | m: my &b = { say "OH HAI, $_" }; &b('world') | ||
camelia | rakudo-moar 189d1c: OUTPUT«OH HAI, world» | ||
masak | lue: ^ | ||
same rule holds with a block in a regex. | |||
so it's not //'s fault, nor ~~'s. | |||
lue | r: given 42 { say "4242".match(/$_ ** 2/); say "4242" ~~ /$_ ** 2/ } | 22:34 | |
camelia | rakudo-{parrot,jvm,moar} 189d1c: OUTPUT«「4242」Nil» | ||
lue | I prefer .match's handling to // here | ||
Ven | masak: just commited what I think are better explanations :). | 22:37 | |
I'm happy, because I've only gotten good feedback so far | |||
ventica | Ven: If you want, I can just roast you... :P | 22:38 | |
masak | Ven: the && and || results look wrong to me | ||
m: say 3 && 4 | |||
camelia | rakudo-moar 189d1c: OUTPUT«4» | ||
ventica | "What a total CRAP tutorial! My God! Who wrote this piece of garbage???!?" | 22:39 | |
:P | |||
masak | Ven: notice that the result is actually not True, but 4. | ||
m: say 0 || False | |||
camelia | rakudo-moar 189d1c: OUTPUT«False» | ||
masak | Ven: that one is right. | ||
Ven: do you make a distinction between True and truthy? | |||
Ven | I should. | ||
masak | aye, I think so. | 22:40 | |
ventica | isn't 3 && 4 the same as all(3,4) ? | ||
oh, that's single-ampersand | |||
3 & 4 | |||
right? | |||
masak | ventica: right. | ||
ventica: 3 & 4 is a junction, which "keeps" both values around. | |||
ventica | hmm | ||
masak | ventica: 3 && 4 evaluates to a single value (4). | ||
ventica | but isn't && a bool? | ||
Ven | no, not really | 22:41 | |
masak | no, it's happy with any type. | ||
ventica hits the books re. && | |||
masak | it *treats* the values as booleans, for a while, but it keeps the originals. | ||
in C, you'd see C "flatten" the original values to 0 or 1. | |||
ventica | aha | ||
masak | Perl (5 or 6) doesn't roll like that. | ||
ventica | 4 || 0 -----> 4 then? | 22:42 | |
Ven shudders thinking about php's behavior :P | |||
ventica | in P5, I only used "or" | ||
I didn't like || | |||
timotimo | Ven: how does php behave in that case? | ||
masak | ventica: heh, I ranted against that use of "or" the other day ;) | ||
Ven | timotimo: it only returns true or false. Never an operand | ||
timotimo | ah | ||
masak | ventica: if you only use "or", you have to use a whole lot of parentheses. | ||
Ven | which makes it 100 times less powerful than every other language therei s | 22:43 | |
masak | PHP :( | ||
lue | I like to think that PHP is a good counterargument to anyone's complaints that Perl 6 shouldn't be making so many breaking changes :) | 22:44 | |
masak | Ven: `-> $a, b { $ b / $a }` -- you got an extra space there, `$ b` | 22:45 | |
timotimo | please elaborate? | ||
masak | Ven: and missing a `$` in the parameter list near `b` | ||
Ven | masak: timotimo++ reported that already. I fixed the spacing too, it's just not updated | ||
itz_ | hmmm should the p6doc source be less than 80 cols or should a formatter be used as part of the command I wonder? | ||
lue | timotimo: as I understand it, the underlying problem with PHP is that it never ever ever changes the behavior of old stuff, to be compatible or something. | ||
itz_ | or maybe people don't care about < 80 cols anymore? | ||
Ven | lue: oh, that's wrong, they've done it | 22:46 | |
timotimo | lue: i thought you'd say something like "php breaks things all the time" | ||
Ven | I've worked on some phpbb code, from 2002-2006, and it's been breaking :P | ||
ventica | itz_: It will come back in vogue once we're all doing all doing our builds on our smartphones... | ||
masak | I can confirm that PHP breaks backwards compatibility. | 22:47 | |
22:49
nbrown joined
|
|||
masak | Ven: the /!\ is cute. I'll have to remember that. | 22:49 | |
m: say "\ " | |||
camelia | rakudo-moar 189d1c: OUTPUT« » | ||
Ven | masak: heheheheh | ||
BenGoldberg | Ven, perl's '&&' operator can be thought of as being 'if' in disguise :) | ||
lue | Hm. Maybe I'm misremembering how PHP refuses to have consistency... | ||
Ven | I actually broke the document before because that line ended with /!\, and \" didn't quite work out | 22:50 | |
ventica | programming in PHP is punishment IMO... I've only dabbled in it and ran away screaming | ||
Ven | what I don't like about our falsey stuff is that: | ||
m: say so "0"; say so "0.0"; say so 0; say so 0.0 | |||
camelia | rakudo-moar 189d1c: OUTPUT«FalseTrueFalseFalse» | ||
ventica | It's like BASIC... but less logical | 22:51 | |
ventica doesn't really think BASIC is logical... | |||
22:51
nbrown_ joined
|
|||
masak | Ven: I was sure you'd mention that postfixes have to come *directly* after the term, with no intervening whitespace... | 22:52 | |
Ven | and that infixes need space | ||
masak | they don't, not in the general case. | ||
Ven | they should :P | ||
masak | but put them in, because the community says so. | ||
22:53
nbrown left
|
|||
masak | m: say 2+2 | 22:53 | |
camelia | rakudo-moar 189d1c: OUTPUT«4» | ||
Ven | yeah, sure, except for the basic stuff :) | ||
lue | The only place I don't generally put spaces around infix ops is .= , but that's because I see it as a special kind of method call, rather than an infix assignment | ||
jnthn | Fun fact: .= is parsed in two different ways depending on if you put whitespace around it or not. | 22:54 | |
masak | Ven: '# needs the parentheses because it's a scalar' -- I felt confused by this one. sure you could name it &r and then just call it with `r;`, but that IMO has nothing to do with scalars. | ||
Ven | jnthn: I actually know that rule from a language that stole `.=` :P | ||
ventica | jnthn: One is concat and the other method invocation, correct? | 22:55 | |
lue | ventica: nope | ||
Ven | masak: I'm not really considering "&r" to be a scalar here, though | ||
ventica | :\ | ||
lue | ~= is concatenation | ||
ventica | oh oh yeah | ||
see, there's my P5 brain... :P | |||
22:55
nbrown_ left
|
|||
masak | Ven: just noting my confusion at the comment. | 22:56 | |
22:56
rurban1 joined
|
|||
masak | Ven: it says '- Reduce meta-operator' but then there's no explanation of it. and the comments above make it seem like you'd introduce several meta-operators, but I see none. | 22:57 | |
Ven | masak: taht's a todo | ||
masak | ok. | ||
Ven | There's only so much I did atm. Still a loooong way to go ... | ||
jnthn | ventica: iirc, one is parsed as a postfix (no space), the other as an infix meta-op | 22:58 | |
ventica | hrm... will have to defer grokking that for now... | 22:59 | |
@jnthn | |||
masak | Ven: "`ff` (flip-flop) and `fff` (flip-flop)" -- that reads funny. | 23:00 | |
Ven: maybe call them "awk flip-flip" and "sed flip-flop" or something? | |||
Ven | hehe :p. copy paste fail | ||
flip flop and flip flop range are the spec name | |||
TimToady | it's kinda funny to compare them to Ruby's .. and ... when Ruby stole those straight out of Perl 5 :) | 23:01 | |
ventica | OT question for those that have been talking abt Perl6 outside of the US... how do you judge interest in Perl6 (and non-MS/Google languages generally) by non-US people versus US people? | ||
Ven | TimToady: I'm not *comparing* them. I'm saying "you might've seen them in" | ||
masak | Ven: I don't find the name "flip flop range" in S03. | ||
Ven: do you have a reference for me? | 23:02 | ||
TimToady understands there may be people coming from other langauges than Perl 5 too :) | |||
languages even | |||
Ven | masak: maybe my memory is fuzzy? Maybe TimToady++ can confirm ? | ||
TimToady | Used to be I couldn't spell lingrist, and now I are one. | ||
jnthn | ventica: I do the vast majority of my Perl 6 talking outside of the US :) | ||
masak | Ven: don't change it to "flip flop range" until you can confirm it somehow ;) | 23:03 | |
Ven | masak: well, they're both named "flipflop ranges", actually | ||
lue | .oO(LAN gauges) |
||
masak | Ven: `for (1, 3, 60, 3, 40, 60) {` -- superstitious parens. | ||
Ven | but the fff one is "flipflop ranges (sed style)" | ||
jnthn | ventica: Even within Europe there's plenty of variety in technology choice. | ||
masak | Ven: that's why I suggested "awk/sed flipflop" | ||
23:04
nbrown joined
|
|||
jnthn | ventica: Sweden is a bit of an MS hotbed. I teach C# here. Mostly I teach folks to write C# as if it were Perl 6, but don't tell them that... :P | 23:04 | |
masak | Ven: EOF. thanks for some interesting reading. | ||
jnthn | ventica: Whereas Norway, just to the north, is far less MS Centric. Loads of Java... | ||
Ven | masak: general afterthought ? Not too hard to stomach ? | ||
itz_ | there seems to be most perl6 interest outside UK and US I'd guess | ||
jnthn | You can kinda see it in the Perl community sizes in various countries, also. | 23:05 | |
lue | jnthn: isn't norway the number one world consumer of coffee? :P | ||
jnthn | And what conf talks happen | ||
masak | Ven: you're asking the wrong enthusiast :) | ||
jnthn | Like, Polish Perl Workshop was mostly Perl 6 talks :) | ||
lue: I dunno, but Sweden is the number one at eating bananas | |||
Ven | masak: indeed. I'm a bit wary it's a looot of informations for a newcomer ... | ||
masak | Ven: that's not necessarily a bad thing. | 23:06 | |
Ven: I like that you have many concrete examples along the way. | |||
Ven: some of which I hadn't seen before. | |||
Ven++ | |||
Ven | really :P ? | ||
masak | yes, I can tell you've spent some time on this. | ||
Ven | (I meant WRT "some of which I hadn't seen before") | 23:07 | |
ventica | jnthn: thanks for that info... I spend almost all my time in the US and whenever I travel abroad the #1 thing that strikes me is just how much of an echo chamber I live in... | 23:08 | |
masak | Ven: I liked that [5] came out meaning 5 ** 5 :) | ||
23:08
nbrown left
|
|||
masak | 'night, #perl6 | 23:10 | |
TimToady | HELLO! Hello...hello...ₕₑₗₗₒ | ||
Ven | 'night :) | ||
ventica | masak: night o/ | 23:13 | |
23:19
aoseki joined,
ggoebel111117 joined
23:21
charsbar_ joined
23:22
mattp__ joined,
tempire_ joined,
avuserow_ joined,
[Coke]_ joined
23:23
rurban1 left
23:24
rjbs- joined,
Rounin_ joined
23:25
sunnavy joined,
yeltzooo4 joined
23:28
sftp_ joined
23:29
raiph left,
ggoebel111116 left,
treehug88 left,
akaseki left,
tempire left,
avuserow left,
yakudza left,
sftp left,
ribasushi left,
Rounin left,
yeltzooo left,
[Coke] left,
charsbar left,
sunnavy_ left,
mattp_ left,
Bucciarati left,
rjbs left,
eMBee left,
Alula_ left,
sftp_ is now known as sftp,
Bucciarati joined
23:31
yakudza joined,
eMBee joined,
ribasushi joined
|
|||
carlin | uhhh.... | 23:38 | |
I think rand() on OpenBSD won't return two odd or even numbers in a row | 23:39 | ||
is that normal? | |||
23:39
thou left
|
|||
ventica | carlin: I don't know if it's normal, but it's definitely wrong :P | 23:40 | |
dalek | p: 53769e5 | jnthn++ | tools/build/MOAR_REVISION: Get Moar with extop changes, leak fixes. |
23:42 | |
kudo/nom: 506aae5 | jnthn++ | / (2 files): Get latest MoarVM; remove nasty hack in ext ops. |
23:43 | ||
timotimo | this commit also removes a nasty typo | 23:44 | |
carlin | I might be completely off-base | 23:45 | |
but it does definitely look like the first call of rand() is odd or even, and the second call is always the opposite | |||
and mp_rand calls rand() twice | |||
and adds them | 23:46 | ||
I think | |||
timotimo | that seems like 1 bit of randomness that's entirely predictable :( | ||
does the man page say anything about that? | |||
carlin | so the result will of rand() + rand() will always be odd | ||
timotimo | aye | ||
carlin | and that might explain why this happens: | ||
> say nqp::rand_I(2, Int) xx 40 | 23:47 | ||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | |||
> say nqp::rand_I(10, Int) xx 40 | 23:48 | ||
9 7 3 5 9 1 1 7 3 7 3 1 1 3 1 7 1 1 5 7 7 3 5 5 1 9 3 9 1 3 9 9 5 7 3 1 1 1 9 3 | |||
who needs even numbers anyway | 23:49 | ||
jnthn | carlin: groups.google.com/forum/#!msg/comp...ktGSwi2EkJ may be of interest | 23:52 | |
23:52
xragnar_ joined,
xragnar left,
xragnar_ is now known as xragnar
|
|||
jnthn | rosettacode.org/wiki/Random_number_...ncluded)#C also | 23:53 | |
timotimo | someone could write a mersenne twister implementation; it's in the most wanted anyway :) | 23:54 | |
23:55
hoverboard is now known as ConanTheBrbrian,
kivutar left
23:58
Ven left
|
|||
ventica | BTW, I ran into a rand() bug like this on a diff project when inadvertently using float rand() instead of int rand() | 23:58 | |
jnthn | Sleep time; 'night | ||
ventica | worth looking into | ||
timotimo | gnite jnthn! | ||
ventica | jnthn o/ |