»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
Kristien Is there a way to do threading without map similar to junctions but on lists? 00:01
eg foo(⦿@xs, ⦿@ys) would be the same as map &foo, (@xs X @ys) 00:03
psch .u ⦿
yoleaux U+29BF CIRCLED BULLET [Sm] (⦿)
psch i need to get a different terminal font it seems
Kristien Don't know the syntax, if it exists at all.
psch Kristien: hypers do that
Kristien ah I see
psch *should/will 00:04
Kristien cool
well
time to sleep
bye!
00:04 Kristien left, skids joined 00:07 Ugator left
psch spectesting a fix for [R~]= now 00:26
00:29 molaf__ left 00:31 BenGoldberg joined
avuserow_ psch++ 00:32
00:32 BenGoldberg left, adu joined
psch 3 flappy/known fails i think 00:32
00:32 BenGoldberg joined
psch i'll PR and check with someone tomorrow i suppose 00:33
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
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:17
01:18 vendethiel left
Mouq (If no-one gets to it tomorrow/later tonight, I'll have a go at an edit) 01:18
01:18 Mouq left 01:23 vendethiel joined 01:28 andreoss left
TimToady about to board SEA -> SJC 01:28
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 01:37 yeahnoob joined
masak m: sub autocall { say "OH HAI" }() 01:43
camelia rakudo-moar 613c0b: OUTPUT«OH HAI␤»
masak m: sub autocall { say "OH HAI" }; autocall 01:44
camelia rakudo-moar 613c0b: OUTPUT«OH HAI␤»
masak first form instead of second -- good style or horrible style?
01:44 vendethiel left
masak (I have a situation with a sub `reset_x`, which I call sometimes during a process and always at the start) 01:44
01:46 vendethiel joined
masak m: for ^5 { .say; NEXT { last } } 01:48
camelia rakudo-moar 613c0b: OUTPUT«0␤1␤2␤3␤4␤»
masak bug?
m: for ^5 { .say; NEXT { exit } }
camelia rakudo-moar 613c0b: OUTPUT«0␤»
masak m: for ^5 { .say; NEXT { return } }
camelia rakudo-moar 613c0b: OUTPUT«0␤1␤2␤3␤4␤»
masak that last one, besides wrongly compiling (IMO), did not have the wrong runtime semantics I expected it to. 01:49
m: say "A"; return; say "B" 01:50
camelia rakudo-moar 613c0b: OUTPUT«A␤»
masak m: for ^5 { say "A"; return; say "B" }
camelia rakudo-moar 613c0b: OUTPUT«A␤»
masak ok, that's a *separate* bug. `return` should not bind to `NEXT` phasers
m: for ^5 { .say; NEXT { say "A" }; NEXT { return } } 01:51
camelia rakudo-moar 613c0b: OUTPUT«0␤1␤2␤3␤4␤»
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
psch m: for ^5 { .say; LEAVE { return } }
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…»
masak submits rakudobug for `return` in a `NEXT` working at all outside of a routine 01:53
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
for instance: Unable to parse expression in block; couldn't find final '}' <BOL>ΓÅÅ<EOL>
I figure "ΓÅÅ" should probably be something else, heh
masak probably :) 01:55
muraiki_: jnthn is on Windows, but I think he went to sleep.
muraiki_ d'oh
thanks though :)
psch from his talks it looks like he's using cmd.exe
masak he is.
muraiki_ yeah, I get the same result in cmd.exe
masak should look better there
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
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 :(
I'll ask him tomorrow, thanks guys :)
I'm just being too lazy to boot up my ubuntu vm
masak m: my $c = 3; while $c { say $c--; NEXT { last } };
camelia rakudo-moar 613c0b: OUTPUT«3␤2␤1␤»
psch muraiki_: cmd /k chcp 65001 (says stackoverflow.com/questions/14109024) 01:58
ah, no
/K
muraiki_ psch: still broken :( 01:59
masak m: sub foo { for ^3 { NEXT { return $_ } }; return 42 }; say foo 02:00
camelia rakudo-moar 613c0b: OUTPUT«0␤»
masak ...but *inside* a routine it seems to do the right thing. weird.
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
maybe I just need the right font
psch muraiki_: good luck :)
02:02 colomon left 02:03 colomon joined
masak p6: for ^5 { .say; NEXT { say "A" }; NEXT { return } } 02:03
camelia rakudo-{parrot,moar} 613c0b: OUTPUT«0␤1␤2␤3␤4␤»
muraiki_ p6: sub { 02:04
camelia rakudo-{parrot,moar} 613c0b: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/tmpfile:1␤------> sub {⏏<EOL>␤»
dalek ast: 8fce170 | peschwa++ | S03-metaops/reverse.t:
Add a test for [R~]=. avuserow++ for spotting this.
02:05
psch hopes he didn't mess up the fudge syntax again
args 02:07
dalek ast: b7c727a | peschwa++ | S03-metaops/reverse.t:
Correct plan.
02:08
02:09 vendethiel left 02:14 vendethiel joined 02:16 colomon left 02:22 colomon joined 02:27 nbrown joined 02:30 adu left 02:35 vendethiel left 02:39 chunshengster joined
masak 'night (again), #perl6 02:39
02:44 vendethiel joined 02:46 ilbot3 left 02:48 ilbot3 joined 03:05 chunshengster left 03:08 vendethiel left 03:10 vendethiel joined 03:14 nbrown left 03:18 Patterner joined 03:22 Psyche^ left 03:28 noganex_ joined 03:29 adu joined 03:31 noganex left
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
camelia rakudo-moar 613c0b: OUTPUT«(Any) (Mu) (Int)␤»
raydiak .tell retupmoca awesome! thanks for the heads-up :)
yoleaux raydiak: I'll pass your message to retupmoca.
adu p6: say Any.new().perl 03:34
camelia rakudo-{parrot,moar} 613c0b: OUTPUT«Any.new()␤»
adu p6: say Any.perl
camelia rakudo-{parrot,moar} 613c0b: OUTPUT«Any␤»
03:53 telex left 03:54 telex joined 03:57 alini joined
muraiki_ night perl6 04:00
04:00 muraiki_ left 04:06 araujo left 04:08 jack_rabbit left 04:10 colomon left, colomon joined 04:15 Mouq joined 04:18 jack_rabbit joined, vendethiel left 04:27 vendethiel joined 04:30 kaleem joined
TimToady home 05:03
PerlJam is listening to TimToady's interview with Miyagawa right now :) 05:04
TimToady if it sounds a little brain-burned, I'd just given my talk :) 05:05
PerlJam The mention of "6.0" sounds a little weird in light of recent discussion. 05:09
05:10 BenGoldberg left, BenGoldberg joined 05:11 BenGoldberg left, BenGoldberg joined 05:12 Mouq left, anaeem1_ joined 05:14 BenGoldberg left 05:15 BenGoldberg joined 05:18 BenGoldberg left 05:19 BenGoldberg joined
Humbedooh hopes it's not one of those leap years again where december 2015 actually falls on a Monday....in 2017 :) 05:20
05:20 BenGoldberg left 05:21 BenGoldberg joined 05:22 jack_rabbit left
PerlJam .zZZ & 05:28
05:31 jack_rabbit joined 05:42 jack_rabbit left 05:47 [Sno] left 05:54 jack_rabbit joined 06:02 jack_rabbit left 06:11 Rounin joined 06:17 SamuraiJack joined 06:22 alini left 06:23 davido__ joined 06:28 BenGoldberg left 06:36 dayangkun left 06:38 dayangkun joined 06:40 dayangkun left 06:50 fhelmberger joined 06:54 fhelmberger left 06:56 Guest1337 joined
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) outspeaking.com/words-of-technology...t-win.html 07:13
07:18 denis_boyun joined 07:19 [Sno] joined 07:24 darutoko joined
El_Che Guest1337: stick around. The core devs are here, some probably still sleeping, some afk :). 07:35
07:42 denis_boyun left 07:43 rindolf joined 07:46 diana_olhovik joined 07:53 Sir_Ragnarok left 07:55 anaeem___ joined, gfldex joined, kaleem left 07:56 Sir_Ragnarok joined 07:57 FROGGS joined 07:58 diana_olhovik left 07:59 anaeem1_ left 08:04 denis_boyun joined, gfldex left
[Tux] nine, in Inline::Perl5, what would be the syntax for «$sth.bind_columns (\my $count);» 08:04
08:04 coffee` joined
[Tux] is creating an example for the folk on the DBI ML 08:05
works except for that
08:07 zakharyas joined 08:08 kjs_ joined, kaleem joined 08:10 kjs_ left, SamuraiJack left 08:13 konsolebox joined 08:16 abraxxa joined, yeahnoob left 08:20 kaleem left 08:21 kaleem joined 08:23 adu left 08:26 trone joined 08:30 spider-mario left 08:31 abraxxa1 joined, abraxxa left 08:33 denis_boyun left 08:43 pecastro left 08:46 Kristien joined
Kristien merhaba 08:47
08:49 _mg_ joined 08:57 xinming_ left
jnthn morning, #perl6 08:57
lizmat good *, #perl6 08:58
in case people missed it: blogs.perl.org/users/ovid/2015/02/a...cobol.html
Kristien I like how the URL doesn't have the parentheses.
jnthn That was a nice post :)
Kristien picture clauses are funny 08:59
making them rationals is a rational thing to do 09:00
09:01 anaeem___ left, anaeem1_ joined
Kristien Perl 6 is well-designed. 09:02
09:02 testo joined 09:09 Guest1337 left
Ovid_ labster: if you’re still here, thanks for the correct. I’ve updated my post. 09:11
I love how some people on HN were asking what the “tapeworm operator” was :) 09:12
09:12 testo left
Kristien lol 09:13
09:17 espadrine joined, espadrine left, espadrine joined
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 c: 1c85896 | paultcochrane++ | lib/Language/glossary.pod:
Typographical etc. corrections to glossary.pod
c: fbac250 | paultcochrane++ | lib/Language/glossary.pod:
Wrap paragraphs consistently in glossary.pod
c: 1124b3c | paultcochrane++ | lib/Language/glossary.pod:
Uncuddle an else in glossary.pod example
c: 1891a12 | paultcochrane++ | lib/Language/grammars.pod:
Typographical etc. corrections to grammars.pod
c: 3c20a9f | paultcochrane++ | lib/Language/grammars.pod:
Wrap paragraphs consistently in grammars.pod
09:19 kjs_ joined 09:21 fhelmberger joined
[ptc] m: say "\x{1F4A9}\x{0327}" 09:22
camelia rakudo-moar 613c0b: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\x'␤at /tmp/8ZgoNcbMTU:1␤------> say "\⏏x{1F4A9}\x{0327}"␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/8ZgoNcbMTU:1␤------> say …»
[ptc] was worth a try... 09:23
09:24 grondilu joined
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: perlmonks.org/?node_id=1004081 09:29
Kristien I've had this idea a long time ago
grondilu s/post of mind/post of mine/
jnthn m: say "\x[1F4A9]\x[0327]"
camelia rakudo-moar 613c0b: OUTPUT«💩̧␤»
jnthn bah, my font has the combiner, but not the base char... 09:30
FROGGS same here
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.
(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
grondilu Kristien: decimal floats need a parameter and are thus less elegant. 09:32
Kristien not necessarily
in C# they don't
grondilu plus decimal floats can't handle 1/3 and stuff
Kristien that's true, but you cannot express 1/3 as a single literal anyway
literals losing precision is silly
grondilu I'd argue that 1/3 *is* a litteral. 09:33
Kristien In Clojure it is. :P
grondilu plus decimal numbers are kind of a anthropomorphism :) Rationals are more "pure". 09:34
09:37 Ugator joined
FROGGS nude, even 09:37
Kristien FatRat.nude 09:39
grondilu wonders something about Rat literals
Kristien for people who like nude fat rats
grondilu m: say .WHAT given <1/3>
camelia rakudo-moar 613c0b: OUTPUT«(Str)␤»
grondilu was expecting (Rat) 09:40
09:40 pdcawley joined
grondilu m: say <2/6>.perl 09:41
camelia rakudo-moar 613c0b: OUTPUT«"2/6"␤»
grondilu S02 says that should return <1/3>
Kristien that'd be weird 09:42
a special case of < ... >
grondilu it's the Rat literal form
timotimo yes, NYI
Kristien (1/3) does the job fine 09:43
FROGGS m: say (2/6).perl
camelia rakudo-moar 613c0b: OUTPUT«<1/3>␤»
FROGGS grondilu: ^^
timotimo though i suppose with a little bit of Grammar.nqp change that could easily be made to work?
Kristien compiler can optimise it to literal instead of division when it so desires
.perl should be fixed instead
timotimo the optimizer already constant-folds literal Rats into Rat objects 09:44
FROGGS m: say (2/6).WHAT
camelia rakudo-moar 613c0b: OUTPUT«(Rat)␤»
grondilu surely there is a reason the spec decided the <..> form for Rat literals.
timotimo the rule is simply <[1-9]><[0-9]>* '/' <[1-9]><[0-9]>* between the <...>?
FROGGS m: say (2/6).WHAT; say (2/6).perl.EVAL.WHAT # rakudobug
camelia rakudo-moar 613c0b: OUTPUT«(Rat)␤(Str)␤»
09:44 dakkar joined
Kristien I could imagine someones reaction: "WHAT?!" 09:45
FROGGS WAT
grondilu the .perl method returns a form that is NYI. Not sure this is wrong.
coffee` WAT
Kristien a WAT slang would interpret javascript code
"slang" is Dutch for "snake" 09:46
jnthn ORM is Swedish for "snake" :P 09:47
I can't believe I haven't made a bad pun on that in some talk about OR-mapping yet... :)
09:48 rurban_ joined
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␤»
timotimo has a naive patch 09:51
... which doesn't compile :)
jnthn timotimo: Did you check if STD handles it?
if/how...
timotimo oh
i didn't
good point
ven std: role Base[::T]{}; say Base[Int]::T 09:52
camelia std f9b7f55: OUTPUT«===SORRY!===␤Confused at /tmp/Vdaxusz49i line 1:␤------> role Base[::T]{}; say Base[Int]:⏏:T␤ expecting any of:␤ coloncircumfix␤ signature␤Parse failed␤FAILED 00:01 143m␤»
ven so it doesn't parse in std either.
FROGGS Ovid_++
jnthn ven: I...don't expect that to parse. 09:53
timotimo i don't see it handle that
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(...)
timotimo i think so
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
s/could right/could write/ # what a silly typo
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␤␤»
Kristien are the passengers of the plane all wright?
ven m: role Foo { subset Bar of Int }; say Foo.Bar.perl;
camelia rakudo-moar 613c0b: OUTPUT«No such method 'Bar' for invocant of type 'Foo'␤ in block <unit> at /tmp/h_KWW0BOIz:1␤␤»
FROGGS Kristien: :P
ven m: role Foo { our subset Bar of Int }; say Foo::Bar.perl;
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␤␤»
FROGGS grondilu: why don't you just corner brackets and put commas in between? 09:56
I mean, quoting constructs are about quoting (==stringifying) things
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 < >?
grondilu FROGGS: yeah, good point. quoting should return strings indeed. 09:57
timotimo (if and only if it doesn't break any spec tests)
Kristien how do you type corner brackets :(
FROGGS timotimo: <3/2> looks too magical to me 09:58
Kristien: as usual? :D
grondilu FROGGS: but it's spec !?
FROGGS grondilu: does not mean it is sane
Kristien FROGGS: oh []? I thought those Japanese ones
FROGGS grondilu: every bit of the design docs that is not yet implemented by any of the compilers is questionable IMO
timotimo FROGGS: but it's specced? 09:59
FROGGS Kristien: I meant, < >
Kristien ohh
FROGGS timotimo: it is *designed*
timotimo er
correct
jnthn FROGGS++ :)
grondilu well, that'd explain why it's NYI. I suppose you're not the only one who question the idea.
jnthn timotimo: I'm not sure, off hand.
FROGGS spec means roast which means that either Pugs, niecza or rakudo implemented it
jnthn m: val() 10:00
camelia rakudo-moar 613c0b: OUTPUT«===SORRY!=== Error while compiling /tmp/IQmVzvLvGH␤Undeclared routine:␤ val used at line 1␤␤»
jnthn Hmm, we have nothing on that yet
timotimo correct
jnthn timotimo: Thing is, I think it's meant to be a RatStr, not just a Rat?
timotimo nothing at all
now 10:01
no* 10:02
Any such literal, when written without spaces, produces a pure numeric value without a stringy allomorphism. Put spaces to override that:
<1/2> # a Rat
< 1/2 > # a RatStr
design.perl6.org/S02.html#Allomorph..._semantics
jnthn Oh...
timotimo i have a failure in "weird-errors" and "start.t", but otherwise 5 todos passed
i'll just push it to a branch, because i'll have to AFK again
jnthn The "any such literal" suggests that it extends to all Numeric forms? 10:03
If so, can we (in the Action method for a <...> quote), do:
if [it's just a single value not a list] {
timotimo as in "doesn't have a space in it at all"? that sounds like something nibblish 10:04
but yeah, there ought to be a branch for complex numbers there, too
jnthn try { ...call .Numeric on the string, if we are successful then add result as a constant and update the QAST we'll produce }
}
m: say "1/2".Numeric.WHAT
camelia rakudo-moar 613c0b: OUTPUT«(Rat)␤»
jnthn m: say " 1/2".Numeric.WHAT
camelia rakudo-moar 613c0b: OUTPUT«(Rat)␤»
jnthn Ah
Darn, that is soft on whitespace... 10:05
timotimo that'd be "doesn't have spaces"
jnthn Yeah, but maybe we can check if the string contains whitespace as part of the initial "if"
timotimo also not sure how <1 / 5> is supposed to work
jnthn I'm quite sure we don't want the .Numeric logic implemented in two places.
So I'm reluctant to go special-casing it in the grammar.
Kristien special cases break generic code 10:06
jnthn Right.
Do it with .Numeric and we get the complex and so on for free also.
dalek kudo/angular_bracket_literal_semantics: b49d943 | timotimo++ | src/Perl6/ (2 files):
this is how <1/5> could produce a Rat directly.
timotimo that's fair. 10:07
i could have just not pushed this branch then :)
jnthn otoh, you could have your grammar rule call <numeric>
'<' ~ <numeric> ~ '>'
timotimo you mean '<' ~ '>' <numeric> :)
jnthn And that probably also re-uses some logic.
uh, yes
But
wait, don't use ~
'cus we don't want to explode
We just want to parse it as a normal quote in that case 10:08
timotimo it already uses ~ around the alteration
jnthn Ah
FROGGS timotimo: I record that for the ticket
grondilu what about '<' ~ <numeric> % \s+ ~ '>'? Would that be acceptable? 10:09
jnthn That's probably better still
grondilu: That looks like a % without a quantifier to modify... :)
timotimo our <number> doesn't handle Rat at all, though
jnthn Yeah, and nor STDs, looking at it. Huh. :)
timotimo so far we've constructed Rat through constant folding
jnthn oh wait, it does
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
Ah, comment says:
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.
jnthn # <numeric> is used by Str.Numeric conversions such as those done by val()
10:11 _mg_ left
grondilu meant <-5/3> 10:11
timotimo grondilu: no, you can just let the constant folder do it for you
jnthn Which again implies we want val here...
timotimo oh, negative rats don't get parsed here at all yet
10:11 _mg_ joined
timotimo yay for special cases :) 10:11
jnthn Except we somehow need it to not produce the allomorph in this case.
Hmm.
:)
10:12 _mg_ left
grondilu m: say <1/2 3/4 -5/3>».Rat; 10:12
camelia rakudo-moar 613c0b: OUTPUT«0.5 0.75 -1.666667␤»
FROGGS timotimo: you can close a ticket when you are done :o) #123741
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123741
grondilu (I guess I can use ».Rat)
timotimo oh ,you want spaces instead of commas 10:13
right
Kristien m: say <1/2 3/4 -5/3>>>.Rat
camelia rakudo-moar 613c0b: OUTPUT«0.5 0.75 -1.666667␤»
grondilu (which is what I often do on RosettaCode, for instance anyway)
timotimo is qw supposed to put multiples through val() as well?
like >>.&val()?
my AFK time has come :)
10:15 _mg_ joined
dalek kudo/angular_bracket_literal_semantics: fd7089b | timotimo++ | src/Perl6/Grammar.nqp:
allow negative numbers in Rat, too.
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?
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
grondilu: it's designed to bypass the qw[], though, IIUC
10:17 andreoss joined, abraxxa1 left, abraxxa joined
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 )
timotimo got you covered 10:18
q:val[ ... ]
or qw:val[ ]
10:18 diana_olhovik joined
grondilu we'd still need a short notation that'd differ from <..> 10:19
because q:val[1/3] would be way too long 10:20
10:23 pecastro joined 10:28 kjs_ left, Kristien left 10:32 virtualsue joined 10:33 kjs_ joined 10:41 donaldh joined 10:43 kjs_ left, kjs_ joined 10:48 _mg_ left 10:50 kjs_ left 10:52 mikef joined 10:56 Kristien joined 11:05 Kristien left
moritz well, the obvious way would be to call it q:v, and that can automatically shortened to qv 11:07
11:11 konsolebox left
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_col 11:14
jnthn nine: Note that $count is itself a Scalar that can be assigned into 11:15
[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
[Tux] but IO is more important
11:17 jest1 joined
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.
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
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
nine jnthn: add a trait that Inline::Perl5 recognizes or something like that.
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
s/which/with/
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
jnthn: oh, yes, that's even better, you're right 11:21
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␤»
[Tux] bind_columns indeed is used mainly for speed, but *also* for convenience 11:25
[Tux] tries to find a link to the example
metacpan.org/pod/DBI#bind_columns => second code snippet 11:26
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
when using fetchrow_hashref, one gets a new hash
using additional element, the hash can have "common" elements to all records that are not affected by fetches 11:28
11:28 konsolebox joined, konsolebox left
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
11:29 kjs_ joined
[Tux] glad to be of help 11:29
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
learned a lot
now get me back aka!
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
El_Che: the problem with Qt is the same as for Perl 4: you'd need someone who maintains them. 11:32
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:33
11:39 sqirrel_ joined 11:41 xfix joined 11:43 H2O1 joined, H2O1 left 11:45 konsolebox joined 11:48 anaeem1_ left 12:03 donaldh left 12:12 konsolebox left 12:28 anaeem1 joined 12:29 andreoss left
moritz news.ycombinator.com/item?id=9000678 top-most comment is about dropping the "Perl" from "Perl 6". Again. Sight 12:30
somebody please write an FAQ for that?
12:32 zakharyas left 12:39 rmgk_ joined, rmgk is now known as Guest97240, Guest97240 left, rmgk_ is now known as rmgk
FROGGS .u "\x[1F4A9]\x[0327]" 12:39
yoleaux U+0022 QUOTATION MARK [Po] (")
U+0030 DIGIT ZERO [Nd] (0)
U+0031 DIGIT ONE [Nd] (1)
FROGGS m: say "\x[1F4A9]\x[0327]"
camelia rakudo-moar 613c0b: OUTPUT«💩̧␤»
FROGGS .u 💩̧␤ 12:40
yoleaux U+0327 COMBINING CEDILLA [Mn] (◌̧)
U+2424 SYMBOL FOR NEWLINE [So] (␤)
U+1F4A9 PILE OF POO [So] (💩)
12:41 andreoss joined 12:42 _mg_ joined
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:42
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:44
moritz Peter_R: well, it could address a few common points, and state the position of the Perl 6 community towards a rename 12:45
nine: I can highly recommend "Lillyhammer" (US-Norwegian co production) 12:46
and it's only 2x 8 episodes or so
Peter_R Certainly worth doing if someone wants to, just think it will be pretty ineffective :D
moritz (I've only watched the first season though)
arnsholt Orphan Black is cool too 12:47
nine moritz: thanks! I'll try to get it
timotimo El_Che: we have GTK::Simple, which is no tmuch, but it's a start
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
and ideally, we'd have a binding for GTK and friends that's based on gobject introspection data
12:49 mvuets joined
El_Che timotimo: thx, I'll look into it 12:49
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:52
12:55 zakharyas joined 13:02 skids left
timotimo Ovid_: i wonder why you showed 3.1415927.Rat instead of showing pi.Rat, which is more interesting IMO 13:03
m: say pi.Rat.perl 13:04
camelia rakudo-moar 613c0b: OUTPUT«<355/113>␤»
timotimo m: say 3.1415927.Rat.nude
camelia rakudo-moar 613c0b: OUTPUT«31415927 10000000␤»
timotimo m: say 3.1415927 - pi 13:05
camelia rakudo-moar 613c0b: OUTPUT«4.64102067887495e-08␤»
timotimo m: say 3.1415927.Rat - pi.Rat
camelia rakudo-moar 613c0b: OUTPUT«-0.00000022035␤»
timotimo m: say (3.1415927.Rat - pi.Rat).Num
camelia rakudo-moar 613c0b: OUTPUT«-2.20353982300885e-07␤»
timotimo hm.
Ovid_ timotimo: because I didn’t know about pi.rat? :)
timotimo m: say 0.12352365.Rat.nude
camelia rakudo-moar 613c0b: OUTPUT«2470473 20000000␤»
timotimo m: say 0.1235236.Rat.nude
camelia rakudo-moar 613c0b: OUTPUT«308809 2500000␤»
timotimo m: say 0.835236.Rat.nude
camelia rakudo-moar 613c0b: OUTPUT«208809 250000␤»
timotimo hrmpf
m: say 1.rand.Rat.nude 13:06
camelia rakudo-moar 613c0b: OUTPUT«463 641␤»
timotimo m: say 1.rand.Rat.nude
camelia rakudo-moar 613c0b: OUTPUT«474 2111␤»
Ovid_ Wait, pi.Rat is 355/133? That seems wrong.
timotimo m: say 1.rand.Rat.nude xx 10
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␤»
timotimo you think so?
m: say 355e0 / 133e0
camelia rakudo-moar 613c0b: OUTPUT«2.66917293233083␤»
timotimo oh, huh?
m: say pi.Rat.Num
camelia rakudo-moar 613c0b: OUTPUT«3.14159292035398␤»
timotimo m: say pi.Rat.nude
camelia rakudo-moar 613c0b: OUTPUT«355 113␤»
timotimo there we go, 113 not 133
m: say 355e0 / 113e0 13:07
camelia rakudo-moar 613c0b: OUTPUT«3.14159292035398␤»
timotimo close enough.
m: say pi.perl
camelia rakudo-moar 613c0b: OUTPUT«3.14159265358979e0␤»
timotimo m: say pi.FatRat.nude
camelia rakudo-moar 613c0b: OUTPUT«355 113␤»
btyler it even has a wiki, interesting: en.wikipedia.org/wiki/355/113
moritz m: say (pi - pi.Rat) / pi
camelia rakudo-moar 613c0b: OUTPUT«-8.49136787674061e-08␤»
Ovid_ timotimo: it starts to deviate at 7 decimal places out.
moritz that's not too bad
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
it's that argument again
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
moritz Ovid_: well, you can't represent sqrt(2) exactly either
DrForr_ continued fractions FTW.
moritz Ovid_: ... unless you write a computer algebra system 13:10
Ovid_: same for pi
FROGGS btyler: en.wikipedia.org/wiki/355/113 is a nice read, aye
timotimo ah
m: say pi.Rat; say pi.Rat(0.000000000001) 13:11
camelia rakudo-moar 613c0b: OUTPUT«3.141593␤3.14159265␤»
timotimo m: say pi.Rat.nude; say pi.Rat(0.000000000001).nude
camelia rakudo-moar 613c0b: OUTPUT«355 113␤4272943 1360120␤»
timotimo default epsilon is 1.0e-6
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.
timotimo m: say pi.Rat(0.1 ** $_).nude for ^10
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␤»
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
camelia rakudo-moar 613c0b: OUTPUT«3␤3.142857␤3.142857␤3.141509␤3.141509␤3.141593␤3.141593␤3.141593␤3.141593␤3.141593␤»
timotimo m: say pi.FatRat(0.1 ** $_) for ^10
camelia rakudo-moar 613c0b: OUTPUT«3␤3.142857␤3.142857␤3.141509␤3.141509␤3.141593␤3.141593␤3.141593␤3.141593␤3.141593␤»
timotimo GTG AFK
moritz m: say pi.FatRat(0.1 ** 100).perl
camelia rakudo-moar 613c0b: OUTPUT«FatRat.new(245850922, 78256779)␤»
moritz m: say pi.FatRat(1e-30).^name 13:13
camelia rakudo-moar 613c0b: OUTPUT«FatRat␤»
13:14 jest1 left
moritz m: say (pi - pi.FatRat(1e-20)) / pi 13:14
camelia rakudo-moar 613c0b: OUTPUT«0␤»
13:22 coffee` left 13:31 chenryn joined
JimmyZ m: say .1e0 + .2e0 - .3e0 13:32
camelia rakudo-moar 613c0b: OUTPUT«5.55111512312578e-17␤»
JimmyZ m: say .1e0 + .2e0 - .3 13:33
camelia rakudo-moar 613c0b: OUTPUT«5.55111512312578e-17␤»
JimmyZ m: say .1 + .2 - .3
camelia rakudo-moar 613c0b: OUTPUT«0␤»
JimmyZ m: say .1 + .2 - .3e0
camelia rakudo-moar 613c0b: OUTPUT«0␤»
JimmyZ m: say .1 + .2e0 - .3e0
camelia rakudo-moar 613c0b: OUTPUT«5.55111512312578e-17␤»
JimmyZ ^^ re: blogs.perl.org/users/ovid/2015/02/a...cobol.html 13:35
moritz yes, you can mess it up if you try hard enough 13:36
13:36 kaare_ left
FROGGS JimmyZ: the point is that you have to choose your imprecision, and that you actually can choose 13:39
moritz and you have to be aware of floats to actually fall into their trap 13:40
masak .oO( the mirror can transfer the stone only to someone who wants to find the stone but not use it ) 13:44
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
a "no workaround" situation 13:47
FROGGS puts a Fidelius charm around his flat...
masak could be there's the equivalent of strong encryption for magical items.
moritz not just here, but also the island where one of the horcruxes was hidden
masak right.
moritz the basin where the water had to be drunk 13:48
the boat with the chain that can support only one fully-grown wizard
etc.
psch o/
FROGGS (and an elf)
hi psch 13:49
moritz that's not a fully-grown wizard :-)
jnthn
.oO( If we write an AOT compiler, we can emit an elf whenever we feel like... )
psch github.com/peschwa/rakudo/compare/meta-assign # fixes [R~]=, but i'm not 100% confident in it. spectest looks clean though
moritz jnthn: or even a zwoelf 13:51
FROGGS groans
psch the issue is, that in [R~]= there's «QAST::Op(call) R~» below «QAST::Op(call &METAOP_ASSIGN)», which apparently is NQPMu
in nom currently, that is 13:52
13:52 telex left, _mg_ left
jnthn psch: I'll have a closer look at it later this evening. 13:53
psch jnthn: alright. PR is opened as #360
jnthn is trying to finish up the slides a couple of hours of evening teaching :)
13:54 telex joined
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/
FROGGS \o/ 13:55
FROGGS renames jnthn to sami
jnthn I already decided one of my conf talks this year is gonna be called "Meet the natives" 13:56
...if I can get anyone to accept the submission, at least. :P
FROGGS *g*
13:58 sqirrel_ left, coffee` joined 14:02 kjs_ left 14:08 Rounin left 14:10 cdc left, cdc joined, salva left, bcode left 14:11 breinbaas joined, bcode joined, salva joined
JimmyZ \o/ 14:13
masak m: my %h; %h<foo> ~= "hi"; say %h<foo> 14:18
camelia rakudo-moar 613c0b: OUTPUT«hi␤»
masak \o/
moritz m: my %h is default('hi'); say %h<foo>
camelia rakudo-moar 613c0b: OUTPUT«hi␤»
14:19 Mouq joined 14:20 anaeem1 left
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, chenryn left
timotimo man, i'd love to annotate every single comment in that HN thread with "btw, in perl6 this is fixed" 14:23
like "ermergerd, look at $foo->{bar}{baz} that looks so ugly compared to foo.bar.baz in python!!!kk
pdcawley isn't that foo['bar']['baz'] in python? 14:24
Which isn't quite so pretty.
masak unfortunately, people who cannot get past syntax in that way aren't often worth trying to sway.
in my experience.
ven pdcawley: nah, that works in python as well as in js
timotimo pdcawley: "objects are glorified hashes in python as well as perl anyway"
pdcawley Ah... didn't realise. 14:25
timotimo masak: personally, i don't like the ->{foo} method call(?) syntax in perl5
or is that just attribute access?
jnthn Objects ain't that in Perl 6... :)
ven timotimo: explicit deref
pdcawley: actually, that's a lie! I read that from a HN comment but it's wrong.
psch timotimo: methods are coderef attributes in perl5 OO, afaik
masak timotimo: it's just attribute access. methods are in the package.
ven yeah, they are, psch
pdcawley There's a bunch of people who don't actually like syntax at all. But they have scheme.
ven has gotten to that part in his perl5 book last night... :)
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.
ven $foo->{bar} is is like $$foo{bar}, iirc(dereference $foo, then property access)
pdcawley ven: In which case, you wouldn't do it like $foo->{bar}{baz} in perl, unless you were playing _very_ fast and loose.
masak of course, nothing prevents you from putting a coderef in an attribute; but that's not the default way to do a method.
ven pdcawley: but that won't prevent people in HN posting crap :)
moritz masak: ... and it won't be called for you by normal method call syntax 14:27
masak right.
pdcawley ven: I can't help with that problem.
14:27 Mouq left
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
s/being/beyond/
ven right, right. Went through the HN comments as well and facepalmed. Then remembered why I *never* go to hn
moritz has a solution, unfortunately it has some probably unwanted side effects
timotimo since i don't know any perl5 at all, i'll stop here :P
andreoss m: my $y ~=~ v1; say $y
camelia rakudo-moar 613c0b: OUTPUT«1␤»
masak pdcawley: "Someone is wrong on the internet" -- languagelog.ldc.upenn.edu/nll/?p=1159 14:28
ven timotimo: same for me, but then I got a book from wendy :P
pdcawley masak: Except... "Someone on the internet is wrong" sings so much better.
masak: I know this, because a friend has written that very song.
masak pdcawley: fair enough.
that's not the URL I wanted, by the way.
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.
nine Funny thing about such sentences is that Python and Perl 5 really are ridiculously similar.
ven the xkcd one is linked in the post :P
nine It's just using different syntax for the exact same constructs.
pdcawley nine: Indeed so. Python's where TimToady nicked the perl object model from isn't it?
masak think so. 14:30
hard to believe, though.
they work quite differently.
xfix [14:35] <JimmyZ> ^^ re: blogs.perl.org/users/ovid/2015/02/a...cobol.html 14:32
Default Rat is IMO one of best features in Perl 6.
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
i don't really understand that, i don't think
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).
xfix=# SELECT 0.1 + 0.2 - 0.3; 14:34
0.0
This is what I expect, not some small number.
andreoss m: my $x =~() ... 1,2,3; say $x.WHAT
camelia rakudo-moar 613c0b: OUTPUT«(timeout)» 14:35
[ptc] timotimo: oh, that's not nice Python code (imo)
masak std: my $x =~() ... 1,2,3;
camelia std f9b7f55: OUTPUT«ok 00:01 140m␤»
masak thought we had a `=~` op warning
xfix In Ruby, there is syntactic sugar for rationals, but I will say that it's ugly. 14:36
irb(main):001:0> 145/100r
=> (29/20)
JimmyZ m: my num $x = .3
camelia rakudo-moar 613c0b: OUTPUT«This type cannot unbox to a native number␤ in block <unit> at /tmp/PxDhkZPJoO:1␤␤»
psch std: my $x; $x =~ "foo"
camelia std f9b7f55: OUTPUT«===SORRY!===␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/apDhJvVYAG line 1:␤------> my $x; $x =~⏏ "foo"␤Parse failed␤FAILED 00:00 136m␤»
xfix (oh wait, 1.45r works as well)
JimmyZ BUG?
jnthn JimmyZ: NO
andreoss m: say ()...()
JimmyZ so I have to add e0?
jnthn Well, except the (surely already filed) note that this error misses the typename Rat
JimmyZ: Yes.
camelia rakudo-moar 613c0b: OUTPUT«(timeout)»
masak m: say Rat ~~ num 14:37
camelia rakudo-moar 613c0b: OUTPUT«False␤»
masak JimmyZ: there's why not.
xfix People may claim that stuff like docs.python.org/3/faq/design.html#...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 :)
moritz xfix: they are a design decision, and thus not bugs. By definition. I agree that that they are a bad design decision though
xfix It should be either rationals (Perl 6), or numbers with specified precision (for example PostgreSQL).
decimals*
colomon is blanking on how to read a directory in p6 14:40
jnthn oh dir 14:41
masak colomon: dir()
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
colomon masak++ jnthn++ # apparently colomon is to dumb to look at the obvious
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()? :)
xfix FROGGS: In PostgreSQL it doesn't use floating points here.
xfix=# SELECT cast(0.1e0 AS double precision) + 0.2 - 0.3; 14:43
5.55111512312578e-17
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".
(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
14:48 donaldh joined
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␤»
retupmoca .botsnack
yoleaux 03:33Z <raydiak> retupmoca: awesome! thanks for the heads-up :)
:D
14:52 pmurias joined
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?
pmurias ven: what the newest one? 14:55
ven pmurias: "soundscript"
14:55 adu joined
JimmyZ www.2ality.com/2015/02/soundscript.html 14:56
pmurias ven: so it's atscript, dart, soundscript and the java-to-js?
ven pmurias: oh uyeah that's 4, even. not 3
I forgot about GWT... 14:57
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
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 )
ven pmurias: I like when things are mature
or at least get time to mature.
JimmyZ and then we have nqp-js :P 15:00
ven pmurias: mind you, that's from someone working on coffee/livescript
pmurias soundscript seems like something that might help with nqp-js performance
ven afk english exam
15:01 ven left
jnthn away for some hours... 15:05
15:07 kaleem left 15:10 spider-mario joined 15:15 lucas__ joined
pmurias my git repo got corrupted :( 15:20
15:20 virtualsue left
masak do you have a recent backup? 15:20
how did the corruption happen?
does `git fsck` help?
pmurias masak: an object file seems to be missing 15:21
pastie.org/9889167 15:23
masak: I did a git commit missing_file
masak: and that cause the corruption for some reason
15:24 Kristien joined
masak weird. 15:28
maybe ask on #git ?
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
pmurias moritz: I'll just clone and recommit stuff 15:28
15:29 [particle] joined 15:32 Kristien left
timotimo pmurias: can you tell what the object was hung off of? 15:35
hoelzro morning #perl6
15:38 jinxter joined
dalek p-js: f81f383 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement nqp::isstr.
15:42
p-js: f1c441c | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement nqp::eqat.
p-js: 06561c5 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
Add tests for nqp::eqat.
pmurias timotimo: I just salvaged all the changes from the repo
timotimo: it seems a bunch of objects got empty
timotimo OK 15:43
a few days ago, a whole bunch of things disappeared from my phone :\
it seems like it's only music, though
15:44 jluis left
hoelzro pmurias: if one wanted to help with nqp-js, what would you say the next milestone is? 15:46
15:46 donaldh left
hoelzro getting it to compile itself? 15:46
hoelzro was poking around in nqp-js a bit last night
psch ~320 lines asm codegen diff /o\ 15:47
psch hopes it actually works
15:49 jinxter left
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
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
and the it's rules
s/the/then
hoelzro hmm...do you have have test code that should work, but currently doesn't? 15:51
ah, rules o_O
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
diff(nqp, nqp-js) is basically the JS QAST emitter and src/vm/js, right?
pmurias yes
hoelzro: I should start working on a HACKING file 15:53
15:53 Mouq joined
hoelzro pmurias: well, I wouldn't mind helping with it, but obviously you are more in the know than I =) 15:53
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.
hoelzro pmurias: I guess where things are, what works differently in the JS implementation compared to others
timotimo psch: asm codegen? for moarvm? 15:57
that sounds exciting :3
15:57 anaeem1_ left
psch timotimo: no, still org.objectweb.asm ;) 15:57
timotimo: i.e. for jvm
15:58 anaeem1 joined
arnsholt org.objectweb.asm is on-the-fly JVM bytecode generation, not assembly =) 15:58
timotimo oh
right, you're not brrt %)
still sounds nice 15:59
arnsholt It's still pretty neat though
psch timotimo: well, it's a currently-broken case of marshalling
timotimo right, the thing with the annotations?
arnsholt Basically P6opaque instances compile to run-time generated classes with appropriately-typed fields
psch marshalling of listy types to java methods that aren't overloaded (i.e. don't do the MMD i implemented) are currently broken
s/are/is/
timotimo oh, we're talking about JVM interop 16:00
now i'm back on the same page, i think
16:00 anaeem1 left
arnsholt We also use it to interact with JNA for NativeCall 16:00
timotimo OK
arnsholt Which lets us avoid writing C glue code with JNI 16:01
16:01 anaeem1 joined
timotimo o'course 16:01
dalek p-js: 2436a42 | (Pawel Murias)++ | TODO:
Add a TODO item.
p-js: fed7957 | (Pawel Murias)++ | HACKING:
Start of a HACKING file.
nine PerlJam: :) 16:02
16:02 anaeem1 left 16:03 anaeem1_ joined 16:04 Kristien joined
dalek rl6-roast-data: a1b8a72 | coke++ | / (5 files):
today (automated commit)
16:04
Kristien hi there
PerlJam greetings Kristien
hoelzro pmurias++ 16:06
16:06 [particle] left 16:07 Kristien left 16:09 adu left, lucas__ left 16:10 kaleem joined 16:11 Kristien joined
Kristien I'm going to buy Modern Perl 16:11
on paper 16:12
16:13 skids joined, Kristien left 16:14 sjxm9203 joined
hoelzro what will the Perl 6 book be? Moderner Perl? =P 16:15
hoelzro .oO( what's the gender of Perl in German? )
FROGGS hoelzro: neutral 16:16
so it would be "Modernes Perl"
hoelzro perfect, so no confusion =)
I was worried it might be masculine!
FROGGS or even "Moderneres Perl"
PerlJam hoelzro: it will just be "Programming Perl 6" :)
timotimo "Die Perl" 16:17
FROGGS >.o
timotimo like "Die GNU Autotools"
hoelzro timotimo: but that's plural
timotimo doesn't matter
in german, you can always say "Die"
FROGGS :P
hoelzro hahah
I wish
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
timotimo excellent :D 16:19
dalek p-js: 7f1001b | (Pawel Murias)++ | HACKING:
Start of a compilation overview.
16:21
psch .oO( "Moderndes Perl" )
psch .oO( "Das Nachschlagewerk für den Wartungsprogrammier der Perl 4 Codebase!" ) 16:22
FROGGS psch: what should that be? *g*
O.o
ahh "Modernd"
hehe
psch s/ier/ierer/ 16:23
16:23 kaleem left
timotimo "Mordendes Perl" 16:26
psch i'm unsure about my ifs 16:29
i have 12 different cases that share 60% or so of code 16:31
16:31 adu joined
psch but depending on which case they are they potentially have a few extra statements 16:31
so i could shove them in one if #`[[ 12 cases here ]] { &common-code; if $case-one { ... } } 16:32
(etc.)
or leave it as 12 branches
adu hoelzro: yes
psch i have no idea which one is more clear
hoelzro adu: I was curious about if you have a plan to handle typedef, esp. bool_t, Bool, BOOL, etc
psch: would you say you're...iffy? 16:33
</sunglasses>
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 :)
dalek p-js: 9d92aa8 | (Pawel Murias)++ | HACKING:
Add more info about how the ops are defined to HACKING.
16:35
16:37 zakharyas left
dalek kudo/nom: fe15ce6 | peschwa++ | src/Perl6/Actions.nqp:
Fix [R~]= discovered by avuserow++.
16:37
kudo/nom: 49e2cd3 | lizmat++ | src/Perl6/Actions.nqp:
Merge pull request #360 from peschwa/meta-assign

Fix [R~]= discovered by avuserow++.
16:40 kjs_ left 16:42 kjs_ joined
psch thanks lizmat++ 16:43
lizmat yw
psch .tell jnthn lizmat++ merged the [R~]= PR, fyi 16:44
yoleaux psch: I'll pass your message to jnthn.
lizmat psch: I didn't see any TODO's passing now :-(
:-)
psch lizmat: because it wasn't tested before and failed. i have added a test in S03-metaops/reverse.t but skipped 16:45
where "failed" means "dies"
err, "died" :)
lizmat ok, I'll unfudge :-) 16:46
16:46 mst left, mst joined
dalek ast: 8b36397 | lizmat++ | S03-metaops/reverse.t:
Unfudge now passing test, psch++
16:47
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:48
hoelzro pmurias: ok, thanks! I'll keep digging in and let you know 16:49
it's just tough because I'm pretty sure you're asleep during my prime hacking time =/
16:54 kjs_ left 16:57 gfldex joined 16:59 pecastro left
skids Is there a way to alter the pointer value in a REPR('CPointer') object without changing the ObjAt/making a new one? 17:01
pmurias hoelzro: what's your time zone? 17:03
hoelzro pmurias: UTC-6 17:04
17:05 rurban_ left 17:06 Mouq left 17:08 jinxter joined
jdv79 i might get thai for lunch... 17:08
sorry, wrong tab
dalek kudo/nom: d320f00 | lizmat++ | src/core/traits.pm:
Hide helper sub set_(leading|trailing)_docs better
17:09 diana_olhovik left, FROGGS left
timotimo skids: you can box an integer into a CPointer repr'd object 17:09
17:11 mohij joined
skids Into an existing CPointer repr'd object? 17:12
17:12 rurban_ joined
timotimo no, you can only "box into" type objects 17:12
moritz ... which creates a new object
timotimo right 17:13
a CPointer repr'd object is exactly defined by its boxed integer
which is the address
17:13 espadrine left
timotimo it's literally nothing else, it is its identity 17:13
dalek kudo/use-nqp: de5afc4 | moritz++ | / (4 files):
(failed) attempt to require "use nqp;" for nqp:: ops
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.
Which may be a NYI of some sort... 17:15
17:15 jinxter left
moritz no 17:15
17:15 jinxter joined
moritz well 17:15
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))
camelia ( no output )
lizmat trying to reboot the "aka" trait as "is also-known-as" trait
pmurias nqp-m: say(nqp::isnull(nqp::splice(nqp::list(),nqp::list(), 0, 0)))
camelia nqp-moarvm: OUTPUT«0␤»
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
and good morning #perl6
pmurias needs to move nqp-js forward to current nqp
hoelzro raydiak: what I mean is how would typedefs be handled if you use C::Parser to generate NativeCall bindings from a header 17:18
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
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 :)
so those questions haven't been answered yet
hoelzro raydiak: right, I'm just thinking ahead 17:21
it's a curiosity, really; I'm just eager for others' input on it =)
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
raydiak how do people bind bools by hand right now? I haven't tried, myself 17:22
psch portaudio.com/docs/v19-doxydocs/por...988014cbbe and github.com/peschwa/Audio-PortAudio...io.pm#L142 for reference 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
avar Is there a way to get the nqp/rakudo/rakudo-spectest tests to execute in parallel?
moritz avar: TEST_JOBS=4 17:24
hoelzro avar: TEST_JOBS=$N make spectest
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
hoelzro raydiak: good question
raydiak hoelzro: oh that's kinda neat...maybe something to add to NativeCall itself
moritz as documented in INSTALL.txt, but not README.md
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
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
hoelzro mhmm
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
right now, a lot of the Parameter attributes are accessible by NQP only
moritz hoelzro: you call code with captures, not with signatures
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
yes
moritz hoelzro: I don't think that's supported, or achievable by reasonable workarounds
hoelzro I think it would be doable in NQP, but it would be dirty
moritz hoelzro: how would you install the parameters from the signature as lexicals in code the code object?
hoelzro hmm 17:30
good question
17:30 mr-foobar joined
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
let's say I have a native function foo(int, char *, int)
the 2nd int is really a boolean parameter
so I would like to bind it using sub foo(Int, Str, Bool) is native(...) { * } 17:31
I'd like to be able to define a trait to make the input Bool into an int before calling the native routine
or make any arbitrary changes to the inputs before handling the native sub data
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 anaeem1_ left
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
17:32 anaeem1 joined
moritz hoelzro: and then write your own nativ-y trait, and redispatch to the generalized 'is native' trait 17:32
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)?
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
moritz hoelzro: that's not quite what I meant 17:34
hoelzro: sub foo(Int, Str, Bool) is nativish('mylib') {*}
17:35 mvuets left
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
hoelzro moritz: so then in the implementation for nativish, what does one pass to trait_mod:<is>(:native)?
ooooh, a parameters thing 17:36
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? =)
ingy moritz: `git subrepo clone -f …`
moritz ingy: is that as slow as 'git subrepo clone'?
ingy is the same as reclone was
pmichaud good morning, #perl6 17:37
PerlJam hoelzro: just make a macro for it then :)
ingy moritz: for some reason the fetch is slow
are you using github?
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
ingy: yes
hoelzro PerlJam: touche
17:38 jinxter left
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
hoelzro moritz: yes, that's true
moritz perlgeek.de/blog-en/perl-6/2015-all...a-box.html 17:39
ingy :)
moritz: can you file an issue on the slowness?
moritz ingy: well, that was when I initially created it, that was before the upgrade 17:40
ingy: so I'm not sure it till exists
ingy: but if I observe it again, I will
raydiak had severe slowness cloning from github on hack when he first set his account up
moritz ingy: also, it sucks that I can't do a clone -f when having unstaged changes somewhere completely else
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
ingy: willdo
ingy moritz: things are now stable enough that we can start allowing non-pristine states
dalek p-js: 83b4da9 | (Pawel Murias)++ | src/vm/js/ (2 files):
Implement nqp::splice.
17:42
p-js: 63861b6 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
Add tests for nqp::splice.
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…
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
though I haven't actually seen that behavior in quite a while...but haven't been using hack much either 17:45
17:45 dakkar left
grondilu saw ~=~ in the backlog and has no idea what this is. 17:46
17:46 Kristien joined
grondilu std: 1 ~=~ 2 17:47
camelia std f9b7f55: OUTPUT«ok 00:00 136m␤»
raydiak it's $a ~= ~$b
grondilu oh
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
hoelzro =)
Kristien (Clean Code is a nice book btw) 17:48
moritz raydiak: fwiw I haven't observed pathologically slow cloning on hack so far 17:49
17:49 sjxm9203 left
TimToady yawns after sleeping 10.5 hours straight... 17:49
raydiak nice 17:50
moritz TimToady: welcome back among the liv^Wwaking :-)
17:52 pmurias left
TimToady yeah, took way to long to readsorb that wooden stake through my heart... 17:53
*too
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
ab5tract hoelzro: that prospect is so very exciting 17:55
adu well I don't know anything about NativeCall, I just know C
hoelzro ab5tract: indeed!
ab5tract and adu++ for bringing us so much closer to the dream :)
hoelzro adu: I don't think you have to worrya bout it =) 17:56
adu ab5tract: hoelzro: thanks :)
ab5tract btyler: ready to pick your Git bindings back up? :D
adu raydiak++ for helping me notice bugs
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
17:58 tadzik left
lizmat ab5tract: I think the consensus was to include it as a lib 17:58
so you would still need a "use NativeCall" 17:59
PerlJam aye, not in the setting, but "comes with Rakudo"
ab5tract lizmat: ah, makes sense that way indeed.
lizmat and it would be overridable by another installed "NativeCall" if necesary
pmichaud until there's consensus about how native calling will work across implementations, I don't think it belongs in core yet
ab5tract okay, as long as it ships with the rakudo non-star release
pmichaud good afternoon, #perl6
lizmat pmichaud o/
ab5tract hi pmichaud! and that's a very good point. 18:00
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:01
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:04
lizmat I think that NativeCall is the much easier incarnation of Perl5's XS 18:05
and judging by how many modules use XS in Perl5, it will take off like a butterfly :-)
once people start using Perl 6 more
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
lizmat well, I didn't say it was perfect yet :-)
pmichaud ab5tract: thanks, I'm glad the talk is having its intended effect :) 18:07
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
ODF is another prime example, I think. 18:08
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
ab5tract avar: ufo 18:11
avar This is what I have so far: gist.github.com/avar/430043e8944d6767df87
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:13
ab5tract avar: github.com/masak/ufo 18:15
18:15 fhelmberger left
ab5tract it is a self-contained script, so you can even 'curl' it in the package build environment and discard 18:16
and naturally, it can generate a makefile to install itself
18:18 trone left 18:20 Rounin joined
moritz github.com/masak/ufo obligatory URL 18:22
avar: also github.com/tadzik/rakudobrew/
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:23
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
lizmat abraxxa: I would hope so, but not me: I'm a NativeCall noob
[Tux] patched rakudobrew to revert removal of aka until consensus is reached: now I can continue working
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
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?
sorry, I'm an imperfect backlogger
lizmat NativeCall
TimToady one has to be speedreader to backlog these days... 18:27
lizmat (indeed)
PerlJam one has to be a speedreader just to keep up with the conversation sometimes :)
18:27 [Sno] left
lizmat dinner& 18:28
moritz my track record with nativecall isn't very good, but I can try after dinner
abraxxa moritz: thanks but sadly I have no time today
PerlJam abraxxa: Any of the people lizmat mentioned should be able to help, but I'd also add arnsholt to the list
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.
PerlJam abraxxa: [email@hidden.address] maybe?
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
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.
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
Juerd pmichaud: I think of the whirlpool model as a lot of interconnected waterfalls.
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
abraxxa raydiak: tried that some times already, didn't work out
pmichaud which is actually backwards from what we need, which is "implement, then spec, then revise implementation, then revise spec" 18:33
or, perhaps more precisely
Juerd Implement, then spec means you'll end up with an implementation and no spec. See also, Perl 5 :)
pmichaud "idea, implement, design, update implementation, redesign, update implementation, redesign, ... until stability ensues and then spec
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 :)
TimToady in my many stump speeches, I usually mentioned that the process actually happens backwards in test-first methodology
pmichaud also, we've already said that something isn't in the language until it's in the spec (which is the test suite)
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
18:35 Hor|zon left
TimToady yes, the test suite is where the design and the implementations negotiate actual requirements 18:35
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
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
raydiak uh, hm 18:38
retupmoca m: my $b = Buf[uin16].new(1, 2, 3); say $b.bytes;
camelia rakudo-moar d320f0: OUTPUT«===SORRY!=== Error while compiling /tmp/Y2sAgHJHbv␤Undeclared routine:␤ uin16 used at line 1␤␤»
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
retupmoca m: my $b = Buf[uint16].new(1, 2, 3); say $b.bytes;
camelia rakudo-moar d320f0: OUTPUT«3␤»
abraxxa the code in question is github.com/abraxxa/DBIish/blob/mas...Oracle.pm6 18:39
retupmoca: where do I find the bytes method documented? 18:40
retupmoca not sure - but it looks like .bytes is just returning .elems 18:41
raydiak abraxxa: doc.perl6.org/type/Blob#method_elems
oh misread, sorry
pmichaud in particular, that looks like a rakudobug to me
18:42 pecastro joined 18:44 sqirrel_ joined, tadzik joined
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:44
but then rememebered that you can't do a type constraint in your signatures for slurpy context 18:45
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
camelia rakudo-moar d320f0: OUTPUT«utf16.new(8712)␤1␤(uint16)␤»
nine m: "foo".encode("utf-16").perl
camelia ( no output )
nine m: say "foo".encode("utf-16").perl
camelia rakudo-moar d320f0: OUTPUT«utf16.new(102, 111, 111)␤»
nine looks like a list of 3 utf16 characters to me, so 3 elems would even be correct 18:47
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
m: say "foo".encode("utf-16").bytes
camelia rakudo-moar d320f0: OUTPUT«3␤»
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
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
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
Kristien will perl 6 support recursive glob? :v
ab5tract so where do perl 6 hackers go unicode shopping? i've found a few sites, but some feel pretty dodgy
nine class utf16 (same file) should override method bytes to give a better answer 18:51
abraxxa doc.perl6.org/type/Buf doesn't list .bytes
raydiak has an absolutely terrible error rate today, and retreats to being quietly wrong in his corner while the sharper folks work it out :)
abraxxa i tried to work around it by passing .elems * 2 to the C lib
that worked most of the time
retupmoca m: say uint16.^nativesize; say buf16.new(1, 2, 3).elems * uint16.^nativesize / 8;
camelia rakudo-moar d320f0: OUTPUT«16␤6␤»
18:52 lucas__ joined, kaare_ joined
ab5tract retupmoca: nice find :) 18:52
nine abraxxa: the synopsis mention bytes in several places
ab5tract is there any reason that method is not named ^native-size
skids ab5tract: Don't know how dodgy it is but shapecatcher.com is neat.
18:52 Hor|zon joined
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:53 rindolf left
abraxxa nine: how is doc.perl6.org generated or maintained? 18:54
raydiak abraxxa: htmlify.p6 in github.com/perl6/doc
nine abraxxa: it says it at the bottom of each page 18:55
lucas__ moritz: Hello, I like the idea of perl6-all-modules
abraxxa nine: i see, thanks
lucas__ moritz: Some URLs are wrong on the blog post...
abraxxa so .bytes is the correct method to use but to make it really work its return value needs to be fixed
ab5tract thanks skids
abraxxa why is .bytes missing in the generated docs? bug in htmlify? 18:56
18:58 mj41 joined
nine abraxxa: it's just that noone has written the docs for it for github.com/perl6/doc/blob/master/l...e/Blob.pod 18:58
18:59 raydiak left
abraxxa nine: ah so the docs are generated from Pod, not from perl6 code 18:59
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. codon.com/consider-static-typing 19:00
abraxxa that's enough to continue with my work on DBDish::Oracle
i'll try to find some time to write the docs and file a bug for .bytes
moritz lucas__: I'll try to fix them soonish 19:01
ab5tract it seems like retupmoca++ maybe already found the right code for it?
retupmoca going to PR in a second
should fix .bytes: github.com/rakudo/rakudo/pull/361 19:02
abraxxa retupmoca: wow, that was quick! A test case should be added as well 19:03
pmichaud wouldn't that potentially return a Rat ?
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' :/
camelia rakudo-moar d320f0: OUTPUT«0␤»
retupmoca pmichaud: possible, although moarvm only supports multiple-of-8 ^nativesize 19:05
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␤␤»
retupmoca m: Buf[uint4].new(1, 2, 3).bytes.say
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…»
retupmoca also, I'm not really sure what we'd want to return in that situation
pmichaud retupmoca: I'd think it should be ceil() 19:07
retupmoca: and the PR isn't moarvm-specific :)
skids
.oO(why the methos should be ".bits")
ab5tract the divisor could perhaps be set to the minimum multiple supported by ^nativesize ?
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
ab5tract not sure if the backend exposes that directly
pmichaud: maybe even an exception, so we see it when/if it happens?
pmichaud I would even support an exception, yes.
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.
pmichaud silently returning an incorrect answer is usually not a good path
nine Does a Buf[uint4] really pack its elements?
19:09 FROGGS joined 19:10 anaeem1 left
abraxxa i'm going home now, 11 hours are enough... 19:11
nine: i'll ping you for an update if I may
nine abraxxa: sure
abraxxa nine: thanks!
pmichaud S09:143 19:12
synopsebot Link: design.perl6.org/S09.html#line_143
retupmoca pmichaud: that would imply ceiling() then? 19:13
19:13 davido__ left
ab5tract "or with the strange elements of the class, or with the types under which the strange element is declared" 19:13
hadn't read that one before
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
abraxxa can perl 6 convert the Str to a Buf8 if such a thing exists? 19:14
skids abraxa: .encode
abraxxa skids: yes, that returns a Buf
pmichaud but it does show that at least in one place the design expects elements to be packed.
skids Buf and buf8 are pretty much synonymous.
abraxxa is that always a Buf8? ah ok
TimToady m: say 'foo'.encode.WHAT 19:15
camelia rakudo-moar d320f0: OUTPUT«(utf8)␤»
abraxxa buf8 is also missing on docs.perl6.org
TimToady utf8 is a kind of buf8
well, really a blob8
do you need to be able to modify it?
abraxxa hm...I don't, maybe the Oracle OCI library
pmichaud S02:1013 19:16
synopsebot Link: design.perl6.org/S02.html#line_1013
abraxxa all calls are pass-by-reference
ab5tract then it makes some sense that 8 actually makes some sense as "the" ^nativesize
pmichaud "maps these directly to the underlying compact array..." <-- implies packing of elements to me
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
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
m: say "some long string".elems == 1
camelia rakudo-moar d320f0: OUTPUT«True␤»
abraxxa skids: but encode always returns a Buf, not a buf8?
TimToady: makes sense
TimToady by default it returns a utf8 as I showed above 19:19
which is a blob8
19:19 coyocanid joined, lucas__ left
abraxxa is utf16 a blob16 then? 19:19
TimToady yup
except I don't know that we've defined it
or implemented it 19:20
m: say 'foo'.encode('UTF-16').WHAT
camelia rakudo-moar d320f0: OUTPUT«(utf16)␤»
TimToady yup, we have
abraxxa hehe
skids m: utf8.^mro.say
camelia rakudo-moar d320f0: OUTPUT«(utf8) (Any) (Mu)␤»
abraxxa m: say 'ö'.encode('UTF-16 19:21
camelia rakudo-moar d320f0: OUTPUT«===SORRY!=== Error while compiling /tmp/nkAK92fMb5␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/nkAK92fMb5:1␤------> say 'ö'.encode('UTF-16⏏<EOL>␤ expecting any of:␤ …»
Kristien I wrote [@foo] instead of \@foo :(
abraxxa m: say 'ö'.encode('UTF-16).elems
camelia rakudo-moar d320f0: OUTPUT«===SORRY!=== Error while compiling /tmp/TazJvefxdS␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/TazJvefxdS:1␤------> say 'ö'.encode('UTF-16).elems⏏<EOL>␤ expecting any of:…»
retupmoca PR updated with ceiling()
abraxxa m: say 'ö'.encode('UTF-16').elems
camelia rakudo-moar d320f0: OUTPUT«1␤»
TimToady m: say "foo␤".encode('UTF-16')[3].base(16)
camelia rakudo-moar d320f0: OUTPUT«A␤»
abraxxa m: say 'ö'.encode('UTF-16').bytes
camelia rakudo-moar d320f0: OUTPUT«1␤»
TimToady eh, that should print 2424
m: say "foo␤".encode('UTF-16')[3] 19:22
camelia rakudo-moar d320f0: OUTPUT«10␤»
TimToady oh, bot interference
m: say "foo\x2424".encode('UTF-16')[3]
camelia rakudo-moar d320f0: OUTPUT«9252␤»
TimToady m: say "foo\x2424".encode('UTF-16')[3].chr
camelia rakudo-moar d320f0: OUTPUT«␤␤»
TimToady m: say "foo\x2424".encode('UTF-16')[3].base(16)
camelia rakudo-moar d320f0: OUTPUT«2424␤»
abraxxa really got to go now! thanks and bye! 19:23
19:24 abraxxa left, sqirrel_ left
retupmoca pmichaud: rakudo #361 should now be sane and integer for anything with a defined ^nativesize 19:26
avar $ /usr/local/booking-perl6/blead/bin/perl6 -e '"hello, world".say' 19:31
hello, world
avar screwing around with packaging at work :)
moritz avar++ 19:32
19:35 anaeem1 joined
moritz retupmoca, pmichaud: fwiw right now, Blob[uint4].new dies with "MVMArray: Unsupported uint size" 19:36
still, having the .ceiling in there certainly can't hurt
ab5tract moritz++ 19:37
moritz spectests the pull request
m: say Blob[uint2].new(1)
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…»
ab5tract wow, does camelia rebuild compilers so fast these days? 19:38
moritz why? when was that error message added?
ab5tract: you might be confusing existing behavior with the (nto yet merged) pull request 19:39
FROGGS months ago probably
dalek kudo/nom: b1f160f | (Andrew Egeler)++ | src/core/Buf.pm:
Fix Blob.bytes to take elem size into account

Was always assuming each elem was one byte
kudo/nom: c453cd0 | (Andrew Egeler)++ | src/core/Buf.pm:
Add ceiling() call to Blob.bytes

This gives us a sane answer when our elem size is not a multiple of 8
19:39 mvuets joined
moritz retupmoca: will you also add some tests to roast? 19:40
ab5tract moritz: yes, sorry. #timewarp
Kristien Yay I bought Modern Perl :D
free shipping \o/ 19:41
retupmoca moritz++
and yes, will add tests
moritz retupmoca++ # patches 19:42
hoelzro just realized that R= actually works
that's awesome and terrifying at the same time
moritz ab5tract: fwiw camelia does rebuilds on all backends in one dir, so it's kinda slow
psch m: my $f = "foo"; $f [R~]= "bar"; say $f 19:43
camelia rakudo-moar d320f0: OUTPUT«barfoo␤»
psch m: my $f = "foo"; "bar" R~= $f; say $f
camelia rakudo-moar d320f0: OUTPUT«foobar␤»
psch m: my $x; "foo" R= $x; say $x 19:44
camelia rakudo-moar d320f0: OUTPUT«===SORRY!=== Error while compiling /tmp/NhiXswhoUT␤Cannot reverse the args of = because list assignment operators are too fiddly␤at /tmp/NhiXswhoUT:1␤------> my $x; "foo" R=⏏ $x; say $x␤»
psch m: my @f = <d n>; @f Z[R~]= <foo bar>; .say for @f 19:45
camelia rakudo-moar d320f0: OUTPUT«food␤barn␤»
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
psch m: my @f = <d n>; <foo bar> R[Z[R~]=] @f; .say for @f # o.o
camelia rakudo-moar d320f0: OUTPUT«food␤barn␤»
moritz flussence: just like a class isn't a big method
flussence I know, I'm simplifying a bit...
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
moritz "collection of regexes"
the .parse is really just a convenience feature 19:48
ab5tract how would people feel about shipping 'ufo' with rakudo? 19:49
19:49 amalia joined
ab5tract or some feature like it, strapped onto 'perl6-*' 19:49
FROGGS ab5tract: to do what exactly? 19:50
19:50 Sqirrel joined
pmichaud flussence: because $foo ~~ Grammar has a different meaning already 19:50
in particular, it asks the question "is $foo compatible with this type/role?" 19:51
much like $x ~~ Int is asking the question "is $x compatible with Int?"
FROGGS well, that's about the type object, no? 19:52
pmichaud FROGGS: a grammar is a type object
FROGGS I'd probably expect that $foo ~~ $mygrammar will call its .ACCEPT which will delegate to .parse
pmichaud sure, if you want to instantiate the grammar, that might work.
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
FROGGS ab5tract: yes
pmichaud: good point
ab5tract so why not ship this basic feature directly 19:55
FROGGS ab5tract: the ecosystem is accessible via panda, not ufo
dalek ast: 69dda1f | (Andrew Egeler)++ | S03-operators/buf.t:
Add a few tests for Buf.bytes
pmichaud ab5tract: because rakudo compiler isn't intended to be the source of packages
that's what distributions are for
(in the sense of Rakudo Star being a distribution) 19:56
we don't intend that downloading Rakudo compiler gives you a fully-functioning Perl 6 ecosystem
ab5tract pmichaud: but should the functionality of 'perl6' be construed 'rakudo' in that way?
pmichaud ab5tract: I don't understand that question, sorry. 19:57
if you're asking whether we've misnamed the rakudo compiler(s) as "perl6", I say yes.
ab5tract `perl6 gen-make`
pmichaud when we introduced perl6-m and perl6-j, we should've named them rakudo-m and rakudo-j, I think.
moritz we can still do that 19:58
19:58 Ugator left
moritz install both for some time 19:58
pmichaud at any rate, installing and managing modules is not (yet?) the compiler's responsibility.
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
pmichaud ab5tract: who is the target audience for generating makefiles? 19:59
ab5tract is also playing with packaging at work :)
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...
pmichaud package writers and maintainers should be working with other tools (e.g. panda) to do it. 20:01
perhaps that means we need to increase the toolchain there... but it doesn't properly belong in the compiler repo
moritz just for reference, installing gcc doesn't give you an IDE, make, autotools or a debugger 20:02
pmichaud moritz++
moritz even python with its "batteries included" doesn't come with ipython
ab5tract fair points. it was just a thought
moritz and for long didn't come with virtualenv or pip (though I hear that's changing)
ab5tract moritz: all things one could argue makes things harder than they need be 20:03
wow, much mistyping.
PerlJam ab5tract: still ... those things belong in the distribution, not the compiler proper.
muraiki bah, back in smalltalk I had everything in my image!
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
muraiki: ... and see how well that worked :-)
muraiki moritz: :) 20:05
20:07 torbjorn left
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:07
20:08 kjs_ joined
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:08
ab5tract moritz: interesting thought 20:09
ab5tract was already convinced me a scrollback ago :)
moritz ab5tract: that last one wasn't aimed at you, just some random musings 20:10
20:14 alini joined 20:15 pecastro left
ab5tract moritz: just didn't want any ambiguity about my feelings on it :) 20:16
but: packaging. any recommendations? 20:18
20:18 [Sno] joined
ab5tract my first thought was to package 'ufo' 20:18
then i came on here because i had a personal moment of "this would be nice to already have"
moritz ab5tract: what exactly do you mean by "packaging"? 20:19
ab5tract build instructions for RPMs, in this case
moritz ab5tract: for modules? or for rakudo? 20:20
20:20 grondilu left
ab5tract avar++ already showed the compiler. now i'm ready for Inline::Perl5 20:21
moritz ab5tract: well, ufo or panda, I'd say
ab5tract okay, my instincts weren't too far off 20:22
thanks moritz :)
PerlJam hasn't used ufo in a really long time. 20:23
20:26 anaeem1 left
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:26
20:26 telex left 20:27 denis_boyun joined
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
and on debian, dh-make-perl
Kristien time to make a Perl wallpaper 20:28
20:28 darutoko left, telex joined, denis_boyun left, diana_olhovik_ joined
flussence
.oO( if the rakudo ebuild installed a working perl6-m, I'd be writing a module-to-ebuild generating tool right now... )
20:30
skids gist.github.com/skids/5cbec5d3c24512d44a3a # public gist: What prefab errors should NativeCall offer. 20:34
ab5tract right, but not q:x{cpan} itself. 20:35
moritz skids: what's BrokeTheMold?
skids: also I like errors better that aren't full of UNSPECIFIED :-)
skids: if some information isn't known, simply exclude it from the message
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:37
20:40 mr-foobar left 20:41 mr-foobar joined, kjs_ left 20:44 kjs_ joined 20:48 andreoss left 20:49 Rounin left 20:52 [particle] joined 21:05 Rounin joined
btyler ab5tract: picking the git bindings back up with the help of a struct-translator-thingy? absolutely 21:06
Kristien I like Perl. 21:08
vendethiel :D
Kristien "New Study Finds Majority Of God’s Blessings Burn Up On Entry Into Atmosphere" 21:11
What if Perl 6 blessings await the same destiny? :( 21:12
huf not if they come by radio 21:13
Kristien Conclusion: Larry is ahead of God. 21:14
21:15 Kristien left
TimToady Larry is often out ahead of God, but God has a way of hauling him back to where he should be. 21:17
PerlJam Perhaps this is why Larry can "see around corners" as Tim O'Reilly says. :) 21:18
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
PerlJam huf: and the devil is in the details 21:20
21:21 mvuets left
huf PerlJam: so build everything out of immense rectangles? 21:21
and of course breed cows to be spherical
PerlJam and of uniform density
pmichaud some people build corners, other people cut them. 21:24
huf those are the same people...
you get _more_ corners if you cut one 21:25
PerlJam some corners *need* to be chamfered
flussence maybe we should just attach cows to all the sharp edges... 21:26
huf buffering. yes, that's often the solution :)
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.
.oO(damn corner cases)
21:38 jack_rabbit joined, Kristien joined
Kristien Hi there boys and girls. 21:39
ab5tract btyler: what about the struct-translator-thingy itself? :)
21:40 pdcawley left 21:42 Rounin left 21:43 mj41 left
btyler ab5tract: I just had a vision of the future, and it is full of yaks, all of them hairy 21:44
b2gills
.oO( Time to shave the yaks? )
21:45
btyler (yes, doing a simple nativecall code gen thing would be fun, and just enough over my head to be exciting) 21:46
ab5tract btyler: luckily i believe the C parser has become some sort of futuristic yak-barber-grade chainsaw 21:50
21:51 jack_rabbit left 21:56 amalia left 22:02 xfix left 22:03 rurban_ left 22:04 FROGGS_ joined 22:05 Sqirrel_ joined 22:06 Sqirrel left, skids left 22:07 FROGGS left 22:10 amalia joined 22:15 _dolmen_ joined
dalek c: 88f9b26 | moritz++ | lib/Type/X/Does/TypeObject.pod:
document X::Does::TypeObject
22:18
22:18 coffee` left
moritz time for sleep here& 22:19
22:27 mr-foobar left 22:37 tgt joined, mr-foobar joined
Kristien sleeping is a waste of time 22:39
timotimo what did i miss tonight?
22:43 diana_olhovik_ left
psch grmls at his jvm bytecode 22:45
it's being weird :/
masak 'night, #perl6 22:51
Kristien goodbye masak
22:57 kjs_ left
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
psch jnthn: actually, it's either "DEBUG MESSAGE: method code not verfified" (paraphrased) or an NullPointerException, or a NegativeArraySizeException... 23:01
23:01 Kristien left
psch the paraphrased also has "method contains invalid bytecode" somewhere, iirc 23:01
timotimo hooray
23:01 tgt left
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
23:02 tgt joined
jnthn Is it called through invokedynamic? Could the bootstrap method be throwing the exception? 23:02
ingy moritz: thanks for the issue. a little hostile, but thanks :) 23:03
psch 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
that bit (and 11 similar looking ones...) are in marshalOut in BootJavaInterop
ingy moritz: hostile *feeling*. maybe not intended. no worries. we'll fix work on the issue.
psch bbiab
23:05 Alina-malina left
jnthn psch: mv.visitVarInsn(Opcodes.ILOAD, 8); 23:07
But that goes to a Type.getType(long.class) 23:08
iirc, ILOAD buts a 32-bit (one stack slot) but a long is 2 stack slots?
Should it be LLOAD there?
timotimo long vs int has bitten me many times when i tried to do jvm bytecode generation 23:09
jnthn Yeah, me too
It's a huge argh
Doubles take 2 slots too
psch ouw, right
that's why the L2I wouldn't work either
'cause i tried that too, cause ARRAYNEW takes an int
oh, no, that's a few lines earlier 23:10
well, LLOAD first, that should get me a tad further at least :)
huh, i think i'm actually more confused now 23:11
i ISTORE an I_CONST0 into 8
do i have to LLOAD that to I2L it afterwards? 23:12
23:12 pmurias joined
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...
jnthn 'night 23:20
psch 'night jnthn++
23:22 gfldex left 23:27 adu left
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:31
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
trying to run a grammar parse inside another
psch in the calling method
23:33 tgt left
timotimo yeah, you need to explicitly pass $/ and explicitly accept $/ 23:33
23:33 mohij left, diana_olhovik_ joined
timotimo and make sure you're not trying to override the $/ you have in your signature 23:33
jdv79 oh, right. its me. sorry. 23:36
thanks
psch in general though, wanting to parse from actions is a bit smelly
jdv79 i'm doing a simple macro type situation 23:37
i'll show the code once its working - maybe there's a better way
tony-o anything interesting about something like angularjs in p6? 23:41
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
tony-o so yea on the data/model binding piece as well 23:45
23:47 _dolmen_ left
psch wonders about native p6 in the browser 23:47
can be persuade mozilla and the chromium guys to stuff the moar runtime into their browsers..?
s/be/we/
+CORE.setting 23:48
probably not hah
tony-o that'd be pretty bnig for p6
big
psch aside from that we will have nqp-js, pmurias++ seems to be making progress
i suspect some sort of templating and databinding library could be build fairly easily 23:49
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)
timotimo nagare has that, too 23:54
and it'll fall back to regular HTTP without ajax if the browser is js-less 23:55
tony-o hmm..i'm tempted to work on that or http/2 23:57