»ö« 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
aindilis joined
00:17
konsolebox left
00:18
konsolebox joined
00:21
markong left
00:28
espadrine left,
konsolebox left
00:29
konsolebox joined
00:35
Cabanossi left
00:36
Guest21319 left,
Cabanossi joined
00:37
Ven joined,
Ven is now known as Guest66362,
Guest66362 left
00:40
comborico1611 joined
00:45
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:47
mudman joined
00:51
konsolebox left
00:53
konsolebox joined
00:55
poohman left,
poohman joined,
poohman left
|
|||
comborico1611 | Quiet night. | 00:56 | |
00:56
poohman joined,
poohman left
|
|||
SmokeMachine | timotimo: why ":my $*GOAL := $<sym> eq '??' ?? '!!' !! '‼';" amuses you? | 01:00 | |
01:00
sena_kun left
01:01
bisectable6 joined
|
|||
timotimo | because of how the symbols repeat inside and outside of quoting there | 01:01 | |
just from a visual standpoint, the final !!-as-one-character amuses, too | |||
SmokeMachine | but that isn't on rakudo source code anymore, is it? | 01:04 | |
timotimo | doesn't seem so | ||
geekosaur | yeh, that's sort of a visual pun | 01:06 | |
yoleaux | 26 Nov 2017 10:54Z <nine> geekosaur: I've had a quick look at it yesterday and believe it to be a type mismatch in p5_av_top_index. But I'm not entirely sure yet. | ||
26 Nov 2017 11:05Z <nine> geekosaur: Oooh...no, it's probably not as mundane as that. An issue with JIT compilation of native calls is more consistent with the facts. It's probably not correctly expanding signed return values correctly on some platforms. | |||
SmokeMachine | timotimo: ⁇ ‼︎ was removed from rakudo, wasn't it? | 01:07 | |
timotimo | i think so | ||
lookatme | :) | 01:08 | |
01:08
markmont left
|
|||
SmokeMachine | so, I didn't get it... :P | 01:08 | |
lookatme | Why it removed ? | ||
It will not available in 6.d ? | 01:09 | ||
SmokeMachine | lookatme: not ?? !!, but ⁇ ‼︎ | ||
u: ⁇ ‼︎ | |||
unicodable6 | SmokeMachine, U+2047 DOUBLE QUESTION MARK [Po] (⁇) | ||
SmokeMachine, U+0020 SPACE [Zs] ( ) | |||
SmokeMachine, 4 characters in total: gist.github.com/e86ba1dc9cc2a80a35...9fc382ef8a | |||
lookatme | ~~ oh | 01:10 | |
m: say "⁇ ‼︎".codes | |||
camelia | 4 | ||
lookatme | m: say "?? !!".codes | 01:11 | |
camelia | 5 | ||
teatime tries to find the 4th codepoint in the first example | |||
lookatme | ⁇ #one ' ' # two ! # three ! # four | 01:12 | |
Is it right ? | |||
teatime | no, it's one codepoint for ‼︎ is it not? | ||
lookatme | Hmm, IDK | 01:13 | |
teatime | oh, there's a variation selector | ||
which is invisible | |||
geekosaur | looks to me like something inserted a variant selector, yeh | ||
lookatme | oh | ||
geekosaur | might even be a bug in unicode support in the sending irc client | ||
Juerd | m: "⁇ ‼︎".comb».codes | ||
camelia | ( no output ) | ||
Juerd | m: say "⁇ ‼︎".comb».codes | ||
camelia | (1 1 2) | ||
SmokeMachine | I think i wrote it wrong... | 01:14 | |
01:14
konsolebox left
|
|||
SmokeMachine | u: ⁇ ‼️ | 01:14 | |
unicodable6 | SmokeMachine, U+2047 DOUBLE QUESTION MARK [Po] (⁇) | ||
SmokeMachine, U+0020 SPACE [Zs] ( ) | |||
SmokeMachine, 4 characters in total: gist.github.com/9270df6ac73da2a206...4e0e9f76e6 | |||
lookatme | u: ‼️ | ||
unicodable6 | lookatme, U+203C DOUBLE EXCLAMATION MARK [Po] (‼) | ||
lookatme, U+FE0F VARIATION SELECTOR-16 [Mn] ( ️) | |||
01:15
konsolebox joined
|
|||
lookatme | u: ‼ | 01:15 | |
unicodable6 | lookatme, U+203C DOUBLE EXCLAMATION MARK [Po] (‼) | ||
SmokeMachine | lookatme: it was removed here: github.com/rakudo/rakudo/commit/9644fc360f | 01:21 | |
lookatme: and this is why: rt.perl.org/Public/Bug/Display.html?id=131002 | |||
so, zip-latest should work the way its documented or the way it is tested (I mean: it should be done when any of the source supplies is done or only when all of those are done)? | 01:25 | ||
timotimo | for zip-latest i'd assume "when all are done" | 01:26 | |
01:26
char_var[buffer] joined
|
|||
timotimo | after all, its main gimmick is that it emits a new tuple whenever any one of the supplies changes | 01:26 | |
zip on the other hand only emits tuples when all supplies have emitted up to the same point, so it makes a lot of sense for it to "done" as soon as a single ... actually, hold on | 01:27 | ||
maybe zip should "done" when the "current position" reaches a supply that has "done" | |||
SmokeMachine | timotimo: so, we should fix the doc? docs.perl6.org/type/Supply#method_zip-latest | 01:28 | |
timotimo: yes, I fixed zip last friday... | |||
timotimo | m: my ($a, $b, $c) = Supplier.new xx 3; Supply.zip($a, $b, $c).act: *.say; $a.emit for (1, 2, 3); $b.emit for (9, 8); $c.emit("x"); say "."; $c.emit("y"); say "."; $c.emit("z"); | 01:29 | |
camelia | Can only use zip to combine defined Supply objects in block <unit> at <tmp> line 1 |
||
timotimo | m: my ($a, $b, $c) = Supplier.new xx 3; Supply.zip($a.Supply, $b.Supply, $c.Supply).act: *.say; $a.emit for (1, 2, 3); $b.emit for (9, 8); $c.emit("x"); say "."; $c.emit("y"); say "."; $c.emit("z"); | ||
camelia | Too few positionals passed; expected 2 arguments but got 1 in block <unit> at <tmp> line 1 |
||
timotimo | SmokeMachine: there's a typo in the docs, it should be *@supplies, not @*supplies | 01:30 | |
m: my ($a, $b, $c) = Supplier.new xx 3; Supply.zip($a.Supply, $b.Supply, $c.Supply).act: *.say; $a.emit($_) for (1, 2, 3); $b.emit($_) for (9, 8); $c.emit("x"); say "."; $c.emit("y"); say "."; $c.emit("z"); | |||
camelia | (1 9 x) . (2 8 y) . |
||
01:30
konsolebox left
|
|||
timotimo | m: my ($a, $b, $c) = Supplier.new xx 3; Supply.zip($a.Supply, $b.Supply, $c.Supply).act: *.say; $a.emit($_) for (1, 2, 3, 4, 5); $a.done; $b.emit($_) for (9, 8); $c.emit("x"); say "."; $c.emit("y"); say "."; $c.emit("z"); | 01:30 | |
camelia | . . |
||
timotimo | i think this is wrong ^ | 01:31 | |
SmokeMachine | m: react whenever Supply.zip: Supply.from-list(^4), Supply.interval(1) { .say } | ||
camelia | (0 0) | ||
timotimo | but that's very much up to debate | ||
up for debate* | |||
01:31
konsolebox joined
|
|||
SmokeMachine | brb | 01:32 | |
timotimo | m: my Supplier $a .= new; my Supplier $backwards .= new; Supply.zip($a.Supply, $backwards.Suply).act({ .say; $backwards.emit: uc $_ }); $a.emit($_) for "a".."h"; | 01:36 | |
camelia | No such method 'Suply' for invocant of type 'Supplier'. Did you mean 'Supply'? in block <unit> at <tmp> line 1 |
||
timotimo | m: my Supplier $a .= new; my Supplier $backwards .= new; Supply.zip($a.Supply, $backwards.Supply).act({ .say; $backwards.emit: uc $_ }); $a.emit($_) for "a".."h"; | ||
camelia | ( no output ) | ||
timotimo | ah, yes | ||
m: my Supplier $a .= new; my Supplier $backwards .= new; Supply.zip($a.Supply, $backwards.Supply).act({ .say; $backwards.emit: uc $_ }); $backwards.emit(""); $a.emit($_) for "a".."h"; | |||
camelia | (a ) (b A ) (c B A ) (d C B A ) (e D C B A ) (f E D C B A ) (g F E D C B A ) (h G F E D C B A ) |
||
timotimo | kind of cute | 01:37 | |
m: my Supplier $a .= new; my Supplier $backwards .= new; Supply.zip($a.Supply, $backwards.Supply).act({ .perl.say; $backwards.emit: uc $_ }); $backwards.emit(""); $a.emit($_) for "a".."h"; | 01:39 | ||
camelia | $("a", "") $("b", "A ") $("c", "B A ") $("d", "C B A ") $("e", "D C B A ") $("f", "E D C B A ") $("g", "F E D C B A ") $("h", "G F E D C B A ") |
||
timotimo | ah, it uc's the whole thing so it becomes a longer and longer string | ||
SmokeMachine | Sorry, my wife just “stole” my computer, so I can’t fix that now... :( | ||
timotimo | that's fine | ||
SmokeMachine | (I should have bought a Mac for her when I had chance...) | 01:41 | |
comborico1611 | Haha | 01:42 | |
timotimo | if it's a linux machine, have you considered a multi-seat setup? | 01:43 | |
it's probably cheaper to buy a second keyboard, mouse, and display rather than a second computer, keyboard, mouse, and display :) | |||
SmokeMachine | timotimo: that makes sense... but I use a Mac... (I’ll have real problems when my 2 girls start using my Mac too) | 01:46 | |
lookatme | They use your MAC for what? For fun? | 01:47 | |
Mac | |||
SmokeMachine | My kids don’t use it yet... my wife is using for work... | 01:48 | |
This moments I’d love to have perl6 for iPhone... | |||
glot.io helps... but I’d like it native for iPhone... | 01:49 | ||
lookatme | I have a linux note book for Perl6 | ||
SmokeMachine | Like the pythonista... | ||
01:50
konsolebox left
|
|||
SmokeMachine | omz-software.com/pythonista/ | 01:50 | |
lookatme | yeah, I know it :) | ||
01:51
konsolebox joined
|
|||
SmokeMachine | That would be so cool! | 01:52 | |
lookatme | yeah, Perl6 online is not convenient :) | 01:53 | |
01:53
wander joined
|
|||
SmokeMachine | I would like to try to make that work... but I have no idea of how to start it... | 01:56 | |
01:57
konsolebox left
|
|||
comborico1611 | Goodnight, guys. | 01:57 | |
lookatme | goodnight | ||
01:57
comborico1611 left
|
|||
SmokeMachine | Good night! | 01:57 | |
01:57
mudman left
|
|||
lookatme | SmokeMachine, compile Perl 6 in IPhone ? | 01:58 | |
SmokeMachine | Yes... how? | ||
lookatme | Maybe on same hardware(like CPU) computer | 01:59 | |
01:59
konsolebox joined
|
|||
lookatme | IDK :) Haha | 01:59 | |
timotimo | lookatme: you can't just compile something on an iphone. you have to pay to get an apple developer memberhpi | 02:00 | |
membership* | |||
and i'm not sure if you can develop for an iphone on anything other than a mac osx system | |||
lookatme | I think this work in Android | ||
SmokeMachine | Now you can compile and run on your own device... nowadays you only pay to send to the store... | 02:01 | |
lookatme | I am not using IPhone. I only have a IPad and IPod | ||
SmokeMachine | And yes, I think it only crosscompiles on Xcode... | 02:03 | |
timotimo | interesting | ||
02:03
wander left
|
|||
SmokeMachine | stackoverflow.com/questions/283233...ce-for-ios | 02:06 | |
Anyone would be interested to make it happen? | 02:08 | ||
Juerd | I don't understand the purpose of ;; in signatures and the documentation is rather thin | 02:11 | |
02:11
cpage_ joined
|
|||
Juerd | In a simple test case with ($foo) vs ($foo;; $bar) it doesn't seem to be any different from a regular comma. | 02:12 | |
02:12
poohman joined,
AlexDaniel left,
poohman left
|
|||
Juerd | That is: the presence of a second argument definitely causes the latter to be called, even though the documentation for signatures says "To exclude certain parameters from being considered in multiple dispatch, separate them with a double semi-colon." | 02:13 | |
Is there even any use case for this with non-optional arguments? | 02:15 | ||
02:18
mson left
|
|||
timotimo | m: multi sub foo($a;; Str $b) { }; multi sub foo($a;; Int $b) { }; foo(1, "hi"); foo(1, 99) | 02:19 | |
camelia | Ambiguous call to 'foo'; these signatures all match: :($a;; Str $b) :($a;; Int $b) in block <unit> at <tmp> line 1 |
||
timotimo | maybe when you have a type constraint that is deemed "more narrow" than that in another sub but you want the less narrow one to be preferred for some reason? | 02:20 | |
02:21
Cabanossi left
02:22
Cabanossi joined
|
|||
timotimo goes to bed | 02:22 | ||
02:36
ryn1x left
02:43
zakharyas joined
02:46
ilbot3 left
02:54
mudman joined
02:58
ilbot3 joined,
ChanServ sets mode: +v ilbot3,
konsolebox left
03:03
dayangkun joined
03:05
konsolebox joined
03:11
mson joined
03:20
lizmat left
03:22
konsolebox left
03:23
noganex_ joined
03:26
noganex left
03:29
konsolebox joined
03:31
pilne left
03:34
lizmat joined
03:37
wamba left
03:38
benchable6 left
03:39
benchable6 joined,
ChanServ sets mode: +v benchable6
03:56
ivans left
04:05
Cabanossi left
04:06
konsolebox left
04:07
Cabanossi joined
04:08
konsolebox joined
04:09
ZzZombo left
04:15
ryn1x joined
|
|||
ryn1x | How can I kill a process started with "start". Eg. my $p = start sleep 300 . I know "kill" is a method of Proc::Async, but start retuns a promise... | 04:18 | |
04:20
Cabanossi left
04:21
Cabanossi joined
04:32
konsolebox left
|
|||
perlawhirl | ryn1x: AFAIK, a promise isn't a process, so you can't "kill" it. unless you 'await' the promise, it should stop when your script ends. | 04:32 | |
i believe a 'start' block is just sugar for creating a promise. | 04:33 | ||
04:33
konsolebox joined
|
|||
perlawhirl | if you want to 'kill' a promise earlier (ie. time it out) you might be better of with something like 'my $p = Promise.anyof(Promise.in($timeout), $promise-that-might-take-too-long)' | 04:34 | |
an example of using a Promise.anyof() is in docs.perl6.org/language/concurrency | |||
ryn1x | Thanks perlawhirl. Looks like Proc::Async::Timeout does what I was thinking. Looks like "start" does use Proc::Async, but it returns a promise and you have no way to access the proc to kill it before it returns. My problem was that if the timeout expired I needed to forcefully kill the process. | 04:42 | |
Hmm... I think I am wrong actually... the start sub routine does not use Proc::Async... it is a promise which is asynchronous... I confuse myself withh al lthe concurrency terms... | 04:51 | ||
perlawhirl | the start block does not technically use Proc::Async. | ||
yes, | |||
'start' is sugar for Promise.start() | |||
ryn1x | Ok | ||
perlawhirl | But all promises, including ones created from Proc::Async have a .start method | 04:52 | |
04:52
eliasr left
|
|||
ryn1x | Maybe there is no way to do what I want then... since what I want to "kill" is not an external process... but an asynchronous routine... | 04:52 | |
perlawhirl | maybe you can create a Promise, grab the vow... and then break it at some point... though i'm not 100% sure... i actually haven't played much with Promises. | 04:53 | |
ryn1x | hmm... I get "Access denied to keep/break this Promise; already vowed" when messing with the vow and break methods. | 04:56 | |
05:01
konsolebox left
05:02
konsolebox joined
05:11
ryn1x left
05:12
ZzZombo joined
|
|||
ZzZombo | woo! | 05:12 | |
05:18
konsolebox left
05:20
konsolebox joined
05:24
mudman left
05:34
Cabanossi left
05:36
Cabanossi joined
05:57
mudman joined
06:03
Cabanossi left
06:05
aborazmeh left,
BenGoldberg left
06:06
Cabanossi joined
06:17
konsolebox left
06:18
konsolebox joined
06:30
khw left
06:41
domidumont joined
06:46
domidumont left,
domidumont joined
06:54
lowbro joined,
lowbro left,
lowbro joined
06:58
darutoko joined
07:00
parv joined
07:04
Cabanossi left
07:06
Cabanossi joined
07:18
domidumont left
07:21
geospeck joined
07:27
markong joined
07:35
Cabanossi left
07:36
Cabanossi joined
07:39
wamba joined
07:46
mudman left
07:50
llfourn left
07:51
domidumont joined
07:54
abraxxa joined
08:03
Cabanossi left
08:06
Cabanossi joined
08:11
dayangkun left
08:18
mson left
08:26
astj left,
astj joined
08:27
astj left,
astj joined
08:28
tomaw left
08:29
mudman joined
08:31
astj left,
astj joined
08:35
tomaw joined
08:44
pecastro left
08:45
pecastro joined
09:04
Cabanossi left
09:06
Cabanossi joined
09:13
lookatme left
09:15
BrianOn99 joined
09:16
karmen joined
09:18
karmen left
09:24
scimon joined
|
|||
scimon | Morning all. | 09:25 | |
09:25
greppable6 left,
greppable6 joined,
zakharyas left
|
|||
DrForr | Mornin'. Survived LPW, just barely :) | 09:26 | |
masak | congratulations! | ||
scimon | It was a good day. Shame I had to leave early but prior engagements. | 09:27 | |
masak | I would've loved to be there. seems it was nice this year | 09:28 | |
DrForr | I thought it was, would'v eloved to see you there. | ||
*would've loved | |||
09:30
robertle joined
|
|||
DrForr | Oh gods, this is the portion of the /Chariots of Fire/ soundtrack that I'll forever hear as "On Top of Spaghetti" thanks to Sharon Ryan. | 09:30 | |
09:33
dakkar joined
|
|||
DrForr | o/ | 09:36 | |
09:47
mudman left
|
|||
masak | DrForr: all other things being equal, I'd rather be on top of spaghetti | 09:48 | |
DrForr | True, the alternative *would* increase the odds that you were in The Hunger Games. | ||
09:55
rindolf joined
|
|||
perlawhirl | \me clickbaits: www.0racle.info/articles/its_a_wrap | 09:56 | |
perlawhirl needs to learn to irc gooder | |||
would appreciate someone taking a gander at my post and calling out any spelling errors and/or logical fallacies | 09:57 | ||
DrForr | I have this notion that I'm going to take the time to rewrite "Powerful Python" in Perl 6. The examples would mostly be one to five lines... | ||
10:04
Cabanossi left
10:06
Cabanossi joined
10:07
mudman joined,
piojo left
10:08
rindolf left,
piojo joined
|
|||
scimon | Quick look at the article and it's pretty impressive. | 10:10 | |
moritz | perlawhirl: "Most of this should be fairly obvious, except maybe callsame, which I covered in my last post" this would be an excellent opportunity to link to the previous post :-) | 10:12 | |
perlawhirl | scimon: thanks | ||
10:12
parv left
|
|||
scimon | (moritz makes a good point) | 10:12 | |
perlawhirl | moritz++ will do. I do link to it up the top, but it doesn't hurt to add another | ||
scimon | The more links the better (if they are in reasonable places) | 10:13 | |
moritz | nice post, perlawhirl++ | 10:14 | |
DrForr | 13/10 would read again :) | 10:15 | |
10:16
rindolf joined
|
|||
perlawhirl | hah, thanks all. it's been a long time between posts. I think i need to do more bite sized updates so i don't feel pressure to write coherent longer pieces | 10:17 | |
ok thanks for all the eyes... will post to reddit | |||
10:17
wander joined
|
|||
wander | I am looking for the proper translation of 'lexpad' in Chinese, since outside perl culture it is rarely used. | 10:18 | |
It is quite like the concept 'symbol table', so what is the difference? | 10:19 | ||
DrForr | perlawhirl: Same problem here, but I find that when I sit down and think "oh, it'll be just a quickie" turns into 2 hours figuring out how to explain a simple concept and expanding code... | 10:20 | |
jnthn | wander: It's short for "lexical pad", and it's just the symbol table for a particular lexical scope. | ||
huf | the lexpad is where the cool lexicals hang out and talk about sticking it to the man... | 10:21 | |
10:21
parv joined
|
|||
jnthn | I'm not quite sure where the "pad" bit came from :) | 10:21 | |
jferrero | m: ("01" .. "12")».join(",").say | 10:22 | |
camelia | (01 02 11 12) | ||
wander | Seems I could translate it as what 'symbol table' is, associate its English lexical string and explain it's perlish | 10:24 | |
piojo | perlawhirl: the link to the last post is broken: /articles/articles/perl_6_on_rails | ||
huf | wander: treat it as a proper name, like edward or maude? | 10:25 | |
masak | wander: 'lexpad' seems a Perl-centered term, yes | ||
wander: searching on ddg gives Parrot's PDD 20 as the top relevant hit | |||
Wikipedia is all "Did you mean 'Leopard'?" | 10:26 | ||
huf | the lexpad cannot change its slots? | ||
DrForr | The term 'pad' came from 'scratchpad', a place to write temporary notes. | ||
masak | huf: I might be wrong, but at some point the lexpad gets built, incrementally. then it can change its slots. | 10:27 | |
huf | awww, another old saying falls to the dust | ||
10:27
raschipi joined
|
|||
perlawhirl | piojo: thanks, fixed | 10:29 | |
wander | huf: sorry, I don't know what you mean, could you please explain it? | 10:30 | |
DrForr | Beware of the Lexpad. | ||
wander | masak: yes, it seems perlists use it a lot, however not so common other place. | 10:31 | |
El_Che | DrForr: did you give a talk at LPW? | 10:32 | |
DrForr | Too f*cking early in the morning, but yes. | ||
act.yapc.eu/lpw2017/talk/7257 | 10:33 | ||
huf | wander: treat it as a name, not something to translate really | ||
wander | huf: see. | 10:34 | |
huf | though... i dont know the chinese translation tradition concerning proper names | ||
DrForr | surname then given name, IME. | ||
huf | heh | 10:35 | |
El_Che | DrForr: computer says no | ||
10:35
Cabanossi left
|
|||
El_Che | act seems down | 10:35 | |
DrForr | I just checked a second ago. WFM :) | ||
10:36
Cabanossi joined,
astronavt left
|
|||
El_Che | mm | 10:37 | |
should be here | |||
10:37
astronavt joined
|
|||
El_Che | I cn reach it from home | 10:37 | |
DrForr | I'm at work and it's available. | ||
Oo. overleaf.com looks eenteresting. | 10:40 | ||
10:41
astronavt left,
astronavt joined
|
|||
scimon | Unfortunately I didn't see your talk DrForr as I was also up to f*ing early giving a talk. | 10:41 | |
DrForr | No worries. It wasn't as much a talk as "wake up, here's a puzzle to start the day." kinda thing. | 10:43 | |
Huh. CTAN has updated its look. | 10:44 | ||
El_Che | DrForr: I see you left Perl 6 for Origami 6 | 10:45 | |
10:45
astronavt left
|
|||
DrForr | Well, to be brutally honest I kind of checked out for a few months from the whole programming thing. | 10:45 | |
masak | wander: maybe the Lisp/Scheme translation is "environment" | 10:47 | |
wander: though that to me comes off as slightly more immutable in tone | |||
El_Che | DrForr: sounds like a good idea to me to do that from time to time | ||
DrForr | I didn't so much leave as put things on a temporary hiatus. | 10:50 | |
. o ( Is there any other kind of hiatus?... ) | 10:54 | ||
scimon | I do that once in a while. | 10:55 | |
Heck I did that for about 5 years after I did my degree. | |||
DrForr checks out tufte-latex.tex. | |||
scimon | (Then I found Perl and decided I liked programming again) | ||
raschipi | wander: Lexpad is the "local notepad" | ||
wander | thanks, I will regard it as "the symbol table for a particular lexical scope" | 10:59 | |
11:00
wamba left
|
|||
wander | as translation, either keep 'lexpad' or use '符号表' which stands for 'symbol table', explain perlist use the term 'lexpad' and the why | 11:01 | |
11:02
AlexDaniel joined
|
|||
raschipi | It's not the only symbol table, mind you. | 11:04 | |
It's difficult to capture the way it's goes away at runtime in languages other than English. | |||
wander | huh | 11:10 | |
11:16
parv left
11:17
mudman left
|
|||
wander | well I've just seen that p6 has package, module, class and lexpad as symbol table | 11:17 | |
searching term 'lexpad' on design.perl6.org/S02.html | 11:18 | ||
11:20
sena_kun joined
|
|||
raschipi | That's out of date, lexpads aren't available as stashes. | 11:20 | |
11:21
llfourn joined
|
|||
wander | ok | 11:23 | |
we don't use lexpad to look up a dynamic variable, do we? | 11:24 | ||
jnthn | Yes, we do | ||
my $*FOO is just a lexical named $*FOO and also marked with the `is dynamic` trait | 11:25 | ||
wander | huh | ||
jnthn | That's why it's declared with my | ||
Whatever you might choose to call it, though, the key thing to remember is that - like with objects - there's a kind of "instantiation" that goes on. When you enter a new scope, you get fresh storage. | 11:26 | ||
11:26
coverable6 left
11:27
coverable6 joined,
ChanServ sets mode: +v coverable6
|
|||
wander | that's it | 11:27 | |
jnthn | These instances are chained in two ways: by outer and by caller. Lexical variable lookups are done by following outers. Dynamic variable lookups ($*FOO) are done by following callers | ||
11:28
parv joined
|
|||
wander | I know this principle, but forget both of them use symbol table. | 11:29 | |
jnthn | There's also packages, which are different | 11:30 | |
In that packages really *do* use a Hash and you can add what you want whenever you want | |||
Whereas the lexpad's keys are fixed at compile time | |||
Meaning we can store them and access them in a more efficient way | 11:31 | ||
scimon | m: multi f( Int $f, Int $b ) { return $f ** $b };multi f( *@p ) { sub ( *@r ) { f( |@p, |@r ) } };my &f2 = f(2);say &f2(3); | 11:32 | |
camelia | 8 | ||
scimon | So... currying is not too hard to do. | ||
wander | m: $Foo::Bar::baz = 42; say $Foo::Bar::baz; | 11:33 | |
camelia | 42 | ||
wander | yes, no 'my' | ||
jnthn | scimon: See also docs.perl6.org/routine/assuming :) | 11:37 | |
scimon | jnthn: looking | 11:38 | |
Trying to work out if there's a way of doing multi f is curried( Sig ) { ... } and the is curried handles the extras. | 11:40 | ||
Also debating writing an advent article. (Probably not on that). | 11:43 | ||
jnthn | m: multi m($a, $b) { say $a + $b }; multi m(*@curry) { &m.assuming(|@curry) }; m(3)(39) | ||
camelia | 42 | ||
masak | m: sub g { say $*d }; my $*d = "outer"; g() { g(); { my $*d = "inner"; g() } } | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unexpected block in infix position (missing statement control word before the expression?) at <tmp>:1 ------> 3sub g { say $*d }; my $*d = "outer"; g()7⏏5 { g(); { my $*d = "inner"; g() } } … |
||
masak | m: sub g { say $*d }; my $*d = "outer"; g(); { g(); { my $*d = "inner"; g() } } | 11:44 | |
camelia | outer outer inner |
||
11:44
Ven joined,
Ven is now known as Guest37997
|
|||
masak | jnthn: there's some sense in which that second `g()` call and the dynamic lookup in it also relies on the outer chain... | 11:44 | |
masak .oO( who? nitpicking? me? ) | 11:45 | ||
lizmat | . | 11:46 | |
yoleaux | 00:09Z <AlexDaniel> lizmat: gist.github.com/AlexDaniel/33dbe18...707a3914ff | ||
lizmat | AlexDaniel++ | ||
11:48
parv left
11:53
zostay left,
zostay joined
11:54
parisba joined
11:55
iviv joined,
jhill joined,
BuildTheRobots joined
11:56
statisfiable6 left,
tangible6 left,
statisfiable6 joined,
tangible6 joined
11:57
greppable6 left,
bisectable6 left,
unicodable6 left
|
|||
scimon | That is very neat. | 12:00 | |
DrForr | Oo, ticket tracking... | 12:01 | |
perlawhirl | i know i'm not very active in the community, but looking at ticket updates like that, and the monthly changelogs, reminds me how much effort all you contributers put into this thing we all love | 12:05 | |
I know one of Perl 6's core principles is to torture the implementor on behalf of the users... but I'd also like to THANK all the contributers, on behalf of the users. amazing job everyone | 12:06 | ||
12:06
nebuchadnezzar left
|
|||
SmokeMachine | m: react {whenever Promise.in(1) {done}; whenever Promise.in(2) {say “running”; done}} # ryn1x | 12:06 | |
camelia | ( no output ) | ||
DrForr | "1 and done"... need to figure out a way to sneak that in somewhere. | 12:07 | |
perlawhirl | DrForr: are you thinking about ryn1x's question about "stopping" a promise? | 12:09 | |
DrForr | I wouldn't call it "thinking", more of "read that line of code and that tidbit popped in my head." | 12:10 | |
perlawhirl | if their task takes place in a promise, what if you just take a vow to a second promise, then can await anyof | ||
when you want to stop it, you break the vow | |||
it should stop the other one, right? | |||
12:11
Guest37997 left
|
|||
masak | perlawhirl: may I interest you in docs.perl6.org/type/Promise#method_anyof ? | 12:12 | |
perlawhirl | yeah, that's what i'm thinking | ||
he was in here earlier asking about "killing" a promise. no one else was on, so i tried to help, but i was at work and couln't give it a lot of thought | |||
scimon | So I did write a module to give you timed promises you can break externally. | 12:13 | |
perlawhirl | but now that i think about it, anyof would work fine, just break a vow of a promise in the anyof | ||
masak | scimon: there was a discussion on the web about cancelable promises, which seemed (to me) to conclude that promises oughtn't be cancelable from the outside | 12:14 | |
scimon | I think in general they shouldn't be. | ||
12:14
Ven_ joined
|
|||
scimon | But sometimes you might want to set a timeout that you want to be able to cancel if you're done in time. | 12:14 | |
masak | scimon: would you recommend your module over Promise.anyof, and if so, why? :) | ||
scimon | Probably not. | 12:15 | |
12:15
Aaronepower joined
|
|||
masak | please understand me right. I'm definitely not out to criticize anyone or anything. I'm mostly curious about the arguments themselves, in order to write better and more robust software. | 12:15 | |
12:16
BrianOn99 left
|
|||
scimon | Oh yeah. I'm currently on a suger crash and eating my lunch. | 12:16 | |
masak | :) | ||
masak .oO( Sugar Crash Saga ) | |||
DrForr | At least we didn't have those toppings with a thin cupcake substrate this year. | 12:17 | |
SmokeMachine | The anyof do not cancel the promise, but the done of a react block does... | 12:18 | |
scimon | So my use case is I want to send a message to a supply in X seconds (X may be < 1). But I don't want to send the message if another event occurs in that time, in that case I want to queue up a new message to send. | ||
masak | SmokeMachine: yeah, was thinking the same. | ||
scimon | So I wrote Timer::Breakable as a simple wrapper for that. | 12:19 | |
(Well I wrote a thing and moritz said, why not make it a module? So I did. I blame him). | |||
moritz feels blamed | |||
scimon | :D | ||
masak found it at modules.perl6.org/dist/Timer::Break...pan:SCIMON | |||
scimon | That's the bunny. | 12:20 | |
moritz | will I be able to live with that feeling? Find out at 11 | ||
masak | I see we have now stopped listing all the modules on modules.perl6.org/ | ||
nice milestone | |||
scimon | It's REALLY simple. And probably could be better. | ||
moritz | masak: perlpunks.de/paste/show/5a1998d5.b53.8b number of modules by source | ||
masak | whoa | 12:21 | |
...how long was I asleep? o.O | |||
66 + 896 + 3... that's almost | 12:22 | ||
A MILLION MODULES | |||
wo-hoo! \o/ | |||
SmokeMachine | We had the same discussion some days ago: irclog.perlgeek.de/perl6/2017-11-04#i_15401344 | ||
12:23
wamba joined
12:24
unicodable6 joined,
greppable6 joined,
ChanServ sets mode: +v greppable6
|
|||
masak | ah, here's getify's take on uncancelable promises: github.com/getify/You-Dont-Know-JS...cancelable | 12:26 | |
12:28
Ven_ left
|
|||
scimon | Timer::Breakable isn't actually cancelling anything. It's just wrapping the block passed to Promise.in() with a check to see if the code still needs run. So if you stop it the internal promise still runs but does nothing.... this is probably a really bad idea. | 12:29 | |
I often have really bad ideas. | |||
masak | ooh | ||
no, that sounds like a great idea | |||
actually, let me rephrase that: | |||
that sounds like what I would suggest doing :) | 12:30 | ||
so at worst we're both equally bad :P | |||
scimon | Oh well... that's what it does. | ||
masak goes to read the source code | 12:31 | ||
12:31
Ven joined
|
|||
scimon | There's a bit of funkiness to handle race conditions. And I need to add some more tests. | 12:31 | |
12:31
Ven is now known as Guest32259
12:32
geospeck left
|
|||
raschipi | masak: to get a list of all modules, just click 'Search' with the search field empty. | 12:33 | |
masak | ooh | ||
funnily enough, if I click "I'm feeling lucky" with the search field empty, I'm taken to perl6/doc | |||
maybe that's someone trying to tell me something, I dunno | 12:34 | ||
12:35
Cabanossi left,
jercos left
12:36
Cabanossi joined
12:44
wamba left
12:47
poohman joined
12:56
domidumont left
12:57
domidumont joined
13:05
Cabanossi left
13:06
Cabanossi joined
|
|||
moritz | probably the module with the most stars on github | 13:07 | |
13:10
geospeck joined
13:18
nhywyll joined
13:34
jeromelanteri joined
13:37
alexk joined,
alexk is now known as Guest21261,
Guest21261 left
13:38
alexk6 joined
|
|||
wander | can we define an integer with fixed bits? that is, sth like 'my Int[10] $a = 2; # 0 000 000 010' thus '+^$a' becomes 1 111 111 010 | 13:44 | |
m: my Int $a = 2; say $a; say +^$a; | |||
camelia | 2 -3 |
||
wander | m: say (-3).base(2) | ||
camelia | -11 | ||
timotimo | we have support for 8, 16, 32, and 64 bit integers | 13:45 | |
alexk6 | m: say class :: { has uint8 $.x }.new(:x(128)) == 128 | 13:46 | |
camelia | Cannot resolve caller Numeric(<anon|63491728>: ); none of these signatures match: (Mu:U \v: *%_) in block <unit> at <tmp> line 1 |
||
13:46
mson joined
|
|||
geekosaur | In theory it would be possible to define such a type. In practice, you need an unsigned type, and there's some nqp level issues that make them kinda iffy (in particular, nqp doesn;t always know when to generate int vs. uint ops) | 13:46 | |
scimon | So I just spotted a REALLY dumb error in my slides from Saturday. | 13:47 | |
alexk6 | m: my $c = class :: { has uint8 $.x is rw }.new; $c.x = 128; say $c.x; | 13:48 | |
camelia | -128 | ||
geekosaur | that'd be an example of the nqp issue I mentioned :) | ||
I think there's an opeb bug for it, but fixing it is kinda difficult | |||
*open | |||
13:49
ryn1x_ joined
13:50
ryn1x_ left,
domidumont left,
jeromelanteri left
13:51
domidumont joined
13:52
mcmillhj joined
|
|||
alexk6 | geekosaur: so uint is currently treated as int ? | 13:53 | |
geekosaur | in some circumstances | ||
iirc the specific issue here is that, while at bit level it doesn;t matter whether the type is int or uint, by the time say gets to it the nqp codegen for say can't see that it's uint so it generates code to print it signed | 13:54 | ||
timotimo | aye, native integers are passed around as "the actual value" and their size and signedness only exists as information in the static frame where the variable is declared | 13:55 | |
raschipi | moritz: yes, the lucky button will send you to the highest rated module on github | 13:56 | |
alexk6 | m: my $c = class :: { has uint8 $.x is rw }.new; $c.x = 128; say $c.x == 128; say $c.x == -128; | ||
camelia | False True |
||
13:56
kyan left
|
|||
alexk6 | the problem seems not to be the codgen for say | 13:57 | |
timotimo | yes, our support for unsigned ints is rather rough | 13:58 | |
geekosaur | oh, that's a different one, yes, I missed the assignment. That's still the same issue in a different place though, it's codegenning for signed and possinbly for more than 8 bits (same basic issue, it's not able to see the type restriction) | 14:00 | |
I *think* the basic issue is if something goes through an operation that is on a wider type that is inherited by narrower ones, only the wider type is "seen" --- I think for performance reasons, because having to search the whole inheritance tree every time would be very slow | 14:01 | ||
14:02
wamba joined
|
|||
geekosaur | so if you go through a method (including an internal one) which has a type annotation of "Any" then the Any candidate gets used instead of the narrower one | 14:02 | |
14:02
cdg joined
|
|||
alexk6 | m: my $c = class :: { has uint8 $.x}.new; $c.^attributes[0].set_value($c,128); say $c.x == -128; | 14:02 | |
camelia | True | ||
geekosaur | there's an open bug about that one to (relating to someone wanting .gist to work through inheritance when .say-ing a collection type, iirc) | 14:03 | |
14:06
silug joined
|
|||
wander | m: class A { method f { say "a.f" } }; class B is A { multi method f(Int $a) { nextsame }; multi method f(Str $a) { nextsame } }; say B.new.f: 42; | 14:06 | |
camelia | Nil | ||
wander | m: class A { method f { say "a.f" } }; class B is A { multi method f(Int $a) { nextsame } }; say B.new.f: 42; | 14:07 | |
camelia | Nil | ||
wander | m: class A { method f { say "a.f" } }; class B is A { method f(Int $a) { nextsame } }; say B.new.f: 42; | ||
camelia | Too many positionals passed; expected 1 argument but got 2 in method f at <tmp> line 1 in method f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
wander | m: class A { method f { say "a.f" } }; class B is A { method f(Int $a) { nextwith() } }; say B.new.f: 42; | 14:08 | |
camelia | a.f True |
||
wander | m: class A { method f(Int $a) { say "a.f" } }; class B is A { multi method f(Int $a) { nextsame }; multi method f(Str $a) { nextsame } }; say B.new.f: 42; | ||
camelia | Nil | ||
wander | m: class A { method f(Int $a) { say "a.f" } }; class B is A { multi method f(Int $a) { say "b.f1"; nextsame }; multi method f(Str $a) { say "b.f2"; nextsame } }; say B.new.f: 42; | 14:09 | |
camelia | b.f1 Nil |
||
14:11
rindolf left
|
|||
wander | class A { multi method f(Int $a) { say "a.f" } }; class B is A { multi method f(Int $a) { say "b.f1"; nextsame }; multi method f(Str $a) { say "b.f2"; nextsame } }; say B.new.f: 42; | 14:12 | |
m: class A { multi method f(Int $a) { say "a.f" } }; class B is A { multi method f(Int $a) { say "b.f1"; nextsame }; multi method f(Str $a) { say "b.f2"; nextsame } }; say B.new.f: 42; | |||
camelia | b.f1 a.f True |
||
lizmat | dev.to/jj/the-lion-and-the-butterf...-camel-a8b | ||
ZzZombo | wander, are you aware about the fact you can query camelia privately? | 14:13 | |
wander | sorry, how? | 14:14 | |
ZzZombo | `/query camelia` | ||
14:16
cdg_ joined
|
|||
wander | got it, sorry for these "garbages" | 14:16 | |
14:19
cdg left
|
|||
timotimo | lizmat: "perl 6 is probably better right now, but perl 5 is in for major changes very soon that will make it faster and better", huh? did that get reversed? :D | 14:19 | |
lizmat | you should probably ask JJ feels like some spanish / english fast friends have entered the blog post | 14:20 | |
lizmat about to commute to AmsterdamX | |||
timotimo | only the fastest of friends | 14:21 | |
geekosaur | agreed. there's not only that but some other places with decidedly odd English phrasing | 14:22 | |
14:22
poohman left
|
|||
geekosaur | I should try to re-read it with my Spanish hat on (although it's both a bit dusty and not very tall...) | 14:22 | |
14:23
alexk6 left,
poohman joined
|
|||
wander | gist.github.com/W4anD0eR96/6b7e72c...cf7a87e498 | 14:33 | |
could i use correct re-dispatch keyword to call these function in order 2->1->0 | 14:34 | ||
AlexDaniel | wow folks, thank you for all the feedback. I guess it's time to make a bot for it… | 14:36 | |
14:36
lizmat left
14:41
aindilis left
|
|||
SmokeMachine | AlexDaniel: sorry, but make a bot for what? | 14:44 | |
AlexDaniel | SmokeMachine: github.com/perl6/whateverable/issues/256 | 14:45 | |
14:49
lizmat joined
14:52
wamba left
14:53
noganex joined,
awwaiid joined
14:54
domidumont left
14:55
domidumont joined,
noganex_ left
15:00
eswues joined
15:04
khw joined
15:06
wamba joined
|
|||
raschipi | AlexDaniel: Make it generate unicode bar activity graphs because everyone love those. | 15:07 | |
AlexDaniel | raschipi: probably not today, but I filed this: github.com/perl6/whateverable/issues/263 | 15:12 | |
SmokeMachine | AlexDaniel: it looks a good idea! but, just because Im curious: how will it get the Half-resolved (tests needed)? | 15:13 | |
AlexDaniel | SmokeMachine: it already does (these gists are generated by a script). It looks at tags and labels | ||
15:13
BrianOn99 joined
|
|||
SmokeMachine | hum... great! | 15:14 | |
15:15
perlpilot joined
|
|||
AlexDaniel | m: sub foo() { use fatal; 5 + Nil; 42 }; foo | 15:17 | |
camelia | Use of Nil in numeric context in sub foo at <tmp> line 1 |
||
AlexDaniel | m: sub foo() { use fatal; 5 + Nil; 42 }; foo; say 42 | ||
camelia | Use of Nil in numeric context 42 in sub foo at <tmp> line 1 |
||
15:17
BrianOn99 left
|
|||
AlexDaniel | m: sub foo() { use fatal; 5 + Nil; 42 }; say foo; say 50 | 15:19 | |
camelia | Use of Nil in numeric context 42 50 in sub foo at <tmp> line 1 |
||
15:19
Cabanossi left
|
|||
AlexDaniel | ok | 15:20 | |
15:21
Cabanossi joined
|
|||
jnthn | m: say (5 + Nil).WHAT | 15:21 | |
camelia | Use of Nil in numeric context (Int) in block <unit> at <tmp> line 1 |
||
jnthn | use fatal; is about Failure | ||
4 + Nil warns, not fails | |||
15:21
wamba left
|
|||
timotimo | m: CONTROL { die "oh no!" }; say (5 + Nil).WHAT | 15:21 | |
camelia | oh no! in block <unit> at <tmp> line 1 |
||
jnthn | quietly will suppress that | ||
AlexDaniel | yeah, I see it now | ||
thanks! | |||
15:23
pmurias joined
15:25
wamba joined,
noganex left
15:35
nebuchadnezzar joined
15:39
raschipi left,
raschipi joined
15:40
noganex joined,
comborico1611 joined
15:47
noganex_ joined
|
|||
poohman | hello all, I posted this question yesterday but did not try it. Today I am trying it and am having problems. How can I use a lazy list as a token? | 15:47 | |
15:48
noganex left
|
|||
poohman | token day {[1 ... 31]} | 15:48 | |
paste.gnome.org/ptnlwchgz | 15:53 | ||
something like this | |||
geekosaur | [] means something different in perl 6 regex (non-capturing group). | 15:54 | |
poohman | ok | 15:55 | |
geekosaur | m: grammar Foo { my @day = [1 ... 31]; token day { @day }; token TOP { <day> }; }; say Foo.parse("4") | 15:56 | |
camelia | 「4」 day => 「4」 |
||
geekosaur | or | 15:57 | |
poohman | ja | ||
geekosaur | m: grammar Foo { token day { <{ [ 1 ... 31 ] }> }; token TOP { <day> }; }; say Foo.parse("30") | ||
camelia | 「30」 day => 「30」 |
||
geekosaur | where the <{ ... }> construct lets you specify an arbitrary perl 6 expression | ||
15:57
noganex joined
|
|||
poohman | nice - thanks | 15:58 | |
15:58
faraco joined
16:00
noganex_ left,
mcmillhj left
16:01
noganex_ joined,
wamba left
|
|||
faraco | Hi guys. Do you know any module skeleton builder/initializer out there for Perl6? I forgot the name of the module I've used past months ago. | 16:01 | |
yoleaux | 1 Oct 2017 13:08Z <Zoffix> faraco: One of your META urls in ecosystem is a 404. Couldn't see if it was renamed to something else, so I removed it: github.com/perl6/ecosystem/commit/1a2d8287fe | ||
16:03
noganex__ joined
|
|||
faraco | Ehh, nevermind. I just found. | 16:03 | |
16:03
mcmillhj joined,
noganex left
16:04
faraco left
16:05
pmurias left,
mson left
16:06
noganex_ left
16:08
mcmillhj left
16:09
troys joined
16:10
rindolf joined
16:12
pmurias joined
16:14
xinming_ left,
xinming joined
16:15
mcmillhj joined
16:18
lowbro left
16:19
lizmat left
16:20
mcmillhj left
16:22
wamba joined
|
|||
moritz | there's mi6 and ddt | 16:22 | |
if I remember correctly | |||
poohman | hello how should I form my tokens so that all the tokens within the tokens are shown in the tree when using Grammar::Debugger | 16:26 | |
? | |||
token frame {\s*<top_left>\s*\v\s*<date_or_time>\s*\v+'</TD>'\v+<top_left>\v+} | 16:27 | ||
16:27
wander left,
mcmillhj joined
|
|||
poohman | for example - when the frame token is resolved it shows the top_left token but not the date_or_time - instead only a star | 16:28 | |
paste.gnome.org/pjsggk9z5 | |||
timotimo | it doesn't show date_or_time because it has no reason to even call it; top_left already failed | 16:29 | |
poohman | paste.gnome.org/p0lbfwesv | 16:30 | |
here top_left passed | |||
timotimo | OK, but it didn't reach date_or_time, so probably so \v in between the two? | ||
probably no \v in between i mean | 16:31 | ||
or more than one | |||
poohman | token frame {\s*<top_left>\s*\v\s*<date_or_time>\s*\v+'</TD>'\v+<top_left>\v+} | ||
16:31
geospeck left
|
|||
geekosaur | poohman, the point here is nothing is special about top_left or number of tokens or whatever | 16:31 | |
if it fails at some point,m the rest of the token it's working on doesn't show | 16:32 | ||
so if it doesnt mention date_or_time then *it failed parse before that* | |||
16:32
mcmillhj left
|
|||
poohman | ah ok | 16:32 | |
Can multiple lines be matched using \n or \v ?? | 16:33 | ||
because it seems to take each line separately | |||
geekosaur | "\v matches a single vertical whitespace character" | 16:35 | |
timotimo | \v will only match a single character of vertical whitespace | ||
geekosaur | and \n matches exactly one notional newline (which here looks like \r\n) | ||
poohman | ok - I did use \v* when there were multiple lines | 16:36 | |
but let me have a look | |||
geekosaur | you might mean \v+ instead (is 0 newlines valid?) | ||
16:36
mcmillhj joined
|
|||
geekosaur | anuyway if it's \r\n newlines (network or windows style) then \v would match only the \r and parse fails at the \n | 16:37 | |
it doesn;t do magic newline, like \n does, at least according tot he docs | |||
poohman | its a http POST response - so maybe I need to have look at \r | 16:38 | |
geekosaur | I got the \r from the final parse output | ||
but if it's strictly HTTP compliant than a "newline" is the sequence \r\n. perl 6's \n will match that sequence as a single "character" | 16:39 | ||
I would not in fact use \v at all because the HTTP spec does not allow anything but newlines; \v also matches vertical tab and form feed, among others, but those are not part of the HTTP spec | 16:40 | ||
16:40
pecastro left
|
|||
geekosaur | well, they will be output but I don't think they count here; in an HTTP context you want \s+ when those are valid, I think | 16:41 | |
poohman | ok - need to search for this \r - i dont see it in the response I have | ||
geekosaur | end of lines 13 and 15 in your paste | ||
poohman | no I saw that there | ||
but in the response I meant | |||
geekosaur | so why do you think that's not related? | ||
the sequnece \r\n is an HTTP protocol newline | 16:42 | ||
poohman | no no I noticed the \r after you mentioned it - but I dont notice it in the response im using to write the grammar for | ||
ah ok | |||
geekosaur | if a text file on unix contains \n, it will be sent over HTTP as \r\n if the web server is strictly compliant | 16:43 | |
(some are not) | |||
poohman | paste.gnome.org/ptommlcbx | ||
that is what I saw | |||
and so wrote the grammar for it | |||
geekosaur | right, the \r\n is in here just a "new line" and sends you to line 2 | ||
you can;t precisely trust what you see in an editor or etc.; what goes over the wire may be different | 16:44 | ||
poohman | any tips what editor or tool I can use to see this \r for example | 16:45 | |
geekosaur | because if it's sent from unix to windows you do not want it to send a unix ^J as literal ^J (or what the trace shows as \n), windows programs tend not to understand that. it needs to be turned into ^M^J (or what the trace shows as \r\n) | ||
and the receiver will convert as necessary to local newline format | |||
poohman | ok | ||
[Coke] | I often use "vi -b" for quick double checks on that sort of thing. | 16:46 | |
poohman | let me check with vim | ||
geekosaur | I have been known to captire to a file and LANG=C od -c (or hexdump if it's installed) | 16:47 | |
the LANG=C keeps the program from being too clever about unicode sequences and such | |||
16:47
mcmillhj left
|
|||
geekosaur | which can obscure the actual content | 16:47 | |
16:49
mcmillhj joined
|
|||
poohman | vim -b gives ^M for \r\n | 16:50 | |
16:51
araujo joined,
araujo left
|
|||
geekosaur | rigjhtm shows the ^M as a normal char and then goes to the next line on \n | 16:52 | |
typical for unix | |||
there's likely a mode to switch it to windows line mode, in which case the ^M would no longer show | |||
(or with ":set list" it would show ^M$ where the $ means it saw a unix newline or \n) | 16:53 | ||
vim should collor both specially to distinguish from normal file content | |||
*color both | |||
16:54
araujo joined
|
|||
poohman | ok | 16:55 | |
16:55
abraxxa left
16:56
poohman_ joined
|
|||
poohman_ | but the Grammar::Debugger showed - ill look more closely at the Debuggers output | 16:57 | |
thanks a lot geekoaur | |||
geekosaur | |||
16:57
mcmillhj left
|
|||
poohman_ | :wq | 16:58 | |
sorry | |||
16:58
domidumont left,
mcmillhj joined
|
|||
geekosaur | it failed frame at \v, then went on to not_comp and matched the whole line | 16:59 | |
I think you haad a paste with the actual grammar in it? not seeing it in scrollback for some reason | |||
16:59
poohman left,
poohman_ is now known as poohman
|
|||
geekosaur | oh, found it | 16:59 | |
poohman | paste.gnome.org/pjsggk9z5 | 17:00 | |
geekosaur | right, so frame failed and record tried not_comp which ate the whole line (\V*\v) | ||
poohman | no that one | ||
geekosaur | huh? | ||
poohman | i had pasted the wrong link | 17:01 | |
raschipi | dos2unix -i can show what the newlines look like. | ||
poohman | paste.gnome.org/p4hxwflkz | ||
this was the Grammar | 17:02 | ||
geekosaur | this time oit failed in top_left, probably because frame failed in top_left the first time and failed through to not_comp, which ate the first line. it then tried to parse the next line but that contains the rest of the record it failed in | ||
so now the parse fails trying to parse the record start again, from the wrong place | |||
17:02
wamba left
|
|||
geekosaur | you probably want to reconsider how the parser works if you need it to be smarter about resynching | 17:02 | |
perlpilot | poohman: you might want to consider getting www.apress.com/us/book/9781484232279 if you haven't already ordered it. | 17:04 | |
poohman | just trying stuff out - but am interested in what you are saying - though I have no idea what you mena by it | ||
17:04
mcmillhj left
|
|||
perlpilot | (it won't help immediately, but it will help if you intend on doing grammars and such in the future) | 17:04 | |
poohman | didnt know this was out already | 17:05 | |
have the think perl 6 one | |||
geekosaur | what I mean is, once the parse has failed on the first line, it treats the next line --- which is part of the intended record --- as the start of a new record. which is why the subsequent parse fails on the date when it is expecting a top_left | ||
if you want to have parse failure recover from errors like that, you need to be able to scan ahead for the next start of record and skip the garbage. not_comp is not currently smart enough to do this | 17:06 | ||
but, in fact, here I would rearrange the grammar such that, if top_left succeeds (meaning start of record), I have a custom fallback in frame for if some part of the rest of the frame fails | 17:07 | ||
17:07
mcmillhj joined
|
|||
geekosaur | oh, hm, I see, you tried to go on to the date part, this is not the same gramar you were using before | 17:07 | |
you commented out the old frame and made a new one | |||
poohman | hmm I was searching for grammars considering multiple lines - more idiomatic you know - not a lot of examples | 17:08 | |
started of "top down" - but with the debugger it is easier "bottom up" so made some changes | 17:09 | ||
its almost the same code - except for the addition of \r i guess | 17:10 | ||
i mean from wat I pasted earlier | |||
17:11
setty1 joined
|
|||
perlpilot | poohman: Your time token won't match like you want. | 17:11 | |
17:11
scimon left
|
|||
poohman | ill follow ur advise and try \r\n | 17:11 | |
\r\v work | 17:12 | ||
geekosaur | yes because it matches the ^J only | ||
the point is \v will match \r OR \n but not the combination \r\n | |||
poohman | havent got so far perlpilot | 17:13 | |
17:13
mcmillhj left
|
|||
geekosaur | it weill also match \f, \v character (vertical tab), and some other things you likely do not intend | 17:13 | |
I would not use \v unless I knew those were also valid characters in context | |||
poohman | ok | ||
geekosaur | don't try to treat it as a smart newline, in other words | ||
poohman | i wrote a grammar for some pdf text 6 months back and remember using a lot of \v | 17:14 | |
so the habit | |||
will break it | |||
let me look at the code again perlpilot - for the time token | 17:17 | ||
oh ja geekosaur did point out the coorect use of <{ ... }> | 17:18 | ||
forgot it for the time token | 17:19 | ||
17:19
Guest32259 left
|
|||
poohman | {<{[0 ... 23].fmt('%02d')}>} | 17:20 | |
will that work?? | |||
17:21
mcmillhj joined,
ctilmes joined
|
|||
geekosaur | I don't think so; it'd stringify the sequence generated by [0 ... 23], then try to format that string as anumber (and the number it used would probably be 0) | 17:21 | |
m: say [0 ... 23]».fmt('%02d') | 17:22 | ||
camelia | [00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23] | ||
ctilmes | In docs.perl6.org/language/control#LABELs "while, until, and for loops can all take a label" should that also include "loop" itself? | ||
geekosaur | notice the hyper operator so it appliies the .fmt to the things inside the list instead of the list itself | ||
perlpilot | m: say [0 .. 23].fmt('%02d'); | ||
camelia | 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ||
perlpilot | m: dd [0 .. 23].fmt('%02d'); # probably more instructive | 17:23 | |
camelia | "00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23" | ||
perlpilot lunch & | |||
poohman | m: [0 ..23]>>.fmt('%02d') | 17:24 | |
camelia | ( no output ) | ||
timotimo | geekosaur: fmt on lists formats the individual elements and joins them with whatever you pass as the second argument (a single space by default) | ||
no need for the hyper operator here | |||
geekosaur | oh, whoops | ||
poohman | how do you even type the hyperoperator? | 17:26 | |
17:26
mson joined
|
|||
moritz | AltGr+x / AltGr+y on my keyboard | 17:28 | |
docs.perl6.org/language/unicode_entry | |||
ilmari | or compose > > / compose < < | ||
geekosaur | note that you can also use the long form which si just >> | ||
rather than the fancy unicode | |||
ilmari | altgr-z / altgr-x here | ||
moritz | yeah, the German keyboard has y and z swapped | 17:30 | |
ilmari | which one is it that has q and a swapped? french? | 17:31 | |
and w and z | |||
azerty | |||
17:31
lizmat joined
17:33
someuser left,
Cabanossi left
17:34
dakkar left
17:36
Cabanossi joined,
philomath joined
|
|||
poohman | ok - people thanks for all the help - next to sleep - later bye | 17:39 | |
17:39
poohman left
17:40
Ven joined
17:41
Ven is now known as Guest73722
17:44
azawawi joined
|
|||
azawawi | hi | 17:44 | |
17:50
wander joined
17:55
domidumont joined
17:56
rindolf left,
shlomif joined
17:57
shlomif is now known as rindolf
|
|||
azawawi hears a faint echo in the distance | 17:59 | ||
teatime | You are in a maze of twisty little array containers, all alike. | 18:01 | |
18:02
Guest73722 left
|
|||
teatime | A hollow voice says, 'tmtowtdi'. | 18:02 | |
Geth | doc: fb139205f6 | (Jan-Olof Hendig)++ | doc/Type/IO/Handle.pod6 Fix a couple of incorrect links |
18:04 | |
synopsebot | Link: doc.perl6.org/type/IO/Handle | ||
azawawi begins reading golang.org/ref/spec#Packages | |||
18:06
nhywyll left
|
|||
azawawi | jnthn: ping | 18:08 | |
18:10
comborico1611 left
18:11
rindolf left
18:13
philomath left
18:19
rindolf joined
|
|||
azawawi | .tell jnthn regarding your .oO( Who wants to write Inline::Go? :P ) # New experimental pet project github.com/azawawi/perl6-inline-go (Inline::Go) :) | 18:20 | |
yoleaux | azawawi: I'll pass your message to jnthn. | ||
Geth | doc: 20b9876294 | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod6 Fixed formatting and a few incorrect links |
18:23 | |
synopsebot | Link: doc.perl6.org/type/IO/Path | ||
18:28
poohman joined
|
|||
Geth | ecosystem: 7e331a01cd | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | META.list Add Inline::Go to ecosystem |
18:34 | |
18:34
wamba joined
18:37
troys left
|
|||
azawawi | Now the fun part begins from Inline::Go, Grammar::Go ... i started with some simple function regexes to get exported Go functions and basic go-2-p6 type mapping. go function nativecall wrapper is added to current package via an evil EVAL :) | 18:38 | |
18:45
geospeck joined
18:46
troys joined
|
|||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/11/27/...ity-first/ | 18:46 | |
perlpilot | azawawi++ nice | 18:47 | |
timotimo | lizmat: there's a ". " in front of "An effort well worth supporting!" that looks strange | ||
lizmat: and there seems to be no link to jnthn's blog post | 18:48 | ||
teatime | lizmat: awesome thank you | ||
perlpilot | lizmat++ cool weekly. I used to think that at some point there would be nothing interesting to say, but I'm happy that that day (if it comes) still seems to be far off. | 18:50 | |
lizmat | timotimo++ # fixed and fixed | 18:51 | |
timotimo | lizmat++ | ||
AlexDaniel | lizmat++ | 18:52 | |
timotimo | AlexDaniel: what is "regex bug on custom" supposed to mean? :P | 18:55 | |
ah, it turned <ws> into "" because "oh no, html!" | 18:56 | ||
18:56
travis-ci joined
|
|||
travis-ci | Doc build failed. Jan-Olof Hendig 'Fix a couple of incorrect links' | 18:56 | |
travis-ci.org/perl6/doc/builds/308026078 github.com/perl6/doc/compare/8e8ac...139205f6fb | |||
18:56
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 18:56 | |
azawawi | perlpilot: thanks | 18:57 | |
AlexDaniel | timotimo: | ||
robertle | anyone knows what happened to 6.d ?? | 18:58 | |
timotimo | i wonder if the doc builds should set RAKUDO_POD6_TABLE_DEBUG? | ||
AlexDaniel | timotimo: at first I thought it's about the changelog… the gist I can at least edit :) | ||
timotimo | :) | ||
AlexDaniel | timotimo: but thanks, noted. I'm currently moving it to whateverable, I think there was a helper function somewhere to escape stuff… | 18:59 | |
robertle: there's 6.d-prep repo with some notes: github.com/perl6/6.d-prep | |||
robertle: we will get there sooner or later (hopefully sooner) | 19:00 | ||
19:01
travis-ci joined
|
|||
travis-ci | Doc build failed. Jan-Olof Hendig 'Fixed formatting and a few incorrect links' | 19:01 | |
travis-ci.org/perl6/doc/builds/308035069 github.com/perl6/doc/compare/fb139...b98762945b | |||
19:01
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 19:01 | |
19:03
darutoko left
19:05
geospeck left
|
|||
El_Che | lizmat: " it was an excellent event with a lot of high quality Rakudo Perl 6 and Pumpking Perl 5 talks" | 19:07 | |
lizmat: Pumpking Perl? Is it official -ish? | |||
moritz | DrForr: re theperlfisher.blogspot.de/2017/11/t...hings.html I'd go so far as to put the sub roundtrip into the subtest | 19:08 | |
19:14
comborico1611 joined
19:15
lizmat left,
poohman left,
BrianOn99 joined
|
|||
AlexDaniel | El_Che: well, that's the way all p6weeklies are written | 19:18 | |
19:19
autark joined
|
|||
El_Che | AlexDaniel: ok, I didn't noticed it before | 19:19 | |
19:20
BrianOn99 left
19:32
TEttinger left
19:34
Cabanossi left
19:36
Cabanossi joined
19:39
TEttinger joined
19:41
geospeck joined
19:56
domidumont left
20:00
kyan joined,
raschipi left
20:03
comborico1611 left
20:12
comborico1611 joined
20:17
AlexDani` joined
|
|||
AlexDani` | squashable6: next | 20:18 | |
squashable6 | AlexDani`, ⚠🍕 Next SQUASHathon in 3 days and ≈13 hours (2017-12-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
20:19
AlexDaniel left,
llfourn left,
pmurias left
20:22
AlexDani` left,
bisectable6 joined
20:28
AlexDaniel joined
|
|||
jnthn | azawawi: Interesting. :) | 20:30 | |
I can't actually remember why I was asking though ;-) | |||
20:31
eliasr joined
|
|||
azawawi | jnthn: irclog.perlgeek.de/perl6/2015-11-28#i_11617570 :) | 20:31 | |
20:33
Cabanossi left
|
|||
jnthn | That was 2 years ago :) | 20:33 | |
No wonder I didn't remember :P | |||
teatime | The internet never forgets. | 20:34 | |
20:34
cdg_ left
20:35
eswues left,
cdg joined
|
|||
azawawi | :) | 20:35 | |
20:36
Cabanossi joined,
cdg_ joined
|
|||
azawawi | jnthn: I was learning Go and said why not make Inline::Go to learn it better and started some research on previous work/comments | 20:37 | |
20:39
cdg left
|
|||
azawawi | golang.org/ref/spec#Semicolons # Interesting | 20:40 | |
DrForr | .tell lizmat theperlfisher.blogspot.cz/2017/11/t...hings.html I think the link got missed in the P6W. | 20:41 | |
yoleaux | DrForr: I'll pass your message to lizmat. | ||
20:41
cdg_ left,
cpage_ left
20:42
kyan left
|
|||
Geth | doc: 95987c52b9 | (Jan-Olof Hendig)++ | doc/Type/IO/Socket.pod6 Added docs for get method. jnthn++ |
20:42 | |
synopsebot | Link: doc.perl6.org/type/IO/Socket | ||
20:44
troys is now known as troys_
20:46
diakopter left
20:47
cdg joined
20:49
bisectable6 left
|
|||
Geth | doc: b27634082f | (Jan-Olof Hendig)++ | doc/Type/IO/Socket.pod6 Fixed copy paste error |
20:49 | |
20:49
bisectable6 joined
20:51
cdg left
21:00
_28_ria joined
21:02
setty1 left
21:03
travis-ci joined
|
|||
travis-ci | Doc build failed. Jan-Olof Hendig 'Added docs for get method. jnthn++' | 21:03 | |
travis-ci.org/perl6/doc/builds/308096853 github.com/perl6/doc/compare/20b98...987c52b991 | |||
21:03
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 21:03 | |
21:03
_28_ria left
21:04
_28_ria joined
|
|||
Geth | ecosystem: ab30e38701 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list Add Acme::Advent::Highlighter to eco Preprocessor for Perl 6 Advent Articles, with syntax highlighter. Saves the trouble of not having to deal with broken escapes in code blocks in Wordpress and provides syntax-highlights, as a cherry on top: github.com/zoffixznet/perl6-Acme-A...ighlighter |
21:07 | |
21:07
travis-ci joined
|
|||
travis-ci | Doc build failed. Jan-Olof Hendig 'Fixed copy paste error' | 21:07 | |
travis-ci.org/perl6/doc/builds/308100047 github.com/perl6/doc/compare/95987...7634082ffd | |||
21:07
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 21:07 | |
Geth | mu: ac36b2d8af | (Zoffix Znet)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule Mention existence of Acme::Advent::Highlighter |
21:09 | |
21:16
cdg joined
|
|||
azawawi is feeding Go EBNF grammar into Perl6 grammars... simply brilliant (little modifications) | 21:20 | ||
21:20
troys_ is now known as troys
21:21
cdg left
|
|||
AlexDaniel | o_o | 21:23 | |
21:27
aindilis joined
21:31
cdg joined
21:36
cdg left
21:40
Pankaj joined,
kitsunenokenja joined
|
|||
Pankaj | Hi, Can anyone help me with Perl Data Language like features in Perl6 | 21:41 | |
21:47
kyan joined
|
|||
moritz | Pankaj: if you ask a specific question, maybe somebody can help | 21:48 | |
21:49
espadrine joined,
geospeck left
|
|||
Pankaj | @moritz - How can I read an image file in Perl6 (like we do it in PDL)? | 21:51 | |
21:59
cdg joined
22:01
Pankaj left,
autark` joined
22:02
cdg left,
cdg joined
22:03
autark left
22:05
Cabanossi left
22:06
Cabanossi joined
22:08
cdg_ joined
22:10
cdg left
22:11
troys is now known as troys_
22:13
greppable6 left,
committable6 left,
committable6 joined,
greppable6 joined
22:15
mcmillhj left
22:23
raschipi joined
22:26
mson left
22:33
wamba left
22:35
comborico1611 left
22:37
konsolebox left
22:42
konsolebox joined
22:49
kitsunenokenja left
22:50
kitsunenokenja joined
22:52
mson joined
22:54
kitsunenokenja left
23:04
Cabanossi left
23:06
Cabanossi joined
23:07
yon joined
|
|||
yon | hello! | 23:08 | |
Is anyone there? | |||
23:08
autark` left
23:09
yon left
|
|||
raschipi | went away, didn't even wait a minute. | 23:09 | |
23:10
autark` joined
|
|||
geekosaur | instant gratification is alive and well and living on the internet | 23:11 | |
azawawi | :) | ||
how do you workaround a null regex (e.g. 'rule EmptyStmt { }') ? | 23:13 | ||
AlexDaniel | .tell yon “Is anyone there?” Yes. | ||
yoleaux | AlexDaniel: I'll pass your message to yon. | ||
AlexDaniel | :) | ||
geekosaur | um. "workaround"? | 23:14 | |
azawawi | kinda sleepy :) | ||
geekosaur | that makes at least two of is. (have had about 3 hours of sleep in the past 48 hours, sigh) | ||
AlexDaniel | azawawi: what a wonderful question :D | 23:15 | |
There has to be a simple answer | |||
azawawi | 42? :) | ||
jnthn | <?> | 23:16 | |
'' | |||
azawawi | thanks | ||
jnthn | .oO( I want instant gratification to end right now! ;) ) |
23:17 | |
azawawi | 340 lines and counting in the Go Grammar... | ||
23:17
BrianOn99 joined
23:19
rindolf left
23:21
BrianOn99 left
23:25
kitsunenokenja joined
|
|||
b2gills | I've thought about creating a greeting bot that will respond to someone it hasn't seen before if no-one responds in a short time-frame. | 23:26 | |
teatime | interesting. | 23:27 | |
timotimo | #krita has one of those - it's extremely frustrating to see the sheer amount of people popping in to ask a question and immediately leaving | ||
geekosaur | I'm kinda unfond of welcomebots | ||
there are times when they can be appropriate, but I think we strive for a higher standard here | |||
timotimo | but #krita has a different target audience | ||
teatime | I like the way b2gills describes it though | 23:28 | |
I like conservative, quieter bots | 23:29 | ||
23:35
Cabanossi left
23:36
llfourn joined,
Cabanossi joined
23:39
_28_ria left
23:40
_28_ria joined
|
|||
azawawi | github.com/azawawi/perl6-inline-go...rammar.pm6 # so far... will continue working on it tomorrow hopefully. thanks :) | 23:43 | |
23:45
john51 left
|
|||
azawawi | good night & | 23:45 | |
23:45
john51 joined,
azawawi left
23:48
tangible6 left,
tangible6 joined,
troys_ is now known as troys
23:52
mcmillhj joined,
_28_ria left
|
|||
b2gills | We do have a several hour time-frame when almost no-one is online, and occasionally new people are here talking to no-one. | 23:53 | |
23:53
_28_ria joined
23:56
pilne joined
|
|||
simcop2387 | p6: say 3 | 23:57 | |
23:57
mcmillhj left
|
|||
camelia | 3 | 23:57 |