»ö« 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. |
|||
00:01
tgt left
00:07
ab5tract left
00:10
atroxaper joined
00:11
vti left
00:15
atroxaper left
00:24
immortal left
00:26
adu joined
00:27
erkan joined
|
|||
adu | I have a question, what is the purpose of "outerctx"? | 00:27 | |
github.com/perl6/nqp/blob/master/s...r.nqp#L219 | |||
00:28
pmurias left
|
|||
jnthn | Part of the mechanism for attaching the outer lexical context (the setting for scripts/modules, and the appropriate lexical scope for EVAL) | 00:28 | |
Actions.pm has the more interesting bits | 00:29 | ||
adu | jnthn: I'm trying to write a parser for NQP in something other than NQP | 00:38 | |
I'm finding it rather difficult | 00:39 | ||
00:45
erkan left
|
|||
ugexe | m: class X { multi MAIN("test") is export {"test"}; multi MAIN("test",@more) is export {"test2"}; }; import X; say "hello"; MAIN("test"); say "world"; | 00:45 | |
camelia | rakudo-moar 795a32: OUTPUT«helloworldUsage: /tmp/akr1TtchJu test  /tmp/akr1TtchJu test <more> » | ||
ugexe | why does the Usage message get printed at the end instead of calling &MAIN or printing the Usage before "hello" "world"? | ||
i understand &MAIN_HELPER is called at the precomp stage, but im not exactly sure what i should extrapolate from that | 00:47 | ||
00:47
erkan joined
00:48
bjz left
|
|||
jnthn | ugexe: A MAIN it called automatically, at the end of the mainline. So the mainline runs, then it calls MAIN, and since there are no command line args passed for the evalbot then you get the usage printed. | 00:48 | |
00:48
bjz joined
|
|||
jnthn | ugexe: Your own call to it likely worked out fine, but the idea is that MAIN is called automatically with @*ARGS, not that you call it yourself. | 00:48 | |
adu: I'm not entirely surprised. :) Though NQP is a good bit more tractable than full-blown Perl 6. | 00:50 | ||
adu: There's a reason the two times I ported NQP, I ported the code-gen and then got it to cross-compile itself, so I didn't have to port the grammar and so on. :) | |||
adu | lol | 00:51 | |
jnthn: also, perl6-j is quite speedy, good job! | 00:59 | ||
psch | it is..? | 01:00 | |
i guess i'm not running enough long-running programs with it | |||
adu | psch: yes, it executes my C11 parser in less than 10 seconds, perl6-p executes the same program in under 5 minutes... | ||
psch | adu: did you try it on moar yet? | 01:01 | |
adu | psch: yeah, perl6-m runs it in about 5 seconds | ||
maybe I should do some more testing and put some benchmarks on my blog or something | 01:02 | ||
01:02
erkan left
|
|||
adu | jnthn: have you heard of Graal/Truffle? | 01:03 | |
psch | 5 sec moar vs 10 sec jvm sounds suspiciously consistent with my own experience | ||
as in, stage parse while building rakudo also has 100% longer runtime on jvm than moar for me | 01:04 | ||
looking at benchmarks is probably more reasonable though | |||
adu | psch: it's still much nicer than 1000x longer | ||
psch | adu: right, i'm not saying it's slow. i might just be a bit miffed with building on jvm for the interop stuff i'm working on :) | 01:05 | |
01:05
erkan joined,
erkan left,
erkan joined
|
|||
adu | psch: what are you working on? | 01:05 | |
psch | adu: i'm working on mmd for overloaded constructs when instantiating java classes in perl6 | 01:06 | |
currently we have to call them with a non-jvm-spec compliant method descriptor, e.g. "constructor/new/(I)V" for a constructor that takes an int | |||
adu | mmd? | 01:07 | |
multimonitor display? | |||
psch | but we of course would like to be able to call &.new | ||
multi-method dispatch | |||
adu | oh | ||
psch | i've described mmd for methods in the day 12 of perl6advent | 01:08 | |
adu | I thought JVM added invokedynamic in 1.7 for that | ||
psch | well, yes | ||
we're also already using invokedynamic for a few things | |||
but nobody had implemented it yet for interop | |||
or rather, it wasn't user friendly | 01:09 | ||
01:10
stapler joined,
stapler left,
stapler joined
|
|||
adu | psch: have you heard of Graal/Truffle? | 01:11 | |
jnthn | adu: Yeah, I read a paper on Graal/Truffle a few weeks back. Interesting work. | ||
adu | every word reminded me of HLL::Grammar and NQP, and Parrot, ... | ||
also: www.slideshare.net/ThomasWuerthinge...ethdec2013 | 01:12 | ||
provides a nice overview | 01:13 | ||
01:19
stapler left
01:20
adu left
01:25
mvuets left,
erkan left
01:28
erkan joined,
erkan left,
erkan joined
01:35
RSX-11M joined
|
|||
RSX-11M | is it possible "file".IO.lines but with "\n" preserved ? | 01:36 | |
jnthn | Maybe open("file", :!chomp).lines | 01:39 | |
psch | m: my @lines-with-break = slurp.comb: /<-[\x0a]>+.<after "\n">/; say @lines-with-break[0] # this'd work | 01:42 | |
01:42
erkan left
|
|||
camelia | rakudo-moar 795a32: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall» | 01:42 | |
psch | note two  at the end | ||
although opening it correctly is probably cleaner | |||
jnthn | psch: That's...probably also not going to be so fast ;) | ||
psch | jnthn: right, it's probably not. i'm thoroughly in "make it work"-mode :) | 01:43 | |
01:43
rurban_ left
01:44
erkan joined
|
|||
psch | m: open($*IN, :!chomp).lines[0].say | 01:45 | |
camelia | rakudo-moar 795a32: OUTPUT«open is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting:1 in sub open at src/RESTRICTED.setting:5 in block <unit> at /tmp/NWTbQt8Ve2:1» | ||
psch | oh right | ||
01:46
adu joined
|
|||
psch | m: slurp().split(/.<(<after "\n">/)[0].say # not sure if this would be faster... | 01:47 | |
camelia | rakudo-moar 795a32: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall» | ||
psch | probably not, i'm thinking the lookaround is the slowest bit | ||
jnthn | Also slurp can't be lazy, so if it's a big file... :) | 01:48 | |
dylanwh | camelia speaks irish? | 02:00 | |
jnthn speaks zzzz & | 02:07 | ||
psch | 'nite jnthn | 02:08 | |
02:15
rmgk is now known as Guest64416,
rmgk_ joined,
Guest64416 left,
rmgk_ is now known as rmgk
02:16
RSX-11M left
02:45
adu left
02:53
erkan left
02:56
erkan joined
03:08
noganex_ joined
|
|||
timotimo | twitter.com/raocl/status/543959294790488064 - would be glad if someone could reproduce and assist (ideally on twitter as well as irc) | 03:10 | |
03:10
noganex left
03:14
hagiri joined
|
|||
hagiri | TimToady, o/ | 03:14 | |
=) | |||
hello all! | |||
;D | |||
psch | timotimo: works fine here, This is perl6 version 2014.11-79-g1eb7fad built on MoarVM version 2014.11-66-g23f2089 | 03:17 | |
timotimo: i don't have a twitter though | |||
i've used the exact script but with the url replaced with heise.de | |||
03:29
bjz left,
bjz joined
|
|||
dj_goku | I get the same error if I use REPL but if I put it in a script it runs fine. | 03:30 | |
psch | huh | 03:32 | |
i tried it with -e and got a malloc() error | 03:33 | ||
$ perl6 -MHTTP::UserAgent -e'$ua = HTTP::UserAgent.new; @a = "heise.de" xx 3; @a.map: { start { $ua.get($_) } }; .contents.say for await @a' | |||
*** Error in `/home/psch/rakudo/install/bin/moar': malloc(): smallbin double linked list corrupted: 0x0c147850 *** | |||
rerunning it hangs... | 03:34 | ||
leedo_ | it works most of the time here. but i got a segfault once | 03:38 | |
hmm and now | |||
moar(99704,0x1054c1000) malloc: *** error for object 0x7fce2f5721f0: double free | |||
03:39
synopsebot joined,
kshannon joined
|
|||
leedo_ | well, here are all the various errors that script triggers for me on moar on OS X | 03:45 | |
gist.github.com/leedo/3b11d47c9f7c4db330dc | |||
psch | leedo_: that's all with one UA instance? | ||
leedo_ | psch: yeah | ||
03:47
zoosha_ joined
03:48
[Sno] left,
Sir_Ragnarok joined
03:49
BooK joined,
revdiablo joined,
[Sno] joined
03:50
jscripter joined,
jscripter left,
torbjorn joined
|
|||
leedo_ | although i can trigger most of those errors with a UA per promise | 03:51 | |
04:03
atroxaper joined
04:07
hagiri left
04:20
pyrimidine joined
|
|||
pyrimidine | Ulti: any updates on the advent post? Haven't seen anything yet... | 04:23 | |
04:27
telex left
04:28
telex joined
04:34
erkan left
04:37
erkan joined
|
|||
psch sleeps & | 04:41 | ||
04:41
psch left
04:44
pyrimidine left
05:03
Ben_Goldberg joined,
erkan left
05:06
BenGoldberg left,
erkan joined
05:14
Ben_Goldberg left
05:26
BooK left,
baest left,
atroxaper left,
Celelibi left,
cibs left,
revdiablo left,
Sir_Ragnarok left,
flussence left,
SHODAN left,
Alina-malina left,
m_athias left,
gtodd left,
muraiki left,
ggherdov left,
bjz left,
jnthn left,
ugexe left,
Alula left,
telex left,
mr-foobar left,
Akagi201 left,
sftp left,
hahainternet left,
renormalist left,
broquaint left,
eiro left,
erkan left,
[Sno] left,
zoosha_ left,
dalek left,
TuxCM left,
Brock left,
Vlavv left,
kst left,
rjbs left,
Ulti left,
noganex_ left,
DarthGandalf left,
synopsebot left,
colomon left,
yogan left,
dylanwh left,
bcode left,
robinsmidsrod left,
[Tux] left,
timotimo left,
rmgk left,
esaym153 left,
vendethiel left,
dj_goku left,
cosimo left,
jferrero left
05:27
davido_ left,
FROGGS__ left,
Woodi left,
salv0 left,
krunen left,
djanatyn left,
f1ay left,
BinGOs left,
Gothmog_ left,
TimToady left,
anocelot left,
go|dfish left,
yeltzooo left,
jtpalmer left,
charsbar____ left,
jdv79 left,
diegok left,
ivan`` left,
mtj_ left,
xiaomiao left,
ponbiki left,
moritz left,
epochbell left
05:28
xopatch left,
Maddingue left,
lestrrat left,
coffeeyy_ left,
smash left,
kshannon left,
konsolebox left,
onebitboy left,
myp left,
carlin left,
ggoebel111111114 left,
pochi left,
frew left,
mst left,
tony-o left,
eMBee left,
nwc10 left,
jantore left,
risou left,
JimmyZ left
05:29
itz_ left
05:30
itz joined,
ruoso left,
araujo left,
xinming_ left
05:32
tinyblak left,
pecastro left,
PerlJam left,
danaj_ left,
pyrimidi_ left,
rhr left
05:50
ilogger2_ joined
05:52
itz joined,
SAA7ELB joined,
ilogger2 joined,
sjn joined,
kornbluth.freenode.net sets mode: +v ilogger2
05:54
JimmyZ joined
05:55
sjn left,
ilogger2 left
05:57
araujo joined
05:58
xprime joined
06:00
skarn joined,
torbjorn joined,
Sqirrel joined,
khisanth_ joined,
eternaleye joined,
Util_ joined,
lue joined,
njmurphy joined,
jercos joined,
sjohnson joined,
mephinet joined,
pmichaud joined,
Exodist joined,
Spot__ joined,
clkao joined,
hobbified joined,
retupmoca joined,
Juerd joined,
Grrrr joined,
btyler joined
06:01
skarn left
06:02
skarn joined
06:06
itz_ joined
06:08
adu joined
|
|||
adu | who maintains www.perlfoundation.org/perl6/index....dex_tablet ? | 06:08 | |
"as" and "of" have the same definition, what's the difference? | 06:09 | ||
06:15
itz left
06:33
kaare_ joined
|
|||
moritz | adu: nobody maintains it; that'S th eproblem | 06:34 | |
adu | oh | ||
moritz | adu: tablets.perl6.org/ seems to be the maintained (ish) version | 06:41 | |
adu | tablets.perl6.org/tablet-7-subroutines.html | 06:42 | |
ish | |||
moritz | though I don't quite understand th emotivation for listing stuff without explaining it | 06:43 | |
hence doc.perl6.org (which is also incomplete, though) | 06:44 | ||
07:13
tinyblak joined
07:25
tinyblak_ joined,
atroxaper joined
07:28
tinyblak left
07:30
atroxaper left
07:44
adu left,
vti joined
|
|||
raydiak | mayhaps we need an (admittedly very long at first) organized list of work to be done on the docs | 07:49 | |
07:52
mr-foobar joined
|
|||
raydiak | or a tool to give an overview of the doc coverage of the public api at least by line count or something, per routine, class, etc (especially higlighting the items which have 0) | 07:53 | |
(unless that turns out to be an inappropriately laborious undertaking) | 07:55 | ||
raydiak notices github.com/perl6/doc/blob/master/WANTED | 07:56 | ||
08:13
Isp-sec joined
08:16
darutoko joined
|
|||
dalek | ast: 2252f8b | usev6++ | S12-meta/primitives.t: Fudge 6 tests for JVM (todo); skip all tests for Parrot |
08:29 | |
08:34
ribasushi joined
08:35
ptc_p6 joined
08:50
rurban_ joined
08:52
gfldex joined
08:53
salv0 joined
08:58
atroxaper joined
09:03
atroxaper left
09:06
rindolf joined
09:14
brrt joined
09:26
mr-foobar left
09:28
atroxaper joined
|
|||
brrt | \o | 09:38 | |
how is it with the perl6 advent calendar? is there still a spot free next week? | 09:39 | ||
09:42
spider-mario joined
09:44
darutoko- joined
09:48
darutoko left
09:50
brrt left
10:17
DarthGandalf joined
10:19
mvuets joined
10:23
atroxaper left,
atroxaper joined,
atroxaper left
|
|||
masak | brrt: we've got an opening on Wednesday: github.com/perl6/mu/blob/master/mi...4/schedule | 10:28 | |
(antenoon, #perl6) | |||
ooh, Mouq++ rose to the mini-challenge right after I went to bed! | |||
timotimo | (antenoon '#perl6) | 10:29 | |
masak | ah, macro humor. | 10:30 | |
Mouq: very interesting. quite different from mine. | 10:31 | ||
here's my version: gist.github.com/masak/732867afd82801004c19 | 10:32 | ||
(I later had the idea to put together an FP version, but I haven't done that yet.) | 10:33 | ||
10:43
atroxaper joined
10:48
atroxaper left
|
|||
Ulti | pyrimidi_ nope writing it now | 10:52 | |
11:08
denis_boyun joined
11:21
ssqq joined
11:26
bartolin joined
|
|||
ssqq | in nqp, How to dump a data(hash or list), or view the data structure of a object? | 11:28 | |
FROGGS__ | ssqq: loop over it... there is no other way AFAICT | 11:29 | |
ssqq | FROGGS__: I see, thanks. | ||
11:33
atroxaper joined
11:37
atroxaper left
11:39
BigBear joined
|
|||
ssqq | nqp-m: ok( (nqp::add_n(1.1, 2.2) == 3.3), 'add_n(1.1, 2.2) == 3.3'); | 11:50 | |
camelia | nqp-moarvm: OUTPUT«not ok 1 - add_n(1.1, 2.2) == 3.3» | ||
11:50
denis_boyun left
|
|||
ssqq | nqp-m: ok( (nqp::add_n(1.1, 2.2) >= 3.3), 'add_n(1.1, 2.2) == 3.3'); | 11:50 | |
camelia | nqp-moarvm: OUTPUT«ok 1 - add_n(1.1, 2.2) == 3.3» | ||
timotimo | surprise. add_n is about native floats | 11:56 | |
:) | |||
12:00
rurban joined
12:05
mvuets left
|
|||
jnthn | Afternoon, #perl6 | 12:06 | |
Yes, testing floats for equality is rarely a good idea. :) | |||
Ulti | m: say (1..10) (&) (7..12) | 12:09 | |
camelia | rakudo-moar 795a32: OUTPUT«set(7, 8, 9, 10)» | ||
Ulti | m: my %stuff = stuff => (1..6), thing => (7..10); %stuff.grep(*.value (&) (5..6))>>.say | 12:10 | |
camelia | ( no output ) | ||
Ulti | :/ | 12:11 | |
m: my %stuff = stuff => (1..6), thing => (7..10); %stuff.grep(*.value (&) (5..6)).say | |||
camelia | rakudo-moar 795a32: OUTPUT«» | ||
Ulti | m: say (1..6) (&) (5..6) | ||
camelia | rakudo-moar 795a32: OUTPUT«set(5, 6)» | ||
Ulti | what's up with that? | ||
jnthn | m: my %stuff = stuff => (1..6), thing => (7..10); say %stuff.perl | ||
camelia | rakudo-moar 795a32: OUTPUT«("stuff" => 1..6, "thing" => 7..10).hash» | ||
jnthn | m: my %stuff = stuff => (1..6), thing => (7..10); say %stuff.map(*.value).perl | 12:12 | |
camelia | rakudo-moar 795a32: OUTPUT«(1..6, 7..10).list» | ||
Ulti | m: my %stuff = stuff => (1..6), thing => (7..10); %stuff.grep(*.value (&) 5)).say | ||
camelia | rakudo-moar 795a32: OUTPUT«===SORRY!=== Error while compiling /tmp/jwOH6l7AYLUnexpected closing bracketat /tmp/jwOH6l7AYL:1------> g => (7..10); %stuff.grep(*.value (&) 5)⏏).say» | ||
Ulti | m: my %stuff = stuff => (1..6), thing => (7..10); %stuff.grep(*.value (cont) 5)).say | ||
camelia | rakudo-moar 795a32: OUTPUT«===SORRY!=== Error while compiling /tmp/HYFJqTvn31Unexpected closing bracketat /tmp/HYFJqTvn31:1------> > (7..10); %stuff.grep(*.value (cont) 5)⏏).say» | ||
Ulti | m: my %stuff = stuff => (1..6), thing => (7..10); %stuff.grep(*.value (cont) 5).say | ||
camelia | rakudo-moar 795a32: OUTPUT«"stuff" => 1..6» | ||
Ulti | yeah that works | ||
jnthn | m: my %stuff = stuff => (1..6), thing => (7..10); say %stuff.map(*.value (&) (5..6)).perl | ||
camelia | rakudo-moar 795a32: OUTPUT«No such method 'count' for invocant of type 'Set' in method reify at src/gen/m-CORE.setting:8382 in block at src/gen/m-CORE.setting:8290 in method reify at src/gen/m-CORE.setting:8265 in method gimme at src/gen/m-CORE.setting:8781 in m…» | ||
jnthn | oh...that doesn't curry | ||
m: my %stuff = stuff => (1..6), thing => (7..10); say %stuff.map({ .value (&) (5..6) }).perl | 12:13 | ||
camelia | rakudo-moar 795a32: OUTPUT«(set(5,6), set()).list» | ||
jnthn | m: my %stuff = stuff => (1..6), thing => (7..10); say %stuff.grep({ .value (&) (5..6) }).perl | ||
camelia | rakudo-moar 795a32: OUTPUT«("stuff" => 1..6,).list» | ||
Ulti | naaw | ||
jnthn suspects (&) should do so, however | |||
Ulti | I have a feeling this caught me out ages ago | 12:14 | |
and I'm repeating myself | |||
okedoke whatever... or not as the case may be | |||
12:40
telex joined
|
|||
moritz | \o | 12:44 | |
12:48
molaf joined
|
|||
timotimo | o\ | 12:49 | |
% | |||
moritz | FROGGS__: ping | ||
FROGGS__ | moritz: pong | ||
moritz | FROGGS__: we talked about moving testers.perl6.org to the new server | 12:50 | |
FROGGS__ | moritz: true | 12:51 | |
I'd need an account... somewhere I suppose :o) | |||
moritz | FROGGS__: the main question is: should it go on the www or the 'hack' server? | ||
12:51
rurban left
|
|||
moritz | FROGGS__: how much CPU, RAM and disk space does it use? | 12:52 | |
12:52
rurban joined
|
|||
FROGGS__ | good question | 12:52 | |
lemme check | |||
timotimo | moritz: does the "security-relevant services" host have a name yet? | 12:53 | |
moritz | www has 4GB RAM, and a single CPU; I could add another one with a short downtime | ||
timotimo: no, it doesn't exist yet; I'm thinking maybe 'risk.p6c.org' | |||
FROGGS__ | moritz: is there a connection between both? | ||
timotimo | mhm | 12:54 | |
moritz | FROGGS__: sure, both are on the internet :-) | ||
FROGGS__ | like, that the hack server could generate static html pages, and the www server would deliver these (using apache), and the www would also receive reports | ||
so they'd need to share a prostgres db and a directory | |||
maybe rsync'd | 12:55 | ||
12:55
rindolf left
|
|||
moritz | FROGGS__: rsync should be pretty fast; I'd like to avoid setting up an NFS share | 12:55 | |
(they are on the same physical machine, so network between them should be pretty fast) | |||
FROGGS__ | yes, it feels like the right design anyway | ||
jnthn | FROGGS__++ moritz++ | 12:56 | |
moritz | FROGGS__: mail or msg me your ssh pubkey, then I'll create an account for you on both servers | ||
timotimo | is www meant to do mostly static web hosting? | 12:58 | |
or are the web services supposed to culminate in a single web server via proxying? | |||
moritz | timotimo: it's dimensioned to also run some dynamic pages | ||
timotimo: it has enough RAM to compile rakudo-m, so that's possible too | |||
timotimo | for some reason a single CPU still feels a bit weak; or is that two logical cores? | 12:59 | |
moritz | timotimo: though highly CPU-intensive loads don't fit there | ||
timotimo | hm, i suppose web stuff is rather I/O bound | ||
moritz | timotimo: well, the server on which I run irclog.perlgeek.de (also written in perl) and a few mostly-static web pages is also a single core, and i mostly idles | 13:00 | |
timotimo | i wonder how we'd get a libuv-backed socket on moarvm to do TCP fast open | ||
moritz: ah, right. it's most probably mostly peak loads | |||
gotta go AFK for a bit | |||
13:01
Rounin joined
13:17
atroxaper joined
13:23
atroxaper left
|
|||
colomon | m: say 1..6 (&) 4..5 | 13:27 | |
camelia | rakudo-moar 795a32: OUTPUT«===SORRY!=== Error while compiling /tmp/osr71uJc0HOperators '..' and '..' are non-associative and require parenthesesat /tmp/osr71uJc0H:1------> say 1..6 (&) 4.⏏.5 expecting any of: postfix…» | ||
colomon | m: say (1..6) (&) (4..5) | 13:28 | |
camelia | rakudo-moar 795a32: OUTPUT«set(4, 5)» | ||
colomon | m: say Set.new(1..6) (&) Set.new(4..5) | ||
camelia | rakudo-moar 795a32: OUTPUT«set(4, 5)» | ||
colomon | m: say set(1..6) (&) set(4..5) | ||
camelia | rakudo-moar 795a32: OUTPUT«set(4, 5)» | ||
colomon | m: say set($(1..6)) (&) set($(4..5)) | 13:29 | |
camelia | rakudo-moar 795a32: OUTPUT«set()» | ||
13:30
gfldex left,
spider-mario left
13:33
pmurias joined
|
|||
pmurias | [Coke]: ping | 13:33 | |
13:39
spider-mario joined
|
|||
Ulti | m: my %h=hi=>1,world=>2; say %h.map({.value => .key}) | 13:42 | |
camelia | rakudo-moar 795a32: OUTPUT«use of uninitialized value of type Any in string context in block <unit> at /tmp/8uNoRLhy4z:1No such method 'count' for invocant of type 'Hash' in method reify at src/gen/m-CORE.setting:8382 in block at src/gen/m-CORE.setting:8290 in me…» | ||
Ulti | so what's up with the above... | ||
m: my %h=hi=>1,world=>2; say %h.map({$_.value => .key}) | |||
camelia | rakudo-moar 795a32: OUTPUT«1 => "hi" 2 => "world"» | ||
Ulti | ^ is my confusion | 13:43 | |
why the need for the first $_ | |||
timotimo | so that it doesn't get parsed as a hash literal | 13:45 | |
$_ says "this is code block, yo" | |||
Ulti | I thought you would need the , for that | ||
timotimo | i don't think so | ||
Ulti | as in for it to be a hash rather than just a pair literal | ||
timotimo | m: say {foo => "bar"}.WHAT | ||
camelia | rakudo-moar 795a32: OUTPUT«(Hash)» | ||
timotimo | m: say {foo => "bar"}.perl | ||
camelia | rakudo-moar 795a32: OUTPUT«{"foo" => "bar"}» | ||
jnthn | I think the implicit use of $_ there should count | ||
So I'd have taht as a bug. | |||
timotimo | hm, okay | 13:46 | |
jnthn | I think there's an RT | ||
Ulti | I think its the {} looking hashy before they look blocky | ||
that makes the => a hash rather than a pair | |||
I mean this is what the * is kind of for | 13:47 | ||
but I can't use it :'( | |||
13:48
aborazmeh joined
13:52
Lasse_ joined
|
|||
timotimo | you can't, eh? | 13:54 | |
does => prevent currying for some reason? | |||
oh, of course, two * will iterate in twos instead of one by one | |||
14:01
brrt joined
|
|||
brrt | wednesday is too early for me, have exam that day. thursday is fine :-) | 14:11 | |
masak | ...cue commit... | ||
brrt | i'm not sure i understand | 14:15 | |
asdf | 14:16 | ||
oops | |||
dalek | : 7d08475 | masak++ | misc/perl6advent-2014/schedule: [schedule] book brrt on Thursday |
||
masak | like that ^ | ||
brrt | ah i see | ||
:-) | |||
masak | feel free to fill in the topic, too. | 14:17 | |
vendethiel | eh, I should find a topic to talk about | ||
brrt | thanks :-) i'll think about a good title. I was preparing to write about the JIT / spes logging stuff | 14:18 | |
in the sense of 'how to see what spesh/JIT does for you' | 14:19 | ||
or would we lose too much readers that way? :-) | |||
masak | write about somthing that piques your interest, is the main thing | 14:20 | |
if it's interesting to you, and it comes through, chances are it's interesting to a reader | 14:21 | ||
brrt | ok, i'll try | ||
14:26
Alina-malina joined
|
|||
moritz | brrt: a bad post doesn't make us lose readers; if people don't like it, they move on to their next tab | 14:28 | |
brrt | that is true | ||
moritz | brrt: ... you just shouldn't insult them :-) | ||
brrt | that is easy | ||
i don't know them | |||
14:30
aborazmeh left
|
|||
ssqq | why in perl6, 1.1+2.2 == 3.3, but in NQP, 1.1+2.2 > 3.3, they have same backends, only with different grammar and action. | 14:34 | |
jnthn | ssqq: Because 1.1 is not a floating point number in Perl 6 | ||
brrt | 1.1 in perl6 is (iirc) a rational | 14:35 | |
jnthn | And in NQP we cheat and make it one. | ||
moritz | ssqq: the difference is that 1.1 in Perl 6 is a Rat, which can store the 1.1 exactly | ||
ssqq: but it's not a VM-level type, so NQP doesn't have it | |||
jnthn | We could just forbid 1.1 in NQP and force writing 1.1e0 if we want to really force Perl 6 compatibility | ||
But I've barely cared; floating point isn't very useful in compilers, generally. | |||
moritz | (and it's not needed much for writing compilers) | ||
timotimo | aye | ||
jnthn | Sometimes I wonder if NQP could get away with assuming all math is integers and you have to write the nqp::add_n if you want the floating point. | 14:36 | |
brrt | as in, completely untested by any part of the compilation stack | ||
jnthn | We'd generate better code that way. :) | ||
brrt | jnthn - i think you could and it would simplify stuff | ||
jnthn | It's tempting. :) | ||
brrt | very | ||
jnthn | After all, the point of NQP is to build compilers and other related runtime bits, not to be general purpose like full Perl 6. :) | 14:37 | |
ssqq | jnthn: yes, I think float is useless to hack compilers. | ||
14:45
brrt left
|
|||
masak | I'm surprised floats were put into NQP in the first place :) | 14:45 | |
14:46
atroxaper joined
|
|||
moritz | having floats is kinda useful for math that generates floats :-) | 14:47 | |
masak | I guess... | ||
moritz | but I think it was really just parrot/PIR legacy | 14:48 | |
masak | ...but even that explanation feels non-obvious to me. mixing levels, kind of. | ||
moritz | well, before NQP, rakudo was written in PIR (shudder) | 14:49 | |
so it's kinda obvious to have NQP provide all the PIR features that easily map into a HLL | |||
[Coke] | pmurias: pong | ||
masak | yeah. | ||
14:53
atroxaper left
|
|||
dalek | frastructure-doc: eb78d05 | moritz_++ | hosts/www.p6c.org.pod: Add basic documentation for www.p6c.org.pod |
14:56 | |
15:00
smls joined
|
|||
dalek | frastructure-doc: bb00259 | moritz_++ | hosts/hack.p6c.org.pod: Updte sudoers list |
15:03 | |
FROGGS__ .oO( "Updte sders lst" - be consistent ) | 15:04 | ||
moritz | cnsstncy s vrrtd | 15:05 | |
15:05
atroxaper joined
15:10
rindolf joined
15:11
ssqq_ joined
15:14
ssqq left
15:19
zakharyas joined
|
|||
masak | ooh, I got a case where adding Grammar::Tracer changes the outcome of a parse :> | 15:27 | |
jnthn | So Grammar::Tracer is SO good it not only helps you debug your grammar, but magically makes it work too? :P | 15:29 | |
masak | no, it fails with a different failure. | ||
guess that qualifies as a Heisenbug. | |||
jnthn | Well, more likely a Grammar::Tracer spoiling something bug... | ||
masak | I took a snapshot of the files -- will look at it later. | 15:32 | |
right now it would be a detour. | |||
timotimo | masak: could be an optimizer bug | ||
oh, wait | |||
yeah, maybe | 15:33 | ||
masak | no matter what the cause, it would be interesting to track it down. | ||
timotimo | some time ago i had to teach the optimizer to just ignore the kinds of nodes the debugger adds to regexes | ||
otherwise it wouldn't turn a beginning-of-string anchor at the beginning into a direct fail instead of scanning through the whole string | 15:34 | ||
15:42
gaussblurinc_ joined
|
|||
smls | Ulti: «$seq.Bag.pick($seq)» can be written more simply as «$seq.Bag.pick(*)» (in your advent post draft) | 15:42 | |
[Coke] | .tell pmurias maybe just leave me a message this way. :) | 15:43 | |
yoleaux | [Coke]: I'll pass your message to pmurias. | ||
[Coke] | .tell pmurias we don't currently smoke nqp, just rakudo. I can see about setting up an nqp-only smoker, but the last time I tried to get nqp-js to work, I kept getting failures. | 15:44 | |
yoleaux | [Coke]: I'll pass your message to pmurias. | ||
smls | Ulti: «token record { ">"<id>" "<comment>"\n"<sequence> }» might benefit in readability from adding a space between each subrule. | 15:45 | |
moritz | and that's just style, but maybe use single quotes? | 15:47 | |
token record { '>' <id> ' ' <comment> \n <sequence> } | 15:48 | ||
15:50
bjz joined
15:56
spider-mario left
|
|||
[Coke] | broken record | 15:59 | |
masak | token effort | ||
vendethiel | why not use `my @report_lines = do for` in `method report`?(advent) | ||
pmurias | [Coke]: hi | 16:01 | |
yoleaux | 15:43Z <[Coke]> pmurias: maybe just leave me a message this way. :) | ||
15:44Z <[Coke]> pmurias: we don't currently smoke nqp, just rakudo. I can see about setting up an nqp-only smoker, but the last time I tried to get nqp-js to work, I kept getting failures. | |||
pmurias | [Coke]: what sort of failures are you getting? | ||
[Coke]: 'make test' works here so failure are interesting for me | 16:02 | ||
[Coke]: smoke testing for nqp-js would solve the most common 'missing dependency' style failures | 16:04 | ||
16:04
ssqq_ left
16:09
tinyblak_ left
16:12
tinyblak joined
16:15
zakharyas left
16:29
perltricks joined
16:46
Grrr_ joined
16:49
colomon joined
16:50
pmurias left
|
|||
perltricks | Hey y'all, are there any docs that descrbe the naming rules for variables? (other than S02) | 16:51 | |
masak | what are you after that you're not finding in S02? | 16:52 | |
16:53
ajr_ joined
|
|||
smls | doc.perl6.org/language/variables explains the twigils | 16:53 | |
(but not the rules for underscores/hyphens/apostrophes in custom variable names) | 16:54 | ||
perltricks | masak: i'm looking for rules in terms of what are legal names. I'm actually looking for module name rules, but assumed vars and modules/packages have the same rules. | ||
masak | yes. we call the common denominator an "identifier". | 16:55 | |
16:55
Grrr_ left
|
|||
Ulti | nooo my grammar doesnt work | 16:57 | |
so now I'm debugging it before the post :( | |||
masak | perltricks: the rule is this: alphanumerics and underscores are allowed, but the first char must not be a digit. before an alphabetic char you may also insert a single apostrophe (`'`) or hyphen (`-`). | ||
vendethiel | Ulti: grammar::debugger is very good :p | ||
masak | (but not before the first char) | ||
perltricks | masak: thank you! | 16:58 | |
masak | m: my $_-_-_-_ = 5; say $_-_-_-_ | ||
camelia | rakudo-moar 795a32: OUTPUT«5» | ||
masak | make that "before a non-numeric char". | ||
m: my $don't-try-this-at-home = "!"; say :$don't-try-this-at-home.perl | 16:59 | ||
camelia | rakudo-moar 795a32: OUTPUT«"don't-try-this-at-home" => "!"» | ||
ugexe | its adding a signature to $_? | 17:04 | |
17:06
sivoais joined
17:08
rurban left
|
|||
gtodd | perltricks: it's not a built in to the language rule perse but in PBP (or was it Advanced Perl Programming ...) I remember recommendations like: %hash = (a => , b=> 2); and $hash_ref = \%hash ; ... etc. (quasi guidelines for naming scalars used as references) ... I like those for self-documenting code etc. but with Perl6 ... hmm | 17:08 | |
17:08
rurban joined
|
|||
timotimo | ugexe: huh? | 17:08 | |
17:09
mvuets joined
|
|||
gtodd | perltricks: references are different or ermm everywhere but the idea of names that help document what is going on still applies ... I'd like to see a P6BP article about that :-D | 17:10 | |
on perltricks.com ... | |||
perltricks | gtodd: $++ thx for the tip | 17:11 | |
gtodd | after alll ... perl ... it's not really all that tricky ... :-D | ||
but still thanks for the tricks ... great site ++ | 17:12 | ||
Ulti | sooo this is weird my grammar is working but something is still borked | ||
Ulti scratches his head | |||
smls | Ulti: «.grep({ .value (cont) $phospho_site })» can be written as «.grep(*.value (cont) $phospho_site)» , and in «... if ($p53_gene (cont) $snp);» you can leave off the outer parens. | 17:14 | |
masak | ugexe: no, $_-_-_-_ is a different variable, no relation to $_ | 17:15 | |
17:15
gaussblurinc_ left
17:16
zakharyas joined
|
|||
Ulti | smls yeah but you can't for the other ones so I wanted to be consistent | 17:19 | |
out parens on the if is a good call though | |||
ok so in a grammar what is the syntax for an optional grouping of tokens | 17:20 | ||
I have a feeling shoving a ? where I have isn't doing what I think it does | |||
smls | [ ... ]? | 17:28 | |
Ulti | well that was fun :D | 17:30 | |
so this grammar for the advent cal is better than the one I've been using for a while lol | |||
should probably improve the tests | |||
smls | Ulti: With «token record { ^^ ">" <id> [" "<comment> "\n"]? <sequence> }» it can parse the snippets from the FASTA wikipedia page | 17:31 | |
Ulti | but yeah I didnt parse a FASTA without a comment before | ||
so that was fun | |||
smls yeah the idea is to have something a little more neat | 17:32 | ||
perltricks | gtodd: thx! | ||
Ulti | I also needed to change token to rule for the proto sequence bit because that obviously needs backtracking | ||
also the order was wrong | |||
(these are all good points to make) | |||
Ulti gets writing | 17:33 | ||
masak | Ulti++ | ||
Ulti | also jnthn++ for Grammar:Debugger its chuffing useful | 17:34 |