Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-02-05

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 Kristien Is there a way to do threading without map similar to junctions but on lists?
00:03 Kristien eg foo(⦿@xs, ⦿@ys) would be the same as map &foo, (@xs X @ys)
00:03 psch .u ⦿
00:03 yoleaux U+29BF CIRCLED BULLET [Sm] (⦿)
00:03 psch i need to get a different terminal font it seems
00:03 Kristien Don't know the syntax, if it exists at all.
00:03 psch Kristien: hypers do that
00:03 Kristien ah I see
00:03 psch *should/will
00:04 Kristien cool
00:04 Kristien well
00:04 Kristien time to sleep
00:04 Kristien bye!
00:04 skids joined #perl6
00:26 psch spectesting a fix for [R~]= now
00:31 BenGoldberg joined #perl6
00:32 avuserow_ psch++
00:32 adu joined #perl6
00:32 psch 3 flappy/known fails i think
00:32 BenGoldberg joined #perl6
00:33 psch i'll PR and check with someone tomorrow i suppose
01:03 retupmoca .tell raydiak I just converted the compress/uncompress functions in Compress::Zlib to take Blobs - I probably just broke your code that was using ::Raw
01:03 yoleaux retupmoca: I'll pass your message to raydiak.
01:16 Mouq joined #perl6
01:17 Mouq From Wikipedia/Perl_6: "Rakudo Perl is based on Parrot and NQP (Not Quite Perl), and releases a new version every month".. something is slightly off here :P
01:18 Mouq (If no-one gets to it tomorrow/later tonight, I'll have a go at an edit)
01:23 vendethiel joined #perl6
01:28 TimToady about to board SEA -> SJC
01:29 retupmoca .tell sergot I just made another PR for your openssl stuff...I'm really not trying to harass you, I promise!
01:29 yoleaux retupmoca: I'll pass your message to sergot.
01:35 dayangkun joined #perl6
01:37 yeahnoob joined #perl6
01:43 masak m: sub autocall { say "OH HAI" }()
01:43 camelia rakudo-moar 613c0b: OUTPUT«OH HAI␤»
01:44 masak m: sub autocall { say "OH HAI" }; autocall
01:44 camelia rakudo-moar 613c0b: OUTPUT«OH HAI␤»
01:44 masak first form instead of second -- good style or horrible style?
01:44 masak (I have a situation with a sub `reset_x`, which I call sometimes during a process and always at the start)
01:46 vendethiel joined #perl6
01:48 masak m: for ^5 { .say; NEXT { last } }
01:48 camelia rakudo-moar 613c0b: OUTPUT«0␤1␤2␤3␤4␤»
01:48 masak bug?
01:48 masak m: for ^5 { .say; NEXT { exit } }
01:48 camelia rakudo-moar 613c0b: OUTPUT«0␤»
01:48 masak m: for ^5 { .say; NEXT { return } }
01:48 camelia rakudo-moar 613c0b: OUTPUT«0␤1␤2␤3␤4␤»
01:49 masak that last one, besides wrongly compiling (IMO), did not have the wrong runtime semantics I expected it to.
01:49 masak m: say "A"; return; say "B"
01:49 camelia rakudo-moar 613c0b: OUTPUT«A␤»
01:50 masak m: for ^5 { say "A"; return; say "B" }
01:50 camelia rakudo-moar 613c0b: OUTPUT«A␤»
01:50 masak ok, that's a *separate* bug. `return` should not bind to `NEXT` phasers
01:51 masak m: for ^5 { .say; NEXT { say "A" }; NEXT { return } }
01:51 camelia rakudo-moar 613c0b: OUTPUT«0␤1␤2␤3␤4␤»
01:52 masak seems it's worse than that: `return` in a `NEXT` binds to the iteration.
01:52 * masak submits rakudobug for `last` in a `NEXT` not exiting the for loop
01:52 psch m: for ^5 { .say; LEAVE { return } }
01:52 camelia rakudo-moar 613c0b: OUTPUT«0␤Cannot look up attributes in a type object␤  in block  at src/gen/m-CORE.setting:8979␤  in method reify at src/gen/m-CORE.setting:8943␤  in method gimme at src/gen/m-CORE.setting:9471␤  in method sink at src/gen/m-CORE.setting:9942␤  in block…»
01:53 * masak submits rakudobug for `return` in a `NEXT` working at all outside of a routine
01:54 muraiki_ does anyone here use p6 on windows? what do you guys use for a console emulator? I'm using cmder, but since it doesn't support utf8 my error messages are a bit funky where there should be symbols
01:54 muraiki_ for instance: Unable to parse expression in block; couldn't find final '}' <BOL>ΓÅÅ<EOL>
01:54 muraiki_ I figure "ΓÅÅ" should probably be something else, heh
01:55 masak probably :)
01:55 masak muraiki_: jnthn is on Windows, but I think he went to sleep.
01:55 muraiki_ d'oh
01:55 muraiki_ thanks though :)
01:55 psch from his talks it looks like he's using cmd.exe
01:55 masak he is.
01:55 muraiki_ yeah, I get the same result in cmd.exe
01:55 masak should look better there
01:56 masak maybe it's some setting somewhere?
01:56 psch istr someone mentioning setting it to utf-8 not working properly with some input devices, but haven't heard anything about displaying being broken
01:57 psch i.e. ~ doesn't get displayed properly when typed from a french keyboard or something like that
01:57 muraiki_ well, the default windows 7 command prompt doesn't seem to have many settings at all :(
01:57 muraiki_ I'll ask him tomorrow, thanks guys :)
01:57 muraiki_ I'm just being too lazy to boot up my ubuntu vm
01:57 masak m: my $c = 3; while $c { say $c--; NEXT { last } };
01:57 camelia rakudo-moar 613c0b: OUTPUT«3␤2␤1␤»
01:58 psch muraiki_: cmd /k chcp 65001 (says http://stackoverflow.com/questions/14109024)
01:58 psch ah, no
01:58 psch /K
01:59 muraiki_ psch: still broken :(
02:00 masak m: sub foo { for ^3 { NEXT { return $_ } }; return 42 }; say foo
02:00 camelia rakudo-moar 613c0b: OUTPUT«0␤»
02:00 masak ...but *inside* a routine it seems to do the right thing. weird.
02:01 muraiki_ well, changing the font from the horrible system font did give me a single square instead of ΓÅÅ, but still not a useful error message :)
02:01 muraiki_ maybe I just need the right font
02:01 psch muraiki_: good luck :)
02:03 colomon joined #perl6
02:03 masak p6: for ^5 { .say; NEXT { say "A" }; NEXT { return } }
02:03 camelia rakudo-{parrot,moar} 613c0b: OUTPUT«0␤1␤2␤3␤4␤»
02:04 muraiki_ p6: sub {
02:04 camelia rakudo-{parrot,moar} 613c0b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unable to parse expression in block; couldn't find final '}' �at /tmp/tmpfile:1�------> [32msub {[33m�[31m<EOL>[0m�»
02:05 dalek roast: 8fce170 | peschwa++ | S03-metaops/reverse.t:
02:05 dalek roast: Add a test for [R~]=. avuserow++ for spotting this.
02:05 dalek roast: review: https://github.com/perl6/roast/commit/8fce17090b
02:05 * psch hopes he didn't mess up the fudge syntax again
02:07 psch args
02:08 dalek roast: b7c727a | peschwa++ | S03-metaops/reverse.t:
02:08 dalek roast: Correct plan.
02:08 dalek roast: review: https://github.com/perl6/roast/commit/b7c727a866
02:14 vendethiel joined #perl6
02:22 colomon joined #perl6
02:27 nbrown joined #perl6
02:39 chunshengster joined #perl6
02:39 masak 'night (again), #perl6
02:46 vendethiel joined #perl6
02:48 ilbot3 joined #perl6
02:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
03:10 vendethiel joined #perl6
03:18 Patterner joined #perl6
03:28 noganex_ joined #perl6
03:29 adu joined #perl6
03:33 raydiak m: say @( Any, Mu, Nil, Int )
03:33 yoleaux 01:03Z <retupmoca> raydiak: I just converted the compress/uncompress functions in Compress::Zlib to take Blobs - I probably just broke your code that was using ::Raw
03:33 camelia rakudo-moar 613c0b: OUTPUT«(Any) (Mu) (Int)␤»
03:33 raydiak .tell retupmoca awesome! thanks for the heads-up :)
03:33 yoleaux raydiak: I'll pass your message to retupmoca.
03:34 adu p6: say Any.new().perl
03:34 camelia rakudo-{parrot,moar} 613c0b: OUTPUT«Any.new()␤»
03:34 adu p6: say Any.perl
03:34 camelia rakudo-{parrot,moar} 613c0b: OUTPUT«Any␤»
03:54 telex joined #perl6
03:57 alini joined #perl6
04:00 muraiki_ night perl6
04:10 colomon joined #perl6
04:15 Mouq joined #perl6
04:18 jack_rabbit joined #perl6
04:27 vendethiel joined #perl6
04:30 kaleem joined #perl6
05:03 * TimToady home
05:04 * PerlJam is listening to TimToady's interview with Miyagawa right now  :)
05:05 TimToady if it sounds a little brain-burned, I'd just given my talk :)
05:09 PerlJam The mention of "6.0" sounds a little weird in light of recent discussion.
05:10 BenGoldberg joined #perl6
05:11 BenGoldberg joined #perl6
05:12 anaeem1_ joined #perl6
05:15 BenGoldberg joined #perl6
05:19 BenGoldberg joined #perl6
05:20 * Humbedooh hopes it's not one of those leap years again where december 2015 actually falls on a Monday....in 2017 :)
05:21 BenGoldberg joined #perl6
05:28 * PerlJam .zZZ  &
05:31 jack_rabbit joined #perl6
05:54 jack_rabbit joined #perl6
06:11 Rounin joined #perl6
06:17 SamuraiJack joined #perl6
06:23 davido__ joined #perl6
06:38 dayangkun joined #perl6
06:50 fhelmberger joined #perl6
06:56 Guest1337 joined #perl6
07:13 Guest1337 Hi there! Is there a historical account of Perl 6 development, a recent-ish blog post perhaps? Article [1] by chromatic tells only one side of the story and it's not very detailed to boot. Maybe it should be written, I think it's the right time. 1) http://outspeaking.com/words-of-technology/why-perl-didnt-win.html
07:18 denis_boyun joined #perl6
07:19 [Sno] joined #perl6
07:24 darutoko joined #perl6
07:35 El_Che Guest1337: stick around. The core devs are here, some probably still sleeping, some afk :).
07:43 rindolf joined #perl6
07:46 diana_olhovik joined #perl6
07:55 anaeem___ joined #perl6
07:55 gfldex joined #perl6
07:56 Sir_Ragnarok joined #perl6
07:57 FROGGS joined #perl6
08:04 denis_boyun joined #perl6
08:04 [Tux] nine, in Inline::Perl5, what would be the syntax for «$sth.bind_columns (\my $count);»
08:04 coffee` joined #perl6
08:05 * [Tux] is creating an example for the folk on the DBI ML
08:05 [Tux] works except for that
08:07 zakharyas joined #perl6
08:08 kjs_ joined #perl6
08:08 kaleem joined #perl6
08:13 konsolebox joined #perl6
08:15 abraxxa joined #perl6
08:21 kaleem joined #perl6
08:26 trone joined #perl6
08:31 abraxxa1 joined #perl6
08:46 Kristien joined #perl6
08:47 Kristien merhaba
08:49 _mg_ joined #perl6
08:57 jnthn morning, #perl6
08:58 lizmat good *, #perl6
08:58 lizmat in case people missed it: http://blogs.perl.org/users/ovid/2015/02/a-little-thing-to-love-about-perl-6-and-cobol.html
08:58 Kristien I like how the URL doesn't have the parentheses.
08:58 jnthn That was a nice post :)
08:59 Kristien picture clauses are funny
09:00 Kristien making them rationals is a rational thing to do
09:01 anaeem1_ joined #perl6
09:02 Kristien Perl 6 is well-designed.
09:02 testo joined #perl6
09:11 Ovid_ labster: if you’re still here, thanks for the correct. I’ve updated my post.
09:12 Ovid_ I love how some people on HN were asking what the “tapeworm operator” was :)
09:13 Kristien lol
09:17 espadrine joined #perl6
09:17 espadrine joined #perl6
09:18 torbjorn nice read, that feature actually bit us yesteerday during the NativeCall workshop, as we couldn't pass rational numbers to native c functions (used scientific notation to force Num)
09:18 dalek doc: 1c85896 | paultcochrane++ | lib/Language/glossary.pod:
09:18 dalek doc: Typographical etc. corrections to glossary.pod
09:18 dalek doc: review: https://github.com/perl6/doc/commit/1c8589622e
09:18 dalek doc: fbac250 | paultcochrane++ | lib/Language/glossary.pod:
09:18 dalek doc: Wrap paragraphs consistently in glossary.pod
09:18 dalek doc: review: https://github.com/perl6/doc/commit/fbac250c1a
09:18 dalek doc: 1124b3c | paultcochrane++ | lib/Language/glossary.pod:
09:18 dalek doc: Uncuddle an else in glossary.pod example
09:18 dalek doc: review: https://github.com/perl6/doc/commit/1124b3c5b7
09:18 dalek doc: 1891a12 | paultcochrane++ | lib/Language/grammars.pod:
09:18 dalek doc: Typographical etc. corrections to grammars.pod
09:18 dalek doc: review: https://github.com/perl6/doc/commit/1891a12e12
09:18 dalek doc: 3c20a9f | paultcochrane++ | lib/Language/grammars.pod:
09:18 dalek doc: Wrap paragraphs consistently in grammars.pod
09:18 dalek doc: review: https://github.com/perl6/doc/commit/3c20a9f4fb
09:19 kjs_ joined #perl6
09:21 fhelmberger joined #perl6
09:22 [ptc] m: say "\x{1F4A9}\x{0327}"
09:22 camelia rakudo-moar 613c0b: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized backslash sequence: '\x'�at /tmp/8ZgoNcbMTU:1�------> [32msay "\[33m�[31mx{1F4A9}\x{0327}"[0m�Unable to parse expression in block; couldn't find final '}' �at /tmp/8ZgoNcbMTU:1�------> [32msay …»
09:23 [ptc] was worth a try...
09:24 grondilu joined #perl6
09:29 grondilu talking about Rat, that's indeed a nice feature of Perl 6.  I wonder if that will be copied from in other future languages.  Also, the blog post above reminded of a perlmonk post of mind in 2012: http://perlmonks.org/?node_id=1004081
09:29 Kristien I've had this idea a long time ago
09:29 grondilu s/post of mind/post of mine/
09:29 jnthn m: say "\x[1F4A9]\x[0327]"
09:29 camelia rakudo-moar 613c0b: OUTPUT«????̧␤»
09:30 jnthn bah, my font has the combiner, but not the base char...
09:30 FROGGS same here
09:30 grondilu IIRC the main reason rationals were not used previously was that they were too computationally expensive.  I suppose it's not much of an issue anymore these days.
09:31 grondilu (I mean, one can always force floating points when performance is an issue)
09:31 Kristien grondilu: in that case one should at least consider decimal floats
09:32 grondilu Kristien: decimal floats need a parameter and are thus less elegant.
09:32 Kristien not necessarily
09:32 Kristien in C# they don't
09:32 grondilu plus decimal floats can't handle 1/3 and stuff
09:32 Kristien that's true, but you cannot express 1/3 as a single literal anyway
09:32 Kristien literals losing precision is silly
09:33 grondilu I'd argue that 1/3 *is* a litteral.
09:33 Kristien In Clojure it is. :P
09:34 grondilu plus decimal numbers are kind of a anthropomorphism :)   Rationals are more "pure".
09:37 Ugator joined #perl6
09:37 FROGGS nude, even
09:39 Kristien FatRat.nude
09:39 * grondilu wonders something about Rat literals
09:39 Kristien for people who like nude fat rats
09:39 grondilu m: say .WHAT given <1/3>
09:39 camelia rakudo-moar 613c0b: OUTPUT«(Str)␤»
09:40 * grondilu was expecting (Rat)
09:40 pdcawley joined #perl6
09:41 grondilu m: say <2/6>.perl
09:41 camelia rakudo-moar 613c0b: OUTPUT«"2/6"␤»
09:41 grondilu S02 says that should return <1/3>
09:42 Kristien that'd be weird
09:42 Kristien a special case of < ... >
09:42 grondilu it's the Rat literal form
09:42 timotimo yes, NYI
09:43 Kristien (1/3) does the job fine
09:43 FROGGS m: say (2/6).perl
09:43 camelia rakudo-moar 613c0b: OUTPUT«<1/3>␤»
09:43 FROGGS grondilu: ^^
09:43 timotimo though i suppose with a little bit of Grammar.nqp change that could easily be made to work?
09:43 Kristien compiler can optimise it to literal instead of division when it so desires
09:43 Kristien .perl should be fixed instead
09:44 timotimo the optimizer already constant-folds literal Rats into Rat objects
09:44 FROGGS m: say (2/6).WHAT
09:44 camelia rakudo-moar 613c0b: OUTPUT«(Rat)␤»
09:44 grondilu surely there is a reason the spec decided the <..> form for Rat literals.
09:44 timotimo the rule is simply <[1-9]><[0-9]>* '/' <[1-9]><[0-9]>* between the <...>?
09:44 FROGGS m: say (2/6).WHAT; say (2/6).perl.EVAL.WHAT # rakudobug
09:44 camelia rakudo-moar 613c0b: OUTPUT«(Rat)␤(Str)␤»
09:44 dakkar joined #perl6
09:45 Kristien I could imagine someones reaction: "WHAT?!"
09:45 FROGGS WAT
09:45 grondilu the .perl method returns a form that is NYI.  Not sure this is wrong.
09:45 coffee` WAT
09:45 Kristien a WAT slang would interpret javascript code
09:46 Kristien "slang" is Dutch for "snake"
09:47 jnthn ORM is Swedish for "snake" :P
09:47 jnthn I can't believe I haven't made a bad pun on that in some talk about OR-mapping yet... :)
09:48 rurban_ joined #perl6
09:50 Kristien m: sub tap(&f, $x) { &f($x); $x }; 1..5 ==> map({tap(&say, $_)}) ==> map(* * 2) ==> say()
09:50 camelia rakudo-moar 613c0b: OUTPUT«1␤2␤3␤4␤5␤2 4 6 8 10␤»
09:51 * timotimo has a naive patch
09:51 timotimo ... which doesn't compile :)
09:51 jnthn timotimo: Did you check if STD handles it?
09:51 jnthn if/how...
09:51 timotimo oh
09:51 timotimo i didn't
09:51 timotimo good point
09:52 ven std: role Base[::T]{}; say Base[Int]::T
09:52 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/Vdaxusz49i line 1:â�¤------> [32mrole Base[::T]{}; say Base[Int]:[33mâ��[31m:T[0mâ�¤    expecting any of:â�¤    coloncircumfixâ�¤ signatureâ�¤Parse failedâ�¤FAILED 00:01 143mâ�¤Â»
09:52 ven so it doesn't parse in std either.
09:52 FROGGS Ovid_++
09:53 jnthn ven: I...don't expect that to parse.
09:53 timotimo i don't see it handle that
09:53 jnthn timotimo: Yeah, me either...I wonder if the design docs actually say it's just that a <...> style quote is given a pass through val(...)
09:53 timotimo i think so
09:54 grondilu talking about literals, is there a form of q[] for them?  like:  my @numbers = <3.14e0 -1i 3/2 65>; where @numbers would contain items of Num, Complex, Rat and Int?  I know I could right my @numbers = 3.14e0, -1i, 3/2, 65;  but using a quote operator would be nice.
09:54 grondilu s/could right/could write/  # what a silly typo
09:55 ven m: role Foo { subset Bar of Int }; say Foo::Bar.perl;
09:55 camelia rakudo-moar 613c0b: OUTPUT«Could not find symbol '&Bar'␤  in method <anon> at src/gen/m-CORE.setting:14599␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2741␤  in any find_method at src/gen/m-Metamodel.nqp:988␤  in block <unit> at /tmp/wlI_qeQvE_:1␤␤»
09:55 Kristien are the passengers of the plane all wright?
09:55 ven m: role Foo { subset Bar of Int }; say Foo.Bar.perl;
09:55 camelia rakudo-moar 613c0b: OUTPUT«No such method 'Bar' for invocant of type 'Foo'␤  in block <unit> at /tmp/h_KWW0BOIz:1␤␤»
09:55 FROGGS Kristien: :P
09:55 ven m: role Foo { our subset Bar of Int }; say Foo::Bar.perl;
09:55 camelia rakudo-moar 613c0b: OUTPUT«Could not find symbol '&Bar'␤  in method <anon> at src/gen/m-CORE.setting:14599␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2741␤  in any find_method at src/gen/m-Metamodel.nqp:988␤  in block <unit> at /tmp/Bz9pAVszqZ:1␤␤»
09:56 FROGGS grondilu: why don't you just corner brackets and put commas in between?
09:56 FROGGS I mean, quoting constructs are about quoting (==stringifying) things
09:56 timotimo jnthn: would you accept a stop-gap solution that'll introduce a little rule in the grammar that'll call &infix:</> for things that look like integer / integer inside < >?
09:57 grondilu FROGGS: yeah, good point.  quoting should return strings indeed.
09:57 timotimo (if and only if it doesn't break any spec tests)
09:57 Kristien how do you type corner brackets :(
09:58 FROGGS timotimo: <3/2> looks too magical to me
09:58 FROGGS Kristien: as usual? :D
09:58 grondilu FROGGS: but it's spec !?
09:58 FROGGS grondilu: does not mean it is sane
09:58 Kristien FROGGS: oh []? I thought those Japanese ones
09:58 FROGGS grondilu: every bit of the design docs that is not yet implemented by any of the compilers is questionable IMO
09:59 timotimo FROGGS: but it's specced?
09:59 FROGGS Kristien: I meant, < >
09:59 Kristien ohh
09:59 FROGGS timotimo: it is *designed*
09:59 timotimo er
09:59 timotimo correct
09:59 jnthn FROGGS++ :)
09:59 grondilu well, that'd explain why it's NYI.  I suppose you're not the only one who question the idea.
09:59 jnthn timotimo: I'm not sure, off hand.
09:59 FROGGS spec means roast which means that either Pugs, niecza or rakudo implemented it
10:00 jnthn m: val()
10:00 camelia rakudo-moar 613c0b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/IQmVzvLvGHâ�¤Undeclared routine:â�¤    val used at line 1â�¤â�¤Â»
10:00 jnthn Hmm, we have nothing on that yet
10:00 timotimo correct
10:00 timotimo nothing at all
10:00 jnthn timotimo: Thing is, I think it's meant to be a RatStr, not just a Rat?
10:01 timotimo now
10:02 timotimo no*
10:02 timotimo Any such literal, when written without spaces, produces a pure numeric value without a stringy allomorphism. Put spaces to override that:
10:02 timotimo <1/2>       # a Rat
10:02 timotimo < 1/2 >     # a RatStr
10:02 timotimo http://design.perl6.org/S02.html#Allomorphic_value_semantics
10:02 jnthn Oh...
10:02 timotimo i have a failure in "weird-errors" and "start.t", but otherwise 5 todos passed
10:02 timotimo i'll just push it to a branch, because i'll have to AFK again
10:03 jnthn The "any such literal" suggests that it extends to all Numeric forms?
10:03 jnthn If so, can we (in the Action method for a <...> quote), do:
10:03 jnthn if [it's just a single value not a list] {
10:04 timotimo as in "doesn't have a space in it at all"? that sounds like something nibblish
10:04 timotimo but yeah, there ought to be a branch for complex numbers there, too
10:04 jnthn try { ...call .Numeric on the string, if we are successful then add result as a constant and update the QAST we'll produce }
10:04 jnthn }
10:04 jnthn m: say "1/2".Numeric.WHAT
10:04 camelia rakudo-moar 613c0b: OUTPUT«(Rat)␤»
10:04 jnthn m: say " 1/2".Numeric.WHAT
10:04 camelia rakudo-moar 613c0b: OUTPUT«(Rat)␤»
10:04 jnthn Ah
10:05 jnthn Darn, that is soft on whitespace...
10:05 timotimo that'd be "doesn't have spaces"
10:05 jnthn Yeah, but maybe we can check if the string contains whitespace as part of the initial "if"
10:05 timotimo also not sure how <1 / 5> is supposed to work
10:05 jnthn I'm quite sure we don't want the .Numeric logic implemented in two places.
10:05 jnthn So I'm reluctant to go special-casing it in the grammar.
10:06 Kristien special cases break generic code
10:06 jnthn Right.
10:06 jnthn Do it with .Numeric and we get the complex and so on for free also.
10:06 dalek rakudo/angular_bracket_literal_semantics: b49d943 | timotimo++ | src/Perl6/ (2 files):
10:06 dalek rakudo/angular_bracket_literal_semantics: this is how <1/5> could produce a Rat directly.
10:06 dalek rakudo/angular_bracket_literal_semantics: review: https://github.com/rakudo/rakudo/commit/b49d943917
10:06 timotimo that's fair.
10:07 timotimo i could have just not pushed this branch then :)
10:07 jnthn otoh, you could have your grammar rule call <numeric>
10:07 jnthn '<' ~ <numeric> ~ '>'
10:07 timotimo you mean '<' ~ '>' <numeric> :)
10:07 jnthn And that probably also re-uses some logic.
10:07 jnthn uh, yes
10:07 jnthn But
10:07 jnthn wait, don't use ~
10:07 jnthn 'cus we don't want to explode
10:08 jnthn We just want to parse it as a normal quote in that case
10:08 timotimo it already uses ~ around the alteration
10:08 jnthn Ah
10:08 FROGGS timotimo: I record that for the ticket
10:09 grondilu what about '<' ~ <numeric> % \s+ ~ '>'?  Would that be acceptable?
10:09 jnthn That's probably better still
10:09 jnthn grondilu: That looks like a % without a quantifier to modify... :)
10:09 timotimo our <number> doesn't handle Rat at all, though
10:09 jnthn Yeah, and nor STDs, looking at it. Huh. :)
10:09 timotimo so far we've constructed Rat through constant folding
10:09 jnthn oh wait, it does
10:10 timotimo (like my proposed code does right now)
10:10 jnthn The heck, STD has three rules in the numeric category but never calls <numeric> anywhere
10:10 grondilu I mean if I want to put rat literals in an array, I have to write something like:  my @rats = <1/2>, <3/4>, <-5,3>;  That's kind of ugly.
10:10 jnthn Ah, comment says:
10:10 jnthn # <numeric> is used by Str.Numeric conversions such as those done by val()
10:11 * grondilu meant <-5/3>
10:11 timotimo grondilu: no, you can just let the constant folder do it for you
10:11 jnthn Which again implies we want val here...
10:11 timotimo oh, negative rats don't get parsed here at all yet
10:11 _mg_ joined #perl6
10:11 timotimo yay for special cases :)
10:11 jnthn Except we somehow need it to not produce the allomorph in this case.
10:11 jnthn Hmm.
10:11 jnthn :)
10:12 grondilu m: say <1/2 3/4 -5/3>».Rat;
10:12 camelia rakudo-moar 613c0b: OUTPUT«0.5 0.75 -1.666667␤»
10:12 FROGGS timotimo: you can close a ticket when you are done :o) #123741
10:12 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123741
10:12 grondilu (I guess I can use ».Rat)
10:13 timotimo oh ,you want spaces instead of commas
10:13 timotimo right
10:13 Kristien m: say <1/2 3/4 -5/3>>>.Rat
10:13 camelia rakudo-moar 613c0b: OUTPUT«0.5 0.75 -1.666667␤»
10:13 grondilu (which is what I often do on RosettaCode, for instance anyway)
10:13 timotimo is qw supposed to put multiples through val() as well?
10:13 timotimo like >>.&val()?
10:13 timotimo my AFK time has come :)
10:15 _mg_ joined #perl6
10:15 dalek rakudo/angular_bracket_literal_semantics: fd7089b | timotimo++ | src/Perl6/Grammar.nqp:
10:15 dalek rakudo/angular_bracket_literal_semantics: allow negative numbers in Rat, too.
10:15 dalek rakudo/angular_bracket_literal_semantics: review: https://github.com/rakudo/rakudo/commit/fd7089bceb
10:15 grondilu no matter how I look at it, there is no way to avoid a slight inconsistency anyway, for <1/2> is a degnerate case of the qw[] operator, isn't it?
10:16 timotimo anyway, it'd do as a first approximation to val() to do it like this, but jnthn's suggestions would be saner all in all
10:16 timotimo grondilu: it's designed to bypass the qw[], though, IIUC
10:17 andreoss joined #perl6
10:17 abraxxa joined #perl6
10:17 timotimo because qw doesn't get told whether it was < 1/5 > or <1/5>, i.e. it ignores whitespace around the arguments
10:17 grondilu .oO( maybe we should just have a ql[] operator. "quote-literal" or something )
10:18 timotimo got you covered
10:18 timotimo q:val[ ... ]
10:18 timotimo or qw:val[ ]
10:18 diana_olhovik joined #perl6
10:19 grondilu we'd still need a short notation that'd differ from <..>
10:20 grondilu because q:val[1/3] would be way too long
10:23 pecastro joined #perl6
10:32 virtualsue joined #perl6
10:33 kjs_ joined #perl6
10:41 donaldh joined #perl6
10:43 kjs_ joined #perl6
10:52 mikef joined #perl6
10:56 Kristien joined #perl6
11:07 moritz well, the obvious way would be to call it q:v, and that can automatically shortened to qv
11:14 nine [Tux]: let me think loudly here. bind_columns takes a scalar ref and DBI puts the result directly into the referenced variable. If we want to support that, I guess we need a TIEd or otherwise magic variable. As Perl 6 does not have references in this sense anymore, you would have to create an object, Inline::Perl5 recognizes. Maybe something like my $count; my $count_ref is P5Reference($count); or something like that. The question remains: is it worth it? bind_co
11:15 jnthn nine: Note that $count is itself a Scalar that can be assigned into
11:16 [Tux] If it worth it is up to you. If you want to support DBI (and Text::CSV_XS) - yes, it is
11:16 jnthn nine: I suspect it's just that it gets dereferenced normally to pass the value in the Scalar
11:16 [Tux] but IO is more important
11:17 jest1 joined #perl6
11:18 andreoss should 'perl6 -Mv5' work?
11:18 nine jnthn: bind_col binds a Perl variable and/or some attributes to an output column (field) of a "SELECT" statement.
11:18 jnthn nine: I guess we'd need 1) a way to indicate to Inline::Perl5 not to de-ref it, and 2) to have it pass something with appropriate magic on it so dereferencing or assignment through the reference would actually update the Perl 6 Scalar
11:19 nine jnthn: yes, exactly that's what I meant.
11:19 jnthn I think it could be as simple as p5ref($foo) though, which could wrap the Perl 6 Scalar up in something that is recognized by Inline::Perl5
11:19 nine jnthn: add a trait that Inline::Perl5 recognizes or something like that.
11:20 jnthn nine: I dunno it's a trait; which what I'm proposing you could even p5ref(@foo[42]) to pass a reference to an Array element.
11:20 jnthn s/which/with/
11:20 nine I really do question the value of this in the DBI context (because like I said, bind_col is for speed, and this is never going to be fast). But there will be lots of other use cases where some API requires you to pass a scalar ref for output
11:21 nine jnthn: oh, yes, that's even better, you're right
11:23 andreoss m: use v5; print localtime;
11:23 camelia rakudo-moar 613c0b: OUTPUT«===SORRY!===␤Could not find Perl5 in any of: /home/camelia/rakudo-inst-2/languages/perl6/lib, /home/camelia/rakudo-inst-2/languages/perl6␤»
11:25 [Tux] bind_columns indeed is used mainly for speed, but *also* for convenience
11:25 * [Tux] tries to find a link to the example
11:26 [Tux] https://metacpan.org/pod/DBI#bind_columns => second code snippet
11:27 [Tux] here you fetch into the elements of a hash. The advantage is that the hash can contain *more* elements that will not be affected by the fetch
11:27 [Tux] when using fetchrow_hashref, one gets a new hash
11:28 [Tux] using additional element, the hash can have "common" elements to all records that are not affected by fetches
11:28 konsolebox joined #perl6
11:29 nine [Tux]: thanks for bringing up these use cases :) Looking forward to implementing the support. Not in the next few days though. Cought me a really nasty cold at FOSDEM and am on sick leave now.
11:29 kjs_ joined #perl6
11:29 [Tux] glad to be of help
11:30 [Tux] I really found it a wonderful opportunity to try to explain a lot of use-cases in my perl6 experience to you lot at fosdem
11:30 [Tux] learned a lot
11:30 [Tux] now get me back aka!
11:31 El_Che nine: at fosdem you showed some qt+python bindings. Is that the only way to use a gui toolkit in p6 or are there native bindings planned
11:31 nine El_Che: jnthn++ showed off some Gtk bindings in one of his talks
11:32 nine El_Che: the problem with Qt is the same as for Perl 4: you'd need someone who maintains them.
11:33 nine El_Che: though it should actually not be that hard for Qt, because they do have some interface descriptions that are used to create bindings to several languages. Parsing that and creating Perl 6 wrappers sounds like something Perl 6 is very fit to do
11:39 sqirrel_ joined #perl6
11:41 xfix joined #perl6
11:43 H2O1 joined #perl6
11:43 H2O1 left #perl6
11:45 konsolebox joined #perl6
12:28 anaeem1 joined #perl6
12:30 moritz https://news.ycombinator.com/item?id=9000678 top-most comment is about dropping the "Perl" from "Perl 6". Again. Sight
12:30 moritz somebody please write an FAQ for that?
12:39 rmgk_ joined #perl6
12:39 FROGGS .u "\x[1F4A9]\x[0327]"
12:39 yoleaux U+0022 QUOTATION MARK [Po] (")
12:39 yoleaux U+0030 DIGIT ZERO [Nd] (0)
12:39 yoleaux U+0031 DIGIT ONE [Nd] (1)
12:39 FROGGS m: say "\x[1F4A9]\x[0327]"
12:39 camelia rakudo-moar 613c0b: OUTPUT«????̧␤»
12:39 FROGGS .u ????̧␤
12:40 yoleaux U+0327 COMBINING CEDILLA [Mn] (◌̧)
12:40 yoleaux U+2424 SYMBOL FOR NEWLINE [So] (␤)
12:40 yoleaux U+1F4A9 PILE OF POO [So] (????)
12:41 andreoss joined #perl6
12:42 _mg_ joined #perl6
12:42 Peter_R moritz, having an FAQ saying "this topic has been discussed before" is not doing to stop people newly discovering it from bringing up, what is to them, such a ridiculous issue
12:44 nine Being on sick leave, I suddenly appreciate getty's "What TV series should we watch next?" lightning talk much more. Apparently I really did take notes.
12:45 moritz Peter_R: well, it could address a few common points, and state the position of the Perl 6 community towards a rename
12:46 moritz nine: I can highly recommend "Lillyhammer" (US-Norwegian co production)
12:46 moritz and it's only 2x 8 episodes or so
12:46 Peter_R Certainly worth doing if someone wants to, just think it will be pretty ineffective :D
12:46 moritz (I've only watched the first season though)
12:47 arnsholt Orphan Black is cool too
12:47 nine moritz: thanks! I'll try to get it
12:47 timotimo El_Che: we have GTK::Simple, which is no tmuch, but it's a start
12:48 timotimo El_Che: i've been putting a bit of work into that, but regretfully I lacked motivation as nobody was using it and i had no big use for it either so far
12:48 timotimo and ideally, we'd have a binding for GTK and friends that's based on gobject introspection data
12:49 mvuets joined #perl6
12:49 El_Che timotimo: thx, I'll look into it
12:52 timotimo i'd be glad to hear of more use cases and what kinds of trouble you run into with that library (for example: lack of documentation ... but there are examples!)
12:55 zakharyas joined #perl6
13:03 timotimo Ovid_: i wonder why you showed 3.1415927.Rat instead of showing pi.Rat, which is more interesting IMO
13:04 timotimo m: say pi.Rat.perl
13:04 camelia rakudo-moar 613c0b: OUTPUT«<355/113>␤»
13:04 timotimo m: say 3.1415927.Rat.nude
13:04 camelia rakudo-moar 613c0b: OUTPUT«31415927 10000000␤»
13:05 timotimo m: say 3.1415927 - pi
13:05 camelia rakudo-moar 613c0b: OUTPUT«4.64102067887495e-08␤»
13:05 timotimo m: say 3.1415927.Rat - pi.Rat
13:05 camelia rakudo-moar 613c0b: OUTPUT«-0.00000022035␤»
13:05 timotimo m: say (3.1415927.Rat - pi.Rat).Num
13:05 camelia rakudo-moar 613c0b: OUTPUT«-2.20353982300885e-07␤»
13:05 timotimo hm.
13:05 Ovid_ timotimo: because I didn’t know about pi.rat? :)
13:05 timotimo m: say 0.12352365.Rat.nude
13:05 camelia rakudo-moar 613c0b: OUTPUT«2470473 20000000␤»
13:05 timotimo m: say 0.1235236.Rat.nude
13:05 camelia rakudo-moar 613c0b: OUTPUT«308809 2500000␤»
13:05 timotimo m: say 0.835236.Rat.nude
13:05 camelia rakudo-moar 613c0b: OUTPUT«208809 250000␤»
13:05 timotimo hrmpf
13:06 timotimo m: say 1.rand.Rat.nude
13:06 camelia rakudo-moar 613c0b: OUTPUT«463 641␤»
13:06 timotimo m: say 1.rand.Rat.nude
13:06 camelia rakudo-moar 613c0b: OUTPUT«474 2111␤»
13:06 Ovid_ Wait, pi.Rat is 355/133? That seems wrong.
13:06 timotimo m: say 1.rand.Rat.nude xx 10
13:06 camelia rakudo-moar 613c0b: OUTPUT«767 867 112 999 461 849 2126 3183 257 1513 37 654 557 780 551 939 151 909 1075 2497␤»
13:06 timotimo you think so?
13:06 timotimo m: say 355e0 / 133e0
13:06 camelia rakudo-moar 613c0b: OUTPUT«2.66917293233083␤»
13:06 timotimo oh, huh?
13:06 timotimo m: say pi.Rat.Num
13:06 camelia rakudo-moar 613c0b: OUTPUT«3.14159292035398␤»
13:06 timotimo m: say pi.Rat.nude
13:06 camelia rakudo-moar 613c0b: OUTPUT«355 113␤»
13:06 timotimo there we go, 113 not 133
13:06 timotimo m: say 355e0 / 113e0
13:07 camelia rakudo-moar 613c0b: OUTPUT«3.14159292035398␤»
13:07 timotimo close enough.
13:07 timotimo m: say pi.perl
13:07 camelia rakudo-moar 613c0b: OUTPUT«3.14159265358979e0␤»
13:07 timotimo m: say pi.FatRat.nude
13:07 camelia rakudo-moar 613c0b: OUTPUT«355 113␤»
13:07 btyler it even has a wiki, interesting: https://en.wikipedia.org/wiki/355/113
13:07 moritz m: say (pi - pi.Rat) / pi
13:07 camelia rakudo-moar 613c0b: OUTPUT«-8.49136787674061e-08␤»
13:07 Ovid_ timotimo: it starts to deviate at 7 decimal places out.
13:07 moritz that's not too bad
13:08 timotimo oh, look, "Perl didn't die from natural causes, Perl was killed by neglect - neglect caused because Perl 6 was always right around the corner and why sink more effort into maintaining Perl 5 than was absolutely necessary?"
13:08 timotimo it's that argument again
13:09 Ovid_ moritz: that’s almost like saying .9999997 isn’t too bad as an approximation for 1, when the point of the blog post was to show that *you* can pick your precision.
13:09 timotimo you can pick your precision here, too. but i forgot how :P
13:09 moritz Ovid_: well, you can't represent sqrt(2) exactly either
13:09 DrForr_ continued fractions FTW.
13:10 moritz Ovid_: ... unless you write a computer algebra system
13:10 moritz Ovid_: same for pi
13:10 FROGGS btyler: https://en.wikipedia.org/wiki/355/113 is a nice read, aye
13:10 timotimo ah
13:11 timotimo m: say pi.Rat; say pi.Rat(0.000000000001)
13:11 camelia rakudo-moar 613c0b: OUTPUT«3.141593␤3.14159265␤»
13:11 timotimo m: say pi.Rat.nude; say pi.Rat(0.000000000001).nude
13:11 camelia rakudo-moar 613c0b: OUTPUT«355 113␤4272943 1360120␤»
13:11 timotimo default epsilon is 1.0e-6
13:11 Ovid_ moritz: that’s my point. Rats can let devs pick the precision they want. 355/113 doesn’t cut it, though that’s only because it’s been coerced to a Rat.
13:11 timotimo m: say pi.Rat(0.1 ** $_).nude for ^10
13:11 camelia rakudo-moar 613c0b: OUTPUT«3 1␤22 7␤22 7␤333 106␤333 106␤355 113␤355 113␤103993 33102␤103993 33102␤103993 33102␤»
13:12 Ovid_ Ah, I didn’t know you could pick the precision with the coercion to a Rat.
13:12 timotimo m: say pi.Rat(0.1 ** $_) for ^10
13:12 camelia rakudo-moar 613c0b: OUTPUT«3␤3.142857␤3.142857␤3.141509␤3.141509␤3.141593␤3.141593␤3.141593␤3.141593␤3.141593␤»
13:12 timotimo m: say pi.FatRat(0.1 ** $_) for ^10
13:12 camelia rakudo-moar 613c0b: OUTPUT«3␤3.142857␤3.142857␤3.141509␤3.141509␤3.141593␤3.141593␤3.141593␤3.141593␤3.141593␤»
13:12 timotimo GTG AFK
13:12 moritz m: say pi.FatRat(0.1 ** 100).perl
13:12 camelia rakudo-moar 613c0b: OUTPUT«FatRat.new(245850922, 78256779)␤»
13:13 moritz m: say pi.FatRat(1e-30).^name
13:13 camelia rakudo-moar 613c0b: OUTPUT«FatRat␤»
13:14 jest1 left #perl6
13:14 moritz m: say (pi - pi.FatRat(1e-20)) / pi
13:14 camelia rakudo-moar 613c0b: OUTPUT«0␤»
13:31 chenryn joined #perl6
13:32 JimmyZ m: say .1e0 + .2e0 - .3e0
13:32 camelia rakudo-moar 613c0b: OUTPUT«5.55111512312578e-17␤»
13:33 JimmyZ m: say .1e0 + .2e0 - .3
13:33 camelia rakudo-moar 613c0b: OUTPUT«5.55111512312578e-17␤»
13:33 JimmyZ m: say .1 + .2 - .3
13:33 camelia rakudo-moar 613c0b: OUTPUT«0␤»
13:33 JimmyZ m: say .1 + .2 - .3e0
13:33 camelia rakudo-moar 613c0b: OUTPUT«0␤»
13:33 JimmyZ m: say .1 + .2e0 - .3e0
13:33 camelia rakudo-moar 613c0b: OUTPUT«5.55111512312578e-17␤»
13:35 JimmyZ ^^ re: http://blogs.perl.org/users/ovid/2015/02/a-little-thing-to-love-about-perl-6-and-cobol.html
13:36 moritz yes, you can mess it up if you try hard enough
13:39 FROGGS JimmyZ: the point is that you have to choose your imprecision, and that you actually can choose
13:40 moritz and you have to be aware of floats to actually fall into their trap
13:44 * masak .oO( the mirror can transfer the stone only to someone who wants to find the stone but not use it )
13:46 FROGGS masak: one of his better ideas :o)
13:46 moritz masak: the IMHO really interesting thing about these kinds of devices is that a powerful wizard seem to be able to create a device that cannot be manipulated by another, equally (or even more powerful) wizard
13:47 moritz a "no workaround" situation
13:47 * FROGGS puts a Fidelius charm around his flat...
13:47 masak could be there's the equivalent of strong encryption for magical items.
13:47 moritz not just here, but also the island where one of the horcruxes was hidden
13:47 masak right.
13:48 moritz the basin where the water had to be drunk
13:48 moritz the boat with the chain that can support only one fully-grown wizard
13:48 moritz etc.
13:48 psch o/
13:48 FROGGS (and an elf)
13:49 FROGGS hi psch
13:49 moritz that's not a fully-grown wizard :-)
13:49 jnthn .oO( If we write an AOT compiler, we can emit an elf whenever we feel like... )
13:49 psch https://github.com/peschwa/rakudo/compare/meta-assign # fixes [R~]=, but i'm not 100% confident in it.  spectest looks clean though
13:51 moritz jnthn: or even a zwoelf
13:51 * FROGGS groans
13:51 psch the issue is, that in [R~]= there's «QAST::Op(call) R~» below «QAST::Op(call &METAOP_ASSIGN)», which apparently is NQPMu
13:52 psch in nom currently, that is
13:53 jnthn psch: I'll have a closer look at it later this evening.
13:53 psch jnthn: alright.  PR is opened as #360
13:53 * jnthn is trying to finish up the slides a couple of hours of evening teaching :)
13:54 telex joined #perl6
13:54 jnthn Turns out my teaching responsibilities for the month are probably over after this evening, though. :)
13:54 * jnthn will have all tomorrow to work on natives stuff o/
13:55 FROGGS \o/
13:55 * FROGGS renames jnthn to sami
13:56 jnthn I already decided one of my conf talks this year is gonna be called "Meet the natives"
13:56 jnthn ...if I can get anyone to accept the submission, at least. :P
13:56 FROGGS *g*
13:58 coffee` joined #perl6
14:10 cdc joined #perl6
14:11 breinbaas joined #perl6
14:11 bcode joined #perl6
14:11 salva joined #perl6
14:13 JimmyZ \o/
14:18 masak m: my %h; %h<foo> ~= "hi"; say %h<foo>
14:18 camelia rakudo-moar 613c0b: OUTPUT«hi␤»
14:18 masak \o/
14:18 moritz m: my %h is default('hi'); say %h<foo>
14:18 camelia rakudo-moar 613c0b: OUTPUT«hi␤»
14:19 Mouq joined #perl6
14:20 moritz m: my %h is default('hi'); %h<foo> ~= 'hi'; say %h<foo>
14:20 camelia rakudo-moar 613c0b: OUTPUT«hihi␤»
14:21 anaeem1_ joined #perl6
14:22 timotimo man, i'd love to annotate every single comment in that HN thread with "btw, in perl6 this is fixed"
14:23 timotimo like "ermergerd, look at $foo->{bar}{baz} that looks so ugly compared to foo.bar.baz in python!!!kk
14:24 pdcawley isn't that foo['bar']['baz'] in python?
14:24 pdcawley Which isn't quite so pretty.
14:24 masak unfortunately, people who cannot get past syntax in that way aren't often worth trying to sway.
14:24 masak in my experience.
14:24 ven pdcawley: nah, that works in python as well as in js
14:24 timotimo pdcawley: "objects are glorified hashes in python as well as perl anyway"
14:25 pdcawley Ah... didn't realise.
14:25 timotimo masak: personally, i don't like the ->{foo} method call(?) syntax in perl5
14:25 timotimo or is that just attribute access?
14:25 jnthn Objects ain't that in Perl 6... :)
14:25 ven timotimo: explicit deref
14:25 ven pdcawley: actually, that's a lie! I read that from a HN comment but it's wrong.
14:25 psch timotimo: methods are coderef attributes in perl5 OO, afaik
14:25 masak timotimo: it's just attribute access. methods are in the package.
14:25 ven yeah, they are, psch
14:25 pdcawley There's a bunch of people who don't actually like syntax at all. But they have scheme.
14:25 * ven has gotten to that part in his perl5 book last night... :)
14:26 ven pdcawley: you can only do that in python if it's an actual instance
14:26 masak ven, psch: methods are subs in the package blessed on the reference.
14:26 ven $foo->{bar} is is like $$foo{bar}, iirc(dereference $foo, then property access)
14:26 pdcawley ven: In which case, you wouldn't do it like $foo->{bar}{baz} in perl, unless you were playing _very_ fast and loose.
14:26 masak of course, nothing prevents you from putting a coderef in an attribute; but that's not the default way to do a method.
14:26 ven pdcawley: but that won't prevent people in HN posting crap :)
14:27 moritz masak: ... and it won't be called for you by normal method call syntax
14:27 masak right.
14:27 pdcawley ven: I can't help with that problem.
14:27 pdcawley "Someone on the Internet is Wrong"
14:27 psch masak: fair enough, i haven't done anything being reading perlootut a few years back
14:27 psch s/being/beyond/
14:27 ven right, right. Went through the HN comments as well and facepalmed. Then remembered why I *never* go to hn
14:27 * moritz has a solution, unfortunately it has some probably unwanted side effects
14:27 timotimo since i don't know any perl5 at all, i'll stop here :P
14:27 andreoss m: my $y ~=~ v1; say $y
14:27 camelia rakudo-moar 613c0b: OUTPUT«1␤»
14:28 masak pdcawley: "Someone is wrong on the internet" -- http://languagelog.ldc.upenn.edu/nll/?p=1159
14:28 ven timotimo: same for me, but then I got a book from wendy :P
14:28 pdcawley masak: Except... "Someone on the internet is wrong" sings so much better.
14:28 pdcawley masak: I know this, because a friend has written that very song.
14:28 masak pdcawley: fair enough.
14:28 masak that's not the URL I wanted, by the way.
14:29 moritz what did you want? xkcd?
14:29 masak language log once made a point of how Randall knew exactly what he did when he put "...on the internet" last like that, even though it isn't the usual way to say it.
14:29 nine Funny thing about such sentences is that Python and Perl 5 really are ridiculously similar.
14:29 ven the xkcd one is linked in the post :P
14:29 nine It's just using different syntax for the exact same constructs.
14:29 pdcawley nine: Indeed so. Python's where TimToady nicked the perl object model from isn't it?
14:30 masak think so.
14:30 masak hard to believe, though.
14:30 masak they work quite differently.
14:32 xfix [14:35] <JimmyZ> ^^ re: http://blogs.perl.org/users/ovid/2015/02/a-little-thing-to-love-about-perl-6-and-cobol.html
14:32 xfix Default Rat is IMO one of best features in Perl 6.
14:33 timotimo someone on the HN thread said he was more fond of using "from decimal import Decimal as D; from fractions import Fraction as F" in python
14:33 timotimo i don't really understand that, i don't think
14:33 xfix So many programming languages did it wrong. Floating point numbers are great for scientific calculations, I agree, but most people expect math to work as they do expect by default (so 0.1 + 0.2 == 0.3).
14:34 xfix xfix=# SELECT 0.1 + 0.2 - 0.3;
14:34 xfix 0.0
14:34 xfix This is what I expect, not some small number.
14:34 andreoss m: my $x  =~() ... 1,2,3; say $x.WHAT
14:35 camelia rakudo-moar 613c0b: OUTPUT«(timeout)»
14:35 [ptc] timotimo: oh, that's not nice Python code (imo)
14:35 masak std: my $x  =~() ... 1,2,3;
14:35 camelia std f9b7f55: OUTPUT«ok 00:01 140m␤»
14:35 * masak thought we had a `=~` op warning
14:36 xfix In Ruby, there is syntactic sugar for rationals, but I will say that it's ugly.
14:36 xfix irb(main):001:0> 145/100r
14:36 xfix => (29/20)
14:36 JimmyZ m: my num $x = .3
14:36 camelia rakudo-moar 613c0b: OUTPUT«This type cannot unbox to a native number␤  in block <unit> at /tmp/PxDhkZPJoO:1␤␤»
14:36 psch std: my $x; $x =~ "foo"
14:36 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/apDhJvVYAG line 1:�------> [32mmy $x; $x =~[33m�[31m "foo"[0m�Parse failed�FAILED 00:00 136m�»
14:36 xfix (oh wait, 1.45r works as well)
14:36 JimmyZ BUG?
14:36 jnthn JimmyZ: NO
14:36 andreoss m: say ()...()
14:36 JimmyZ so I have to add e0?
14:36 jnthn Well, except the (surely already filed) note that this error misses the typename Rat
14:36 jnthn JimmyZ: Yes.
14:36 camelia rakudo-moar 613c0b: OUTPUT«(timeout)»
14:37 masak m: say Rat ~~ num
14:37 camelia rakudo-moar 613c0b: OUTPUT«False␤»
14:37 masak JimmyZ: there's why not.
14:38 xfix People may claim that stuff like https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate aren't bugs, and they are correct, but at the same time, I believe that floating point numbers as default are wrong.
14:38 JimmyZ Thanks :)
14:39 timotimo jnthn: this looks like something i could fix right away. gimme a sec :)
14:39 moritz xfix: they are a design decision, and thus not bugs. By definition. I agree that that they are a bad design decision though
14:39 xfix It should be either rationals (Perl 6), or numbers with specified precision (for example PostgreSQL).
14:39 xfix decimals*
14:40 * colomon is blanking on how to read a directory in p6
14:41 jnthn oh dir
14:41 masak colomon: dir()
14:41 FROGGS xfix: note that SELECT 0.1 + 0.2 - 0.3 seems correct, but it usually does floating point math and will then just round the result
14:41 colomon masak++ jnthn++ # apparently colomon is to dumb to look at the obvious
14:42 timotimo oh damn, i confused the repr name (which is easily available) and the class name (which is not)
14:42 nine Can we aka that to ls()? :)
14:42 xfix FROGGS: In PostgreSQL it doesn't use floating points here.
14:43 xfix xfix=# SELECT cast(0.1e0 AS double precision) + 0.2 - 0.3;
14:43 xfix 5.55111512312578e-17
14:44 * timotimo AFK
14:44 xfix I believe the type is called "double precision" to tell people "don't use if you don't need it".
14:48 xfix (the documentation also explicitly says that if you require exact storage and calculations to use numeric type instead, and says that comparing two floating point numbers for equality may not work as expected)
14:48 donaldh joined #perl6
14:52 JimmyZ m: my Numeric $x = 0.3e0; my Numeric $y = 0.1e0; my Numeric $z = 0.2e0; say $y + $z - $x
14:52 camelia rakudo-moar 613c0b: OUTPUT«5.55111512312578e-17␤»
14:52 retupmoca .botsnack
14:52 yoleaux 03:33Z <raydiak> retupmoca: awesome! thanks for the heads-up :)
14:52 yoleaux :D
14:52 pmurias joined #perl6
14:54 andreoss is it correct that () ends up being Inf in list contexts?
14:54 ven okay people, did google create a THIRD compile-to-js? can we stop them from doing that?
14:55 pmurias ven: what the newest one?
14:55 ven pmurias: "soundscript"
14:55 adu joined #perl6
14:56 JimmyZ http://www.2ality.com/2015/02/soundscript.html
14:56 pmurias ven: so it's atscript, dart, soundscript and the java-to-js?
14:56 ven pmurias: oh uyeah that's 4, even. not 3
14:57 ven I forgot about GWT...
14:57 ven this is completly ridiculous. Let's not forget that m$ has typescript and facebook has flow. Maybe apple will make applescript compile to js? hahahahaha
14:58 ven I guess you can kinda-consider that mozilla has asm.js and their "js 1.8", uh
14:58 pmurias ven: why do you want to stop the compile to js languages?
14:59 JimmyZ .oO( we can compile moarvm to js by using asm.js )
14:59 ven pmurias: I like when things are mature
14:59 ven or at least get time to mature.
15:00 JimmyZ and then we have nqp-js :P
15:00 ven pmurias: mind you, that's from someone working on coffee/livescript
15:00 pmurias soundscript seems like something that might help with nqp-js performance
15:00 * ven afk english exam
15:05 * jnthn away for some hours...
15:10 spider-mario joined #perl6
15:15 lucas__ joined #perl6
15:20 pmurias my git repo got corrupted :(
15:20 masak do you have a recent backup?
15:20 masak how did the corruption happen?
15:20 masak does `git fsck` help?
15:21 pmurias masak: an object file seems to be missing
15:23 pmurias http://pastie.org/9889167
15:23 pmurias masak: I did a git commit missing_file
15:23 pmurias masak: and that cause the corruption for some reason
15:24 Kristien joined #perl6
15:28 masak weird.
15:28 masak maybe ask on #git ?
15:28 moritz pmurias: I'd try to make a complete copy of the repo, and in the copy, try to git reset --hard to a commit before that fatal commit
15:28 kjs_ joined #perl6
15:28 pmurias moritz: I'll just clone and recommit stuff
15:29 [particle] joined #perl6
15:35 timotimo pmurias: can you tell what the object was hung off of?
15:35 hoelzro morning #perl6
15:38 jinxter joined #perl6
15:42 dalek nqp-js: f81f383 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
15:42 dalek nqp-js: Implement nqp::isstr.
15:42 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/f81f383421
15:42 dalek nqp-js: f1c441c | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
15:42 dalek nqp-js: Implement nqp::eqat.
15:42 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/f1c441cd77
15:42 dalek nqp-js: 06561c5 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
15:42 dalek nqp-js: Add tests for nqp::eqat.
15:42 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/06561c58de
15:42 pmurias timotimo: I just salvaged all the changes from the repo
15:42 pmurias timotimo: it seems a bunch of objects got empty
15:43 timotimo OK
15:43 timotimo a few days ago, a whole bunch of things disappeared from my phone :\
15:43 timotimo it seems like it's only music, though
15:46 hoelzro pmurias: if one wanted to help with nqp-js, what would you say the next milestone is?
15:46 hoelzro getting it to compile itself?
15:46 * hoelzro was poking around in nqp-js a bit last night
15:47 psch ~320 lines asm codegen diff /o\
15:47 * psch hopes it actually works
15:49 hoelzro adu, raydiak: you two were talking about a C header parser that could generate bindings to C libraries a few days ago, right?
15:49 pmurias hoelzro: getting in to compile itself is a important major milestone
15:50 hoelzro pmurias: indeed; is that the next milestone, or is there something else along the way?
15:50 pmurias a smaller one is getting things in QASTNode to work
15:50 pmurias and the it's rules
15:50 pmurias s/the/then
15:51 hoelzro hmm...do you have have test code that should work, but currently doesn't?
15:51 hoelzro ah, rules o_O
15:52 hoelzro pmurias: my NQP fu is pretty weak; I was thinking of studying the source to flesh out TODO and HACKING, but I have no idea where to start!
15:52 hoelzro diff(nqp, nqp-js) is basically the JS QAST emitter and src/vm/js, right?
15:52 pmurias yes
15:53 pmurias hoelzro: I should start working on a HACKING file
15:53 Mouq joined #perl6
15:53 hoelzro pmurias: well, I wouldn't mind helping with it, but obviously you are more in the know than I =)
15:54 pmurias hoelzro: what do you want described in the HACKING file?
15:54 PerlJam btw, nine++  Yesterday (and today) I'm using Perl 6 to parse some data and Inline::Perl5 + Excel::Writer:XLSX to build a spreadsheet with that data.
15:54 hoelzro pmurias: I guess where things are, what works differently in the JS implementation compared to others
15:57 timotimo psch: asm codegen? for moarvm?
15:57 timotimo that sounds exciting :3
15:57 psch timotimo: no, still org.objectweb.asm ;)
15:57 psch timotimo: i.e. for jvm
15:58 anaeem1 joined #perl6
15:58 arnsholt org.objectweb.asm is on-the-fly JVM bytecode generation, not assembly =)
15:58 timotimo oh
15:58 timotimo right, you're not brrt %)
15:59 timotimo still sounds nice
15:59 arnsholt It's still pretty neat though
15:59 psch timotimo: well, it's a currently-broken case of marshalling
15:59 timotimo right, the thing with the annotations?
15:59 arnsholt Basically P6opaque instances compile to run-time generated classes with appropriately-typed fields
15:59 psch marshalling of listy types to java methods that aren't overloaded (i.e. don't do the MMD i implemented) are currently broken
15:59 psch s/are/is/
15:59 timotimo oh, we're talking about JVM interop
16:00 timotimo now i'm back on the same page, i think
16:00 arnsholt We also use it to interact with JNA for NativeCall
16:00 timotimo OK
16:01 arnsholt Which lets us avoid writing C glue code with JNI
16:01 anaeem1 joined #perl6
16:01 timotimo o'course
16:01 dalek nqp-js: 2436a42 | (Pawel Murias)++ | TODO:
16:01 dalek nqp-js: Add a TODO item.
16:01 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/2436a425c6
16:01 dalek nqp-js: fed7957 | (Pawel Murias)++ | HACKING:
16:01 dalek nqp-js: Start of a HACKING file.
16:01 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/fed795782a
16:02 nine PerlJam: :)
16:03 anaeem1_ joined #perl6
16:04 Kristien joined #perl6
16:04 dalek perl6-roast-data: a1b8a72 | coke++ | / (5 files):
16:04 dalek perl6-roast-data: today (automated commit)
16:04 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/a1b8a72da4
16:04 Kristien hi there
16:04 PerlJam greetings Kristien
16:06 hoelzro pmurias++
16:10 kaleem joined #perl6
16:11 Kristien joined #perl6
16:11 Kristien I'm going to buy Modern Perl
16:12 Kristien on paper
16:13 skids joined #perl6
16:14 sjxm9203 joined #perl6
16:15 hoelzro what will the Perl 6 book be? Moderner Perl? =P
16:15 * hoelzro .oO( what's the gender of Perl in German? )
16:16 FROGGS hoelzro: neutral
16:16 FROGGS so it would be "Modernes Perl"
16:16 hoelzro perfect, so no confusion =)
16:16 hoelzro I was worried it might be masculine!
16:16 FROGGS or even "Moderneres Perl"
16:16 PerlJam hoelzro: it will just be "Programming Perl 6"  :)
16:17 timotimo "Die Perl"
16:17 FROGGS >.o
16:17 timotimo like "Die GNU Autotools"
16:17 hoelzro timotimo: but that's plural
16:17 timotimo doesn't matter
16:17 timotimo in german, you can always say "Die"
16:17 FROGGS :P
16:17 hoelzro hahah
16:17 hoelzro I wish
16:18 hoelzro when I was learning German, I got pretty good at dropping the volume of my voice when saying the ends of words
16:18 FROGGS hehe, that's a nice trick
16:19 timotimo excellent :D
16:21 dalek nqp-js: 7f1001b | (Pawel Murias)++ | HACKING:
16:21 dalek nqp-js: Start of a compilation overview.
16:21 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/7f1001b94e
16:21 * psch .oO( "Moderndes Perl" )
16:22 * psch .oO( "Das Nachschlagewerk für den Wartungsprogrammier der Perl 4 Codebase!" )
16:22 FROGGS psch: what should that be? *g*
16:22 FROGGS O.o
16:22 FROGGS ahh "Modernd"
16:22 FROGGS hehe
16:22 psch s/ier/ierer/
16:26 timotimo "Mordendes Perl"
16:29 psch i'm unsure about my ifs
16:31 psch i have 12 different cases that share 60% or so of code
16:31 adu joined #perl6
16:31 psch but depending on which case they are they potentially have a few extra statements
16:32 psch so i could shove them in one if #`[[ 12 cases here ]] { &common-code; if $case-one { ... } }
16:32 psch (etc.)
16:32 psch or leave it as 12 branches
16:32 adu hoelzro: yes
16:32 psch i have no idea which one is more clear
16:32 hoelzro adu: I was curious about if you have a plan to handle typedef, esp. bool_t, Bool, BOOL, etc
16:33 hoelzro psch: would you say you're...iffy?
16:33 hoelzro </sunglasses>
16:34 flussence .oO( wouldn't the Perl 6 book be called Postmodern Perl? )
16:34 psch hoelzro: yes.  yes i would, had i thought of the word :)
16:35 dalek nqp-js: 9d92aa8 | (Pawel Murias)++ | HACKING:
16:35 dalek nqp-js: Add more info about how the ops are defined to HACKING.
16:35 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/9d92aa8ea0
16:37 dalek rakudo/nom: fe15ce6 | peschwa++ | src/Perl6/Actions.nqp:
16:37 dalek rakudo/nom: Fix [R~]= discovered by avuserow++.
16:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fe15ce605e
16:37 dalek rakudo/nom: 49e2cd3 | lizmat++ | src/Perl6/Actions.nqp:
16:37 dalek rakudo/nom: Merge pull request #360 from peschwa/meta-assign
16:37 dalek rakudo/nom:
16:37 dalek rakudo/nom: Fix [R~]= discovered by avuserow++.
16:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/49e2cd3319
16:42 kjs_ joined #perl6
16:43 psch thanks lizmat++
16:43 lizmat yw
16:44 psch .tell jnthn lizmat++ merged the [R~]= PR, fyi
16:44 yoleaux psch: I'll pass your message to jnthn.
16:44 lizmat psch: I didn't see any TODO's passing now  :-(
16:44 lizmat :-)
16:45 psch lizmat: because it wasn't tested before and failed.  i have added a test in S03-metaops/reverse.t but skipped
16:45 psch where "failed" means "dies"
16:45 psch err, "died" :)
16:46 lizmat ok, I'll unfudge  :-)
16:46 mst joined #perl6
16:47 dalek roast: 8b36397 | lizmat++ | S03-metaops/reverse.t:
16:47 dalek roast: Unfudge now passing test, psch++
16:47 dalek roast: review: https://github.com/perl6/roast/commit/8b36397f44
16:48 pmurias hoelzro: if you see things in nqp-js that you want described just tell me, it's hard for be to determine what's obvious and what's crazy
16:49 hoelzro pmurias: ok, thanks!  I'll keep digging in and let you know
16:49 hoelzro it's just tough because I'm pretty sure you're asleep during my prime hacking time =/
16:57 gfldex joined #perl6
17:01 skids Is there a way to alter the pointer value in a REPR('CPointer') object without changing the ObjAt/making a new one?
17:03 pmurias hoelzro: what's your time zone?
17:04 hoelzro pmurias: UTC-6
17:08 jinxter joined #perl6
17:08 jdv79 i might get thai for lunch...
17:08 jdv79 sorry, wrong tab
17:08 dalek rakudo/nom: d320f00 | lizmat++ | src/core/traits.pm:
17:08 dalek rakudo/nom: Hide helper sub set_(leading|trailing)_docs better
17:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d320f00e7d
17:09 timotimo skids: you can box an integer into a CPointer repr'd object
17:11 mohij joined #perl6
17:12 skids Into an existing CPointer repr'd object?
17:12 rurban_ joined #perl6
17:12 timotimo no, you can only "box into" type objects
17:12 moritz ... which creates a new object
17:13 timotimo right
17:13 timotimo a CPointer repr'd object is exactly defined by its boxed integer
17:13 timotimo which is the address
17:13 timotimo it's literally nothing else, it is its identity
17:14 dalek rakudo/use-nqp: de5afc4 | moritz++ | / (4 files):
17:14 dalek rakudo/use-nqp: (failed) attempt to require "use nqp;" for nqp:: ops
17:14 dalek rakudo/use-nqp: review: https://github.com/rakudo/rakudo/commit/de5afc4f03
17:14 skids Well, exept that it isn't really it's defined by some sort of structure associating the class with a memory location containing that address.  At least, I can see that .WHICH varies even if the pointer is the same.
17:15 skids Which may be a NYI of some sort...
17:15 moritz no
17:15 jinxter joined #perl6
17:15 moritz well
17:16 moritz depending on whether CPointer should be a value object or not
17:16 pmurias nqp-m: nqp::isnull(nqp::splice(nqp::list(),nqp::list(), 0, 0))
17:16 camelia nqp-moarvm: ( no output )
17:16 lizmat trying to reboot the "aka" trait as "is also-known-as" trait
17:16 pmurias nqp-m: say(nqp::isnull(nqp::splice(nqp::list(),nqp::list(), 0, 0)))
17:16 camelia nqp-moarvm: OUTPUT«0␤»
17:16 lizmat comments / suggestions on that ?
17:17 raydiak hoelzro: adu++'s C::Parser is for all of C, not just headers...so if I understand the question correctly (not a C expert myself and dunno precisely what those different bools mean), typedefs should work just fine :) anything that doesn't work you'd be giving him a hand by reporting the bugs
17:17 raydiak and good morning #perl6
17:17 * pmurias needs to move nqp-js forward to current nqp
17:18 hoelzro raydiak: what I mean is how would typedefs be handled if you use C::Parser to generate NativeCall bindings from a header
17:19 raydiak hoelzro: idk...how would you handle those when writing the bindings by hand?  it gives you C::AST to play with, which would represent whatever it parsed including typedefs
17:19 hoelzro raydiak: I don't know, but I thought of that because I was thinking of binding Xlib, which has a Bool typedef
17:20 hoelzro so if you bind a function that takes a Bool, do you take an Int, because that's *really* what the type is, or do you take a Bool, and do some magic to make it an Int before the call?
17:20 raydiak hoelzro: the part which actually does the autobinding doesn't exist yet, he's smoothing over the parsing and C::AST...and I'm torturing him by breaking it over and over :)
17:20 raydiak so those questions haven't been answered yet
17:21 hoelzro raydiak: right, I'm just thinking ahead
17:21 hoelzro it's a curiosity, really; I'm just eager for others' input on it =)
17:21 psch hoelzro: i've resorted to using the actual type without mucking with the typedef, although i'm defining p6-level constants for the corresponding constants of the typedef'd type
17:22 raydiak how do people bind bools by hand right now?  I haven't tried, myself
17:23 hoelzro raydiak: when I was working on an Expat binding, I had a little trait that would convert a P6 Bool to an integer before making the call
17:23 psch http://portaudio.com/docs/v19-doxydocs/portaudio_8h.html#a443ad16338191af364e3be988014cbbe and https://github.com/peschwa/Audio-PortAudio/blob/master/lib/Audio/PortAudio.pm#L142 for reference
17:23 avar Is there a way to get the nqp/rakudo/rakudo-spectest tests to execute in parallel?
17:24 moritz avar: TEST_JOBS=4
17:24 hoelzro avar: TEST_JOBS=$N make spectest
17:24 raydiak also not sure what nativecall does if you just declare the sub taking a Bool...it can take e.g. Int and Str already
17:24 hoelzro raydiak: good question
17:24 raydiak hoelzro: oh that's kinda neat...maybe something to add to NativeCall itself
17:24 moritz as documented in INSTALL.txt, but not README.md
17:24 avar ah, thanks
17:25 hoelzro raydiak: well, it doesn't *really* work yet, as I wasn't able to modify the routine's Signature by creating new parameters based on the old ones
17:27 moritz ingy: did you just remove --reclone from git subrepo?
17:27 raydiak hoelzro: oh is that what you were asking a while back about assembling new subs from parts like blocks and sigs? that question really interested me
17:27 hoelzro mhmm
17:28 hoelzro I want to take a Code object, and build a Routine object that calls that Code object using a Signature I construct in Perl 6
17:28 hoelzro right now, a lot of the Parameter attributes are accessible by NQP only
17:28 moritz hoelzro: you call code with captures, not with signatures
17:29 moritz hoelzro: or do you mean you want to attach a custom signature to the code object?
17:29 hoelzro moritz: sorry, I meant that I want to build the Routine using a Signature I create and the Code object
17:29 hoelzro yes
17:29 moritz hoelzro: I don't think that's supported, or achievable by reasonable workarounds
17:29 hoelzro I think it would be doable in NQP, but it would be dirty
17:29 moritz hoelzro: how would you install the parameters from the signature as lexicals in code the code object?
17:30 hoelzro hmm
17:30 hoelzro good question
17:30 mr-foobar joined #perl6
17:30 moritz once you have a code object, it's lexpad is already immutable
17:30 hoelzro maybe I'm looking at it the wrong way
17:30 hoelzro let's say I have a native function foo(int, char *, int)
17:30 hoelzro the 2nd int is really a boolean parameter
17:31 hoelzro so I would like to bind it using sub foo(Int, Str, Bool) is native(...) { * }
17:31 hoelzro I'd like to be able to define a trait to make the input Bool into an int before calling the native routine
17:31 hoelzro or make any arbitrary changes to the inputs before handling the native sub data
17:32 b2gills andreoss: `perl6 -MPerl5 -e 'say $^V'` or `perl6 -e 'use v5; say $^V'`
17:32 hoelzro ex. if I have an enum parameter, and I want to be able to create a P6 enum that mirrors the native one
17:32 moritz hoelzro: sounds like the easier way would be extend the "is native" trait to allow you to pass a custom parameter list
17:32 anaeem1 joined #perl6
17:32 moritz hoelzro: and then write your own nativ-y trait, and redispatch to the generalized 'is native' trait
17:33 moritz hoelzro: and for the enums thing, maybe an API for types to declare which native type they correspond to
17:33 hoelzro moritz: so is nativey('mylib, Int, Str, Int)?
17:33 psch can we have protos with "is native"? that seems like it could potentially solve custom parameters and also the need for a fallback that was discussed recently
17:34 moritz hoelzro: that's not quite what I meant
17:34 moritz hoelzro: sub foo(Int, Str, Bool) is nativish('mylib') {*}
17:35 moritz hoelzro: and trait_mod:<is>(Routine $r, :$nativish!) does some magic, and redispatches to the normal 'is native' trait, adding  :paramters[....] or so
17:35 PerlJam hoelzro: even easier (right now) would be to bind the native function to another name, then write an appropriately-named sub with a Bool in the sig that turns the Bool into a 0/1 and calls the native function
17:35 hoelzro moritz: so then in the implementation for nativish, what does one pass to trait_mod:<is>(:native)?
17:36 hoelzro ooooh, a parameters thing
17:36 hoelzro PerlJam: yes, that's what I would do now, but why generate a bunch of stuff by hand if Perl 6 can do it for you? =)
17:36 ingy moritz: `git subrepo clone -f …`
17:36 moritz ingy: is that as slow as 'git subrepo clone'?
17:36 ingy is the same as reclone was
17:37 pmichaud good morning, #perl6
17:37 PerlJam hoelzro: just make a macro for it then  :)
17:37 ingy moritz: for some reason the fetch is slow
17:37 ingy are you using github?
17:38 moritz hoelzro: the 'is native' currently looks into $routine.signature.params. Patching it to accept a list of parameters from somewhere else shouldn't be too hard
17:38 moritz ingy: yes
17:38 hoelzro PerlJam: touche
17:38 ingy I think it is because a fetch needs to tease out a single branch history and send the objects, where a clone can just send packfiles
17:38 moritz ingy: ... with 282 subrepos
17:38 hoelzro moritz: yes, that's true
17:39 moritz http://perlgeek.de/blog-en/perl-6/2015-all-modules-in-a-box.html
17:39 ingy :)
17:39 ingy moritz: can you file an issue on the slowness?
17:40 moritz ingy: well, that was when I initially created it, that was before the upgrade
17:40 moritz ingy: so I'm not sure it till exists
17:40 moritz ingy: but if I observe it again, I will
17:40 * raydiak had severe slowness cloning from github on hack when he first set his account up
17:40 moritz ingy: also, it sucks that I can't do a clone -f when having unstaged changes somewhere completely else
17:41 ingy moritz: file an issue on that too
17:41 moritz raydiak: I considered putting up some local clones of popular p6 repositories, and allowing some --reference to that
17:41 moritz ingy: willdo
17:41 ingy moritz: things are now stable enough that we can start allowing non-pristine states
17:42 dalek nqp-js: 83b4da9 | (Pawel Murias)++ | src/vm/js/ (2 files):
17:42 dalek nqp-js: Implement nqp::splice.
17:42 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/83b4da92b0
17:42 dalek nqp-js: 63861b6 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
17:42 dalek nqp-js: Add tests for nqp::splice.
17:42 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/63861b6907
17:43 skids moritz: hyperlink to git in that blog entry is missing an s at the end.
17:43 ingy moritz: also if you get a slowness, then use the -v -d flags and note the slow commands. I suspect it is the fetch. I might be able to use `git clone` to do a `git fetch` somehow…
17:44 ingy moritz: also there is #git-commands on freenode :)
17:44 raydiak moritz: that might be useful, though I really wonder what's up with that...my pawnshop laptop on across-the-house-through-the-walls wifi did the same thing in several seconds which took obscene amounts of time on hack like half an hour
17:45 raydiak though I haven't actually seen that behavior in quite a while...but haven't been using hack much either
17:46 * grondilu saw ~=~ in the backlog and has no idea what this is.
17:46 Kristien joined #perl6
17:47 grondilu std: 1 ~=~ 2
17:47 camelia std f9b7f55: OUTPUT«ok 00:00 136m␤»
17:47 raydiak it's $a ~= ~$b
17:47 grondilu oh
17:47 Kristien hoelzro: that reminds me of a guy who wrote a book "Clean Code" and a book "Clean Coder," and someone asked whether his next book will be "Clean Codest" :D
17:47 hoelzro =)
17:48 Kristien (Clean Code is a nice book btw)
17:49 moritz raydiak: fwiw I haven't observed pathologically slow cloning on hack so far
17:49 * TimToady yawns after sleeping 10.5 hours straight...
17:50 raydiak nice
17:50 moritz TimToady: welcome back among the liv^Wwaking :-)
17:53 TimToady yeah, took way to long to readsorb that wooden stake through my heart...
17:53 TimToady *too
17:54 adu hoelzro: C::Parser currently handles typedefs quite well, are you having an issue with it?
17:54 hoelzro adu: no, I'm just talking about the idea of generating NativeCall bindings
17:55 ab5tract hoelzro:  that prospect is so very exciting
17:55 adu well I don't know anything about NativeCall, I just know C
17:55 hoelzro ab5tract: indeed!
17:55 ab5tract and adu++ for bringing us so much closer to the dream :)
17:55 hoelzro adu: I don't think you have to worrya bout it =)
17:56 adu ab5tract: hoelzro: thanks :)
17:56 ab5tract btyler: ready to pick your Git bindings back up? :D
17:56 adu raydiak++ for helping me notice bugs
17:58 ab5tract i'm not sure how far the discussion went the other day. but it feels like there's a strong argument for giving NativeCall a place in the core settings
17:58 lizmat ab5tract: I think the consensus was to include it as a lib
17:59 lizmat so you would still need a "use NativeCall"
17:59 PerlJam aye, not in the setting, but "comes with Rakudo"
17:59 ab5tract lizmat: ah, makes sense that way indeed.
17:59 lizmat and it would be overridable by another installed "NativeCall" if necesary
17:59 pmichaud until there's consensus about how native calling will work across implementations, I don't think it belongs in core yet
17:59 ab5tract okay, as long as it ships with the rakudo non-star release
17:59 pmichaud good afternoon, #perl6
17:59 lizmat pmichaud o/
18:00 ab5tract hi pmichaud! and that's a very good point.
18:01 pmichaud I'm fine with bundling it as a module in the Rakudo compiler.  I want to make sure any such modules we bundle are highly Rakudo-specific, however; otherwise they belong in star or some other distribution mechanism
18:04 ab5tract pmichaud: i read your slides today and found them to be quite enlightening. the idea of this feedback loop between specification and implementation is very interesting
18:05 lizmat I think that NativeCall is the much easier incarnation of Perl5's XS
18:05 lizmat and judging by how many modules use XS in Perl5, it will take off like a butterfly  :-)
18:05 lizmat once people start using Perl 6 more
18:06 ab5tract i mean, it's a relatively obvious one, from a broader perspective, but the points you brought up from a perl 6 perspective were thought provoking. looking forward to watching the recording
18:06 abraxxa lizmat: i still have a hard time with NativeCall because it lacks a few things
18:06 lizmat well, I didn't say it was perfect yet  :-)
18:07 pmichaud ab5tract: thanks, I'm glad the talk is having its intended effect :)
18:07 pmichaud I think it's so easy for us to forget that in the vast majority of (open source) projects, formal specification comes well after an implementation has been established
18:08 pmichaud ODF is another prime example, I think.
18:10 nine pmichaud: there are also good examples of specifications that were designed before implementations and never got implemented at all like XHTML 2
18:10 avar pmichaud: I'm trying to effectively build my own rakudo star release, but more modular, is there some support for "make install" of the modules into an existing installed target
18:11 ab5tract avar: ufo
18:11 avar This is what I have so far: https://gist.github.com/avar/430043e8944d6767df87
18:12 ab5tract it will generate a makefile for any given perl 6 module based on the environment's perl 6 settings
18:12 pmichaud nine: yes, that's an excellent example.  HTML+ is another.  Many parts of C99 never made it into implementation either... so much so that the committee decided to start rejecting features that didn't have implementations already
18:15 ab5tract avar: https://github.com/masak/ufo
18:16 ab5tract it is a self-contained script, so you can even 'curl' it in the package build environment and discard
18:16 ab5tract and naturally, it can generate a makefile to install itself
18:20 Rounin joined #perl6
18:22 moritz https://github.com/masak/ufo obligatory URL
18:22 moritz avar: also https://github.com/tadzik/rakudobrew/
18:23 TimToady ab5tract: not to take away from pmichaud++'s excellent presentation, but this waterfall vs whirlpool idea goes *way* back to before Perl 6 was even thought of
18:24 abraxxa lizmat: is there someone who could help me with my NativeCall issues?
18:24 TimToady I'm pretty sure I drew my first whirlpool chart on overhead slides in the 1990s
18:24 lizmat abraxxa: I would hope so, but not me: I'm a NativeCall noob
18:24 * [Tux] patched rakudobrew to revert removal of aka until consensus is reached: now I can continue working
18:24 lizmat FROGGS jnthn moritz timotimo seem like the likely suspects capable of helping abraxxa
18:25 TimToady the problem is that we didn't effectively communicate the whirlpool idea of "specs", so people assumed we meant waterfall
18:26 abraxxa lizmat: i tried jnthn as he is the author as far as I've seen on github but i guess he has more important things to do
18:26 moritz lizmat: help abraxxa with what?
18:26 lizmat NativeCall
18:26 moritz sorry, I'm an imperfect backlogger
18:27 TimToady one has to be speedreader to backlog these days...
18:27 lizmat (indeed)
18:27 PerlJam one has to be a speedreader just to keep up with the conversation sometimes :)
18:28 lizmat dinner&
18:28 moritz my track record with nativecall isn't very good, but I can try after dinner
18:28 abraxxa moritz: thanks but sadly I have no time today
18:28 PerlJam abraxxa: Any of the people lizmat mentioned should be able to help, but I'd also add arnsholt to the list
18:29 abraxxa is there a mailing list or something similar I could write my questions to?
18:29 TimToady it's a pity there isn't a better way to thread irc messages by conversation
18:30 Juerd Ages ago, some IRC channels had people who wrote daily summaries.
18:30 PerlJam abraxxa: perl6-compiler@perl.org maybe?
18:31 abraxxa PerlJam: do i have to register to be able to send emails to it?
18:31 ab5tract TimToady: of course! but i think Perl 6 has a *lot* of lessons to share with the world on the subject
18:31 pmichaud I think it goes slightly beyond "assumed we meant waterfall"... I think a lot of P6-people phrased things in terms of waterfall as well.
18:32 * raydiak just asks questions on IRC, sees if anyone answers, asks again in a few hours or a day, repeat until $answer (sometimes the answer comes in the backlog after I'm gone too)
18:32 PerlJam abraxxa: dunno how it's configured
18:32 Juerd pmichaud: I think of the whirlpool model as a lot of interconnected waterfalls.
18:32 pmichaud and even with whirlpool, there can be a sense of "spec, then implement, then revise spec, then implement" where implementation of a feature follows its specification for the most part
18:32 abraxxa raydiak: tried that some times already, didn't work out
18:33 pmichaud which is actually backwards from what we need, which is "implement, then spec, then revise implementation, then revise spec"
18:33 pmichaud or, perhaps more precisely
18:33 Juerd Implement, then spec means you'll end up with an implementation and no spec. See also, Perl 5 :)
18:33 pmichaud "idea, implement, design, update implementation, redesign, update implementation, redesign, ... until stability ensues and then spec
18:34 pmichaud Juerd: I disagree that implement and then spec means no spec.  There are plenty of counter-examples.
18:34 raydiak abraxxa: you're probably tired of explaining it then, but...I am curious what your question is :)
18:34 TimToady in my many stump speeches, I usually mentioned that the process actually happens backwards in test-first methodology
18:34 pmichaud also, we've already said that something isn't in the language until it's in the spec (which is the test suite)
18:35 pmichaud so, if someone wants something to be part of the official language spec, you have to spec it.  Leaving it in the implementation isn't sufficient.
18:35 TimToady yes, the test suite is where the design and the implementations negotiate actual requirements
18:36 TimToady neither the design docs nor the implementations can mandate a requirement on their own
18:36 abraxxa raydiak: the core Perl 6 one is how to get the number of bytes for a Buf for passing it to a C function via NativeCall
18:37 raydiak abraxxa: Buf does positional, so... .elems ?
18:37 abraxxa Buf.elems returns the number of, in my case UTF-16 chars, from which the Buf was generated
18:38 raydiak uh, hm
18:38 retupmoca m: my $b = Buf[uin16].new(1, 2, 3); say $b.bytes;
18:38 camelia rakudo-moar d320f0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Y2sAgHJHbvâ�¤Undeclared routine:â�¤    uin16 used at line 1â�¤â�¤Â»
18:38 abraxxa i have a regular Perl 6 Str and need to pass it UTF-16 encoded and it's length in bytes to the C library
18:38 retupmoca m: my $b = Buf[uint16].new(1, 2, 3); say $b.bytes;
18:38 camelia rakudo-moar d320f0: OUTPUT«3␤»
18:39 abraxxa the code in question is https://github.com/abraxxa/DBIish/blob/master/lib/DBDish/Oracle.pm6
18:40 abraxxa retupmoca: where do I find the bytes method documented?
18:41 retupmoca not sure - but it looks like .bytes is just returning .elems
18:41 raydiak abraxxa: http://doc.perl6.org/type/Blob#method_elems
18:41 raydiak oh misread, sorry
18:41 pmichaud in particular, that looks like a rakudobug to me
18:42 pecastro joined #perl6
18:44 sqirrel_ joined #perl6
18:44 tadzik joined #perl6
18:44 ab5tract lizmat: so i started digging back into my set op stuffs recently. i had a plan to implement a Setty symmetric difference and a QuantHash one
18:45 ab5tract but then rememebered that you can't do a type constraint in your signatures for slurpy context
18:46 ab5tract wait, a second, that would only be a problem for a multi, not for a QuantHash specific symdif op
18:46 raydiak m: my $b = "∈".encode("UTF-16"); say $b.perl; say $b.bytes; say $b.of; # yes definitely looks wrong
18:46 camelia rakudo-moar d320f0: OUTPUT«utf16.new(8712)␤1␤(uint16)␤»
18:46 nine m: "foo".encode("utf-16").perl
18:46 camelia rakudo-moar d320f0: ( no output )
18:46 nine m: say "foo".encode("utf-16").perl
18:46 camelia rakudo-moar d320f0: OUTPUT«utf16.new(102, 111, 111)␤»
18:47 nine looks like a list of 3 utf16 characters to me, so 3 elems would even be correct
18:48 raydiak they aren't wide chars, so you don't see the fail
18:48 nine I said 3 elems would be correct. 3 bytes however is clearly wrong
18:48 nine m: say "foo".encode("utf-16").bytes
18:48 camelia rakudo-moar d320f0: OUTPUT«3␤»
18:48 abraxxa elems is documented to return the number of characters that originally formed the Str although I dunno where that metadata is kept and whatfor
18:49 nine abraxxa: I'd say definitely a Rakudo bug
18:49 ab5tract abraxxa: that part makes sense to me. .elems and .bytes ever doing the same thing, that doesn't
18:50 nine currently method bytes is implemented by returning self.elems in src/core/Buf.pm line 60
18:50 abraxxa nine: i would have found out and reported it if .bytes was documented
18:50 Kristien will perl 6 support recursive glob? :v
18:50 ab5tract so where do perl 6 hackers go unicode shopping? i've found a few sites, but some feel pretty dodgy
18:51 nine class utf16 (same file) should override method bytes to give a better answer
18:51 abraxxa http://doc.perl6.org/type/Buf doesn't list .bytes
18:51 * raydiak has an absolutely terrible error rate today, and retreats to being quietly wrong in his corner while the sharper folks work it out :)
18:51 abraxxa i tried to work around it by passing .elems * 2 to the C lib
18:51 abraxxa that worked most of the time
18:51 retupmoca m: say uint16.^nativesize; say buf16.new(1, 2, 3).elems * uint16.^nativesize / 8;
18:51 camelia rakudo-moar d320f0: OUTPUT«16␤6␤»
18:52 lucas__ joined #perl6
18:52 kaare_ joined #perl6
18:52 ab5tract retupmoca: nice find :)
18:52 nine abraxxa: the synopsis mention bytes in several places
18:52 ab5tract is there any reason that method is not named ^native-size
18:52 skids ab5tract: Don't know how dodgy it is but shapecatcher.com is neat.
18:52 Hor|zon joined #perl6
18:53 abraxxa nine: the synopsis is also not a very good doc
18:53 nine abraxxa: it's not meant as a doc. At least not an end user's doc. That's why doc.perl6.org needs much help still.
18:54 abraxxa nine: how is doc.perl6.org generated or maintained?
18:54 raydiak abraxxa: htmlify.p6 in https://github.com/perl6/doc
18:55 nine abraxxa: it says it at the bottom of each page
18:55 lucas__ moritz: Hello, I like the idea of perl6-all-modules
18:55 abraxxa nine: i see, thanks
18:55 lucas__ moritz: Some URLs are wrong on the blog post...
18:55 abraxxa so .bytes is the correct method to use but to make it really work its return value needs to be fixed
18:55 ab5tract thanks skids
18:56 abraxxa why is .bytes missing in the generated docs? bug in htmlify?
18:58 mj41 joined #perl6
18:58 nine abraxxa: it's just that noone has written the docs for it for https://github.com/perl6/doc/blob/master/lib/Type/Blob.pod
18:59 abraxxa nine: ah so the docs are generated from Pod, not from perl6 code
19:00 mj41 He (Matz at RubyConf 2014) said that Ruby 3.0 may happen in the next ten years, and that he’s thinking about three main topics in its design: new concurrency features, a just-in-time compiler (perhaps the LLVM JIT), and static typing. http://codon.com/consider-static-typing
19:00 abraxxa that's enough to continue with my work on DBDish::Oracle
19:00 abraxxa i'll try to find some time to write the docs and file a bug for .bytes
19:01 moritz lucas__: I'll try to fix them soonish
19:01 ab5tract it seems like retupmoca++ maybe already found the right code for it?
19:01 retupmoca going to PR in a second
19:02 retupmoca should fix .bytes: https://github.com/rakudo/rakudo/pull/361
19:03 abraxxa retupmoca: wow, that was quick! A test case should be added as well
19:03 pmichaud wouldn't that potentially return a Rat ?
19:03 skids m: int.^nativesize.say # Would be useful, but if you look in the code the 0 is being used as a special case to indicate 'int'  :/
19:03 camelia rakudo-moar d320f0: OUTPUT«0␤»
19:05 retupmoca pmichaud: possible, although moarvm only supports multiple-of-8 ^nativesize
19:06 retupmoca m: Buf[uint4](1, 2, 3).bytes.say
19:06 camelia rakudo-moar d320f0: OUTPUT«Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤  in block <unit> at /tmp/n9DPpmgkQ8:1␤␤»
19:06 retupmoca m: Buf[uint4].new(1, 2, 3).bytes.say
19:06 camelia rakudo-moar d320f0: OUTPUT«MVMArray: Unsupported uint size␤  in any compose_repr at src/gen/m-Metamodel.nqp:1286␤  in any compose at src/gen/m-Metamodel.nqp:2653␤  in any make_pun at src/gen/m-Metamodel.nqp:1480␤  in any find_method at src/gen/m-Metamodel.nqp:1503␤  in blo…»
19:06 retupmoca also, I'm not really sure what we'd want to return in that situation
19:07 pmichaud retupmoca: I'd think it should be ceil()
19:07 pmichaud retupmoca: and the PR isn't moarvm-specific :)
19:07 skids .oO(why the methos should be ".bits")
19:07 ab5tract the divisor could perhaps be set to the minimum multiple supported by ^nativesize ?
19:08 retupmoca very true
19:08 pmichaud I'm fine if we keep the code that assumes 8-bit multiple, but we should have a comment that notes a potential problem later
19:08 ab5tract not sure if the backend exposes that directly
19:08 ab5tract pmichaud: maybe even an exception, so we see it when/if it happens?
19:08 pmichaud I would even support an exception, yes.
19:09 vendethiel .ask pmurias are you sure you want to support jscript? it's terrible, really terrible. Will prevent you doing things as simple as named functions...
19:09 yoleaux vendethiel: I'll pass your message to pmurias.
19:09 pmichaud silently returning an incorrect answer is usually not a good path
19:09 nine Does a Buf[uint4] really pack its elements?
19:09 FROGGS joined #perl6
19:11 abraxxa i'm going home now, 11 hours are enough...
19:11 abraxxa nine: i'll ping you for an update if I may
19:11 nine abraxxa: sure
19:11 abraxxa nine: thanks!
19:12 pmichaud S09:143
19:12 synopsebot Link: http://design.perl6.org/S09.html#line_143
19:13 retupmoca pmichaud: that would imply ceiling() then?
19:13 ab5tract "or with the strange elements of the class, or with the types under which the strange element is declared"
19:13 ab5tract hadn't read that one before
19:13 pmichaud retupmoca: potentially.  the section I referenced is concerning compact structs, I'm not sure if it applies to Buf also
19:14 davido__ joined #perl6
19:14 abraxxa can perl 6 convert the Str to a Buf8 if such a thing exists?
19:14 skids abraxa: .encode
19:14 abraxxa skids: yes, that returns a Buf
19:14 pmichaud but it does show that at least in one place the design expects elements to be packed.
19:14 skids Buf and buf8 are pretty much synonymous.
19:14 abraxxa is that always a Buf8? ah ok
19:15 TimToady m: say 'foo'.encode.WHAT
19:15 camelia rakudo-moar d320f0: OUTPUT«(utf8)␤»
19:15 abraxxa buf8 is also missing on docs.perl6.org
19:15 TimToady utf8 is a kind of buf8
19:15 TimToady well, really a blob8
19:15 TimToady do you need to be able to modify it?
19:15 abraxxa hm...I don't, maybe the Oracle OCI library
19:16 pmichaud S02:1013
19:16 synopsebot Link: http://design.perl6.org/S02.html#line_1013
19:16 abraxxa all calls are pass-by-reference
19:16 ab5tract then it makes some sense that 8 actually makes some sense as "the" ^nativesize
19:16 pmichaud "maps these directly to the underlying compact array..."   <-- implies packing of elements to me
19:17 abraxxa if I understand that correctly I'd have to encode to a buf8 so that elems doesn't return the number of Str chars but bytes?
19:17 * retupmoca adds a call to ceiling
19:18 skids abraxxa: yes, because one char of a Str can be more than one byte.
19:18 TimToady elems only works on arrays and things like arrays
19:18 TimToady m: say "some long string".elems == 1
19:18 camelia rakudo-moar d320f0: OUTPUT«True␤»
19:18 abraxxa skids: but encode always returns a Buf, not a buf8?
19:18 abraxxa TimToady: makes sense
19:18 TimToady by default it returns a utf8 as I showed above
19:19 TimToady which is a blob8
19:19 coyocanid joined #perl6
19:19 abraxxa is utf16 a blob16 then?
19:19 TimToady yup
19:19 TimToady except I don't know that we've defined it
19:20 TimToady or implemented it
19:20 TimToady m: say 'foo'.encode('UTF-16').WHAT
19:20 camelia rakudo-moar d320f0: OUTPUT«(utf16)␤»
19:20 TimToady yup, we have
19:20 abraxxa hehe
19:20 skids m: utf8.^mro.say
19:20 camelia rakudo-moar d320f0: OUTPUT«(utf8) (Any) (Mu)␤»
19:20 abraxxa m: say 'ö'.encode('UTF-16
19:20 camelia rakudo-moar d320f0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nkAK92fMb5â�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/nkAK92fMb5:1â�¤------> [32msay 'ö'.encode('UTF-16[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤     …»
19:21 Kristien I wrote [@foo] instead of \@foo :(
19:21 abraxxa m: say 'ö'.encode('UTF-16).elems
19:21 camelia rakudo-moar d320f0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/TazJvefxdSâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/TazJvefxdS:1â�¤------> [32msay 'ö'.encode('UTF-16).elems[33mâ��[31m<EOL>[0mâ�¤    expecting any of:…»
19:21 retupmoca PR updated with ceiling()
19:21 abraxxa m: say 'ö'.encode('UTF-16').elems
19:21 camelia rakudo-moar d320f0: OUTPUT«1␤»
19:21 TimToady m: say "foo␤".encode('UTF-16')[3].base(16)
19:21 camelia rakudo-moar d320f0: OUTPUT«A␤»
19:21 abraxxa m: say 'ö'.encode('UTF-16').bytes
19:21 camelia rakudo-moar d320f0: OUTPUT«1␤»
19:21 TimToady eh, that should print 2424
19:22 TimToady m: say "foo␤".encode('UTF-16')[3]
19:22 camelia rakudo-moar d320f0: OUTPUT«10␤»
19:22 TimToady oh, bot interference
19:22 TimToady m: say "foo\x2424".encode('UTF-16')[3]
19:22 camelia rakudo-moar d320f0: OUTPUT«9252␤»
19:22 TimToady m: say "foo\x2424".encode('UTF-16')[3].chr
19:22 camelia rakudo-moar d320f0: OUTPUT«␤␤»
19:22 TimToady m: say "foo\x2424".encode('UTF-16')[3].base(16)
19:22 camelia rakudo-moar d320f0: OUTPUT«2424␤»
19:23 abraxxa really got to go now! thanks and bye!
19:26 retupmoca pmichaud: rakudo #361 should now be sane and integer for anything with a defined ^nativesize
19:31 avar $ /usr/local/booking-perl6/blead/bin/perl6 -e '"hello, world".say'
19:31 avar hello, world
19:31 * avar screwing around with packaging at work :)
19:32 moritz avar++
19:35 anaeem1 joined #perl6
19:36 moritz retupmoca, pmichaud: fwiw right now, Blob[uint4].new dies with "MVMArray: Unsupported uint size"
19:36 moritz still, having the .ceiling in there certainly can't hurt
19:37 ab5tract moritz++
19:37 * moritz spectests the pull request
19:37 moritz m: say Blob[uint2].new(1)
19:37 camelia rakudo-moar d320f0: OUTPUT«MVMArray: Unsupported uint size␤  in any compose_repr at src/gen/m-Metamodel.nqp:1286␤  in any compose at src/gen/m-Metamodel.nqp:2653␤  in any make_pun at src/gen/m-Metamodel.nqp:1480␤  in any find_method at src/gen/m-Metamodel.nqp:1503␤  in blo…»
19:38 ab5tract wow, does camelia rebuild compilers so fast these days?
19:38 moritz why? when was that error message added?
19:39 moritz ab5tract: you might be confusing existing behavior with the (nto yet merged) pull request
19:39 FROGGS months ago probably
19:39 dalek rakudo/nom: b1f160f | (Andrew Egeler)++ | src/core/Buf.pm:
19:39 dalek rakudo/nom: Fix Blob.bytes to take elem size into account
19:39 dalek rakudo/nom:
19:39 dalek rakudo/nom: Was always assuming each elem was one byte
19:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b1f160f805
19:39 dalek rakudo/nom: c453cd0 | (Andrew Egeler)++ | src/core/Buf.pm:
19:39 dalek rakudo/nom: Add ceiling() call to Blob.bytes
19:39 dalek rakudo/nom:
19:39 dalek rakudo/nom: This gives us a sane answer when our elem size is not a multiple of 8
19:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c453cd0eb4
19:39 mvuets joined #perl6
19:40 moritz retupmoca: will you also add some tests to roast?
19:40 ab5tract moritz: yes, sorry. #timewarp
19:40 Kristien Yay I bought Modern Perl :D
19:41 Kristien free shipping \o/
19:41 retupmoca moritz++
19:41 retupmoca and yes, will add tests
19:42 moritz retupmoca++ # patches
19:42 * hoelzro just realized that R= actually works
19:42 hoelzro that's awesome and terrifying at the same time
19:42 moritz ab5tract: fwiw camelia does rebuilds on all backends in one dir, so it's kinda slow
19:43 psch m: my $f = "foo"; $f [R~]= "bar"; say $f
19:43 camelia rakudo-moar d320f0: OUTPUT«barfoo␤»
19:43 psch m: my $f = "foo"; "bar" R~= $f; say $f
19:43 camelia rakudo-moar d320f0: OUTPUT«foobar␤»
19:44 psch m: my $x; "foo" R= $x; say $x
19:44 camelia rakudo-moar d320f0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NhiXswhoUT�Cannot reverse the args of = because list assignment operators are too fiddly�at /tmp/NhiXswhoUT:1�------> [32mmy $x; "foo" R=[33m�[31m $x; say $x[0m�»
19:45 psch m: my @f = <d n>; @f Z[R~]= <foo bar>; .say for @f
19:45 camelia rakudo-moar d320f0: OUTPUT«food␤barn␤»
19:46 flussence silly question: if we can do $foo ~~ $regex, and a grammar is just a big regex, why can't we use a grammar on the RHS there too?
19:46 moritz flussence: a grammar isn't a big regex
19:46 psch m: my @f = <d n>; <foo bar> R[Z[R~]=] @f; .say for @f # o.o
19:46 camelia rakudo-moar d320f0: OUTPUT«food␤barn␤»
19:46 moritz flussence: just like a class isn't a big method
19:46 flussence I know, I'm simplifying a bit...
19:47 moritz flussence: and I'm un-simplifying where necessary
19:47 flussence "collection of regexes that can be applied as a whole to a single string", if that sounds better
19:47 moritz "collection of regexes"
19:48 moritz the .parse is really just a convenience feature
19:49 ab5tract how would people feel about shipping 'ufo' with rakudo?
19:49 amalia joined #perl6
19:49 ab5tract or some feature like it, strapped onto 'perl6-*'
19:50 FROGGS ab5tract: to do what exactly?
19:50 Sqirrel joined #perl6
19:50 pmichaud flussence: because   $foo ~~ Grammar   has a different meaning already
19:51 pmichaud in particular, it asks the question  "is $foo compatible with this type/role?"
19:51 pmichaud much like    $x ~~ Int   is asking the question "is $x compatible with Int?"
19:52 FROGGS well, that's about the type object, no?
19:52 pmichaud FROGGS: a grammar is a type object
19:52 FROGGS I'd probably expect that $foo ~~ $mygrammar will call its .ACCEPT which will delegate to .parse
19:52 pmichaud sure, if you want to instantiate the grammar, that might work.
19:53 ab5tract FROGGS: am i wrong in thinking that the ecosystem is all installed via ufo generated Makefiles?
19:53 pmichaud but I don't know many people that do   MyGrammar.new
19:53 FROGGS ab5tract: yes
19:53 FROGGS pmichaud: good point
19:55 ab5tract so why not ship this basic feature directly
19:55 FROGGS ab5tract: the ecosystem is accessible via panda, not ufo
19:55 dalek roast: 69dda1f | (Andrew Egeler)++ | S03-operators/buf.t:
19:55 dalek roast: Add a few tests for Buf.bytes
19:55 dalek roast: review: https://github.com/perl6/roast/commit/69dda1fe96
19:55 pmichaud ab5tract: because rakudo compiler isn't intended to be the source of packages
19:55 pmichaud that's what distributions are for
19:56 pmichaud (in the sense of Rakudo Star being a distribution)
19:56 pmichaud we don't intend that downloading Rakudo compiler gives you a fully-functioning Perl 6 ecosystem
19:56 ab5tract pmichaud: but should the functionality of 'perl6' be construed 'rakudo' in that way?
19:57 pmichaud ab5tract: I don't understand that question, sorry.
19:57 pmichaud if you're asking whether we've misnamed the rakudo compiler(s) as "perl6", I say yes.
19:57 ab5tract `perl6 gen-make`
19:57 pmichaud when we introduced perl6-m and perl6-j, we should've named them rakudo-m and rakudo-j, I think.
19:58 moritz we can still do that
19:58 Ugator left #perl6
19:58 moritz install both for some time
19:58 pmichaud at any rate, installing and managing modules is not (yet?) the compiler's responsibility.
19:58 ab5tract pmichaud: i guess what i'm arguing is that i think having such an 'express' way to generate makefiles seems incredibly handy, and part of me thinks it would be cool to have by default
19:59 pmichaud ab5tract: who is the target audience for generating makefiles?
19:59 * ab5tract is also playing with packaging at work :)
20:00 ab5tract i'm thinking package writers, maintainers, anyone who wants to debug, darkpan, etc
20:00 flussence if you're installing a whole set of modules that way, ideally you'd generate just the one makefile so make can parallelize properly...
20:01 pmichaud package writers and maintainers should be working with other tools (e.g. panda) to do it.
20:01 pmichaud perhaps that means we need to increase the toolchain there... but it doesn't properly belong in the compiler repo
20:02 moritz just for reference, installing gcc doesn't give you an IDE, make, autotools or a debugger
20:02 pmichaud moritz++
20:02 moritz even python with its "batteries included" doesn't come with ipython
20:02 ab5tract fair points. it was just a thought
20:02 moritz and for long didn't come with virtualenv or pip (though I hear that's changing)
20:03 ab5tract moritz: all things one could argue makes things harder than they need be
20:03 ab5tract wow, much mistyping.
20:03 PerlJam ab5tract: still ... those things belong in the distribution, not the compiler proper.
20:03 muraiki bah, back in smalltalk I had everything in my image!
20:04 moritz ab5tract: on the other hand, most python or perl users don't need them. They say "oh, I want to run frozen-bubbles", not "I want to write a makefile for my perl game here"
20:04 moritz muraiki: ... and see how well that worked :-)
20:05 muraiki moritz: :)
20:07 moritz I'd even go so far and say that the reason it took perl 5 so long to get something as awesome as cpanminus was that there was a module installer in core
20:08 kjs_ joined #perl6
20:08 flussence I think we're doing pretty well along those lines... we've got a decent spec that says "code goes here, tests go here, metadata is in this json file with this format"... and it's not tied to an implementation at all.
20:09 ab5tract moritz: interesting thought
20:09 * ab5tract was already convinced me a scrollback ago :)
20:10 moritz ab5tract: that last one wasn't aimed at you, just some random musings
20:14 alini joined #perl6
20:16 ab5tract moritz: just didn't want any ambiguity about my feelings on it :)
20:18 ab5tract but: packaging. any recommendations?
20:18 [Sno] joined #perl6
20:18 ab5tract my first thought was to package 'ufo'
20:18 ab5tract then i came on here because i had a personal moment of "this would be nice to already have"
20:19 moritz ab5tract: what exactly do you mean by "packaging"?
20:19 ab5tract build instructions for RPMs, in this case
20:20 moritz ab5tract: for modules? or for rakudo?
20:21 ab5tract avar++ already showed the compiler. now i'm ready for Inline::Perl5
20:21 moritz ab5tract: well, ufo or panda, I'd say
20:22 ab5tract okay, my instincts weren't too far off
20:22 ab5tract thanks moritz :)
20:23 * PerlJam hasn't used ufo in a really long time.
20:26 ab5tract panda just feels awkward.. i've never written an rpm spec for a perl 5 module, but i don't think my first instinct would be to reach for cpan
20:27 denis_boyun joined #perl6
20:27 PerlJam ab5tract: for perl5 there's cpan2rpm and another one I forget the name of
20:27 moritz my first instinct would be to reach for that RPM generation tool built on CPANPLUS or so
20:27 moritz and on debian, dh-make-perl
20:28 Kristien time to make a Perl wallpaper
20:28 telex joined #perl6
20:28 diana_olhovik_ joined #perl6
20:30 flussence .oO( if the rakudo ebuild installed a working perl6-m, I'd be writing a module-to-ebuild generating tool right now... )
20:34 skids https://gist.github.com/skids/5cbec5d3c24512d44a3a  # public gist: What prefab errors should NativeCall offer.
20:35 ab5tract right, but not q:x{cpan} itself.
20:35 moritz skids: what's BrokeTheMold?
20:35 moritz skids: also I like errors better that aren't full of UNSPECIFIED :-)
20:35 moritz skids: if some information isn't known, simply exclude it from the message
20:37 skids "When they made him, they broke the mold"  The UNSPECIFIED is ugly on purpose to encourage people to make an effort.  But if it bothers, feel free to edit.
20:41 mr-foobar joined #perl6
20:44 kjs_ joined #perl6
20:52 [particle] joined #perl6
21:05 Rounin joined #perl6
21:06 btyler ab5tract: picking the git bindings back up with the help of a struct-translator-thingy? absolutely
21:08 Kristien I like Perl.
21:08 vendethiel :D
21:11 Kristien "New Study Finds Majority Of God’s Blessings Burn Up On Entry Into Atmosphere"
21:12 Kristien What if Perl 6 blessings await the same destiny? :(
21:13 huf not if they come by radio
21:14 Kristien Conclusion: Larry is ahead of God.
21:17 TimToady Larry is often out ahead of God, but God has a way of hauling him back to where he should be.
21:18 PerlJam Perhaps this is why Larry can "see around corners" as Tim O'Reilly says.  :)
21:19 TimToady Usually Larry just sees what he wants to see, and then people build corners there.
21:19 huf god is everywhere, or so i was told
21:20 PerlJam huf: and the devil is in the details
21:21 huf PerlJam: so build everything out of immense rectangles?
21:21 huf and of course breed cows to be spherical
21:21 PerlJam and of uniform density
21:24 pmichaud some people build corners, other people cut them.
21:24 huf those are the same people...
21:25 huf you get _more_ corners if you cut one
21:25 PerlJam some corners *need* to be chamfered
21:26 flussence maybe we should just attach cows to all the sharp edges...
21:26 huf buffering. yes, that's often the solution :)
21:27 avar hah, you can't build nqp against a moar cloned with --depth 1 :)
21:27 skids huf: but not if you cut at the vertices.  Or more than one at the same time.
21:27 skids .oO(damn corner cases)
21:38 jack_rabbit joined #perl6
21:38 Kristien joined #perl6
21:39 Kristien Hi there boys and girls.
21:39 ab5tract btyler: what about the struct-translator-thingy itself? :)
21:44 btyler ab5tract: I just had a vision of the future, and it is full of yaks, all of them hairy
21:45 b2gills .oO( Time to shave the yaks? )
21:46 btyler (yes, doing a simple nativecall code gen thing would be fun, and just enough over my head to be exciting)
21:50 ab5tract btyler: luckily i believe the C parser has become some sort of futuristic yak-barber-grade chainsaw
22:04 FROGGS_ joined #perl6
22:05 Sqirrel_ joined #perl6
22:10 amalia joined #perl6
22:15 _dolmen_ joined #perl6
22:18 dalek doc: 88f9b26 | moritz++ | lib/Type/X/Does/TypeObject.pod:
22:18 dalek doc: document X::Does::TypeObject
22:18 dalek doc: review: https://github.com/perl6/doc/commit/88f9b269d1
22:19 moritz time for sleep here&
22:37 tgt joined #perl6
22:37 mr-foobar joined #perl6
22:39 Kristien sleeping is a waste of time
22:39 timotimo what did i miss tonight?
22:45 * psch grmls at his jvm bytecode
22:45 psch it's being weird :/
22:51 masak 'night, #perl6
22:51 Kristien goodbye masak
22:59 jnthn psch: And I bet you're getting really informative errors, like stack height 2 != stack height 1? :(
22:59 yoleaux 16:44Z <psch> jnthn: lizmat++ merged the [R~]= PR, fyi
23:01 psch jnthn: actually, it's either "DEBUG MESSAGE: method code not verfified" (paraphrased) or an NullPointerException, or a NegativeArraySizeException...
23:01 psch the paraphrased also has "method contains invalid bytecode" somewhere, iirc
23:01 timotimo hooray
23:02 psch the NPE is the most befuddling one, because it happens after ALOADing an object that *should definitely* be there, because i call a method on it a few lines earlier already and that doesn't NPE
23:02 tgt joined #perl6
23:02 jnthn Is it called through invokedynamic? Could the bootstrap method be throwing the exception?
23:03 ingy moritz: thanks for the issue. a little hostile, but thanks :)
23:04 psch https://gist.github.com/peschwa/6daa3acf3df68f81e906 is the generating code, the call to atpos_i gets NULL for the first arg (that is "arr" in Ops.atpos_i)
23:04 psch that bit (and 11 similar looking ones...) are in marshalOut in BootJavaInterop
23:04 ingy moritz: hostile *feeling*. maybe not intended. no worries. we'll fix work on the issue.
23:04 * psch bbiab
23:07 jnthn psch: mv.visitVarInsn(Opcodes.ILOAD, 8);
23:08 jnthn But that goes to a Type.getType(long.class)
23:08 jnthn iirc, ILOAD buts a 32-bit (one stack slot) but a long is 2 stack slots?
23:08 jnthn Should it be LLOAD there?
23:08 timotimo long vs int has bitten me many times when i tried to do jvm bytecode generation
23:09 jnthn Yeah, me too
23:09 jnthn It's a huge argh
23:09 jnthn Doubles take 2 slots too
23:09 psch ouw, right
23:09 psch that's why the L2I wouldn't work either
23:09 psch 'cause i tried that too, cause ARRAYNEW takes an int
23:10 psch oh, no, that's a few lines earlier
23:10 psch well, LLOAD first, that should get me a tad further at least :)
23:11 psch huh, i think i'm actually more confused now
23:11 psch i ISTORE an I_CONST0 into 8
23:12 psch do i have to LLOAD that to I2L it afterwards?
23:12 pmurias joined #perl6
23:12 pmurias vendethiel: what do you mean by 'named functions'?
23:12 yoleaux 19:09Z <vendethiel> pmurias: are you sure you want to support jscript? it's terrible, really terrible. Will prevent you doing things as simple as named functions...
23:20 jnthn 'night
23:20 psch 'night jnthn++
23:31 jdv79 if i call run a grammar parse from within an outer action method i get "Cannot modify an immutable Match in method parse"
23:32 timotimo "outer action method"?
23:32 psch jdv79: probably because you have $/ as formal parameter
23:33 jdv79 a method in an action class from an outer grammer run
23:33 jdv79 trying to run a grammar parse inside another
23:33 psch in the calling method
23:33 timotimo yeah, you need to explicitly pass $/ and explicitly accept $/
23:33 diana_olhovik_ joined #perl6
23:33 timotimo and make sure you're not trying to override the $/ you have in your signature
23:36 jdv79 oh, right.  its me.  sorry.
23:36 jdv79 thanks
23:36 psch in general though, wanting to parse from actions is a bit smelly
23:37 jdv79 i'm doing a simple macro type situation
23:37 jdv79 i'll show the code once its working - maybe there's a better way
23:41 tony-o anything interesting about something like angularjs in p6?
23:42 timotimo what does angularjs mean to you? data/model binding?
23:42 tony-o both the templating piece of angular but also the way it is reloading only "bits" of a page instead of re-rendering the entire page
23:45 skids joined #perl6
23:45 tony-o so yea on the data/model binding piece as well
23:47 * psch wonders about native p6 in the browser
23:47 psch can be persuade mozilla and the chromium guys to stuff the moar runtime into their browsers..?
23:47 psch s/be/we/
23:48 psch +CORE.setting
23:48 psch probably not hah
23:48 tony-o that'd be pretty bnig for p6
23:48 tony-o big
23:48 psch aside from that we will have nqp-js, pmurias++ seems to be making progress
23:49 psch i suspect some sort of templating and databinding library could be build fairly easily
23:51 psch but i've never designed such a thing, so take that as you will :)
23:51 tony-o i built one in js when node was still new, it was nothing as good as angular but it did the partial page refreshes using html rendered by the server (which used a templating system)
23:54 timotimo nagare has that, too
23:55 timotimo and it'll fall back to regular HTTP without ajax if the browser is js-less
23:57 tony-o hmm..i'm tempted to work on that or http/2

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

Perl 6 | Reference Documentation | Rakudo