»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
azawawi | consider running farabi6 inside a directory with fewer files/directories... i.e. not $HOME | 00:00 | |
to test open file "autocomplete" feature | |||
sorear: Hi. How safe is {Niecza --safe}? | 00:02 | ||
00:03
cognominal left
00:04
sftp joined
|
|||
azawawi | remind me again, where is the rakudo perl 6 safe mode code? | 00:08 | |
nevermind, found it... github.com/moritz/try.rakudo.org/b.../p6safe.pl | 00:09 | ||
sorear | Niecza --safe is a quick hack and should never be used to protect a valuable system; it operates at far too high a level | 00:10 | |
properly sandboxing perl 6 should be done at the VM level or below (ideally seccomp) | 00:11 | ||
tadzik | azawawi: I don't think that's the way to do it | ||
there is SAFE.setting for this these days | |||
github.com/rakudo/rakudo/blob/nom/...FE.setting | |||
which apparently is deprecated in favor of github.com/rakudo/rakudo/blob/nom/...ED.setting | 00:12 | ||
azawawi | :) | ||
i think the wording 'restricted' is better than 'safe' | |||
00:13
cognominal joined
|
|||
azawawi | sorear: thx | 00:13 | |
00:15
kshannon joined
|
|||
azawawi | tadzik: any idea how to use it? :) | 00:15 | |
00:15
benabik joined
|
|||
azawawi | hmm i will add $FARABI6_INSECURE which is by default disabled... | 00:18 | |
00:19
armitage81 joined
00:20
armitage81 left,
armitage81 joined
00:21
snearch left
|
|||
azawawi | FARABI6_UNSAFE=1 farabi6 # enable unsafe mode... i.e. run local code | 00:30 | |
00:38
kda left
00:53
rindolf left
00:56
daniel-s_ is now known as daniel-s
01:00
tokuhiro_ joined
|
|||
azawawi | hmmm... http::server::simple and firefox = crash | 01:02 | |
i was wondering why farabi6 kept crashing randomly | |||
01:04
bowtie left,
DarthGandalf left
01:05
Chillance left
01:07
kcwu left
01:09
DarthGandalf joined
|
|||
diakopter | I had a dream that the Rakudo team implored me to "please stop finding/submitting [WEIRD] rakudobugs" | 01:30 | |
(it was an ego-boosting dream, I guess) | 01:31 | ||
r: my $a = .HOW.new(); say $a.^methods | 01:40 | ||
p6eval | rakudo 64208d: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine' in method gist at src/gen/CORE.setting:4875 in sub say at src/gen/CORE.setting:7304 in block at /tmp/zGdVxRn9kr:1» | ||
diakopter | boo. I wanna see ClassHOW methods | 01:41 | |
r: my $a = .HOW.new(); print $a.^methods | |||
p6eval | rakudo 64208d: OUTPUT«Nominal type check failed for parameter '$got'; expected Any but got NQPRoutine instead in method REIFY at src/gen/CORE.setting:6091 in method reify at src/gen/CORE.setting:5247 in method gimme at src/gen/CORE.setting:5612 in method print at src/gen/CORE.se… | ||
01:42
fgomez left,
dayangkun joined
|
|||
diakopter | r: my $a = .HOW.new(); .($a) for $a.^methods | 01:43 | |
p6eval | rakudo 64208d: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected in any set_invoke_forwarder at src/gen/Metamodel.pm:2207 in block at /tmp/WcpjEgyZDO:1» | ||
diakopter | r: my $a = .HOW.new(); .($a, $a) for $a.^methods | ||
p6eval | rakudo 64208d: OUTPUT«too many positional arguments: 2 passed, 1 expected in any archetypes at src/gen/Metamodel.pm:2203 in block at /tmp/id6bir1sfS:1» | ||
diakopter | set_invoke_forwarder and archetypes seem pretty leaky to me. | ||
phenny: tell masak please see here VVDKVMLRSNCD in the logs | |||
phenny | diakopter: I'll pass that on when masak is around. | ||
azawawi | feather.perl6.nl:3030/ # Farabi6 with the new Run dialog and Open dialog... feedback appreciated... Firefox crashes HTTP::Server::Simple server... hence please use Chrome or something else... Have fun | 01:47 | |
farabi6 server now restarts itself... just in case :) | 01:49 | ||
azawawi sleep & | 01:54 | ||
01:54
azawawi left
01:55
fgomez joined
01:59
hypolin joined
|
|||
skids | gist.github.com/4014812 # workaround for crony roles used more than once | 01:59 | |
02:03
kcwu joined
02:06
chee joined
02:15
leont left
02:22
whiteknight left
02:28
sizz_ joined,
sizz left
02:30
cognominal left
02:32
armitage81 left
02:37
tokuhiro_ left
02:55
araujo left
02:57
araujo joined
03:26
fgomez left,
dayangkun left
03:34
dayangkun joined
03:35
dayangkun left
03:36
dayangkun joined
04:11
raiph joined
|
|||
raiph | phenny, tell azawawi Syntax Check (F6) seems to do nothing; Rakudo and Niecza give "ENV{FARABI6_UNSAFE} is not enabled"; If I click in text area when a menu (File, Build...) is dropped, that menu disappears and will no longer drop. (Have to refresh page to clear.) (From Chrome's about: "10.0.648.82 (75062) Built on Joli OS 1.2, running on Joli OS 1.2") | 04:33 | |
phenny | raiph: I'll pass that on when azawawi is around. | ||
raiph | exit | 04:34 | |
heh. goodnight #perl6... | 04:35 | ||
04:35
raiph left
04:44
havenn joined
05:10
plobsing left
05:23
telex left
05:25
telex joined
05:30
telex left
05:37
telex joined
05:52
fgomez joined
05:57
SamuraiJack joined
06:24
araujo left,
kaleem joined
06:30
skids left
06:37
araujo joined
06:38
havenn left
06:50
azawawi joined
07:09
havenn joined
07:18
havenn left
07:34
bonsaikitten left
07:35
bonsaikitten joined
07:38
domidumont joined
|
|||
azawawi | hi | 07:43 | |
phenny | azawawi: 04:33Z <raiph> tell azawawi Syntax Check (F6) seems to do nothing; Rakudo and Niecza give "ENV{FARABI6_UNSAFE} is not enabled"; If I click in text area when a menu (File, Build...) is dropped, that menu disappears and will no longer drop. (Have to refresh page to clear.) (From Chrome's about: "10.0.648.82 (75062) Built on Joli OS 1.2, running on Joli OS 1.2") | ||
07:44
domidumont left
|
|||
moritz | \o | 07:45 | |
phenny | moritz: 04 Nov 01:38Z <[Coke]> ask moritz you added S03-operators/andthen.t to rakudo's spectest - did you forget to push the test file? | ||
moritz | seems like, yes | 07:46 | |
azawawi | phenny: tell raiph 1. very old chrome version, F6 at the moment does not do anything when there is no error. Try it with some errors in it. You can install Farabi6 to test it on your machine and set FARABI6_UNSAFE=1 | ||
phenny | azawawi: I'll pass that on when raiph is around. | ||
azawawi | moritz: hi | ||
moritz | unfortunately I just moved to a different flat, and won't have internet access until 2012-11-12 or so | ||
hi azawawi | 07:47 | ||
azawawi | Niecza wins on ease of installation (provided you install mono first... a lot of time wasted there) | 07:51 | |
Rakudo wins on completeness and modules support.. You lose a lot of time building a rakudo star though | 07:52 | ||
std on the near perfect error message support. make takes a bit of time though. TimToady++ | |||
bonsaikitten | azawawi: both are trivial to install | ||
azawawi | im thinking from a user's point of view | 07:53 | |
how much time is spent doing task X before using starting with real programming perl6 task | |||
moritz | we really want to do be able to install it with 'apt-get install rakudo' | 07:54 | |
and on windows there's an .msi | |||
bonsaikitten | "emerge niecza rakudo" <-- problem solved ;) | ||
azawawi | installation time... apt-get solves it... emerge = build time | 07:55 | |
07:55
hoelzro|away is now known as hoelzro
|
|||
bonsaikitten | azawawi: only if you don't have binpkgs already (and apt-get is really bad with some common issues) | 07:55 | |
azawawi | bonsaikitten: true but a binary package is really handy... | 07:56 | |
bonsaikitten | azawawi: takes me 8 minutes to build *and* run tests | 07:57 | |
azawawi | moritz: how do i get the p6doc index? i need it for help index autocompletion and F1 context help | ||
bonsaikitten | azawawi: that's a tolerable tradeoff if I get a recent version out of it | ||
azawawi | programmers are lazy... :) | 07:58 | |
azawawi is building rakudo on feather3 for farabi6 auto deployment | 07:59 | ||
moritz | azawawi: the best option is probably to hack htmlify to dump the index as .json or so | ||
jnthn | morninä | ||
.oO( this is not the keyboard layout you are looking for ) |
08:00 | ||
moritz | \o | 08:01 | |
azawawi | moritz: github.com/perl6/doc/blob/master/htmlify.pl , right? | ||
moritz | right | ||
jnthn | moritz: oh noes no internets?! | ||
Hope you survive :) | 08:02 | ||
azawawi | he did it before if i remember correctly :) | ||
08:04
fhelmberger joined
|
|||
sorear | o/ jnthn | 08:07 | |
azawawi | is there a plan/grant to upgrade feather.perl6.nl? | ||
jnthn | hi, sorear | 08:08 | |
sorear | feather is a commons sort of thing | ||
a large number of people are authorized to update it | |||
so, nobody does | |||
08:10
havenn joined
|
|||
azawawi | sorear: hardware that is... | 08:10 | |
moritz: what happened to try.rakudo.org? maintenance problems? | 08:13 | ||
moritz | jnthn: only internets at $work | ||
azawawi: yes; somhow the server hangs up after a few days | 08:14 | ||
azawawi: and too few people know how to restart it | |||
08:14
havenn left
|
|||
sorear | is farabi a js app? | 08:15 | |
moritz: phew, good to know you won't be going completely dark :D | 08:16 | ||
jnthn | Seems it's about time to start teaching here. bbl :) | ||
azawawi takes a look at try.rakudo.org | 08:18 | ||
we have great perl6 evalbot here but nothing exposed to the outside world | 08:19 | ||
s/evalbot/eval bots/ | |||
sorear | azawawi: what is farabi implemented in? | 08:20 | |
azawawi | sorear: farabi6 => perl6 + js frontend | ||
sorear: farabi (perl 5): perl + mojo + js frontend | |||
sorear | azawawi: I wonder how feasible it would be to run niecza on the client using Silverlight and broker communications through js | 08:21 | |
azawawi | sorear: interesting | ||
sorear: i have done a lot as3 flash programming but silverlight nothing atm | 08:22 | ||
sorear: s/a lot/a lot of/ | |||
08:24
mhasch joined,
domidumont joined
08:55
sorenso joined,
PZt left
08:58
domidumont left
08:59
domidumont joined
09:05
sorenso left
09:06
sorenso joined
09:10
havenn joined
09:11
Rix left
09:12
Rix joined
09:15
havenn left
09:21
dayangkun left
09:28
flightrecorder joined
09:33
imarcusthis left
09:36
imarcusthis joined
09:48
kresike joined
|
|||
kresike | hello all you happy perl6 people | 09:48 | |
09:48
circlepuller left
|
|||
tadzik | hey kresike | 09:49 | |
kresike | tadzik, o/ | ||
09:54
circlepuller joined
09:56
azawawi left
10:02
azawawi joined
10:03
leont joined
10:07
leont left
10:08
hypolin left
|
|||
masak | morning, #perl6 | 10:11 | |
phenny | masak: 01:43Z <diakopter> tell masak please see here VVDKVMLRSNCD in the logs | ||
10:11
havenn joined
|
|||
masak | (it's OK, I read all of the logs) :) | 10:11 | |
10:11
fhelmberger left
|
|||
azawawi | star: "Howdy".say; | 10:15 | |
p6eval | star 2012.10: OUTPUT«(timeout)» | ||
10:16
havenn left
|
|||
azawawi | star: "Test".say; | 10:18 | |
p6eval | star 2012.10: OUTPUT«Test» | ||
10:22
sorenso left
10:30
hoelzro left
10:31
hoelzro joined
|
|||
masak backlogs | 10:31 | ||
10:31
cognominal joined
|
|||
moritz | star: "Howdy".say; | 10:34 | |
p6eval | star 2012.10: OUTPUT«Howdy» | ||
masak | r: my $a = .HOW.new(); .($a) for $a.^methods | ||
p6eval | rakudo 64208d: OUTPUT«PackFile_unpack: Buffer length 0 is shorter than PACKFILE_HEADER_BYTES 18.current instr.: '' pc 4075 (src/gen/perl6-moduleloader.pir:1632) (src/Perl6/ModuleLoader.pm:256)called from Sub '' pc 4235 (src/gen/perl6-moduleloader.pir:1692) (src/Perl6/ModuleLoader.pm:2… | ||
masak | r: my $a = .HOW.new(); .($a, $a) for $a.^methods | ||
p6eval | rakudo 64208d: OUTPUT«PackFile_unpack: Buffer length 0 is shorter than PACKFILE_HEADER_BYTES 18.current instr.: '' pc 4075 (src/gen/perl6-moduleloader.pir:1632) (src/Perl6/ModuleLoader.pm:256)called from Sub '' pc 4235 (src/gen/perl6-moduleloader.pir:1692) (src/Perl6/ModuleLoader.pm:2… | ||
masak | <diakopter> set_invoke_forwarder and archetypes seem pretty leaky to me. | ||
no, I think that's what the methods you're calling might be called. | 10:35 | ||
oh, the above executions failed. wonder why. | |||
10:36
sorenso joined
10:39
PZt joined,
azawawi left
10:49
azawawi joined
10:53
am0c joined
|
|||
azawawi | feather.perl6.nl:8080 # F6 syntax check fixed, Run dialog is more cool :) | 10:55 | |
masak finds the page en.wikipedia.org/wiki/Egbert_B._Gebstadter hilarious | 11:01 | ||
11:01
gootle left
11:11
havenn joined
11:17
havenn left
11:19
hoelzro is now known as hoelzro|away,
arlinius left
11:36
SmokeMachine left,
fgomez left
11:39
SmokeMachine joined
11:48
xdbr joined
11:50
fhelmberger joined
11:52
chee left
11:55
chee joined
11:59
hoelzro|away is now known as hoelzro
12:12
havenn joined
12:17
havenn left
12:22
tokuhiro_ joined
12:34
azawawi left
12:35
bluescreen10 joined,
Psyche^ joined
12:38
Patterner left,
Psyche^ is now known as Patterner
12:43
brrt joined
12:52
cognominal left
12:53
cognominal joined
|
|||
felher | masak: thanks for the pointer to your discussion with TimToady. It answered exactly my question :) | 12:58 | |
masak | nice. glad to hear it. | ||
it's part of an intermittent discussion that stretches over several months. | 12:59 | ||
13:00
ponbiki left
13:01
ponbiki joined,
ponbiki is now known as Guest20434
|
|||
felher | masak: btw: I wasn't sure how to translate your 'I don't think it's at all unreasonable'. Does this mean "It's not completely unreasonable" (my first guess) or "It's totally reasonable" ? (not that it would make a difference. I'm just curious ) | 13:07 | |
13:07
grondilu joined
|
|||
felher | this certainly has to do with my english rather than with your sentence :) | 13:08 | |
felher afk for a while | 13:12 | ||
masak | felher: "I think the reasonableness is very far from the setting 'unreasonable' (i.e. quite reasonable)" | ||
r: macro capture-output($code) { my $result; my $out; quasi { $result = ""; $out = $*OUT; $*OUT = class { method print(*@args) { $result ~= @args.join } }; {{{$code}}}; $*OUT = $out; $result } }; my $s = capture-output say "OH HAI"; print $s | |||
p6eval | rakudo 64208d: OUTPUT«OH HAI» | ||
masak | this is way cool. | ||
moritz | masak++ | 13:13 | |
13:13
havenn joined
|
|||
masak | I had written this example off as a case of "Better Written As Sub"... but now that I implement it, I see that it's not. just like with the logging example, the 'say "OH HAI"' is bare. it can't be bare with subs. | 13:13 | |
now what I *didn't* show is how I had to try the above in 10 different ways and ran into three different macro-related bugs on the way. :P | |||
arnsholt | =D | 13:14 | |
masak | the first one is related to using 'temp' inside of a macro. | ||
moritz | it's like November 2009 again, but with macros this time :-) | ||
arnsholt | And in theory this shold work as capture-output { ... } right? | ||
masak | arnsholt: if you do it as a sub, you'd do it with the curlies, yes. | 13:15 | |
moritz | masak: it's basically a custom phaser | ||
with macros | |||
r: BEGIN say 42; | |||
p6eval | rakudo 64208d: OUTPUT«42» | ||
masak | r: macro foo { quasi { temp $*OUT } }; foo | 13:16 | |
p6eval | rakudo 64208d: OUTPUT«Null PMC access in elements() in sub prefix:<temp> at src/gen/CORE.setting:11961 in at /tmp/XCSZksD14I:1 in block at /tmp/XCSZksD14I:1» | ||
masak submits rakudobug | |||
arnsholt | masak: How about macro with more than a single statement? | 13:17 | |
13:17
havenn left
|
|||
masak | arnsholt: we can only pass terms to macros at present. | 13:17 | |
arnsholt | Right =) | ||
brrt | i have some Very Interesting Behavior, although it is correct afaik | ||
masak | arnsholt: however, if you put parens or curlies around your statements... | ||
brrt | nr: sub foo { return { say "OH HAI"; return 42; }; }; foo().(); | 13:18 | |
p6eval | niecza v22-16-g4c016f5: OUTPUT«OH HAIUnhandled exception: Illegal control operator: return at /tmp/hVv4WvilD8 line 1 (ANON @ 6)  at /tmp/hVv4WvilD8 line 1 (mainline @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line … | ||
..rakudo 64208d: OUTPUT«OH HAIAttempt to return outside of any Routine in block at src/gen/CORE.setting:466 in block at /tmp/0esC6gtKK2:1» | |||
masak | brrt: yes, it's correct. | 13:19 | |
brrt: in short, bare blocks don't bind 'return'. | |||
so your inner return ends up binding to 'foo'. | 13:20 | ||
13:20
GlitchMr joined
|
|||
masak | which has already returned by the time the inner block runs. so the error message is correct. | 13:20 | |
moritz | and by the time you run the inner block, &foo already has returned | ||
moritz too slow | |||
brrt | yes, now, what happens if i call it in another dynamic context? | ||
moritz | r: sub foo { return { say "OH HAI"; return 42; }; }; try foo().(); say $/.WHAT | 13:21 | |
p6eval | rakudo 64208d: OUTPUT«OH HAIAny()» | ||
moritz | r: sub foo { return { say "OH HAI"; return 42; }; }; try foo().(); say $!.WHAT | ||
p6eval | rakudo 64208d: OUTPUT«OH HAIX::ControlFlow::Return()» | ||
13:21
bowtie joined
|
|||
moritz | r: sub foo { return { say "OH HAI"; return 42; }; }; sub bar { try foo().(); say $!.WHAT }; bar() | 13:21 | |
p6eval | rakudo 64208d: OUTPUT«OH HAIX::ControlFlow::Return()» | ||
moritz | brrt: same thing | ||
masak | r: sub foo { bar({ return 42 }); return 3 }; sub bar(&c) { c }; say foo | ||
brrt | r: sub foo { return { say "OH HAI"; return 42; } }; sub bar { foo().(); } | ||
p6eval | rakudo 64208d: OUTPUT«42» | ||
rakudo 64208d: ( no output ) | |||
masak | I believe the first output is mine. | ||
and it prints what I expected. | 13:22 | ||
brrt | it is expected, but madness | ||
masak | that is, you can *return* from a subroutine that's above your currently executing subroutine in the call stack. | ||
it's not madness. it's just regular exceptions. | |||
moritz | I think that's a bug. | ||
masak | I don't. | ||
moritz | return is supposed to be tied to the outer lexical routine | 13:23 | |
masak | it is. | ||
that's why you see this behavior. | |||
the 'return 42' in &foo binds to &foo. | |||
flussence | oh, I did a hackish $*OUT capture thing a long time ago, if you see any useful ideas there feel free to steal 'em - gist.github.com/1606837 | ||
moritz | masak: oh, I was confused | ||
flussence | (I was thinking, maybe Cat should have IO methods on it...) | ||
masak | moritz: for a little while there I thought we were disagreeing on something. then normality returned. :P | 13:24 | |
brrt | masak: returns and exceptions, that weird | 13:25 | |
GlitchMr | This channel is always active ;-) | ||
brrt | exceptions are weird in their own right, but return-as-an-exception | ||
its easy in continuations, i guess | |||
masak | brrt: how would you implement it? :) | ||
brrt | well, i would create it by making the inner block a lambda with a fixed continuation - that of foo, determined at run time | 13:26 | |
so it would do the same thing | |||
masak | brrt: or rather, if you accept that exceptions allow you to effectively return from several routines at once, why don't you like it when &return does? | ||
brrt | masak, mostly because return means a simpler thing in the c world | 13:27 | |
masak | "Toto, I don't think we're in C-land anymore" | ||
brrt | this being perl6 i should not at all be surprised by finding there is more than one way to do it | ||
masak | r: macro foo { quasi { my &bar = { say "OH HAI" }; bar } }; foo | 13:36 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&bar' called (line 1)» | ||
masak | r: macro foo { quasi { my &bar = { say "OH HAI" }; &bar() } }; foo | ||
p6eval | rakudo 64208d: OUTPUT«Cannot assign into a PMCNULL container in at /tmp/GfBF7Zue77:1 in block at /tmp/GfBF7Zue77:1» | ||
masak submits rakudobug | |||
none of this is surprising, of course, since we already know variable declarations don't work properly in macros. | 13:37 | ||
er, in quasi blocks, I mean. | |||
r: macro foo { quasi { my $bar = "OH HAI"; say $bar } }; foo | 13:38 | ||
p6eval | rakudo 64208d: OUTPUT«Cannot assign into a PMCNULL container in at /tmp/euDdsux_9o:1 in block at /tmp/euDdsux_9o:1» | ||
masak | r: macro foo { quasi { my $bar; say $bar } }; foo | ||
p6eval | rakudo 64208d: OUTPUT«Mu()» | ||
masak | sorry; declarations work. assignments somehow don't. | ||
assignments to locally declared variables, that is. | |||
moritz | remember --ll-exception when debugging :-) | 13:39 | |
masak | thanks for le reminder :) I need it. | 13:40 | |
r: macro foo { my $bar = "OH HAI"; quasi { say $bar } }; foo | |||
p6eval | rakudo 64208d: OUTPUT«OH HAI» | ||
masak | r: macro foo { my &bar = { say "OH HAI" }; quasi { &bar() } }; foo | ||
p6eval | rakudo 64208d: OUTPUT«OH HAI» | ||
masak | r: macro foo { my &bar = { say "OH HAI" }; quasi { bar } }; foo | ||
p6eval | rakudo 64208d: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&bar' called (line 1)» | ||
masak | huh! | 13:41 | |
I wonder if that's a different failure mode, or the same one. | |||
moritz | r: macro foo { sub bar { say "OH HAI" }; quasi { &bar() } }; foo | 13:42 | |
p6eval | rakudo 64208d: OUTPUT«OH HAI» | ||
masak | r: macro foo { sub bar { say "OH HAI" }; quasi { bar } }; foo | 13:43 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&bar' called (line 1)» | ||
masak | well, it's consistent, at least. | ||
[Coke] | I made very little (but some!) progress on muddle this weekend, taking the little bit of functionality that was there and putting a slightly nicer skin on it | 13:45 | |
feather.perl6.nl:2653/ | |||
masak | nice. [Coke]++ | ||
flussence | [Coke]++ | 13:46 | |
[Coke] | Hopefully by the end of the week, it'll be functional enough that we can add a make target to rakudo or niecza to submit reports. | ||
Thanks to me from a year ago, since dropping in twitter bootstrap is a pretty easy upgrade. :) | |||
flussence | how fast is it? one of the big problems with smolder was that it collapses if you look at it funny... | 13:47 | |
brrt | basically, 'take' both yields its value and returns, right? | 13:49 | |
so my $x = take 3; sets $x to 3? | 13:50 | ||
[Coke] | It's a mojolicious app - right now I'm running it under morbo, but we could shove it into a more robust container. | ||
brrt | r: my $x = take 3; say $x; | ||
p6eval | rakudo 64208d: OUTPUT«take without gather in block at src/gen/CORE.setting:429 in block at src/gen/CORE.setting:478 in block at /tmp/fBpNUYcX69:1» | ||
flussence | [Coke]: should be pretty fast then :) | ||
[Coke] | it's also using sqlite3, because that's zero install and I can run it anywhere. We can add another backend if there's a better choice on feather. (or wherever.) | ||
13:53
cognominal left
|
|||
moritz | (starting simple)++ | 13:54 | |
13:55
bluescreen10 left
|
|||
masak | r: my @a = gather { say take 3 }; | 13:57 | |
p6eval | rakudo 64208d: OUTPUT«0» | ||
masak | brrt: that's interesting. | ||
flussence | mojolicious (and other stuff like it) seem perfect for this sort of thing - replacing a flaky old web service with one that actually works. I've done it a few times at $dayjob already. | ||
masak | what does the 0 mean? | ||
r: my @a = gather { say take 3; say take 42 }; | |||
p6eval | rakudo 64208d: OUTPUT«00» | ||
masak | n: my @a = gather { say take 3; say take 42 }; | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«Potential difficulties: @a is declared but not used at /tmp/YeVGB755T9 line 1:------> my ⏏@a = gather { say take 3; say take 42 };342» | ||
masak submits rakudobug | 13:58 | ||
n: my @a = gather { say take 3; say take 42 }; say @a.perl | |||
p6eval | niecza v22-16-g4c016f5: OUTPUT«342[3, 42].list» | ||
flussence | take returns 0? | ||
masak | n: my @ = gather { say take 3; say take 42 }; | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«342» | ||
flussence | (sometimes?) | ||
masak | flussence: in Rakudo, yes. in Niecza it gives back the value. | ||
13:58
cognominal joined
|
|||
masak | which seems much more useful. | 13:58 | |
flussence | agreed | ||
tadzik | I wonder if we can marry that and emmentaler somehow | 13:59 | |
(muddle) | |||
brrt | masak: returning the value is basically what is spec'-ed | 14:00 | |
masak | brrt: any reference to that bit of spec? | ||
(so I can include it in the RT ticket) | 14:01 | ||
brrt | s04-somewhere, will be a few minutes | ||
masak | S04:735. | 14:02 | |
brrt | perlcabal.org/syn/S04.html#The_gath...ent_prefix | 14:03 | |
masak | The value returned by the C<take> to the C<take>'s own context is that same | ||
returned argument (which is ignored when the C<take> is in sink context). | |||
brrt | say is maybe seen as sink context? | ||
flussence | r: my @a = gather { say eager take 3 }; | 14:05 | |
p6eval | rakudo 64208d: OUTPUT«0» | ||
14:05
marloshouse_ joined
|
|||
masak | brrt: no. sink context is when you don't use the value from 'take' at all. | 14:05 | |
GlitchMr | What eager take is supposed to do? | ||
14:06
marloshouse left,
marloshouse_ is now known as marloshouse
|
|||
flussence | not sink context | 14:06 | |
14:06
SamuraiJack left,
PacoAir joined
|
|||
brrt | r: say sink 3; | 14:07 | |
p6eval | rakudo 64208d: OUTPUT«Nil» | ||
[Coke] | I wonder if that's actually a Kitchen sink. it would explain a lot. | 14:09 | |
moritz | maybe it's a kitten sink | ||
brrt | that association also came to my mind | ||
perl6, comes with (kitchen) sink | 14:10 | ||
14:11
bluescreen10 joined,
tokuhiro_ left
14:13
havenn joined
14:14
cognominal left
|
|||
masak | std: KitchenSink | 14:16 | |
p6eval | std 04216b1: OUTPUT«ok 00:00 41m» | ||
masak | STD comes with a kitchen sink. | ||
std: GardenHose | |||
p6eval | std 04216b1: OUTPUT«===SORRY!===Undeclared name: 'GardenHose' used at line 1Check failedFAILED 00:00 41m» | ||
14:18
havenn left
14:28
kaleem left
14:32
plobsing joined
14:39
atrodo_ joined
14:40
kaare_ joined
14:42
atrodo left,
atrodo_ is now known as atrodo,
atrodo left,
atrodo joined,
mtk joined
14:43
sivoais left
14:46
kaleem joined
14:47
plobsing left
14:50
marloshouse left
14:54
arlinius joined
14:55
marloshouse joined
14:56
spider-mario joined
14:57
benabik left
|
|||
felher | masak: ah, okay, now i get it. Thanks :) | 14:58 | |
(About the reasonable-thingy) | |||
masak | also, your request for clarification was not at all unreasonable :P | 15:01 | |
15:04
telex left
|
|||
felher | masak: :D | 15:04 | |
15:06
telex joined
15:11
stopbit joined
|
|||
felher | oha, the capture-output macro is nice :) | 15:12 | |
15:14
havenn joined
|
|||
masak | :) | 15:14 | |
felher | masak: do you have to save $*OUT explicitly? Couldn't one just write "my $*OUT = class { ... };" ? | 15:16 | |
flussence | $*OUT is an IO object, not a string | 15:17 | |
masak | felher: that might work too, yes. | ||
15:17
brrt left,
brrt joined
|
|||
masak | r: say "before"; { my $*OUT = class { method print(*@) {} }; say "inside" }; say "after" | 15:18 | |
p6eval | rakudo 64208d: OUTPUT«beforeafter» | ||
masak | yes, that works. but probably not in quasis yet, because there seems to be something wrong with quasi { my ... } | ||
[Coke] wonders why these gists are gists and not blog posts. | |||
felher | masak: okay, nice :) | ||
[Coke] | (pointing at masak's recent blog post mentioning some gists) | ||
15:18
skids joined
15:19
havenn left
|
|||
masak | [Coke]: because gists feel like they have a smaller "contract" to be kept up-to-date, or to explain everything to an uninitiated audience. | 15:19 | |
it's as if gists are mostly for me, whereas blog posts are mostly for other people. | |||
n: my @sorted = 1, 2, 2, 2, 3, 4, 4, 5; my @uniq = gather for @sorted { state $previous = take $_; next if $_ === $previous; $previous = take $_ }; say @uniq | 15:21 | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«1 2 3 4 5» | ||
masak | \o/ | ||
[Coke] | I feel like you're hiding things you should be showing people. | ||
masak | n: my @sorted = 1, 2, 2, 2, 3, 4, 4, 5; my @uniq = gather for @sorted { my $previous = START take $_; next if $_ === $previous; $previous = take $_ }; say @uniq | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«1 2 2 2 3 4 4 5» | ||
masak | [Coke]: well, I am taking pains to link to them from the blog posts. | 15:22 | |
brrt | masak: does that work with rakudo? | ||
[Coke] | gist.github.com/abd360db840a0719da2f in particular. | ||
masak | [Coke]: and the gists really are less authoritative. | ||
[Coke]: yes, that's perhaps the best of them. it's also quite recent. | |||
[Coke]: it was written for YAPC::EU, for the proceedings handed out to all participants. | 15:23 | ||
(which means that at the time, it did not make sense to blog it) | |||
15:26
adu joined
|
|||
[Coke] | heh. I happened to read that gist first (the proceedings), and assumed the others were also in a similar vein. | 15:27 | |
masak | most of them are just random musings and ruminations. | 15:29 | |
almost all are on the theme "wow, macros are like closures, except they're not closures OMG I'm so confused here's what's really going on..." | 15:30 | ||
I'm still a little nervous to make the edit to Wikipedia mentioned in that gist. | 15:34 | ||
maybe I should go talk to some Lisp people on IRC first. | |||
15:35
havenn joined
15:37
sivoais joined
|
|||
masak | heh, #lisp channel redirects me to #scheme, because those are the hygienic people :P | 15:39 | |
moritz | lol | 15:40 | |
TimToady | .oO(Uncommon Lisp) |
||
arnsholt | masak: Heehee. That's Common Lispers for ya. "Who needs hygiene anyways?!" ^_^ | 15:42 | |
masak | I haven't been put on fire yet. people are very friendly on both channels. | 15:44 | |
hah, LeoNerd at #scheme makes a really good point about macro expansions and deparsing. | 15:48 | ||
arnsholt | Not bad. #lisp can get real snarky real quick | ||
Oh? | |||
masak | if you ever try to deparse the expanded code, suddenly you have to handle variable collisions somehow. | 15:49 | |
my factoring of macro expansions means I don't have to handle it with gensymming and such. but during deparse, the problem would resurface. | |||
essentially because some blocks have "impossible" OUTERs. | |||
arnsholt | Huh | ||
[Coke] | would we ever be able to deparse the fact that a macro was there? special flag on the AST? | 15:50 | |
or would it all just look like old school deparsed Java? | |||
15:51
brrt left
|
|||
masak | no idea. | 15:51 | |
moritz doesn't understand "impossible" OUTERs | 15:52 | ||
[Coke] | (that is, not much like the original code with artificial var names.... oh - "like minified javascript" is probably better. :) | ||
TimToady | the main point of an AST is to be A...not necessarily to let you reconstruct the C | 15:53 | |
masak | moritz: first-class functions allow you to separate a block from its OUTER at *runtime*. macros allow you to do so at *compile time*. which is why "surgery"/recontexting by fiddling with Parrot internals is needed. | ||
moritz | masak: erm, what? | 15:54 | |
a function never gets separated from its OUTER, afaict | |||
15:54
thou joined
|
|||
moritz | sub a { sub b { } }; # &b's outer is always &a, no matter what, no? | 15:55 | |
masak | I'm being a bit sloppy and unclear here. sorry. | ||
I'm talking about moving the code itself. the OUTER link remains the same, yes. both with closures and macros. | |||
but the code gets pulled from the block denoted by this OUTER. | 15:56 | ||
moritz | normal closures never move the code, right? | ||
just macros | |||
masak | the code "moves" in the sense that I can return it from its original context and pass it somewhere else. | ||
but you're right, in some sense it never leaves its original environment. | 15:57 | ||
only the references to the closure do. | |||
moritz | you can move references to code+lexpad | ||
masak | right. | ||
with macros, we *copy* the code itself, which is why it's harder to re-establish OUTERs. and it happens on two levers, once with the quasi and once for each unquote. | 15:58 | ||
levels* | |||
15:58
kaleem left
|
|||
moritz | I'm with you so far | 15:58 | |
how does that lead to "impossible" OUTERs? | |||
masak | well, suppose you deparse the code after the macro expansion happened. | 15:59 | |
there's no explicit mechanism to denote what OUTER a block has. it's just indicated by nesting, right? | |||
moritz | is that because you can copy two macros into the same block, with conflicting OUTERs? | ||
ah | |||
masak | and yet code expanded by a macro will have an OUTER that points back into the macro body. | ||
that's genuinely impossible. | 16:00 | ||
in the sense that you can't write code like that directly in Perl 6. | |||
moritz | so, impossible in the sense that you can't reproduce the same thing with non-macro Perl 6 code | ||
masak | right. | ||
moritz | but, not impossible in the sense of "impossible to resolve deterministically" or so | ||
(which I thought first you meant) | |||
ok, got it | |||
it's a bit like writing closure code without closures, where you have to do massive refactorings | 16:01 | ||
flussence | macros are interdimensional wormholes | ||
moritz | like carrying objects around that simulate the lexpads | ||
masak | no, it's possible to resolve deterministically. | ||
the impossibility resurfaces when you try to deparse the code, though. I hadn't thought of that before. | |||
skids | WOuld you be able to key off the fact that you've reached an impossibility to have your decompiler say: oh I guess I should be looking to generate a macro now? | 16:02 | |
moritz | it's probably not too hard to detect, but hard to turn into a macro (just my shallow guess) | 16:03 | |
masak | ooh, an interesting objection at #scheme. | ||
moritz: (re massive refactorings and carrying objects around) yes, exactly. | |||
skids: it's certainly possible to detect when a variable doesn't resolve properly. like referring to $var without $var being in scope. | 16:04 | ||
skids: but though this is a sure-fire way to detect macros *today*, it may not always be. also, it will not detect all macros. | |||
16:06
sivoais left
|
|||
skids | But it will detect macros that are impossible top express in macro-free perl6, yes? In which case a patch macro that just supplies the appropriate OUTER might be generated. | 16:06 | |
moritz | sounds possible | 16:08 | |
though not trivial | |||
skids | Well, I wouldn't expect a decompiler to be a trivial endeavor :-) | ||
16:09
benabik joined
|
|||
masak | skids: well, a naive deparser might easily miss the re-bound OUTER links and just generate illegal code. | 16:09 | |
16:09
thou left
16:12
domidumont left,
sivoais joined
|
|||
kresike | bye folks | 16:14 | |
16:14
kresike left,
sorenso left
|
|||
jnthn | evening o/ | 16:15 | |
moritz | \o jnthn, how was the teaching? | ||
16:15
hoelzro is now known as hoelzro|away
|
|||
jnthn | Fine, but my throat hurts after talking lots. | 16:15 | |
masak | r: macro foo { quasi { return 42 } }; sub bar { foo }; say bar | 16:18 | |
p6eval | rakudo 64208d: OUTPUT«Attempt to return outside of any Routine in block at src/gen/CORE.setting:466 in at /tmp/Pr3vSisyzw:1 in sub bar at /tmp/Pr3vSisyzw:1 in block at /tmp/Pr3vSisyzw:1» | ||
masak | aww | ||
that should work, methinks. | |||
jnthn | I'm less than convinced. | ||
Well | |||
Hm | 16:19 | ||
masak | :) | ||
jnthn | I'm not sure of any way to do it that won't be an epic hack :/ | ||
masak | remember, a quasi is a *deferred* context. | ||
jnthn | I remember. I also remember that return is lexical. Lexical things in quasis refer to...the scope the quasi is in. | ||
quasi { $a } # refers to the $a where the quasi is | |||
masak | hm, troo. | 16:20 | |
so the 'return' here gets bound to the macro? | |||
jnthn | And the way we look up the return handler is just as an ordinary lexical. | ||
I think it uses find_lex even, just like normal variables. | 16:21 | ||
16:22
cognominal joined
|
|||
moritz | what does it find_lex? &ROUTINE? | 16:23 | |
jnthn | RETURN | 16:25 | |
.lex "RETURN", $P107 # from the generated code | |||
masak | hygienic macros reading recommendations from #scheme: gist.github.com/4018113 | 16:26 | |
as predicted, I am being taught a bit of humility by listening to the peeps on that channel. they haven't crushed my macros factoring yet, but their skepticism is... refreshing. | 16:27 | ||
moritz | I kinda hope your factoring survives | ||
masak | me too! | 16:28 | |
16:29
am0c left
16:33
flightrecorder left
|
|||
[Coke] | news.perlfoundation.org/2012/11/goo...de-in.html - TPF post about this year's google code in. | 16:35 | |
go, add sixtasks. | |||
16:43
am0c joined
16:45
benabik left,
[particle]1 is now known as [particle]
16:50
benabik joined
|
|||
masak | I hadn't seen this naggum post about hygiene in Lisps before: www.xach.com/naggum/articles/323678...m.net.html | 16:54 | |
(got it from the #lisp people, not from the #scheme people) :P | |||
16:56
Chillance joined
16:57
brrt joined
17:05
MayDaniel joined
17:06
adu left
17:07
fgomez joined
|
|||
arnsholt | masak: Ah yes, Naggum is always an entertaining read. I'm not surprised it was the CL camp that gave you the link though | 17:12 | |
Naggum is their prophet, after all =) | |||
masak | indeed. | 17:16 | |
hence the ':P'. | |||
arnsholt | Heh. Indeed | ||
cognominal | rn: class A { sub hi { say 'hi' }; method hi { hi }; }; class B is A { method hi1 { hi } }; A.new.hi; B.new.hi; B.new.hi1 | 17:17 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&hi' called (line 1)» | ||
..niecza v22-16-g4c016f5: OUTPUT«===SORRY!===Undeclared routine: 'hi' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37)  at /home/… | |||
cognominal | I am not sure it make any sense to inherit subs. The idea just crosses my mind :) | 17:18 | |
*crossed | |||
masak | cognominal: subs are not inherited. | 17:19 | |
cognominal | I see | ||
masak | only methods do lookup along the MRO axis. | ||
which is why in B &hi is not even visible. | |||
cognominal | indeed | 17:20 | |
masak | well, that and the fact that subs are lexical by default. :) | ||
rn: class A { our sub hi { say 'hi' } }; class B { our &hi; method hi1 { hi } }; B.new.hi1 | 17:21 | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any at /tmp/3v0tIoAW6g line 1 (B.hi1 @ 4)  at /tmp/3v0tIoAW6g line 1 (mainline @ 8)  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3)  at /home/p6eval/niecza/lib/… | ||
..rakudo 64208d: OUTPUT«No such method 'Any' for invocant of type 'Parcel' in at src/gen/BOOTSTRAP.pm:845 in at src/gen/BOOTSTRAP.pm:839 in any at src/gen/BOOTSTRAP.pm:836 in method hi1 at /tmp/tFywyq7xl8:1 in block at /tmp/tFywyq7xl8:1» | |||
masak | inneresting. | ||
oh, different classes => different packages. | |||
so not too surprising. | |||
cognominal | I like stupid questions, that always lead to interesting thoughts | 17:22 | |
masak | aye. | ||
diakopter | r: our macro foo() { }; foo() | ||
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op bind: First child of a 'bind' op must be a QAST::Var» | ||
cognominal | so I am not ashamed to make a fool of myself if I can learn in the process | ||
diakopter | masak: let me type that for you: /me submits rakudobug | 17:23 | |
cognominal | one just need the right place to bounce them around. :) | ||
diakopter | r: temp macro foo() { }; foo() | 17:24 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Method 'returns' not found for invocant of class 'NQPMu'» | ||
masak | diakopter: indeed. | ||
masak submits rakudobug | 17:25 | ||
diakopter++ diakopter++ | |||
cognominal | also, with macros, masak has a keen eye for anything related to names in time and in space. | ||
diakopter | r: module foo; macro foo() { }; foo; foo(); # foo works; foo() doesn't | 17:26 | |
p6eval | rakudo 64208d: OUTPUT«invoke() not implemented in class 'foo' in block at /tmp/JEyQXBbqaU:1» | ||
masak | it does give a keener understanding of context and phases, yes. | ||
[Coke] | r: my $a = macro foo() {}; say $a; | 17:27 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op p6store: Unknown QAST node type NQPMu» | ||
masak | diakopter: both should work. | ||
masak submits [Coke]'s rakudobug | |||
[Coke] | I have no idea what I expect $a to contain there, btw. :) | ||
diakopter | masak: both should invoke macro foo? or one should invoke macro foo and the other invoke class foo (like it's doing)? | 17:28 | |
cognominal | :) | ||
masak | diakopter: both should invoke macro foo, IMO. | ||
r: module foo; sub foo() { say "OH HAI" }; foo; foo() | |||
p6eval | rakudo 64208d: OUTPUT«invoke() not implemented in class 'foo' in block at /tmp/n8jWXMP4lX:1» | ||
masak | hm. | 17:29 | |
same there; really unrelated to macros, I think. | |||
diakopter | oh | ||
masak | [Coke]: a Macro (which is a Routine) | ||
masak submits diakopter's rakudobug | |||
good rakudobug weather tonight :) | |||
that's four in five minutes. | 17:30 | ||
diakopter | r: my $*a = macro { } | 17:31 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op p6store: Unknown QAST node type NQPMu» | ||
[Coke] thinks that's the same as mine. | 17:32 | ||
masak | yes; I'll report them together. | ||
[Coke] | pugs: say 3; | ||
p6eval | pugs: OUTPUT«3» | ||
[Coke] | Any haskell folks, Pugs is no longer building for me in a fresh checkout on feather. | ||
jnthn | module foo; sub foo() { say "OH HAI" }; foo; foo() | 17:33 | |
In this one, foo() parses as a coercion. | |||
[Coke] | rakudofolks: github.com/coke/perl6-roast-data/b...pass_rates - line 5 vs. line 9 - pretty sure those are from "running via cron" and "running from my shell"; Any suggestions about what to add to my "run rakudo tests" scripts to avoid that are welcome. | 17:34 | |
17:34
robinsmidsrod left,
robins joined
|
|||
masak | jnthn: oh! | 17:34 | |
masak adds that to the appropriate rakudobug | |||
jnthn | Anyway, it's right it doesn't call the sub. Just an LTA error I guess...though I ain't immediately sure what to do with it... | 17:35 | |
17:41
sizz joined,
sizz_ left
17:42
brrt left
17:50
adu joined
17:51
adu left
|
|||
sorear | o/ | 17:56 | |
diakopter | o | 17:57 | |
17:58
SamuraiJack joined
|
|||
jnthn | o/ | 17:59 | |
masak | \o/ | ||
18:01
domidumont joined
|
|||
[Coke] | anyone use "Tapper" ? | 18:06 | |
it appears to be in vaguely the same market as smolder. | |||
18:07
arlinius left,
domidumont1 joined
18:11
domidumont left
18:13
fhelmberger left
18:18
kaare_ left,
domidumont1 left
18:19
domidumont joined,
snearch joined
18:20
flightrecorder joined
18:22
cognominal left
18:23
Milbourne joined
18:24
am0c left,
kaare_ joined
18:34
robins is now known as robinsmidsrod
18:43
grondilu left
18:45
brrt joined
18:47
colomon left
18:48
xinming_ joined
18:51
xinming left
19:03
domidumont left
19:05
mtk left,
mtk joined
|
|||
masak | n: constant @c := 1, -> $n { 2 * (2 * $n - 1) / ($n + 1) * @c[$n - 1] } ... *; say @c[$_] for 0..5 | 19:08 | |
p6eval | niecza v22-16-g4c016f5: OUTPUT«===SORRY!===Cannot use bind operator with this LHS at /tmp/B5bAObkC37 line 1:------> $n - 1) / ($n + 1) * @c[$n - 1] } ... *⏏; say @c[$_] for 0..5Unhandled exception: Check failed at /home/p6eval/niecza/boot/li… | ||
masak | n: constant @c = 1, -> $n { 2 * (2 * $n - 1) / ($n + 1) * @c[$n - 1] } ... *; say @c[$_] for 0..5 | 19:09 | |
p6eval | niecza v22-16-g4c016f5: OUTPUT«111111» | ||
masak | hm, but that block isn't getting an index, of course... | ||
TimToady | which usually means you shouldn't be using ... for that | 19:10 | |
masak | n: constant @c = 1, { state $i = 0; $i++; 2 * (2 * $i - 1) / ($i + 1) * $_ } ... *; say @c[$_] for 0..5 | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«11251442» | ||
masak | there we go. | ||
r: constant @c = 1, { state $i = 0; $i++; 2 * (2 * $i - 1) / ($i + 1) * $_ } ... *; say @c[$_] for 0..5 | |||
p6eval | rakudo 64208d: OUTPUT«11251442» | ||
masak | woo | 19:11 | |
TimToady | nr: constant @c = 1, { (state $i)++; 2 * (2 * $i - 1) / ($i + 1) * $_ } ... *; say @c[$_] for 0..5 | 19:12 | |
p6eval | rakudo 64208d, niecza v22-16-g4c016f5: OUTPUT«11251442» | ||
TimToady | nr: constant @c = 1, { state $i++; 2 * (2 * $i - 1) / ($i + 1) * $_ } ... *; say @c[$_] for 0..5 | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«11251442» | ||
..rakudo 64208d: OUTPUT«===SORRY!===Preceding context expects a term, but found infix + insteadat /tmp/T18sEnSDMe:1» | |||
masak | rn: constant @c = 1, { (state $i)++; 2 * (2 * $i - 1) / ($i + 1) * $_ } ... *; sub b($l) { my $r = (^@c[$l]).roll; my $s; for reverse(^$l) Z ^$l -> $l1, $l2 { $s += @c[$l1] * @c[$l2]; return [~] "[", b($l1), "]", b($l2) if $r < $s }; return "" }; say b 5 | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«Use of uninitialized value in numeric context at /home/p6eval/niecza/lib/CORE.setting line 1295 (warn @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 294 (Any.Numeric @ 8)  at <unknown> line 0 (ExitRunloop @ 0)  at /tmp/mV4ZDw7cxC line 1 (b @ 15… | ||
..rakudo 64208d: OUTPUT«[[][[]]][]» | |||
masak | a little update to the "balanced brackets" solution, now with 'constant'. | 19:13 | |
std: state $i++ | |||
p6eval | std 04216b1: OUTPUT«ok 00:00 42m» | ||
masak | TimToady: nieczabug that 'state $i++' doesn't parse? | ||
TimToady | rakudobug | ||
masak | oh! | ||
yes. | |||
masak submits rakudobug | |||
r: state $i++ | 19:14 | ||
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Confusedat /tmp/q3jGE_C9uJ:1» | ||
jnthn | Already TD'd... | 19:15 | |
*RT | |||
masak | oh! | ||
jnthn | And probably exact same issue as the sub foo { }() thing submitted the other day | ||
masak looks for the previous ticket | 19:16 | ||
jnthn | Now if only somebody could find out why... | ||
masak | no, I can't find any previously submitted RT ticket for that. | 19:17 | |
19:17
Milbourne left
|
|||
masak | rn: my $a++ | 19:17 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Confusedat /tmp/txWl1n_0np:1» | ||
..niecza v22-16-g4c016f5: OUTPUT«Potential difficulties: $a is declared but not used at /tmp/K5JEon7nDZ line 1:------> my ⏏$a++» | |||
masak | maybe it's submitted for something like that instead. | ||
jnthn isn't particularly disappointed Rakudo doesn't parse it :P | |||
It visually chunks pretty awfully. | 19:18 | ||
19:18
grondilu joined
|
|||
grondilu | in S29, S32/Scalars is mentionned but it doesn't exists, does it? | 19:18 | |
(see 'defined' and 'undefine') | 19:21 | ||
19:21
SamuraiJack left
|
|||
masak | jnthn: same awful visual chunking with sub {}() | 19:22 | |
jnthn | masak: Yeah | 19:23 | |
masak | grondilu: right. neither does 'undefine' anymore. | ||
grondilu | rn: my %h; say "ok" unless %h<foo> :exists; | 19:24 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Confusedat /tmp/L2WIT6sx75:1» | ||
..niecza v22-16-g4c016f5: OUTPUT«ok» | |||
grondilu | how do I test the existence of a hash entry? | ||
(I mean, until the :exists adverb is implemented on rakudo?) | 19:25 | ||
jnthn | %foo.exists('bar') | ||
grondilu | oh yeah. ok | 19:26 | |
jnthn | My last efforts to look into operator adverbs led to headaches and a busted operator expression parser... :/ | ||
masak | rn: my %h; say "ok" unless %h.postcircumfix<( )>('foo', :exists) | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix in type Hash at /tmp/NwdlGnPlct line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4216 (module-CORE @ 579)  … | ||
..rakudo 64208d: OUTPUT«No such method 'postcircumfix' for invocant of type 'Hash' in block at /tmp/L0vpRT6hMB:1» | |||
19:26
leont joined
|
|||
masak | rn: my %h; say "ok" unless %h.postcircumfix<{ }>('foo', :exists) | 19:27 | |
p6eval | niecza v22-16-g4c016f5: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix in type Hash at /tmp/arCFrHNqzI line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4216 (module-CORE @ 579)  … | ||
..rakudo 64208d: OUTPUT«No such method 'postcircumfix' for invocant of type 'Hash' in block at /tmp/hTdh3q9sf0:1» | |||
jnthn | masak: You missed the : | ||
masak | oh right. | ||
rn: my %h; say "ok" unless %h.postcircumfix:<{ }>('foo', :exists) | |||
p6eval | rakudo 64208d, niecza v22-16-g4c016f5: OUTPUT«ok» | ||
masak | \o/ | ||
19:27
cognominal joined,
Chillance left
19:28
Chillance joined
19:29
azawawi joined
|
|||
jnthn | OK, I don't understand how STD's parsing of my $a++ works out. | 19:29 | |
azawawi | hi | ||
jnthn | Unless there's a trait or post_constraint, the last thing that matches is a <.ws> | ||
grondilu | rn: my %foo = 'bar' => 1; undefine %foo<bar>; say "ok" unless %foo.exists: 'bar'; | ||
p6eval | rakudo 64208d, niecza v22-16-g4c016f5: ( no output ) | 19:30 | |
jnthn | Which will match between $a and ++ | ||
dalek | ecs: 30974c6 | masak++ | S29-functions.pod: [S29] updated references to S32 synopsis |
||
grondilu | how do I delete a hash entry (not just set the entry to 'Any')? | ||
jnthn | And then POST does: | ||
<!{ @*MEMOS[$¢.pos]<ws> }> | |||
grondilu: .delete('foo') | |||
masak | grondilu++ # finding broken links | ||
rn: my %h = foo => 1; %h.postcircumfix<{ }>('foo', :delete); say %h.perl | 19:31 | ||
jnthn | As in, we didn't just match ws. | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix in type Hash at /tmp/qisI11z9zk line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4216 (module-CORE @ 579)  … | ||
..rakudo 64208d: OUTPUT«No such method 'postcircumfix' for invocant of type 'Hash' in block at /tmp/ZhniHBeFdc:1» | |||
jnthn | So I'm kinda at a loss as to why it works in STD :) | ||
masak | rn: my %h = foo => 1; %h.postcircumfix:<{ }>('foo', :delete); say %h.perl | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«{}.hash» | ||
..rakudo 64208d: OUTPUT«("foo" => 1).hash» | |||
masak submits rakudobug | |||
dalek | rl6-roast-data: 302162b | coke++ | / (3 files): today (automated commit) |
||
grondilu | rn: my %foo = 'bar' => 1; %foo.delete: 'bar'; say "ok" unless %foo.exists: 'bar'; | ||
jnthn | masak: todo, not bug... | ||
p6eval | rakudo 64208d, niecza v22-16-g4c016f5: OUTPUT«ok» | ||
jnthn | masak: And I'd again be surprised if the adverb stuff ain't already TODO ticketed. | 19:32 | |
TimToady | 'my foo' is just a term, and POST will match after that without intervening ws | ||
masak | jnthn: oh! :exist worked above for the wrong reasons... | ||
:exists | |||
jnthn | TimToady: But variable_declarator calls <.ws> explicitly. | ||
19:33
hash_table joined
|
|||
TimToady | well, if there's no actual whitespace there, it can still be a postfix | 19:33 | |
jnthn | TimToady: But ws matches in this case, no? | 19:34 | |
TimToady | doesn't matter | ||
POST checks for the absence of ws explicitly | |||
line 3302 | 19:35 | ||
grondilu | also, honnestly I kind of liked P5's syntax: "... if exists $foo{bar}" | ||
jnthn | Yes, that's what I'm looking at | ||
brrt | is the CONTROL phaser implemented anywhere? | ||
19:35
chee left
|
|||
brrt | and if so, hiow | 19:35 | |
jnthn | Rakudo does <!MARKED('ws')> | ||
In the same place | 19:36 | ||
Which should be equivalent. | |||
oh. | |||
if ($¢.pos == $startpos) { | |||
@*MEMOS[$¢.pos]<ws>:delete; | |||
} | |||
Is in ws. Does that mean "don't mark it unless we actually had some characters?" | |||
19:37
snearch left
|
|||
brrt | rn: sub foo { say "hi"; return 42; CONTROL { say "bye!"; } } | 19:37 | |
p6eval | rakudo 64208d: ( no output ) | ||
..niecza v22-16-g4c016f5: OUTPUT«Potential difficulties: &foo is declared but not used at /tmp/GMj3js4ZOx line 1:------> sub foo ⏏{ say "hi"; return 42; CONTROL { say "by» | |||
brrt | rn: sub foo { say "hi"; return 42; CONTROL { say "bye!"; } }; foo; | 19:38 | |
p6eval | rakudo 64208d, niecza v22-16-g4c016f5: OUTPUT«hi» | ||
brrt | is CONTROL not supposed to be called? | ||
19:38
Guest52580 joined
|
|||
TimToady | jnthn: yes, we memoize the space at the end to point to the beginning, but only if it's different | 19:39 | |
masak | grondilu: to me that syntax looks odd. it looks like we're doing something with the value $foo{bar}. but we're not. we're asking the hash whether that entry is even in the hash. | 19:41 | |
grondilu | masak: but we do something similar with // | 19:42 | |
masak | we do? | ||
grondilu | r: my %foo; say %foo<bar> // "there is no bar in foo" | ||
p6eval | rakudo 64208d: OUTPUT«there is no bar in foo» | ||
masak | sure, but that's a straight fetch from the hash. | 19:43 | |
not an existence check. | |||
meaning that if someone stores an undefined value, you won't be able to tell that apart from no entry at all. | |||
grondilu is skeptical | |||
r: my %foo = 'bar' => undef; say %foo<bar> // "there is no bar in foo" | 19:44 | ||
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: Mu (the "most undefined" type object), an undefined type object such as Int, Nil as an empty list, !*.defined as a matcher or method, Any:U as a type constraint o… | ||
grondilu | r: my %foo = 'bar' => Nil; say %foo<bar> // "there is no bar in foo" | ||
p6eval | rakudo 64208d: OUTPUT«there is no bar in foo» | ||
19:44
leont left
|
|||
grondilu | indeed | 19:44 | |
masak | I'm happy empirical evidence still cures misinformed skepticism :) | 19:45 | |
grondilu | so // has not the exact same semantic as in P5, has it? | ||
doy | that's how // works in p5 too | 19:46 | |
grondilu | oh, I thought // tested existence. | ||
masak | no, infix:<//> falls back to the rhs if the lhs is undefined. nothing more. | 19:47 | |
doy | eval: my %foo = (bar => undef); say $foo{bar} // "there is no bar in foo" | ||
buubot_backup | doy: ERROR: syntax error at (eval 20) line 1, near "$foo{bar" | ||
doy | eval: use 5.010; my %foo = (bar => undef); say $foo{bar} // "there is no bar in foo" | 19:48 | |
buubot_backup | doy: there is no bar in foo 1 | ||
grondilu needs to read perlop again | |||
doy | where is that trailing 1 coming from | 19:49 | |
huf | return value of say | 19:50 | |
the perl5 evalbot evals your code in scalar context and also prints the return value | 19:51 | ||
doy | ah, okay | ||
huf | if it's a ref, it gets pretty printed, otherwise just shat out | ||
put a '' as the last expression if you want to suppress it ;) | |||
masak | or just don't 'say' the final value ;) | 19:53 | |
eval: use 5.010; my %foo = (bar => undef); $foo{bar} // "there is no bar in foo" | |||
buubot_backup | masak: there is no bar in foo | ||
huf | well yes, but maybe you have a valid reason for saying so much | 19:54 | |
19:54
brrt left
19:55
MikeyG joined
20:03
grondilu left
20:05
bruges left
|
|||
jnthn | TimToady: What happens if you have a "my @foo[10];" and assign something like 1..* into it? | 20:06 | |
20:07
bruges joined
20:08
bluescreen10 left
|
|||
geekosaur | I would expect the whatever to appropriately limit itself... isn't that the point? | 20:08 | |
jnthn | geekosaur: Note that 1..* isn't forming a closure; it's a distinct case from @foo[1..*]. | 20:09 | |
r: say (1..*).max | 20:10 | ||
p6eval | rakudo 64208d: OUTPUT«Inf» | ||
jnthn | 1..* is just sugar for 1..Inf | ||
20:12
gaussblurinc joined
|
|||
TimToady | nr: my ($a,$b,$c) = 1..*; say "$a $b $c" | 20:18 | |
p6eval | rakudo 64208d, niecza v22-16-g4c016f5: OUTPUT«1 2 3» | ||
TimToady | jnthn: it's just like that | ||
nr: my @a; @a[0..9] = 1..*; say @a; | 20:19 | ||
p6eval | rakudo 64208d, niecza v22-16-g4c016f5: OUTPUT«1 2 3 4 5 6 7 8 9 10» | ||
TimToady | or that | ||
jnthn | my @a[10] = 1..*; # is this done eagerly? | 20:20 | |
(the @a[0..9] = 1..* case would be...) | |||
masak | I'm fine with it being done eagerly. | ||
TimToady | I think it must be eager when there are known targets on the left | ||
jnthn | OK, makes sense, thanks. | ||
What of push, shift, etc on a fixed size array? | 20:21 | ||
TimToady | my ($a,$b,@c) = 1..* can treat only the final assignment as lazy | ||
error | |||
jnthn | OK, presumably a splice that would result in a change is the same. | 20:22 | |
TimToady despises the use of pop on things that can't be popped :) | |||
[Coke] | r: my $a = 1..*; say $a.pop; | 20:29 | |
p6eval | rakudo 64208d: OUTPUT«No such method 'pop' for invocant of type 'Range' in block at /tmp/8cOHCm35jB:1» | ||
[Coke] | r: my $a = 1..*; say $a[*]; | ||
p6eval | rakudo 64208d: OUTPUT«(timeout)» | ||
20:51
kaare_ left
21:05
kurahaupo joined,
GlitchMr left
21:09
azawawi left
21:13
colomon joined
|
|||
dalek | osystem: 0b0c582 | (Timothy Totten)++ | META.list: Added PSpec |
21:15 | |
sorear | is Timothy Totten a #perl6-er? | 21:18 | |
21:19
leont joined
|
|||
sorear | o/ colomon | 21:19 | |
colomon | \o | ||
21:23
leont left
21:26
leont joined
21:28
MayDaniel left
|
|||
[Coke] | sorear: github.com/supernovus | 21:29 | |
sorear | I see | 21:31 | |
dalek | kudo/nom: 0dd4514 | jnthn++ | src/Perl6/ (2 files): Implement INIT as r-value. |
||
21:33
MayDaniel joined
|
|||
dalek | ast: 1d5f961 | jnthn++ | S04-phasers/rvalue.t: Fix and unfudge phaser r-value tests. Correct a mis-paren'd eval call, and correct a test that had wrong expectations about containers. |
21:33 | |
21:45
havenn left
21:46
gaussblurinc left,
havenn joined
21:50
havenn left
21:54
hash_table left
|
|||
dalek | kudo/nom: e472c9b | jnthn++ | src/Perl6/Actions.pm: Fix our ($x, $y). |
21:54 | |
kudo/nom: ef70aad | jnthn++ | src/core/control.pm: Fix return value of take/take-rw. |
|||
21:56
arlinius joined
21:57
domidumont joined
22:03
skids left
|
|||
dalek | kudo/nom: 0e41354 | jnthn++ | src/Perl6/World.pm: Only SET_FILE_LINE on exceptions that can. |
22:07 | |
22:07
benabik left,
cognominal left
22:09
MayDaniel left
22:14
domidumont left
|
|||
masak | jnthn: I see you rejected rt.perl.org/rt3/Ticket/Display.html?id=115586 rather than merge it with its earlier duplicate. | 22:18 | |
in the long run, merging tickets will simplify searching for old bugs. | 22:19 | ||
jnthn | Not filing dupes within a couple of days of each other would save me time in the short term :P | 22:20 | |
Feel free to twiddle it as you prefer. | |||
sorear | masak \o/ | ||
masak | will do. | 22:21 | |
jnthn | r: say '' ~~ / $d /; | 22:22 | |
p6eval | rakudo 0e4135: OUTPUT«===SORRY!===Variable $d is not declaredat /tmp/l4Zsow9e9k:1» | ||
masak | and yes, sorry about filing the same thing twice within such a short time span. there's been a flurry of tickets, and I wanted to make sure I submitted all of them... | ||
merged. | 22:23 | ||
diakopter | \o/ | ||
[Coke] | always ok to just note it here and some bugadmin will take care of it. | 22:26 | |
(mainly masak. :) | |||
diakopter | jnthn: sorry masak and I have feeble memories about this :D | 22:27 | |
masak | generally I catch overlaps, but my overlap detector must have underlapped this time. | 22:28 | |
jnthn | r: my ${a} = 5; | 22:29 | |
p6eval | rakudo 0e4135: OUTPUT«===SORRY!===Unsupported use of ${a}; in Perl 6 please use $aat /tmp/9PM7O_R0P8:1» | ||
22:29
spider-mario left
|
|||
diakopter | this cannot be. | 22:31 | |
22:31
sizz left
|
|||
diakopter | er, ww | 22:31 | |
22:33
cognominal joined
22:35
Guest52580 left,
flightrecorder left
|
|||
jnthn | std: sub f { f(|$) }; say "alive" | 22:35 | |
p6eval | std 04216b1: OUTPUT«===SORRY!===Unsupported use of $) variable; in Perl 6 please use $*EGID at /tmp/kH8aP4cv2r line 1:------> sub f { f(|$)⏏ }; say "alive"Parse failedFAILED 00:00 43m» | ||
22:35
chee joined,
chee is now known as Guest64859
22:36
Guest64859 left,
Guest64859 joined
22:37
Guest64859 is now known as chee
|
|||
jnthn | Is rt.perl.org/rt3/Ticket/Display.html?id=102276 rejectable? | 22:39 | |
sorear | yes and no | 22:40 | |
.duckmap still exists, I think | |||
but hypers are specced to do something different now | |||
jnthn | r: $_ = 'foo'; s:g/ /a/; | 22:41 | |
p6eval | rakudo 0e4135: ( no output ) | ||
jnthn | r: $_ = 'foo'; s:g//a/; | ||
p6eval | rakudo 0e4135: OUTPUT«===SORRY!===Unrecognized regex metacharacter / (must be quoted to match literally) at line 2, near "a/;"» | ||
jnthn | std: $_ = 'foo'; s:g/ /a/; | ||
p6eval | std 04216b1: OUTPUT«===SORRY!===Null pattern not allowed at /tmp/5RJPtyw4vg line 1:------> $_ = 'foo'; s:g/ ⏏/a/;Parse failedFAILED 00:00 43m» | ||
jnthn | std: $_ = 'foo'; s:g//a/; | ||
p6eval | std 04216b1: OUTPUT«===SORRY!===Null pattern not allowed at /tmp/4_SLCIBEbD line 1:------> $_ = 'foo'; s:g/⏏/a/; expecting colon pair (restricted)Parse failedFAILED 00:00 43m» | ||
22:41
flightrecorder joined
|
|||
jnthn | Well, that's a bunch of tickets moved to testneeded status... | 22:49 | |
masak | jnthn++ | 22:50 | |
jnthn | Various of them quoting related. | ||
22:52
leont left
22:53
sftp left
|
|||
jnthn | I wonder if we can use Google Code In to reduce the size of the testneeded list :P | 22:53 | |
(If so, need to select ones that aren't really hard to test well...) | |||
dalek | kudo/nom: 0a320a4 | jnthn++ | docs/ChangeLog: A few ChangeLog additions. |
22:56 | |
23:00
Entonian joined
23:01
Entonian left
|
|||
jnthn | 'night, #perl6 | 23:06 | |
masak | 'night, #perl6 | 23:11 | |
23:11
stopbit left
|
|||
tadzik | good knight | 23:11 | |
23:17
PacoAir left
23:18
mtk left
23:21
fgomez left
23:22
benabik joined
23:23
mtk joined
23:36
skids joined
23:39
Guest20434 is now known as ponbiki
23:43
jeffreykegler joined
23:45
jeffreykegler left
23:47
sftp joined
23:59
fgomez joined
|