»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:01
jeffythedragonsl joined
00:02
kalkin- joined,
kalkin- left
00:03
mawkish__ left
00:04
mawkish__ joined
00:12
jeffythedragonsl left,
mawkish__ left,
mawkish__ joined
00:13
Sgeo left
00:14
dalek left
00:15
Sgeo joined,
Util left
00:16
mawkish__ left,
mawkish__ joined
00:20
mawkish__ left,
mawkish__ joined
00:28
RabidGravy left
00:44
llfourn joined
00:47
itcharlie left
00:49
llfourn left
00:55
cdg joined
01:00
cdg left
01:01
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
b2gills | m: print $0 if "[abc]def" ~~ / \[ ( <-[\]]>+ ) \] / | 01:03 | |
camelia | abc | ||
timotimo | m: print $0 if "[abc]def" ~~ / '[' ( <- ']' > ) ']' / | 01:04 | |
camelia | 5===SORRY!5=== Unrecognized regex metacharacter < (must be quoted to match literally) at <tmp>:1 ------> 3print $0 if "[abc]def" ~~ / '[' ( <-7⏏5 ']' > ) ']' / Unrecognized regex metacharacter - (must be quoted to match literally) at … |
||
timotimo | m: print $0 if "[abc]def" ~~ / '[' ( <-']'> ) ']' / | ||
camelia | 5===SORRY!5=== Unrecognized regex metacharacter < (must be quoted to match literally) at <tmp>:1 ------> 3print $0 if "[abc]def" ~~ / '[' ( <-7⏏5']'> ) ']' / Unrecognized regex metacharacter - (must be quoted to match literally) at <t… |
||
timotimo | mhm | ||
01:05
ZzZombo_ joined,
ZzZombo_ left,
ZzZombo_ joined,
ZzZombo is now known as Guest73401
01:06
dogbert17 left
01:08
Guest73401 left
01:09
ZzZombo_ left
01:10
ZzZombo_ joined,
ZzZombo_ is now known as ZzZombo,
bjz_ left
01:15
dogbert17 joined
01:16
lukiramu left
01:17
bjz joined
01:24
bjz left
01:27
bjz joined,
mr_ron left
01:29
agentzh joined
|
|||
b2gills | m: print $0 if "[abc]def]" ~~ / '[' ~ ']' ([ <!before ']'> . ]+) / | 01:39 | |
camelia | abc | ||
01:41
itaipu left
|
|||
TimToady | m: print $0 if "[abc]def]" ~~ / '[' ~ ']' (.*?) / | 01:44 | |
camelia | abc | ||
TimToady | that seems simpler | ||
and is not exactly backtracking, more like forward tracking... | 01:45 | ||
01:45
mawkish__ left,
llfourn joined
|
|||
timotimo | ya | 01:45 | |
TimToady | though probably doesn't work in a grammar that defines FAILGOAL | 01:46 | |
timotimo | TimToady: do we have a clue how we can emit regexes that don't actually compile to regexes? | 01:49 | |
for example, on the mailing list we just had someone want s|.*'/'|| | |||
that'd totally work as just a substr with an rindex | |||
01:50
llfourn left
01:57
llfourn joined
|
|||
TimToady | not yet, but I'm working my way into regex/grammar optimization, now that I'm mostly done with braids | 02:01 | |
02:06
mr-foobar left
02:07
newbie1 left
|
|||
timotimo | yup | 02:10 | |
02:21
kalkin- joined
|
|||
kalkin- | hi #perl6 | 02:22 | |
How do i read from a file descriptor which I obtained from a native call? | |||
timotimo | well, you can definitely use nativecall for regular libc functions like fprintf | 02:23 | |
we do have a "give me the native descriptor for this perl6-level IO thingie" | 02:24 | ||
not sure about the other side | |||
well, you can "/proc/self/fd/$num".IO.open(...) | |||
but only on linux | |||
kalkin- | timotimo: i think the other side is missing | ||
timotimo: TIL about fd/$num | 02:25 | ||
timotimo: is linux only anyway, thanks! | 02:26 | ||
ups | |||
timotimo | i hope it actually works out! :) | 02:28 | |
02:39
jiang joined
|
|||
jiang | p6:say 3 | 02:39 | |
02:39
mr-foobar joined
|
|||
avuserow | p6: say 3 # need a space after the colon? | 02:40 | |
camelia | 3 | ||
jiang | p6: say 'oh, just like this ;-)'; | 02:41 | |
camelia | oh, just like this ;-) | ||
kalkin- | /proc/self/fd/$num doesn't exist, but /proc/$*PID/fd/$num does (checked via shell during runtime), but when accessing it i get permission denied | 02:42 | |
timotimo | well, accessing it from a different thread surely won't work | 02:43 | |
how were you checking for it? | |||
wow, just .say for dir /proc/self/fd gives me 0 through 13 | 02:44 | ||
impressive | |||
02:44
user_ joined
|
|||
user_ | timotimo: "/proc/$*PID/fd/$inotify.fd()".IO; | 02:45 | |
02:45
ZzZombo left
|
|||
timotimo | huh, 0, 1, 2, 9, 11, and 12 are all /dev/tty | 02:45 | |
and one /dev/null, too | |||
a few precomps are mmapped, that's not so surprising that they'd have fds | 02:46 | ||
user_ | btw the fd in question is shown in zsh as “18 -> anon_inode:inotify” which makes sense, but may be is in issue for rakudo/moarvm | 02:47 | |
02:47
kalkin- left
02:48
user_ is now known as kalkin-
|
|||
kalkin- | (stupid reconnects) | 02:48 | |
timotimo | how do you mean? in issue? | ||
gotta head home and get some sleep | 02:49 | ||
kalkin- | timotimo: thanks for helping will experiment further | 02:50 | |
timotimo | sure thing | ||
kalkin- | just using read(2) seems to work for me | 03:05 | |
03:08
BenGoldberg joined
03:11
mr_ron joined
03:14
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
03:23
perlpilot_ left,
JimmyZ left,
sergot left,
SourceBaby left,
synopsebot6 left
03:24
Undercover left,
dalek joined,
ChanServ sets mode: +v dalek,
synopsebot6 joined,
ChanServ sets mode: +v synopsebot6
03:26
ZzZombo joined,
ZzZombo left,
ZzZombo joined
03:29
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
|
|||
BenGoldberg | s: EVAL("1"), "Str", () | 03:29 | |
BenGoldberg peers around for saucebot... | 03:30 | ||
03:32
noganex_ joined
03:34
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
03:35
noganex left
03:39
bjz_ joined
03:40
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
03:41
bjz left
04:02
BenGoldberg left
04:07
bjz joined
04:08
bjz_ left
04:18
aborazmeh left
04:27
Cabanoss- joined
04:29
IRCFrEAK joined,
IRCFrEAK left
04:30
Cabanossi left,
Cabanoss- is now known as Cabanossi
04:32
labster left
04:39
raiph joined
04:44
labster joined
04:58
mr_ron left
05:02
kurahaupo joined
05:08
bjz left,
kurahaupo_ joined
05:10
kurahaupo left
05:11
AlexDaniel left
05:19
araraloren left
05:20
kurahaupo_ left
05:37
hartenfels left
05:38
khw left,
agentzh left
05:41
agentzh joined
05:46
bjz joined
05:53
bjz left
05:57
mr-foobar left
05:59
mr-foobar joined
06:00
llfourn left
06:08
eroux joined
06:18
itaipu joined
06:19
jiang left
06:37
bjz joined
06:39
Tonik joined
06:40
wamba1 joined
06:51
darutoko joined
|
|||
samcv | good * everyone. having been around the last day or two. | 06:52 | |
NeuralAnomaly, status | |||
NeuralAnomaly | samcv, [✘] Next release will be in 3 weeks and 6 days. Since last release, there are 1 new still-open tickets (1 unreviewed and 0 blockers) and 32 unreviewed commits. See perl6.fail/release/stats for details | ||
samcv | don't see the latest builds on rakudo.org | 06:53 | |
06:56
llfourn joined
06:58
CIAvash joined
07:01
llfourn left
07:15
eroux left
07:16
Tonik left
07:25
eroux joined
07:27
itaipu left
07:30
robertle joined,
agentzh left
07:40
bjz left
07:46
CIAvash left
07:49
bjz joined
07:57
llfourn joined
08:02
llfourn left
|
|||
moritz | \o | 08:11 | |
lol I blogged: perlgeek.de/blog-en/perl-6/2017-00...graph.html | 08:12 | ||
08:16
rindolf joined
08:20
xinming_ left
08:21
xinming joined
|
|||
Geth | doc: titsuki++ created pull request #1203: Add example for sigspace |
08:26 | |
doc: 52960cc5d0 | titsuki++ | doc/Language/grammars.pod6 Add example for sigspace |
|||
doc: cef5f94dea | (Itsuki Toyota)++ | doc/Language/grammars.pod6 Merge pull request #1203 from titsuki/add-sigspace-example Add example for sigspace |
|||
samcv | sigspace is really weird in perl 6 | 08:31 | |
m: say 'blah here' ~~ m:s/ blah here / | 08:32 | ||
camelia | 「blah here」 | ||
samcv | m: say 'blah here ' ~~ m:s/ blah here / | ||
camelia | 「blah here 」 | ||
samcv | both of these match, the last one matches the spaces but first one doesn't | ||
m: say 'blah here ' ~~ m/ blah here / | |||
camelia | False | ||
samcv | m: say 'blah here ' ~~ / blah here / | ||
camelia | Nil | ||
samcv | m: say 'blah here ' ~~ m/ blah here / | ||
camelia | False | ||
samcv | m: say 'blah here ' ~~ :s/ blah here / | ||
camelia | 5===SORRY!5=== Regex not terminated. at <tmp>:1 ------> 3 'blah here ' ~~ :s/ blah here /7⏏5<EOL> Regex not terminated. at <tmp>:1 ------> 3 'blah here ' ~~ :s/ blah here /7⏏5<EOL> Unable to parse regex; coul… |
||
samcv | m: say 'blah here ' ~~ /:s blah here / | ||
camelia | 「blah here 」 | ||
samcv | m: say 'blah here ' ~~ m/:s blah here / | 08:33 | |
camelia | 「blah here 」 | ||
moritz | m: say ' blah here ' ~~ m:s/ bla here / | 08:37 | |
camelia | False | ||
moritz | m: say ' blah here ' ~~ m:s/ blah here / | ||
camelia | 「blah here 」 | ||
moritz | m: say ' blah here ' ~~ m/ :s blah here / | ||
camelia | 「blah here 」 | ||
08:38
andrzejku joined
|
|||
samcv | it's basically like \s+ when you have a space when doing sigspace | 08:38 | |
well | |||
m: say 'blah' ~~ /:s blah/ | |||
camelia | 「blah」 | ||
samcv | m: say 'blah' ~~ /:s blah / | ||
camelia | 「blah」 | ||
samcv | that still matches though? | ||
so it's like \s* at the last token but like \s+ on others? | 08:39 | ||
m: say 'blah' ~~ /:s b lah / | |||
camelia | Nil | ||
samcv | m: say 'b lah' ~~ /:s b lah / | ||
camelia | 「b lah」 | ||
samcv | m: say 'b lah ' ~~ /:s b lah / | ||
camelia | 「b lah 」 | ||
samcv | m: say ' '.match: /<ws>/ | 08:41 | |
camelia | 「 」 ws => 「 」 |
||
samcv | m: say ' '.match: /<.ws>/ | ||
camelia | 「 」 | ||
samcv | m: say ' '.match: / / | 08:42 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Null regex not allowed at <tmp>:1 ------> 3say ' '.match: / /7⏏5<EOL> |
||
samcv | m: say ' '.match: /' '/ | ||
camelia | 「 」 | ||
samcv | m: say 'test '.match: /test<.ws>/ | ||
camelia | 「test 」 | ||
samcv | m: say 'test'.match: /test<.ws>/ | ||
camelia | 「test」 | ||
samcv | m: say 'test abc'.match: /test<.ws>/ | ||
camelia | 「test 」 | ||
samcv | m: say 'testabc'.match: /test<.ws>/ | 08:43 | |
camelia | Nil | ||
samcv | so i guess end of string or start of string counts as whitespace | ||
08:56
llfourn joined
09:01
RabidGravy joined,
llfourn left
09:11
cyphase left
09:19
parv joined
|
|||
andrzejku | hi | 09:20 | |
:) | |||
parv | unicorn is up | ||
09:21
TEttinger left
09:24
espadrine joined
|
|||
IOninja | samcv: that's because it was a compiler release, not Star | 09:28 | |
samcv | kk | ||
parv, unicorn? | 09:29 | ||
parv | unicorn gundam (anime series; now "hunter x hunter" is on) | ||
samcv | ah | ||
parv | (in hindsight should have mentioned "gundam" instead) | 09:30 | |
09:33
imcsk8 left
|
|||
RabidGravy | Hmm | 09:37 | |
m: my $i = 0; say ((0 xx *).flatmap: { last if $i++ == 6; $i }).elems; | |||
camelia | Cannot .elems a lazy list in block <unit> at <tmp> line 1 Actually thrown at: in block <unit> at <tmp> line 1 |
||
09:37
jjido joined
|
|||
RabidGravy | is that a recent change? | 09:37 | |
IOninja | RabidGravy: no, but flat was failing to preserve laziness and that was fixed recently. | 09:38 | |
09:38
bjz_ joined
|
|||
IOninja | m: my $i = 0; say ((0 xx *).flatmap: { last if $i++ == 6; $i }).eager.elems; | 09:39 | |
camelia | 6 | ||
09:39
bjz left
|
|||
andrzejku | guys what do you know about perl6 and xmpp? | 09:41 | |
RabidGravy | there's a module for it that someone recently revived, that's about it | 09:45 | |
09:45
ufobat joined
|
|||
samcv | i think i noticed that once IOninja. was it reifying it or just not preserving what is-lazy would give you? | 09:46 | |
RabidGravy | IOninja, right that makes sense, so the code in DBIish that basically does that was working by accident then :) | ||
IOninja | samcv: not preserving .is-lazy, which caused things to reify stuff | 09:49 | |
samcv | ah ok | ||
IOninja | m: my @a = (0 xx *).flat | ||
camelia | ( no output ) | ||
IOninja | That used to hang | ||
09:49
vktec left
|
|||
IOninja | m: sub (*@a) { }((0 xx *).flat) | 09:49 | |
camelia | ( no output ) | ||
IOninja | that too | 09:50 | |
09:50
sena_kun joined
09:51
rsaarelm left
09:56
cyphase joined
09:57
llfourn joined
09:58
mr-foobar left,
parv left
|
|||
sena_kun | does :dba adverb still alive? | 10:00 | |
10:03
llfourn left
10:05
llfourn joined
10:06
espadrine left,
ChoHag joined
10:07
ChoHag left
|
|||
moritz | m: say 'bar' ~~ regex { :dba('foo') bar } | 10:11 | |
camelia | Nil | ||
moritz | m: say 'bar' ~~ regex { bar } | ||
camelia | 「bar」 | ||
moritz | huh | ||
untested at least | 10:12 | ||
Perl6::Grammar uses it quite a bit | |||
sena_kun | I'll file a roast issue now... | 10:15 | |
10:17
mr-foobar joined
|
|||
sena_kun | moritz, thanks. | 10:18 | |
moritz | QAST::Regex(:rxtype(literal) :subtype()) \"foo\" | 10:24 | |
m: say 'foobar' ~~ regex { :dba('foo') bar } | |||
camelia | 「foobar」 0 => 「foo」 |
||
10:29
sena_kun left,
sena_kun joined
|
|||
sena_kun | I'm working on tilde explanation now. It says that tilde usage will produce a better error message, but how I can see it(the error message) when regex failed? | 10:29 | |
m: say "abc" ~~ /a ~ (c) (b)/; say "ab" ~~ /a ~ (c) (b)/ | |||
camelia | 「abc」 1 => 「b」 0 => 「c」 Nil |
||
Geth | DBIish: 37d5c2079c | (Jonathan Stowe)++ | lib/DBDish/StatementHandle.pm6 Make fetchall-* methods eager The flatmap was accidentally reifying the lists until this was fixed in github.com/rakudo/rakudo/commit/ca...8c5da329c6 This is a naïve fix, but the tests would need to be rejigged if the laziness wants to be preserved. Fixes #87 |
||
10:34
araraloren joined
10:39
jjido left
|
|||
ZzZombo | What is "braid" and why do I feel bad about it in advance? | 10:42 | |
masak | ZzZombo: my answer will be only as far as I understand :) | ||
a braid is the total sum of all languages and slangs currently in effect | |||
10:43
bwisti joined
|
|||
masak | like, say you just defined a new operator in your program. now you've technically extended the language with that operator. | 10:43 | |
that's like adding one little thread (your operator) to an already quite woven-together braid (Perl 6) | |||
ZzZombo: the reason Perl 6 needs to invent a fairly new term for this is that it's trying to do something other languages are not (as far as I'm aware) | 10:44 | ||
the thing it's trying is something like having the cake and eating it wrt everyone being able to extend the language while also minimally colliding with everyone else in doing so | 10:45 | ||
ZzZombo | well then | ||
masak | the closest thing in Perl 5 is something called "source filters". I know next to nothing about them, but I can say with certainty that they are not famous for their *composability* | 10:46 | |
I've gotten the eerie feeling that source filters are not very far removed from being regex-manipulations on source text -- someone feel free to enlighten me further on that point | 10:47 | ||
hm, I wonder if someone has ever done something like source filters, but with PPI as a foundation :) | |||
does PPI round-trip back to source text? | 10:48 | ||
ZzZombo | HELP! I'm here watching my cursor suddenly moving by itself towards the right bottom corner.... | 10:50 | |
I am not holding the mouse and its resting on its pad | |||
it's greased, there is no way it can somehow start to move by itself... | 10:51 | ||
masak | how long since you performed the Mousa Calibration Ritual? | ||
Mouse* | |||
ZzZombo | what is that? Is that some thing related to the old devices with a track ball inside them? | ||
masak | maybe you need to reboot your fridge or toaster of they're IoT devices. they might interfere with the mouse. | 10:52 | |
ZzZombo | WTF, this is so creepy. | ||
araraloren | ... | 10:53 | |
masak | maybe it's your neighbor who has hacked the mouse. you did password-protect your mouse, right? | 10:56 | |
ZzZombo | hunter2 | ||
masak | all I see is asterisks | ||
ZzZombo | see, it works. | ||
masak | oh, that was a password? great! | 10:57 | |
10:57
jjido joined
11:01
bwisti left
|
|||
IOninja | wtf | 11:08 | |
masak | ZzZombo: I know TimToady and possibly jnthn have been making braid-related Rakudo commits lately, but I don't know what prompted it | ||
IOninja | RabidGravy: that code looks insane to me. What's with the 0 xx * bit? | 11:09 | |
RabidGravy | dunno | ||
IOninja | RabidGravy: also, that's the wrong commit. The fix is in github.com/rakudo/rakudo/commit/51b0aba | ||
masak | `0 xx *` just means "a fair amount of zeros" :) | 11:10 | |
11:10
cibs left
|
|||
IOninja | RabidGravy: and why eager the fetchall? You'd think that to be a heavy operation that can benefit greatly from not fetching everything at the same time | 11:10 | |
masak: ... which aren't used in that code. | |||
RabidGravy | hence "naive fix" | 11:11 | |
masak | huh. | 11:12 | |
IOninja | masak: my thoughts exactl.y | ||
masak | if you mean that they aren't used for the .map, that just means that the `0` could've been anything | ||
11:12
cibs joined
|
|||
IOninja | like repeat...until? Sure. | 11:13 | |
masak | basically. | ||
RabidGravy | I didn't write the code, I'm sure whoever did had their reasons | ||
it wasn't lazy before due to the flat losing the laziness so I was just preserving the tested behaviour | 11:16 | ||
IOninja | It was lazy. | ||
star: my $x = (0 xx *).flat; say $x[^10] | 11:17 | ||
camelia | (0 0 0 0 0 0 0 0 0 0) | ||
RabidGravy | well the tests all assumed it wasn't | 11:18 | |
11:20
jjido left
|
|||
IOninja | :/ | 11:22 | |
11:29
agentzh joined
11:30
llfourn left,
llfourn joined
11:31
jjido joined
11:33
agentzh left
|
|||
Geth | doc/tilde-explanation: 7453809342 | Altai-man++ | doc/Language/regexes.pod6 Remove information about :dba that is not in roast(now). |
11:37 | |
11:40
lukaramu joined
11:49
labster left
|
|||
RabidGravy | m: say [(0 xx *)] eqv []; | 11:50 | |
camelia | This type cannot unbox to a native integer: P6opaque, Failure in block <unit> at <tmp> line 1 |
||
RabidGravy | any value in making that a more obvious message? | 11:51 | |
ufobat | .seen zostay | 11:52 | |
yoleaux | I saw zostay 11 Dec 2016 18:10Z in #perl6: <zostay> No. Hard to find time and when I do I keep running into obscure async bugs | ||
ufobat | :/ | ||
Geth | perl6.org: 514039ce2e | (Steve Mynott)++ | 576 files Make it even more obvious we're reading an archive! |
11:58 | |
IOninja | s: &infix:<eqv>, \([(0 xx *)], []) | ||
11:59
SourceBaby joined,
ChanServ sets mode: +v SourceBaby,
Undercover joined,
ChanServ sets mode: +v Undercover
|
|||
IOninja | s: &infix:<eqv>, \([(0 xx *)], []) | 11:59 | |
SourceBaby | IOninja, Sauce is at github.com/rakudo/rakudo/blob/b933...Mu.pm#L871 | ||
IOninja | RabidGravy: I'd say there should not be any error there. | 12:00 | |
sena_kun | stmuk_, ping? did you commit github.com/perl6/perl6.org/commit/514039ce2e because of mine question? | ||
IOninja | m: say (0 xx *) eqv (0 xx *) | 12:01 | |
camelia | Cannot eqv lazy Sequences in block <unit> at <tmp> line 1 |
||
stmuk_ | if you are toddandmargo then yes :) | ||
IOninja | hm | ||
RabidGravy | IOninja, yeah I was just about to say that :) | ||
IOninja | ¯\_(ツ)_/¯ | 12:02 | |
m: say [(0 xx *)].is-lazy | |||
camelia | True | ||
sena_kun | stmuk_, ah, okay then. :) | ||
RabidGravy | and strangely I just typed that in the shell here too | 12:03 | |
sena_kun | also, I double question above, since there are more people now. The tilde explanation(in specs, at least) says that "tilde usage will produce a better error message". but how I can see it(the error message) when regex failed? | 12:04 | |
m: say "abc" ~~ /a ~ (c) (b)/; say "ab" ~~ /a ~ (c) (b)/ | |||
camelia | 「abc」 1 => 「b」 0 => 「c」 Nil |
||
sena_kun | m: say "abc" ~~ /a (b) (c)/; say "ab" ~~ /a (b) (c)/ | ||
camelia | 「abc」 0 => 「b」 1 => 「c」 Nil |
||
IOninja | sena_kun: it's produced in the grammar | 12:05 | |
jnthn | m: grammar G { token TOP { a ~ c b } }; G.parse('a b') | ||
yoleaux | 18 Feb 2017 16:42Z <IOninja> jnthn: seems $foo.WHAT === Code doesn't detect thunks? Here's my version of infix:<orelse> but it still returns a thunk instead of executed thunk. Am I doing it wrong? gist.github.com/zoffixznet/82ef0cf...5fab557427 | ||
camelia | ( no output ) | ||
yoleaux | 18 Feb 2017 16:53Z <IOninja> jnthn: nevermind, I've got Blocks not Code | ||
IOninja | m: grammar { token TOP { '[' ~ ']' .+ }; method FAILGOAL (|c) { say c; exit } }.parse: '[meow' | ||
camelia | \("']' ") | ||
jnthn | m: grammar G { token TOP { a ~ c b } }; G.parse('ab') | ||
camelia | ( no output ) | ||
IOninja | m: grammar { token TOP { \[ ~ \] \w+ }; method FAILGOAL($goal) { die "cannot find $goal near position {self.pos}" }}.parse: '[moep bla]' | ||
camelia | cannot find \] near position 5 in method FAILGOAL at <tmp> line 1 in regex TOP at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
jnthn | Oh, right, you have to implement FAILGOAL | ||
We used to generate this error by default | 12:06 | ||
e.g. there was a default FAILGOAL that did "Cannot find ]" or so | |||
andrzejku | hi people :) | ||
sena_kun | jnthn, this default will be returned on some point or I can document it as "do it yourself"? | 12:07 | |
jnthn | And pepole whined "oh but every other regex construct backtracks, why not this one", so we ended up changing it... | ||
12:07
wigner joined
|
|||
jnthn | sena_kun: No, these days it's more like "you have the opportunity to give better errors by implementing FAILGOAL" | 12:07 | |
I suggest providing an example like the one IOninja just gave | |||
sena_kun | jnthn, FAILGOAL works only for ~ or is it a default method for failure errors in general? | 12:08 | |
jnthn | sena_kun: Only for ~ | ||
sena_kun | jnthn, noted. Thanks, folks, I'll finish it faster now. | 12:09 | |
jnthn | sena_kun: The ~ is known as "goal matching syntax", which is where the name FAILGOAL came from | ||
12:13
pmurias joined
|
|||
ufobat | .tell zostay what is the status of your HTTP-Request-Supply? i'd really love to have it on modules.perl6.org so we can have a async http p6w server | 12:15 | |
yoleaux | ufobat: I'll pass your message to zostay. | ||
12:19
jjido left
12:27
araraloren left
12:28
araraloren joined
|
|||
masak | I think I was one of perhaps several who said "every other regex construct backtracks" :) | 12:45 | |
I remember arguing the point in an RT ticket somewhere | 12:46 | ||
I think what stood out to me was that grammars already have a composable kind of failure mechanism (backtracking), and this one thing incongruously used exceptions instead | 12:47 | ||
stmuk_ | I think all the slangs in the ecosystem are broken now | 12:48 | |
is braid getting moved to 6.d? | 12:49 | ||
pmurias | stmuk_: I would be surprised if we support any backwards compability with slangs | 12:55 | |
sammers | hi #perl6 | 13:01 | |
DrForr | Afternoon, sammers. | 13:02 | |
stmuk_ | slangs aren't documented either so I guess its not really supported yet | ||
sena_kun | why is it broken? on latest rakudo mine just prints "Deprecated use of %*LANG<MAIN> assignment detected in use; module should export syntax using $*LANG.define_slang("MAIN",<grammar>,<actions>) instead". But it passess my tests. \0/ | 13:07 | |
13:11
bjz_ left
13:12
ZzZombo_ joined,
ZzZombo_ left,
ZzZombo_ joined,
ZzZombo is now known as Guest47981,
ZzZombo_ is now known as ZzZombo
|
|||
sammers | is there anyway to get the pid from Proc::Async? | 13:12 | |
13:13
Guest47981 left
|
|||
RabidGravy | isn't there a .pid attribute? | 13:19 | |
on Proc | |||
sammers | yes | 13:20 | |
but I am getting no such method for pid on Proc::Async | 13:21 | ||
RabidGravy | sorry, yes, confused myself there | 13:22 | |
13:22
pyrimidine left,
pyrimidine joined
13:23
ZzZombo left
13:24
bjz joined
13:25
llfourn left
|
|||
IOninja | don't really see a way to get at the Proc... from reading the code. | 13:30 | |
stmuk_: nope, it was merged yesterday. | 13:32 | ||
13:32
lukaramu left
|
|||
IOninja | %*LANG is not a supported way to do anything. We can't restrict our efforts just because someone went ahead and used some part of guts. | 13:33 | |
And the warning suggests a proper way to do what the slang modules are doing. | |||
13:33
espadrine_ joined
|
|||
IOninja | sena_kun: same with your warning. | 13:34 | |
13:34
Cabanossi left
|
|||
sena_kun | IOninja, yep, I understand it. But warning about deprecation is not "totally broken". | 13:35 | |
IOninja | "If you have any code that depends on %*PRAGMAS or $*ACTIONS, it'll break." | ||
"if you have code that sets %*LANG from a use, it'll emulate and warn" | |||
sena_kun | ah, okay. | ||
IOninja | "now that the release is out, I'm going to merge braids, so expect a bit of instability and/or warnings from slang modules" | ||
13:35
zakharyas joined
13:36
Cabanossi joined
|
|||
IOninja | and there's at least one slang module that's currently crashing with some weird error.... | 13:36 | |
13:36
bjz left
|
|||
DrForr | Sigh, probably mine. | 13:36 | |
IOninja | Slang::Tuxic | 13:37 | |
lizmat | $ perl6 -MSlang::Tuxic -e 'say "hello world"' | ||
hello world | |||
not immediately obvious, or am I missing something | 13:38 | ||
IOninja | lizmat: [Tux] had issues with it: irclog.perlgeek.de/perl6-dev/2017-...i_14126519 | ||
lizmat is still slightly dazed from jetlag | |||
13:39
geekosaur left
13:40
Cabanoss- joined
|
|||
sena_kun | I wonder why I've been mentioned in the release announce. | 13:41 | |
13:41
geekosaur joined
13:42
Cabanossi left,
Cabanoss- is now known as Cabanossi
|
|||
IOninja | "The following people contributed to this release:" | 13:43 | |
Everyone who commited to doc, roast, moarvm, nqp, or rakudo are listed. | |||
ordered by number of commits | 13:44 | ||
sena_kun | Yep. But I did nothing in rakudo repo. Ah, so doc contributions are counted too. Cool. | ||
IOninja | Yeah. This is a script that finds contributors: github.com/rakudo/rakudo/blob/nom/...butors.pl6 | 13:45 | |
sena_kun | My self-confidence was incremented today. \0/ | 13:46 | |
IOninja | \o/ | ||
tbrowder | o/ salud, #perl6 | 13:50 | |
sena_kun | tbrowder, hello. | ||
tbrowder | hi, sena_kun | ||
my question for today involves initializing and assigning to arrays | 13:51 | ||
here's what i've tried | 13:52 | ||
m: my %r<a> = Array.new; %r<a>.push: 'b' | 13:53 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Shaped variable declarations not yet implemented. Sorry. at <tmp>:1 ------> 3my %r<a>7⏏5 = Array.new; %r<a>.push: 'b' |
||
tbrowder | what is solution? | 13:54 | |
IOninja | m: m: my %r; %r<a>.push: 'b'; say %r | ||
camelia | {a => [b]} | ||
13:54
sammers left
|
|||
gfldex | m: my %r = a => Array.new; %r<a>.push: 'b'; dd %r; | 13:54 | |
camelia | Hash %r = {:a($["b"])} | ||
DrForr | m: my %r<a> = (); %r.push: 'a'; # if you want to be explicit. | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Shaped variable declarations not yet implemented. Sorry. at <tmp>:1 ------> 3my %r<a>7⏏5 = (); %r.push: 'a'; # if you want to be |
||
masak | tbrowder: problem was the `my %r<a>` part | ||
tbrowder: you probably meant `my %r; %r<a> = []` | 13:55 | ||
DrForr | Oh, ne'er mind, that's what I get for copying... | ||
gfldex | you can do it if you assign a Pair of Str and Array in the initialiser | ||
tbrowder | masak: i tried the [] before and it didn't work either, maybe my rakudo is too old | 13:56 | |
IOninja | m: m: my %r; my $z = %r<a>; $z.push: 'b'; say %r | ||
camelia | {} | ||
IOninja | aww | ||
m: m: my %r; my $z := %r<a>; $z.push: 'b'; say %r | |||
camelia | {a => [b]} | ||
gfldex | tbrowder: the syntax my %foo<key1 key2 key3> is reserved for Hashes with compile time keys. | ||
IOninja | hehee :) Magic! | ||
m: my %r; my %z; my $z := %r<a>; my $r := $z; %z<z> := $r; $z.push: 'b'; say %r; say %z | 13:57 | ||
camelia | {a => [b]} {z => [b]} |
13:58 | |
IOninja | ehehe way cool | ||
hmmm | |||
m: my %r; my $z; %r<a b c d e f g> := $z xx *; $z.push: 'b'; say %r; | |||
camelia | WARNINGS for <tmp>: Useless use of $z in sink context (line 1) Cannot bind to Hash slice in block <unit> at <tmp> line 1 |
||
tbrowder | woe is me, all i want to do is have a hash of arrays formed programmatically, but i guess masak's solution is good for now | 13:59 | |
IOninja | what you taking aboot... it's not useless! | ||
m: my %r; my $z; %r{$_} := $z for <a b c d e f g>; $z.push: 'b'; say %r; | |||
camelia | {a => [b], b => [b], c => [b], d => [b], e => [b], f => [b], g => [b]} | ||
IOninja | ehehe | ||
That's pretty cool | |||
DrForr | m: my @foo = 1,2; my %r; %r<a> = @foo; | ||
camelia | ( no output ) | ||
IOninja | tbrowder: you did see my version, right? You don't need any intializations. It'll autovivify automatically. | 14:00 | |
tbrowder | i think so...let me look back | ||
IOninja | m: my %r; %r<a>.push: 42; %r<b>.append: 72, 89; %r<z> = [1, 2, 3, 4]; say %r | 14:01 | |
camelia | {a => [42], b => [72 89], z => [1 2 3 4]} | ||
IOninja | The only suckage is: | ||
m: my %r; say $r<foo>.elems | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$r' is not declared. Did you mean '%r'? at <tmp>:1 ------> 3my %r; say 7⏏5$r<foo>.elems |
||
IOninja | m: my %r; say %r<foo>.elems | ||
camelia | 1 | 14:02 | |
IOninja | m: my %r; %r<foo> andthen .elems.say | ||
camelia | ( no output ) | ||
tbrowder | yes, i thought that was madak, sorry | ||
IOninja | m: my %r; %r<foo>:v.elems.say | ||
camelia | 0 | ||
tbrowder | s/d/s/ | ||
IOninja | m: my %r = foo => [<a b c>]; %r<foo>:v.elems.say | ||
camelia | 3 | ||
IOninja | Oh, cool. No suckage then. | 14:03 | |
Geth | doc/tilde-explanation: 49a1cef4fe | Altai-man++ | doc/Language/regexes.pod6 Add FAILGOAL explanation and example |
||
tbrowder | my %r; %r<a>.push: 'b' | 14:04 | |
m: my %r; %r<a>.push: 'b' | 14:05 | ||
camelia | ( no output ) | ||
sena_kun | tbrowder, will you have some time for a review later? | ||
14:06
sergot joined
|
|||
tbrowder | sena_kun: probably, just sitting around recovering from some winter crud | 14:06 | |
anyone have strong feelings on best p6 http client? | 14:07 | ||
sena_kun | ah, I spent apathetically a whole day yesterday. but didn't do any work. :/ | 14:10 | |
SmokeMachine | moritz: I'm sorry, but I'm curious: why isn't Directory a child of File? | 14:11 | |
gfldex | tbrowder: HTTP::Client does support https now, for small values of https that is. | ||
Geth | ecosystem: b93e3780f6 | (Ahmad M. Zawawi)++ | META.list farabi6: META.info -> META6.json |
||
sena_kun | tbrowder, github.com/perl6/doc/pull/1190 this little peace and, more likely, github.com/perl6/doc/pull/1187, but the second is bigger(and older). Your help will be greatly appreciated. | 14:12 | |
14:12
sammers joined
|
|||
tbrowder | sena_kun: ok, it will be later today if that's ok | 14:12 | |
sena_kun | tbrowder, any time you can and want is fine, it is me who is at fault here. :) | 14:13 | |
tbrowder | gfldex: how small? i want a client that can handle com with acme server of letsencrypt | 14:14 | |
gfldex | tbrowder: very little testing was done and don't expect man TLS related error messages. | 14:15 | |
*many | |||
tbrowder | well, i can try it...thanks | ||
gfldex: probably the https certs are larger than the expected payload | 14:17 | ||
14:20
llfourn joined
14:21
kurahaupo__ joined
|
|||
SmokeMachine | m: my %r; %r.push: a => 'b'; say %r | 14:21 | |
camelia | {} | ||
tbrowder | m: my %r; %r<a>.push('a'); %r<a>.push('b'); my @a = %r<a>; say @a.perl | 14:25 | |
camelia | [["a", "b"],] | ||
14:25
sammers left
14:27
Cabanossi left
|
|||
tbrowder | IOninja, it looks like i keep pushing to the first array element | 14:27 | |
14:27
Cabanossi joined
14:28
khw joined
|
|||
tbrowder | IOninja: looks like consecutive pushes are to the first array element. | 14:29 | |
m: my %r<a> = Array.new('a'); %r<a>.push: 'b'; say %r<a>.perl | 14:32 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Shaped variable declarations not yet implemented. Sorry. at <tmp>:1 ------> 3my %r<a>7⏏5 = Array.new('a'); %r<a>.push: 'b'; say |
||
SmokeMachine | m: my %r; %r.push: a => 'b'; say %r # docs.perl6.org/type/Hash#method_push | 14:33 | |
camelia | {} | ||
SmokeMachine | m: my %r; %r.push: (a => 'b'); say %r | ||
camelia | {a => b} | ||
SmokeMachine | Why is the () needed? | 14:34 | |
m: my %r; push %r, a => 'b'; say %r | |||
camelia | {} | ||
SmokeMachine | m: my %r; push %r: a => 'b'; say %r | 14:35 | |
camelia | {} | ||
SmokeMachine | m: my %h; push %h, 'd' => 5; dd %h # from the doc | 14:36 | |
camelia | Hash %h = {:d(5)} | ||
14:36
AlexDaniel joined
|
|||
SmokeMachine | m: my %h; push %h, d => 5; dd %h | 14:36 | |
camelia | Hash %h = {} | ||
14:37
sammers joined
|
|||
tbrowder | IOninja: i looked back at yr examples and still don't see a hash of arrays | 14:37 | |
SmokeMachine | m: my %r; %r.push: 'a' => 'b'; say %r | ||
camelia | {a => b} | ||
SmokeMachine | Why it works with '' but doesn't work without it? | 14:38 | |
14:38
ZzZombo joined,
ZzZombo left,
ZzZombo joined
|
|||
SmokeMachine | m: my %r; %r.push: a => 'b'; m: my %h; %h.push: 'a' => 'b'; dd %r, %h | 14:39 | |
camelia | Hash %r = {} Hash %h = {:a("b")} |
||
tbrowder | my examples have been with one key, but the need is for a basic hash of arrays, one mutable array per hash key | ||
how can that most painlessly and correctly be created incrementally? anyone? | 14:40 | ||
in p5 terms i believe: an HoA | 14:41 | ||
SmokeMachine | m: dd a => 4; dd 'a' => 4 # why? | 14:44 | |
camelia | block <unit> :a(4) |
||
gfldex | m: role R { method push($key, $value){ self.{$key}.push: $value; self } }; my %h does R; %h.push('A', 1); %h.push('B', 2); %h.push('A', 3); dd %h; | 14:46 | |
camelia | Hash+{R} %h = {:A($[1, 3]), :B($[2])} | ||
gfldex | tbrowder: ^^^ | ||
SmokeMachine | gfldex: hash already has a push method, doesn't it? | 14:48 | |
gfldex | SmokeMachine: yes | ||
m: my %h; %h.push(a => 1); dd %h; | |||
camelia | Hash %h = {} | ||
gfldex | i did expect it to add the Pair to the Hash. | 14:49 | |
timotimo | SmokeMachine: because a => 4 is a named parameter and 'a' => 4 is a pair literal that'll be put into a positional parameter | ||
SmokeMachine | m: my %h; %h.push('A' => 1); %h.push('B' => 2); %h.push('A' => 3); dd %h; | ||
camelia | Hash %h = {:A($[1, 3]), :B(2)} | ||
SmokeMachine | timotimo: ok, that makes sense... | 14:50 | |
gfldex | timotimo: as stated in the docs :-> | ||
SmokeMachine | gfldex: I didn't read everything... thanks... :( | 14:51 | |
timotimo | yup, the docs say that | ||
it's a common gotcha, especially for .push :) | 14:52 | ||
gfldex | luckily it wasn't me who wrote that | ||
timotimo | sooo, do the docs actually tell about s{abc} = "def"? i couldn't find anything about that form when i was answering that question on the users mailing list | ||
IOninja recalls writing that | |||
gfldex | timotimo: it's not in the docs because it's not in roast | 14:53 | |
SmokeMachine | Couldn't the hash's push receive named parameters and act as it was positional pairs? I'm not sure if it's a good idea... | ||
IOninja | timotimo: last code example: docs.perl6.org/language/operators#...bstitution | ||
gfldex | SmokeMachine: it could but then loads of ppl would not learn about the named-argument rule on Method | 14:55 | |
DrForr | My mistake there, I'm afraid. | ||
tbrowder | ok, but why is, in my examples, %r<a>, not an array var? | ||
SmokeMachine | gfldex: thanks! | 14:56 | |
IOninja | SmokeMachine: it'd make it much slower, lock us out from adding any options to the routine later on, and this quirk is present in literally all method calls, so adding support for that just in push is a drop in a bucket | ||
tbrowder: which example exactly? | |||
SmokeMachine | IOninja: thanks! | ||
timotimo | OK, so there's a line in one of the examples... it's not very visible, though. like, it's not pointed out at all that that example is going to be presenting such a different syntax out of the blue | 14:57 | |
IOninja | timotimo: well, it is, kinda. The last sentence is all about that syntax. | ||
timotimo | also: how the heck do we put it into the index? | 14:58 | |
i'd like it to have a heading of its own | |||
tbrowder | IOninja: my %r<a>; %r<a>.push: 'a'; # repeat push one or more times... | 14:59 | |
timotimo | but "my %r<a>" doesn't even work? | ||
tbrowder | so no simple way to incrementally create a p6 HoA?, not good pr | 15:00 | |
timotimo | of course there is? | 15:01 | |
let me try | |||
Geth | doc: 94a64bdbe3 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Method.pod6 index extra named arguments |
||
doc: 1140358315 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Method.pod6 link to nextsame |
|||
timotimo | m: my %h; %h<foo>.push(1); %h<foo>.push(2); %h<bar>.push(99); dd %h | 15:02 | |
camelia | Hash %h = {:bar($[99]), :foo($[1, 2])} | ||
timotimo | what's wrong with this? | ||
tbrowder | but there needs at least needs to be a good example in the docs which i'm happy to add if i knew how to make one :) | ||
IOninja | tbrowder: well, you keep using my %r<a> even though it's been pointed out to you that's not correct syntax. | ||
tbrowder: which one keeps pushing to the first element? | 15:04 | ||
tbrowder | sorry, but isn't that what timotimo just did? | ||
timotimo | no | ||
i used "my %h" | |||
pmurias | n "my %r<a>;" is the part that does not work | ||
timotimo | "my %h<foo>" would (in the future, when we've implemented that) be a declaration for a hash that only accepts the key "foo" and will never accept any other key | 15:05 | |
tbrowder | oh, slapping forehead,...gross series of typos | ||
let me try again: | 15:06 | ||
timotimo | oh, i think i see what your problem is | ||
m: my %h; %h<a>.push(1); %h<a>.push(2); my @a = %h<a>; my @b = @%h<a>; dd @a, @b; | |||
camelia | Array @a = [[1, 2],] Array @b = [Failure.new(exception => X::AdHoc.new(payload => "Type Seq does not support associative indexing."), backtrace => Backtrace.new)] |
||
timotimo | whoops %) | ||
m: my %h; %h<a>.push(1); %h<a>.push(2); my @a = %h<a>; my @b = @(%h<a>); dd @a, @b; | 15:07 | ||
camelia | Array @a = [[1, 2],] Array @b = [1, 2] |
||
timotimo | tbrowder: your mistake was that the arrays in the hash are in an itemized container, so when you assigned to @a with "my @a = %h<a>" you were only putting a single item into @a | ||
and you interpreted that as if %h<a> was a list with a list as its first element | |||
tbrowder | m: my %r; %r<a>.push: 'a'; %r<a>.push: '3'; say %r<a>.perl | 15:08 | |
camelia | $["a", "3"] | ||
timotimo | exactly | ||
15:08
cibs left
15:10
cibs joined
|
|||
tbrowder | timotimo: thanks for yr patience, and i'll go back and ensure my prog uses right syntax, also thanks IOninja | 15:11 | |
timotimo | sure thing | ||
15:18
lukaramu joined
|
|||
pmurias | 'use Test; plan(1); ok(1)' just started working in local rakudo.js :) | 15:22 | |
ZzZombo | # Sleep a bit to prevent 100% CPU usage | ||
sleep 0.05; | |||
Surely there is a better way to do that, isn't there? Like yield in some languages. | |||
pmurias | ZzZombo: where is that used? | 15:23 | |
IOninja | heh | 15:24 | |
timotimo | you could use NativeCall; sub pthread_yield is native(Str) returns int32 {*}; pthread_yield(); | 15:25 | |
IOninja | And he's gone :) | 15:27 | |
ZzZombo | github.com/azawawi/perl6-electron/...p.pm6#L120 | ||
15:28
emeric joined
|
|||
IOninja | Looks normal to me. | 15:29 | |
ZzZombo | Speaking of that module, how does it work? Isn't Electron is JS+HTML+Node.js, so can I, say, populate items in a combobox dynamically from Perl using that, or what does that actually allow you to do? | 15:30 | |
IOninja | You could use Supply.interval if you want it non-blocking. | ||
or show the .run into start | |||
*shove | 15:31 | ||
15:32
agentzh joined
|
|||
Geth | doc: f594c8e0bc | (Wenzel P. P. Peppmeyer)++ | doc/Type/Method.pod6 doc lastcall |
15:32 | |
gfldex | ENODOC-- | 15:33 | |
sadly I don't know what the current value of ENODOC is | |||
15:35
ufobat left
15:37
agentzh left
|
|||
pmurias | ZzZombo: it seems to talk to electron using http | 15:37 | |
andrzejku | hi, people | 15:38 | |
what do you know about Larry Wall and Perl6? | |||
pmurias | ZzZombo: the js backend I'm working on should allow to run on electron directly, but it a bit away from being usable as a toy and a long way away from being usable for something serious | 15:39 | |
s/to run/running | |||
AlexDaniel | andrzejku: ¯\_(ツ)_/¯ | 15:40 | |
ZzZombo | What is Perl6 again? I forget. | ||
AlexDaniel googles | 15:41 | ||
“Larry Wall maintains a reference grammar known as STD.pm6” | |||
:S | |||
gfldex | andrzejku: i know that the biggest value for „Larry Wall“ is TimToady and the biggest value for Perl 6 is Rakudo. | 15:42 | |
andrzejku | :) | 15:43 | |
gfldex | andrzejku: „biggest“ in this context means „largest impact on mankind“ | ||
El_Che | andrzejku: you may confuse Larry Wall with that guy with the same name that succesfully started a business with colourfull shirts and cool hats: i.ytimg.com/vi/HAXGD3JE7pU/hqdefault.jpg | 15:49 | |
15:54
chee is now known as google
15:55
google is now known as chee
|
|||
Geth | doc: 86ff9ff317 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod6 improve wording and examle |
15:56 | |
16:04
wigner left
|
|||
ZzZombo | Is there a way to output something like 1000/3 as such, but 5/10 as 0.5? | 16:05 | |
tbrowder | timotimo: my examples today were very shortened from the code i'm working with. here today we could see the array form with the say .perl syntax, but in my real code i was seeing just a string concatenation of the array contents. i vaguely remember having the same problem last year but unpacking the array in code took some magic...don't know what best | 16:07 | |
practice is but i was creating a var like this: my @d = %r<a> which gave a single string but this works: my @d = @(%r<a>) which gave me the array elements | |||
Geth | doc: 31ac0d10c8 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Pair.pod6 show how to handle colon lists |
16:08 | |
tbrowder | looks kind of like dereferencing AND i failed to say the hash var was returned from the sub that actually created it!! | ||
andrzejku | what do you think if the people programming Perl are smarter than for ex. Ruby? | ||
Perl6 suppose use more brain | 16:09 | ||
tbrowder | so i guess it is a reference, but i thought references were supposed to be kind of hidden for most uses, as in everything is kind of a reference | 16:10 | |
IOninja | andrzejku: a nonsensical generalization. | ||
sena_kun | andrzejku, brainf-k supposes even heavier usage of brain activity. :) | ||
IOninja | m: .perl.say given <1000/3>, <5/10> | 16:11 | |
camelia | (<1000/3>, 0.5) | ||
IOninja | ZzZombo: ^ | ||
m: .subst(:g, /<[<>]>/, '').perl.say given <1000/3>, <5/10> | 16:12 | ||
camelia | "333.333333 0.5" | ||
IOninja | m: .perl.subst(:g, /<[<>]>/, '').say given <1000/3>, <5/10> | ||
camelia | (1000/3, 0.5) | ||
IOninja | m: .perl.trans(«<>» => '').say given <1000/3>, <5/10> | 16:13 | |
camelia | (1000/3, 0.5) | ||
Geth | doc: becaee574d | (Wenzel P. P. Peppmeyer)++ | doc/Type/Pair.pod6 index colon-list in Pair |
||
IOninja | tbrowder: no referencing or dereferencing involved. %r<a> array is itemized, so you're providing just 1 item to @a. The `@` is a coercer, not dereferencer. You could also slip with `| | 16:17 | |
m: my %r = :a[<a b c>]; my @d = |%r<a>; dd @d | |||
camelia | Array @d = ["a", "b", "c"] | ||
IOninja | m: my %r = :a[<a b c>]; my @d = @%r<a>; dd @d | ||
camelia | Array @d = [Failure.new(exception => X::AdHoc.new(payload => "Type Seq does not support associative indexing."), backtrace => Backtrace.new)] | ||
IOninja | m: my %r = :a[<a b c>]; my @d = @(%r<a>); dd @d | ||
camelia | Array @d = ["a", "b", "c"] | ||
IOninja | m: my %r = :a[<a b c>]; my @d = %r<a>.list; dd @d | 16:18 | |
camelia | Array @d = ["a", "b", "c"] | ||
IOninja | m: my %r = :a[<a b c>]; my @d = %r<a><>; dd @d | ||
camelia | Array @d = ["a", "b", "c"] | ||
tbrowder | IOninja: thanks, that helps understand the array some better, i have to say the docs probaby could introduce arrays a little gentler, at least for me, haven't gotten head wrapped around itemization yet | 16:21 | |
IOninja | If you have to boxes of crayons and I tell you to put one in the other, there are two ways to interpret it: shove the entire box into the other (so you retain information about the crayons inside of it) or move the crayons themselves, discarding one box. The former is itemization—treating something as one thing—the latter is the slipping of one array into another: you end up with one homogenous set of | 16:24 | |
elements. | |||
*two boxes | |||
m: my @box1 = <a b c>; my @box2 = <d e f>; @box1.push: @box2; say @box1 | 16:26 | ||
camelia | [a b c [d e f]] | ||
IOninja | m: my @box1 = <a b c>; my @box2 = <d e f>; @box1.push: |@box2; say @box1 | ||
camelia | [a b c d e f] | ||
moritz | of just use append | ||
my @box1 = <a b c>; my @box2 = <d e f>; @box1.append: @box2; say @box1 | 16:27 | ||
m: my @box1 = <a b c>; my @box2 = <d e f>; @box1.append: @box2; say @box1 | |||
camelia | [a b c d e f] | ||
moritz | pyhton does pretty much the same thing, excep that Perl 6's "push" is called "append" in python, and Perl 6's "append" is spelled += in python | ||
tbrowder | okay, i'll experiment some more then, thanks | 16:33 | |
16:35
araraloren left
16:39
bwisti joined
16:40
pyrimidine left
|
|||
timotimo | there's also the "extend" method which maps to perl6's "append" | 16:41 | |
tbrowder | sena_kun: pr 1190 looks good to me, too bad dba adverb isn't still usable!! | 16:48 | |
sena_kun | tbrowder, it is usable(as I see it), just doesn't in roast yet. Thanks, I'll merge it right away. | 16:49 | |
*isn't | |||
tbrowder | hm, can you add a test in roast? | ||
sena_kun | tbrowder, hmmm, maybe I can, but not today, I think. I'm working on my course paper now. :/ Added this to my todo-list. | 16:50 | |
tbrowder | ok, maybe just add an issue and say you will work on it. good luck on paper...subject? | 16:52 | |
Geth | doc/master: 4 commits pushed by Altai-man++ | ||
tbrowder | or title? | ||
sena_kun | tbrowder, I've opened an issue already. Title, eeeh... It is a rough translation from Russian(Ukrainian? Both), but "Usage of refinement types for a static verification of code invariants". Or something along the lines. | 16:55 | |
"of code properties" maybe fit better... anyway, not something interesting. | 16:56 | ||
s/fit/fits/ | |||
Geth | doc: 1509c4d1d6 | (Wenzel P. P. Peppmeyer)++ | 47 files add tags to Language/*.pod6 |
16:57 | |
doc: 238865ae7e | (Wenzel P. P. Peppmeyer)++ | doc/Language/unicode_entry.pod6 forgot one |
|||
sena_kun | -1 doc issue. only 216 left. \o/ | 16:58 | |
tbrowder | sounds like a page turner! | ||
sena_kun | tbrowder, glad to hear it! | 16:59 | |
tbrowder | sena_kun: the pr 1187 looks ok to me, too. have you figured out the conflict? | 17:01 | |
maybe try splitting into smaller prs | |||
sena_kun | tbrowder, it was my edits for output style, so I can fix it easily. The new web editor is very handy too. | 17:02 | |
Geth | doc/master: 4 commits pushed by (Antonio Quinonez)++, Altai-man++ | 17:04 | |
17:09
ins64 joined
|
|||
stmuk_ | odd | 17:15 | |
mouq.github.io/slangs.html | 17:16 | ||
17:19
ChoHag joined
17:21
ufobat joined
|
|||
IOninja | Odd what? | 17:29 | |
17:31
espadrine joined
|
|||
stmuk_ | well the footer says its generated from a repo it isn't | 17:33 | |
I was git greping perl/doc but its a different repo | 17:34 | ||
IOninja | probably just a copy-paste of a page that used to be in docs but was taken down for Christmas because we never finalized slangs API | 17:36 | |
17:38
pyrimidine joined
|
|||
stmuk_ | I don't think the content was actually ever in the docs repo itself but generally yes | 17:42 | |
timotimo | no, you misread the footer | 17:51 | |
"using htmlify.p6 from perl6/doc on github" | |||
that's the intended bracketing for that phrase | 17:52 | ||
regnarg | Plans for a Perl6 chromium-based web browser: github.com/regnarg/perl6-cef Currently it doesn't do much apart from initializing the CEF using NativeCall but it's a start... | 17:53 | |
IOninja | cool | 17:54 | |
17:54
travis-ci joined
|
|||
travis-ci | Doc build errored. Altai-man 'Merge branch 'master' into grammar' | 17:54 | |
travis-ci.org/antquinonez/doc/builds/203190820 github.com/antquinonez/doc/compare...93f4d93261 | |||
17:54
travis-ci left,
ChoHag left
|
|||
regnarg | It might need some improvements to NativeCall, I think it's currently not possible to put function pointers to structs, which half of the CEF API is comprised of. But some callback code is in NativeCall already and shouldn't be hard to adapt. | 17:56 | |
timotimo | i think you can nativecast a pointer to a function by giving a signature or something like that | 17:58 | |
regnarg | I will more often need the opposite: put a pointer to a Perl6 function (callback) into a struct. I'm not sure whether it can be currently done with some casting because it requires generating a C wrapper function. But the required infrastructure is already there because you can already pass Perl6 callbacks as arguments to C functions (at least the docs say so). | 18:00 | |
timotimo | nativecall does the c wrapper thing for you | ||
AlexDaniel | m: my @manna = :a1, :b2, :c3; dd @manna | 18:01 | |
camelia | Array @manna = [:a1, :b2, :c3] | ||
AlexDaniel | m: my @manna = :a1 :b2 :c3; dd @manna | ||
camelia | Array @manna = [:a1] | ||
AlexDaniel | hm | ||
timotimo | you might have to create a function that takes a pointer and immediately returns it to appease nativecall? | ||
RabidGravy | I think there is support for callable attributes in CSTructs | ||
IOninja | There's a ticket for that. | ||
regnarg | That might run into problems with the lifetime of the C wrapper | ||
AlexDaniel | regnarg: nice! | 18:02 | |
regnarg | It might get freed after the function returns | ||
Specifically you cannot just keep a void pointer around because NativeCall would not know when to free the wrapper | |||
So my guess is that some (possibly simple) changes to NativeCall would be needed. | 18:03 | ||
But I might be wrong, haven't yet looked into the details. | |||
timotimo | no, the wrappers leak | ||
IOninja | AlexDaniel: rt.perl.org/Ticket/Display.html?id...et-history and rt.perl.org/Ticket/Display.html?id...et-history and rt.perl.org/Ticket/Display.html?id...et-history | ||
timotimo | they get freed at end of life at the moment | ||
IOninja | more or less | ||
regnarg | Ok, in that case it might just happen to work | ||
Even though it's probably not a robust solution in the long term | 18:04 | ||
timotimo | right, something clever is needed | ||
regnarg | I'll try that sometime soon | ||
timotimo | you want to just pass an anonymous block to a c function and not worry about it | ||
AlexDaniel | IOninja: so add RT #130816 to the list? :) | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130816 | ||
timotimo | but you'll have to also assign it to a variable and manually free it at some point with some kind of API that we'll have to design | ||
AlexDaniel | not sure if I will ever be able to use chromium-based anything because it never respected my system settings, but this looks like a great project :) | 18:05 | |
18:06
mspo left
|
|||
regnarg | Chromium has a very good core (w.r.t. speed and security) but it UI and especially configurability is horrendous. | 18:06 | |
But the CEF API is quite flexible (you can intercept every key event, every request, and so on) so one should be able to build something more flexible atop it. | 18:07 | ||
18:10
zakharyas left
18:13
Util joined
18:14
Tonik joined
|
|||
robertle | i have some functionality i want to put in a module, but I sometimes need it exposed in an OO fashion, sometimes procedurally. I could put both in the same module, but is that a terrible idea? so you would "use MuStuff" which would give you a role "MyStuff" as well as a sub my-stuff | 18:15 | |
18:15
agentzh joined
|
|||
robertle | alternatively these could be two modules, e.g. Role::MyStuff and Module::MyStuff... not sure what is worse | 18:15 | |
DrForr | I'd do the export module and have it be just a wrapper to methods in the main module. | 18:17 | |
RabidGravy | yeah | 18:20 | |
robertle | so two modules, the OO one wrapping thje procedural one? | ||
regnarg | Alternatively, you can use the export groups functionality | 18:23 | |
Or sets or how it is called | |||
docs.perl6.org/language/modules#Ex..._Importing | 18:24 | ||
and then the user does either use MyModule :oop; or use MyModule :procedural; or even use MyModule :ALL; | 18:25 | ||
It might be cleaner than two modules but it depends on the specifics | |||
robertle | oh wow, that sounds great I'll do that! | ||
specifics: it's like "Pluggable" | 18:26 | ||
18:28
ChoHag joined
|
|||
Geth | doc: fdf275abd2 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Pair.pod6 make index entry user friendly |
18:31 | |
18:38
rindolf left
18:49
rindolf joined
18:54
cibs left
18:55
cibs joined
|
|||
pmurias | is there a reason for IO::Handle.write to return True rather then the amount of bytes written? | 18:58 | |
18:58
Tonik left
18:59
wamba1 left
19:06
imcsk8 joined
|
|||
AlexDaniel | IOninja: ↑ | 19:07 | |
:) | |||
19:07
mawkish__ joined
|
|||
Geth | doc: b8af670621 | (Wenzel P. P. Peppmeyer)++ | doc/Language/traps.pod6 show constant fat arrow trap |
19:09 | |
19:12
mawkish__ left
19:13
mawkish__ joined
|
|||
Geth | doc: 84fbe82117 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Bag.pod6 link to Associative |
19:17 | |
19:20
darutoko left
19:29
mawkish__ left,
mawkish__ joined
|
|||
Geth | doc: 4afe7dd9b5 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6 doc Any.Bag and Any.BagHash |
19:30 | |
doc: c95320f986 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/traps.pod6 “it's” → “its” |
19:32 | ||
19:32
ChoHag left
|
|||
regnarg | ^ Language traps indeed ;-) | 19:34 | |
19:37
mawkish__ left,
mawkish__ joined
|
|||
Geth | doc: dbfa3fbdf9 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6 doc Any.Set|SetHash|Mix|MixHash |
19:40 | |
doc: f4f9d7b22d | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6 doc Any.Supply |
|||
gfldex | i just checked Any.pod6 with util/list-missing-methods.p6 and decided to look the other way | 19:43 | |
19:43
agentzh left
|
|||
timotimo | Any has all the methods | 19:45 | |
moritz | we should really have called it All, not Any :-) | 19:46 | |
gfldex | wait! I know Perl 6 so I can write a script that will generate all those docs! | 19:48 | |
19:48
TEttinger joined
19:49
mawkish__ left,
mawkish__ joined
|
|||
moritz | maybe we could have scheme where for example Str methods that appear in Any are actually documented in Str, and there's an :inject<Any> somwhere that copies the docs to Any | 19:52 | |
and some magic in htmlify to make that happen | |||
Geth | doc: 80d01ab35b | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6 doc Any.Array|List|Map |
19:55 | |
gfldex | moritz: the method will show up on the page, just a little further down. And the information where the method actually comes from may be important to the reader. | 19:57 | |
20:05
mawkish__ left,
mawkish__ joined
20:08
travis-ci joined
|
|||
travis-ci | Doc build errored. Wenzel P. P. Peppmeyer 'link to Associative' | 20:08 | |
travis-ci.org/perl6/doc/builds/203219202 github.com/perl6/doc/compare/b8af6...fbe8211791 | |||
20:08
travis-ci left,
jjido joined
|
|||
Geth | perl6-most-wanted: e4c5587f7d | (Tom Browder)++ | most-wanted/modules.md the p5 module is a good model |
20:08 | |
doc: ac7659bb01 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6 fix Any.list|push |
|||
20:11
mawkish__ left,
mawkish__ joined
|
|||
Geth | doc: d2cc944053 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6 doc Any.Hash|Slip|hash |
20:11 | |
20:16
bjz joined,
mawkish__ left
20:17
mawkish__ joined
20:18
wamba1 joined
|
|||
Geth | doc: 8372fe9e78 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6 fix Defined as: |
20:20 | |
20:20
jjido left
20:24
ins64 left
20:25
mawkish__ left,
mawkish__ joined
20:27
labster joined,
ins64 joined
|
|||
Geth | doc: bdf8ca8cb2 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6 add methods that are TODO for Any |
20:27 | |
20:32
cibs left
20:33
mawkish__ left,
mawkish__ joined,
agentzh joined
20:35
cibs joined
20:37
mawkish__ left,
mawkish__ joined
20:43
ins64 left,
ins64 joined
20:46
wamba1 left
20:48
ins64 left
20:50
ins64 joined
20:57
mawkish__ left,
mawkish__ joined
21:02
mawkish__ left
21:03
mawkish__ joined,
bjz left
|
|||
SmokeMachine | Is camelia going to run rakudo on js? | 21:06 | |
21:07
mawkish__ left,
mawkish__ joined
21:12
bladardle joined
21:16
travis-ci joined
|
|||
travis-ci | Doc build errored. Wenzel P. P. Peppmeyer 'doc Any.Hash|Slip|hash' | 21:16 | |
travis-ci.org/perl6/doc/builds/203231004 github.com/perl6/doc/compare/ac765...cc94405337 | |||
21:16
travis-ci left
21:17
espadrine_ left
21:18
ChoHag joined
21:21
mawkish__ left,
mawkish__ joined
21:29
travis-ci joined
|
|||
travis-ci | Doc build errored. Wenzel P. P. Peppmeyer 'fix Defined as:' | 21:29 | |
travis-ci.org/perl6/doc/builds/203232955 github.com/perl6/doc/compare/d2cc9...72fe9e78c9 | |||
21:29
travis-ci left
21:32
andrzejku left
21:36
ins64 left
21:38
pmurias left,
ins64 joined
21:45
ins64 left
21:49
ins64 joined
21:50
ChoHag left
21:51
regnarg left
22:00
cale2 joined
|
|||
Geth | doc: 3085d7c9b6 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6 doc Any.min|max|minmax |
22:04 | |
22:07
RabidGravy left
22:10
geekosaur left
22:11
rindolf left
22:12
geekosaur joined
22:14
robertle left
22:19
ins64 left
22:20
BenGoldberg joined
22:23
mawkish__ left,
mawkish__ joined
22:26
sena_kun left
22:29
mawkish__ left,
wamba1 joined,
mawkish__ joined
22:36
kalkin- left
22:37
Voldenet left
22:41
Voldenet joined,
Voldenet left,
Voldenet joined
|
|||
BenGoldberg | m: use NativeCall; dd cglobal('libc.so.6', 'errno', int32) | 22:49 | |
camelia | 2 | ||
BenGoldberg | m: use NativeCall; dd cglobal('libc.so.6', 'nosuchvar', int32) | ||
camelia | Cannot locate symbol 'nosuchvar' in native library 'libc.so.6' in block at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 422 in block <unit> at <tmp> line 1 |
||
22:54
mawkish__ left
22:55
mawkish__ joined
22:59
mawkish__ left,
mawkish__ joined
|
|||
BenGoldberg | m: use NativeCall; dd cglobal('libc.so.6', 'errno', int) | 23:03 | |
camelia | 2 | ||
tbrowder | ref run and shell: the docs say something like to use shell in lieu of run if you need special redirection or chars that need special interp by the shell. but, since i started with p6 it always seems that run can't handle. much of anything | 23:04 | |
23:05
mawkish__ left,
mawkish__ joined
|
|||
tbrowder | m: run "ps -C http o cmd=" | 23:05 | |
camelia | run is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting line 1 in sub run at src/RESTRICTED.setting line 14 in block <unit> at <tmp> line 1 |
||
gfldex | tbrowder: you need to separate arguments by hand for run | 23:06 | |
IOninja | run <ps -C http o cmd=> | 23:07 | |
AlexDaniel | .oO( run ‘ps’, ‘-C’, ‘http’, ‘o’, ‘cmd=>’ # no magic required ) |
23:08 | |
23:08
mawkish__ left
23:09
mawkish__ joined
|
|||
tbrowder | hm, well, i'll try that, but the other issue is that the docs don't mention that you can use a shell invocation just like run to create a new Proc object | 23:09 | |
AlexDaniel | “The return value is of type Proc.” | ||
docs.perl6.org/routine/shell | 23:10 | ||
tbrowder | yes, it does say that, but i think it also should show creating a new proc object just as run. any objections to adding it? | 23:11 | |
23:11
bitmap left,
kanishka joined
23:13
mawkish__ left,
mawkish__ joined,
geekosaur left,
geekosaur joined
|
|||
tbrowder | also i have used run with just 2 args: 'cmd', 'cmd args' | 23:14 | |
Geth | doc: 4a33f5e852 | (Wenzel P. P. Peppmeyer)++ | doc/Type/IO.pod6 provide example for run |
23:15 | |
BenGoldberg | dd print => 1 | ||
tbrowder | i'll go back and make sure i didn't make another dumb error | ||
BenGoldberg | m: dd print => 1 | ||
camelia | block <unit> | ||
BenGoldberg | m: dd 'print' => 1 | ||
camelia | :print(1) | ||
23:17
mawkish__ left,
mawkish__ joined
|
|||
IOninja | m: IO::Handle.new(:path<STDIN>) | 23:18 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of <STDIN>; in Perl 6 please use $*IN.lines (or add whitespace to suppress warning) at <tmp>:1 ------> 3IO::Handle.new(:path<7⏏5STDIN>) |
||
IOninja | Really? -_- | 23:19 | |
23:22
ufobat left
23:23
mawkish__ left,
mawkish__ joined
|
|||
timotimo | that's a bad miss :D | 23:26 | |
23:27
kurahaupo__ left,
kurahaupo__ joined
23:35
kurahaupo_ joined
|
|||
tbrowder | AlexDaniel: you are right, every little piece! no wonder i have so much trouble with run. | 23:35 | |
23:36
mr-foobar left,
kurahaupo__ left
23:37
lep-delete left
|
|||
tbrowder | i really think the docs need tweaking to favor shell for casual use--why should i want to break up complex shell commands piece by piece? got a good use case? | 23:37 | |
gfldex | i just broke the highlighter :) docs.perl6.org/type/IO#sub_run | 23:39 | |
AlexDaniel | tbrowder: no. | ||
23:39
kurahaupo_ left
|
|||
gfldex | tbrowder: it's the other way around, use run for casual use and be really damn careful with shell | 23:40 | |
tbrowder: shell escapes are tricky | |||
AlexDaniel | tbrowder: you can read this blog post if you are interested: github.com/perl6/specs/pull/102 | 23:41 | |
23:42
lep-delete joined
23:46
espadrine left
23:50
lukaramu left
23:51
kybr joined
|
|||
Ulti | so whats the solution to avoiding %*LANG | 23:51 | |
tbrowder | AD, i have read that blog post... | 23:53 | |
23:54
raiph left,
raiph joined
|
|||
tbrowder | btw, i can't remember ever using escapes in a shell command, ever, in or out of perl 5 or 6. btw, glad to see p6 mkdir defaults to the -p arg that p5 didn't last time i looked. that was one thing that always made me go to shell. | 23:57 | |
23:58
Actualeyes joined,
kyan joined,
ggoebel left,
cale2 left
|
|||
AlexDaniel | well, unless your path is fixed, you'll have a security hole right there… | 23:59 |