Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-11-27

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 aindilis joined #perl6
00:18 konsolebox joined #perl6
00:29 konsolebox joined #perl6
00:36 Cabanossi joined #perl6
00:37 Ven joined #perl6
00:40 comborico1611 joined #perl6
00:45 aborazmeh joined #perl6
00:45 aborazmeh joined #perl6
00:47 mudman joined #perl6
00:53 konsolebox joined #perl6
00:55 poohman joined #perl6
00:56 comborico1611 Quiet night.
00:56 poohman joined #perl6
01:00 SmokeMachine timotimo: why ":my $*GOAL := $<sym> eq '??' ?? '!!' !! '‼';" amuses you?
01:01 bisectable6 joined #perl6
01:01 timotimo because of how the symbols repeat inside and outside of quoting there
01:01 timotimo just from a visual standpoint, the final !!-as-one-character amuses, too
01:04 SmokeMachine but that isn't on rakudo source code anymore, is it?
01:04 timotimo doesn't seem so
01:06 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.
01:06 yoleaux 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.
01:07 SmokeMachine timotimo: ⁇ ‼︎ was removed from rakudo, wasn't it?
01:07 timotimo i think so
01:08 lookatme :)
01:08 SmokeMachine so, I didn't get it... :P
01:08 lookatme Why it removed ?
01:09 lookatme It will not available in 6.d ?
01:09 SmokeMachine lookatme: not ?? !!, but ⁇ ‼︎
01:09 SmokeMachine u: ⁇ ‼︎
01:09 unicodable6 SmokeMachine, U+2047 DOUBLE QUESTION MARK [Po] (⁇)
01:09 unicodable6 SmokeMachine, U+0020 SPACE [Zs] ( )
01:09 unicodable6 SmokeMachine, 4 characters in total: https://gist.github.com/e86ba1dc9cc2a80a35db589fc382ef8a
01:10 lookatme ~~ oh
01:10 lookatme m: say "⁇ ‼︎".codes
01:10 camelia rakudo-moar 78caeb6bc: OUTPUT: «4␤»
01:11 lookatme m: say "?? !!".codes
01:11 camelia rakudo-moar 78caeb6bc: OUTPUT: «5␤»
01:11 * teatime tries to find the 4th codepoint in the first example
01:12 lookatme ⁇ #one ' ' # two ! # three ! # four
01:12 lookatme Is it right ?
01:12 teatime no, it's one codepoint for ‼︎ is it not?
01:13 lookatme Hmm, IDK
01:13 teatime oh, there's a variation selector
01:13 teatime which is invisible
01:13 geekosaur looks to me like something inserted a variant selector, yeh
01:13 lookatme oh
01:13 geekosaur might even be a bug in unicode support in the sending irc client
01:13 Juerd m: "⁇ ‼︎".comb».codes
01:13 camelia rakudo-moar 78caeb6bc: ( no output )
01:13 Juerd m: say "⁇ ‼︎".comb».codes
01:13 camelia rakudo-moar 78caeb6bc: OUTPUT: «(1 1 2)␤»
01:14 SmokeMachine I think i wrote it wrong...
01:14 SmokeMachine u: ⁇ ‼️
01:14 unicodable6 SmokeMachine, U+2047 DOUBLE QUESTION MARK [Po] (⁇)
01:14 unicodable6 SmokeMachine, U+0020 SPACE [Zs] ( )
01:14 unicodable6 SmokeMachine, 4 characters in total: https://gist.github.com/9270df6ac73da2a20664114e0e9f76e6
01:14 lookatme u: ‼️
01:14 unicodable6 lookatme, U+203C DOUBLE EXCLAMATION MARK [Po] (‼)
01:14 unicodable6 lookatme, U+FE0F VARIATION SELECTOR-16 [Mn] ( ️)
01:15 konsolebox joined #perl6
01:15 lookatme u: ‼
01:15 unicodable6 lookatme, U+203C DOUBLE EXCLAMATION MARK [Po] (‼)
01:21 SmokeMachine lookatme: it was removed here: https://github.com/rakudo/rakudo/commit/9644fc360f
01:21 SmokeMachine lookatme: and this is why: https://rt.perl.org/Public/Bug/Display.html?id=131002
01:25 SmokeMachine 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:26 timotimo for zip-latest i'd assume "when all are done"
01:26 char_var[buffer] joined #perl6
01:26 timotimo after all, its main gimmick is that it emits a new tuple whenever any one of the supplies changes
01:27 timotimo 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 timotimo maybe zip should "done" when the "current position" reaches a supply that has "done"
01:28 SmokeMachine timotimo: so, we should fix the doc? https://docs.perl6.org/type/Supply#method_zip-latest
01:28 SmokeMachine timotimo: yes, I fixed zip last friday...
01:29 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 rakudo-moar 78caeb6bc: OUTPUT: «Can only use zip to combine defined Supply objects␤  in block <unit> at <tmp> line 1␤␤»
01:29 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");
01:29 camelia rakudo-moar 78caeb6bc: OUTPUT: «Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
01:30 timotimo SmokeMachine: there's a typo in the docs, it should be *@supplies, not @*supplies
01:30 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");
01:30 camelia rakudo-moar 78caeb6bc: OUTPUT: «(1 9 x)␤.␤(2 8 y)␤.␤»
01:30 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 rakudo-moar 78caeb6bc: OUTPUT: «.␤.␤»
01:31 timotimo i think this is wrong ^
01:31 SmokeMachine m: react whenever Supply.zip: Supply.from-list(^4), Supply.interval(1) { .say }
01:31 camelia rakudo-moar 78caeb6bc: OUTPUT: «(0 0)␤»
01:31 timotimo but that's very much up to debate
01:31 timotimo up for debate*
01:31 konsolebox joined #perl6
01:32 SmokeMachine brb
01:36 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 rakudo-moar 78caeb6bc: OUTPUT: «No such method 'Suply' for invocant of type 'Supplier'. Did you mean 'Supply'?␤  in block <unit> at <tmp> line 1␤␤»
01:36 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";
01:36 camelia rakudo-moar 78caeb6bc: ( no output )
01:36 timotimo ah, yes
01:36 timotimo 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";
01:36 camelia rakudo-moar 78caeb6bc: OUTPUT: «(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 )␤»
01:37 timotimo kind of cute
01:39 timotimo 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 rakudo-moar 78caeb6bc: OUTPUT: «$("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 ")␤»
01:39 timotimo ah, it uc's the whole thing so it becomes a longer and longer string
01:39 SmokeMachine Sorry, my wife just “stole” my computer, so I can’t fix that now... :(
01:39 timotimo that's fine
01:41 SmokeMachine (I should have bought a Mac for her when I had chance...)
01:42 comborico1611 Haha
01:43 timotimo if it's a linux machine, have you considered a multi-seat setup?
01:43 timotimo it's probably cheaper to buy a second keyboard, mouse, and display rather than a second computer, keyboard, mouse, and display :)
01:46 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:47 lookatme They use your MAC for what? For fun?
01:47 lookatme Mac
01:48 SmokeMachine My kids don’t use it yet... my wife is using for work...
01:48 SmokeMachine This moments I’d love to have perl6 for iPhone...
01:49 SmokeMachine glot.io helps... but I’d like it native for iPhone...
01:49 lookatme I have a linux note book for Perl6
01:49 SmokeMachine Like the pythonista...
01:50 SmokeMachine http://omz-software.com/pythonista/
01:50 lookatme yeah, I know it :)
01:51 konsolebox joined #perl6
01:52 SmokeMachine That would be so cool!
01:53 lookatme yeah, Perl6 online is not convenient  :)
01:53 wander joined #perl6
01:56 SmokeMachine I would like to try to make that work... but I have no idea of how to start it...
01:57 comborico1611 Goodnight, guys.
01:57 lookatme goodnight
01:57 SmokeMachine Good night!
01:58 lookatme SmokeMachine, compile Perl 6 in IPhone ?
01:58 SmokeMachine Yes... how?
01:59 lookatme Maybe on same hardware(like CPU) computer
01:59 konsolebox joined #perl6
01:59 lookatme IDK :) Haha
02:00 timotimo lookatme: you can't just compile something on an iphone. you have to pay to get an apple developer memberhpi
02:00 timotimo membership*
02:00 timotimo and i'm not sure if you can develop for an iphone on anything other than a mac osx system
02:00 lookatme I think this work in Android
02:01 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
02:03 SmokeMachine And yes, I think it only crosscompiles on Xcode...
02:03 timotimo interesting
02:06 SmokeMachine https://stackoverflow.com/questions/28323367/compiling-c-source-for-ios
02:08 SmokeMachine Anyone would be interested to make it happen?
02:11 Juerd I don't understand the purpose of ;; in signatures and the documentation is rather thin
02:11 cpage_ joined #perl6
02:12 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 poohman joined #perl6
02:13 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:15 Juerd Is there even any use case for this with non-optional arguments?
02:19 timotimo m: multi sub foo($a;; Str $b) { }; multi sub foo($a;; Int $b) { }; foo(1, "hi"); foo(1, 99)
02:19 camelia rakudo-moar 78caeb6bc: OUTPUT: «Ambiguous call to 'foo'; these signatures all match:␤:($a;; Str $b)␤:($a;; Int $b)␤  in block <unit> at <tmp> line 1␤␤»
02:20 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:22 Cabanossi joined #perl6
02:22 * timotimo goes to bed
02:43 zakharyas joined #perl6
02:58 ilbot3 joined #perl6
02:58 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
03:03 dayangkun joined #perl6
03:05 konsolebox joined #perl6
03:11 mson joined #perl6
03:23 noganex_ joined #perl6
03:29 konsolebox joined #perl6
03:34 lizmat joined #perl6
03:39 benchable6 joined #perl6
04:07 Cabanossi joined #perl6
04:08 konsolebox joined #perl6
04:15 ryn1x joined #perl6
04:18 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:21 Cabanossi joined #perl6
04:32 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:33 perlawhirl i believe a 'start' block is just sugar for creating a promise.
04:33 konsolebox joined #perl6
04:34 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 perlawhirl an example of using a Promise.anyof() is in https://docs.perl6.org/language/concurrency
04:42 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:51 ryn1x 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.
04:51 perlawhirl yes,
04:51 perlawhirl 'start' is sugar for Promise.start()
04:51 ryn1x Ok
04:52 perlawhirl But all promises, including ones created from Proc::Async have a .start method
04:52 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:53 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:56 ryn1x hmm... I get "Access denied to keep/break this Promise; already vowed" when messing with the vow and break methods.
05:02 konsolebox joined #perl6
05:12 ZzZombo joined #perl6
05:12 ZzZombo woo!
05:20 konsolebox joined #perl6
05:36 Cabanossi joined #perl6
05:57 mudman joined #perl6
06:06 Cabanossi joined #perl6
06:18 konsolebox joined #perl6
06:41 domidumont joined #perl6
06:46 domidumont joined #perl6
06:54 lowbro joined #perl6
06:54 lowbro joined #perl6
06:58 darutoko joined #perl6
07:00 parv joined #perl6
07:06 Cabanossi joined #perl6
07:21 geospeck joined #perl6
07:27 markong joined #perl6
07:36 Cabanossi joined #perl6
07:39 wamba joined #perl6
07:51 domidumont joined #perl6
07:54 abraxxa joined #perl6
08:06 Cabanossi joined #perl6
08:26 astj joined #perl6
08:27 astj joined #perl6
08:29 mudman joined #perl6
08:31 astj joined #perl6
08:35 tomaw joined #perl6
08:45 pecastro joined #perl6
09:06 Cabanossi joined #perl6
09:15 BrianOn99 joined #perl6
09:16 karmen joined #perl6
09:24 scimon joined #perl6
09:25 scimon Morning all.
09:25 greppable6 joined #perl6
09:26 DrForr Mornin'. Survived LPW, just barely :)
09:26 masak congratulations!
09:27 scimon It was a good day. Shame I had to leave early but prior engagements.
09:28 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.
09:28 DrForr *would've loved
09:30 robertle joined #perl6
09:30 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:33 dakkar joined #perl6
09:36 DrForr o/
09:48 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 #perl6
09:56 perlawhirl \me clickbaits: http://www.0racle.info/articles/its_a_wrap
09:56 * perlawhirl needs to learn to irc gooder
09:57 perlawhirl 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:06 Cabanossi joined #perl6
10:07 mudman joined #perl6
10:08 piojo joined #perl6
10:10 scimon Quick look at the article and it's pretty impressive.
10:12 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 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
10:13 scimon The more links the better (if they are in reasonable places)
10:14 moritz nice post, perlawhirl++
10:15 DrForr 13/10 would read again :)
10:16 rindolf joined #perl6
10:17 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 perlawhirl ok thanks for all the eyes... will post to reddit
10:17 wander joined #perl6
10:18 wander I am looking for the proper translation of 'lexpad' in Chinese, since outside perl culture it is rarely used.
10:19 wander It is quite like the concept 'symbol table', so what is the difference?
10:20 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.
10:21 huf the lexpad is where the cool lexicals hang out and talk about sticking it to the man...
10:21 parv joined #perl6
10:21 jnthn I'm not quite sure where the "pad" bit came from :)
10:22 jferrero m: ("01" .. "12")».join(",").say
10:22 camelia rakudo-moar 78caeb6bc: OUTPUT: «(01 02 11 12)␤»
10:24 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
10:25 huf wander: treat it as a proper name, like edward or maude?
10:25 masak wander: 'lexpad' seems a Perl-centered term, yes
10:25 masak wander: searching on ddg gives Parrot's PDD 20 as the top relevant hit
10:26 masak Wikipedia is all "Did you mean 'Leopard'?"
10:26 huf the lexpad cannot change its slots?
10:26 DrForr The term 'pad' came from 'scratchpad', a place to write temporary notes.
10:27 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 #perl6
10:29 perlawhirl piojo: thanks, fixed
10:30 wander huf: sorry, I don't know what you mean, could you please explain it?
10:30 DrForr Beware of the Lexpad.
10:31 wander masak: yes, it seems perlists use it a lot, however not so common other place.
10:32 El_Che DrForr: did you give a talk at LPW?
10:32 DrForr Too f*cking early in the morning, but yes.
10:33 DrForr http://act.yapc.eu/lpw2017/talk/7257
10:33 huf wander: treat it as a name, not something to translate really
10:34 wander huf: see.
10:34 huf though... i dont know the chinese translation tradition concerning proper names
10:34 DrForr surname then given name, IME.
10:35 huf heh
10:35 El_Che DrForr: computer says no
10:35 El_Che act seems down
10:35 DrForr I just checked a second ago. WFM :)
10:36 Cabanossi joined #perl6
10:37 El_Che mm
10:37 El_Che should be here
10:37 astronavt joined #perl6
10:37 El_Che I cn reach it from home
10:37 DrForr I'm at work and it's available.
10:40 DrForr Oo. overleaf.com looks eenteresting.
10:41 astronavt joined #perl6
10:41 scimon Unfortunately I didn't see your talk DrForr as I was also up to f*ing early giving a talk.
10:43 DrForr No worries. It wasn't as much a talk as "wake up, here's a puzzle to start the day." kinda thing.
10:44 DrForr Huh. CTAN has updated its look.
10:45 El_Che DrForr: I see you left Perl 6 for Origami 6
10:45 DrForr Well, to be brutally honest I kind of checked out for a few months from the whole programming thing.
10:47 masak wander: maybe the Lisp/Scheme translation is "environment"
10:47 masak wander: though that to me comes off as slightly more immutable in tone
10:47 El_Che DrForr: sounds like a good idea to me to do that from time to time
10:50 DrForr I didn't so much leave as put things on a temporary hiatus.
10:54 DrForr . o ( Is there any other kind of hiatus?... )
10:55 scimon I do that once in a while.
10:55 scimon Heck I did that for about 5 years after I did my degree.
10:55 * DrForr checks out tufte-latex.tex.
10:55 scimon (Then I found Perl and decided I liked programming again)
10:55 raschipi wander: Lexpad is the "local notepad"
10:59 wander thanks, I will regard it as "the symbol table for a particular lexical scope"
11:01 wander as translation, either keep 'lexpad' or use '符号表' which stands for 'symbol table', explain perlist use the term 'lexpad' and the why
11:02 AlexDaniel joined #perl6
11:04 raschipi It's not the only symbol table, mind you.
11:04 raschipi It's difficult to capture the way it's goes away at runtime in languages other than English.
11:10 wander huh
11:17 wander well I've just seen that p6 has package, module, class and lexpad as symbol table
11:18 wander searching term 'lexpad' on https://design.perl6.org/S02.html
11:20 sena_kun joined #perl6
11:20 raschipi That's out of date, lexpads aren't available as stashes.
11:21 llfourn joined #perl6
11:23 wander ok
11:24 wander we don't use lexpad to look up a dynamic variable, do we?
11:24 jnthn Yes, we do
11:25 jnthn my $*FOO is just a lexical named $*FOO and also marked with the `is dynamic` trait
11:25 wander huh
11:25 jnthn That's why it's declared with my
11:26 jnthn 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:27 coverable6 joined #perl6
11:27 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 #perl6
11:29 wander I know this principle, but forget both of them use symbol table.
11:30 jnthn There's also packages, which are different
11:30 jnthn In that packages really *do* use a Hash and you can add what you want whenever you want
11:30 jnthn Whereas the lexpad's keys are fixed at compile time
11:31 jnthn Meaning we can store them and access them in a more efficient way
11:32 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 rakudo-moar ca7d04839: OUTPUT: «8␤»
11:32 scimon So... currying is not too hard to do.
11:33 wander m: $Foo::Bar::baz  = 42; say $Foo::Bar::baz;
11:33 camelia rakudo-moar ca7d04839: OUTPUT: «42␤»
11:33 wander yes, no 'my'
11:37 jnthn scimon: See also https://docs.perl6.org/routine/assuming :)
11:38 scimon jnthn: looking
11:40 scimon Trying to work out if there's a way of doing multi f is curried( Sig ) { ... } and the is curried handles the extras.
11:43 scimon 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)
11:43 camelia rakudo-moar ca7d04839: OUTPUT: «42␤»
11:43 masak m: sub g { say $*d }; my $*d = "outer"; g() { g(); { my $*d = "inner"; g() } }
11:43 camelia rakudo-moar ca7d04839: OUTPUT: «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() } }␤…»
11:44 masak m: sub g { say $*d }; my $*d = "outer"; g(); { g(); { my $*d = "inner"; g() } }
11:44 camelia rakudo-moar ca7d04839: OUTPUT: «outer␤outer␤inner␤»
11:44 Ven joined #perl6
11:44 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:45 * masak .oO( who? nitpicking? me? )
11:46 lizmat .
11:46 yoleaux 00:09Z <AlexDaniel> lizmat: https://gist.github.com/AlexDaniel/33dbe1823ef9753d1788f6707a3914ff
11:46 lizmat AlexDaniel++
11:53 zostay joined #perl6
11:54 parisba joined #perl6
11:55 iviv joined #perl6
11:55 jhill joined #perl6
11:55 BuildTheRobots joined #perl6
11:56 statisfiable6 joined #perl6
11:56 tangible6 joined #perl6
12:00 scimon That is very neat.
12:01 DrForr Oo, ticket tracking...
12:05 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:06 perlawhirl 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 SmokeMachine m: react {whenever Promise.in(1) {done}; whenever Promise.in(2) {say “running”; done}} # ryn1x
12:06 camelia rakudo-moar ca7d04839: ( no output )
12:07 DrForr "1 and done"... need to figure out a way to sneak that in somewhere.
12:09 perlawhirl DrForr: are you thinking about ryn1x's question about "stopping" a promise?
12:10 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
12:10 perlawhirl when you want to stop it, you break the vow
12:10 perlawhirl it should stop the other one, right?
12:12 masak perlawhirl: may I interest you in https://docs.perl6.org/type/Promise#method_anyof ?
12:12 perlawhirl yeah, that's what i'm thinking
12:12 perlawhirl 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
12:13 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
12:14 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 #perl6
12:14 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? :)
12:15 scimon Probably not.
12:15 Aaronepower joined #perl6
12:15 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:16 scimon Oh yeah. I'm currently on a suger crash and eating my lunch.
12:16 masak :)
12:16 * masak .oO( Sugar Crash Saga )
12:17 DrForr At least we didn't have those toppings with a thin cupcake substrate this year.
12:18 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.
12:18 masak SmokeMachine: yeah, was thinking the same.
12:19 scimon So I wrote Timer::Breakable as a simple wrapper for that.
12:19 scimon (Well I wrote a thing and moritz said, why not make it a module? So I did. I blame him).
12:19 * moritz feels blamed
12:19 scimon :D
12:19 * masak found it at http://modules.perl6.org/dist/Timer::Breakable:cpan:SCIMON
12:20 scimon That's the bunny.
12:20 moritz will I be able to live with that feeling? Find out at 11
12:20 masak I see we have now stopped listing all the modules on http://modules.perl6.org/
12:20 masak nice milestone
12:20 scimon It's REALLY simple. And probably could be better.
12:20 moritz masak: http://perlpunks.de/paste/show/5a1998d5.b53.8b number of modules by source
12:21 masak whoa
12:21 masak ...how long was I asleep? o.O
12:22 masak 66 + 896 + 3... that's almost
12:22 masak A MILLION MODULES
12:22 masak wo-hoo! \o/
12:22 SmokeMachine We had the same discussion some days ago: https://irclog.perlgeek.de/perl6/2017-11-04#i_15401344
12:23 wamba joined #perl6
12:24 unicodable6 joined #perl6
12:24 greppable6 joined #perl6
12:26 masak ah, here's getify's take on uncancelable promises: https://github.com/getify/You-Dont-Know-JS/blob/master/async%20%26%20performance/ch3.md#promise-uncancelable
12:29 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 scimon I often have really bad ideas.
12:29 masak ooh
12:29 masak no, that sounds like a great idea
12:29 masak actually, let me rephrase that:
12:30 masak that sounds like what I would suggest doing :)
12:30 masak so at worst we're both equally bad :P
12:30 scimon Oh well... that's what it does.
12:31 * masak goes to read the source code
12:31 Ven joined #perl6
12:31 scimon There's a bit of funkiness to handle race conditions. And I need to add some more tests.
12:33 raschipi masak: to get a list of all modules, just click 'Search' with the search field empty.
12:33 masak ooh
12:33 masak funnily enough, if I click "I'm feeling lucky" with the search field empty, I'm taken to perl6/doc
12:34 masak maybe that's someone trying to tell me something, I dunno
12:36 Cabanossi joined #perl6
12:47 poohman joined #perl6
12:57 domidumont joined #perl6
13:06 Cabanossi joined #perl6
13:07 moritz probably the module with the most stars on github
13:10 geospeck joined #perl6
13:18 nhywyll joined #perl6
13:34 jeromelanteri joined #perl6
13:37 alexk joined #perl6
13:38 alexk6 joined #perl6
13:44 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 wander m: my Int $a = 2; say $a; say +^$a;
13:44 camelia rakudo-moar ca7d04839: OUTPUT: «2␤-3␤»
13:44 wander m: say (-3).base(2)
13:44 camelia rakudo-moar ca7d04839: OUTPUT: «-11␤»
13:45 timotimo we have support for 8, 16, 32, and 64 bit integers
13:46 alexk6 m: say class :: { has uint8 $.x }.new(:x(128)) == 128
13:46 camelia rakudo-moar ca7d04839: OUTPUT: «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 #perl6
13:46 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:47 scimon So I just spotted a REALLY dumb error in my slides from Saturday.
13:48 alexk6 m: my $c = class :: { has uint8 $.x is rw }.new; $c.x = 128; say $c.x;
13:48 camelia rakudo-moar ca7d04839: OUTPUT: «-128␤»
13:48 geekosaur that'd be an example of the nqp issue I mentioned :)
13:48 geekosaur I think there's an opeb bug for it, but fixing it is kinda difficult
13:48 geekosaur *open
13:49 ryn1x_ joined #perl6
13:51 domidumont joined #perl6
13:52 mcmillhj joined #perl6
13:53 alexk6 geekosaur: so uint is currently treated as int ?
13:53 geekosaur in some circumstances
13:54 geekosaur 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:55 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:56 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;
13:56 camelia rakudo-moar ca7d04839: OUTPUT: «False␤True␤»
13:57 alexk6 the problem seems not to be the codgen for say
13:58 timotimo yes, our support for unsigned ints is rather rough
14:00 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:01 geekosaur 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:02 wamba joined #perl6
14:02 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 cdg joined #perl6
14:02 alexk6 m: my $c = class :: { has uint8 $.x}.new; $c.^attributes[0].set_value($c,128); say $c.x == -128;
14:02 camelia rakudo-moar ca7d04839: OUTPUT: «True␤»
14:03 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:06 silug joined #perl6
14:06 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 rakudo-moar ca7d04839: OUTPUT: «Nil␤»
14:07 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 rakudo-moar ca7d04839: OUTPUT: «Nil␤»
14:07 wander m: class A { method f { say "a.f" } }; class B is A { method f(Int $a) { nextsame } }; say B.new.f: 42;
14:07 camelia rakudo-moar ca7d04839: OUTPUT: «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␤␤»
14:08 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 rakudo-moar ca7d04839: OUTPUT: «a.f␤True␤»
14:08 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;
14:08 camelia rakudo-moar ca7d04839: OUTPUT: «Nil␤»
14:09 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 rakudo-moar ca7d04839: OUTPUT: «b.f1␤Nil␤»
14:12 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 wander 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;
14:12 camelia rakudo-moar ca7d04839: OUTPUT: «b.f1␤a.f␤True␤»
14:12 lizmat https://dev.to/jj/the-lion-and-the-butterfly-and-the-camel-a8b
14:13 ZzZombo wander, are you aware about the fact you can query camelia privately?
14:14 wander sorry, how?
14:14 ZzZombo `/query camelia`
14:16 cdg_ joined #perl6
14:16 wander got it, sorry for these "garbages"
14:19 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:20 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
14:21 timotimo only the fastest of friends
14:22 geekosaur agreed. there's not only that but some other places with decidedly odd English phrasing
14:22 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:23 poohman joined #perl6
14:33 wander https://gist.github.com/W4anD0eR96/6b7e72cadd16a0f0867d35cf7a87e498
14:34 wander could i use correct re-dispatch keyword to call these function in order 2->1->0
14:36 AlexDaniel wow folks, thank you for all the feedback. I guess it's time to make a bot for it…
14:44 SmokeMachine AlexDaniel: sorry, but make a bot for what?
14:45 AlexDaniel SmokeMachine: https://github.com/perl6/whateverable/issues/256
14:49 lizmat joined #perl6
14:53 noganex joined #perl6
14:53 awwaiid joined #perl6
14:55 domidumont joined #perl6
15:00 eswues joined #perl6
15:04 khw joined #perl6
15:06 wamba joined #perl6
15:07 raschipi AlexDaniel: Make it generate unicode bar activity graphs because everyone love those.
15:12 AlexDaniel raschipi: probably not today, but I filed this: https://github.com/perl6/whateverable/issues/263
15:13 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 #perl6
15:14 SmokeMachine hum... great!
15:15 perlpilot joined #perl6
15:17 AlexDaniel m: sub foo() { use fatal; 5 + Nil; 42 }; foo
15:17 camelia rakudo-moar ca7d04839: OUTPUT: «Use of Nil in numeric context␤  in sub foo at <tmp> line 1␤»
15:17 AlexDaniel m: sub foo() { use fatal; 5 + Nil; 42 }; foo; say 42
15:17 camelia rakudo-moar ca7d04839: OUTPUT: «Use of Nil in numeric context␤42␤  in sub foo at <tmp> line 1␤»
15:19 AlexDaniel m: sub foo() { use fatal; 5 + Nil; 42 }; say foo; say 50
15:19 camelia rakudo-moar ca7d04839: OUTPUT: «Use of Nil in numeric context␤42␤50␤  in sub foo at <tmp> line 1␤»
15:20 AlexDaniel ok
15:21 Cabanossi joined #perl6
15:21 jnthn m: say (5 + Nil).WHAT
15:21 camelia rakudo-moar ca7d04839: OUTPUT: «Use of Nil in numeric context␤(Int)␤  in block <unit> at <tmp> line 1␤»
15:21 jnthn use fatal; is about Failure
15:21 jnthn 4 + Nil warns, not fails
15:21 timotimo m: CONTROL { die "oh no!" }; say (5 + Nil).WHAT
15:21 camelia rakudo-moar ca7d04839: OUTPUT: «oh no!␤  in block <unit> at <tmp> line 1␤␤»
15:21 jnthn quietly will suppress that
15:21 AlexDaniel yeah, I see it now
15:21 AlexDaniel thanks!
15:23 pmurias joined #perl6
15:25 wamba joined #perl6
15:35 nebuchadnezzar joined #perl6
15:39 raschipi joined #perl6
15:40 noganex joined #perl6
15:40 comborico1611 joined #perl6
15:47 noganex_ joined #perl6
15:47 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:48 poohman token day {[1 ... 31]}
15:53 poohman https://paste.gnome.org/ptnlwchgz
15:53 poohman something like this
15:54 geekosaur [] means something different in perl 6 regex (non-capturing group).
15:55 poohman ok
15:56 geekosaur m: grammar Foo { my @day = [1 ... 31]; token day { @day }; token TOP { <day> }; }; say Foo.parse("4")
15:56 camelia rakudo-moar ca7d04839: OUTPUT: «「4」␤ day => 「4」␤»
15:57 geekosaur or
15:57 poohman ja
15:57 geekosaur m: grammar Foo { token day { <{ [ 1 ... 31 ] }> }; token TOP { <day> }; }; say Foo.parse("30")
15:57 camelia rakudo-moar ca7d04839: OUTPUT: «「30」␤ day => 「30」␤»
15:57 geekosaur where the <{ ... }> construct lets you specify an arbitrary perl 6 expression
15:57 noganex joined #perl6
15:58 poohman nice - thanks
15:58 faraco joined #perl6
16:01 noganex_ joined #perl6
16:01 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: https://github.com/perl6/ecosystem/commit/1a2d8287fe
16:03 noganex__ joined #perl6
16:03 faraco Ehh, nevermind. I just found.
16:03 mcmillhj joined #perl6
16:09 troys joined #perl6
16:10 rindolf joined #perl6
16:12 pmurias joined #perl6
16:14 xinming joined #perl6
16:15 mcmillhj joined #perl6
16:22 wamba joined #perl6
16:22 moritz there's mi6 and ddt
16:22 moritz if I remember correctly
16:26 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 poohman ?
16:27 poohman token frame {\s*<top_left>\s*\v\s*<date_or_time>\s*\v+'</TD>'\v+<top_left>\v+}
16:27 mcmillhj joined #perl6
16:28 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 poohman https://paste.gnome.org/pjsggk9z5
16:29 timotimo it doesn't show date_or_time because it has no reason to even call it; top_left already failed
16:30 poohman https://paste.gnome.org/p0lbfwesv
16:30 poohman here top_left passed
16:30 timotimo OK, but it didn't reach date_or_time, so probably so \v in between the two?
16:31 timotimo probably no \v in between i mean
16:31 timotimo or more than one
16:31 poohman token frame {\s*<top_left>\s*\v\s*<date_or_time>\s*\v+'</TD>'\v+<top_left>\v+}
16:31 geekosaur poohman, the point here is  nothing is special about top_left or number of tokens or whatever
16:32 geekosaur if it fails at some point,m the rest of the token it's working on doesn't show
16:32 geekosaur so if it doesnt mention date_or_time then *it failed parse before that*
16:32 poohman ah ok
16:33 poohman Can multiple lines be matched using \n or \v ??
16:33 poohman because it seems to take each line separately
16:35 geekosaur "\v matches a single vertical whitespace character"
16:35 timotimo \v will only match a single character of vertical whitespace
16:35 geekosaur and \n matches exactly one notional newline (which here looks like \r\n)
16:36 poohman ok - I did use \v* when there were multiple lines
16:36 poohman but let me have a look
16:36 geekosaur you might mean \v+ instead (is 0 newlines valid?)
16:36 mcmillhj joined #perl6
16:37 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 geekosaur it doesn;t do magic newline, like \n does, at least according tot he docs
16:38 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
16:39 geekosaur 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:40 geekosaur 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:41 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
16:41 geekosaur end of lines 13 and 15 in your paste
16:41 poohman no I saw that there
16:41 poohman but in the response I meant
16:41 geekosaur so why do you think that's not related?
16:42 geekosaur 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
16:42 poohman ah ok
16:43 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 geekosaur (some are not)
16:43 poohman https://paste.gnome.org/ptommlcbx
16:43 poohman that is what I saw
16:43 poohman and so wrote the grammar for it
16:43 geekosaur right, the \r\n is in here just a "new line" and sends you to line 2
16:44 geekosaur you can;t precisely trust what you see in an editor or etc.; what goes over the wire may be different
16:45 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)
16:45 geekosaur and the receiver will convert as necessary to local newline format
16:45 poohman ok
16:46 [Coke] I often use "vi -b" for quick double checks on that sort of thing.
16:46 poohman let me check with vim
16:47 geekosaur I have been known to captire to a file and LANG=C od -c (or hexdump if it's installed)
16:47 geekosaur the LANG=C keeps the program from being too clever about unicode sequences and such
16:47 geekosaur which can obscure the actual content
16:49 mcmillhj joined #perl6
16:50 poohman vim -b gives ^M for \r\n
16:51 araujo joined #perl6
16:52 geekosaur rigjhtm shows the ^M as a normal char and then goes to the next line on \n
16:52 geekosaur typical for unix
16:52 geekosaur there's likely a mode to switch it to windows line mode, in which case the ^M would no longer show
16:53 geekosaur (or with ":set list" it would show ^M$ where the $ means it saw a unix newline or \n)
16:53 geekosaur vim should collor both specially to distinguish from normal file content
16:53 geekosaur *color both
16:54 araujo joined #perl6
16:55 poohman ok
16:56 poohman_ joined #perl6
16:57 poohman_ but the Grammar::Debugger showed - ill look more closely at the Debuggers output
16:57 poohman_ thanks a lot geekoaur
16:57 poohman_ geekosaur
16:58 poohman_ :wq
16:58 poohman_ sorry
16:58 mcmillhj joined #perl6
16:59 geekosaur it failed frame at \v, then went on to not_comp and matched the whole line
16:59 geekosaur I think you haad a paste with the actual grammar in it? not seeing it in scrollback for some reason
16:59 geekosaur oh, found it
17:00 poohman https://paste.gnome.org/pjsggk9z5
17:00 geekosaur right, so frame failed and record tried not_comp which ate the whole line (\V*\v)
17:00 poohman no that one
17:00 geekosaur huh?
17:01 poohman i had pasted the wrong link
17:01 raschipi dos2unix -i can show what the newlines look like.
17:01 poohman https://paste.gnome.org/p4hxwflkz
17:02 poohman 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
17:02 geekosaur so now the parse fails trying to parse the record start again, from the wrong place
17:02 geekosaur you probably want to reconsider how the parser works if you need it to be smarter about resynching
17:04 perlpilot poohman: you might want to consider getting http://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 perlpilot (it won't help immediately, but it will help if you intend on doing grammars and such in the future)
17:05 poohman didnt know this was out already
17:05 poohman have the think perl 6 one
17:05 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
17:06 geekosaur 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:07 geekosaur 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 mcmillhj joined #perl6
17:07 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 geekosaur you commented out the old frame and made a new one
17:08 poohman hmm I was searching for grammars considering multiple lines - more idiomatic you know - not a lot of examples
17:09 poohman started of "top down" - but with the debugger it is easier "bottom up" so made some changes
17:10 poohman its almost the same code - except for the addition of \r i guess
17:10 poohman i mean from wat I pasted earlier
17:11 setty1 joined #perl6
17:11 perlpilot poohman: Your time token won't match like you want.
17:11 poohman ill follow ur advise and try \r\n
17:12 poohman \r\v work
17:12 geekosaur yes because it matches the ^J only
17:12 geekosaur the point is \v will match \r OR \n but not the combination \r\n
17:13 poohman havent got so far perlpilot
17:13 geekosaur it weill also match \f, \v character (vertical tab), and some other things you likely do not intend
17:13 geekosaur I would not use \v unless I knew those were also valid characters in context
17:13 poohman ok
17:13 geekosaur don't try to treat it as a smart newline, in other words
17:14 poohman i wrote a grammar for some pdf text 6 months back and remember using a lot of \v
17:14 poohman so the habit
17:14 poohman will break it
17:17 poohman let me look at the code again perlpilot - for the time token
17:18 poohman oh ja geekosaur did point out the coorect use of <{ ... }>
17:19 poohman forgot it for the time token
17:20 poohman {<{[0 ... 23].fmt('%02d')}>}
17:20 poohman will that work??
17:21 mcmillhj joined #perl6
17:21 ctilmes joined #perl6
17:21 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:22 geekosaur m: say [0 ... 23]».fmt('%02d')
17:22 camelia rakudo-moar ca7d04839: OUTPUT: «[00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23]␤»
17:22 ctilmes In https://docs.perl6.org/language/control#LABELs "while, until, and for loops can all take a label" should that also include "loop" itself?
17:22 geekosaur notice the hyper operator so it appliies the .fmt to the things inside the list instead of the list itself
17:22 perlpilot m: say [0 .. 23].fmt('%02d');
17:22 camelia rakudo-moar ca7d04839: OUTPUT: «00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23␤»
17:23 perlpilot m: dd [0 .. 23].fmt('%02d');   # probably more instructive
17:23 camelia rakudo-moar ca7d04839: OUTPUT: «"00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23"␤»
17:23 * perlpilot lunch &
17:24 poohman m: [0 ..23]>>.fmt('%02d')
17:24 camelia rakudo-moar ca7d04839: ( no output )
17:24 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)
17:24 timotimo no need for the hyper operator here
17:24 geekosaur oh, whoops
17:26 poohman how do you even type the hyperoperator?
17:26 mson joined #perl6
17:28 moritz AltGr+x / AltGr+y on my keyboard
17:28 moritz https://docs.perl6.org/language/unicode_entry
17:28 ilmari or compose > > / compose < <
17:28 geekosaur note that you can also use the long form which si just >>
17:28 geekosaur rather than the fancy unicode
17:28 ilmari altgr-z / altgr-x here
17:30 moritz yeah, the German keyboard has y and z swapped
17:31 ilmari which one is it that has q and a swapped? french?
17:31 ilmari and w and z
17:31 ilmari azerty
17:31 lizmat joined #perl6
17:36 Cabanossi joined #perl6
17:36 philomath joined #perl6
17:39 poohman ok - people thanks for all the help - next to sleep - later bye
17:40 Ven joined #perl6
17:44 azawawi joined #perl6
17:44 azawawi hi
17:50 wander joined #perl6
17:55 domidumont joined #perl6
17:56 shlomif joined #perl6
17:59 * azawawi hears a faint echo in the distance
18:01 teatime You are in a maze of twisty little array containers, all alike.
18:02 teatime A hollow voice says, 'tmtowtdi'.
18:04 Geth ¦ doc: fb139205f6 | (Jan-Olof Hendig)++ | doc/Type/IO/Handle.pod6
18:04 synopsebot Link: https://doc.perl6.org/type/IO/Handle
18:04 Geth ¦ doc: Fix a couple of incorrect links
18:04 Geth ¦ doc: review: https://github.com/perl6/doc/commit/fb139205f6
18:04 * azawawi begins reading https://golang.org/ref/spec#Packages
18:08 azawawi jnthn: ping
18:19 rindolf joined #perl6
18:20 azawawi .tell jnthn regarding your .oO( Who wants to write Inline::Go? :P )  # New experimental pet project https://github.com/azawawi/perl6-inline-go (Inline::Go) :)
18:20 yoleaux azawawi: I'll pass your message to jnthn.
18:23 Geth ¦ doc: 20b9876294 | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod6
18:23 synopsebot Link: https://doc.perl6.org/type/IO/Path
18:23 Geth ¦ doc: Fixed formatting and a few incorrect links
18:23 Geth ¦ doc: review: https://github.com/perl6/doc/commit/20b9876294
18:28 poohman joined #perl6
18:34 Geth ¦ ecosystem: 7e331a01cd | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | META.list
18:34 Geth ¦ ecosystem: Add Inline::Go to ecosystem
18:34 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/7e331a01cd
18:34 wamba joined #perl6
18:38 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:45 geospeck joined #perl6
18:46 troys joined #perl6
18:46 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/11/27/2017-48-community-first/
18:47 perlpilot azawawi++ nice
18:47 timotimo lizmat: there's a ". " in front of "An effort well worth supporting!" that looks strange
18:48 timotimo lizmat: and there seems to be no link to jnthn's blog post
18:48 teatime lizmat: awesome thank you
18:50 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:51 lizmat timotimo++  # fixed and fixed
18:51 timotimo lizmat++
18:52 AlexDaniel lizmat++
18:55 timotimo AlexDaniel: what is "regex bug on custom" supposed to mean? :P
18:56 timotimo ah, it turned <ws> into "" because "oh no, html!"
18:56 travis-ci joined #perl6
18:56 travis-ci Doc build failed. Jan-Olof Hendig 'Fix a couple of incorrect links'
18:56 travis-ci https://travis-ci.org/perl6/doc/builds/308026078 https://github.com/perl6/doc/compare/8e8acb455651...fb139205f6fb
18:56 travis-ci left #perl6
18:56 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
18:57 azawawi perlpilot: thanks
18:57 AlexDaniel timotimo:
18:58 robertle anyone knows what happened to 6.d ??
18:58 timotimo i wonder if the doc builds should set RAKUDO_POD6_TABLE_DEBUG?
18:58 AlexDaniel timotimo: at first I thought it's about the changelog… the gist I can at least edit :)
18:58 timotimo :)
18:59 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 AlexDaniel robertle: there's 6.d-prep repo with some notes: https://github.com/perl6/6.d-prep
19:00 AlexDaniel robertle: we will get there sooner or later (hopefully sooner)
19:01 travis-ci joined #perl6
19:01 travis-ci Doc build failed. Jan-Olof Hendig 'Fixed formatting and a few incorrect links'
19:01 travis-ci https://travis-ci.org/perl6/doc/builds/308035069 https://github.com/perl6/doc/compare/fb139205f6fb...20b98762945b
19:01 travis-ci left #perl6
19:01 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
19:07 El_Che lizmat: " it was an excellent event with a lot of high quality Rakudo Perl 6 and Pumpking Perl 5 talks"
19:07 El_Che lizmat: Pumpking Perl? Is it official -ish?
19:08 moritz DrForr: re http://theperlfisher.blogspot.de/2017/11/test-all-things.html I'd go so far as to put the sub roundtrip into the subtest
19:14 comborico1611 joined #perl6
19:15 BrianOn99 joined #perl6
19:18 AlexDaniel El_Che: well, that's the way all p6weeklies are written
19:19 autark joined #perl6
19:19 El_Che AlexDaniel: ok, I didn't noticed it before
19:36 Cabanossi joined #perl6
19:39 TEttinger joined #perl6
19:41 geospeck joined #perl6
20:00 kyan joined #perl6
20:12 comborico1611 joined #perl6
20:17 AlexDani` joined #perl6
20:18 AlexDani` squashable6: next
20:18 squashable6 AlexDani`, ⚠🍕 Next SQUASHathon in 3 days and ≈13 hours (2017-12-02 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
20:22 bisectable6 joined #perl6
20:28 AlexDaniel joined #perl6
20:30 jnthn azawawi: Interesting. :)
20:30 jnthn I can't actually remember why I was asking though ;-)
20:31 eliasr joined #perl6
20:31 azawawi jnthn: https://irclog.perlgeek.de/perl6/2015-11-28#i_11617570 :)
20:33 jnthn That was 2 years ago :)
20:33 jnthn No wonder I didn't remember :P
20:34 teatime The internet never forgets.
20:35 cdg joined #perl6
20:35 azawawi :)
20:36 Cabanossi joined #perl6
20:36 cdg_ joined #perl6
20:37 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:40 azawawi https://golang.org/ref/spec#Semicolons # Interesting
20:41 DrForr .tell lizmat http://theperlfisher.blogspot.cz/2017/11/test-all-things.html I think the link got missed in the P6W.
20:41 yoleaux DrForr: I'll pass your message to lizmat.
20:42 Geth ¦ doc: 95987c52b9 | (Jan-Olof Hendig)++ | doc/Type/IO/Socket.pod6
20:42 synopsebot Link: https://doc.perl6.org/type/IO/Socket
20:42 Geth ¦ doc: Added docs for get method. jnthn++
20:42 Geth ¦ doc: review: https://github.com/perl6/doc/commit/95987c52b9
20:47 cdg joined #perl6
20:49 Geth ¦ doc: b27634082f | (Jan-Olof Hendig)++ | doc/Type/IO/Socket.pod6
20:49 Geth ¦ doc: Fixed copy paste error
20:49 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b27634082f
20:49 bisectable6 joined #perl6
21:00 _28_ria joined #perl6
21:03 travis-ci joined #perl6
21:03 travis-ci Doc build failed. Jan-Olof Hendig 'Added docs for get method. jnthn++'
21:03 travis-ci https://travis-ci.org/perl6/doc/builds/308096853 https://github.com/perl6/doc/compare/20b98762945b...95987c52b991
21:03 travis-ci left #perl6
21:03 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
21:04 _28_ria joined #perl6
21:07 Geth ¦ ecosystem: ab30e38701 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
21:07 Geth ¦ ecosystem: Add Acme::Advent::Highlighter to eco
21:07 Geth ¦ ecosystem:
21:07 Geth ¦ ecosystem: Preprocessor for Perl 6 Advent Articles, with syntax highlighter. Saves the
21:07 Geth ¦ ecosystem: trouble of not having to deal with broken escapes in code blocks in Wordpress
21:07 Geth ¦ ecosystem: and provides syntax-highlights, as a cherry on top:
21:07 Geth ¦ ecosystem:
21:07 Geth ¦ ecosystem: https://github.com/zoffixznet/perl6-Acme-Advent-Highlighter
21:07 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/ab30e38701
21:07 travis-ci joined #perl6
21:07 travis-ci Doc build failed. Jan-Olof Hendig 'Fixed copy paste error'
21:07 travis-ci https://travis-ci.org/perl6/doc/builds/308100047 https://github.com/perl6/doc/compare/95987c52b991...b27634082ffd
21:07 travis-ci left #perl6
21:07 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
21:09 Geth ¦ mu: ac36b2d8af | (Zoffix Znet)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
21:09 Geth ¦ mu: Mention existence of Acme::Advent::Highlighter
21:09 Geth ¦ mu: review: https://github.com/perl6/mu/commit/ac36b2d8af
21:16 cdg joined #perl6
21:20 * azawawi is feeding Go EBNF grammar into Perl6 grammars... simply brilliant (little modifications)
21:23 AlexDaniel o_o
21:27 aindilis joined #perl6
21:31 cdg joined #perl6
21:40 Pankaj joined #perl6
21:40 kitsunenokenja joined #perl6
21:41 Pankaj Hi, Can anyone help me with Perl Data Language like features in Perl6
21:47 kyan joined #perl6
21:48 moritz Pankaj: if you ask a specific question, maybe somebody can help
21:49 espadrine joined #perl6
21:51 Pankaj @moritz - How can I read an image file in Perl6 (like we do it in PDL)?
21:59 cdg joined #perl6
22:01 autark` joined #perl6
22:02 cdg joined #perl6
22:06 Cabanossi joined #perl6
22:08 cdg_ joined #perl6
22:13 committable6 joined #perl6
22:13 greppable6 joined #perl6
22:23 raschipi joined #perl6
22:42 konsolebox joined #perl6
22:50 kitsunenokenja joined #perl6
22:52 mson joined #perl6
23:06 Cabanossi joined #perl6
23:07 yon joined #perl6
23:08 yon hello!
23:08 yon Is anyone there?
23:09 raschipi went away, didn't even wait a minute.
23:10 autark` joined #perl6
23:11 geekosaur instant gratification is alive and well and living on the internet
23:11 azawawi :)
23:13 azawawi how do you workaround a null regex (e.g. 'rule EmptyStmt { }') ?
23:13 AlexDaniel .tell yon “Is anyone there?” Yes.
23:13 yoleaux AlexDaniel: I'll pass your message to yon.
23:13 AlexDaniel :)
23:14 geekosaur um. "workaround"?
23:14 azawawi kinda sleepy :)
23:14 geekosaur that makes at least two of is. (have had about 3 hours of sleep in the past 48 hours, sigh)
23:15 AlexDaniel azawawi: what a wonderful question :D
23:15 AlexDaniel There has to be a simple answer
23:15 azawawi 42? :)
23:16 jnthn <?>
23:16 jnthn ''
23:16 azawawi thanks
23:17 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 #perl6
23:25 kitsunenokenja joined #perl6
23:26 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:27 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
23:27 geekosaur I'm kinda unfond of welcomebots
23:27 geekosaur there are times when they can be appropriate, but I think we strive for a higher standard here
23:27 timotimo but #krita has a different target audience
23:28 teatime I like the way b2gills describes it though
23:29 teatime I like conservative, quieter bots
23:36 llfourn joined #perl6
23:36 Cabanossi joined #perl6
23:40 _28_ria joined #perl6
23:43 azawawi https://github.com/azawawi/perl6-inline-go/blob/master/lib/Inline/Go/Grammar.pm6  # so far... will continue working on it tomorrow hopefully. thanks :)
23:45 azawawi good night &
23:45 john51 joined #perl6
23:48 tangible6 joined #perl6
23:52 mcmillhj joined #perl6
23:53 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 _28_ria joined #perl6
23:56 pilne joined #perl6
23:57 simcop2387 p6: say 3
23:57 camelia rakudo-moar 1668b4f0b: OUTPUT: «3␤»

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo