Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-09-08

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:00 rjt_pl joined #perl6
00:22 labster joined #perl6
00:22 BenGoldberg joined #perl6
00:36 yadongz joined #perl6
00:40 zacts joined #perl6
00:50 BenGoldberg m: my uint32 $i = -1; say $i
00:50 camelia rakudo-moar a62207: OUTPUT«4294967295␤»
00:50 BenGoldberg m: my uint64 $i = -1; say $i
00:50 camelia rakudo-moar a62207: OUTPUT«-1␤»
00:51 BenGoldberg m: my uint128 $i = -1; say $i
00:51 camelia rakudo-moar a62207: OUTPUT«5===SORRY!5===␤Type 'uint128' is not declared. Did you mean any of these?␤    uint32␤    uint16␤    uint8␤␤at <tmp>:1␤------> 3my uint1287⏏5 $i = -1; say $i␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 uint128 $i = -1; say $i…»
00:52 bob777 joined #perl6
00:53 pierre_ joined #perl6
00:55 BenGoldberg m: my uint32 $x = -1; say( $x +< 3 );
00:55 camelia rakudo-moar a62207: OUTPUT«34359738360␤»
00:55 BenGoldberg m: my uint $x = -1; say( $x +< 3 );
00:55 camelia rakudo-moar a62207: OUTPUT«-8␤»
00:55 BenGoldberg m: my uint64 $x = -1; say( $x +< 3 );
00:55 camelia rakudo-moar a62207: OUTPUT«-8␤»
00:55 BenGoldberg m: my uint $x = -1; say( $x +> 3 );
00:55 camelia rakudo-moar a62207: OUTPUT«-1␤»
00:56 BenGoldberg m: my uint64 $x = -1; say( $x +> 3 );
00:56 camelia rakudo-moar a62207: OUTPUT«-1␤»
00:56 BenGoldberg m: my uint32 $x = -1; say( $x +> 3 );
00:56 camelia rakudo-moar a62207: OUTPUT«536870911␤»
01:03 benchable6 joined #perl6
01:07 benchable6 joined #perl6
01:10 danlei` joined #perl6
01:12 benchable6 joined #perl6
01:14 benchable6 joined #perl6
01:16 benchable6 joined #perl6
01:17 zacts joined #perl6
01:19 benchable6 joined #perl6
01:21 AlexDaniel m: class Foo { method gist { say ‘what?’ } }; say Foo.WHAT
01:21 camelia rakudo-moar a62207: OUTPUT«what?␤This type cannot unbox to a native string: P6opaque, Bool␤  in block <unit> at <tmp> line 1␤␤»
01:21 AlexDaniel why is .gist being called? What does it have to do with WHAT?
01:25 Actualeyes joined #perl6
01:31 zacts joined #perl6
01:31 yadongz joined #perl6
01:32 sammers_ m: class Foo { method gist { 'what?' } }; say Foo.WHAT
01:32 camelia rakudo-moar a62207: OUTPUT«what?␤»
01:33 sammers_ m: class Foo { method gist { 'what?' } }; say Foo.gist
01:33 camelia rakudo-moar a62207: OUTPUT«what?␤»
01:34 sammers_ m: class Foo { method WHAT { 'what?' } }; say Foo.WHAT
01:34 camelia rakudo-moar a62207: OUTPUT«(Foo)␤»
01:35 sammers_ m: class Foo { method WHAT { 'what?' } }; say Foo.gist
01:35 camelia rakudo-moar a62207: OUTPUT«(Foo)␤»
01:35 sammers_ m: class Foo { method not-gist { 'what?' } }; say Foo.gist
01:35 camelia rakudo-moar a62207: OUTPUT«(Foo)␤»
01:35 sammers_ hmm
01:36 sammers_ m: class Foo { method gist { .WHAT } }; say Foo.gist
01:36 camelia rakudo-moar a62207: OUTPUT«(Any)␤»
01:36 sammers_ m: class Foo { method gist { Foo.WHAT } }; say Foo.gist
01:36 camelia rakudo-moar a62207: OUTPUT«Cannot unbox a type object␤  in block <unit> at <tmp> line 1␤␤»
01:36 sammers_ m: class Foo { method gist { Foo.WHAT } }; say Foo.WHAT
01:36 camelia rakudo-moar a62207: OUTPUT«Cannot unbox a type object␤  in block <unit> at <tmp> line 1␤␤»
01:36 sammers_ m: class Foo { method gist { .WHAT } }; say Foo.WHAT
01:36 camelia rakudo-moar a62207: OUTPUT«Cannot unbox a type object␤  in block <unit> at <tmp> line 1␤␤»
01:37 sammers_ m: class Foo { method gist { 'what?' } }; say Foo.WHAT
01:37 camelia rakudo-moar a62207: OUTPUT«what?␤»
01:39 BenGoldberg m: say IterationEnd == IterationEnd;
01:40 camelia rakudo-moar a62207: OUTPUT«Cannot resolve caller infix:<==>(); none of these signatures match:␤    ($?)␤    (\a, \b)␤    (Real \a, Real \b)␤    (Int:D \a, Int:D \b)␤    (int $a, int $b)␤    (Num:D \a, Num:D \b --> Bool)␤    (num $a, num $b --> Bool)␤    (Rational:D \…»
01:40 BenGoldberg m: say IterationEnd === IterationEnd;
01:40 camelia rakudo-moar a62207: OUTPUT«Cannot resolve caller infix:<===>(); none of these signatures match:␤    ($?)␤    (\a, \b)␤    (Int:D \a, Int:D \b)␤    (int $a, int $b)␤    (Num:D \a, Num:D \b)␤    (Num $ where { ... }, Num $ where { ... })␤    (num $a, num $b --> Bool)␤ …»
01:41 BenGoldberg Why doesn't (\a, \b) match?
01:41 pierre_ joined #perl6
01:47 ilbot3 joined #perl6
01:47 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!
01:48 sammers_ m: say IterationEnd =:= IterationEnd;
01:48 camelia rakudo-moar a62207: OUTPUT«True␤»
01:51 zacts joined #perl6
01:52 pierre_ joined #perl6
01:52 Xliff joined #perl6
01:53 sammers_ BenGoldberg use =:=
01:53 BenGoldberg Thanks.
01:53 sammers_ according to the docs "The only valid use of the sentinel value IterationEnd in a program is identity comparison (using =:=) with the result of a method in the iterator API. Any other behavior is undefined and implementation dependent."
01:53 sammers_ https://docs.perl6.org/type/Iterator
01:53 sammers_ np
01:55 BenGoldberg My eyes skipped over that part ;)  I knew pull-one returned IterationEnd, but the docs for that constant were above the top of the screen.
02:00 Xliff Anyone around who wouldn't mind taking a look at some code for me?
02:00 AlexDaniel Xliff: maybe? What code?
02:00 Xliff https://github.com/Xliff/p6-color-names/blob/master/lib/Color/Names.pm#L41
02:00 Xliff Still stuck with this weird error.
02:01 Xliff If I run the project from the root I get this:
02:01 Xliff perl6 --stagestats -Ilib -e 'use Color::Names; dd lists_available; dd lists_loaded; dd color("red"); dd color("blue", :obj)'
02:01 Xliff Stage start      :   0.000
02:01 Xliff Stage parse      : ===SORRY!===
02:01 Xliff Cannot find method 'merge-symbols': no method cache and no .^find_method
02:01 Xliff If I comment out the requires in sub EXPORT(), that goes away, but then the code doesn't work properly.
02:03 Xliff Been stuck on that bit for the last week.
02:03 Xliff Haven't been able to find a workaround, yet.
02:05 TEttinger joined #perl6
02:06 kyclark_ joined #perl6
02:10 MasterDuke "We make the assumption that the invocant's meta-object's type is composed." is a comment right above the code block in MVM_6model_find_method() in src/6model/6model.c in MoarVM
02:11 MasterDuke is there a meta-object you could ensure is composed?
02:27 BenGoldberg s: Failure, 'handled'
02:27 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/a62207e/src/core/Failure.pm#L56
02:28 AlexDaniel Xliff: no idea!
02:31 noganex_ joined #perl6
02:34 canopus joined #perl6
02:58 kyclark_ joined #perl6
02:59 cibs joined #perl6
03:07 rgrinberg joined #perl6
03:12 zacts joined #perl6
03:12 Xliff AlexDaniel
03:12 Xliff I know right!!?
03:12 Xliff I just don't get what the problem is.
03:13 Xliff Rakudobug?
03:21 stux|RC-only joined #perl6
03:24 pierre_ joined #perl6
03:32 bob777 joined #perl6
03:36 wamba joined #perl6
03:50 zengargoyle joined #perl6
03:56 geekosaur joined #perl6
03:59 geekosaur joined #perl6
04:03 _28_ria joined #perl6
04:05 _28_ria joined #perl6
04:06 grondilu .tell Xliff I got discouraged, especially since I've seen people have already done it.  I will come back to it but not in short term.
04:06 yoleaux grondilu: I'll pass your message to Xliff.
04:08 _28_ria joined #perl6
04:10 Cabanossi joined #perl6
04:14 yadongz joined #perl6
04:16 mr-foobar joined #perl6
04:28 pierre_ joined #perl6
04:38 pierre_ joined #perl6
04:49 _28_ria joined #perl6
04:53 _28_ria joined #perl6
04:55 pierre_ joined #perl6
04:56 _28_ria joined #perl6
05:02 skids joined #perl6
05:06 _28_ria joined #perl6
05:09 _28_ria joined #perl6
05:12 Actualeyes joined #perl6
05:14 _28_ria joined #perl6
05:16 _28_ria joined #perl6
05:19 _28_ria joined #perl6
05:19 yadongz joined #perl6
05:23 Xliff .tell grondilu :( -- What were you going to do it in? WebGL?
05:23 yoleaux 04:06Z <grondilu> Xliff: I got discouraged, especially since I've seen people have already done it.  I will come back to it but not in short term.
05:23 yoleaux Xliff: I'll pass your message to grondilu.
05:36 stux|RC-only joined #perl6
05:37 nadim joined #perl6
05:41 pierre_ joined #perl6
05:42 stux|RC-only joined #perl6
05:47 grondilu Xliff: yeah, WebGL.  With part of the code generated by Perl 6.
05:48 yoleaux 05:23Z <Xliff> grondilu: :( -- What were you going to do it in? WebGL?
05:50 Actualeyes joined #perl6
05:50 grondilu I'll still do it, at least because I want to improve my knowledge in WebGL.  But it's not a priority for me anymore.
05:58 CIAvash joined #perl6
05:59 Xliff kkl
05:59 Xliff Well, if you want grunt work done, I don't mind lending a hand.
06:00 Xliff I have done nothing in WebGL. Sounds like fun.
06:00 Xliff (I may regret those words, later)
06:07 grondilu I guess I can make a public repo of my progress.
06:08 grondilu though it'd increase the amount of work, as I'd have to make things presentable.
06:11 Xliff Nah. I don't mind ug-lay
06:11 Xliff My code usually resembles that.
06:11 domidumont joined #perl6
06:12 grondilu in a recent HN post about quaternions, someone posted links to a Math researcher's YouTube channel about so called "rational trigonometry":
06:12 grondilu https://news.ycombinator.com/item?id=12442575
06:12 grondilu very interesting stuff.  I'm watching the series about mathematics fundation, and I find it very attractive from a computational point of view.
06:13 grondilu I mean like, weirdly enough I had no idea it is possible to parametrize a circle with rational numbers:
06:14 grondilu m(t) = [(1-t²)/(1+t²), 2t/(1+t²)]
06:14 grondilu in order to motivate me to do this WebGL thing, I'll make it interesting by trying to apply those concepts.
06:16 grondilu as I've discussed before, I'm not entirely happy with how numeric types are defined in Perl 6 so I'm always curious about new ways of implementing them, or new points of view about them.
06:17 domidumont joined #perl6
06:27 Xliff Whoa! I'm going to have to look into that parameterized circle thingy.
06:27 firstdayonthejob joined #perl6
06:27 Xliff And hey, whatever gets your engine going.
06:28 Xliff Bed time for me, so I will see you, later.
06:49 grondilu m: my $t = rand; my ($x, $y) = (1-$t²)/(1+$t²), 2*
06:49 camelia rakudo-moar a62207: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3 rand; my ($x, $y) = (1-$t²)/(1+$t²), 2*7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
06:50 grondilu m: my $t = rand; my ($x, $y) = (1-$t²)/(1+$t²), 2*$t/(1+$t²); say $x² + $y²
06:50 camelia rakudo-moar a62207: OUTPUT«1␤»
06:51 cxreg has the subject of NQP targeting WASM come up?
06:52 grondilu It did.  IIRC the conclusion is that it's way too premature to envision seriously.
06:52 CIAvash cxreg: http://irclog.perlgeek.de/perl6/2016-04-15#i_12342210
06:53 grondilu I'm guessing we should at least wait for pmurias to finish his JS port.
06:54 grondilu I onced asked how ludicrous it would be to compile MoarVM on asm.js
06:56 Glitchy Try it!
07:01 RabidGravy joined #perl6
07:02 grondilu it's easier said than done.
07:04 labster joined #perl6
07:06 pierre_ joined #perl6
07:14 darutoko joined #perl6
07:14 cxreg heh.
07:16 cxreg v8 5.1 has native wasm now (this is what's in node.js 6.5)
07:16 cxreg but I'll trust pmurias++
07:18 Upasaka joined #perl6
07:21 Glitchy What editor does everyone here use to write p6 code?
07:21 Glitchy Just wondering if any have semantic support
07:22 * moritz uses (g)vim, which has syntax hilighting
07:22 * Glitchy has syntax highlighting (emacs), just wondering if anything has more support than that (like semantic understanding)
07:25 * grondilu uses Vim.  Been wondering if he should follow Damian Conway's example who does NOT use syntax highlighting.
07:29 lizmat moritz: re search being stuck, is there something I can do?
07:31 yadongz joined #perl6
07:33 moritz lizmat: nagging me helps :-)
07:34 moritz lizmat: should be updated now
07:34 lizmat whee!
07:37 zacts joined #perl6
07:37 El_Che Glitchy: https://nxadm.wordpress.com/2016/08/21/vim-as-a-perl-6-editor/
07:39 El_Che Glitchy: https://github.com/nxadm/syntastic-perl6 <- error checking. I have several updates for it, but I haven't had the time to add it. But it should catch most of the error. Need to look at lizmat's JSON error-format, but that will only work on newer rakudos of  course
07:40 Glitchy El_Che: Thanks
07:40 pierre_ joined #perl6
07:40 Glitchy I think this is more what I'm looking for, on-the-fly error checking.
07:40 El_Che Glitchy: it checks at save time (:w)
07:41 El_Che it show you the line and column with the error, the error text at the bottom and if perl6 error output allows it, it highlight the error part
07:41 El_Che that pretty much how error checking works on vim
07:42 leont_ joined #perl6
07:42 Glitchy El_Che: Wonder if I can pull the logic from this and port to emacs :)
07:42 El_Che I have been looking at the intellij plugin to see if it can be adapted for perl 6, but it's a higher learning curve than vimscript
07:42 El_Che Glitchy: sure you can
07:42 CIAvash Glitchy: there is a flycheck-perl6 package for Emacs https://github.com/hinrik/flycheck-perl6
07:43 pierre_ joined #perl6
07:43 Glitchy CIAvash: Ah, this is what I want. :)
07:43 El_Che If lizmat's new format works ok, it may be even worth it to drop this regex error parser and bump the minimal rakudo version
07:45 El_Che as a non-emacs user I think emacs is a lot easier for writing plugin
07:45 El_Che s
07:45 Glitchy emacs is very easy for writing plugins
07:46 Glitchy If you know cl or clozure it's very similar
07:47 shantanu m:say "See you tomorrow folks!";
07:48 masak Glitchy: biggest difference I guess is the dynamic scoping.
07:48 El_Che Glitchy: I should pop up some new fingers and learn emacs :)
07:49 Glitchy masak: Actually there is no difference because you can (require 'cl) ;)
07:49 masak that is more than I knew :)
07:49 El_Che I wonder how workable emacs is for non qwerty layouts
07:49 masak however, that still sounds opt-in, and a whole lot of Elisp code out there runs with dynamic scoping
07:49 El_Che I gave up on using qwerty on an azerty country
07:49 Glitchy El_Che: Very, but you'll want to rebind keys
07:50 El_Che you'll always end up with an azerty in front of you
07:50 Glitchy I've used emacs with dvorak
07:50 masak where does azerty "come from" -- surely it must be a tweak on qwerty? what led to it?
07:51 dakkar joined #perl6
07:51 El_Che better for accents
07:51 masak ooh
07:52 El_Che it has the frenc ç, é, à on a unshifted spot
07:52 El_Che ù
07:52 * grondilu is French and confirms
07:52 masak blog post idea: a keyboard layout that's perfect for Perl 6 development :)
07:52 El_Che accetns are letter + ´ (which is alt gr ù ) <-- easier to type than it sounds
07:53 El_Che grondilu: I am using the Belgian variant though
07:53 wamba joined #perl6
07:53 El_Che one azerty is not enough!
07:53 El_Che :)
07:56 El_Che masak: you need to write perl6 code in word. It will replace all your big texas operators on they fly with their sign variant (in comic sans!)
07:57 Actualeyes joined #perl6
07:57 bjz joined #perl6
08:00 masak El_Che: hey, that's another blog post idea.
08:00 masak (screenshots or it didn't happen)
08:01 leont_ masak: a .xcompose optimized for perl6 would be useful
08:01 masak right. and I think as a reader I'd enjoy just reading a post about someone who thought about this for a bit.
08:02 El_Che masak: you can show off all the exotic quotes (depending on the language of the doc, word changes the quotes)
08:04 * leont_ might make one, is there any overview of all unicode operators?
08:04 zakharyas joined #perl6
08:06 ufobat DrForr, thanks for the PR :)
08:06 jonas3 joined #perl6
08:08 DrForr No worries. I may have a few others lined up.
08:12 wamba joined #perl6
08:14 DrForr Am I right in thinking you're trying to build a transition from Dancer2 - Perl6?
08:16 geekosaur leont_, https://docs.perl6.org/language/unicode_texas
08:19 ufobat DrForr, well.. no, i don't know, if so i would just translate class by class of dancer2. I think Bailador started as a proof of concept with the idea "lets do it like dancer"
08:19 leont_ geekosaur: thanks
08:19 leont_ Finding intuitive bindings for many of them is hard though
08:21 DrForr ufobat: yeah, the major difference I'm seeing is that the route "strings" are defaulting to regular expressions, and I have quite a few routes that use '-' in them.
08:22 ufobat DrForr, it was tadziks project. I would be happy as long as it improves. :-) But I think that not having a finished p6w draft and no p6w compliant http-servers things are not so easy. for example i didn't manage to get a picture upload working yet
08:23 ufobat DrForr, i would specify the route as a regex right not as a string, so you skip this part: https://github.com/ufobat/Bailador/blob/master/lib/Bailador/Route.pm#L80
08:24 leont_ And my browser can't render 「」 apparently :-/
08:26 ufobat DrForr, i think the prototypes of the constructors allow a regex instead of a string, and it should work fine then... of course it's looking a bit strange if you have regexes as routes
08:27 ufobat DrForr, comparing dancer with bailador i also think that this nested route thing workes completly differnet https://github.com/ufobat/Bailador#web-applications-via-inheriting-from-bailadorapp
08:28 bjz joined #perl6
08:30 DrForr Yeah, there are quite a few differences; that's mostly why I was asking.
08:31 leont__ joined #perl6
08:33 ufobat i am open for suggestions and pull requests, also if they are not dancer2ish  :-)
08:34 DrForr Well, I have a different interface in Prancer, I was thinking about turning it into a replacement routing module.
08:34 rudolfochrist joined #perl6
08:36 ufobat sounds interesting :)
08:37 DrForr https://github.com/drforr/perl6-App-prancer # The README should give you an idea.
08:39 ufobat yeah i've read it before, i was already courious about your module
08:43 DrForr The hard work's been done; I just need to think about how to integrate it.
08:44 ufobat like making the routing engine pluggable, with a certain default if you dont specify it?
08:45 DrForr Something like that. I hadn't thought too much beyond looking briefly at the routing class.
08:48 nadim Morning P6, sunshine and birds songs on everyone.
08:50 telex joined #perl6
08:59 pierre_ joined #perl6
09:01 DrForr Likeweise.
09:01 DrForr *wise
09:02 Actualeyes joined #perl6
09:08 moritz ain't no sunshine when #perl6's gone
09:17 pierre_ joined #perl6
09:22 pierre_ joined #perl6
09:24 luiz_lha joined #perl6
09:33 araujo joined #perl6
09:35 araujo joined #perl6
09:37 araujo joined #perl6
09:41 edehont joined #perl6
09:43 llfourn m: subset FooInt of Int:D where * > 5; multi foo(Int:D){ "Int" }; multi foo(FooInt) { "FooInt" }; say foo(5) # seems like bug
09:43 camelia rakudo-moar 7925d6: OUTPUT«Int␤»
09:44 llfourn FooInt should be narrower than Int:D because it is derived from Int:D
09:44 llfourn m: subset FooInt of Int:D where * > 5; multi foo(Int:D){ "Int" }; multi foo(FooInt) { "FooInt" }; say foo(6) # urgh that should be > 5
09:44 camelia rakudo-moar 7925d6: OUTPUT«FooInt␤»
09:44 llfourn ok nevermind me :S
09:48 jnthn heh :)
09:48 jnthn Was about to say, but you'd already spotted it :)
09:50 llfourn >.< I am messing around with creating signatures with nqp and Signature.new and creating multi dispatchers at runtime. And there for some reason Int:D is beating (subset :: of Int:D where * > 5).
09:50 llfourn I'm probably not setting something up right
09:52 woolfy left #perl6
10:01 cpage_ joined #perl6
10:02 eliasr joined #perl6
10:02 andreoss joined #perl6
10:28 pierre_ joined #perl6
10:40 kaare_ joined #perl6
10:49 bjz joined #perl6
10:53 rudolfochrist joined #perl6
10:58 rindolf joined #perl6
11:02 aries_liuxueyang joined #perl6
11:03 pierre_ joined #perl6
11:11 wamba joined #perl6
11:12 daxim joined #perl6
11:15 pierre_ joined #perl6
11:17 dalek doc: 261d5a2 | (Jan-Olof Hendig)++ | doc/Language/operators.pod6:
11:17 dalek doc: Fixed incorrect result and typo
11:17 dalek doc: review: https://github.com/perl6/doc/commit/261d5a21e8
11:25 travis-ci joined #perl6
11:25 travis-ci Doc build failed. Jan-Olof Hendig 'Fixed incorrect result and typo'
11:25 travis-ci https://travis-ci.org/perl6/doc/builds/158425789 https://github.com/perl6/doc/compare/9312a625a728...261d5a21e873
11:25 travis-ci left #perl6
11:30 dogbert17 grr, what's wrong this time then
11:30 dogbert17 hmm: Failed to find '/tmp/PodToBigfile-precomp/9E4FBB0982AC76B2D1374F67853661858C813AC6.1473333685.54881/4C/4CDC84469EF12631D41D43E2D89820AE3D394D0E.tmp' while trying to do '.modified'
11:31 user9 joined #perl6
11:31 dogbert17 nine, moritz heeeelp :-)
11:31 skids joined #perl6
11:46 * dogbert17 the build mechanism works in mysterious ways, despite the build failure, my changes have been applied to docs.per6.org
11:48 dalek ecosystem: 3fdbcb3 | LLFourn++ | META.list:
11:48 dalek ecosystem: Add DispatchMap to ecosystem
11:48 dalek ecosystem:
11:48 dalek ecosystem: https://github.com/LLFourn/p6-DispatchMap/blob/master/META6.json
11:48 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/3fdbcb3b3f
11:54 rudolfochrist joined #perl6
12:15 buharin exit
12:16 pierre_ joined #perl6
12:18 robertle joined #perl6
12:28 andreoss left #perl6
12:42 yadongz joined #perl6
12:47 user9 joined #perl6
12:52 mcmillhj joined #perl6
12:54 g4 joined #perl6
12:59 AlexDaniel joined #perl6
13:04 sufrostico joined #perl6
13:04 poohman_ joined #perl6
13:14 kyclark_ joined #perl6
13:16 cdg joined #perl6
13:22 kyclark_ joined #perl6
13:22 rgrinberg joined #perl6
13:25 kyclark_ joined #perl6
13:28 b2gills masak: I've thought it would be nice if I could type compose followed by a Texas operator and have it output the French equivalent.
13:28 b2gills Sort of like how Compose > > turns into »
13:31 masak yes, that makes a lot of sense
13:33 masak I was thinking there might be other wins too, though
13:34 masak something like how 「」 would be found somewhere near the ordinary ' key
13:35 masak basically, trying to find some attractive strange consistencies on the keyboard
13:36 itaipu joined #perl6
13:42 BeepBeepImAJeep joined #perl6
13:44 rjt_pl Hi. I've been away from perl6 for about three years. Is it possible to take a slice of a multidimensional array? Say I have my @array[$N:$N]; and I want to work with a column slice. I tried @array[$x:^$N] = <...>; but that gives me "Partially dimensioned views of arrays not yet implemented." Is that how it is, or have I got the syntax/idea wrong somehow?
13:45 timotimo it is actually NYI, sorry about that
13:45 rjt_pl (Er, s/:/;/g of course)
13:45 timotimo you can usually get a one-dimensional list-of-lists slice and slice the individual lists, though
13:45 timotimo i.e. .[slice-one].>>[slice-two]
13:46 rjt_pl OK, thanks timo. Helps knowing it's not me. :-) I'll go with the LoL for now then.
13:50 timotimo multi-dimensional arrays are currently also extremely slow, because they haven't had their first performance check-up yet
13:50 mspo joined #perl6
13:53 rjt_pl Good to know. For my current project at least, I can tolerate eight or ten orders of magnitude worse than well-optimized C code.
13:54 mohae joined #perl6
13:55 skids joined #perl6
13:57 Actualeyes joined #perl6
13:57 * timotimo has a hard time imagining what exactly that means
13:57 timotimo so i can't say if "cool, we'll definitely reach that" is a sensible response
13:58 [Coke] so if it takes c 10 seconds, we can take 317 years.
13:58 timotimo very good
13:59 timotimo we should be able to make that work
13:59 [Coke] :)
13:59 timotimo if only because in a year or two we'll have a rakudo that'll outperform today's rakudo by enough that you can start it over
13:59 mspo so like =~ /a*/ on aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
13:59 rjt_pl Hehe. Yes, Coke, that's it. :-)
13:59 masak mspo: that one should match pretty quickly
13:59 masak mspo: it's when you have sequences of quantifiers that you can get exponential behavior
14:00 mspo oh right
14:00 masak go-to reference: https://swtch.com/~rsc/regexp/regexp1.html
14:00 ilmari mspo: more like "/a*b/" on a long string of as with no b
14:00 masak (recommended reading for anyone who's even a little interested in regexes/grammars)
14:00 mspo so like =~ /a*a*/ on aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
14:00 mspo I forget how to actually make it happen
14:00 ilmari as that might naively restart the a* after each a
14:00 mspo ilmari: yeah that's it
14:01 masak the page I linked has an example
14:01 mspo ironically I had to fix a java version of that not too long ago for some custom OSAPI "security" checker widget thinggy
14:01 mspo the stack traces were impressive
14:02 mspo rsc has a bunch of interesting regex implementations, doesn't he?
14:02 masak I believe so.
14:02 masak he also went on to design the regexes for Golang, IIRC
14:03 mspo yeah also like, the rest of go :)
14:03 mspo implementation coding, anyway
14:04 khw joined #perl6
14:05 masak aye
14:06 masak yeah, rsc seems like a hoopy frood
14:06 mspo none of those plan9 guys were lovers of perl, it seems
14:06 mspo part of that early web/cgi haters group :)
14:07 masak Perl is not the kind of language that aims to please everyone :>
14:07 mspo but then they put bradfitz on golang too
14:07 mspo so I guess it levels out
14:08 rjt_pl But masak, I've seen so many people write such good C and Java code in Perl. Surely that counts for something? ;-)
14:08 masak far as I understand it, that's a feature
14:09 timotimo right, TIMTOWTDI covers that
14:09 rjt_pl No argument there. :-)
14:09 masak it's part of "Perl gets the job done without a lot of judging your code on the way"
14:10 acrussell joined #perl6
14:10 mspo yeah I don't get why so many other languages are so perscriptive
14:10 timotimo seems to work well for python ...
14:10 rjt_pl Oh that gives me a great idea for another ACME:: module.  'use judgement qw<condescending>;'
14:10 mspo wasn't writing code supposed to be a way to express an idea?
14:10 masak all is fair if you predeclare :P
14:11 timotimo hide your predeclarations 5 "use"s deep, if you can
14:11 mspo timotimo: there are many ways to do everything in python
14:12 mspo that whole weird marketing thing is as big a sham as everything else :)
14:13 moritz just count how many standard ways there are to format strings
14:13 mspo weirdly perl5 has grown perlcritic so code is getting more and more "idiomatic" via that linter
14:13 mspo assuming you use it :)
14:14 rjt_pl I think the "severity" adjectives say it all... qw<gentle stern harsh cruel brutal>
14:15 timotimo %)
14:15 moritz much of it is just totally "your" opinion, man
14:16 masak I can see a point of linters
14:16 mspo yeah definitely
14:16 mspo they're great
14:16 masak but some linting rules are really silly
14:16 mspo even gofmt is kind of nice
14:17 masak I went through the airbnb JS guidelines, and accepted or rejected each rule for a possible future JS project
14:17 masak think I ended up rejecting 5 or so with (what I consider to be) really good rationales
14:17 moritz mostly I want to separate code critics and linting
14:18 wamba joined #perl6
14:18 moritz code critic is about style, linting about defects
14:18 moritz they serve quite different roles, IMHO
14:18 rjt_pl Agreed
14:18 mspo both are very good things
14:18 moritz if there's a style violation that a machine can detect, it better offer to fix it as well
14:19 moritz if I'm using an API in a dangerous way, that's a whole different issue, and something I have to look into myself
14:19 masak yes, linting rules with automated fixes seem to be on the rise
14:20 mspo moritz: isn't api usage more of a static typing thing?
14:20 masak some things are, perhaps
14:20 itaipu joined #perl6
14:21 masak but until we have really good dependent types (and maybe not even then), we can't say "API usage issues are type issues"
14:22 kyclark_ joined #perl6
14:23 moritz mspo: it's more like "seems you are calling eval() with unsanitized input"
14:24 mspo moritz: that should probably show up in as many places as possible ;)
14:24 MilkmanDan joined #perl6
14:24 moritz mspo: or "sprintf is dangerous, use snprintf instead"
14:24 rjt_pl Reminds me of that MS Office paperclip... "It looks like you're trying to parse a letter. Would you like some help?"
14:25 mspo moritz: yes to all of it
14:26 mspo moritz: an explicit compile step allows a lot of this good stuff
14:26 mspo I mean, workflow-wise
14:27 moritz aye
14:27 moritz it's something you can do in your build pipeline
14:27 moritz so, first step: have a build pipeline :-)
14:28 moritz did I mention that I'm writing a book about that? https://leanpub.com/deploy
14:29 mspo isn't someone else in here a big gocd fan?
14:30 moritz dunno, if somebody is, please raise your IRC-based voice! :-)
14:31 [Coke] moritz: I was stunned that our shared services team that supports bamboo across the company is just turning it off at the end of the year. whee.
14:32 moritz [Coke]: "who uses that anyway?" :-)
14:32 moritz [Coke]: that sucks
14:32 mspo what? :)
14:32 [Coke] that was basically what they said. offered no replacement, however. and we're ... rather big. I imagine we're going to end up with 1000 different solutions, all supported badly.
14:32 mspo better get jenkins up quick
14:33 rudolfochrist joined #perl6
14:34 canopus joined #perl6
14:35 mspo or I guess gocd is free now?
14:35 mspo I will say the jenkins pipeline groovy thing kind of sucks, but mostly because the docs are so bad
14:36 kyclark_ joined #perl6
14:40 ptolemarch joined #perl6
14:42 El_Che mspo: I fear your pain. The groove pipelines are just available to us
14:43 mspo El_Che: I tried to learn a little groovy to help and then learned that I can't even use groovy code!
14:43 mspo El_Che: #jenkins said to do dev on the live editor and work from there
14:44 El_Che mspo: our Linux admins told me it's more like a DSL than groovy
14:44 kyclark_ joined #perl6
14:45 mspo El_Che: yes
14:45 mspo El_Che: I have an okay rpm-building pipeline with it now, though
14:46 mspo El_Che: makes a chroot, builds and rpm, and uploads it to our yum repo
14:47 El_Che mspo: if you're rpm knowledgable, add some distro to my rakudo pkger here:
14:47 El_Che damns
14:47 El_Che copy paste
14:47 [Coke] mspo: thanks for the gocd pointer.
14:47 El_Che aaah
14:47 El_Che combination of windows, linux, vms and vim is death to the buffer
14:47 El_Che sorry
14:48 mspo [Coke]: ?
14:48 mspo oh, gocd
14:49 mspo I had a bad-ish experience with it, but it may have been people-related
14:49 El_Che mspo: I am working on building minimalistic native packages of rakudo. Have a look here if your distro in not yet supported: https://github.com/nxadm/rakudo-pkg
14:49 eyck joined #perl6
14:49 El_Che mspo: now you revealed you're pkg-knowledgable :)
14:49 mspo El_Che: did docker become a dependency?
14:50 mspo El_Che: I'm a  pkgsrc guy in my free itme
14:50 El_Che mspo: no, de docker creates the packages
14:50 El_Che the packages have no dependencies so far
14:50 mspo oh okay
14:50 El_Che so as long you have docker you can create packages for all the distros/releases
14:52 El_Che it's a way to make sure the pkg creator doesn't have to chase dependencies or soils the system at make install
14:56 mspo El_Che: I suppose
14:56 mspo wouldn't it be easier to just make spec and deb files?
14:56 mspo or use fpm?
14:56 wamba joined #perl6
14:57 El_Che mspo: it's fpm
14:58 El_Che The docker container is just the needed development packages and the correct libraries
14:59 El_Che and docker being docker it's easier to compile 'natively' than crosscompile
15:02 mspo I don't have much background with docker
15:02 mspo been avoiding it
15:07 kurahaupo joined #perl6
15:10 El_Che mspo: really
15:10 El_Che mspo: how can you escape it? The first rule about Docker: you must talk about docker
15:10 El_Che :)
15:14 lichtkind__ joined #perl6
15:21 canopus joined #perl6
15:22 mcmillhj joined #perl6
15:27 mspo El_Che: I ask the people who push for me to use it about networking
15:27 mspo El_Che: and then the entire conversation tends to shut down pretty quickly
15:27 mspo it's weird
15:29 mspo I actually have a lot of use cases for thin-provisioned databases and stuff for dev/qa
15:29 mspo but the rest of the overhead bogs the entire effort down to backburner
15:29 mspo since making the full leap is a massive effort
15:30 mspo at least in my estimation
15:30 mspo but what do I know?  no one can answer any questions outside of "I made a web server container"
15:31 yadongz joined #perl6
15:31 mspo the most boring bit
15:34 dogbert17 o/ #perl6
15:34 dogbert17 m: my class A { has $.a; }; say A.new(a => 5) eqv A.new(a => 5);  # should this return True ?
15:34 camelia rakudo-moar 83b8b1: OUTPUT«True␤»
15:36 dogbert17 https://docs.perl6.org/language/operators#infix_eqv    claims it should return False, what gives?
15:38 * Woodi remebers "assemblies" or something like that... they was trying to sell that "compilations" :>
15:42 kyclark_ joined #perl6
15:43 kerframil joined #perl6
15:45 perlpilot dogbert17: I'm going to go with "the docs are wrong" here :)
15:46 ugexe that part of the doc was written before 6.c
15:46 canopus joined #perl6
15:47 dogbert17 perlpilot: look like they are. Should the fix be, cut everything from 'For arbitrary objects ...' ?
15:47 mcmillhj joined #perl6
15:48 dogbert17 I mean it doesn't seem to be necessary to define your own eqv in this case
15:51 perlpilot I dunno if the fix should just be remove the wrong.  Better would be have a little more explanation
15:52 perlpilot Maybe
15:53 dogbert17 well, under what circumstances would you need your 'home rolled' eqv in 6.c then ?
15:53 perlpilot TimToady made the change to Mu.pm that affected infix:<eqv> at 2015-09-10 05:54:21.   Maybe troll the irclog to see if there was any discussion around that time.
15:56 dogbert17 thanks for the pointer, will have a look (or troll TimToady if he shows up :-)
15:56 canopus joined #perl6
16:06 mcmillhj joined #perl6
16:10 canopus joined #perl6
16:13 grondilu can I use prompt to enter a password?  with some option to hide keyboard input or something?
16:14 ugexe no. there is the NativeCall module Terminal::Readsecret though
16:17 grondilu not related:
16:17 grondilu m: sub (|) {}(:foo :bar)
16:17 camelia rakudo-moar 83b8b1: ( no output )
16:17 grondilu ^I was not expecting this to be ok
16:18 grondilu the lack of coma between the parameter looked like a syntax error to me
16:19 grondilu I had forgotten it and the last argument was ignored.  Took me a moment to see the issue.
16:19 grondilu m: say \(:foo)
16:19 camelia rakudo-moar 83b8b1: OUTPUT«\(:foo)␤»
16:19 grondilu m: say \(:foo :bar)
16:19 camelia rakudo-moar 83b8b1: OUTPUT«\(:bar, :foo)␤»
16:20 grondilu m: say \(:foo :bar :giz)
16:20 camelia rakudo-moar 83b8b1: OUTPUT«\(:bar, :foo, :giz)␤»
16:20 grondilu so it's actually valid syntax?  I had no clue.
16:20 grondilu m: say \(:foo:bar:giz)
16:20 camelia rakudo-moar 83b8b1: OUTPUT«\(:bar, :foo, :giz)␤»
16:20 grondilu lo
16:20 grondilu l
16:20 jnthn grondilu: Yeah, it's allowed
16:21 jnthn Maybe for consistency with things like m:g:i/.../
16:21 jnthn But I'm guessing if that was the rationale. :)
16:21 grondilu but then I don't quite understand why it did not behave the same way
16:23 grondilu m: sub (:$foo, :$bar) { say $bar }(:foo:bar)
16:23 camelia rakudo-moar 83b8b1: OUTPUT«True␤»
16:23 grondilu m: sub (:$foo, :$bar) { say $bar }(:foo :bar)
16:23 camelia rakudo-moar 83b8b1: OUTPUT«True␤»
16:24 grondilu m: sub (:$foo, :$bar) { say $bar }(:duh, :foo :bar)
16:24 camelia rakudo-moar 83b8b1: OUTPUT«Unexpected named argument 'duh' passed␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:24 grondilu m: sub (:$duh, :$foo, :$bar) { say $bar }(:duh, :foo :bar)
16:24 camelia rakudo-moar 83b8b1: OUTPUT«True␤»
16:24 grondilu can't reproduce it here
16:25 lostinfog joined #perl6
16:31 yadongz joined #perl6
16:40 mcmillhj joined #perl6
16:44 canopus joined #perl6
16:47 rindolf joined #perl6
16:49 wamba joined #perl6
16:56 grondilu which is the best JSON module?  I've tried JSON::Fast and apparently it's bad.
16:56 grondilu like it couldn't parse a floating point.
16:57 rindolf joined #perl6
16:58 timotimo uh oh
16:59 timotimo that's bad indeed
16:59 timotimo please contribute a test case
16:59 rgrinberg joined #perl6
17:00 timotimo grondilu: because JSON::Fast passes is test suite on my machine at least
17:01 grondilu maybe it's just me being dumb.  Can someone check the output of 'say to-json 1e0;'?
17:02 domidumont joined #perl6
17:04 timotimo that results in 1e0
17:04 Actualeyes joined #perl6
17:04 avuserow I tend to reach for JSON::Tiny since I haven't bottlenecked on json parsing speed yet...
17:04 timotimo in JSON::Tiny, too
17:04 avuserow perl6 -MJSON::Fast -e'say to-json(1e0)' gives me `{"0": null}`
17:05 timotimo oh! sorry
17:05 timotimo you're right
17:05 timotimo that's super weird indeed :)
17:06 leont__ joined #perl6
17:07 grondilu once again, I tried to use Perl 6 for something, and I encountered a bug.  It's quite concerning.
17:08 keix joined #perl6
17:08 grondilu though to be fair at least this one is in a module not in the core.
17:08 firstdayonthejob joined #perl6
17:09 avuserow whoa, why does JsonC indirectly pull in DBIish (via "NativeLibs" apparently)?
17:13 timotimo and it's my fault :<
17:14 timotimo grondilu: new version uploaded
17:14 timotimo couldn't test it very much, as i have to go AFK right now
17:14 grondilu wth
17:16 grondilu so I run perl6 -Ilib t/04-roundtrip.t and I get one failure.  But if I run PERL6LIB=lib prove -e perl6 t/04-roundtrip.t everything is fine.
17:17 grondilu oh ok one is marked TODO
17:21 grondilu timotimo: well that new version works better, thanks.
17:22 timotimo it was falling through all type tests and concluded "well, this has to be an object, then"
17:23 timotimo AFK
17:32 yadongz joined #perl6
17:43 Longinus joined #perl6
17:43 Longinus What is <!{ some code }> in grammars?
17:43 Longinus m: grammar foo { token TOP { "qq" <!{"x"}> };  }.subparse("qqw<meow").say;
17:43 camelia rakudo-moar 83b8b1: OUTPUT«#<failed match>␤»
17:44 Longinus And the actual code I'm trying to understand is this:   <!{ my $n := ~$x; $*W.is_name([$n]) || $*W.is_name(['&' ~ $n]) }>
17:44 masak Longinus: `<?{ code }>` is "evaluate this code and proceed if the result is positive"
17:44 masak Longinus: `<!{ code }>` is "evaluate this code and proceed if the result is negative"
17:44 masak or should I say "truthy" resp "falsy"
17:44 Longinus m: grammar foo { token TOP { "qq" <!{False}> };  }.subparse("qqw<meow").say;
17:44 camelia rakudo-moar 83b8b1: OUTPUT«「qq」␤»
17:45 Longinus masak++ thanks :)
17:45 masak `{ code }` is for evaluating code without considering its result
17:45 skarn_ joined #perl6
17:57 TEttinger joined #perl6
18:08 cognominal joined #perl6
18:08 masak is there any method I can give to an object so that, from the point of view of signature binding, it counts as not passing a parameter (making the parameter get the default value instead)?
18:09 pyrimidine joined #perl6
18:11 masak similarly, is there anything I can tell an object so that, from the point of view of `//`, it counts as undefined?
18:11 masak m: class C { method defined { False } }; my $c = C.new; say $c // "undefined"
18:11 camelia rakudo-moar 83b8b1: OUTPUT«undefined␤»
18:12 jnthn method defined for the latter, as you just noticed
18:12 jnthn For the former, no
18:12 masak ok, that answers the second question :)
18:12 masak ok, makes sense
18:12 jnthn Whether a parameter is passed is a direct function of the shape of the argument capture, not of the values within it
18:12 jnthn Unlike, say, JavaScript's default parameters, which iirc look for undefined
18:14 jnthn (Fun thing being both are kinda useful behaviors... :))
18:15 jnthn m: sub foo($a //= 42) { } # pretty sure this syntax is free :P
18:15 camelia rakudo-moar 83b8b1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub foo($a7⏏5 //= 42) { } # pretty sure this syntax i␤    expecting any of:␤        constraint␤»
18:16 jnthn On the argument side there's tricks like |(:$p with $p) or so
18:19 masak jnthn: agree that both behaviors are useful
18:20 dalek joined #perl6
18:22 hankache joined #perl6
18:22 MilkmanDan joined #perl6
18:24 girafe joined #perl6
18:25 hankache m: say "Hola #perl6"
18:25 camelia rakudo-moar 83b8b1: OUTPUT«Hola #perl6␤»
18:28 telex joined #perl6
18:31 FROGGS joined #perl6
18:33 yadongz joined #perl6
18:36 kyclark_ joined #perl6
18:36 domidumont joined #perl6
18:38 dalek doc: e7998e4 | jnthn++ | doc/Type/IO/Socket/Async.pod6:
18:38 dalek doc: Explain NFG + async socket interaction.
18:38 dalek doc:
18:38 dalek doc: Also documents how decoding errors are handled.
18:38 dalek doc: review: https://github.com/perl6/doc/commit/e7998e4fb9
18:39 FROGGS o/
18:39 jnthn Hope that makes sense and I didn't bust the Pod :P
18:40 Actualeyes left #perl6
18:41 sjoshi joined #perl6
18:46 travis-ci joined #perl6
18:46 travis-ci Doc build failed. Jonathan Worthington 'Explain NFG + async socket interaction.
18:46 travis-ci https://travis-ci.org/perl6/doc/builds/158537883 https://github.com/perl6/doc/compare/261d5a21e873...e7998e4fb9e4
18:46 travis-ci left #perl6
18:48 El_Che aha
18:48 El_Che travis-ci is a 455h0l3 :)
18:48 jnthn That...uh...doesn't look like my change :)
18:49 El_Che just pops in, tells your build sucks and leaves :)
18:51 jnthn Clearly it should stay around and taunt the person who broke it every 10 minutes until it's fixed. :P
18:51 El_Che it could have hit you with a large trout
18:52 TheLemonMan joined #perl6
18:55 girafe2 joined #perl6
18:57 labster joined #perl6
18:58 * masak .oO( idea for a bot: randomly pipes up on the channel, says "technology X build failed. Jonathan Worthington" )
18:59 sftp joined #perl6
19:02 kaare_ El_Che: Matt??
19:03 stmuk_ gpw2016 Steve Mynott - ‎Simple Perl 6 Fractals and Concurrency
19:03 stmuk_ https://www.youtube.com/watch?v=0_-2asURWKk
19:04 AlexDaniel joined #perl6
19:05 timotimo oooh
19:05 * timotimo watches
19:06 Ven_ joined #perl6
19:13 kyclark_ joined #perl6
19:19 timotimo holy jesus, you managed to kernel panic a mac just by calling OpenGL (indirectly) from multiple threads at the same time?
19:19 timotimo that's incredible
19:19 timotimo let's hope WebGL rigorously enforces thread-safety in the browser ... though JS in the browser is really single-threaded anyway, with the "multiple communicating processes" approach to "i want multiple cores busy doing my stuff"
19:21 dogbert17 m: say $*TOLERANCE # should this be doc'ed on the dynvar page?
19:21 camelia rakudo-moar c408e8: OUTPUT«1e-15␤»
19:22 stmuk_ timotimo: I haven't tried it recently. My suspicion is its now fixed but it did panic a few months back
19:24 stmuk_ a MacOS ChangeLog a few weeks later did look very much like it was fixed
19:24 AlexDaniel El_Che: re “I wonder how workable emacs is for non qwerty layouts” – Dvorak works really well
19:24 AlexDaniel El_Che: see https://www.emacswiki.org/emacs/DvorakKeyboard#toc3
19:25 AlexDaniel for example, this quote: “Dvorak feels like the most natural layout for Emacs. I swear it just seems like the keys were meant for this layout.”
19:26 smls joined #perl6
19:26 AlexDaniel El_Che: interestingly, Vim keybindings just fall apart when you start using other layouts…
19:27 timotimo stmuk_: i expect if you have two cores (and only two threads in your pool) you'll end up with the plotting thread spinning like mad, only getting a single "job" every few microseconds, and just a single thread generating new values
19:28 timotimo so you're going to win only if drawing a single pixel takes about as much time as generating that pixel takes
19:28 timotimo i imagine it's much faster to draw those pixels, so i expect that's how the performance gets wasted so heavily
19:28 timotimo if you had just for-looped over the channel, it would have blocked, and then you could have used 3 threads for 2 cores and it would probably have become a lot faster; could you try that, please? :)
19:30 timotimo oh, that's probably mbrot6.pl6? "concurrent with channel recv"
19:30 stmuk_ timotimo: yes I should do a followup .. I'm recording your comments and may ask questions in the near future
19:31 timotimo great! :)
19:31 timotimo i just now see that someone told you about the same thing. sounds like froggs
19:31 timotimo no, actually, moritz probably
19:31 stmuk_ the busy loop comment at the end?
19:31 timotimo yes
19:31 timotimo and the suggestion to use recv instead of poll
19:32 timotimo i *think* when you used the supply, you were basically doing the same thing your lock solution used
19:33 AlexDaniel masak: “where does azerty "come from"” – you might want to read this: http://xahlee.info/kbd/keyboard_layouts.html
19:33 AlexDaniel masak: this article is not entirely right but it is some good food for thought
19:34 yadongz joined #perl6
19:35 stmuk_ grr I think I tried recv but didn't check it in
19:35 AlexDaniel masak: “blog post idea: a keyboard layout that's perfect for Perl 6 development” – well, I can type ‘’“”「」«»π and other stuff with my custom keyboard layout (designed for programming, not just perl 6), does it sound worth a blog post? ;)
19:38 smls .race is not supposed automatically resume after an exception, is it?
19:38 smls Because it does in a program of mine.
19:39 smls I `die` deep inside a .race.map({ ... }), and the backtrace is printed, but the program continues
19:39 dwarring joined #perl6
19:40 smls With just .map({ ... }) the program exists when the exception is thrown
19:40 smls *exits
19:40 AlexDaniel masak: or if you start working on it yourself, consider sending it to me for a review. Perhaps I will be able to spot some problems early on
19:42 timotimo stmuk_: you can check out if looping over the channel has the exact semantics you want. i believe it does
19:43 stmuk_ timotimo: thanks
19:48 * smls managed to golf it; submitting RT.
19:48 timotimo isn't race in general pretty b0rked at the moment? or was it fixed while i wasn't looking?
19:49 smls yeah, i guess this is just another way in which it's borked :P
19:50 masak AlexDaniel: I won't have the tuits to write the post myself. was basically just fantasizing about it :)
19:51 masak AlexDaniel: it's cool that you have a custom keyboard layout. what I was wondering was whether one could be designed specifically for Perl 6 (and whether that would make it significantly better for Perl 6)
19:53 timotimo stmuk_: for reference, mbrot1 takes 16.5s on my machine :)
19:53 stmuk_ timotimo: I need to retry on the same h/w with the latest release!
19:54 timotimo of course
19:54 timotimo have you seen SDL_RenderSetLogicalSize?
19:55 stmuk_ nope
19:55 timotimo it lets you get bigger pixels for free
19:55 timotimo so even though you're setting individual pixels, you get 2x2 or 3x3 or something
19:55 timotimo so you can make the window bigger (easier to see) but keep the same performance because you don't need to draw more pixels to fill it
19:55 spider-mario joined #perl6
19:55 stmuk_ that sounds really useful
19:55 timotimo i don't really understand how $wid is supposed to work, what does that do?
19:56 timotimo hm, it might actually be slower, though
19:57 stmuk_ I think there were just some constants for scaling
19:58 stmuk_ which explains the use of "* 1 *" and other things
19:58 timotimo the performance i get is vastly different :o
19:58 stmuk_ I was using v slow h/w about 6 months ago
19:59 stmuk_ I also wondered about colour cycling (pure for cosmetic effect)
20:00 timotimo oh my, i can make this script explode with some memory corruption
20:04 AlexDaniel masak: generally, if you have a well thought out keyboard layout, the difference between it and other well thought out layouts is not significant, and therefore there is no reason to switch (e.g. switching from colemak to dvorak is a waste of time). So if you take any recent keyboard layout for programming (I don't know many, actually…) it will probably have some means of entering common unicode characters (which perl 6 uses a lot), and
20:04 AlexDaniel it will have symbols commonly used in scripting languages (e.g. # for comments) taken into consideration. So no, I don't think that Perl 6 is so special that it requires it's own keyboard layout :)
20:05 AlexDaniel masak: that being said, “”‘’「」 were added to my keyboard layout just because Perl 6 supports it, and now I will never look back
20:05 perlpilot .oO( If you have a well thought out editor, the difference between it and other well thought out editors is not significant ...  )
20:06 perlpilot ;-)
20:07 lizmat joined #perl6
20:07 nadim_ joined #perl6
20:07 timotimo guess what doesn't crash when run under valgrind
20:09 AlexDaniel perlpilot: unless your new custom keyboard layout makes some of the features of your well thought out editor obsolete ;)
20:10 AlexDaniel like hjkl
20:11 woolfy joined #perl6
20:12 perlpilot I've been using sublime_text for the past few days and it's really hard not to hit the keys I would use in vi sometimes.
20:13 tailgate yeah, you eventually rewire your brain enough to stop doing it out of habit
20:14 zakharyas joined #perl6
20:14 perlpilot Though, I've discovered that some of the WordStar key bindings I remember from decades ago are present in Sublime.  I suppose other editors have adopted them as well in order for them to make it this far into the future
20:16 geekosaur DOS/Windows programming editors have kept them alive
20:16 cdg joined #perl6
20:18 masak ooh, that would be a cool project too: find the "etymology" of editor key bindings in common use
20:18 stmuk_ Andre Walker: Running Perl 6 in a SailfishOS phone‎ - YAPC::Europe 2016
20:18 stmuk_ https://www.youtube.com/watch?v=MxHYdxE7Vlk
20:19 tbrowder hi all
20:20 timotimo greetings tbrowder
20:21 masak ohai tbrowder
20:23 tbrowder Ah, a couple of experts on hand! I need some advice on exporting subs from a module.  The docs implicitly demo subs without named parameters first followed by those with named parameters.
20:26 timotimo is that the question?
20:26 tbrowder No, but I'm getting there slowly: In one of my modules I'm working on I had one of my subs without a named parameter below named ones in the file, and they seemed to be masked when a using module asked for a named param group.
20:27 lizmat joined #perl6
20:27 tbrowder I was sloppy I know, but that seems like either a bug in the docs or rakudo to me.
20:28 timotimo ah
20:29 tbrowder I about gave and asked for help but finally moved the default subs to the top and all worked as advertised!
20:29 timotimo when you have multis, named parameters are only ever used in disambiguating. it's especially difficult in methods because they all have an implicit *% parameter
20:30 tbrowder Okay now I'm taking about plain subs defined like this:
20:31 tbrowder sub foo() is export { say "hi"}
20:31 tbrowder as opposed to this:
20:31 perlpilot tbrowder: you could just put the file up on gist.github.com and show us the real code.
20:32 tbrowder sub bar() is export(:extra) { say "boo"}
20:33 tbrowder The modules docs calls the (:extra)?
20:33 tbrowder a named parameter
20:33 timotimo oh, you mean named arguments for "is export"
20:33 perlpilot tbrowder: aye, those are "tags" for grouping your exports.
20:34 tbrowder Exactly.
20:34 timotimo that's for when you want some things to only be available when the "use"r asks for them
20:34 tbrowder Correct
20:34 yadongz joined #perl6
20:35 perlpilot tbrowder: So ... what are you expecting to happen that's not happening?
20:35 perlpilot tbrowder: and how did you use the module?
20:35 tbrowder My point is a sub with an export param masks a sub with no export param.
20:36 tbrowder I'll have to a gist--be back later.  Thanks.
20:36 rindolf joined #perl6
20:37 * perlpilot doesn't understand the "masks" comment
20:39 geekosaur I'm guessing this is that :foo overrides :DEFAULT, and they really want :MANDATORY
20:40 perlpilot yeah, that's what I was starting to guess too
20:40 perlpilot or to say  use Module :foo, :DEFAULT;
20:40 geekosaur yeh
20:40 geekosaur tbrowder ^^
20:45 zostay ufobat: btw, I am making progress on p6wapi again... See the recent work on HTTP::Request::Supply
20:46 timotimo any reason why my Channel $c .= new; for $c -> $item { ... } will only run the loop once, setting $item to contain $c?
20:47 zostay See also Issue 35 on zostay/P6W (https://github.com/zostay/P6W/issues/35)
20:47 timotimo it's not so awesome to have to explicitly write .list
20:53 mcmillhj joined #perl6
20:55 ufobat zostay++ :D
20:56 ufobat i tried to write a http server based on HTTP::Request::Supply and didnt get far.. no time :(
20:56 timotimo zostay: that's alot of text :o
21:00 labster joined #perl6
21:00 zostay Agreed, it's too long, I hope to cut it in half before I'm done
21:02 zostay ufobat: it didn't really work before, now it is completely rewritten and should in general, but I need to get a test working with sockets to be sure
21:02 tbrowder Okay, folks (perlpilot and timotimo), the trick is to use (:MANDATORY) for those subs to be always exported regardless of what the other export tag (or none) is used. And order in the module file doesn't matter, so I guess I have no beef with the docs or rakudo (although an explicit statement in the docs might help--I'll try that). Thanks for your
21:02 tbrowder forbearance!
21:02 zostay Which is what I am currently working on
21:05 geekosaur I pulled that from the docs fwiw
21:06 geekosaur https://docs.perl6.org/language/modules#Exporting_and_Selective_Importing see "main.pl" example at the end
21:06 geekosaur er, at the end of "is export"
21:13 leont__ joined #perl6
21:15 dalek doc: b5552ef | (Tom Browder)++ | doc/Language/modules.pod6:
21:15 dalek doc: add emphasis and a bit of extra usage info
21:15 dalek doc: review: https://github.com/perl6/doc/commit/b5552ef77b
21:24 travis-ci joined #perl6
21:24 travis-ci Doc build failed. Tom Browder 'add emphasis and a bit of extra usage info'
21:24 travis-ci https://travis-ci.org/perl6/doc/builds/158579377 https://github.com/perl6/doc/compare/e7998e4fb9e4...b5552ef77b3b
21:24 travis-ci left #perl6
21:27 perlpilot timotimo: re:  for $c -> $item { ... } only looping once ... Isn't that classic single arg rule in play?
21:27 timotimo i suppose when you have a single arg that's an item, that's to be expected, yeah
21:29 broquaint joined #perl6
21:29 perlpilot tbrowder: Maybe the docs need some explanation of ALL, DEFAULT and MANDATORY from the exporting side.  i.e.  sub foo is export {}  is the same as sub foo is export( :ALL, :DEFAULT) {}
21:30 perlpilot tbrowder: then you can say "use Module :foo" only gets you the things exported with the :foo tag, and "use Module" only gets you things tagged with :DEFAULT
21:31 perlpilot er, except write it correctly in the presence of :MANDATORY  ;)
21:31 timotimo right
21:31 perlpilot anyhow ... time to pick up some groceries and head home.
21:31 * perlpilot &
21:32 tbrowder perlpilot: not quite true I believe, "use Module" will export all undecorated export subs as well as any marked :DEFAULT.
21:32 dalek doc: 78f8578 | (Jan-Olof Hendig)++ | doc/Language/operators.pod6:
21:32 dalek doc: Fixed some indentation problems
21:32 dalek doc: review: https://github.com/perl6/doc/commit/78f8578b0f
21:32 perlpilot tbrowder: "undecorated" exports are implicitly :DEFAULT  (that's what I'm saying needs to be in the docs somewhere if it isn't already)
21:32 * perlpilot & # for real this time
21:33 tbrowder and of course :MANDATORY will also get exported
21:33 tbrowder ah, gotcha!
21:34 tbrowder perlpilot: I'll take another look--good evening!
21:37 dalek doc: 0a7d930 | (Tom Browder)++ | doc/Language/modules.pod6:
21:37 dalek doc: update with perlpilot's suggestion
21:37 dalek doc: review: https://github.com/perl6/doc/commit/0a7d930cbb
21:40 travis-ci joined #perl6
21:40 travis-ci Doc build failed. Jan-Olof Hendig 'Fixed some indentation problems'
21:40 travis-ci https://travis-ci.org/perl6/doc/builds/158583147 https://github.com/perl6/doc/compare/b5552ef77b3b...78f8578b0ff7
21:40 travis-ci left #perl6
21:42 tbrowder .tell perlpilot look at doc change https://github.com/perl6/doc/commit/0a7d930cbb
21:42 yoleaux tbrowder: I'll pass your message to perlpilot.
21:44 travis-ci joined #perl6
21:44 travis-ci Doc build failed. Tom Browder 'update with perlpilot's suggestion'
21:44 travis-ci https://travis-ci.org/perl6/doc/builds/158584302 https://github.com/perl6/doc/compare/78f8578b0ff7...0a7d930cbba7
21:44 travis-ci left #perl6
21:47 rgrinberg joined #perl6
21:47 _slade_ joined #perl6
21:52 yadongz joined #perl6
22:00 dalek doc: e06ada1 | (Tom Browder)++ | doc/Language/modules.pod6:
22:00 dalek doc: fix typo, add C<> around :DEFAULT
22:00 dalek doc: review: https://github.com/perl6/doc/commit/e06ada1ba1
22:06 yadongz joined #perl6
22:08 travis-ci joined #perl6
22:08 travis-ci Doc build failed. Tom Browder 'fix typo, add C<> around :DEFAULT'
22:08 travis-ci https://travis-ci.org/perl6/doc/builds/158589051 https://github.com/perl6/doc/compare/0a7d930cbba7...e06ada1ba1fb
22:08 travis-ci left #perl6
22:22 Sgeo joined #perl6
22:26 timotimo bench: compare HEAD ($_ + $_ * i) for ^100_000 ||| Complex.new($_, $_) for ^100_000
22:26 benchable6 timotimo, starting to benchmark the 1 given commits
22:26 benchable6 timotimo, https://gist.github.com/b2ae93e9b1a9f29103c033ab74a1efa7
22:26 timotimo bench: compare HEAD ($_ + $_ * i) for ^1_000_000 ||| Complex.new($_, $_) for ^1_000_000
22:26 benchable6 timotimo, starting to benchmark the 1 given commits
22:27 timotimo :o
22:27 timotimo sorry benchable
22:34 dalek doc: 3ac1c04 | (Tom Browder)++ | doc/Language/typesystem.pod6:
22:34 dalek doc: tidy minor grammar needs
22:34 dalek doc: review: https://github.com/perl6/doc/commit/3ac1c04a03
22:34 skids joined #perl6
22:41 travis-ci joined #perl6
22:41 travis-ci Doc build failed. Tom Browder 'tidy minor grammar needs'
22:41 travis-ci https://travis-ci.org/perl6/doc/builds/158595657 https://github.com/perl6/doc/compare/e06ada1ba1fb...3ac1c04a03e7
22:41 travis-ci left #perl6
22:47 itaipu joined #perl6
22:51 edehont joined #perl6
22:58 sufrostico joined #perl6
22:59 Upasaka joined #perl6
23:02 dalek doc: 8a94bc5 | (Tom Browder)++ | doc/Language/typesystem.pod6:
23:02 dalek doc: fix two typos, one I created on my last commit
23:02 dalek doc: review: https://github.com/perl6/doc/commit/8a94bc5f4a
23:10 travis-ci joined #perl6
23:10 travis-ci Doc build failed. Tom Browder 'fix two typos, one I created on my last commit'
23:10 travis-ci https://travis-ci.org/perl6/doc/builds/158600415 https://github.com/perl6/doc/compare/3ac1c04a03e7...8a94bc5f4a5e
23:10 travis-ci left #perl6
23:10 Zoffix joined #perl6
23:11 Zoffix left #perl6
23:11 Zoffix joined #perl6
23:11 Zoffix m: grammar foo { token TOP { {$<Z>.made: "meow"} } }.subparse('').say
23:11 camelia rakudo-moar bc3592: OUTPUT«「」␤»
23:12 Zoffix What's the point of this `$<B>=[<?before .>]` portion? https://github.com/rakudo/rakudo/blob/bc35922/src/Perl6/Grammar.nqp#L127
23:12 Zoffix What does it do? My understanding is it can be removed with a simpler<?[.]>, no?
23:12 Zoffix s/removed/replaced/;
23:16 Zoffix *crickets* :)
23:18 TimToady no, that's not hte same
23:19 TimToady <?before .> is any character, while <?[.]> is only a literal dot
23:19 Zoffix Is it creating the $<B> match object so it could be used elsewhere?
23:19 Zoffix Oh
23:19 edenc joined #perl6
23:20 Zoffix OK. But how come it's not just <?before .> ? Why is it assigning to $<B>
23:21 Zoffix Just for clarity that $<B> is used there?
23:22 yadongz joined #perl6
23:23 TimToady $<B> represents the exact position before the delimiter, and calls .'!make' on that cursor position
23:24 Zoffix Ah
23:24 Zoffix TimToady++ thanks
23:24 TimToady so it ends up returning that position as the new position, I think
23:31 poohman joined #perl6
23:36 Upasaka joined #perl6
23:36 pierre_ joined #perl6
23:37 BenGoldberg joined #perl6
23:56 canopus joined #perl6
23:59 benchable6 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo