»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 rjt_pl joined 00:07 labster left 00:22 labster joined, BenGoldberg joined 00:36 yadongz joined 00:40 zacts joined
BenGoldberg m: my uint32 $i = -1; say $i 00:50
camelia rakudo-moar a62207: OUTPUT«4294967295␤»
BenGoldberg m: my uint64 $i = -1; say $i
camelia rakudo-moar a62207: OUTPUT«-1␤»
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 00:53 pierre_ joined
BenGoldberg m: my uint32 $x = -1; say( $x +< 3 ); 00:55
camelia rakudo-moar a62207: OUTPUT«34359738360␤»
BenGoldberg m: my uint $x = -1; say( $x +< 3 );
camelia rakudo-moar a62207: OUTPUT«-8␤»
BenGoldberg m: my uint64 $x = -1; say( $x +< 3 );
camelia rakudo-moar a62207: OUTPUT«-8␤»
BenGoldberg m: my uint $x = -1; say( $x +> 3 );
camelia rakudo-moar a62207: OUTPUT«-1␤»
BenGoldberg m: my uint64 $x = -1; say( $x +> 3 ); 00:56
camelia rakudo-moar a62207: OUTPUT«-1␤»
BenGoldberg m: my uint32 $x = -1; say( $x +> 3 );
camelia rakudo-moar a62207: OUTPUT«536870911␤»
01:02 benchable6 left 01:03 benchable6 joined 01:06 benchable6 left 01:07 benchable6 joined 01:10 danlei` joined 01:12 benchable6 left, benchable6 joined, yadongz left 01:13 danlei left 01:14 benchable6 left, benchable6 joined 01:15 benchable6 left 01:16 benchable6 joined, zacts left 01:17 zacts joined 01:18 benchable6 left 01:19 benchable6 joined
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␤␤»
AlexDaniel why is .gist being called? What does it have to do with WHAT?
01:25 Actualeyes joined 01:30 zacts left 01:31 zacts joined, yadongz joined
sammers_ m: class Foo { method gist { 'what?' } }; say Foo.WHAT 01:32
camelia rakudo-moar a62207: OUTPUT«what?␤»
01:33 pierre_ left
sammers_ m: class Foo { method gist { 'what?' } }; say Foo.gist 01:33
camelia rakudo-moar a62207: OUTPUT«what?␤»
01:33 eliasr left
sammers_ m: class Foo { method WHAT { 'what?' } }; say Foo.WHAT 01:34
camelia rakudo-moar a62207: OUTPUT«(Foo)␤»
sammers_ m: class Foo { method WHAT { 'what?' } }; say Foo.gist 01:35
camelia rakudo-moar a62207: OUTPUT«(Foo)␤»
sammers_ m: class Foo { method not-gist { 'what?' } }; say Foo.gist
camelia rakudo-moar a62207: OUTPUT«(Foo)␤»
sammers_ hmm
m: class Foo { method gist { .WHAT } }; say Foo.gist 01:36
camelia rakudo-moar a62207: OUTPUT«(Any)␤»
sammers_ m: class Foo { method gist { Foo.WHAT } }; say Foo.gist
camelia rakudo-moar a62207: OUTPUT«Cannot unbox a type object␤ in block <unit> at <tmp> line 1␤␤»
sammers_ m: class Foo { method gist { Foo.WHAT } }; say Foo.WHAT
camelia rakudo-moar a62207: OUTPUT«Cannot unbox a type object␤ in block <unit> at <tmp> line 1␤␤»
sammers_ m: class Foo { method gist { .WHAT } }; say Foo.WHAT
camelia rakudo-moar a62207: OUTPUT«Cannot unbox a type object␤ in block <unit> at <tmp> line 1␤␤»
sammers_ m: class Foo { method gist { 'what?' } }; say Foo.WHAT 01:37
camelia rakudo-moar a62207: OUTPUT«what?␤»
01:39 danlei` left
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 \…»
BenGoldberg m: say IterationEnd === IterationEnd;
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)␤ …»
BenGoldberg Why doesn't (\a, \b) match? 01:41
01:41 pierre_ joined 01:46 ilbot3 left, pierre_ left 01:47 inokenty left, ilbot3 joined
sammers_ m: say IterationEnd =:= IterationEnd; 01:48
camelia rakudo-moar a62207: OUTPUT«True␤»
01:50 zacts left 01:51 zacts joined 01:52 pierre_ joined, Xliff left, Xliff joined
sammers_ BenGoldberg use =:= 01:53
BenGoldberg Thanks.
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."
docs.perl6.org/type/Iterator
np
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. 01:55
Xliff Anyone around who wouldn't mind taking a look at some code for me? 02:00
AlexDaniel Xliff: maybe? What code?
Xliff github.com/Xliff/p6-color-names/bl...mes.pm#L41
Still stuck with this weird error.
If I run the project from the root I get this: 02:01
perl6 --stagestats -Ilib -e 'use Color::Names; dd lists_available; dd lists_loaded; dd color("red"); dd color("blue", :obj)'
Stage start : 0.000
Stage parse : ===SORRY!===
Cannot find method 'merge-symbols': no method cache and no .^find_method
If I comment out the requires in sub EXPORT(), that goes away, but then the code doesn't work properly.
Been stuck on that bit for the last week. 02:03
Haven't been able to find a workaround, yet.
02:04 TEttinger left 02:05 TEttinger joined 02:06 kyclark_ joined
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:10
is there a meta-object you could ensure is composed? 02:11
02:18 edehont left
BenGoldberg s: Failure, 'handled' 02:27
SourceBaby BenGoldberg, Sauce is at github.com/rakudo/rakudo/blob/a622...ure.pm#L56
AlexDaniel Xliff: no idea! 02:28
02:29 canopus left, zacts left 02:31 noganex_ joined 02:34 canopus joined, noganex left 02:42 pierre_ left 02:50 AlexDaniel left 02:54 kyclark_ left 02:57 cibs left 02:58 kyclark_ joined 02:59 cibs joined 03:02 rgrinberg left 03:06 geekosaur left 03:07 rgrinberg joined 03:12 zacts joined
Xliff AlexDaniel 03:12
I know right!!?
I just don't get what the problem is.
Rakudobug? 03:13
03:19 stux|RC-only left 03:21 stux|RC-only joined 03:24 pierre_ joined 03:32 bob777 left, bob777 joined 03:36 wamba joined 03:38 zengargoyle left 03:44 kyclark_ left 03:50 zengargoyle joined 03:52 yadongz left 03:56 geekosaur joined, geekosaur left 03:59 _28_ria left, geekosaur joined 04:03 _28_ria joined 04:04 _28_ria left 04:05 _28_ria joined
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:06 Actualeyes left 04:07 _28_ria left, Cabanossi left 04:08 _28_ria joined 04:10 Cabanossi joined 04:13 mr-foobar left 04:14 rgrinberg left, yadongz joined 04:16 mr-foobar joined 04:19 yadongz left 04:21 pierre_ left, araujo__ left 04:23 khw left 04:28 pierre_ joined 04:32 pierre_ left 04:38 wamba left, pierre_ joined 04:42 _28_ria left, pierre_ left 04:47 BenGoldberg left 04:49 _28_ria joined 04:52 _28_ria left 04:53 _28_ria joined 04:54 _28_ria left 04:55 pierre_ joined 04:56 _28_ria joined 04:59 pierre_ left 05:00 skids left 05:02 skids joined 05:03 _28_ria left 05:06 _28_ria joined 05:08 _28_ria left 05:09 _28_ria joined 05:11 _28_ria left 05:12 Actualeyes joined 05:14 _28_ria joined, _28_ria left 05:16 _28_ria joined 05:17 _28_ria left 05:19 _28_ria joined, yadongz joined
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.
Xliff: I'll pass your message to grondilu.
05:24 _28_ria left, yadongz left 05:25 skids left 05:33 stux|RC-only left 05:36 stux|RC-only joined 05:37 nadim joined 05:39 Actualeyes left 05:41 pierre_ joined 05:42 stux|RC-only left, stux|RC-only joined
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
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:50
05:58 CIAvash joined
Xliff kkl 05:59
Well, if you want grunt work done, I don't mind lending a hand.
I have done nothing in WebGL. Sounds like fun. 06:00
(I may regret those words, later)
06:01 TEttinger left
grondilu I guess I can make a public repo of my progress. 06:07
though it'd increase the amount of work, as I'd have to make things presentable. 06:08
Xliff Nah. I don't mind ug-lay 06:11
My code usually resembles that.
06:11 domidumont joined
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
news.ycombinator.com/item?id=12442575
very interesting stuff. I'm watching the series about mathematics fundation, and I find it very attractive from a computational point of view.
I mean like, weirdly enough I had no idea it is possible to parametrize a circle with rational numbers: 06:13
m(t) = [(1-t²)/(1+t²), 2t/(1+t²)] 06:14
in order to motivate me to do this WebGL thing, I'll make it interesting by trying to apply those concepts.
06:16 domidumont left
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:16
06:17 domidumont joined, mspo left
Xliff Whoa! I'm going to have to look into that parameterized circle thingy. 06:27
06:27 firstdayonthejob joined
Xliff And hey, whatever gets your engine going. 06:27
Bed time for me, so I will see you, later. 06:28
06:28 Xliff is now known as Xliff_zzzz 06:36 labster left 06:39 firstdayonthejob left, leejo left
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␤»
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␤»
cxreg has the subject of NQP targeting WASM come up? 06:51
grondilu It did. IIRC the conclusion is that it's way too premature to envision seriously. 06:52
CIAvash cxreg: irclog.perlgeek.de/perl6/2016-04-15#i_12342210
grondilu I'm guessing we should at least wait for pmurias to finish his JS port. 06:53
I onced asked how ludicrous it would be to compile MoarVM on asm.js 06:54
Glitchy Try it! 06:56
07:01 RabidGravy joined
grondilu it's easier said than done. 07:02
07:04 labster joined, pierre_ left 07:06 pierre_ joined 07:14 darutoko joined
cxreg heh. 07:14
v8 5.1 has native wasm now (this is what's in node.js 6.5) 07:16
but I'll trust pmurias++
07:18 Upasaka joined
Glitchy What editor does everyone here use to write p6 code? 07:21
Just wondering if any have semantic support
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)
grondilu uses Vim. Been wondering if he should follow Damian Conway's example who does NOT use syntax highlighting. 07:25
lizmat moritz: re search being stuck, is there something I can do? 07:29
07:30 pierre_ left 07:31 yadongz joined
moritz lizmat: nagging me helps :-) 07:33
lizmat: should be updated now 07:34
lizmat whee!
07:35 yadongz left 07:36 zacts left 07:37 zacts joined
El_Che Glitchy: nxadm.wordpress.com/2016/08/21/vim...-6-editor/ 07:37
Glitchy: 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:39
07:40 pierre_ joined
Glitchy El_Che: Thanks 07:40
I think this is more what I'm looking for, on-the-fly error checking.
El_Che Glitchy: it checks at save time (:w) 07:41
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
that pretty much how error checking works on vim
07:42 leont_ joined
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
Glitchy: sure you can
CIAvash Glitchy: there is a flycheck-perl6 package for Emacs github.com/hinrik/flycheck-perl6
07:43 pierre_ left, pierre_ joined
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
as a non-emacs user I think emacs is a lot easier for writing plugin 07:45
s
Glitchy emacs is very easy for writing plugins
If you know cl or clozure it's very similar 07:46
shantanu m:say "See you tomorrow folks!"; 07:47
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 :)
Glitchy masak: Actually there is no difference because you can (require 'cl) ;) 07:49
masak that is more than I knew :)
El_Che I wonder how workable emacs is for non qwerty layouts
masak however, that still sounds opt-in, and a whole lot of Elisp code out there runs with dynamic scoping
El_Che I gave up on using qwerty on an azerty country
Glitchy El_Che: Very, but you'll want to rebind keys
El_Che you'll always end up with an azerty in front of you 07:50
Glitchy I've used emacs with dvorak
masak where does azerty "come from" -- surely it must be a tweak on qwerty? what led to it?
07:51 dakkar joined
El_Che better for accents 07:51
masak ooh
El_Che it has the frenc ç, é, à on a unshifted spot 07:52
ù
grondilu is French and confirms
masak blog post idea: a keyboard layout that's perfect for Perl 6 development :)
El_Che accetns are letter + ´ (which is alt gr ù ) <-- easier to type than it sounds
07:53 Actualeyes left
El_Che grondilu: I am using the Belgian variant though 07:53
07:53 wamba joined
El_Che one azerty is not enough! 07:53
:)
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:56
07:57 wamba left, Actualeyes joined, bjz joined
masak El_Che: hey, that's another blog post idea. 08:00
(screenshots or it didn't happen)
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.
El_Che masak: you can show off all the exotic quotes (depending on the language of the doc, word changes the quotes) 08:02
leont_ might make one, is there any overview of all unicode operators? 08:04
08:04 zakharyas joined
ufobat DrForr, thanks for the PR :) 08:06
08:06 jonas3 joined 08:07 girafe left
DrForr No worries. I may have a few others lined up. 08:08
08:12 wamba joined 08:14 telex left
DrForr Am I right in thinking you're trying to build a transition from Dancer2 - Perl6? 08:14
08:16 bjz left
geekosaur leont_, docs.perl6.org/language/unicode_texas 08:16
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
Finding intuitive bindings for many of them is hard though
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:21
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:22
DrForr, i would specify the route as a regex right not as a string, so you skip this part: github.com/ufobat/Bailador/blob/ma...ute.pm#L80 08:23
leont_ And my browser can't render 「」 apparently :-/ 08:24
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:26
DrForr, comparing dancer with bailador i also think that this nested route thing workes completly differnet github.com/ufobat/Bailador#web-app...ailadorapp 08:27
08:28 bjz joined
DrForr Yeah, there are quite a few differences; that's mostly why I was asking. 08:30
08:31 leont__ joined, Actualeyes left, leont_ left
ufobat i am open for suggestions and pull requests, also if they are not dancer2ish :-) 08:33
DrForr Well, I have a different interface in Prancer, I was thinking about turning it into a replacement routing module. 08:34
08:34 rudolfochrist joined
ufobat sounds interesting :) 08:36
DrForr github.com/drforr/perl6-App-prancer # The README should give you an idea. 08:37
08:38 leont__ left
ufobat yeah i've read it before, i was already courious about your module 08:39
DrForr The hard work's been done; I just need to think about how to integrate it. 08:43
ufobat like making the routing engine pluggable, with a certain default if you dont specify it? 08:44
DrForr Something like that. I hadn't thought too much beyond looking briefly at the routing class. 08:45
nadim Morning P6, sunshine and birds songs on everyone. 08:48
08:50 telex joined 08:53 pierre_ left 08:59 mohae left, pierre_ joined
DrForr Likeweise. 09:01
*wise
09:02 Actualeyes joined 09:04 pierre_ left
moritz ain't no sunshine when #perl6's gone 09:08
09:17 pierre_ joined 09:22 pierre_ left, pierre_ joined 09:23 cpage_ left 09:24 luiz_lha joined, luiz_lha is now known as Guest34639 09:27 Guest34639 is now known as luiz_lha 09:33 araujo joined, araujo left, araujo joined 09:34 araujo left 09:35 araujo joined 09:36 araujo left 09:37 araujo joined 09:41 edehont joined 09:43 labster left
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␤»
llfourn FooInt should be narrower than Int:D because it is derived from Int:D 09:44
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
camelia rakudo-moar 7925d6: OUTPUT«FooInt␤»
llfourn ok nevermind me :S
09:48 lizmat left
jnthn heh :) 09:48
Was about to say, but you'd already spotted it :)
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
09:50 edehont left
llfourn I'm probably not setting something up right 09:50
09:52 woolfy left 09:58 rudolfochrist left 10:01 cpage_ joined 10:02 eliasr joined, andreoss joined 10:24 CIAvash left 10:25 pierre_ left 10:28 pierre_ joined 10:31 wamba left 10:40 kaare_ joined 10:45 bjz left 10:47 Actualeyes left 10:49 bjz joined 10:53 rudolfochrist joined 10:58 rindolf joined, rudolfochrist left 11:02 aries_liuxueyang left, pierre_ left, aries_liuxueyang joined 11:03 pierre_ joined 11:11 wamba joined 11:12 daxim joined 11:14 pierre_ left 11:15 pierre_ joined
dalek c: 261d5a2 | (Jan-Olof Hendig)++ | doc/Language/operators.pod6:
Fixed incorrect result and typo
11:17
11:19 pierre_ left 11:24 user9 left 11:25 travis-ci joined
travis-ci Doc build failed. Jan-Olof Hendig 'Fixed incorrect result and typo' 11:25
travis-ci.org/perl6/doc/builds/158425789 github.com/perl6/doc/compare/9312a...1d5a21e873
11:25 travis-ci left
dogbert17 grr, what's wrong this time then 11:30
hmm: Failed to find '/tmp/PodToBigfile-precomp/9E4FBB0982AC76B2D1374F67853661858C813AC6.1473333685.54881/4C/4CDC84469EF12631D41D43E2D89820AE3D394D0E.tmp' while trying to do '.modified'
11:31 user9 joined
dogbert17 nine, moritz heeeelp :-) 11:31
11:31 skids joined
dogbert17 the build mechanism works in mysterious ways, despite the build failure, my changes have been applied to docs.per6.org 11:46
dalek osystem: 3fdbcb3 | LLFourn++ | META.list:
Add DispatchMap to ecosystem

  github.com/LLFourn/p6-DispatchMap/...META6.json
11:48
11:54 rudolfochrist joined 11:58 rudolfochrist left 12:07 skids left, eyck left
buharin exit 12:15
12:15 buharin left 12:16 pierre_ joined 12:18 robertle joined 12:28 andreoss left 12:42 yadongz joined 12:47 user9 left, user9 joined 12:52 mcmillhj joined 12:54 g4 joined 12:59 AlexDaniel joined 13:04 sufrostico joined, poohman_ joined 13:14 kyclark_ joined 13:16 cdg joined 13:22 kyclark_ left, kyclark_ joined, rgrinberg joined 13:23 kyclark_ left, wamba left 13:25 kyclark_ joined
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
Sort of like how Compose > > turns into »
masak yes, that makes a lot of sense 13:31
I was thinking there might be other wins too, though 13:33
something like how 「」 would be found somewhere near the ordinary ' key 13:34
basically, trying to find some attractive strange consistencies on the keyboard 13:35
13:36 itaipu joined 13:37 yadongz left 13:42 BeepBeepImAJeep joined 13:43 Sgeo left
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:44
13:44 BeepBeepImAJeep left
timotimo it is actually NYI, sorry about that 13:45
rjt_pl (Er, s/:/;/g of course)
timotimo you can usually get a one-dimensional list-of-lists slice and slice the individual lists, though
i.e. .[slice-one].>>[slice-two]
rjt_pl OK, thanks timo. Helps knowing it's not me. :-) I'll go with the LoL for now then. 13:46
timotimo multi-dimensional arrays are currently also extremely slow, because they haven't had their first performance check-up yet 13:50
13:50 mspo joined
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:53
13:54 mohae joined 13:55 skids joined 13:57 Actualeyes joined
timotimo has a hard time imagining what exactly that means 13:57
so i can't say if "cool, we'll definitely reach that" is a sensible response
[Coke] so if it takes c 10 seconds, we can take 317 years. 13:58
timotimo very good
we should be able to make that work 13:59
[Coke] :)
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
mspo so like =~ /a*/ on aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
rjt_pl Hehe. Yes, Coke, that's it. :-)
masak mspo: that one should match pretty quickly
mspo: it's when you have sequences of quantifiers that you can get exponential behavior
mspo oh right 14:00
masak go-to reference: swtch.com/~rsc/regexp/regexp1.html
ilmari mspo: more like "/a*b/" on a long string of as with no b
masak (recommended reading for anyone who's even a little interested in regexes/grammars)
mspo so like =~ /a*a*/ on aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
I forget how to actually make it happen
ilmari as that might naively restart the a* after each a
mspo ilmari: yeah that's it 14:01
masak the page I linked has an example
mspo ironically I had to fix a java version of that not too long ago for some custom OSAPI "security" checker widget thinggy
the stack traces were impressive
rsc has a bunch of interesting regex implementations, doesn't he? 14:02
masak I believe so.
he also went on to design the regexes for Golang, IIRC
mspo yeah also like, the rest of go :) 14:03
implementation coding, anyway
14:04 khw joined, kyclark_ left
masak aye 14:05
yeah, rsc seems like a hoopy frood 14:06
mspo none of those plan9 guys were lovers of perl, it seems
part of that early web/cgi haters group :)
masak Perl is not the kind of language that aims to please everyone :> 14:07
mspo but then they put bradfitz on golang too
so I guess it levels out
14:07 g4 left
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 itaipu left
timotimo right, TIMTOWTDI covers that 14:09
rjt_pl No argument there. :-)
masak it's part of "Perl gets the job done without a lot of judging your code on the way"
14:10 acrussell joined
mspo yeah I don't get why so many other languages are so perscriptive 14:10
timotimo seems to work well for python ...
rjt_pl Oh that gives me a great idea for another ACME:: module. 'use judgement qw<condescending>;'
mspo wasn't writing code supposed to be a way to express an idea?
masak all is fair if you predeclare :P
timotimo hide your predeclarations 5 "use"s deep, if you can 14:11
mspo timotimo: there are many ways to do everything in python
that whole weird marketing thing is as big a sham as everything else :) 14:12
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
assuming you use it :)
14:14 NEveD left
rjt_pl I think the "severity" adjectives say it all... qw<gentle stern harsh cruel brutal> 14:14
timotimo %) 14:15
moritz much of it is just totally "your" opinion, man
masak I can see a point of linters 14:16
mspo yeah definitely
they're great
masak but some linting rules are really silly
mspo even gofmt is kind of nice
masak I went through the airbnb JS guidelines, and accepted or rejected each rule for a possible future JS project 14:17
14:17 MilkmanDan left
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
moritz code critic is about style, linting about defects 14:18
they serve quite different roles, IMHO
rjt_pl Agreed
mspo both are very good things
moritz if there's a style violation that a machine can detect, it better offer to fix it as well
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
mspo moritz: isn't api usage more of a static typing thing? 14:20
masak some things are, perhaps
14:20 itaipu joined
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:21
14:22 kyclark_ joined
moritz mspo: it's more like "seems you are calling eval() with unsanitized input" 14:23
mspo moritz: that should probably show up in as many places as possible ;) 14:24
14:24 MilkmanDan joined
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?"
mspo moritz: yes to all of it 14:25
moritz: an explicit compile step allows a lot of this good stuff 14:26
I mean, workflow-wise
moritz aye 14:27
14:27 kyclark_ left
moritz it's something you can do in your build pipeline 14:27
so, first step: have a build pipeline :-)
14:27 canopus left
moritz did I mention that I'm writing a book about that? leanpub.com/deploy 14:28
mspo isn't someone else in here a big gocd fan? 14:29
moritz dunno, if somebody is, please raise your IRC-based voice! :-) 14:30
[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:31
moritz [Coke]: "who uses that anyway?" :-) 14:32
[Coke]: that sucks
mspo what? :)
[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.
mspo better get jenkins up quick
14:33 rudolfochrist joined 14:35 canopus joined
mspo or I guess gocd is free now? 14:35
I will say the jenkins pipeline groovy thing kind of sucks, but mostly because the docs are so bad
14:36 kyclark_ joined 14:39 rudolfochrist left, kyclark_ left 14:40 ptolemarch joined
El_Che mspo: I fear your pain. The groove pipelines are just available to us 14:42
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
El_Che: #jenkins said to do dev on the live editor and work from there
El_Che mspo: our Linux admins told me it's more like a DSL than groovy 14:44
14:44 kyclark_ joined
mspo El_Che: yes 14:45
El_Che: I have an okay rpm-building pipeline with it now, though
El_Che: makes a chroot, builds and rpm, and uploads it to our yum repo 14:46
El_Che mspo: if you're rpm knowledgable, add some distro to my rakudo pkger here: 14:47
damns
copy paste
[Coke] mspo: thanks for the gocd pointer.
El_Che aaah
combination of windows, linux, vms and vim is death to the buffer
sorry
mspo [Coke]: ? 14:48
oh, gocd
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: github.com/nxadm/rakudo-pkg
14:49 eyck joined
El_Che mspo: now you revealed you're pkg-knowledgable :) 14:49
mspo El_Che: did docker become a dependency?
El_Che: I'm a pkgsrc guy in my free itme 14:50
El_Che mspo: no, de docker creates the packages
the packages have no dependencies so far
mspo oh okay
El_Che so as long you have docker you can create packages for all the distros/releases
it's a way to make sure the pkg creator doesn't have to chase dependencies or soils the system at make install 14:52
14:52 wamba left
mspo El_Che: I suppose 14:56
wouldn't it be easier to just make spec and deb files?
or use fpm?
14:56 wamba joined
El_Che mspo: it's fpm 14:57
The docker container is just the needed development packages and the correct libraries 14:58
and docker being docker it's easier to compile 'natively' than crosscompile 14:59
mspo I don't have much background with docker 15:02
been avoiding it
15:07 kurahaupo joined 15:09 kyclark_ left
El_Che mspo: really 15:10
mspo: how can you escape it? The first rule about Docker: you must talk about docker
:)
15:10 jonas3 left 15:13 canopus left, pierre_ left 15:14 lichtkind__ joined 15:17 mcmillhj left 15:18 lichtkind_ left 15:19 wamba left 15:21 canopus joined 15:22 mcmillhj joined
mspo El_Che: I ask the people who push for me to use it about networking 15:27
El_Che: and then the entire conversation tends to shut down pretty quickly
it's weird
I actually have a lot of use cases for thin-provisioned databases and stuff for dev/qa 15:29
but the rest of the overhead bogs the entire effort down to backburner
since making the full leap is a massive effort
at least in my estimation 15:30
but what do I know? no one can answer any questions outside of "I made a web server container"
15:31 yadongz joined
mspo the most boring bit 15:31
dogbert17 o/ #perl6 15:34
m: my class A { has $.a; }; say A.new(a => 5) eqv A.new(a => 5); # should this return True ?
camelia rakudo-moar 83b8b1: OUTPUT«True␤»
15:34 mcmillhj left 15:35 yadongz left
dogbert17 docs.perl6.org/language/operators#infix_eqv claims it should return False, what gives? 15:36
15:38 canopus left
Woodi remebers "assemblies" or something like that... they was trying to sell that "compilations" :> 15:38
15:40 bob777 left 15:42 kyclark_ joined 15:43 kerframil joined 15:45 kyclark_ left
perlpilot dogbert17: I'm going to go with "the docs are wrong" here :) 15:45
ugexe that part of the doc was written before 6.c 15:46
15:46 canopus joined
dogbert17 perlpilot: look like they are. Should the fix be, cut everything from 'For arbitrary objects ...' ? 15:47
15:47 mcmillhj joined
dogbert17 I mean it doesn't seem to be necessary to define your own eqv in this case 15:48
15:51 canopus left
perlpilot I dunno if the fix should just be remove the wrong. Better would be have a little more explanation 15:51
Maybe 15:52
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:54
dogbert17 thanks for the pointer, will have a look (or troll TimToady if he shows up :-) 15:56
15:56 canopus joined 16:02 canopus left, mcmillhj left 16:05 robertle left 16:06 mcmillhj joined 16:10 canopus joined 16:12 domidumont left
grondilu can I use prompt to enter a password? with some option to hide keyboard input or something? 16:13
ugexe no. there is the NativeCall module Terminal::Readsecret though 16:14
16:15 itaipu left
grondilu not related: 16:17
m: sub (|) {}(:foo :bar)
camelia ( no output )
grondilu ^I was not expecting this to be ok
the lack of coma between the parameter looked like a syntax error to me 16:18
I had forgotten it and the last argument was ignored. Took me a moment to see the issue. 16:19
m: say \(:foo)
camelia rakudo-moar 83b8b1: OUTPUT«\(:foo)␤»
grondilu m: say \(:foo :bar)
camelia rakudo-moar 83b8b1: OUTPUT«\(:bar, :foo)␤»
grondilu m: say \(:foo :bar :giz) 16:20
camelia rakudo-moar 83b8b1: OUTPUT«\(:bar, :foo, :giz)␤»
grondilu so it's actually valid syntax? I had no clue.
m: say \(:foo:bar:giz)
camelia rakudo-moar 83b8b1: OUTPUT«\(:bar, :foo, :giz)␤»
grondilu lo
l
jnthn grondilu: Yeah, it's allowed
Maybe for consistency with things like m:g:i/.../ 16:21
But I'm guessing if that was the rationale. :)
grondilu but then I don't quite understand why it did not behave the same way
m: sub (:$foo, :$bar) { say $bar }(:foo:bar) 16:23
camelia rakudo-moar 83b8b1: OUTPUT«True␤»
grondilu m: sub (:$foo, :$bar) { say $bar }(:foo :bar)
camelia rakudo-moar 83b8b1: OUTPUT«True␤»
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␤␤»
grondilu m: sub (:$duh, :$foo, :$bar) { say $bar }(:duh, :foo :bar)
camelia rakudo-moar 83b8b1: OUTPUT«True␤»
grondilu can't reproduce it here
16:25 lostinfog joined 16:28 mcmillhj left, rgrinberg left 16:31 Actualeyes left, yadongz joined 16:34 AlexDaniel left 16:36 yadongz left 16:38 rindolf left, canopus left 16:40 mcmillhj joined 16:44 canopus joined 16:46 zakharyas left 16:47 dakkar left, rindolf joined 16:49 wamba joined 16:50 rindolf left
grondilu which is the best JSON module? I've tried JSON::Fast and apparently it's bad. 16:56
like it couldn't parse a floating point.
16:57 rindolf joined
timotimo uh oh 16:58
that's bad indeed 16:59
please contribute a test case
16:59 rgrinberg joined
timotimo grondilu: because JSON::Fast passes is test suite on my machine at least 17:00
grondilu maybe it's just me being dumb. Can someone check the output of 'say to-json 1e0;'? 17:01
17:02 domidumont joined
timotimo that results in 1e0 17:04
17:04 Actualeyes joined
avuserow I tend to reach for JSON::Tiny since I haven't bottlenecked on json parsing speed yet... 17:04
17:04 raiph left
timotimo in JSON::Tiny, too 17:04
avuserow perl6 -MJSON::Fast -e'say to-json(1e0)' gives me `{"0": null}`
17:05 keix left
timotimo oh! sorry 17:05
you're right
that's super weird indeed :)
17:06 leont__ joined
grondilu once again, I tried to use Perl 6 for something, and I encountered a bug. It's quite concerning. 17:07
17:08 keix joined
grondilu though to be fair at least this one is in a module not in the core. 17:08
17:08 firstdayonthejob joined
avuserow whoa, why does JsonC indirectly pull in DBIish (via "NativeLibs" apparently)? 17:09
17:10 leont__ left
timotimo and it's my fault :< 17:13
grondilu: new version uploaded 17:14
couldn't test it very much, as i have to go AFK right now
grondilu wth 17:15
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:16
oh ok one is marked TODO 17:17
timotimo: well that new version works better, thanks. 17:21
timotimo it was falling through all type tests and concluded "well, this has to be an object, then" 17:22
AFK 17:23
17:32 yadongz joined 17:37 yadongz left 17:43 Longinus joined
Longinus What is <!{ some code }> in grammars? 17:43
m: grammar foo { token TOP { "qq" <!{"x"}> }; }.subparse("qqw<meow").say;
camelia rakudo-moar 83b8b1: OUTPUT«#<failed match>␤»
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"
Longinus: `<!{ code }>` is "evaluate this code and proceed if the result is negative"
or should I say "truthy" resp "falsy"
Longinus m: grammar foo { token TOP { "qq" <!{False}> }; }.subparse("qqw<meow").say; 17:45
camelia rakudo-moar 83b8b1: OUTPUT«「qq」␤»
Longinus masak++ thanks :)
masak `{ code }` is for evaluating code without considering its result
17:45 skarn_ joined 17:52 domidumont left 17:55 Longinus left 17:57 TEttinger joined 18:06 pyrimidine left 18:07 cognominal left 18:08 cognominal joined
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:08
18:09 pyrimidine joined
masak similarly, is there anything I can tell an object so that, from the point of view of `//`, it counts as undefined? 18:11
m: class C { method defined { False } }; my $c = C.new; say $c // "undefined"
camelia rakudo-moar 83b8b1: OUTPUT«undefined␤»
jnthn method defined for the latter, as you just noticed 18:12
For the former, no
masak ok, that answers the second question :)
ok, makes sense
jnthn Whether a parameter is passed is a direct function of the shape of the argument capture, not of the values within it
Unlike, say, JavaScript's default parameters, which iirc look for undefined 18:13
(Fun thing being both are kinda useful behaviors... :)) 18:14
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␤»
jnthn On the argument side there's tricks like |(:$p with $p) or so 18:16
18:19 MilkmanDan left
masak jnthn: agree that both behaviors are useful 18:19
18:19 dalek left 18:20 dalek joined, ChanServ sets mode: +v dalek 18:22 hankache joined, MilkmanDan joined 18:24 girafe joined
hankache m: say "Hola #perl6" 18:25
camelia rakudo-moar 83b8b1: OUTPUT«Hola #perl6␤»
18:27 telex left 18:28 telex joined 18:31 FROGGS joined 18:33 yadongz joined 18:36 kyclark_ joined, domidumont joined 18:38 yadongz left
dalek c: e7998e4 | jnthn++ | doc/Type/IO/Socket/Async.pod6:
Explain NFG + async socket interaction.

Also documents how decoding errors are handled.
18:38
FROGGS o/ 18:39
18:39 cdg left
jnthn Hope that makes sense and I didn't bust the Pod :P 18:39
18:40 Actualeyes left 18:41 sjoshi joined 18:42 grondilu left 18:46 travis-ci joined
travis-ci Doc build failed. Jonathan Worthington 'Explain NFG + async socket interaction. 18:46
travis-ci.org/perl6/doc/builds/158537883 github.com/perl6/doc/compare/261d5...998e4fb9e4
18:46 travis-ci left
El_Che aha 18:48
travis-ci is a 455h0l3 :)
jnthn That...uh...doesn't look like my change :)
El_Che just pops in, tells your build sucks and leaves :) 18:49
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 18:55 girafe2 joined 18:56 girafe left 18:57 labster joined
masak .oO( idea for a bot: randomly pipes up on the channel, says "technology X build failed. Jonathan Worthington" ) 18:58
18:58 sftp left 18:59 sftp joined, sufrostico left
kaare_ El_Che: Matt?? 19:02
19:03 wamba left
stmuk_ gpw2016 Steve Mynott - ‎Simple Perl 6 Fractals and Concurrency 19:03
www.youtube.com/watch?v=0_-2asURWKk
19:05 AlexDaniel joined
timotimo oooh 19:05
timotimo watches
19:06 Ven_ joined 19:07 kyclark_ left 19:08 domidumont left 19:13 kyclark_ joined, kyclark_ left 19:16 darutoko left
timotimo holy jesus, you managed to kernel panic a mac just by calling OpenGL (indirectly) from multiple threads at the same time? 19:19
that's incredible
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"
dogbert17 m: say $*TOLERANCE # should this be doc'ed on the dynvar page? 19:21
camelia rakudo-moar c408e8: OUTPUT«1e-15␤»
stmuk_ timotimo: I haven't tried it recently. My suspicion is its now fixed but it did panic a few months back 19:22
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
El_Che: see www.emacswiki.org/emacs/DvorakKeyboard#toc3
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:25
19:26 smls joined
AlexDaniel El_Che: interestingly, Vim keybindings just fall apart when you start using other layouts… 19:26
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:27
so you're going to win only if drawing a single pixel takes about as much time as generating that pixel takes 19:28
i imagine it's much faster to draw those pixels, so i expect that's how the performance gets wasted so heavily
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? :)
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
timotimo great! :) 19:31
i just now see that someone told you about the same thing. sounds like froggs
no, actually, moritz probably
stmuk_ the busy loop comment at the end?
timotimo yes
and the suggestion to use recv instead of poll
i *think* when you used the supply, you were basically doing the same thing your lock solution used 19:32
AlexDaniel masak: “where does azerty "come from"” – you might want to read this: xahlee.info/kbd/keyboard_layouts.html 19:33
masak: this article is not entirely right but it is some good food for thought
19:34 yadongz joined
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? ;)
smls .race is not supposed automatically resume after an exception, is it? 19:38
19:38 yadongz left
smls Because it does in a program of mine. 19:38
I `die` deep inside a .race.map({ ... }), and the backtrace is printed, but the program continues 19:39
19:39 dwarring joined
smls With just .map({ ... }) the program exists when the exception is thrown 19:40
*exits
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
timotimo stmuk_: you can check out if looping over the channel has the exact semantics you want. i believe it does 19:42
stmuk_ timotimo: thanks 19:43
19:44 hankache left
smls managed to golf it; submitting RT. 19:48
19:48 Xliff_zzzz left
timotimo isn't race in general pretty b0rked at the moment? or was it fixed while i wasn't looking? 19:48
19:49 labster left
smls yeah, i guess this is just another way in which it's borked :P 19:49
masak AlexDaniel: I won't have the tuits to write the post myself. was basically just fantasizing about it :) 19:50
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:51
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!
timotimo of course 19:54
have you seen SDL_RenderSetLogicalSize?
stmuk_ nope 19:55
timotimo it lets you get bigger pixels for free
so even though you're setting individual pixels, you get 2x2 or 3x3 or something
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
stmuk_ that sounds really useful 19:55
timotimo i don't really understand how $wid is supposed to work, what does that do?
hm, it might actually be slower, though 19:57
19:57 mcmillhj left
stmuk_ I think there were just some constants for scaling 19:57
which explains the use of "* 1 *" and other things 19:58
timotimo the performance i get is vastly different :o
stmuk_ I was using v slow h/w about 6 months ago
I also wondered about colour cycling (pure for cosmetic effect) 19:59
timotimo oh my, i can make this script explode with some memory corruption 20:00
20:03 ptolemarch left
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
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 :)
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
20:07 lizmat joined, sjoshi left, nadim_ joined, nadim left
timotimo guess what doesn't crash when run under valgrind 20:07
AlexDaniel perlpilot: unless your new custom keyboard layout makes some of the features of your well thought out editor obsolete ;) 20:09
like hjkl 20:10
20:11 woolfy joined
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:12
tailgate yeah, you eventually rewire your brain enough to stop doing it out of habit 20:13
20:14 zakharyas joined
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:14
20:15 kaare_ left
geekosaur DOS/Windows programming editors have kept them alive 20:16
20:16 cdg joined
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
www.youtube.com/watch?v=MxHYdxE7Vlk
tbrowder hi all 20:19
20:19 smls left
timotimo greetings tbrowder 20:20
masak ohai tbrowder 20:21
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:23
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 left, lizmat joined
tbrowder I was sloppy I know, but that seems like either a bug in the docs or rakudo to me. 20:27
timotimo ah 20:28
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
tbrowder Okay now I'm taking about plain subs defined like this: 20:30
sub foo() is export { say "hi"} 20:31
as opposed to this:
perlpilot tbrowder: you could just put the file up on gist.github.com and show us the real code.
20:32 rindolf left
tbrowder sub bar() is export(:extra) { say "boo"} 20:32
The modules docs calls the (:extra)? 20:33
a named parameter
timotimo oh, you mean named arguments for "is export"
perlpilot tbrowder: aye, those are "tags" for grouping your exports.
tbrowder Exactly. 20:34
timotimo that's for when you want some things to only be available when the "use"r asks for them
tbrowder Correct
20:34 yadongz joined
perlpilot tbrowder: So ... what are you expecting to happen that's not happening? 20:35
tbrowder: and how did you use the module?
tbrowder My point is a sub with an export param masks a sub with no export param.
I'll have to a gist--be back later. Thanks. 20:36
20:36 rindolf joined
perlpilot doesn't understand the "masks" comment 20:37
20:38 yadongz left
geekosaur I'm guessing this is that :foo overrides :DEFAULT, and they really want :MANDATORY 20:39
perlpilot yeah, that's what I was starting to guess too 20:40
or to say use Module :foo, :DEFAULT;
geekosaur yeh
tbrowder ^^
zostay ufobat: btw, I am making progress on p6wapi again... See the recent work on HTTP::Request::Supply 20:45
timotimo any reason why my Channel $c .= new; for $c -> $item { ... } will only run the loop once, setting $item to contain $c? 20:46
zostay See also Issue 35 on zostay/P6W (github.com/zostay/P6W/issues/35)
timotimo it's not so awesome to have to explicitly write .list 20:47
20:53 mcmillhj joined
ufobat zostay++ :D 20:55
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
zostay Agreed, it's too long, I hope to cut it in half before I'm done 21:00
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
forbearance!
21:02 FROGGS left
zostay Which is what I am currently working on 21:02
21:04 zakharyas left
geekosaur I pulled that from the docs fwiw 21:05
docs.perl6.org/language/modules#Ex..._Importing see "main.pl" example at the end 21:06
er, at the end of "is export"
21:09 broquaint left, rgrinberg left 21:13 leont__ joined 21:14 skids left
dalek c: b5552ef | (Tom Browder)++ | doc/Language/modules.pod6:
add emphasis and a bit of extra usage info
21:15
21:17 mcmillhj left 21:24 travis-ci joined
travis-ci Doc build failed. Tom Browder 'add emphasis and a bit of extra usage info' 21:24
travis-ci.org/perl6/doc/builds/158579377 github.com/perl6/doc/compare/e7998...552ef77b3b
21:24 travis-ci left
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
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:29
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:30
er, except write it correctly in the presence of :MANDATORY ;) 21:31
timotimo right
perlpilot anyhow ... time to pick up some groceries and head home.
perlpilot &
tbrowder perlpilot: not quite true I believe, "use Module" will export all undecorated export subs as well as any marked :DEFAULT. 21:32
dalek c: 78f8578 | (Jan-Olof Hendig)++ | doc/Language/operators.pod6:
Fixed some indentation problems
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)
perlpilot & # for real this time
21:33 TheLemonMan left
tbrowder and of course :MANDATORY will also get exported 21:33
ah, gotcha!
perlpilot: I'll take another look--good evening! 21:34
dalek c: 0a7d930 | (Tom Browder)++ | doc/Language/modules.pod6:
update with perlpilot's suggestion
21:37
21:40 acrussell left, travis-ci joined
travis-ci Doc build failed. Jan-Olof Hendig 'Fixed some indentation problems' 21:40
travis-ci.org/perl6/doc/builds/158583147 github.com/perl6/doc/compare/b5552...f8578b0ff7
21:40 travis-ci left, Ven_ left
tbrowder .tell perlpilot look at doc change github.com/perl6/doc/commit/0a7d930cbb 21:42
yoleaux tbrowder: I'll pass your message to perlpilot.
21:44 travis-ci joined
travis-ci Doc build failed. Tom Browder 'update with perlpilot's suggestion' 21:44
travis-ci.org/perl6/doc/builds/158584302 github.com/perl6/doc/compare/78f85...7d930cbba7
21:44 travis-ci left 21:47 rgrinberg joined, _slade_ joined 21:49 kurahaupo left 21:52 yadongz joined 21:56 nadim_ left 21:57 yadongz left 21:59 cpage_ left
dalek c: e06ada1 | (Tom Browder)++ | doc/Language/modules.pod6:
fix typo, add C<> around :DEFAULT
22:00
22:06 yadongz joined 22:08 travis-ci joined
travis-ci Doc build failed. Tom Browder 'fix typo, add C<> around :DEFAULT' 22:08
travis-ci.org/perl6/doc/builds/158589051 github.com/perl6/doc/compare/0a7d9...6ada1ba1fb
22:08 travis-ci left 22:17 yadongz left 22:22 Sgeo joined
timotimo bench: compare HEAD ($_ + $_ * i) for ^100_000 ||| Complex.new($_, $_) for ^100_000 22:26
benchable6 timotimo, starting to benchmark the 1 given commits
timotimo, gist.github.com/b2ae93e9b1a9f29103...ab74a1efa7
22:26 lostinfog left
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 benchable6 left
timotimo :o 22:27
sorry benchable
22:32 lichtkind__ left 22:33 ufobat left
dalek c: 3ac1c04 | (Tom Browder)++ | doc/Language/typesystem.pod6:
tidy minor grammar needs
22:34
22:34 skids joined, Upasaka left 22:37 poohman_ left, firstdayonthejob left 22:41 travis-ci joined
travis-ci Doc build failed. Tom Browder 'tidy minor grammar needs' 22:41
travis-ci.org/perl6/doc/builds/158595657 github.com/perl6/doc/compare/e06ad...c1c04a03e7
22:41 travis-ci left 22:47 itaipu joined 22:48 leont__ left 22:51 edehont joined 22:52 girafe2 left 22:54 spider-mario left 22:58 sufrostico joined 22:59 Upasaka joined 23:00 bjz left 23:02 kerframil left
dalek c: 8a94bc5 | (Tom Browder)++ | doc/Language/typesystem.pod6:
fix two typos, one I created on my last commit
23:02
23:10 travis-ci joined
travis-ci Doc build failed. Tom Browder 'fix two typos, one I created on my last commit' 23:10
travis-ci.org/perl6/doc/builds/158600415 github.com/perl6/doc/compare/3ac1c...94bc5f4a5e
23:10 travis-ci left, Zoffix joined 23:11 Zoffix left, Zoffix joined
Zoffix m: grammar foo { token TOP { {$<Z>.made: "meow"} } }.subparse('').say 23:11
camelia rakudo-moar bc3592: OUTPUT«「」␤»
Zoffix What's the point of this `$<B>=[<?before .>]` portion? github.com/rakudo/rakudo/blob/bc35...r.nqp#L127 23:12
What does it do? My understanding is it can be removed with a simpler<?[.]>, no?
s/removed/replaced/;
*crickets* :) 23:16
TimToady no, that's not hte same 23:18
<?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?
Oh
23:19 edenc joined
Zoffix OK. But how come it's not just <?before .> ? Why is it assigning to $<B> 23:20
Just for clarity that $<B> is used there? 23:21
23:22 yadongz joined
TimToady $<B> represents the exact position before the delimiter, and calls .'!make' on that cursor position 23:23
Zoffix Ah 23:24
TimToady++ thanks
TimToady so it ends up returning that position as the new position, I think
23:25 Upasaka left 23:31 poohman joined 23:36 Upasaka joined 23:37 pierre_ joined, BenGoldberg joined 23:49 canopus left 23:53 pierre_ left 23:55 RabidGravy left 23:56 canopus joined 23:59 benchable6 joined