»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
BenGoldberg | m: use NativeCall; sub kill(Int $proc, Int $sig) is native {*}; kill($*PID,SIGINT); sleep 1 | 00:00 | |
camelia | rakudo-moar e7ec20: OUTPUT«(signal INT)» | ||
BenGoldberg | m: Proc::Async.kill($*PID,SIGINT); sleep 1 | 00:01 | |
camelia | rakudo-moar e7ec20: OUTPUT«Proc::Async is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting:1 in method FALLBACK at src/RESTRICTED.setting:31 in any at gen/moar/m-Metamodel.nqp:2869 in block <unit> at /tmp/oRWtOTFKL5:1» | ||
TimToady | locally: Too many positionals passed; expected 1 or 2 arguments but got 3 | 00:05 | |
BenGoldberg | Another bug is the fact that the restricted setting doesn't forbid 'is native' ;) | 00:06 | |
00:07
lichtkind_ joined
|
|||
TimToady | well, yes... | 00:08 | |
00:08
bcode is now known as ilbelkyr
|
|||
[Coke] | Can someone kill my copy of ssh-agent on hack? I think this is why I can't git. | 00:10 | |
00:10
bjz joined
|
|||
[Coke] | I can't seem to kill it. | 00:12 | |
TimToady | wrong owner? stuck in D state? | ||
not that I can help, given I probably don't even have an account... | 00:13 | ||
[Coke] | stuck in d | ||
which I guess means no, need to wait for a reboot. | 00:14 | ||
TimToady | then probably ... yeah | ||
leont | That really shouldn't happen :-/ | 00:15 | |
TimToady | The world has a way of disrespecting our shoulds and shouldn'ts. | 00:16 | |
00:21
leont left
|
|||
mr_ron | m: gist.github.com/ronaldxs/910f61f3c6c3fd4fa74d | 00:29 | |
camelia | rakudo-moar e7ec20: OUTPUT«Proc::Async is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting:1 in method new at src/RESTRICTED.setting:32 in block <unit> at /tmp/Fn5s1N9B77:1» | ||
00:32
yqt left
00:34
sufrostico left
|
|||
mr_ron | m: use NativeCall; sub kill(Int $proc, Int $sig) is native {*}; signal(SIGINT).tap( { say "signal ..." }); kill($*PID,SIGINT); sleep 4 | 00:37 | |
camelia | rakudo-moar e7ec20: OUTPUT«signal ...» | ||
mr_ron | it didn't work on my system ... not sure why ... seems to work here | 00:38 | |
00:40
skids joined
|
|||
BenGoldberg | m: use NativeCall; sub raise(Int $sig) is native {*}; raise(SIGINT); sleep 1; say 'alive'; | 00:40 | |
camelia | rakudo-moar e7ec20: OUTPUT«(signal INT)» | ||
BenGoldberg | j: use NativeCall; sub raise(Int $sig) is native {*}; raise(SIGINT); sleep 1; say 'alive'; | 00:41 | |
camelia | rakudo-jvm e7ec20: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8uAltaiPcCUndeclared name: SIGINT used at line 1» | ||
BenGoldberg | m: SIGINT.WHAT.say | 00:42 | |
camelia | rakudo-moar e7ec20: OUTPUT«(Signal)» | ||
BenGoldberg | m: Signal.say; | 00:43 | |
camelia | rakudo-moar e7ec20: OUTPUT«(Signal)» | ||
BenGoldberg | j: Signal.say; | ||
camelia | rakudo-jvm e7ec20: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E4O7Yk9FosUndeclared name: Signal used at line 1» | ||
00:43
tokuhiro_ joined
00:44
laouji joined
|
|||
BenGoldberg | Surely that's a jakudo bug; even if signals aren't properly implemented, the Signal enum should exist, and the &signal function should be defined, but throw an exception. | 00:45 | |
Or perhaps return a failure object. | 00:46 | ||
mr_ron | m: use NativeCall; sub kill(Int $proc, Int $sig) is native {*}; kill($*PID,SIGINT); sleep 1 # also doesn't work on my old Ubuntu system ... | 00:47 | |
camelia | rakudo-moar e7ec20: OUTPUT«(signal INT)» | ||
00:47
gensym left
|
|||
mr_ron | I don't get any output | 00:48 | |
00:48
tokuhiro_ left
|
|||
ShimmerFairy | mr_ron: that (signal INT) might be a camelia-specific thing. | 00:53 | |
I just ran the line myself, and got only a blank line | |||
BenGoldberg | Hmm, it occurs to me that on the JVM, we *could* pretend to handle SIGINT, via Runtime.getRuntime().addShutdownHook ... | 00:54 | |
If you're using bash or a similar shell, then $? will contain the exit/signal status of the last process you ran. | 01:02 | ||
ShimmerFairy | Ah, $? had 130 in it :) | 01:05 | |
BenGoldberg: so my guess is that $? (or equivalent) is how camelia produced the (signal INT) message. | |||
01:08
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:13
samb1 left
01:21
lichtkind_ left,
larion left
01:25
samb1 joined
|
|||
dalek | osystem: 368db23 | (Tokuhiro Matsuno)++ | META.list: Added HTTP::Parser |
01:25 | |
osystem: 2ce584e | (Zoffix Znet)++ | META.list: Merge pull request #63 from tokuhirom/http-parser Added HTTP::Parser |
|||
Zoffix | ^^ this person should really have a commit access to the repo. They have a ton of stuff in P5: metacpan.org/author/TOKUHIROM | 01:26 | |
01:28
lichtkind left
01:31
Possum joined
01:38
Possum left
01:40
Possum joined
|
|||
ShimmerFairy | I just got "Type check failed in binding $p; expected Panda::Project but got Seq" with panda | 01:45 | |
01:48
kid51 left
|
|||
TimToady | you need the latest panda | 01:52 | |
ShimmerFairy | I could've sworn I pulled panda, but maybe not... | ||
01:53
fling joined
|
|||
ShimmerFairy | turns out I didn't, whoops :P | 01:53 | |
01:57
AlexDaniel joined
02:10
perlatex joined
02:15
vvz left
|
|||
AlexDaniel | m: my @a := Array.new(:shape(3,3)); $a[1;1] = 42; say $a[1;1] | 02:15 | |
camelia | rakudo-moar e7ec20: OUTPUT«5===SORRY!5=== Error while compiling /tmp/W0FV__Hi7tVariable '$a' is not declared. Did you mean '@a'?at /tmp/W0FV__Hi7t:1------> 3my @a := Array.new(:shape(3,3)); 7⏏5$a[1;1] = 42; say $a[1;1]» | ||
AlexDaniel | ah right | 02:16 | |
m: my @a := Array.new(:shape(3,3)); @a[1;1] = 42; say @a[1;1] | |||
camelia | rakudo-moar e7ec20: OUTPUT«42» | ||
AlexDaniel | cool | ||
02:25
moznion_ joined
02:26
perlatex left
02:34
noganex_ joined
02:37
noganex left
02:40
kaare_ joined
|
|||
AlexDaniel | m: my @a := Array.new(:shape(3,3)); @a[1;1] = 42; say @a[1;25] | 02:43 | |
camelia | rakudo-moar e7ec20: OUTPUT«Index 25 for dimension 2 out of range (must be 0..2) in block <unit> at /tmp/VY2tubLYSJ:1» | ||
02:45
tokuhiro_ joined
02:47
mr_ron left
02:48
tokuhiro_ left,
mr_ron joined,
tokuhiro_ joined
|
|||
mr_ron | m: use NativeCall; sub kill(Int $proc, Int $sig) is native {*}; signal(SIGINT).tap( { say "signal ..." }); kill($*PID,SIGINT); sleep 1; kill($*PID,SIGINT); sleep 2; | 02:50 | |
camelia | rakudo-moar e7ec20: OUTPUT«signal ...signal ...» | ||
mr_ron | good ... | ||
03:13
baest left,
baest joined
03:28
yakudza left
03:49
vendethiel joined
03:50
laouji left
03:51
laouji joined
03:54
zacts|pi joined
03:55
laouji left
03:59
mr_ron left
04:03
zacts|pi left,
aborazmeh left
04:12
skids left
04:17
zacts|pi joined
04:26
khw left
04:30
fling left
04:33
fling joined
04:39
BenGoldberg left
04:41
laouji joined
04:50
mr_ron joined
04:51
vendethiel left
04:58
khw joined
|
|||
AlexDaniel | hm | 05:04 | |
m: my $a = 'й'; my $b = 'xD0xB8xCCx86'; say $a.chars; say $b.chars; say $a.codes; say $b.codes; | |||
camelia | rakudo-moar e7ec20: OUTPUT«1111» | ||
AlexDaniel | one is a single char, another one has a combining thingy | 05:05 | |
my understanding is that .codes should actually say 2 | |||
because if not, then what's the point of codes? | |||
.oO( what's the point of a code point ) |
05:06 | ||
ShimmerFairy | AlexDaniel: NFG strings compose to NFC first, in order to minimize the number of 'fake' codepoints that have to be generated. | 05:12 | |
AlexDaniel | ShimmerFairy: ok, then when “codes” and “chars” will have different output? | 05:13 | |
besides obvious cases | 05:14 | ||
ShimmerFairy | AlexDaniel: for Str, it's whenever there's a synthetic grapheme in it. | ||
TimToady | m: my $s = 'o⃝'; say $s.chars; say $s.codes; | 05:16 | |
camelia | rakudo-moar e7ec20: OUTPUT«22» | ||
TimToady | hmm | ||
ShimmerFairy | m: say .chars, " ", .codes given "*̈" # ASTERISK plus COMBINING DIAERESIS | ||
camelia | rakudo-moar e7ec20: OUTPUT«1 2» | ||
TimToady | m: say uninames('o⃝') | 05:17 | |
camelia | rakudo-moar e7ec20: OUTPUT«(LATIN SMALL LETTER O COMBINING ENCLOSING CIRCLE)» | ||
TimToady | dunno why that doesn't count as 1 char...may be a bug | ||
ShimmerFairy | TimToady: there's a bug on the devanagari grapheme used at the top of S15, because moar's "grapheme" criteria doesn't work for all graphemes. | 05:18 | |
(It checks CCC instead of using the regex for "extended grapheme cluster" specified in UAX#29(?), IIRC) | 05:19 | ||
TimToady | m: say 'o⃝'.UFD | ||
camelia | rakudo-moar e7ec20: OUTPUT«Method 'UFD' not found for invocant of class 'Str' in block <unit> at /tmp/XYahHZ7SQa:1» | ||
TimToady | m: say 'o⃝'.NFD | 05:20 | |
camelia | rakudo-moar e7ec20: OUTPUT«NFD:0x<006f 20dd>» | ||
TimToady | m: say uniprop(0x20dd) | ||
camelia | rakudo-moar e7ec20: OUTPUT«Me» | ||
TimToady | it's a mark, it should combine | ||
m: say uniprop(0x20dd,'ccc') | 05:21 | ||
camelia | rakudo-moar e7ec20: OUTPUT«0» | ||
TimToady | but, yeah | ||
I bet all the surrounding marks are 0 | |||
ShimmerFairy wonders how the NYI :uni adverb for strings and/or regexes would ensure that it doesn't mess with the source input's original format, and also supposes that the I in IO should use Uni instead of Str by default, or at least allow it as an option. | |||
TimToady | m: say uniprop(0x20dc,'ccc') | 05:22 | |
camelia | rakudo-moar e7ec20: OUTPUT«230» | ||
TimToady | yeah, since ccc is about stacking order, and enclosing marks don't have a stacking order... | 05:23 | |
ShimmerFairy | say "$_.ord.base(16) - $_.uniprop("ccc")" given "\c[COMBINING ENCLOSING SCREEN]" | ||
m: say "$_.ord.base(16) - $_.uniprop("ccc")" given "\c[COMBINING ENCLOSING SCREEN]" | |||
camelia | rakudo-moar e7ec20: OUTPUT«20E2 - 0» | ||
TimToady | so known bug, anyway | 05:24 | |
ShimmerFairy | Yeah, MVM should instead implement the EGC regex (in non-regex version, obviously) instead, but I don't know how difficult that would be to do. | 05:25 | |
(see www.unicode.org/reports/tr29/tr29-2...e_Clusters , I did remember the document correctly :P) | 05:26 | ||
05:26
zacts|pi left
|
|||
ShimmerFairy | m: say "\r\n".chars # which would incidentally make this a grapheme, making all future newline handling much simpler :) | 05:26 | |
camelia | rakudo-moar e7ec20: OUTPUT«2» | ||
TimToady | m: my $s = 'o⃗'; say $s.chars; say $s.codes; | 05:31 | |
camelia | rakudo-moar e7ec20: OUTPUT«12» | ||
grondilu | $ podchecker S99-glossary.pod | 05:43 | |
S99-glossary.pod has 46 pod syntax errors. | |||
^makes it annoying to read on the console | 05:44 | ||
grondilu will work on fixing these errors | |||
the syntax L</this|that> has been used and it's wrong if I'm not mistaken. | 05:45 | ||
instead it's L<that|/this> according to perlpod | 05:46 | ||
ShimmerFairy | Yes, though to be fair it is a bit unusual that a lot of the formatting codes switch things around when you want to add display text. | 05:47 | |
dalek | ecs: f6234f1 | (Lucien Grondin)++ | S99-glossary.pod: fix L</foo|bar> to L<bar|/foo> |
05:53 | |
[Tux] | test 50000 36.463 36.344 | 05:58 | |
test-t 50000 39.800 39.680 | |||
05:58
bjz left
|
|||
[Tux] | tux.nl/Talks/CSV6/speed4.html | 06:01 | |
06:02
bjz joined
06:03
gensym joined
|
|||
dalek | ast: 951b577 | TimToady++ | S03-operators/composition.t: unfudge passing test |
06:06 | |
06:33
mr_ron left
06:35
FROGGS joined
|
|||
dalek | kudo/nom: 8a195fa | TimToady++ | src/core/operators.pm: distinguish compositions of one-arg vs many-arg |
06:38 | |
ast: 2d49591 | TimToady++ | S03-operators/composition.t: test composition of multi-arg functions |
|||
ShimmerFairy | TimToady: I'm wondering, what prompted the addition of function composition? Was there some request for it that I missed, or did you just decide one day to put it in there? :) | 06:40 | |
06:40
domidumont joined
06:45
bjz left
06:50
bjz joined
06:56
AlexDaniel left
06:58
laouji left
06:59
laouji joined
|
|||
FROGGS | ShimmerFairy: my bet is that there is a rosettacode task about that topic :o) | 07:03 | |
TimToady | got it in one :) | ||
FROGGS | hehe | ||
07:03
travis-ci joined
|
|||
travis-ci | Rakudo build errored. TimToady 'distinguish compositions of one-arg vs many-arg' | 07:03 | |
travis-ci.org/rakudo/rakudo/builds/83253702 github.com/rakudo/rakudo/compare/e...195fa2c209 | |||
07:03
travis-ci left
|
|||
FROGGS | RDD - Rosettacode Driven Development | 07:04 | |
the travis failure just seems to be an unhappy VM | |||
(VM as in virtual pc) | 07:05 | ||
07:05
rindolf joined
|
|||
moritz | is there some way to reach the travis folks and let 'em fix it? | 07:05 | |
07:06
perlatex joined
|
|||
FROGGS | moritz: I guess it is just a hickup... | 07:09 | |
moritz: dunno if they let you contact them so that they will investigate... I guess their monitoring system will tell them anyway | 07:10 | ||
they were at the QA hackathon (because travis-ci++ was a sponsor), and they way I understand it is that they boot up VM snapshots, run our tests, and kill then shutdown the instances without storing their state | 07:11 | ||
that's why you can install stuff via apt without messing with anybody | 07:12 | ||
moritz | FROGGS: but wasn't travis unhappy yesterday as well? | ||
if so, it seems more than a one-time hiccup | 07:13 | ||
FROGGS | ohh, yesterday I've seen the nqp build fail, which was about failing tests for nqp-js | 07:15 | |
though, I've not payed much attention | 07:16 | ||
paid* | |||
07:19
pmurias joined
|
|||
pmurias | FROGGS: nqp-js build on travis is failing due to too old node | 07:20 | |
FROGGS: and sometimes due to random MoarVM segfaults | |||
FROGGS | pmurias: and the moarvm segfaults only happen on travis boxes? | 07:21 | |
07:23
Ven joined
07:24
RabidGravy joined
|
|||
zacts | hi perl6ers | 07:25 | |
FROGGS | hi zacts | 07:26 | |
zacts | FROGGS: are you the same entity of the nick frogs on #nemysis? | ||
FROGGS | no | ||
zacts | ah ok | ||
07:28
abraxxa joined
07:30
timbunce_ left
07:33
cognominal joined
07:47
g4 joined
|
|||
masak | good morning, #perl6 | 07:47 | |
today: Perl 6 day! \o/ | |||
moritz | \o/ | ||
masak | going to have a good deep look at 007. | ||
I have an ongoing cleanup/refactor that I almost finished during YAPC::Europe. | 07:48 | ||
one that will enable macros to do cooler things, no less. | |||
FROGGS | \o/ | 07:50 | |
Ven | \o/ | 07:51 | |
masak | have I talked enough about synthetic Qtrees with #perl6? I don't remember. | ||
Ven | .oO( I'll make you an' macro you won't be able to ignore ) |
||
masak | there are some insights there that might be interesting to share. | 07:52 | |
moritz | masak: have you talked about synaesthetic qtrees in #perl6? :-) | ||
masak | they are blue and smell like a frog's croak. | 07:53 | |
07:53
duncan_dmg joined
|
|||
timotimo | mhhh, macros to do color things | 07:54 | |
Ven has never heard FROGGS++ croak... but he did talk with him 'bout macros and slangs :-) | |||
timotimo | ... damn, CRLF as a single grapheme? | ||
that's just weird | |||
i can deal with stuff outside of the ASCII range being unicodey, but ... that? | 07:55 | ||
masak | timotimo: think of it as a ligature :P | 07:57 | |
nine | masak: Good morning! Before I forget again: I still think LINQ is a job for visitor macros and not for a slang, because LINQ does not introduce any new syntax. It's changing the semantics of existing syntax. And that's something visitor macros are good at. | ||
masak | nine: there are two parts of LINQ, as far as I understand. | ||
nine: one part is just ordinary method calls. | |||
nine: the other part is syntactic sugar. | |||
I may be wrong. | |||
nine: anyway, I agree with your general sentiment. if syntax is not changed, then visitor macros can do a good job. | 07:58 | ||
a lot of the "good job" hinges on the as-yet unspecified Qtree APIs being good. | 07:59 | ||
nine | In a hypothetical Perl 6 LINQ, you'll be able to say my $results = from $table select .foo where .foo > .bar; # from may be a function, select and where could be infix operators and .foo and .bar are just plain mehod calls. Only that the expression is not actually evaluated but changed by the visitor macro to pass a useful data structure to the where operator | 08:01 | |
Same for the .foo in the select list | |||
masak | that's not valid Perl 6 by any stretch. | ||
there's a TTIAR between $table and select | 08:02 | ||
nine | even if select is infix:<select>? | ||
masak | hm. | ||
I stand corrected -- that would work :) | |||
nine | \o/ | ||
timotimo | but how do we get the right $_ in there? | 08:04 | |
masak | macros. | ||
Ven | macros | ||
timotimo | oh, i thought we were saying we don't need macros | ||
carry on, then | |||
masak | visitor macros are a kind of "we don't need macros" macros :P | ||
nine | timotimo: no, we don't need a slang for that. Visitor macros would make implementing this trivial :) | 08:05 | |
Ven has been carrying that poor "on" around for a lot, in this functional age | |||
timotimo | neato | ||
masak | Ven: then you must be really relieved to see visitor macros. | ||
Ven | masak: I can implement "on" without visitor macros :P! just look at prelude.. | ||
masak | Ven: I'm not sure I understand what you mean by `on`, then. | 08:06 | |
the only thing I'm not quite clear on is how best to install visitor macros in the parser. | |||
Ven | masak: hackage.haskell.org/packages/archiv....html#v:on :P | ||
masak | ooh | 08:07 | |
timotimo | curry on | ||
masak | yeah, that reads very well | ||
Ven: I'm curious -- what determines the order in which abc are allocated in the type expression `(b -> b -> c) -> (a -> b) -> a -> a -> c` ? | 08:08 | ||
Ven | allocated? | 08:09 | |
masak | assigned? | ||
Ven | assigned, inferred? | ||
masak | I would have expected to see `(a -> a -> b) -> (c -> a) -> (c -> c -> b)` | ||
basically abc picked in order of appearance, left-to-right | |||
Ven | ahhh, okay. in a very theoritical way | 08:10 | |
masak | not that it matters at all -- it was just surprising to me to see b and c first | ||
Ven | (sorry, I'm writing gnuasm, so "allocated" has some meaning..) | ||
timotimo | i think it's just because the focus of the operator lies on the transformation function | 08:11 | |
and if you write it like that, the transformator function has the nice property of being a -> b | |||
masak | ah, good point | 08:12 | |
& | 08:13 | ||
08:16
darutoko joined
08:25
MARTIMM joined
|
|||
ShimmerFairy | timotimo: I agree that thinking of CRLF as a grapheme cluster is a bit interesting at first, but if you think about it, don't you already treat it like one? Wouldn't it be nice if you didn't have to add a "but if CRLF, advance by *two* instead of one" anymore? :) | 08:42 | |
08:47
broquaint left
08:54
MARTIMM left,
luiz_lha joined,
luiz_lha is now known as Guest23478
|
|||
timotimo | hmm | 08:55 | |
08:56
brrt joined
|
|||
ShimmerFairy | (CRLF also has a slight bonus of being the one NFG-only grapheme just about every programmer is familiar with ☺) | 08:57 | |
m: my token foo { foo {say $/.to } }; "foo" ~~ /<foo>/ | |||
camelia | rakudo-moar 8a195f: OUTPUT«3» | ||
ShimmerFairy | m: my token foo { {} foo {say $/.to } }; "foo" ~~ /<foo>/ | ||
camelia | rakudo-moar 8a195f: OUTPUT«0» | ||
ShimmerFairy | Interesting bug I found just now | ||
m: my token foo { {} foo {say $¢.pos; say $¢.MATCH.to } }; "foo" ~~ /<foo>/ | 08:59 | ||
camelia | rakudo-moar 8a195f: OUTPUT«30» | ||
ShimmerFairy | m: my token foo { foo {say $¢.pos; say $¢.MATCH.to } }; "foo" ~~ /<foo>/ | ||
camelia | rakudo-moar 8a195f: OUTPUT«33» | ||
08:59
Guest23478 is now known as luiz_lha
|
|||
ShimmerFairy | $¢ is unaffected, but for whatever reason $/ apparently gets constructed just once in a rule | 08:59 | |
lizmat | messages ? | 09:05 | |
yoleaux | 1 Oct 2015 23:36Z <timotimo> lizmat: i wonder if push-exactly should check for "will we reach the end?" at the beginning and then perhaps use a tiny bit better code? | ||
09:05
Ven left
09:06
broquaint joined
|
|||
lizmat | .tell timotimo 1. I don't expect push-exactly to be called much, 2 if it is called, it is most likely *not* yet exhausted, so adding extra code for it seems like a waste to me | 09:06 | |
yoleaux | lizmat: I'll pass your message to timotimo. | ||
09:07
aborazmeh joined,
aborazmeh left,
aborazmeh joined
09:12
cognominal left,
][Sno][ joined
09:15
n_i_c_k_ joined,
krakan_ joined,
kaare__ joined
09:16
inokenty1 joined
09:17
shmibs_ joined,
bakedb_ joined,
n_i_c_k left,
frew left,
[Sno] left,
Alina-malina left,
zacts left,
mprelude left,
kaare_ left,
bakedb left,
sftp left,
sftp_ joined
09:18
sftp_ is now known as sftp,
zacts` joined,
Ven joined
09:19
frew joined
|
|||
brrt | good netsplit #perl6 | 09:20 | |
lizmat | ShimmerFairy: apart from CRLF being a single synthetic grapheme | ||
brrt o/ | |||
brrt | \o lizmat | ||
ShimmerFairy | lizmat: I don't quite follow? | ||
09:21
mprelude joined
|
|||
lizmat | I have this idea of having some type of quoting language that would allow *bytes* to become synthetic graphemes | 09:21 | |
and thus allow the regex engine to be used to match binary structures | |||
ShimmerFairy | lizmat: hmm... I think a variation of the regex engine that works on Blobs would be better suited, ultimately, but an interesting idea nonetheless. | 09:22 | |
lizmat | and have some sort of unpack be able to generate the right synthetics out of a binary blob | ||
ShimmerFairy | I was writing up my thoughts on the subject, but I don't think I've shared it. I'll take a look. | 09:23 | |
brrt | curious but sceptical | ||
lizmat | in that way, I envision being able to match mixed text and binary structures | ||
brrt | what whould you want to do with matching binary structures? | ||
hmm, i already know of a purpose perhaps | |||
lizmat | :-) | ||
brrt | o5m files (binary xml) | ||
maybe it's a good idea | 09:24 | ||
lizmat | it would certainly reduce the maintenance overhead (only 1 regex engine to support) | ||
brrt | current development culture is very much built on the notion that we have to completely parse-and-extract binary files | 09:25 | |
for many things that is way too much overhead | |||
lizmat | and afaics, it would not require any extra work on the regex engine, as it would just be another synthetic unicode | ||
brrt | well, one thing i wonder about is that our current regex engine is not really fast | 09:26 | |
lizmat | wouldn't / shouldn't the jit take care of a lot of that ? | 09:27 | |
09:27
vvz joined
|
|||
brrt | yes and no. | 09:27 | |
it is my opinion that rakudo frames are Too Damn Large and Too Damn Nested | |||
ShimmerFairy | lizmat: here's what I was working on, but as you can see it was left incomplete: gist.github.com/ShimmerFairy/72a25...9aab077158 | 09:28 | |
lizmat | blogs.perl.org/users/gabor_szabo/20...eased.html # gabszab++ for including rakudo | ||
brrt | and that a lot can be gained by making them smaller if we can | ||
09:28
telex left
|
|||
brrt | and that all happens so far before the JIT | 09:29 | |
of course, the JIT still needs to get much better, no arguing about it | |||
09:29
espadrine joined
|
|||
brrt | it's just that my utter inability to make a perl6 code Do What I Mean in terms of generating a specific moarvm frame sequence is a little disheartening | 09:30 | |
09:30
telex joined
|
|||
brrt | also, that is of course utterly my own problem | 09:31 | |
ShimmerFairy | lizmat: as you can see, I basically think of "binary grammars" as having a somewhat limited syntax, that's only vaguely regex-like. | 09:32 | |
Ven | ShimmerFairy: have you seen binary destructuring in other languages? | 09:33 | |
ShimmerFairy | (fwiw I'd be quite surprised if we figured out binary data parsing before christmas. There's a reason I left pack/unpack explicitly unspecified in the S32::Stringy draft I wrote :P) | ||
Ven | (i.e. Elixir) | ||
ShimmerFairy | Ven: no, admittedly. I pretty much had just my own experiences in reading binary files (in C++ usually) when writing that gist | ||
09:33
espadrine_ joined
09:34
espadrine left
|
|||
ShimmerFairy | The <,u8 foo bar baz> for example is from when I've read file headers with a long series of same-sized types :) | 09:34 | |
Ven | ShimmerFairy: if you have a few minutes, I'd recommend looking at zohaib.me/binary-pattern-matching-in-elixir/ . I like Elixir's syntax quite a lot | ||
lizmat | what was the incantation for profiling the setting again? | 09:35 | |
Ven | ShimmerFairy: also, erlang.org/doc/reference_manual/expressions.html (scroll down to "8.17 Bit Syntax Expressions") | 09:36 | |
09:37
pmurias_ joined
|
|||
pmurias_ | FROGGS: I think they just happen randomly | 09:37 | |
FROGGS | pmurias: k, :/ | 09:38 | |
pmurias: and they arn't reproduceable? | |||
09:38
pmurias left
|
|||
FROGGS | on our boxes I mean | 09:38 | |
09:38
pmurias_ is now known as pmurias
|
|||
pmurias | FROGGS: I think I have seen them on my machine a few times | 09:39 | |
FROGGS | well, that's something | ||
pmurias | FROGGS: they happened more often on an older MoarVM version | ||
eiro | hello | ||
Ven | o/ | ||
eiro | preparing slides to present perl6, i'm searching for a perl6 class hierarchy diagram (.dot or .svg) | 09:40 | |
i imagine i's available in the doc repo, anyone ? | |||
ShimmerFairy | Ven: aside from the unclear binary - size(8) syntax to specify length, it does look nice (looking at just the first link so far). I think the syntax I've come up with in my gist is kinda similar to it, at least :) | 09:42 | |
dalek | p: d1fcbf0 | (Pawel Murias)++ | src/vm/js/ (3 files): [js] serialize code refs marked as static |
||
p: 99a2119 | (Pawel Murias)++ | src/vm/js/bin/run_tests: [js] Pass test t/serialization/02-types.t |
|||
lizmat | eiro: moritz might know | ||
Ven | ShimmerFairy: yeah, it is a bit weird, but has the nice side effect to be extensible/dynamic | ||
lizmat | eiro: I don't recall such an (up-to-date) beast to exist at the moment | ||
we've recently had quite a shuffle of classes with the GLR and followup refactors such as the GMR | 09:43 | ||
pmurias | FROGGS: I might be able to reproduce the segfaults with doing make clean; make x100 times haven't cecked yet | ||
ShimmerFairy | Ven: I think something that doesn't use subtraction in a _length_ specifier would be far better, in that one case :) | ||
timotimo | brrt: i absolutely agree that our frames have to shrink a bit | 09:44 | |
yoleaux | 09:06Z <lizmat> timotimo: 1. I don't expect push-exactly to be called much, 2 if it is called, it is most likely *not* yet exhausted, so adding extra code for it seems like a waste to me | ||
timotimo | brrt: do you have a clue or multiple clues what in particular could be attacked in that area? | ||
brrt | well, maybe it's a good post-6.christmas project | ||
no, i have no idea | 09:45 | ||
timotimo | do you think the amount of registers we have is too overheady? | ||
brrt | my suspicion is that there are many others who have a better idea | ||
actually, no, i don't think so. i've never run out of GPR registers yet in the JIT | |||
what i do think is that the new jit will need a powerful way to analyse what must go into vm virtual registers and what only has a temporary meaning | 09:46 | ||
FROGGS | eiro: I was under the impression that a "complete" would exist, but I can only find these: docs.perl6.org/images/ | 09:47 | |
brrt | but that's bittwiddling | ||
brrt lunch& | |||
09:47
travis-ci joined
|
|||
travis-ci | NQP build failed. Pawel Murias '[js] Pass test t/serialization/02-types.t' | 09:47 | |
travis-ci.org/perl6/nqp/builds/83272661 github.com/perl6/nqp/compare/8402c...a21194859c | |||
09:47
travis-ci left,
brrt left
|
|||
FROGGS | eiro: ohh, look: docs.perl6.org/images/type-graph-Any.svg | 09:47 | |
timotimo | brrt, i know there's cases where we could inline blocks but we aren't; sadly, the obvious fix causes problems. | 09:48 | |
lizmat | FROGGS eiro : that's what I meant with up-to-date: EnumMap is dead :-( | ||
ShimmerFairy | Ven: correct me if I'm wrong, but the big problem I see in the syntax for Elixir is that there's no room for alternations or anything; a parser for z-machine files, for example, would benefit greatly from being able to use multis for different header versions. | 09:49 | |
FROGGS | lizmat: well, it is less then a month old... so it can be updated quickly I guess | ||
Ven | ShimmerFairy: that's right. you have to do it in several "times". extract it once, "switch" (case) on it, and each case can do its thing differently | ||
lizmat | FROGGS: maybe it just needs to be regenned ? | 09:50 | |
FROGGS | lizmat: most likely | ||
dalek | Heuristic branch merge: pushed 16 commits to rakudo/curli by lizmat | 09:51 | |
eiro | awesome! thanks lizmat and FROGGS | ||
lizmat | FROGGS: wasn't there a way to profile the settings ? | ||
FROGGS | you can --profile-compile a script | 09:53 | |
but if you'd --profile the setting, you'd get a profile which is too big to load it | |||
lizmat | :-( | ||
ShimmerFairy | Ven: also, I didn't spot anything similar to my admittedly weird <&& ...> idea :P | 09:54 | |
Ven | *g* | ||
09:58
leont joined
10:01
Alina-malina joined
|
|||
FROGGS | .tell moritz rakudo (via rakudobrew) needs to be upgraded to unbreak htmlify of the docs... I'd almost do it but the rakudobrew seems to be globally used... can I just continue? | 10:05 | |
yoleaux | FROGGS: I'll pass your message to moritz. | ||
moritz | FROGGS: yes, go ahead | 10:09 | |
yoleaux | 10:05Z <FROGGS> moritz: rakudo (via rakudobrew) needs to be upgraded to unbreak htmlify of the docs... I'd almost do it but the rakudobrew seems to be globally used... can I just continue? | ||
10:09
abaugher left
|
|||
dalek | kudo/nom: d028dae | lizmat++ | src/core/Any-iterable-methods.pm: More whitespace correction for readability |
10:09 | |
10:09
abaugher joined
|
|||
_itz | what was the reason the REPL used linenoise rather than linedit or readline? | 10:22 | |
s/linedit/editline | |||
FROGGS | m: $_ = [42]; say [.[0].Num] | 10:23 | |
camelia | rakudo-moar 8a195f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BsayF9F0wpUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/BsayF9F0wp:1------> 3$_ = [42]; say [.[7⏏050].Num]» | ||
FROGGS | star-m: $_ = [42]; say [.[0].Num] | ||
camelia | star-m 2015.03: OUTPUT«42» | ||
FROGGS | :/ | ||
10:24
aborazmeh left
|
|||
FROGGS | m: $_ = [42]; say [.[0].Num] # TimToady: was that you? | 10:25 | |
camelia | rakudo-moar 8a195f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AR78nvpnh1Unsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/AR78nvpnh1:1------> 3$_ = [42]; say [.[7⏏050].Num] # TimToady: was that you?» | ||
lizmat | m: $_ = [42]; say [ . [0].Num] | ||
camelia | rakudo-moar 8a195f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s9T_gkfKtZUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/s9T_gkfKtZ:1------> 3$_ = [42]; say [ . [7⏏050].Num]» | ||
lizmat | m: $_ = [42]; say [. [0].Num] | ||
camelia | rakudo-moar 8a195f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0YBcEBySVaUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/0YBcEBySVa:1------> 3$_ = [42]; say [. [7⏏050].Num]» | ||
FROGGS | m: $_ = [42]; say .[0].Num | 10:26 | |
camelia | rakudo-moar 8a195f: OUTPUT«42» | ||
10:26
leont left
|
|||
_itz | www.ulalaunch.com/webcast.aspx | 10:28 | |
10:29
Ven left
10:34
aborazmeh joined,
aborazmeh left,
aborazmeh joined
10:35
pmurias left,
orbusbak joined
10:36
sjn_phone_ joined
10:38
orbus left
10:39
travis-ci joined,
Ven joined
|
|||
travis-ci | Rakudo build passed. Elizabeth Mattijsen 'More whitespace correction for readability' | 10:39 | |
travis-ci.org/rakudo/rakudo/builds/83275894 github.com/rakudo/rakudo/compare/8...28daed9c32 | |||
10:39
travis-ci left
10:41
timbunce_ joined
10:46
bjz left,
bjz joined
10:50
sjn_phone_ left
10:52
TEttinger left
11:00
Ven left
11:02
aborazmeh left
11:05
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
dalek | kudo/nom: e19a521 | lizmat++ | src/core/Any-iterable-methods.pm: Some comments + code legibility |
11:06 | |
lizmat | .tell jnthn could you look at gist.github.com/lizmat/9f95a6f75f27cebecd65 and see if I made any obvious mistakes there ? | 11:08 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
lizmat | .tell jnthn it compiles/builds ok, seems to handle simple cases ok, but causes sever spectest fallout in weird ways | ||
yoleaux | lizmat: I'll pass your message to jnthn. | ||
lizmat | .tell such as Cannot invoke this object (REPR: Uninstantiable) | ||
yoleaux | lizmat: I'll pass your message to such. | ||
lizmat | .tell jnthn documentation on nqp::handle would also be appreciated :-) | 11:09 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
11:18
aborazmeh left,
abaugher left
11:19
abaugher joined
11:22
laouji left
11:26
kid51 joined
11:29
larion joined
|
|||
pink_mist | lizmat: "such as Cannot invoke.." wasn't sent to jnthn | 11:29 | |
lizmat | pink_mist: thanks for noticing | 11:30 | |
masak | ShimmerFairy: did you submit the .to thing? | 11:32 | |
ShimmerFairy | masak: yes, and it isn't .to specifically, but $/ in general :) | ||
masak | *nod* | 11:35 | |
lizmat | .tell jnthn is it correct that we cannot .Slip a container ? | 11:39 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
11:56
sufrostico joined
11:58
ely-se joined
|
|||
ely-se | On a scale from nonexisting to stable, where is Perl 6 now? :p | 11:58 | |
12:00
mr_ron joined
|
|||
nine | I'd say we're very well into the third 80 % | 12:01 | |
ely-se | neat | 12:02 | |
masak | it's not stable for all uses I can imagine for it, but for quite a lot of the important ones. | 12:04 | |
pink_mist is quite unsure what 'the third' means in nine's sentence ... but then, that may have been intended | 12:05 | ||
FROGGS | pink_mist: in software developement you usually complete a project up to 80%, and then the rest takes also the same amount as time so you call it the second 80% | 12:06 | |
pink_mist | ohhh, neat =) | ||
masak wonders if and when we'll hit a fourth 80% | 12:07 | ||
ShimmerFairy | I'm waiting for the sixth 80% :P | ||
FROGGS | the third 80% are perhaps after that hump | ||
nine | pink_mist: it was an allusion to Larry's "We're done with about 80% of the design now we're working on the second 80%" | 12:08 | |
ely-se | 20% to go until world domination | 12:11 | |
12:13
Ven joined
12:15
maddingu1 joined
|
|||
masak | question: I have two variables, $x and $y. I want to pass either just `$x` or `$x, $y` to a function &foo, passing $y iff $y is defined | 12:16 | |
the way to do this pre-GLR used to be `$x, |$y` | |||
this does not seem to work anymore. what's the new way? :) | |||
12:17
maddingue left,
bakedb_ left
|
|||
masak | m: sub foo($x, $y?) { say $y.defined ?? "got \$y" !! "no \$y" }; foo(1); foo(1, 2) | 12:17 | |
camelia | rakudo-moar e19a52: OUTPUT«no $ygot $y» | ||
masak | m: sub foo($x, $y?) { say $y.defined ?? "got \$y" !! "no \$y" }; for 5, Any -> $y { foo(1, |$y) } | 12:18 | |
camelia | rakudo-moar e19a52: OUTPUT«got $yno $y» | ||
masak | hm. | ||
12:18
bakedb joined
|
|||
masak | seems it *does* work. | 12:18 | |
ok, back to the drawing board. something else is wrong with my program... | |||
nine | m: sub foo($x, $y?) { say $y.defined ?? "got \$y" !! "no \$y" }; for 5, Any -> $y { foo(1, $y) } | 12:19 | |
camelia | rakudo-moar e19a52: OUTPUT«got $yno $y» | ||
nine | masak: no, your test is broken | ||
masak: it does not differ between Any being passed as $y and no $y at all | |||
m: multi sub foo($x, $y) { say "y: $y"; }; multi sub foo($x) { say "no y"; }; my $x = 1; for 2, Any -> $y { foo($x, |($y.defined ?? $y !! Empty)); } | 12:21 | ||
camelia | rakudo-moar e19a52: OUTPUT«y: 2no y» | 12:22 | |
nine | ^^^ would be my first take | ||
masak | yeah | ||
seems I was actually using Nil, not Any | |||
nine | Which is pretty much exactly what I would do in Perl 5 | 12:23 | |
masak | m: my $x = Empty; say $x ~~ Empty | ||
camelia | rakudo-moar e19a52: OUTPUT«True» | ||
12:26
cognominal joined,
Ven left
12:28
ely-se left
|
|||
dalek | kudo/nom: e3717ef | lizmat++ | src/core/List.pm: Make List.keys many times faster on finite lists |
12:28 | |
lizmat | and that includes Arrays :-) | 12:29 | |
nine | lizmat: I love it when two lines of code improve performance a lot :) | 12:30 | |
12:30
Ven joined
|
|||
lizmat | :-) | 12:31 | |
cycling& | |||
masak | m: say <a b c>.map({ (state $)++ }) | ||
camelia | rakudo-moar e19a52: OUTPUT«(0 1 2)» | ||
masak | m: say <a b c>.map({ $++ }) | ||
camelia | rakudo-moar e19a52: OUTPUT«(0 1 2)» | ||
12:34
maddingu1 is now known as maddingue
|
|||
cognominal | m: my $a:foo<bar> = 42; say $a | 12:48 | |
camelia | rakudo-moar e19a52: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HHa8yEbkBGVariable '$a' is not declaredat /tmp/HHa8yEbkBG:1------> 3my $a:foo<bar> = 42; say 7⏏5$a» | ||
cognominal | m: my $a:foo<bar> = 42; say $a:foo<bar> | ||
camelia | rakudo-moar e19a52: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UqbULlNjB1Variable '$a' is not declaredat /tmp/UqbULlNjB1:1------> 3my $a:foo<bar> = 42; say 7⏏5$a:foo<bar>» | ||
12:49
olinkl joined,
rurban joined
12:51
abraxxa left
12:53
travis-ci joined
|
|||
travis-ci | Rakudo build errored. Elizabeth Mattijsen 'Make List.keys many times faster on finite lists' | 12:53 | |
travis-ci.org/rakudo/rakudo/builds/83292961 github.com/rakudo/rakudo/compare/e...717ef1331c | |||
12:53
travis-ci left
12:56
diana_olhovik_ joined,
ely-se joined
13:09
tokuhiro_ left
13:10
perlatex left
|
|||
dalek | rl6-roast-data: cf49fa5 | coke++ | / (9 files): today (automated commit) |
13:12 | |
rl6-roast-data: 5d91526 | coke++ | / (9 files): today (automated commit) |
|||
kudo-star-daily: 752e2e8 | coke++ | log/ (9 files): today (automated commit) |
13:13 | ||
kudo-star-daily: c3de848 | coke++ | log/ (9 files): today (automated commit) |
|||
[Coke] | (someone pointed out I can just ignore that ssh-agent and start up a new one) | 13:14 | |
13:32
FROGGS left
13:55
ely-se left
13:59
larion left,
pyrimidi_ joined,
ely-se joined
14:01
pyrimidine left
14:04
skids joined
14:06
Skarsnik joined
14:10
tokuhiro_ joined
|
|||
Skarsnik | Hm, I have a weird issue with DBIis (using Pg). When I use fetchrow_hashref. The hash is broken in a weird way. like the value don't hold type ($value.WHAT warn and return nothing). I can't even write $hashref.perl pastebin.com/Kr15biPh | 14:11 | |
yoleaux | 1 Oct 2015 06:33Z <FROGGS> Skarsnik: You'd declare the CStruct as 'class Foo is repr<CStruct> { has int32 $.bar }' and then 'say nativecast(Foo, $pointer)' | ||
14:13
FROGGS[tab]_ left,
domidumont left
|
|||
moritz | Skarsnik: try $value.^name instead of .WHAT | 14:14 | |
14:14
domidumont joined,
tokuhiro_ left
|
|||
Skarsnik | hm, it's all str type. Should it be Str that $hashref.perl could work? | 14:18 | |
masak | could someone with Sherlock Holmes-like faculties have a look at a weird error in 007? gist.github.com/masak/56e03f67ab6f030791e7 | 14:19 | |
I realize I'm not following error reporting best practices here, since the debug statements, and the refactor that causes the bug, are both local and unpushed | 14:24 | ||
but maybe someone can spot something obvious that I'm missing? | |||
14:25
iH2O joined
|
|||
masak looks again and goes "...oh" | 14:26 | ||
14:28
skids left,
iH2O left
14:30
skids joined
|
|||
masak | m: sub f { my &b = { return 5 }; sub g { &b() }; g(); say "dead code" }; f() | 14:33 | |
camelia | ( no output ) | ||
masak | m: sub f { my &b = { return 5 }; sub g { &b() }; g(); say "dead code" }; say f() | ||
camelia | rakudo-moar e3717e: OUTPUT«5» | ||
ilmari | masak: an escape continuation! | 14:34 | |
s/an/a wild/; s/!/appears!/ | |||
masak | so here's the thing: when we enter &f, the lexical sub &g gets a "refresh" in that its OUTER switches from &f's static frame/lexpad to the runtime one that was created when entering &f | ||
does someone know where this happens in Rakudo? I'm curious about the mechanism. | |||
14:35
g4 left
|
|||
masak | or maybe it's all handled in nqp? | 14:36 | |
14:36
reneeb joined
|
|||
masak | or down on the Moar level, even? | 14:38 | |
ilmari: that may be a way to think about it. in my mind, it's just "return binds to subs, not blocks" | 14:39 | ||
in some sense, a sub must have knowledge of what blocks it contains, so that it can go and update the OUTER on all of them. | 14:45 | ||
timotimo | hey Skarsnik | 14:47 | |
have you found out anything about what's wrong yet? | |||
m: my Str $foo = "hello"; say $foo.WHAT | 14:48 | ||
camelia | rakudo-moar e3717e: OUTPUT«(Str)» | ||
timotimo | m: my Str $foo = "hello"; say $foo.WHAT ~ ": value"; | ||
camelia | rakudo-moar e3717e: OUTPUT«Use of uninitialized value of type Str in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/FNbhJMawSi:1: value» | ||
timotimo | you're using a rakudo version that's a bit older and doesn't yet have this extra bit of text telling you what you could do instead | ||
moritz | m: my Str $foo = "hello"; say $foo.^name ~ ": value"; | 14:49 | |
camelia | rakudo-moar e3717e: OUTPUT«Str: value» | ||
timotimo | the thing is, a regular "say" on the .WHAT will call .gist on it, which gives you the helpful output | ||
masak | food & | ||
timotimo | but the ~ operator will call .Str on it, which will give you that warning, because it indicates you've likely got a logic error somewhere | ||
as in: expected a defined string in a string concatenation, but got an undefined string instead | |||
Skarsnik | that pretty weird. it does not evaluate the concatenation first? | 14:50 | |
timotimo | it does | ||
the concatenation is what calls .Str | |||
and that explodes | |||
Skarsnik | m: my Str $foo; $foo.WHAT.Str; | ||
camelia | rakudo-moar e3717e: OUTPUT«Use of uninitialized value of type Str in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/KO0jNKXaOJ:1» | ||
Skarsnik | ok | ||
timotimo | the other thing is a bit more puzzling; the thing with $hashref | 14:51 | |
Skarsnik | all type are str not Str. probably the issue? | ||
timotimo | what types? | ||
i don't see any types there :\ | |||
oh, that's what that loop returns? | 14:52 | ||
Skarsnik | $value.^name give me str | ||
timotimo | huh, interesting | ||
i hadn't realized we can pass that stuff along in hashes without getting a box built for it | 14:53 | ||
14:54
duncan_dmg left
|
|||
Skarsnik | I expected DBIish to give me the type associate with the field too x) | 14:54 | |
14:55
duncan_dmg joined
|
|||
timotimo | to figure that out, you'll probably have to dig into the code | 14:55 | |
github.com/perl6/DBIish/blob/maste...ish/Pg.pm6 | 14:56 | ||
14:59
][Sno][ left
|
|||
timotimo | it seems like Pg is just calling PQgetvalue and just works with strings? | 15:00 | |
there's probably a way to ask pq what type is going to come up and then use a different getvalue function | 15:01 | ||
Skarsnik | what does Z does in github.com/perl6/DBIish/blob/maste...DBDish.pm6 fetchcall-hash | 15:02 | |
timotimo | did you know you can click on the line numbers and the url will change to include that line number? | ||
it's the zip metaoperator | |||
that line is responsible for adding an empty array as the value for all of names' entries as the keys | 15:03 | ||
that sentence didn't grammar :? | |||
here's an example: | |||
m: say <foo bar baz> Z=> 1, 2, 3 | |||
camelia | rakudo-moar e3717e: OUTPUT«(foo => 1 bar => 2 baz => 3)» | ||
timotimo | m: my %res = <foo bar baz> Z=> 1, 2, 3; say %res.perl | ||
camelia | rakudo-moar e3717e: OUTPUT«{:bar(2), :baz(3), :foo(1)}» | ||
timotimo | the thing is: Z will stop at the shorter of the two sequences on both sides | 15:04 | |
that's why it says [] xx * on the RHS | |||
that's an infinite stream of new arrays | |||
so that the right hand side is never responsible for stopping the sequence | |||
does thath elp? | |||
Woodi | hi #perl6 :) | ||
timotimo | greetings woodi | ||
Skarsnik | ..should the Pg module convert the str to Str? since str are just native type? | 15:07 | |
Woodi | for me LINQ is a bit baroque and unnecesary mental context switch. an realy how it works ? it already have some ActivRecord fetched from database and just doing .grep( $_ < $a ) or it translates into db engine calls and then fetches things ? | ||
timotimo | AFAIK it can also generate db engine calls | ||
Skarsnik: good question; as i said, i didn't our hashes can just hold str objects :) | 15:08 | ||
Skarsnik | there is a LINQ equivelent in perl6? | 15:09 | |
timotimo | people are suggesting it and discussing how best it could be implemented | ||
15:10
diana_olhovik_ left
|
|||
Skarsnik | well having a sql like syntax to search in your own container is nice | 15:10 | |
timotimo | hmm. it could be that the "also handle self-referential data structures in .perl" code that was added ~a month ago doesn't handle native str and friends well | 15:11 | |
i haven't looked at that code at all yet | |||
m: my str $foobar; say $foobar.WHERE | 15:12 | ||
camelia | rakudo-moar e3717e: OUTPUT«139691431830272» | ||
timotimo | hm, that's not it at least | ||
m: my str $foobar; say $foobar.perl | |||
camelia | rakudo-moar e3717e: OUTPUT«""» | ||
timotimo | m: my str $foobar; say $foobar.WHICH | 15:13 | |
camelia | rakudo-moar e3717e: OUTPUT«Str|» | ||
timotimo | m: my str $foobar = "hello"; say $foobar.WHICH | ||
camelia | rakudo-moar e3717e: OUTPUT«Str|hello» | ||
timotimo | m: my str $foobar = "hello"; say $foobar.WHERE | ||
camelia | rakudo-moar e3717e: OUTPUT«140081669525640» | ||
timotimo | hmm. | ||
Skarsnik | the Pg module has a method to get the type of the column, but it's not used github.com/perl6/DBIish/blob/maste...g.pm6#L307 | 15:14 | |
timotimo | ah, i see | ||
hmm. | |||
Skarsnik | should I fill an issue on the module page? | 15:15 | |
timotimo | at the very least, that'll be interesting for tracking things | ||
Skarsnik | btw, how can I call a MyClass.New(%hash) and the hash is the list of named parameter? I wanted to fill my class directly like that x) (since the table has the same col names) | 15:17 | |
PerlJam | Skarsnik: |%hash | 15:18 | |
gfldex | m: my %h{'a', 'b', 'c'}; %h.perl.say; | ||
camelia | rakudo-moar e3717e: OUTPUT«(my Any % = )» | ||
gfldex | m: my %h{'a', 'b', 'c'}; %h.perl.say; my %welp{<a b c>}; %welp.perl.say; | ||
camelia | rakudo-moar e3717e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/53ni2meJTEInvalid hash shape; type expectedat /tmp/53ni2meJTE:1------> 3b', 'c'}; %h.perl.say; my %welp{<a b c>}7⏏5; %welp.perl.say; expecting any of: constraint» | ||
gfldex | is that GLR fallout? | ||
m: my %h{'a'..'c'}; %h.perl.say; | 15:19 | ||
timotimo | since when do we support %h{'a', 'b', 'c'} ?!? | ||
camelia | rakudo-moar e3717e: OUTPUT«===SORRY!===Cannot find method 'value'» | ||
moritz | Skarsnik: MyClass.new(|%hash) | ||
Skarsnik | obviously that does not work :) Type check failed in assignment to '$!id'; expected 'Int' but got 'str' | ||
moritz | Skarsnik: well, the hash must be built correctly first :-) | 15:20 | |
even Perl 6 does not have a "do magic, make it work" command | |||
15:20
ely-se left
|
|||
timotimo | moritz: well, DBIish is allegedly building it wrong :) | 15:22 | |
[Coke] | m: do .WHAT, now | ||
camelia | ( no output ) | ||
timotimo | m: my str $thing = "hi"; my %foo; %foo{'me'} = $thing; say %foo{'me'}.WHAT | ||
camelia | rakudo-moar e3717e: OUTPUT«(Str)» | ||
moritz | timotimo: is it "let's blame the library, DWIM, dammit" time? | 15:23 | |
timotimo | haha | ||
Skarsnik | in this case, yes x) | ||
PerlJam | I didn't think DBIish knew much about how to translate "stuff in database" into "properly typed stuff in Perl 6" | ||
gfldex | m: my %h{'a', 'b', 'c'}; %h.perl.say; %h<b> = 42; %h.gist.say; %h<c> = 666; %h.gist.say; | ||
camelia | rakudo-moar e3717e: OUTPUT«(my Any % = )b => 42b => 42, c => 666» | ||
gfldex | timotimo: don't worry, it isnt really supported :) | ||
nvm, my bad | 15:24 | ||
m: my %h{'a', 'b', 'c'}; %h.perl.say; %h<b> = 42; %h.gist.say; %h<e> = 666; %h.gist.say; | |||
camelia | rakudo-moar e3717e: OUTPUT«(my Any % = )b => 42b => 42, e => 666» | ||
timotimo | shouldn't it NYI in that case? | ||
Skarsnik | how to cast str to Str? | 15:25 | |
gfldex | there are no spec tests that i could find | ||
PerlJam | gfldex: I'd expect consistent failure rather than doing something that appears to work but doesn't | ||
timotimo | m: my Str $foo; my str $bar = "hello"; $foo = $bar; say $foo.WHAT | ||
camelia | rakudo-moar e3717e: OUTPUT«(Str)» | ||
timotimo | m: say (my str $foo = "hi").Str.WHAT | ||
camelia | rakudo-moar e3717e: OUTPUT«(Str)» | ||
timotimo | m: say (my str $foo = "hi").WHAT | ||
camelia | rakudo-moar e3717e: OUTPUT«(Str)» | ||
timotimo | ... | ||
i'm not sure how to even pass around a str without it becoming a Str automatically | 15:26 | ||
Skarsnik | let's see | ||
gfldex | i believe to remember jnthn write something about unicode Str and str. You may want to ask him. | 15:27 | |
timotimo | also, are you on latest rakudo? | ||
this is less about unicode and more about boxing | |||
str and Str behave the same way with regards to NFG and unicode and such | |||
Skarsnik | :m my %hash; my str $a: %hash<b> = $a; say %hash.perl; | ||
m: my %hash; my str $a: %hash<b> = $a; say %hash.perl; | |||
camelia | rakudo-moar e3717e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GTiNacak0LConfusedat /tmp/GTiNacak0L:1------> 3my %hash; my str $a:7⏏5 %hash<b> = $a; say %hash.perl; expecting any of: colon pair» | ||
Skarsnik | m: my %hash; my str $a; %hash<b> = $a; say %hash.perl; | 15:28 | |
camelia | rakudo-moar e3717e: OUTPUT«{:b("")}» | ||
Skarsnik | m: my %hash; my str $a; %hash<b> = $a; say %hash<b>.^name; | ||
camelia | rakudo-moar e3717e: OUTPUT«Str» | ||
[Coke] | masak: www.johnhodgman.com/post/1303327152...at-loblaws | ||
pink_mist | lol | 15:30 | |
Skarsnik | so why PG give me str?! github.com/perl6/DBIish/blob/maste...g.pm6#L323 %results{$row{$key}} = $row; should convert to Str ? | ||
timotimo | what version of rakudo are you on? | 15:31 | |
only thing i can imagine would be the use of := somewhere, but it shouldn't be that infectious | 15:32 | ||
Skarsnik | This is perl6 version 2015.06-313-g43e4bf6 built on MoarVM version 2015.06-98-gf22142b | ||
15:32
domidumont left
|
|||
timotimo | that points at a commit from july | 15:33 | |
that's quite old | |||
PerlJam | Skarsnik: you might want to use a post-GLR version of rakudo | ||
gfldex | i rakudobugged both shaped hash cases as #126251 | 15:34 | |
Skarsnik | ah yes. %hash{$key} = $value; still give me str in my version | 15:35 | |
timotimo | if that's the case ... case closed :) | ||
no need to try to debug a multiple months out of date rakudo | 15:36 | ||
Skarsnik | still I would have want the real type of the field x) | 15:37 | |
timotimo | that's the next step :) | ||
Skarsnik | but it probably give me issue with pgarray since the module has nothing to handle them | ||
timotimo | in that case you can just NYI | 15:38 | |
15:39
synbot6 joined
|
|||
Skarsnik | interesting writing for $hashref.kv -> Str $key, Str $value keep $value and $key as str too | 15:39 | |
PerlJam | well, that's supposed to be a constraint, not a coercion. | 15:41 | |
Skarsnik | should it fail? | 15:42 | |
timotimo | no | ||
it should update your rakudo to the newest version :) | |||
Skarsnik | m: class MyClass{}; my @array = 1..5; say $p.^name for @array -> MyClass $p; | 15:44 | |
camelia | rakudo-moar e3717e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JkNVvFAhqyVariable '$p' is not declaredat /tmp/JkNVvFAhqy:1------> 3class MyClass{}; my @array = 1..5; say 7⏏5$p.^name for @array -> MyClass $p;» | ||
timotimo | the for form with an arrow doesn't allow you to put the code in front | ||
15:44
[Sno] joined
|
|||
timotimo | because the arrow is actually just part of the pointy block syntax | 15:44 | |
which goes -> signature { block } | |||
Skarsnik | m: class MyClass{}; my @array = 1..5; for @array -> MyClass $p {say $p.^name ~ $p}; | 15:45 | |
camelia | rakudo-moar e3717e: OUTPUT«Type check failed in binding $p; expected MyClass but got Int in block <unit> at /tmp/rwChHMgrcj:1» | ||
Skarsnik | should I just rerun rakudobrew build moar ? | 15:46 | |
How I type the value and key of a hash btw? | 15:47 | ||
PerlJam | Skarsnik: I would "rakudobrew self-upgrade; rakudobrew nuke moar; rakudobrew build moar" if I were you | ||
Skarsnik | thx :) | 15:48 | |
maybe it will fix some issue I had with the XML module x) | 15:51 | ||
15:52
shmibs_ is now known as shmibs
15:53
reneeb2 joined
15:55
lichtkind joined
15:56
reneeb left
15:58
loveJesus_ joined
15:59
loveJesus left,
duncan_dmg left
16:00
skids left
16:01
duncan_dmg joined
16:07
lichtkind_ joined
|
|||
timotimo | the GLR changed a lot of things around | 16:07 | |
and modules were updated to work with the new glR | |||
so if you've fetched a recent version of some module it'll expect post-GLR semantics | 16:08 | ||
16:08
araujo_ joined
|
|||
TimToady | m: say ({ [+] @_ } ∘ *.map(* * 2))(1..10) | 16:08 | |
camelia | rakudo-moar e3717e: OUTPUT«110» | ||
16:10
araujo_ left
|
|||
Ven really loves that *g | 16:10 | ||
PerlJam | When did that get added? | ||
[Coke] | in the past week or so | ||
PerlJam | cool | ||
16:10
araujo_ joined
16:12
araujo left
|
|||
tony-o | perl6-bench works with GLR now too | 16:12 | |
16:12
araujo_ left
16:13
araujo_ joined,
skids joined
16:14
Ven left,
araujo_ left
|
|||
tony-o | Skarsnik: which XML module | 16:14 | |
16:15
domidumont joined,
araujo_ joined,
FROGGS[tab] joined
|
|||
Skarsnik | XML. I had weird behavior with elements. like :SINGLE always giving me False or sometime it just die when finding the right element | 16:16 | |
I never managed to replicate the error with simple test x) | 16:17 | ||
timotimo | m: /foo/ | 16:19 | |
camelia | rakudo-moar e3717e: OUTPUT«Method 'match' not found for invocant of class 'Any' in block <unit> at /tmp/OKYsJJcwHN:1» | ||
timotimo | m: $_ = "hello"; /foo/ | ||
camelia | ( no output ) | ||
16:19
lichtkind left
|
|||
timotimo | m: grep { /foo/ }, <bar baz foobar barfoo foo>; | 16:19 | |
camelia | rakudo-moar e3717e: OUTPUT«Method 'match' not found for invocant of class 'Any' in block <unit> at /tmp/fh8XtssGPB:1» | ||
timotimo | m: grep -> $_ { /foo/ }, <bar baz foobar barfoo foo>; | ||
camelia | rakudo-moar e3717e: OUTPUT«Method 'match' not found for invocant of class 'Any' in block <unit> at /tmp/qKXkIpcWVl:1» | ||
timotimo | m: grep -> $_ { .say }, <bar baz foobar barfoo foo>; | 16:20 | |
camelia | rakudo-moar e3717e: OUTPUT«barbazfoobarbarfoofoo» | ||
timotimo | the what now? | ||
m: grep -> $_ { m/foo/ }, <bar baz foobar barfoo foo>; | |||
camelia | ( no output ) | ||
timotimo | m:say grep -> $_ { m/foo/ }, <bar baz foobar barfoo foo>; | ||
m: say grep -> $_ { m/foo/ }, <bar baz foobar barfoo foo>; | |||
camelia | rakudo-moar e3717e: OUTPUT«(foobar barfoo foo)» | ||
16:20
AlexDaniel joined
|
|||
timotimo | i should look for the code that used to support this | 16:21 | |
m: $_ = "hello"; say /foo/ | 16:22 | ||
camelia | rakudo-moar e3717e: OUTPUT«/foo/» | ||
timotimo | right | ||
moritz | no, it should be fixed | ||
given 'foo' { say !/o/ }; | 16:23 | ||
m: given 'foo' { say !/o/ }; | |||
camelia | rakudo-moar e3717e: OUTPUT«Method 'match' not found for invocant of class 'Any' in block <unit> at /tmp/MOXI6h1c1X:1» | ||
lichtkind_ | i got strange warning with rakudo | 16:24 | |
timotimo | fixed? as in: a bare regex like that is now a match against $_? | ||
or maybe used to be? | |||
16:24
lichtkind joined
16:25
FROGGS joined
|
|||
geekosaur | used to be | 16:25 | |
timotimo | ah | ||
i hadn't realized | 16:26 | ||
lichtkind_ | used heredocs and it said: asked to remove 20 spaces but shortst indent is 16 spaces in any trim_heredoc at ... | ||
timotimo | why is that strange? | 16:27 | |
can you paste the exact code, please? | |||
FROGGS | o/ | 16:28 | |
16:28
araujo_ left
16:29
zacts` left
16:30
xfix joined,
xfix left,
xfix joined
|
|||
Skarsnik | FROGGS, I tried your nativecall thing with CStruct and CPointer. but I don't know if it work well or I miss type a struct to have the right fields size | 16:30 | |
*nativecast | 16:31 | ||
PerlJam, erf that nuke all panda and installed modules :( | 16:37 | ||
moritz | lichtkind_: each line in a heredoc must be at indented at least as much as the end delimiter | 16:38 | |
lichtkind_ | moritz yes i seen now what END triggeres | 16:39 | |
btw you will create that repo now? | |||
timotimo | lichtkind has ways to make you | 16:40 | |
16:42
zacts joined
16:46
philh joined
|
|||
lichtkind_ | i dont have the rights and we already talkked about it | 16:52 | |
timotimo | just the word order in the sentence made it sound like you're commanding, or threatening | 16:53 | |
it was much more threatening-sounding when i didn't see the ? at the end | |||
lichtkind_ | sure i will stretch my hand through the wire and will smash moritz | 16:54 | |
timotimo | hah | 16:55 | |
TimToady | hmm, trying to rakudobrew build moar on my server box (Linux Mint), and I get: Can't compile simple gcc probe, so something is badly wrong at build/probe.pm line 92. | 16:56 | |
ilmari | TimToady: apt-get install build-essential | 16:57 | |
(if I remember correctly that mint is based on ubuntu) | |||
tony-o | better not be slangin perl6 as root, TimToady | ||
TimToady | thanks | ||
El_Che | TimToady: the cool kids use rakudobrew :) | 16:58 | |
tony-o | El_Che: that's why he's using it | ||
TimToady | I guess we upgraded, so we lost our build-essentials at some point | ||
El_Che | tony-o: TimToady is a cool kid :) | 16:59 | |
TimToady just wants to make sure it all works before my talk on Monday | |||
s/my/his/ | |||
tony-o | that was a strange 2nd person sentence | ||
FROGGS | m: [.say] | ||
camelia | rakudo-moar e3717e: OUTPUT«(Any)» | ||
FROGGS | m: $_ = [42]; say [.[0].Num] # TimToady: that currently breaks rebuilding docs.perl6.org | 17:00 | |
camelia | rakudo-moar e3717e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/T5OUQY3VkuUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/T5OUQY3Vku:1------> 3$_ = [42]; say [.[7⏏050].Num] # TimToady: that currently break» | ||
FROGGS | I can bisect it, but a hint would be nice :o) | 17:01 | |
is this about the precedence changes of dot? | |||
TimToady | presumably, or at least related | ||
FROGGS | k | 17:02 | |
TimToady | m: $_ = [42]; say [Num(.[0])] | ||
camelia | rakudo-moar e3717e: OUTPUT«[42]» | ||
17:02
duncan_dmg left
|
|||
FROGGS | : $_ = [42]; say [.[0]] | 17:03 | |
m: $_ = [42]; say [.[0]] | |||
camelia | rakudo-moar e3717e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Z61I7SBUouUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/Z61I7SBUou:1------> 3$_ = [42]; say [.[7⏏050]]» | ||
FROGGS | m: $_ = [42]; say [(.[0])] | ||
camelia | rakudo-moar e3717e: OUTPUT«[42]» | ||
TimToady | m: $_ = [42]; say [42.Num] | ||
camelia | rakudo-moar e3717e: OUTPUT«[42]» | ||
TimToady | probably a backtrack that is trying to determine if you used an infix where a term was expected | 17:04 | |
FROGGS | since I dont make progress with the other stuff I started I might look into this one tonight | 17:06 | |
TimToady | ah, it's trying to parse [.[0]] as a reduce | 17:07 | |
FROGGS | thanks for the scalar containers :o) (we dont have pointers so...) | ||
TimToady | m: say [.[0]] | 17:08 | |
camelia | rakudo-moar e3717e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pBoE_ggFB9Unsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/pBoE_ggFB9:1------> 3say [.[7⏏050]]» | ||
TimToady | m: say [ .[0] ] | ||
camelia | rakudo-moar e3717e: OUTPUT«[(Any)]» | ||
FROGGS | ohh | ||
17:08
philh left
|
|||
TimToady | testing fix | 17:12 | |
FROGGS | TimToady++ | 17:13 | |
FROGGS looks at RT | |||
17:16
araujo joined
17:18
araujo left
17:19
bjz left
|
|||
lichtkind_ | btw thanks moritz :) | 17:22 | |
moritz: and please create "problem_solver_tutorial" | 17:23 | ||
17:27
araujo joined
17:29
lichtkind left
|
|||
moritz | lichtkind_: what description should I use? | 17:31 | |
lichtkind_: anyway, repo created. Have fun! | 17:35 | ||
lichtkind_ | thanks i still formulate description | ||
will post in a minute | |||
extensive Perl 6 tutorial, which builds an application, has parallel Perl 5 tutorial under ... | 17:36 | ||
the link i have to create since current version is just German | |||
and a bit outtated | |||
17:38
rurban left
|
|||
dalek | ast: 647e449 | TimToady++ | S03-metaops/ (6 files): make sure . doesn't try to work with metaops |
17:39 | |
17:39
lichtkind joined
|
|||
dalek | kudo/nom: ef814c3 | TimToady++ | src/Perl6/Grammar.nqp: suppress use of . within metaops In particular, reduce must backtrack to an array composer. The rest of the metaops must just fail to parse. |
17:40 | |
17:41
timbunce_ left
17:44
lichtkind left
17:46
Peter_R joined
17:58
lichtkind_ is now known as lichtkind
17:59
TEttinger joined
|
|||
TimToady | we should have, for every special-case optimization, a test that it's still worth doing, since the general case may someday get optimized to be as good as the special case, and then we will want to remove the special case as mere bloat | 18:03 | |
18:03
travis-ci joined
|
|||
travis-ci | Rakudo build passed. TimToady 'suppress use of . within metaops | 18:03 | |
travis-ci.org/rakudo/rakudo/builds/83348680 github.com/rakudo/rakudo/compare/e...814c33bb87 | |||
18:03
travis-ci left
|
|||
TimToady | we've got a lot of near-duplicate code that we will someday want to factor back out | 18:04 | |
18:11
espadrine_ left
|
|||
TimToady | it will, however, be very difficult to test such things, since we would have to compile with and without the special case, to have a valid comparison | 18:12 | |
I don't think we want to hack the dispatcher to ignore a particular special case...well, we could build a special version that *could* ignore a particular set of candidates, I suppose, and just use that special dispatcher when testing | 18:14 | ||
but we're very ad hoc in the way we evaluate optimizations right now | 18:15 | ||
and it's all very "here's the situation right now" | 18:16 | ||
18:16
bjz joined
|
|||
TimToady | a test dispatcher that can do "knockouts" (as in genetics) would be a good mid-hanging fruit for someone | 18:17 | |
jdv79 | sounds more than mid maybe | 18:18 | |
TimToady assumes everyone except jnthn++ is mid :) | 18:19 | ||
mr_ron | m: gist.github.com/ronaldxs/e19a8501839e76b4ac35 | ||
camelia | rakudo-moar e3717e: OUTPUT«TrueFalseTrueFalseMethod 'hexlet' not found for invocant of class 'Cursor' in block <unit> at /tmp/i0PagAuIc8:6» | ||
jdv79 | that's quite a wide middle class | 18:20 | |
mr_ron | character class regex mathcing problem in gist. help anyone? | ||
TimToady | !~~ is a known bug | 18:26 | |
at least, it looks related to a known bug | 18:28 | ||
mr_ron | it really doesn't have much to do with !~~ - if you took that line out it wouldn't make much difference | 18:29 | |
m: my token hexlet { <[A..F]> }; say so '.' ~~ /<- alpha>/; say so '.' ~~ /<- hexlet>/; | 18:32 | ||
camelia | rakudo-moar ef814c: OUTPUT«TrueMethod 'hexlet' not found for invocant of class 'Cursor' in block <unit> at /tmp/fC7Y78QhYH:1» | ||
18:32
yqt joined
18:33
MilkmanDan left
|
|||
TimToady | probabably needs to be taught about lexicals | 18:33 | |
m: my token hexlet { <[A..F]> }; say so '.' ~~ /<- alpha>/; say so '.' ~~ /<- &hexlet>/; | |||
camelia | rakudo-moar ef814c: OUTPUT«5===SORRY!5===Unrecognized regex metacharacter < (must be quoted to match literally)at /tmp/8hkGNT4OpD:1------> 3so '.' ~~ /<- alpha>/; say so '.' ~~ /<-7⏏5 &hexlet>/;Unrecognized regex metacharacter - (must be quoted to match literal…» | ||
18:33
MilkmanDan joined
|
|||
TimToady | and maybe . and & | 18:33 | |
so yeah, basically a NYI sort of thing, I think | |||
18:34
zakharyas joined
18:37
bakedb left
|
|||
mr_ron | m: grammar G {token TOP { <- hexlet> }; token hexlet { <[A..F]> } }; say so G.parse('G'); say so G.parse('A'); | 18:40 | |
camelia | rakudo-moar ef814c: OUTPUT«TrueFalse» | ||
18:40
bakedb joined
|
|||
mr_ron | It's inconsistent - I'm inclined to RT if no objection ... | 18:44 | |
18:45
araujo_ joined
|
|||
TimToady | is fine | 18:45 | |
18:46
silug left
|
|||
TimToady | (to RT) | 18:46 | |
18:46
araujo left
18:54
loveJesus_ left
18:58
silug joined
19:04
domidumont left
19:06
sufrostico left,
domidumont joined
19:12
muraiki joined
|
|||
FROGGS | Method 'roles' not found for invocant of class 'Array' | 19:12 | |
in block at ./htmlify.p6:261 | |||
docs are almost unbroken... | |||
19:16
domidumont left
19:17
espadrine_ joined
|
|||
lizmat | Got a WEIRD error while building the setting: gist.github.com/lizmat/41a44f3c2e35ea36d7ce | 19:24 | |
I'm pretty baffled at this point... | 19:25 | ||
the name of the role does not seem to makker | 19:26 | ||
*matter | |||
FROGGS | lizmat: does it need to be a 'my role'? | ||
lizmat | trying that | 19:27 | |
19:27
espadrine_ left
|
|||
lizmat | FROGGS++ seems to fix it | 19:27 | |
but why ? | |||
FROGGS | m: my class Foo { class Bar { } } | 19:28 | |
camelia | ( no output ) | ||
FROGGS | m: my class Foo { role Bar { } } | ||
camelia | ( no output ) | ||
FROGGS | m: my class Foo does Iterable does Associative { role Bar { } } | ||
camelia | rakudo-moar ef814c: OUTPUT«===SORRY!===Method 'iterator' must be implemented by Foo because it is required by a role» | ||
lizmat | I mean, there are plenty of other Iterator related roles without the my in the setting, e.g. ProcessStr in src/core/Str | ||
FROGGS | m: my class Foo does Associative { role Bar { } } | ||
camelia | ( no output ) | ||
FROGGS | lizmat: I... can't explain | 19:29 | |
was just a guess | |||
lizmat | me neither, but thanks for the eyes! FROGGS++ | ||
FROGGS | okay :o) | ||
lizmat | ok, gotten further now... won't compile Test.pm but at least that's traceable | 19:31 | |
masak | [Coke]: "fromidable!" | 19:32 | |
lizmat | .oO( new Stromae song? ) |
19:33 | |
masak | lizmat: irclog.perlgeek.de/perl6/2015-10-02#i_11308953 | ||
lizmat | .oO( cheesy! ) |
19:34 | |
19:38
dha joined
19:39
muraiki left
|
|||
masak | who here on channel should I talk to about the implementation of S04's "blocks are conceptually cloned into closures as soon as the lexical scope containing them is entered" ? | 19:40 | |
diakopter | me me me me | ||
masak | \o/ | ||
I'm at the point where I need to add something like that to 007, and I'm curious about prior art, war stories, classical no-nos, that kind of thing. | |||
dha | Not me. :-) | 19:41 | |
masak | my first thought is something like this: keep a hash around that maps from containing blocks to lists of (directly) contained blocks. whenever we enter a block, check the hash table, traverse the list, and update all the kids' OUTER. | 19:43 | |
oh, and "block" really means "block or routine". | |||
oh, and this needs to work even if a block was added through a synthetic Qtree :) (but that's just a technicality) | |||
I guess in 007 I wouldn't really need the hash table, since the program literally is its AST. but (a) that may change, and (b) the hash is still less work than traversing | 19:45 | ||
AlexDaniel | So I've been thinking about qqx// and stuff, and even though I was bringing this issue up a couple of times I couldn't come up with a nice solution. For those who don't know, the problem is that getting the output of some program is too hard, huffmanly you'll just use qqx// and there you go. What newbies might not understand is that it passes the whole thing to shell, which most of the time is not what you want (and if you want it then | 19:47 | |
it's ok to write it out explicitly). So my proposed solution: create two new subs – “runout” and “shellout”. Similarly to “run” and “shell”, but return the str instead (program output). Huffmanly it is correct, since “run” should be preferred over “shell”. If you wish, it is still possible to shell out your security. Upgrading to “run” from “runout” is somewhat straightforward too, if needed (although it wi | |||
you need such extra functionality then it's probably ok). What happens with qqx// then? Just burn it with fire. Comments? | |||
masak | AlexDaniel: if you don't feel all that strongly about your own solution, it sounds like a thing that should be explored in module space... :) | 19:48 | |
AlexDaniel: "runout" and "shellout" are short, but not very descriptive. even knowing the background, I feel a note of confusion looking at those names. | 19:49 | ||
AlexDaniel | masak: pass_string_to_shell_insecure – I'm ok with this name too | 19:50 | |
masak | ;) | 19:51 | |
AlexDaniel | masak: You want me to write a module that will disable qqx//? Can't we just fix that right in the language? :) | ||
19:51
pyrimidine joined
|
|||
masak | AlexDaniel: what I'm saying is "I couldn't come up with a nice solution" doesn't sound like we've arrived at the big wow that makes everything simpler. | 19:52 | |
AlexDaniel: I agree with you in principle that qqx// is very convenient, and that that's unfortunate given how injectable it is. | |||
AlexDaniel | masak: it solves the problem though | ||
it is very convenient only because it is so short to type it, I think | 19:53 | ||
masak | I don't usually take this side in debates, but... sometimes Perl is just about getting the job done. and you have to trust that people know about security risks. | ||
AlexDaniel | nooooo | ||
masak | that's how I feel about qqx// -- I'd be sad to see it go. | ||
19:54
pyrimidi_ left
|
|||
AlexDaniel | masak: trusting people to know about security risks… what a wishful thinking! I think we both know about the amount of shell injections out there, it could be great if perl6 could help people just a little bit in that sense | 19:54 | |
masak | oh, sure. | 19:55 | |
I'm not saying we ought to be insecure for the sake of it. | |||
but I *am* saying that we're in a different ballpark here than, say, two-arg open() | |||
where "hey, I could be calling out to the shell" isn't exactly written on the tin | 19:56 | ||
AlexDaniel | and what I've meant by saying that it was hard to come up with a solution is that qqx// is too damn short! There's no way to fix that without removing it… sadly! | ||
masak | yes. you're proposing to remove a convenience, for security reasons. | 19:57 | |
AlexDaniel | convenince? I'm not sure if typing shellout() is much harder than qqx//, except for the quoting stuff | ||
masak | listen to yourself :) | 19:58 | |
if I didn't want interpolation, I'd use qx// | |||
AlexDaniel | masak: like shellout("unsecure $stuff"), what's so hard about it? | 20:00 | |
masak: or what would be the use case when that's not enough? | |||
however, most of the time the answer is “you don't want interpolation if you're passing random stuff to shell” | 20:01 | ||
and if you want it, then be explicit by using a longer sub name. Perfect | 20:02 | ||
also, there is a word “shell” in “shellout”, which makes it very clear what's going to happen with your string. Just a little reminder, I like it | 20:03 | ||
masak: but I'd really like to hear a counterexample where just a regular sub “shellout” will not be enough to get your job done (which is now handled by qqx//), when you really need it. | 20:05 | ||
20:06
araujo__ joined,
pyrimidi_ joined
|
|||
dalek | kudo/nom: 2fb63c7 | lizmat++ | src/core/Map.pm: Give Hash.pairs/kv/keys/values/antipairs pull-all my @ = %h.pairs 30% faster my @ = %h.keys 30% faster my @ = %h.values 30% faster my @ = %h.kv 2x as fast my @ = %h.antipairs 3x as fast Also now uses a role to factor out the common stuff. This role also contains a count-only method, which is the same for all of these methods. |
20:06 | |
FROGGS | lizmat++ | 20:07 | |
20:08
pyrimidine left
20:09
araujo_ left
|
|||
dalek | c: 6564ace | FROGGS++ | htmlify.p6: s/push/append/ roles to todo list Otherwise we sneak extra Arrays into the list of roles that need doing. |
20:09 | |
FROGGS | Invocant requires an instance of type Str, but a type object was passed. Did you forget a .new? | 20:10 | |
in block at ./htmlify.p6:540 | |||
-.- | |||
diakopter | well, did you forget a .new | ||
FROGGS | :P | 20:11 | |
no :o) | |||
lizmat | diakopter o/ | 20:12 | |
diakopter | ahoy from Vught | ||
lizmat | greetz to Martin! | ||
AlexDaniel | hm, other opinions? I'm really touched by the fact that qqx// is there yet there is no safer way to do that with relatively short code, that's disappointing… | ||
just like in perl5 there was “system” that couldn't get the output, so you go dancing around it either with using a module, writing to file or trying to use backticks and sanitizing your input… “run” in perl6 is definitely a strong step forward, yet it's still not good enough to just get the output. | 20:14 | ||
20:15
tokuhiro_ joined
|
|||
AlexDaniel | which, by the way, is probably one of the most common tasks | 20:15 | |
FROGGS nods | 20:16 | ||
moritz | run($command, :out).out.slurp | ||
maybe not the best huffman coding | |||
AlexDaniel | yeah, 100% correct huffman coding | ||
And hey, wanna see a live example for this problem? | 20:17 | ||
rosettacode.org/wiki/Get_system_com...put#Perl_6 | |||
lizmat is tempted to optimize typed hashes as well, but refrains for now | |||
AlexDaniel | I mean of this problem | ||
“Execute a system command and get its output into the program.” | |||
20:17
pyrimidi_ left
|
|||
lizmat | I'd rather hear jnthn's opinion about using 2 hashes for typed hashes, instead of the one like in Bags | 20:18 | |
AlexDaniel | so it says use qx. Well, once the user has a need to pass a variable he will just put another “q” | ||
20:19
telex left
|
|||
AlexDaniel | but the task itself does not say anything about using the shell | 20:19 | |
20:19
tokuhiro_ left
|
|||
AlexDaniel | it says “execute a system command“… Whatever that means | 20:19 | |
20:20
telex joined,
xfix left
|
|||
AlexDaniel | looking at the other examples, however, I see that most of the languages just throw it into the shell | 20:20 | |
skids | .oO(use attitude; qx[dir].say # --> "Warning: What, you haven't implemented 'dir' in Perl 6 yet?!? Get to work!") |
||
pink_mist | use attitude <bad>; #rather | 20:21 | |
20:21
Psyche^ joined
|
|||
FROGGS | moritz: we get now as far as this (after about 11min): doc.perl6.org/build-log/build-2015-...0+0000.log | 20:22 | |
moritz | FROGGS: did you fix any .push breakage? | 20:23 | |
FROGGS | moritz: only one spot... I dunno if there is more: github.com/perl6/doc/commit/6564ace7df | ||
20:23
Psyche^_ left
|
|||
FROGGS | but I'm going to continue tomorrow... | 20:24 | |
zzzZZZzzz & | |||
20:24
FROGGS left
|
|||
moritz | lib/Pod/Convenience.pm6: @chunks.push: $c.map: { | 20:24 | |
wonder if that needs to be an append | |||
ah, but that's only used for debugging | 20:25 | ||
20:27
pyrimidine joined
|
|||
Gruber | -46 | 20:27 | |
AlexDaniel | m: run('echo', 'foo', 'bar', :out).out.slurp | 20:28 | |
camelia | rakudo-moar 2fb63c: OUTPUT«run is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting:1 in sub run at src/RESTRICTED.setting:14 in block <unit> at /tmp/EpWDA1d90A:1» | ||
AlexDaniel | uhh | ||
“Method 'slurp' not found for invocant of class 'IO::Pipe'” | |||
if not slurp, then how can I do it? | 20:30 | ||
.get | 20:31 | ||
but isn't it for 1 line only? | |||
20:31
dha left
|
|||
gfldex | try lines | 20:31 | |
there may be .Supply in the future | 20:32 | ||
lizmat | AlexDaniel: please make a ticket, IO::Pipe should be able to slurp | ||
AlexDaniel | gfldex: and then “join” them? | ||
lizmat | and .Supply :-) | ||
AlexDaniel | lizmat: thanks, will do | 20:33 | |
lizmat | lines(:!chomp) | ||
gfldex | .lines returns a lazy list, so joining then may take a while | ||
jnthn | masak: I'm going to rest, but: in Rakudo sub foo() {} as well as the static lexpad entry just compiles to approx &foo := take-closure(sub foo() { }.clone()); | ||
yoleaux | 11:08Z <lizmat> jnthn: could you look at gist.github.com/lizmat/9f95a6f75f27cebecd65 and see if I made any obvious mistakes there ? | ||
11:08Z <lizmat> jnthn: it compiles/builds ok, seems to handle simple cases ok, but causes sever spectest fallout in weird ways | |||
11:09Z <lizmat> jnthn: documentation on nqp::handle would also be appreciated :-) | |||
11:39Z <lizmat> jnthn: is it correct that we cannot .Slip a container ? | |||
jnthn | lizmat: Tomorrow :) | ||
moritz | uhm, maybe .slurp-rest ? | ||
'cause it's an already opened handle | |||
jnthn | masak: We don't go doing "deeper" cloning than that. | ||
jnthn back tomorrow | |||
AlexDaniel | .oO( maybe qqx// …) |
||
lizmat | jnthn: safe travels! | 20:34 | |
AlexDaniel | moritz: indeed, it's .slurp-rest! | ||
lizmat: if there's slurp-rest, is there any need to open a ticket? | |||
flussence | «Stage parse : 95.033» # ouch, where'd that extra-extra 20s come from in the past few days? | 20:35 | |
lizmat | ah, good point... | ||
AlexDaniel: if there is a slurp-rest, I guess no ticket is needed :-) | |||
AlexDaniel | my $output = run($command, $arg1, $arg2, :out).out.slurp-rest; | ||
awesome | |||
Skarsnik | maybe a slurp to say to use slupr-rest? xD | 20:37 | |
AlexDaniel | Skarsnik: maybe there has to be an easier way to do the whole thing… | 20:38 | |
masak | jnthn: thanks. | 20:40 | |
20:40
dha joined
|
|||
masak | I guess the added implicit thing to that is that all those assignment get hoisted to the top of the scope. | 20:41 | |
lichtkind | hai mxE4sak | ||
20:41
synbot6 left
|
|||
masak | lichtkind: hay | 20:42 | |
20:42
darutoko left
20:43
rurban joined,
tokuhiro_ joined
|
|||
lichtkind | rurban: grxFCzi grad wollt ich dir xFCber twitter schreiben | 20:43 | |
masak | diakopter: yes, please give mine-too regards to mberends. | 20:44 | |
lizmat | flussence: re parse slowdown: I have *no* idea, but in general, we lost 10-15% in the past days :-( | 20:46 | |
flussence: even with bare startup | |||
masak | :/ | ||
20:47
tokuhiro_ left
|
|||
flussence | maybe I should attempt hacking on the CORE & --profile thing again, though that went pretty painful last time (ate my fastest hardware alive even with 16GB of swap) | 20:48 | |
diakopter | bug fixes tend to expose optimizations as unwarranted when you have an aggressive optimizer | ||
20:51
pyrimidi_ joined,
zakharyas left
20:53
pyrimidine left
20:55
rindolf left
21:02
sufrostico joined
21:05
skids left
|
|||
AlexDaniel | I've changed rosettacode.org/wiki/Get_system_com...put#Perl_6 to mention run and stuff | 21:14 | |
it is probably required to mention that “run“ should be preferred in doc.perl6.org/language/quoting#Shel...ting%3A_qx | 21:16 | ||
although it mentions it, it doesn't say which one you should choose (and for newbies a sane recommendation is important). | |||
but not today | |||
dha | So. I want to make a general proposal about function documentation. What would be the best way to go about that in a way that it could be agreed to be implemented? Is that even possible? | 21:20 | |
21:20
rindolf joined
|
|||
dha | Or should I just start submitting endless pull requests? :-) | 21:21 | |
lizmat | dha: you mean you don't have a commit bit yet ? | ||
dha | I do, but this would be extensive, and I don't want to just do it without at least a little consensus. | 21:24 | |
Basically, as it stands the documentation has the signatures of the functions, but that is probably less useful than the usage statements such as the ones that are in the perl 5 docs. | 21:26 | ||
I want to propose adding such usage statements. | 21:27 | ||
e.g. something like gist.github.com/dha/ea03e5c840f7131248de and gist.github.com/dha/e69e8daa6c6519c71060 | |||
I'd also like a bit of feedback on format before committing. | 21:28 | ||
pink_mist thinks that looks great | |||
dha | Thanks. | 21:29 | |
PerlJam | dha++ I second that assessment | 21:34 | |
lizmat | looks good to me dha++ | ||
El_Che | a silly question. Once you use sub MAIN in a small script (e.g. for cli params), all the logic must be called from there (as in Java) because the rest of the "naked" script will be called before MAIN? | 21:37 | |
PerlJam | El_Che: I'm not sure I understand the question. | 21:38 | |
timotimo | what have i been missing? | 21:39 | |
21:39
dha left
21:40
dha joined
|
|||
PerlJam | El_Che: perhaps I do after a little more thought ... MAIN is executed last in the sequence of things (modulo any phasers) | 21:40 | |
El_Che: you're not required to call all logic from MAIN, but it's a good spot | 21:41 | ||
El_Che | PerlJam: in most examples laying around it's kind of presented as a magic Getopt replacement. | ||
PerlJam: my point being is that when you use it, you get a typical main block like in Java. | 21:42 | ||
colomon | Any “top level” code before the MAIN will get executed before MAIN is called. | ||
El_Che | PerlJam: you can not say something like "i'll handle the parameters from there and the rest everywhere" | 21:43 | |
colomon | so (for instance) you can play with @*ARGS before MAIN is called | ||
El_Che | thx, that's what my play code does,but it's good to get confirmation | ||
Skarsnik | Oh run replace the p5 system call? | 21:44 | |
El_Che | was trying to migrate some p5 to P6 to see how far I got. I was at the command line parameters phase :) | ||
dha | So, I got disconnected. People are actually on board with my idea? | ||
PerlJam | dha: at least 3 of us. | ||
dha | Yay. Ok, maybe I will just start doing things. Thanks. | 21:46 | |
jdv79 | dha's idea++ | 21:47 | |
Skarsnik | dha, yes, the Usage statement are generaly more meaninful that just the signature | ||
jdv79 | usnt that like alot of man pages? | ||
*isnt | |||
21:47
pyrimidine joined
|
|||
PerlJam | very similar, but better :) | 21:48 | |
dha | jdv79 - probably, yes. | ||
to be honest, I'm tempted to make separate docs for implementers and users. But that's probably overkill. | 21:49 | ||
:-) | |||
21:50
pyrimidi_ left
|
|||
PerlJam | way overkill since we switch hats all the time. | 21:50 | |
dha | Yeah. So gonna keep the signatures. Just add usage. :-) | 21:51 | |
PerlJam | yay! | ||
dha | How do you like the "Defined as:" and "Usage:" headings? Put that everywhere, or just assume people will figure it out? | 21:54 | |
PerlJam | I lean towards explicit contextual clues rather than implicit, so I'd put them in. Dunno what anyone else thinks. | 21:56 | |
dha | So noted. I guess my only remaining question, which may not be immediately answerable, is how this will render in the html pages. | 21:57 | |
pink_mist | if it doesn't render well, someone will /make it/ render well :P | ||
PerlJam | pink_mist: aye, well said :) | 21:58 | |
dalek | c: 5d17958 | (David H. Adler)++ | lib/Type/Str.pod: Added usage and examples for lc() in Str.pod |
21:59 | |
dha | pink_mist - yay. | ||
And so it begins... | |||
pink_mist | dha++ =) | ||
dha | Hm. So, in C<split> the docs use things like C<$delimiter>. Now that I'm putting in the usage statements, should that be changed to "DELIMITER"? | 22:04 | |
lizmat | good question | 22:06 | |
dha | Also, the C<split> docs don't say what C<$limit> actually does. Bah. | 22:07 | |
lizmat | my gut feeling is yes | ||
PerlJam | my gut is with lizmat's gut :) | ||
dha | And how do your guts feel about whether that should be in a C<> tag? | ||
PerlJam | unless there's a more appropriate markup, C<> should be fine. | 22:09 | |
dha | Ok. And I'm putting in code tags around the examples too. Ha! | 22:10 | |
22:11
rindolf left
22:13
felher left
|
|||
dalek | c: 81278cc | (David H. Adler)++ | lib/Type/Str.pod: Added usage to C<split> Put code tags around examples in C<split> |
22:14 | |
masak | 'night, #perl6 | ||
dha | night masak | ||
lizmat | gnight masak | 22:17 | |
colomon | o/ | 22:19 | |
22:22
pyrimidi_ joined
22:23
Skarsnik left,
felher joined
22:24
pyrimidine left
|
|||
lichtkind | o/ | 22:28 | |
dha | Procedural query: Commit a whole bunch of commits to the main repository, or would it be better/cleaner to do a lot in my own fork, and then do a pull request? | 22:31 | |
PerlJam | I'd do it in a branch in the main repo. No need for a fork/PR if you've got commit to the repo in question. | 22:33 | |
22:34
yqt left
|
|||
dha | Ok. That makes sense. | 22:37 | |
I don't think I've ever had to make a branch before. This should be fun. :-) | |||
AlexDaniel | How can I pass all arguments to another subroutine? @_ does not seem to do the trick | 22:38 | |
22:39
Peter_R left
22:41
Peter_R joined
22:44
rurban left
22:45
tokuhiro_ joined
|
|||
lizmat | m: sub a(|c) { b(|c) }; sub b($a, :$foo) { dd $a, $foo }; a( 42, :foo(666) ) # AlexDaniel | 22:45 | |
camelia | rakudo-moar 2fb63c: OUTPUT«Int $a = 42Int $foo = 666» | ||
lizmat | |c is a Capture named c | ||
which you flatten again in the call with | | |||
AlexDaniel | oh | 22:46 | |
lizmat | takes care of both positional and named params | ||
a |c will take the rest of any parameters | 22:47 | ||
so you can also do: | |||
sub a($always, |rest) { dd $always; b(|rest) } | 22:48 | ||
22:49
tokuhiro_ left
|
|||
dalek | kudo/nom: 61d1f99 | lizmat++ | src/core/List.pm: Iterified List.pick Removed the :eager candidate. |
22:52 | |
22:53
skids joined
|
|||
lizmat | .tell jnthn I get the feeling that any new class in the setting (like the anonymous once for iterators) make parsing the setting a lot more expensive | 22:54 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
lizmat | .tell jnthn possibly even O(n) :-( | ||
yoleaux | lizmat: I'll pass your message to jnthn. | ||
ShimmerFairy | dha: if you're working on stringy documentation in particular, you might be interested in the potential rewrite of S32::Str[ingy] I shared a little while ago. Some of it is stuff I'd like to change about strings (and thus shouldn't be doc'd), but a lot of it is about describing stuff in more detail. | 22:58 | |
timotimo | lizmat: i like reading those performance improvements :( | ||
22:59
mr_ron left,
raiph joined
|
|||
dha | ShimmerFairy - I'll take a look. On github? | 23:03 | |
23:03
sufrostico left
|
|||
dha | Also, I don't have to do strings immediately. The usage idea came up in the context of split, so I started with that. But I'm not constrained by it. | 23:04 | |
ShimmerFairy | dha: here's the blog post I wrote, which links to the gist: shimmeryfairy.wordpress.com/2015/0...ally-done/ | ||
23:04
sufrostico joined
|
|||
ShimmerFairy | dha: OK, I wasn't sure if you were focusing on strings at the moment, but I figured just in case :) | 23:04 | |
dha | Yeah. I appreciate the heads up. Thanks. | 23:05 | |
ShimmerFairy | dha: I just figured I'd point it out as a source of information (like the $limit parameter on split, for example). Just a heads up that it's not exactly what's currently spec, but for the most part it's just more explanation. | 23:06 | |
dha | Cool. I'll be wary of introducing anything not yet in. :-) | 23:08 | |
ShimmerFairy | (and another note that functions for the most part are defined on Stringy in my draft, whereas those methods have traditionally been (and currently still are) defined on Str (in fact, ISTR a bit of crufty language somewhere that Str was once a role!)) | 23:11 | |
23:12
mr_ron joined
23:17
RabidGravy left
23:24
ZoffixWork joined
|
|||
ZoffixWork | m: my @fib := 0, 1, *+* ... *; | 23:24 | |
camelia | rakudo-moar 61d1f9: OUTPUT«Type check failed in binding; expected Positional but got Seq in block <unit> at /tmp/dk42QvZhqP:1» | ||
ZoffixWork | Has this changed? Found the code here: rosettacode.org/wiki/Fibonacci_sequence#Perl_6 | 23:25 | |
m: my @fib = 0, 1, *+* ... *; say @fib[10] | 23:27 | ||
camelia | rakudo-moar 61d1f9: OUTPUT«55» | ||
ZoffixWork shrugs | |||
23:30
kaare__ left
|
|||
AlexDaniel | m: my $fib := 0, 1, *+* ... *; say $fib[10] | 23:36 | |
camelia | rakudo-moar 61d1f9: OUTPUT«55» | ||
ZoffixWork | Thanks. | 23:37 | |
AlexDaniel | ZoffixWork: possibly changed after glr | ||
I'm not quite sure why would you need := though | |||
23:38
wtw joined
|
|||
AlexDaniel | ZoffixWork: thanks for reporting, I've changed the example | 23:43 | |
ZoffixWork | \o/ | 23:44 | |
AlexDaniel | It looks like there is nothing wrong with “@fib =”, somebody correct me if I'm wrong :) | ||
lichtkind | lizmat ping? | 23:45 | |
AlexDaniel | ZoffixWork: I think that there are many other pre-GLR examples waiting to be fixed :) | 23:46 | |
ZoffixWork | :) | ||
dalek | c/usage_statements: 7fb82bf | (David H. Adler)++ | lib/Type/Array.pod: Added usage statements to Array.pod |
23:52 |