»ö« 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 masak on 12 May 2015. |
|||
timotimo | ugexe: why the F would you do that? :) | 00:01 | |
ugexe | i wouldnt. why would others? no idea. but they do | 00:02 | |
in the case of Archive::Zip it would create a zip file in one test, test the extraction in another, and so forth | 00:03 | ||
flussence | .oO( let's just give up and throw a makefile in the test directory! ) |
||
ugexe | the 'green' test module solved it without adding a .prove type file | ||
timotimo | ugexe: also, i was talking about doing the tests inside a single file in parallel | 00:05 | |
ugexe | ah, thats how green did it i think :) | 00:06 | |
00:07
larion joined
|
|||
ugexe | it requires you to be specific about it though, so you dont have say, 2 servers trying to listen on the same port | 00:08 | |
leont | ugexe: are you aware of my TAP::Harness module? | 00:12 | |
00:12
telex left
00:13
telex joined,
tokuhiro_ joined
00:14
leont left
00:16
colomon left
00:17
cognominal left
00:20
telex left,
telex joined
00:24
colomon joined
|
|||
ShimmerFairy | Hm, I'm quite surprised ≤ and ≥ don't exist in core, seems like it'd be nice (esp. since <= looks too much like a fatarrow for my taste :P) | 00:28 | |
ugexe | also fwiw... s22: "All .t files in this directory, will be tested in alphabetical order, possibly in parallel." | 00:39 | |
colomon | ShimmerFairy: they’re trivial to add as a module… | 00:56 | |
00:58
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:00
khw left
|
|||
ShimmerFairy | colomon: while true, I think a module for two quite obvious Unicode characters is a pretty ridiculous concept :) | 01:01 | |
skids | ShimmerFairy: A module that adds lots of them, though... | 01:06 | |
dalek | kudo/nom: 55c1d9d | coke++ | docs/ (3 files): Prep for 2015.09 - Zürich |
01:12 | |
kudo/nom: 36ac769 | ShimmerFairy++ | docs/ChangeLog: Add line about val() in ChangeLog I always meant to do this, but managed to forget :) . |
01:16 | ||
01:21
laouji joined
01:22
aborazmeh left
|
|||
labster | ShimmerFairy: actually ≤ and ≥ are present in Latin-1. Even Parrot wouldn't hate it. | 01:26 | |
ShimmerFairy | not that it matters, but that is an interesting point :) | 01:27 | |
(we used to use strings like "\x????" to work around Parrot's issues on that, and I at least would staunchly refuse reinstating that if Parrot support is ever resurrected) | 01:28 | ||
01:28
khw joined
01:34
yqt left
|
|||
labster | I think we're past the whole stage of adapting the language to suit the compilers. And on a more important note, any user code was similarly slowed, and that's the kind of issue that would need to be solved before anyone adopted the VM anyway. | 01:35 | |
ShimmerFairy | labster: oh, I didn't know user code was affected too, though I suppose it's the kind of thing only noticeable in CORE.setting, probably the largest P6 program by far :P | 01:40 | |
labster | exactly. | 01:41 | |
m: my $a = 0.9999999999999999999999; say $a; my $b = $a.numerator/ $a.denominator; $b.say; $b.WHAT.say; | 01:44 | ||
camelia | rakudo-moar 86ddca: OUTPUT«0.101(Num)» | ||
ShimmerFairy | And yes, I'd agree we're past adapting to compilers (except for a couple #? lines in Actions.nqp). Probably helps that our two current VMs are either more closely tied to P6 than Parrot was, or relatively far more mature compared to Moar and Parrot :P | 01:45 | |
01:45
Ben_Goldberg joined,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
labster | JS is tied to P6? I always thought use strict; tied it to Perl 5. :P | 01:46 | |
01:47
Ben_Goldberg left,
Ben_Goldberg joined
|
|||
ShimmerFairy | two current in-master/nom VMs, I meant :P | 01:47 | |
01:55
dayangkun joined
|
|||
dalek | c: 4693476 | coke++ | / (2 files): Only write out needed docs. When generating a very sparse copy of the site, this avoids trying to generate data that doesn't exist. |
02:05 | |
c: c0667e2 | coke++ | htmlify.p6: fix generated JS for search; track GLR change |
02:16 | ||
[Coke] | ^^ that should unbust search. | ||
02:32
abaugher left
02:33
abaugher joined
|
|||
colomon | is MAIN very very broken wrt slurpy arrays? | 02:40 | |
oh, nope, it’s my code that’s the problem. | |||
02:42
AlexDaniel left
|
|||
colomon ’s code for hacking @*ARGS was very broken under GLR | 02:42 | ||
ssh: Could not resolve hostname github.com: nodename nor servname provided, or not known :( | 02:47 | ||
02:52
noganex joined
|
|||
[Coke] | Just ran a very long --profile... get a runtime JS error opening the file. | 02:54 | |
Uncaught Error: [$injector:modulerr] errors.angularjs.org/1.2.21/$inject...A18%3A277) | 02:55 | ||
02:55
noganex_ left
|
|||
TimToady | labster: what makes you think ≤ and ≥ are in Latin-1? | 03:00 | |
03:02
colomon left,
kaare_ joined
|
|||
ShimmerFairy | A first try at adding ≤ and ≥ caused weird undeclared symbol errors (on a bunch of subs and other terms), so I'll have to try again later :) | 03:07 | |
03:09
raiph joined,
orbusbak left,
orbus joined
03:10
telex left
03:11
telex joined,
telex left
|
|||
ShimmerFairy | TimToady: thinking about ≤ and ≥ got me thinking about aliasing operators again. My two thoughts atm are either sub infix:«<=»:«≤» (that is, stacking nameless colonpairs), or sub infix:«≤»:texas«<=» (having a named colonpair) | 03:11 | |
03:12
telex joined
|
|||
[Coke] | .tell dha looks like search is working again | 03:13 | |
yoleaux | [Coke]: I'll pass your message to dha. | ||
[Coke] zzz | |||
03:15
colomon joined
03:16
eternaleye joined
|
|||
ShimmerFairy | Worth noting that the stacked nameless colonpair thing parses in rakudo, and even takes the first nameless as it usually does, it just doesn't do anything with subsequent ones :P | 03:17 | |
(the idea, for those who don't know, is that you can then define your own multis on ≤ or <= without worrying about which one is the "correct" one to overload) | 03:20 | ||
TimToady | would be better to have some way of adding on, so that modules can add aliases | ||
ShimmerFairy | true, and I wonder if that would be useful for subs in general | 03:21 | |
labster | TimToady: I was looking at www.asciitable.com/ and saw ≤ ... apparently that isn't Latin-1, still trying to figure out what encoding that is. | ||
ShimmerFairy | .oO( alias infix:«>=» of infix:<≥>; # perhaps an AliasHOW too, depending? ) |
03:22 | |
labster | Apparently Mac OS Roman had ≤≥, but at different codepoints. Anyway, I think I just learned not to use that website. | 03:25 | |
ShimmerFairy | Although that might be uncomfortably close to =alias (or alternately just fine, I'm not sure) | ||
labster: I'd recommend only looking up ASCII for codepoints under 0x80; after that you're better off searching for the specific extra encoding instead :) | 03:27 | ||
03:28
khw left,
isacloud left,
skarn left
03:30
isacloud joined
|
|||
ShimmerFairy | Could also be synonym infix:«>=» of infix:<≥> , which would keep with the somewhat-linguistic nature of Perl 6 :) (and thinking of it, I like 'synonym' better. Perhaps because 'alias' is a bit too generic to clearly state its purpose) | 03:31 | |
03:31
khw joined
03:41
prevost joined
03:42
khw left
03:46
thou joined
03:48
aindilis` joined
03:49
araujo left,
aindilis left
03:54
Ben_Goldberg left,
araujo joined
03:57
khw joined
04:06
skids left
04:12
skarn joined
04:16
lolisa joined
|
|||
labster | for 1..30 -> $i { my $x = ('0.' ~ '9' x $i).Rat; say $x.WHAT.gist eq ($x.numerator/$x.denominator).WHAT.gist } | 04:19 | |
m: for 1..30 -> $i { my $x = ('0.' ~ '9' x $i).Rat; say $x.WHAT.gist eq ($x.numerator/$x.denominator).WHAT.gist } | |||
camelia | rakudo-moar 36ac76: OUTPUT«TrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalse» | ||
labster | Not sure why type is changing there. | 04:20 | |
ShimmerFairy | Rats change to Num if they overflow | ||
labster | Why would it overflow if it's dividing numerator by denominator? | ||
It fit in a Rat before. | 04:21 | ||
04:26
rmgk is now known as Guest9550,
rmgk_ joined,
Guest9550 left,
rmgk_ is now known as rmgk
|
|||
ShimmerFairy | labster: my guess is because Rat is still mis-defined as having an Int denominator instead of a UInt64 like it should, so a bare construction of a Rat lets you get away with bad values. (Just a guess, no clue if that's really the case) | 04:27 | |
04:34
prevost left
|
|||
dalek | kudo/nom: cbb8de3 | ShimmerFairy++ | src/Perl6/ (2 files): Support comments in qqww lists Also takes care of some smart quotes that were parsed for ww but weren't subsequently handled in the Actions (so «1 “2 3” 4» would drop the middle item). There don't currently seem to be any tests for this though. |
04:45 | |
ast: 100f141 | ShimmerFairy++ | S02-literals/quoting.t: Un-TODO tests on comments in quotewords. Also fixes the syntax; these tests accidentally tried #' instead of #`. |
04:47 | ||
ast: 5692656 | ShimmerFairy++ | S02-literals/quoting.t: Fix some wrong quoting.t tests I'm not sure when those zen slices were ever supposed to be magically removed by quoting constructs that don't otherwise recognize those kinds of variables. And I can only hope that the qww test was supposed to be qqww, since nothing about ww implies variable interpolation. With this, quoting.t is no longer fudged for rakudo :) . |
04:52 | ||
04:53
thou left
|
|||
dalek | ast: 4f3e528 | ShimmerFairy++ | S02-literals/quoting.t: Minor test message correction. |
04:54 | |
05:01
araujo left
05:13
khw left
05:44
[Sno] joined
|
|||
dalek | kudo/nom: bbf39d7 | skids++ | src/core/Any.pm: Do not mention a specific postcircumfix in error. (fix for RT#125504) Also, nag if someone makes an Associative that isn't associative. |
05:50 | |
kudo/nom: d283300 | lizmat++ | src/core/Any.pm: Merge pull request #531 from skids/lta_errors Do not mention a specific postcircumfix in error. (fix for RT#125504) |
|||
05:52
aborazmeh left
05:55
domidumont joined
05:57
domidumont left
05:59
laouji left
06:00
domidumont joined
06:04
domidumont left
06:05
domidumont joined
06:06
rurban joined
|
|||
dalek | ast: 470cb7c | lizmat++ | S02-types/list.t: X::Immutable on List.push/pop/shift/unshift |
06:10 | |
06:11
diana_olhovik joined
06:21
FROGGS joined
|
|||
dalek | kudo/nom: 7931a2c | ShimmerFairy++ | src/core/allomorphs.pm: Change back allomorphic .perl & .gist After thinking about it for a while, I decided to change back the .gist and .perl methods for the allomorphic types to how they were originally. We really need .gist to show that you're dealing with an allomorphic type, and so it prints the use of val(), since that's the most succinct way I know of to do it. The .perl method shows how to construct the object via .new, since I figure .perl is more about the object itself than whatever uses it. And considering the allomorphic types are meant to be user-facing (esp. if you use something like MAIN), I don't think it's so terrible to show it for .perl. For neither method is using quotewords syntax (<> and «») appropriate; not all uses of val() are through those quoting syntaxes, and those uses of val() with leading/trailing whitespace would lead to an incorrect .perl previously. If we wanted to use quoting syntax for either or both of these methods, it'd have to be a representation using q:v[] or similar. |
06:23 | |
06:24
espadrine joined,
raiph left
06:25
laouji joined
|
|||
FROGGS | .tell patrickz github.com/MoarVM/dyncall/pull/2 | 06:26 | |
yoleaux | FROGGS: I'll pass your message to patrickz. | ||
moritz | ShimmerFairy: fwiw there's an entry for val() in docs/ROADMAP | ||
ShimmerFairy | ah, I should probably take care of that too :) | ||
moritz | ShimmerFairy: when you're done with allomorphs, please remoe that | ||
or even now, when you think it's done enough :-) | 06:27 | ||
ShimmerFairy | moritz: the only big things left are Version literals (which shouldn't be too hard to make a VersionStr), and enums (which... how? o_o), as alluded to in one part of S02 | 06:28 | |
S02:3862 to be precise | 06:30 | ||
moritz | well, the idea behind val() was that it taps into the compiler | 06:33 | |
parsing a specific subset of Perl 6 | |||
and that could include constants and enums | 06:34 | ||
lizmat | m: say (a => 42).perl # ShimmerFairy | ||
camelia | rakudo-moar d28330: OUTPUT«:a(42)» | ||
dalek | kudo/nom: 5daff4c | ShimmerFairy++ | docs/ROADMAP: Remove val() from ROADMAP val() is pretty much done now, with only a couple spots (versions and enums) left to consider. But the majority of it has been dealt with. (Also cleaned up an outdated reference to :T) |
||
lizmat | ShimmerFairy: disagree with your reasoning re 7931a2c | ||
06:35
thou joined,
_mg_ joined
|
|||
lizmat | note that (a=>42).perl doesn't show a fat comma either | 06:35 | |
ShimmerFairy | lizmat: not every type shows an object.new in .perl of course, I just think that IntStr and friends are complex enough to warrant showing a .new like other not-simple objects. | ||
lizmat | weren't they made to make life simpler | 06:36 | |
anyway, I've said what I wanted to say, letting TimToady decide on the matter | |||
ShimmerFairy | Yes, but that doesn't make them simple themselves :) | 06:37 | |
lizmat | but do we need to bother users about this lack of simplicity ? | 06:38 | |
ShimmerFairy | moritz: parsing valid enums would be interesting, but the far more interesting part is what an EnumStr could be, since enums are of an entirely different knowhow altogether. | 06:39 | |
lizmat | isn't Perl 6 about torturing core developers so that users of the language have it easier ? | ||
06:39
thou left,
CQ joined
|
|||
ShimmerFairy | lizmat: why not? I don't think .perl is the place to be so concerned about being 100% user-friendly, but that may be just me :) | 06:39 | |
After all, .perl is supposed to give you valid P6 code (as best as it can, in the case of Code objects and such), so I don't think there's any particular "too complex" standard there. | 06:40 | ||
lizmat | well, whatever, breakfast now& | 06:41 | |
06:42
brrt joined
|
|||
ShimmerFairy | (As an example, I pretty much always find Match.perl output unhelpful for seeing what's going on, but then again that's not what .perl is for, but rather .gist ☺) | 06:42 | |
06:47
lolisa left
|
|||
moritz | ideas for how to make Match.perl more friendly (while still round-tripping) are very welcome :-) | 06:48 | |
TimToady | we go to some pains to simplify .perl output on things like :{} and such | ||
06:56
brrt left
07:05
zakharyas joined
07:06
ShimmerFairy left
07:09
araujo joined
|
|||
moritz | the real trouble wit Match.perl is that it needs to contain the .orig string | 07:10 | |
which can be quite big | |||
CQ | What's the best way to get a post-glr perl6 to play with? I don't want bleeding edge, leading edge is fine | ||
moritz | and obscures the actual matched string | ||
CQ: rakudobrew build nom | |||
FROGGS | moritz: we could always auto-gist huge strings and refer to the gist url :o) | ||
CQ | moritz: Building Rakudo with backend 'nom' is NYI. Well volunteered! ... suggestions? :) | 07:16 | |
07:17
jack_rabbit joined
07:20
ShimmerFairy joined
07:26
larion left
|
|||
cdc | CQ: there's no post GLR release yet, that means you have to play with the cutting edge. "rakudobrew build moar", then "rakudobrew rehash" (assuming you are using the latest revision of rakudobrew). | 07:26 | |
07:26
abraxxa joined
|
|||
moritz | ah yes, sorry, 'moar' not 'nom' | 07:28 | |
nine | CQ: bleeding edge really is not that bad. There's no special process for stabilizing a release, so really the a typical release is mostly missing bugfixes that are already in git ;) | 07:38 | |
07:41
cdc is now known as jeanmi-apropos
07:42
jeanmi-apropos is now known as cdc
|
|||
lizmat | commute& | 07:44 | |
07:44
lizmat left
08:05
leont joined,
pierrot left
08:07
tping left
|
|||
CQ | Rakudo has been built and installed.; Switching to moar-nom; Done, moar-nom built ...thanks! | 08:10 | |
08:11
dakkar joined
08:14
brrt joined
|
|||
ShimmerFairy | fwiw I wouldn't mind a different .perl on the allomorphic types, I'd just appreciate if it were different from .gist (which may mean using q:v somewhere). I will however stay firm on making .gist show it's an allomorphic type, and in not using <>/«» in those methods' strings :) | 08:17 | |
08:17
g4 joined
08:19
pmurias joined
|
|||
pmurias | hi | 08:19 | |
yoleaux | 14 Sep 2015 16:56Z <hoelzro> pmurias: should I go ahead and complete that merge tonight? | ||
pmurias | hoelzro: yes | ||
08:21
rindolf joined
|
|||
jnthn | .gist on the allomorphic types really should just give their Str representation like .gist on a Str does | 08:21 | |
sub MAIN($filename) { say $filename; } # suddenly, when you invoke it with a numeric filename, the output will look weird | |||
08:22
patrickz joined
08:23
thou joined
|
|||
jnthn | I don't want those kind of gotchas. Allomorphs are there to help get dispatch decisions right, and so make things easier, not to make things unpredictable. | 08:23 | |
08:24
jack_rabbit left
|
|||
patrickz | .tell FROGGS: Thanks! | 08:25 | |
yoleaux | 06:26Z <FROGGS> patrickz: github.com/MoarVM/dyncall/pull/2 | ||
patrickz: What kind of a name is "FROGGS:"?! | |||
patrickz | .tell FROGGS Thanks! | ||
yoleaux | patrickz: I'll pass your message to FROGGS. | ||
jnthn | yoleaux is the opposite of Larry: totally doesn't get the colon... :P | ||
FROGGS | :D | 08:26 | |
yoleaux | 08:25Z <patrickz> FROGGS: Thanks! | ||
patrickz | FROGGS: Dyncall seems to have moved to HG. I suspect the SVN is out of sync. | 08:27 | |
08:27
thou left
|
|||
FROGGS | hmmm | 08:28 | |
patrickz | If the MoarVM dyncall is meant to stay up to date with upstream that might be the reason for last commit in march... | ||
FROGGS | patrickz: are there any changes upstream? | ||
patrickz | Yes | ||
quite some | |||
last 8 days ago | |||
FROGGS | ohh cool | ||
patrickz | hg.dyncall.org/pub/dyncall/dyncall | ||
FROGGS | \o/ they're finally doing a release | 08:29 | |
jnthn | \o/ | 08:30 | |
pmurias | hoelzro: I'll try to do that myself, the only thing missing is a memory bug fix/workaround to get a test to run on moar | ||
leont | Hmmm, is seems actions are even called on <.rule>s, is this intentional? | 08:31 | |
ShimmerFairy | jnthn: I can see your point, though I don't think purely-numerical filenames are that common :P . I still would prefer .gist being more informative (since I find an allomorphic posing as any other ordinary string in a .gist misleading) | ||
FROGGS | patrickz: can you please file a dyncall issue in our repo with the new url? | ||
patrickz: perhaps JimmyZ can pull in the commitsfrom the new repository location | 08:32 | ||
jnthn | leont: Yes, . means "don't capture" | ||
patrickz | will do (after $dayjob) | ||
jnthn | And is a property of the caller, not the callee | ||
ShimmerFairy | jnthn: We _could_ get rid of the allomorphic say/note candidates, and go back to when I had to use .gist to actually get the proper gist, though I imagine creating a disparity between .gist and &say output like that isn't preferable :P | 08:33 | |
leont | Hmmm, it doesn't seem useful to me, but sure | ||
patrickz | FROGGS: Did that build issue PR found its way to upstream dyncall? | 08:34 | |
jnthn | leont: Action methods can have side-effects (and indeed have plenty in the Perl 6 parser) | ||
jdv79 | how is a gist of val("123") better than 123? | ||
ShimmerFairy | leont: I can easily imagine an uncaptured thing's action method setting a contextual that's needed later on, regardless of capture (since action methods aren't _just_ about 'make', it's not exactly easy to figure if calling it would be useless on an uncaptured thing ☺) | 08:35 | |
jnthn | ShimmerFairy: I don't see why we need extra candidates | ||
jdv79 | if i want more than a gist that's what .perl is for. | ||
ShimmerFairy | jdv79: because posing as just a string when it's actually two things is misleading to me. | ||
jnthn | ShimmerFairy: The candidate for a Str (any subclass of) in say/note should just nqp::unbox_s(...) | ||
dalek | p/js-merge-wip: 5926ead | (Pawel Murias)++ | tools/build/gen-js-makefile-parrot.nqp: Remove old script for cross-compiling the js backend on parrot. |
||
p/js-merge-wip: bb10638 | (Pawel Murias)++ | HACKING: move the HACKING file to docs, and add a -js suffix to it |
|||
leont | Right, that sounds reasonable | ||
jdv79 | a bunch of things have "lossy" gists. that's part of the point. | ||
nine | It's a gist after all, not the director's cut. | 08:36 | |
ShimmerFairy | jnthn: There are say/note candidates in allomorphs.pm so that they could get the .gists properly. (They're not with the others because it's too early then) | 08:37 | |
"lossy" ≠ misleading, though | |||
jnthn | m: say 42.4 | ||
camelia | rakudo-moar 5daff4: OUTPUT«42.4» | ||
jnthn | That doesn't scream "OMG I AIN'T A STRING!" when we print it :P | ||
Well, say it, but doesn't on print either :) | 08:38 | ||
jdv79 | taking a gist to be a source of authoratative truth would be a mistake | ||
that's not a "gist";) | |||
jnthn | ShimmerFairy: Looking at the extra candidates in allomorphs.pm only makes me more sure I'm right. :) | ||
Needing those is decidedly a design smell. | 08:39 | ||
FROGGS | patrickz: does not look like | ||
ShimmerFairy | jnthn: that's true (I had a feeling someone was going to pull that one out :P), I just think that the allomorphic types warrant a gist that clues you in on what's happening. | ||
jnthn: I agree it's a design smell, but I think it's because there shouldn't be a .gist-avoiding 'say' candidate in the first place :P | |||
I didn't put in a lot of things with explicit allomorphic candidates, I did it for 'say' and 'note' because I figured those printing functions warranted accurate representation of the allomorphic object itself, and not picking one of its two sides. | 08:42 | ||
jnthn | ShimmerFairy: As already noted, the point of say/note isn't accurate representation, but human-friendly representation | 08:44 | |
ShimmerFairy | (also, again, to get around the fact that the Str candidates on say and note avoid .gist, which I would consider a bug (even if you disagree for allomorphs, it's still a bug waiting to happen)) | ||
jnthn | Anyway, not going to spend any longer on this, for one 'cus it's TimToady++'s call, and for two if it's delegated back to me I already made my mind up. :) | 08:45 | |
pmurias: I can reproduce that SEGV you found yesterday locally | |||
pmurias | jnthn: it was a realloc got an invalid size for me | 08:48 | |
jnthn | pmurias: Yowser, it explodes in the MAST -> bytecode compiler | ||
That's a new one... | |||
pmurias | and for me it passes if I write the mbc to disk | 08:49 | |
jnthn | Doing a debug build at the moment to try and get a better location out of valgrind :) | ||
08:50
araujo left
|
|||
jnthn | pmurias: Seems we write past the end of a buffer, and that's the real issue; the realloc exploding is probably a consequence of the corruption | 08:51 | |
08:51
cognominal joined,
araujo joined
|
|||
patrickz | FROGGS: Last time you just wrote them an email, right? | 08:53 | |
08:53
darutoko joined
|
|||
patrickz | I can do that... | 08:53 | |
FROGGS | patrickz: I didn't | ||
jnthn | Ah, it looks like an accident when labeled exception handlers were added. | ||
08:54
domm left
|
|||
pmurias is glad it turned out a normal bug rather than some weird gc freak accident as he expected | 08:55 | ||
patrickz | FROGGS: There is a commit in upstream dyncall referencing to you. ;-) | ||
08:56
domm joined,
rindolf left
|
|||
FROGGS | patrickz: yes, but that's abuot something else, not the cast problem what the issue #2 was about | 08:57 | |
08:57
domm left,
domm joined,
domm left
08:58
domm joined,
domm left
|
|||
patrickz | FROGGS: I'm asking because they don't give any hints on their webpage how to propose pull requests. So that past commit came to them via email? If yes I'll also just email them this current PR. | 08:58 | |
08:59
domm joined,
domm left
|
|||
FROGGS | patrickz: yes, I just emailed them a diff | 08:59 | |
08:59
domm joined
|
|||
patrickz | ok, will do the same. | 09:00 | |
09:00
larion joined,
domm left,
domm joined
09:07
leont left
09:08
domidumont left
09:13
brrt left
09:14
rindolf joined
|
|||
jnthn | pmurias: SEGV fixed in HEAD; thanks for reporting. Will you include the test file in question in the merge, so we have this covered? | 09:19 | |
09:24
[Sno] left,
][Sno][ joined
09:25
Woodi joined
|
|||
pmurias | jnthn: yes | 09:25 | |
jnthn | pmurias: OK, great. Please can you close the issue once that's done? | 09:30 | |
pmurias | MOAR_REVISION should contain a revision sha and the date from where it's from? | 09:31 | |
dalek | ast: b8bcb2c | jnthn++ | S17-lowlevel/lock.t: Test covering RT #125705. |
09:32 | |
jnthn | pmurias: Just run "git describe" in the MoarVM repo | 09:33 | |
(after pulling) | |||
And put the result into that file | |||
.tell lizmat if you're reliably seeing S17-supply/start.t passing now, then maybe rt.perl.org/Ticket/Display.html?id=125460 can be closed... I've not seen it fail since my recent fixes in Moar. | 09:36 | ||
yoleaux | jnthn: I'll pass your message to lizmat. | ||
pmurias | jnthn: thanks | ||
09:40
telex left,
telex joined
|
|||
jnthn | pmurias: Thanks for reporting it; it could easily have cropped up in Rakudo as well as NQP :) | 09:42 | |
So very happy to have it fixed | |||
Also happy that rt.perl.org/Ticket/Display.html?id=125161 is no longer explosive :) | 09:43 | ||
dalek | ast: 1b3acbf | jnthn++ | S17-promise/start.t: Test covering RT #125161. |
09:44 | |
09:46
itz joined
|
|||
itz | o/ | 09:46 | |
jnthn | And now we're down to 1020 | ||
dalek | Heuristic branch merge: pushed 511 commits to nqp by pmurias | 09:48 | |
pmurias | hoelzro: the js backend has been merged in | 09:49 | |
jnthn | pmurias++ hoelzro++ | ||
09:51
pmurias left
09:52
pmurias joined
09:56
JimmyZ joined
|
|||
jdv79 | what was this recent invocation data race? | 09:59 | |
10:02
mprelude joined,
andreoss joined
|
|||
jdv79 | 113c3b5? | 10:02 | |
dalek | p: b5d7db9 | (Pawel Murias)++ | tools/build/process-qregex-tests: Run passing rx_quantifiers test |
||
nqp: f19a35e | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp: | |||
nqp: Add a hack so that ifnull returns true on undefined. | |||
10:02
dalek left
|
|||
pmurias | hoelzro: the js backend is now fully merged in | 10:03 | |
10:03
dalek joined,
ChanServ sets mode: +v dalek
|
|||
JimmyZ | \o | 10:03 | |
andreoss | m: say ([1,2,3] Z+^ ([1,2,3] xx *) | 10:04 | |
camelia | rakudo-moar 5daff4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sB2AOGiyzBUnable to parse expression in parenthesized expression; couldn't find final ')' at /tmp/sB2AOGiyzB:1------> 3say ([1,2,3] Z+^ ([1,2,3] xx *)7⏏5<EOL> expecting any of: st…» | ||
andreoss | m: say ([1,2,3] Z+^ ([1,2,3] xx *)) | ||
camelia | rakudo-moar 5daff4: OUTPUT«(2 1 0)» | ||
andreoss | m: say ([1,2,3] Z+^ flat([1,2,3] xx *)) | ||
camelia | rakudo-moar 5daff4: OUTPUT«(0 0 0)» | ||
andreoss | m: say ([1] ^+ [1]) | 10:05 | |
camelia | rakudo-moar 5daff4: OUTPUT«one([1], 1)» | ||
andreoss | m: say ([1] +^ [1]) | ||
camelia | rakudo-moar 5daff4: OUTPUT«0» | ||
andreoss | why should +^ work with Positionals? | 10:06 | |
ShimmerFairy | nope, +^ is for numeric stuff, closest to what you want is ~^ for Bufs | 10:07 | |
psch | m: &infix:<+^>.candidates>>.signature.say | ||
camelia | rakudo-moar 5daff4: OUTPUT«(() ($x) ($x, $y) (Int:D \a, Int:D \b) (int $a, int $b))» | ||
psch | the fitting cand is the 4th | ||
m: say [1,2,3] ~~ Int | |||
camelia | rakudo-moar 5daff4: OUTPUT«False» | ||
ShimmerFairy | andreoss: oh, I didn't read the "should". +^ coerces to Numeric, and +@array -> @array.elems | 10:08 | |
psch | m: say ([1,2,3]).^can('Int') | ||
camelia | rakudo-moar 5daff4: OUTPUT«(Int Int)» | ||
psch | also, g'morn #perl6 o/ | ||
10:11
_mg_ left,
thou joined
10:15
thou left
10:29
Andrie joined
10:31
[Tux] left
10:32
[Tux] joined
|
|||
andreoss | m: ([1], -> @p { [0, @p Z+ @p, 0] } ... *)[^5].perl.say | 10:32 | |
camelia | rakudo-moar 5daff4: OUTPUT«===SORRY!===Type check failed in binding @p; expected 'Positional' but got 'Int'» | ||
timotimo | o/ | 10:35 | |
psch | o/ timotimo | ||
10:38
pmurias left
|
|||
andreoss | m: ([1], [1], [1] ... *)[^3].say.perl | 10:39 | |
camelia | rakudo-moar 5daff4: OUTPUT«(1 1 1)» | ||
FROGGS | \o/ | ||
js in master! | |||
timotimo | why .say.perl? | ||
andreoss | m: ([1], [1], [1] ... *)[^3].perl.say | ||
camelia | rakudo-moar 5daff4: OUTPUT«(1, 1, 1)» | ||
psch | m: ([1], -> *@p { [0, @p Z+ @p, 0] } ... *)[^5].perl.say # vOv | 10:41 | |
camelia | rakudo-moar 5daff4: OUTPUT«(1, 1, 1, 3, 3)» | ||
psch | i *think* i found a pattern why that weird BagHash set op things throws the CME... | ||
s/things/thing/ | |||
andreoss | it should generate pascal's triangles | ||
psch | it seems to happen whenever not all elements are in the intersection... | 10:42 | |
10:42
xfix joined
|
|||
timotimo | m: ([1], -> *@p { $[0, @p Z+ @p, 0] } ... *)[^5].perl.say | 10:42 | |
camelia | rakudo-moar 5daff4: OUTPUT«(1, $[1, 1], $[2, 2], $[3, 3], $[4, 4])» | ||
timotimo | oh | 10:43 | |
m: ([1], -> *@p { $[(0, |@p) Z+ (|@p, 0)] } ... *)[^5].perl.say | |||
camelia | rakudo-moar 5daff4: OUTPUT«(1, $[1, 1], $[1, 3, 2], $[1, 3, 5, 3], $[1, 3, 5, 7, 4])» | ||
timotimo | almost! :) | ||
m: ([1], -> *@p { $[|(0, |@p) Z+ |(|@p, 0)] } ... *)[^5].perl.say | |||
camelia | rakudo-moar 5daff4: OUTPUT«(1, $[1, 1], $[1, 3, 2], $[1, 3, 5, 3], $[1, 3, 5, 7, 4])» | ||
timotimo | m( | ||
m: ([1], -> *@p { @p.perl.say; $[|(0, |@p) Z+ |(|@p, 0)] } ... *)[^5].perl.say | |||
camelia | rakudo-moar 5daff4: OUTPUT«[1][1, [1, 1]][1, [1, 1], [1, 3, 2]][1, [1, 1], [1, 3, 2], [1, 3, 5, 3]](1, $[1, 1], $[1, 3, 2], $[1, 3, 5, 3], $[1, 3, 5, 7, 4])» | ||
timotimo | ah, i see | ||
m: ([1], -> @p { $[|(0, |@p) Z+ |(|@p, 0)] } ... *)[^5].perl.say | 10:44 | ||
camelia | rakudo-moar 5daff4: OUTPUT«===SORRY!===Type check failed in binding @p; expected 'Positional' but got 'Int'» | ||
timotimo | m: ($[1], -> @p { $[|(0, |@p) Z+ |(|@p, 0)] } ... *)[^5].perl.say | ||
camelia | rakudo-moar 5daff4: OUTPUT«($[1], $[1, 1], $[1, 2, 1], $[1, 3, 3, 1], $[1, 4, 6, 4, 1])» | ||
timotimo | m: ($[1], -> @p { $[(0, |@p) Z+ (|@p, 0)] } ... *)[^5].perl.say | ||
camelia | rakudo-moar 5daff4: OUTPUT«($[1], $[1, 1], $[1, 2, 1], $[1, 3, 3, 1], $[1, 4, 6, 4, 1])» | ||
timotimo | m: ($[1], -> @p { $[(0, @p) Z+ (@p, 0)] } ... *)[^5].perl.say | ||
camelia | rakudo-moar 5daff4: OUTPUT«($[1], $[1, 1], $[2, 2], $[2, 2], $[2, 2])» | ||
timotimo | so that | is the only one needed | ||
m: ($[1], -> @p { $[0, |@p Z+ |@p, 0] } ... *)[^5].perl.say | |||
camelia | rakudo-moar 5daff4: OUTPUT«($[1], $[1, 1], $[1, 2, 1], $[1, 3, 3, 1], $[1, 4, 6, 4, 1])» | ||
timotimo | andreoss, psch, does that help? | 10:45 | |
psch | ...not with the BagHash stuff :P | ||
still, timotimo++ | |||
:) | |||
timotimo | sorry, psch :| | 10:46 | |
were you able to get the exact instruction that throws the CME? | |||
jnthn | Hm, in RT can you not search the bodies of tickets? | 10:49 | |
10:49
nwc10 joined
|
|||
nwc10 | pmurias++ | 10:49 | |
hoelzro++ | |||
vendethiel | pmurias++, hoelzro++ too :-) | ||
timotimo | jnthn: don't you get all RT's via email, too? :P just search through your mail client :P | ||
psch | timotimo: well, almost. i can see the reason, but not the cause | 10:50 | |
nwc10 | so, NQP now self-hosts and bootstraps on JS ? | ||
timotimo | hm | ||
10:50
yakudza joined
|
|||
nwc10 | or is it a MoarVM-based cross compiler? | 10:52 | |
vendethiel | nwc10: the latter, I think | ||
psch | timotimo: gist.github.com/peschwa/0ee944afeb1e1c874902 | ||
that's the reason it throws | |||
i have no clue how to find the modification on the HashMap that happened after the Iterator was instantiated... | |||
timotimo | i don't get it, though | 10:53 | |
jdv79 | timotimo: the QJson "too large document" error, which btw - great grammar there... - is likely unfixable | ||
need to port to sommething else i guess | 10:54 | ||
its somehow hitting a 27 bit boundary in some spec'd bin format that's trouble to fix | |||
TMI but meh | |||
timotimo | are you making fun of my grammar? :) | 10:55 | |
psch | the line in CORE.setting is in Seq.pull-one in EnumMap.values... | ||
jdv79 | no, that's what QJsonParseError spits out ^H | ||
timotimo | oh? | ||
i didn't know it'd even admit that | |||
jdv79 | remember moritz's json didn't parse | ||
that's why | 10:56 | ||
timotimo | yeah | ||
i've had that problem with a different json document in the past | |||
... perhaps it was the core setting compilation profile? | |||
11:02
cognominal left
|
|||
FROGGS shudders when looking at 'for my $cell (@{$row->[$#head..$#$row]}) {', which he just wrote | 11:02 | ||
11:03
cognominal joined
|
|||
jnthn | .tell lizmat I think the .push/.pop error improvements in List have busted make test (54-lib.t) | 11:04 | |
yoleaux | jnthn: I'll pass your message to lizmat. | ||
11:09
rurban left
11:10
TEttinger left,
raiph joined,
Sqirrel left
11:11
Sqirrel joined
11:12
Sqirrel_ joined,
Sqirrel left
|
|||
masak | afternoon, #perl6 | 11:12 | |
jnthn | o/ masak | 11:15 | |
11:16
domidumont joined
11:17
Andrie left
|
|||
nwc10 | good UGT heresy, masak | 11:20 | |
11:21
][Sno][ is now known as [Sno]
11:25
dayangkun left
11:27
raiph left,
_mg_ joined,
zacts left
|
|||
masak | nwc10: I'm not on UGT right now. :) | 11:28 | |
11:28
zacts joined,
raiph joined
11:31
telex left,
telex joined,
telex left
11:32
telex joined,
g4 left
11:36
g4 joined
|
|||
itz | DST for UGT? | 11:41 | |
11:42
laouji left
|
|||
dalek | pan style="color: #395be5">perl6-examples: b36acee | (Steve Mynott)++ | / (2 files): [99probs] P10-scottp.pl don't flatten in result |
11:42 | |
itz | m: dd <4 a> | 11:47 | |
camelia | rakudo-moar 5daff4: OUTPUT«(IntStr.new(4, "4"), "a")» | 11:48 | |
itz | m: dd <a> | ||
camelia | rakudo-moar 5daff4: OUTPUT«"a"» | ||
itz | m: dd <4> | ||
camelia | rakudo-moar 5daff4: OUTPUT«IntStr.new(4, "4")» | ||
itz | m: dd <~4> | 11:49 | |
camelia | rakudo-moar 5daff4: OUTPUT«"~4"» | ||
11:53
rurban joined
11:54
laouji joined
11:55
pmurias joined
|
|||
itz | m: dd > dd ([<4 a>]) | 11:55 | |
camelia | rakudo-moar 5daff4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H37Y_IagPEPreceding context expects a term, but found infix > insteadat /tmp/H37Y_IagPE:1------> 3dd >7⏏5 dd ([<4 a>])» | ||
itz | m: dd <4 a>>>.Str | 11:56 | |
camelia | rakudo-moar 5daff4: OUTPUT«("4", "a")» | ||
itz | any neater way? | ||
andreoss | m: my @x = gather { take $_ for 1..* } #'{greedy} ; say @x[^10] | ||
pmurias | nwc10: it's not self-hosted yet | ||
andreoss | m: my @x = lazy gather { take $_ for 1..* } ; say @x[^10] | ||
camelia | rakudo-moar 5daff4: OUTPUT«(timeout)» | 11:57 | |
rakudo-moar 5daff4: OUTPUT«(1 2 3 4 5 6 7 8 9 10)» | |||
11:57
Skarsnik joined
|
|||
andreoss | is gather now greedy by default? | 11:57 | |
11:59
thou joined
|
|||
pmurias | nwc10: it's the next milestone | 11:59 | |
12:02
xfix left
12:04
thou left
|
|||
psch | huh | 12:04 | |
i think i have an idea where this comes from | |||
12:04
vendethiel left
|
|||
psch | we're using $k.WHICH for BagHashes | 12:04 | |
as key, i mean | 12:05 | ||
and when copying the lhs to iterate over the pairs, we copy the underlying HashMap, but assign the same key | |||
...actually maybe that doesn't really make sense :/ | 12:06 | ||
'cause we have one hashKeyIter per VMIterInstance | |||
but removing a String from one of them shouldn't touch the underlying HashMap | |||
1) we have two HashMaps 2) one of them gets an VMIterInstance for its $!storage | 12:08 | ||
dalek | pan style="color: #395be5">perl6-examples: 94be1fa | (Steve Mynott)++ | / (2 files): [99probs] P12-unobe.pl post-glr quoting behaviour |
||
psch | 3) the .next() of this iter is removed from the other HashMap | ||
4) stuff explodes | |||
that's what i'm pretty sure off... o.o | |||
assuming the different BagHashes have actual different underlying $!storage this shouldn't happen... | 12:09 | ||
12:09
xfix joined
12:22
xfix left
12:25
cognominal left
|
|||
jnthn | andreoss: Assignment is eager unless it encounters something marked as lazy. gather alone doesn't imply lazy. | 12:29 | |
nwc10 | pmurias: aha right. thanks for the confirmation/clarification | ||
good luck | |||
have fun | |||
jnthn | andreoss: The way you wrote it (with lazy) is the right thing to do. | 12:30 | |
pmurias | nwc10: the point where the real fun beings is when we get proper Perl 6 to start compiling to js ;) | 12:31 | |
nwc10 | I hope that day comes soon, but as I'm not able to help (other than say thanks and offer encouragement) I'm not going to keep on about it | 12:32 | |
CQ | pmurias: what do you mean compile to, do you mean code generation? | 12:33 | |
dalek | kudo-star-daily: 4ad48b4 | coke++ | log/ (2 files): today (automated commit) |
12:34 | |
12:34
zakharyas left
|
|||
dalek | rl6-roast-data: 9f6a6fe | coke++ | / (9 files): today (automated commit) |
12:34 | |
jnthn | Generate JavaScript from Perl 6, much like we generate MoarVM and JVM bytecode from Perl 6 today. | ||
pmurias | CQ: yes | 12:35 | |
jnthn | Code generation is just the last step of compilation, though :) | ||
pmurias | the rest will be handled by rakudo++ | 12:36 | |
maybe with a custom analysis pass (or two) thrown in | 12:37 | ||
CQ | how would it be done? something like github.com/drforr/Perl-Mogrify ? | 12:39 | |
pmurias | CQ: something like github.com/perl6/nqp/blob/master/s...mpiler.nqp | 12:41 | |
pmurias should propably split this file up... | |||
braintwist | wow I just found something neat, my systems time is 2 hours ahead of what the time actually is, but then I ran the DateTime in perl, and perl got the time right, it is really awesome, but I have no idea how perl does it ? | ||
[Coke] drinks a coffee. | 12:42 | ||
pmurias | CQ: the biggest difference is that the javascript I emit won't be idiomatic | 12:43 | |
so it should emit code that you can run instead of stuff that sort of means that same things but can be tweaked and used as editable code | 12:45 | ||
masak | braintwist: if you want to find out, maybe talk to a Perl 5 forum? :) | 12:49 | |
12:49
xfix joined
12:50
xfix left
|
|||
itz | braintwist: I would guess either you or computer might be confused about timezones and/or daylight saving :) | 12:50 | |
dalek | pan style="color: #395be5">perl6-examples: fb32836 | andreoss++ | / (10 files): [euler] more GLR fixes |
||
[Coke] | I have a --profiel out from a big run that dies - a run from "say 3" works fine. will see if I can figure out what happened. | 12:51 | |
[Coke] commutes | |||
braintwist | masak: I was doing it in perl6 | ||
itz: I would think daylight savings would only explain one hour ? | 12:52 | ||
12:56
El_Che left
13:01
hernanGOA joined
|
|||
psch | i'm confused | 13:03 | |
m: role R { has $!foo }; class C does R { }; say nqp::getattr(C.new, C, '$!foo') | |||
camelia | rakudo-moar 5daff4: OUTPUT«(Any)» | ||
psch | m: my $a = BagHash.new(<a b>); say nqp::getattr($a, BagHash, '%!elems'); | ||
camelia | rakudo-moar 5daff4: OUTPUT«P6opaque: no such attribute '%!elems' in block <unit> at /tmp/uwOvJpdphe:1» | ||
psch | but BagHash does Baggy, and Baggy has %!elems | ||
jnthn | psch: my $a := ..., or nqp::decont($a) | ||
psch | jnthn: ugh. right, decont is a thing that still is a bit spooky to me apparently :) | 13:04 | |
psch makes a note, "if it's weird and there's a $ try deconet" | 13:05 | ||
s/deconet/decont/ | |||
hm, probably better as "if there's a sigil" | 13:06 | ||
13:07
g4 left
|
|||
dalek | pan style="color: #395be5">perl6-examples: 5d0d700 | (Steve Mynott)++ | t/categories/99-problems.t: [99probs] fix P25-topo.pl post-glr |
13:08 | |
pan style="color: #395be5">perl6-examples: fb325c8 | (Steve Mynott)++ | / (10 files): Merge branch 'master' of github.com:perl6/perl6-examples |
|||
13:08
g4 joined
|
|||
dalek | p: 771071d | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp: Insert newline when emitting strings to make it easier to read the generated code. |
13:12 | |
p: d4330a7 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp: Refactor atpos op handling. |
|||
p: 2a97e34 | (Pawel Murias)++ | / (2 files): Test negative indexes to nqp::atpos. Implement them on the js backend. |
|||
13:13
skids joined
|
|||
Woodi | hallo #perl6 :) | 13:15 | |
pmurias++ :) | |||
moritz | pmurias++ # for nqp-js | 13:16 | |
pmurias++ # for increasing NQP test coverage | |||
Woodi | pmurias: so how to use that new addon ? install something and then in nqp configuration add --backends=js ? | ||
masak | pmurias++ # making Perl 6 web scale | 13:19 | |
13:19
El_Che joined
13:21
raiph left
|
|||
dalek | pan style="color: #395be5">perl6-examples: 924d611 | (Steve Mynott)++ | categories/99-problems/P31-rhebus.pl: [99probs] fix P31-rhebus.pl post-glr |
13:23 | |
13:23
nwc10 left
|
|||
pmurias | Woodi: --backends=moar,js should do the trick | 13:23 | |
[Coke] | In AngularJS 1.2.0 and later, ngRoute has been moved to its own module. If you are getting this error after upgrading to 1.2.x or later, be sure that you've installed ngRoute. | 13:28 | |
dalek | pan style="color: #395be5">perl6-examples: dc6f486 | andreoss++ | categories/euler/prob054-andreoss.pl: fix indentation |
||
pan style="color: #395be5">perl6-examples: be8087d | andreoss++ | t/categories/99-problems.t: Merge branch 'master' of github.com/perl6/perl6-examples |
|||
pan style="color: #395be5">perl6-examples: c0c8711 | andreoss++ | categories/99-problems/P31-rhebus.pl: Merge branch 'master' of github.com/perl6/perl6-examples |
|||
Woodi | pmurias: thanx | ||
nine | pmurias: great to follow your progress :) | ||
Woodi | btw. Node/libuv company was lastly bought by IBM, interesting what will happens now... | 13:30 | |
timotimo | is that joyent? | 13:31 | |
masak | [Coke]: is that the profiler? | 13:33 | |
Woodi | timotimo: no. and looks not autors of Node.js as I thinked: www.informationweek.com/cloud/platf...id/1322144 | 13:34 | |
timotimo | "[...] Node.js, a technology that enables developers to craft APIs to suit any need in the Java universe. " | 13:35 | |
oh, is that so! | |||
itz | 1999 java != javscript, 2015 our java was really javascript | 13:36 | |
timotimo | oh? | ||
itz | that probably needed a :) | ||
13:38
El_Che left
|
|||
psch | huh | 13:39 | |
that surely makes the author look credible | 13:40 | ||
13:40
El_Che joined
|
|||
timotimo | seems like that's more of a business news website | 13:40 | |
psch | timotimo: still, that he quotes someone speaking about JavaScript but talks about Java himself..? | 13:41 | |
timotimo | it's an easy mistake to make; probably comes down to a typo | ||
psch .oO( but PERL vs Perl is reason for complaint emails... ) | 13:42 | ||
moritz | yes, Iscript accidentally insertscript the word "script" into my text allscript the time | ||
common typo | |||
itz | javascript was originally called livescript which is confusing since there is another livescript now | 13:43 | |
timotimo | and then microsoft built something called "JScript", which is confusing because there's also "J" | ||
"Because a developer can "express things as APIs, new services can be built around them," Soto said." ← ?? | 13:45 | ||
13:46
khw joined
13:47
thou joined
|
|||
dalek | pan style="color: #395be5">perl6-examples: 0079070 | andreoss++ | categories/euler/prob081-moritz.pl: remove unnecessary comments |
13:49 | |
13:50
cognominal joined,
andreoss left
13:51
aborazmeh joined,
aborazmeh left,
aborazmeh joined
13:52
thou left
|
|||
dalek | p/travjs: 679ecd4 | hoelzro++ | .travis.yml: Add JS to Travis build matrix |
13:55 | |
pan style="color: #395be5">perl6-examples: c12b95d | (Steve Mynott)++ | categories/cookbook/04arrays/04-05iterating-over-an-array.pl: [cookbox] .Str now needed for <1 2> |
13:58 | ||
13:58
zakharyas joined
|
|||
abraxxa | is there a debug interface for NativeCall so e.g. see the memory location of a Pointer and its size and contents? | 13:59 | |
13:59
FROGGS left
|
|||
[Coke] | masak: yes, that was the profiler error. | 14:00 | |
14:00
abaugher left
14:01
abaugher joined
|
|||
[Coke] needs to update the daily nqp runs to get nqp-js from master... | 14:02 | ||
14:03
Ovidius joined,
travis-ci joined
|
|||
travis-ci | NQP build failed. Rob Hoelz 'Add JS to Travis build matrix' | 14:03 | |
travis-ci.org/perl6/nqp/builds/80437183 github.com/perl6/nqp/compare/travjs-smoke-me | |||
14:03
travis-ci left
|
|||
dalek | p/travjs-smoke-me: c0033ed | hoelzro++ | .travis.yml: Remove Travis notifications while I'm hooking up JS |
14:04 | |
14:04
thou joined
|
|||
dalek | p: d5702b6 | (Pawel Murias)++ | tools/build/process-qregex-tests: Renable the rx_subrules tests on the js backend |
14:04 | |
p: 3a54939 | (Pawel Murias)++ | tools/build/process-qregex-tests: Run rx_modifiers on make js-test |
|||
p: 2f3c2c8 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js: [js] converting strings to integers |
|||
p: 4055609 | (Pawel Murias)++ | tools/build/ (2 files): [js] Avoid calling npm (and recompiling all the c++ modules) when only a .js file changes. |
|||
14:04
Ovidius is now known as CurtisPoe
|
|||
pmurias | hoelzro: make now should be faster on a mere js change | 14:04 | |
CurtisPoe | Is there anyway I can declare an attribute in a class as rw and automatically have it's mutator return the invocant? | ||
s/it's/its/ | 14:05 | ||
pmurias | CurtisPoe: you want to have something like that ($foo.bar = 123).baz = 456) set baz on $foo? | 14:06 | |
jnthn | Not really, given that you don't get a mutator, but rather an l-value accessor | ||
14:06
abaugher left,
laouji left
|
|||
CurtisPoe | So I'd need to write method wrappers for all of them? | 14:06 | |
moritz | CurtisPoe: rw attributes *are* attributes with method wrappers | ||
PerlJam | CurtisPoe: or a trait that did it for you. | ||
jnthn | I'd just write a trait that uses the MOP :) | ||
moritz | uhm | 14:07 | |
but | |||
it doesn't work, does it? | |||
I mean, if you call $foo.bar, it just returns writable container | |||
14:07
abaugher joined
|
|||
moritz | and if you assign an integer to it, it can't return something else, no? | 14:07 | |
jnthn | Well, yeah, you'd have to actually adopt a mutator syntax | ||
$foo.bar(42).baz(69) etc | 14:08 | ||
CurtisPoe | jnthn: that's what I was looking for. I wanted to write a clean Perl 6 example for en.wikipedia.org/wiki/Fluent_interface | 14:09 | |
14:10
muraiki joined
|
|||
nine | CurtisPoe: those are probably the worst examples for fluent interfaces one could think of :) | 14:10 | |
CurtisPoe | I'm don't want to argue with a wikipedia page, I just want to see if we can have a nicer example :) | 14:11 | |
dalek | p/travjs-smoke-me: 9cec7d3 | hoelzro++ | .travis.yml: Add nodejs matrix for Travis tests I don't know if this will actually work, but here goes |
||
masak | nine: I wouldn't say it that strongly. that seems like a good API for a factory object. | 14:12 | |
14:12
Sqirrel_ left
|
|||
nine | CurtisPoe: my point being: fluent interfaces shine, when you _don't_ mutate the state. DBIx::Class resultset chaining and custom resultset methods are where it really starts to become useful. | 14:13 | |
masak | unless -- is there some way to assign a lot of stuff to a factory object in a `given` block, using the usual mutator syntax, but then get back the fully constructed (immutable) object at the end? | ||
maybe we could play around with a special `construct` keyword/slang for that? :) | |||
masak .oO( sounds like a job for a macro! ) :P | |||
it would be a nice party trick. the object as such is immutable, but using the `construct` keyword, you can use normal imperative code and assignment syntax to gradually build it up. | 14:14 | ||
something like this: my $obj = construct MyImmutableThing { .foo = 42; .bar = "OH HAI"; .baz = computed() }; | 14:15 | ||
muraiki | the one time I used a fluent interface was in an openstack library for java, where it was used to mutate state and eventually call a constructor. | 14:16 | |
jnthn | CurtisPoe: Quickly hacked this up: gist.github.com/jnthn/b291be5a7a18398849d4 | ||
moritz | jnthn++ | 14:17 | |
masak | jnthn++ | 14:18 | |
muraiki | all I recall is that it was better than using the other java openstack library, but that might not have been the result of the fluent interface at all as I was ultimately using it from scala. | ||
CurtisPoe | jnthn++ :) | ||
p6: class A { method foo() { return self } }; method bar() { return self }; A.new.foo.bar | |||
camelia | rakudo-moar 5daff4: OUTPUT«Potential difficulties: Useless declaration of a has-scoped method in mainline (did you mean 'my method bar'?) at /tmp/tmpfile:1 ------> 3{ method foo() { return self } }; method7⏏5 bar() { return self }; A.new.foo.barMethod 'bar…» | ||
moritz | ok, how can I profile htmlify? | ||
CurtisPoe | I don't understand that error message. | 14:19 | |
14:19
hernanGOA left
|
|||
moritz | I can reduce its runtime (by processing far fewer files) to 25s | 14:19 | |
nine | In a language with real named arguments daisy chaining mutators for object construction doesn't buy you anything, unless you can cut the chain at any point and re-use the intermediary result to construct multiple objects from that common base. | ||
muraiki | but I agree with nine in that what is really the best is when you can chain things, not when fluent interfaces are just an alternate syntax for object construction | ||
[Coke] | moritz: heh. that was the large profile I had that broke profile. :) | ||
moritz | but the generated profile is a 145MB html file, and it's basically unusable in any browser | ||
muraiki | I guess java doesn't normally use / has support for named arguments? | 14:20 | |
moritz | muraiki: it doesn't | ||
nine | muraiki: exactly, that's why people like this in Java. | ||
muraiki | ok, that explains it. maybe it's another case of "this design pattern exists because of the inflexibility of the language" not "because it's a good pattern" ;) | ||
14:20
tokuhiro_ left
|
|||
jnthn | CurtisPoe: Do you understand what a method declaration and the mainline of a program are? :) | 14:20 | |
14:21
aborazmeh left
|
|||
masak | CurtisPoe: did you notice you put `bar` outside of the class? | 14:21 | |
14:21
hernanGOA joined
|
|||
moritz | fwiw mojolicious also uses it | 14:21 | |
muraiki | I'm trying to reference that AI guy's critique of the GoF design patterns and how most of them don't need to exist in lisp | ||
[Coke] | moritz: did you see my patch that allows a pathological --sparse to work? | ||
masak | that is, you got the curlies right, but also wrong, at least if you want `bar` to belong to `A`. | ||
muraiki | sebastian thrun I think | ||
[Coke] | (I was doing --sparse=100 to try generating the search.js in a reasonable amount of time.) | ||
jnthn wondres how we could actually make that one any clearer... | 14:22 | ||
*wonders | |||
moritz | [Coke]: me too | ||
jnthn | Maybe "Useless declaration of has-scoped method outside of a class or role" would be better | ||
muraiki | I think where p6 shines is not in the java type of fluent interface, but in the type of chaining you can do with things like supplies, where it reads in a very declarative fashion. and where you can also branch one supply off into two different directions | ||
jnthn | But class/role are only two places you coulda declared it | ||
muraiki | which, once again, is what nine basically said. sorry fi I'm not adding anything here :) | ||
PerlJam | jnthn: highlighting that it's outside of a class/role might have helped though | 14:23 | |
14:23
_mg_ left
|
|||
PerlJam | maybe | 14:23 | |
jnthn | PerlJam: Possibly | ||
PerlJam initially thought that CurtisPoe put it outside of the class on purpose and really meant that the message was confusing. | 14:24 | ||
jnthn | Oh, as soon as I saw the message I figured "oh, I bet mis-nested curlies" :) | ||
I guess that's experience... :) | |||
masak | I wanted to confirm whether CurtisPoe did it deliberately or not. | ||
CurtisPoe | Bah. I'm an idiot :) | 14:25 | |
masak | we could maybe tailor the error message to say which class the method was outside of :P | ||
jnthn | I...what? :P | ||
masak | but may not be worth the extra trouble | ||
dalek | p: 4ab6d1f | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js: [js] Make nqp::istype work on undefined |
||
p: 0963c2d | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js: [js] Make nqp::istype work on arrays |
|||
p: f895360 | (Pawel Murias)++ | tools/build/process-qregex-tests: [js] add rx_captures and rx_qcaps to js-test |
|||
moritz | masak: it's outside *any* class | ||
masak: so it could list 'em all | |||
jnthn | I just worry about errors that try to enumerate class/role/grammar and so on | ||
masak | well, it's likely to come right after a particular class. | ||
jnthn | Because it's an open set, not a clsoed one | ||
pmurias | does adding '[js]' to commit msgs make sense? | ||
jnthn | *closed | ||
PerlJam | moritz: perhaps it could provide a list ordered by proximity to the method | ||
masak | I meant if it comes after some class. then we could give a better error, maybe. | 14:26 | |
no need to get more fancy than that. | |||
so it *only* triggers if the class just closed. | |||
even that may be too heavyweight. | |||
PerlJam | sounds highly specific. | 14:27 | |
masak | but I'm pretty sure it would be the kind of awesome error message that Perl 6 is known for. | ||
PerlJam | "oops, the hint didn't trigger because I had an intervening statement" | ||
masak | people'd go "*whoa*, how does it know which class it's outside of!?" | ||
PerlJam: well, think about the circumstances that led to CurtisPoe's error. | |||
there wouldn't be a statement in between, because you wouldn't put one between methods. | |||
this was solely the case of a premature closing brace. | 14:28 | ||
PerlJam | sorry, I can only imagine the circumstances and my imagination is quite big sometimes :) | ||
masak | which admittedly is much more likely in one-liners, I guess. | ||
but still, it happens. I've done it, too. | |||
itz | Damn braces: Bless relaxes. | ||
masak | saying "it's outside any class" is premature generalization in this case. | 14:29 | |
PerlJam | yeah, if you just listed the classes declared in the compilation unit that would be a huge hint. | 14:30 | |
PerlJam waits patiently for masak to implement his idea ;) | |||
masak | heh. | 14:31 | |
CurtisPoe | I get a parsing error if I try to chain those method calls over multiple lines: gist.github.com/Ovid/8df7c963ead6d4f6f20e | ||
14:31
telex left
|
|||
masak | CurtisPoe: without looking, unspace. | 14:31 | |
14:32
vendethiel joined
|
|||
masak | m: say 42 .abs | 14:32 | |
camelia | rakudo-moar 5daff4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/t8coPmq3aZTwo terms in a rowat /tmp/t8coPmq3aZ:1------> 3say 427⏏5 .abs expecting any of: infix infix stopper postfix statement end state…» | ||
14:32
telex joined
|
|||
masak | m: say 42\ .abs | 14:32 | |
camelia | rakudo-moar 5daff4: OUTPUT«42» | ||
CurtisPoe | masak: that's what I thought, but it's nice when chaining methods to put one method per line. | ||
Is that not possible due to whitespace significance? | |||
masak | there's a slang, Slang::Tuxic. | ||
but no, not possible in the main slang due to TTIAR. | 14:33 | ||
you need that backslash at least. | |||
jnthn | given open('file') { .print: 'foo'; .close; } # note that .foo means $_.foo | ||
[Coke] notes that the youtube video is progressing. sooooon. | |||
CurtisPoe | Ah, yes. | ||
itz | TTIAR? | 14:34 | |
oh S299 | |||
arnsholt | Two Terms In A Row | ||
PerlJam | using given rather than chaingin would make the code clearer IMHO too | ||
cdc | what breaks the Perl 6 clocking mechanism ;) | ||
itz | S99 I mean | ||
shouldn't a bot do glossary lookups? :) | 14:35 | ||
masak | S99:TTIAR | ||
hm. | |||
14:36
synbot6 joined
|
|||
PerlJam | S99:TTIAR | 14:36 | |
synbot6 | Link: design.perl6.org/S99.html#TTIAR | ||
PerlJam | :-) | ||
one of these days someone will have to make a less fiddly bot. | |||
geekosaur | that may require something less fiddly-inducing than irc... | 14:37 | |
masak | hey, IRC is perfect, OK? :P | ||
it was invented in 1899. hasn't needed to change since. | 14:38 | ||
arnsholt | Just like X11 and Unix =) | ||
geekosaur hands masak BRC | |||
_sri | <3 fluent interfaces | ||
itz | yeah things like X11 and init never change :) | ||
masak | _sri: five trillion jQuery users can't be wrong. :) | 14:39 | |
CurtisPoe | If anyone wants to improve this, it would be great: en.wikipedia.org/wiki/Fluent_interface#Perl_6 | 14:44 | |
Also, we should start getting more examples on Wikipedia, if possible. | |||
PerlJam | CurtisPoe++ | ||
moritz | and do a green-field rewrite of the wikipedia page about Perl 6 | 14:45 | |
masak | what moritz said. | 14:46 | |
masak .oO( second system wikipedia page done right! ) | |||
14:48
hernanGOA left
|
|||
cdc | CurtisPoe: I think "given $employee { .name('Bob'); .salary(200) }" is more Perl 6 idiomatic, and this meets the aims of fluent interface (readability) | 14:48 | |
PerlJam | .oO( deja vu ) |
14:49 | |
CurtisPoe | cdc: that's true. Skips the MOP, also. | ||
timotimo | but since you return self for those things | ||
you can my $constructed = do given $employee { ... } | |||
14:49
hernanGOA joined
|
|||
moritz | wow, I just had a profile with >30% time spent in dynamic optimization | 14:50 | |
jnthn | moritz: New record! | ||
timotimo | oh wow | ||
was the program running for longer than 10ms? :) | 14:51 | ||
14:51
abraxxa left
|
|||
jnthn | moritz: That *can* happen if you're really unlucky (like, you run just for long enough for it to kick in), but more likely it warrants attention. | 14:51 | |
CurtisPoe | That's giving me the error: Too many positionals passed; expected 1 argument but got 2 | ||
moritz | timotimo: 170ms or so | ||
jnthn: fwiw it was perl6-m --profile -Ilib t/pod-htmlify.t in perl6/doc | 14:52 | ||
jnthn | Hmm, a test file :) | ||
moritz | might be all fine; I was just surprised | ||
jnthn is a little too | 14:53 | ||
moritz: If you look at the Routines tab, do you see that it performed OSR anywhere? | |||
moritz | jnthn: profile is here: hack.p6c.org/~moritz/profile-144232...81512.html | 14:54 | |
cdc | CurtisPoe: it's because the chainymutable trait adds one method with the same name (for instance foo() for the attribute $foo) | 14:56 | |
CurtisPoe: one doesn't need methods when using given :) | |||
tony-o | Stage parse : 34.599 | ||
cdc | m: my $a = class { has ($.b, $.c, $.d) is rw }.new; given $a { .b = 1; .c = 2; .d = 3 } | ||
camelia | ( no output ) | ||
moritz | jnthn: no OSR; two global deopts | ||
cdc | ^^ this could be indented à la fluent interface | 14:57 | |
I mean the body of given | |||
CurtisPoe | So, better? gist.github.com/Ovid/97d7bea032c00a8ccd44 | 14:58 | |
Should I replace the wikipedia example with that? | |||
moritz | 6 local deoptimizations in reify-at-least | ||
CurtisPoe | (though I find it a shame that I can't have .salary = 200 (note the lack of decimal point) | ||
cdc | CurtisPoe: yes :) This is way more accessible for newd comers | 14:59 | |
moritz | CurtisPoe: use Real as a type constraint | ||
CurtisPoe: that can be Int too | |||
CurtisPoe | Yes, and I get to enjoy floating point errors then :) (but at least everyone will understand it) | 15:00 | |
cdc | CurtisPoe: you can also add .say in the "given" block | ||
or .Str.say, maybe | 15:01 | ||
nine | John the Iterator. He's a sequence operator. All he ever gives us is pain... | 15:02 | |
moritz | CurtisPoe: it's much harder to accidentally create a floating-point number in Perl 6 than in Perl 5 | ||
subset RatOrInt of Real where Int|Rat | 15:03 | ||
cdc | CurtisPoe: you could rename method Str into gist, then no need to stringify explicitely when using .say or say(). | ||
CurtisPoe | cdc: thank you! I never knew that :) (er, plenty of things I never knew) | 15:04 | |
cdc | you're welcome :) | 15:05 | |
moritz | In unrelated news, "Let's Encrypt" is in beta stadium | ||
should I apply for a perl6.org certificate? | 15:06 | ||
15:06
rurban left
|
|||
cdc | moritz: it makes sense since some search engines rank up https websites | 15:07 | |
PerlJam | moritz: might as well. | 15:08 | |
pink_mist | couldn't hurt | ||
it should be open to the public come november afaik, so if you can't get in the beta, it's not that long until it should be available anyway | |||
15:10
domidumont left
|
|||
itz | startssl certs are free (and in browsers) if you have access to the WHOIS email addresses for the domain | 15:13 | |
timotimo | i'm looking forward to let's encrypt | ||
moritz | itz: I don't; and startssl doesn't issue revocations for free | ||
timotimo | they just put their first site online with one of their certificates | 15:14 | |
moritz | I mean, I'd spend money on it if necessary (there's enough left from the hack server donations), but I hope it won't be necessary | ||
nine | jnthn: there are 3 [GLR] tickets left. All above my pay grade I fear. | 15:15 | |
15:16
diana_olhovik left,
tokuhiro_ joined
15:21
tokuhiro_ left
|
|||
hoelzro | good *, #perl6! | 15:21 | |
pmurias++ # js merge | |||
tony-o | perl6 --ll-exception -Ilib t/01_basic.t | ||
No such method 'load' for invocant of type 'Hash' | |||
oops | |||
15:22
TimToady left
15:23
Sqirrel joined,
TimToady joined
|
|||
ugexe | gotta call load on your pipe and pass in the hash | 15:27 | |
tony-o | there is no hash or load method in any of the files that thing, hah | 15:29 | |
[Coke] | nine++ ticket wrangling. | ||
ugexe | it is a hashish pun | ||
15:29
zacts left
|
|||
vendethiel | wow, just saw rurban's cperl... :o) | 15:30 | |
itz sighs | |||
15:31
zakharyas left
15:35
larion left,
zacts joined,
rurban joined
|
|||
tony-o | ugexe++ lol | 15:37 | |
m: my @a; @a.push({ a => "A", b => "B"}); @a.push({ a => "A", b => "B"}); @a.perl.say; | |||
camelia | rakudo-moar 5daff4: OUTPUT«[:a("A"), :b("B"), :a("A"), :b("B")]» | ||
tony-o | m: my @a; @a.push({ a => "A", b => "B"}); @a.push({ a => "A", b => "B"}); @a.map({.perl}).join("\n").say; | 15:38 | |
camelia | rakudo-moar 5daff4: OUTPUT«:a("A"):b("B"):a("A"):b("B")» | ||
tony-o | that's unexpected | ||
dakkar | www.thenautilus.net/cgit/WebCoso-p.../LibXML.pm ← I'm loving NativeCall | 15:39 | |
www.thenautilus.net/cgit/WebCoso-p...ests/xml.t ← it even works! | 15:40 | ||
ugexe | m: my @a; @a.push($[ a => "A", b => "B"]); @a.push($[ a => "A", b => "B"]); @a.perl.say; | 15:41 | |
camelia | rakudo-moar 5daff4: OUTPUT«[[:a("A"), :b("B")], [:a("A"), :b("B")]]» | ||
15:41
AlexDaniel joined
|
|||
ugexe | m: my @a; my %x; %x<a> = "A"; %x<b> = "B"; @a.push($%x); @a.push($%x); @a.perl.say; | 15:41 | |
camelia | rakudo-moar 5daff4: OUTPUT«[{:a("A"), :b("B")}, {:a("A"), :b("B")}]» | ||
skids | m: my $pipe of Hash = (role Pot { }).new; | 15:42 | |
camelia | rakudo-moar 5daff4: OUTPUT«Type check failed in assignment to '$pipe'; expected 'Hash' but got 'Pot' in block <unit> at /tmp/yZ6G2W3TV6:1» | ||
psch | r: my $bh = BagHash.new(<a b c>); $bh.DELETE-KEY($_) for $bh.keys # found it | ||
finally | |||
camelia | ( no output ) | ||
..rakudo-jvm 5daff4: OUTPUT«java.util.ConcurrentModificationException in block <unit> at /tmp/tmpfile:1» | |||
psch | o.o | ||
tony-o | $%() did , awesome | 15:43 | |
that got Green - the ultimate tool for parallel testing , working with current nom | 15:44 | ||
[Coke] | m: say 33.333333333333333333333333333333333333333333333333333+i | 15:45 | |
camelia | rakudo-moar 5daff4: OUTPUT«33.3333333333333+1i» | ||
[Coke] | I just got linenoise tab autocompletion to work by accident. ahhhh. | 15:46 | |
so nice. | 15:47 | ||
itz looks at recursive code and wishes he had paid more attention to the CS lecturer and less to the beer in the bar | |||
psch | r: my $bh = Hash.new(<a b>); $bh.DELETE-KEY($_) for $bh.keys # ...i wonder? | ||
camelia | ( no output ) | ||
psch | see, *that's* just crazy talk | 15:48 | |
dalek | rl6-roast-data: 70f79f4 | coke++ | / (9 files): today (automated commit) |
15:49 | |
psch | especially 'cause BagHash.DELETE-KEY calls Hash.DELETE-KEY... | ||
15:51
fasfsehwrh joined
|
|||
psch | (actually, Baggy.DELETE-KEY) | 15:51 | |
[Coke] | Perl 6 : a sufficinently smart(ass) compiler. | 15:53 | |
jnthn | itz: Recursion is like you start drinking a beer, but half way through drinking it you have to go to buy another one, and then you start drinking that, and so it goes on...and eventually you get fed up, and finish the beers in reverse order of purchase. It sucks 'cus by the end you're drinking warm beer, just like recursion sucks for the CPU 'cus then the data it needs is no longer in the L1 cache... | ||
arnsholt | Trust jnthn to create an apt beer-analogy =D | 15:54 | |
itz | jnthn++ | ||
TimToady | warm is good for a cache | ||
pink_mist | stale then :P | ||
15:54
patrickz left
|
|||
TimToady | we need something to pull/skip elements from a Seq without relying on subscripting, which caches gratuitously | 15:55 | |
15:55
fasfsehwrh left,
andreoss joined
|
|||
jnthn | TimToady: Something that gracefully degrades to Linq's .Take and .Skip would be nice :) | 15:57 | |
TimToady | except take is, er, taken | ||
jnthn | Well, or is a generalization of them | 15:58 | |
PerlJam | m: (gather {} but role {})[0] | ||
camelia | ( no output ) | ||
jnthn | Well, yeah, I'm expecting you to come up with a brilliant single mechanism that subsumes both of them :P | ||
TimToady | well, .neck($n) that returns a head and a tail, cut at $n | ||
maybe that's a bit too...picturesque... | 15:59 | ||
[Coke] | pmurias, hoelzro: github.com/coke/perl6-roast-data/b...y.out#L130 - error on JS build, not sure how long it's been going on. probably just on hack.p6c.org | 16:00 | |
hoelzro | [Coke]: which version of node does hack have? | 16:01 | |
ah, 0.10.29 | |||
hoelzro guesses from github.com/coke/perl6-roast-data/b...y.out#L144 | |||
PerlJam | m: my @a will begin { say $_.WHAT } | 16:02 | |
camelia | rakudo-moar 5daff4: OUTPUT«(Array)» | ||
16:02
pmurias left
|
|||
dalek | rl6-roast-data: 18ec5b8 | coke++ | bin/nqp.js.sh: js compiler was merged to master |
16:03 | |
16:05
[Sno] left
16:06
larion joined
16:07
araujo left
|
|||
arnsholt | itz: Anyways, recursion is one of those things that are simpler than they seem initially, once you squint at it from the correct angle | 16:07 | |
vendethiel | arnsholt: "apt beer" hey, I'd love a apt-get beer :P | 16:09 | |
moritz | apt-beer add $url_to_pub | 16:10 | |
dalek | ecs: bab09aa | ugexe++ | S22-package-format.pod: Update CompUnitRepo class specification seperator |
16:13 | |
16:16
araujo joined
|
|||
ugexe | beer is a FIFO queue. liquor is often more a LIFO queue | 16:16 | |
16:18
tokuhiro_ joined,
dwarring left
|
|||
jnthn | I didn't know it was possible to drink so much you forget LIFO is a stack, not a queue... :) | 16:20 | |
16:22
tokuhiro_ left
|
|||
cognominal | "to iterate is human, to recurse is divine". I infer that god has an infinite L1 cache. | 16:23 | |
moritz | cognominal: or is very good at TCO | 16:25 | |
TimToady | or just very patient | ||
dalek | pan style="color: #395be5">perl6-examples: bcc9506 | (Steve Mynott)++ | / (3 files): [99probs] GLR fix for P13-viklund.pl |
16:27 | |
[Coke] | the Swiss Perl Workshop 2015 Q&A video with Larry has been released! Thanks to Roman esp. for getting this put together and posted: www.youtube.com/watch?v=zmNInkzaYL...e=youtu.be | ||
PerlJam | Coke++ | 16:32 | |
16:33
leont joined
|
|||
[Coke] tweeted and FB'd it as well, please share and enjoy. | 16:33 | ||
16:39
telex left
|
|||
moritz | how fast is 'last' in a while loop? | 16:40 | |
16:40
itz left
|
|||
moritz | I ask because in a profile of htmlify, push-exactly is the one routine using up most of the exclusive time | 16:40 | |
and it uses a 'last', and that could be optimized out | |||
while $i < $n { | |||
$pulled := self.pull-one(); | |||
last if $pulled =:= IterationEnd; | |||
could become | 16:41 | ||
16:41
telex joined,
telex left,
larion left
|
|||
moritz | while $i < $n && ! IterationEnd =:= ( $pulled := self.pull-one) { ... } | 16:41 | |
jnthn | moritz: Not so fast, more because of `last` itself than the while loop | 16:42 | |
16:42
telex joined
|
|||
moritz | jnthn: ok, I'll try the optimization | 16:42 | |
16:44
[Sno] joined
|
|||
timotimo | [Coke]: you are wearing a LRR shirt! i didn't even notice when i was at the SPW! | 16:46 | |
damn, and right now i have to go | 16:49 | ||
16:49
TimToady left
|
|||
tony-o | is require doing weird stuff for non-core modules? perl6 -e 'require Term::ANSIColor;' is resulting in gist.github.com/tony-o/41203dfaaabca48547af | 16:50 | |
16:50
CQ left
|
|||
ugexe | m: say "\b"..."\t" | 16:51 | |
camelia | rakudo-moar 5daff4: OUTPUT«( )» | ||
16:51
TimToady joined
|
|||
ugexe | ah, on my terminal its just ' )' | 16:51 | |
moritz | huh, there's both Term::ANSIColor and Terminal::ANSIColor in the ecosystem | ||
tony-o: looks like a bug to me | 16:52 | ||
m: require Term::ANSIColor; | |||
camelia | rakudo-moar 5daff4: OUTPUT«Could not find Term::ANSIColor in any of: file#/home/camelia/.perl6/2015.07.1-942-g5daff4c/lib inst#/home/camelia/.perl6/2015.07.1-942-g5daff4c file#/home/camelia/rakudo-inst-1/share/perl6/lib file#/home/camelia/rakudo-inst-1/share/perl6/ve…» | ||
moritz | m: require Test; | ||
camelia | ( no output ) | ||
tony-o | i can only reproduce on 3rd party modules | 16:53 | |
[Coke] | timotimo: I love me some LRR. | ||
ugexe | must be the update to use CUR to load modules | ||
[Coke] | I am going to mail Paul and tell him. He might dig it. | ||
tony-o | i'll dig into the CUR | 16:54 | |
after this conference call | |||
moritz just had the idea for the first time to use 'perl6 -c' on a core file | |||
16:57
dakkar left
|
|||
moritz | did everybody else already use that? | 16:57 | |
ugexe | .candidates returns a hash | ||
17:06
Andrie joined
|
|||
timotimo | coke, don't install Linux on the toilet!! | 17:10 | |
17:11
diana_olhovik_ joined
|
|||
psch | r: my %h = a => a => 1, b => b => 2; %h.DELETE-KEY($_) for %h.values.map: { .keys } | 17:13 | |
17:13
leont left
|
|||
camelia | ( no output ) | 17:13 | |
..rakudo-jvm 5daff4: OUTPUT«java.util.ConcurrentModificationException in block <unit> at /tmp/tmpfile:1» | |||
psch | *that*'s what it comes down to... | ||
dalek | kudo/nom: 7662c46 | moritz++ | src/core/Iterator.pm: Try to optimize Iterator.push-exactly not to use "last" in my benchmarks, it is mostly drowned out in noise though |
17:20 | |
TimToady | m: for $[1,2,3] { .say }; .say for $[1,2,3]; | ||
camelia | rakudo-moar 5daff4: OUTPUT«[1 2 3]123» | ||
17:20
patrickz joined
|
|||
TimToady | nine: ^^^ you missed one :) | 17:21 | |
moritz | ok, this routine is the one with the second-highest exlusive (!) time in the htmlify.p6 profile: github.com/perl6/doc/blob/master/h...fy.p6#L651 | 17:23 | |
but, all it does is calling other routines | 17:24 | ||
it doesn't really do any work itself | |||
how can it use up so much exclusive time? | |||
vendethiel | moritz: the grep, etc, are considered as taking their own time? | 17:28 | |
..maybe spurt is *really* slow on your system :P | |||
moritz: "return if $name ~~ / '/' /;" <- what's wrong with eq? | 17:30 | ||
that's stupid a question, disregard it | |||
PerlJam | vendethiel: how about .... What's wrong with index()? :) | 17:33 | |
psch | r: my %h = a => 1, b => 2; for %h { %h{$_.key.uc} = $_.value ** 2 }; say %h.perl # i am starting to see how it happens \o/ | 17:34 | |
camelia | rakudo-jvm 5daff4: OUTPUT«java.util.ConcurrentModificationException in block <unit> at /tmp/tmpfile:1» | ||
..rakudo-moar 5daff4: OUTPUT«{:A(1), :B(4), :a(1), :b(2)}» | |||
vendethiel | PerlJam: sure! but "defined $name.index('/');" is starting to get long | ||
17:34
ShimmerFairy left
|
|||
psch | unfortunately i can only think of sticking the VMIterInstance into the VMHashInstance so they know they belong together | 17:34 | |
i guess i'll have to take a closer look at how moar handles that... | |||
dalek | ast: 3913af2 | TimToady++ | S0 (2 files): check that for modifier respects item |
17:37 | |
17:39
andreoss left
17:40
diana_olhovik_ left
17:41
CurtisPoe left
17:46
domidumont joined
17:47
ShimmerFairy joined
17:50
rurban left
17:51
spider-mario joined
|
|||
vendethiel | TimToady: that's one I hadn't seen | 17:55 | |
m: $[1, 2, 3].map: { .perl.say } | |||
camelia | rakudo-moar 5daff4: OUTPUT«123» | ||
vendethiel | TimToady: that breaks the one-arg rule, and the "map=for", no? | ||
17:55
_mg_ joined
18:02
Sqirrel left,
Andrie left,
Sqirrel joined
18:03
Andrie joined,
Andrie left
18:04
Andrie joined,
Andrie left,
Andrie joined
18:05
xinming left
18:06
telex left
18:07
telex joined,
Andrie left,
xinming joined
|
|||
moritz | vendethiel: spurt is its own routine too, and thus doesn't count for the exclusive time | 18:13 | |
vendethiel: and regex search for a constant substring mostly optimizes to an index() call anyway | 18:14 | ||
TimToady | vendethiel: in GLRR, methods don't pay attemtion to $ | ||
only functions | 18:15 | ||
well, and 'for'... | |||
skids | Well, $ on invocants does not matter. On additional method args it does. | 18:16 | |
vendethiel | mmh, ok. | 18:18 | |
so for = map, not .map | |||
18:19
telex left,
tokuhiro_ joined
|
|||
skids | (You can think of it as the $ being used up calling the method. And after all, $foo.a where foo has @.a is technically a violation of sigil invarience but we live with it.) | 18:19 | |
18:19
telex joined
18:24
tokuhiro_ left
|
|||
patrickz | .tell tadzik you can merge the PR now. Did some more testing and fixing and am confident this is loads better than before. | 18:26 | |
yoleaux | patrickz: I'll pass your message to tadzik. | ||
18:27
baest_ joined
18:28
baest left
18:39
meisl joined,
meisl left
18:40
domidumont left
|
|||
dalek | c: 23f2a08 | moritz++ | lib/Perl6/Documentable/Registry.pm: Htmlify: cache get-kinds |
18:45 | |
18:50
cognominal left
18:53
_mg_ left,
telex left,
telex joined
18:56
domidumont joined
19:01
telex left
19:02
telex joined
19:23
domidumont left
19:28
xfix joined
19:34
_mg_ joined
19:35
FROGGS joined
|
|||
FROGGS | hello dear sir or madam | 19:36 | |
vendethiel | \o FROGGS | 19:38 | |
hoelzro | o/ FROGGS | ||
FROGGS | o/ | ||
19:40
Sqirrel_ joined,
Sqirrel left
19:48
_mg_ left
19:50
diana_olhovik_ joined
19:51
CurtisPoe joined
|
|||
CurtisPoe | My client died. I don't know if my last question went through or not! Did I just ask a question about "is"? :) | 19:51 | |
timotimo | o/ | 19:53 | |
CurtisPoe | Did I just get warnocked on asking if I asked a question? :) | 19:54 | |
CurtisPoe guesses that most are in bed or at a pub, as they should be. | 19:55 | ||
timotimo | you did not ask a question about is before asking about asking a question about is | ||
hoelzro | o/ CurtisPoe | ||
CurtisPoe | In that case: I know that using "isa" for inheritance is a contentious issue, so rather than discuss a sore subject, is there some place I can read up on the reasoning for this? | ||
masak | can I try to make your question a bit more precise? | 19:56 | |
timotimo | i'm not sure what you mean exactly? | ||
masak | are you asking "why do people dislike class inheritance more and more nowadays?" ? | ||
timotimo | you mean using the keyword "isa" to say "this class derives from that class"? | ||
CurtisPoe | Basically, we use "is" for inheritance and "is" for traits. Traditionally, many languages use "isa" for inheritance. I find overloading the meaning to be confusing (is that a base class or a trait?), so I wanted to understand why this was done. | 19:57 | |
masak | aha. | 19:58 | |
timotimo | ah, yes, i remember at least two discussions about that thing | ||
masak | basically it's done because the advantages of deliberately confusing those two things into `is` makes for a language that's easier to learn, at the expense of a little bit of flexibility/clarity later. | 19:59 | |
uhm. that sentence almost made sense. :) | |||
what I meant to say was: confusing traits and inheritance into `is` makes for an easier-to-grok Perl 6. | |||
20:00
telex left,
telex joined
|
|||
masak | you don't have to worry about the difference when you're starting out | 20:02 | |
20:03
AlexDaniel left
|
|||
timotimo | also, having classes start with upper case and traits with lower case makes it less dangerous in actual usage | 20:03 | |
dalek | kudo-star-daily: 45a250a | coke++ | log/ (2 files): today (automated commit) |
20:04 | |
timotimo | i wonder if - at use-time of a module - we should check for name collisions between traits and classes you're importing | ||
masak | it could even be (post-)rationalized by saying that in this case, class inheritance gets to ride on the trait mechanics. | ||
timotimo: yes, that might be a good idea. | |||
timotimo | that's how i imagine it, too, masak | ||
[Coke] | timotimo: Paul says he's not got a lot of perl experience, but that it was awesome to see the LRR shirt in the wild. :) | ||
timotimo will watch the Q&A to the end now | |||
sweet, [Coke]! :) | 20:05 | ||
PerlJam | This has come up enough (is v isa), that maybe there should be an entry in the FAQ for it | ||
timotimo | and of course you can write a slang to "fix" that :) | ||
masak | timotimo: not that for that to happen in the first place, either a trait must be upper-cased, or a class must be lower-cased. which is already a nonstandard choice by the programmer. | ||
timotimo | right | 20:06 | |
masak | the fact that class inheritance is riding on the traits mechanism can even be motivated by saying that as a language, we care a lot more about traits than we do about class inheritance. | 20:08 | |
20:08
patrickz left,
telex left
20:09
telex joined
20:10
xfix left
|
|||
gfldex | r: say sprintf('%f', 1, 2); # shouldn't there be a line number with that error message? | 20:11 | |
camelia | rakudo-{moar,jvm} 7662c4: OUTPUT«Directives specify 1 argument, but 2 arguments were supplied» | ||
PerlJam | huh | 20:13 | |
looks like that's an NQP message | |||
ugexe | sprintf is nqp | 20:15 | |
TimToady | Not Quite Presentable | ||
jnthn | CurtisPoe: It's probably worth noting that in Perl 6, a trait is a compile-time call to a multi sub, and the effects of that are whatever it fancies. I have the impression Moose et al has them mean something other than that (more tied up with roles, perhaps). | ||
20:15
telex left
20:16
telex joined
20:20
tokuhiro_ joined
20:22
telex left,
telex joined
20:25
tokuhiro_ left
|
|||
timotimo | ohey jnthn :) | 20:26 | |
20:26
muraiki left,
darutoko left
|
|||
CurtisPoe | In perl5, a pragma is a package (sort of a class) and is lower-cased. Will that happen in Perl 6 and clash with traits? And will case-insensitive file systems be an issue? | 20:28 | |
timotimo | for one, most installed modules get registered in a database | 20:29 | |
so that even if the filesystem is fat16 and only allows 8.3 we can have a module called ψεπψαιστοσ | |||
it'll just get saved into "12345_hephaistos.pm6" or something | |||
20:29
Andrie joined
20:30
telex left
20:31
araujo left
|
|||
CurtisPoe | So at trait can't be applied to a class? | 20:31 | |
timotimo | traits can be applied to classes | 20:32 | |
m: class Foo is rw { has $.a; has $.b }; my $a = Foo.new; $a.a = 10; $a.b = 99; say $a.perl | |||
camelia | rakudo-moar 7662c4: OUTPUT«Foo.new(a => 10, b => 99)» | ||
CurtisPoe | So what's the difference between traits and roles? | ||
20:32
telex joined,
nowan_ is now known as nowan
|
|||
timotimo | when you "is Role", you'll just mix in the role | 20:32 | |
20:32
Alina-malina left
|
|||
timotimo | when you "is some-trait", the trait can do whatever it wants to the class | 20:32 | |
CurtisPoe | So a trait applied to a class merely applies that trait to all attributes? | ||
timotimo | no, that's only a thing "is rw" does | ||
PerlJam | CurtisPoe: after you get all of your answers, you need to blog about it :) | 20:33 | |
TimToady | you don't generally 'is' roles | ||
timotimo | give me a second | ||
oh! | |||
right, of course | |||
you generally "is SomeClass" | |||
20:33
Andrie left
|
|||
timotimo | so it's not "a trait can't be applied to classes", but "a role is usually not combined with a class using the 'is' keyword" | 20:33 | |
CurtisPoe | PerlJam: I feel very uncomfortable blogging about something in Perl 6 when it looks *wrong* to me. I love the language and right now, I don't want to scare people. | ||
timotimo | best forget about "is SomeRole" altogether :) | 20:34 | |
PerlJam | CurtisPoe: good point. I retract my suggestion to blog about it ;) | ||
20:34
Peter_R joined
|
|||
TimToady | roles are a very specific and controlled composition mechanism; traits are for cheating in any other way | 20:35 | |
we just treat inheritance as a form of cheating :) | |||
timotimo | many traits that are already built into perl6 so far are actually implemented by mixing a role into a class or into an attribute or something like that | 20:36 | |
CurtisPoe | Experienced programmers generally know that it's OK to overload behavior, but overloading semantics is a big, fat, red flag. It seems like the semantics of "is" are very heavily overloaded, so many experienced programmers are going to have an issue with this. | ||
Consider Perl 5 pseudo-hashes: years of overloading the semantics of $array[0] if it contained a hashref. Many mysterious error messages. | |||
Or consider how many C programmers would have an account_total() subroutine return a negative value on error, until negative values were suddenly allowed. Again, overloading the *semantics* shot them in the foot. | 20:37 | ||
20:38
telex left
|
|||
CurtisPoe | Thus, this looks like overloading the semantics of "is" and I am very, very confused about why this is the way it is. That's why I was hoping someone could point me to docs rather than possibly risk irritating people again :) | 20:38 | |
20:38
telex joined
|
|||
TimToady | the issue really almost never comes up in practice because traits tend to be lowercase adjectives, and classes tend to be uppercase nouns | 20:39 | |
timotimo | to give us a common base again: "is" is used both for applying traits and for deriving from classes; "does" is for applying roles | ||
CurtisPoe | (n.b. as mentioned previously, overloading behavior is fine. That's why we have polymorphism) | ||
20:39
_mg_ joined
|
|||
CurtisPoe | So what if you're writing your code in a language which doesn't distinguish between upper and lower case? | 20:39 | |
20:40
_mg_ left
|
|||
timotimo | oh, you mean a natural language with a script that doesn't have lower vs upper case? | 20:40 | |
i imagine japanese, chinese writing systems don't have something like that, and neither does hangul? | 20:41 | ||
TimToady | then you're still not as bad as all the commonly used languages that throw all words into the same namespace | 20:42 | |
20:42
espadrine left
|
|||
CurtisPoe | p6: sub ラン { say "Hi!" }; ラン() | 20:42 | |
camelia | rakudo-moar 7662c4: OUTPUT«Hi!» | ||
timotimo turned on the auto-generated captions for the Q&A, chuckles a bit, then turns it off again | 20:43 | ||
CurtisPoe | I don't mean to be rude, but is the official position of Perl 6 "if you use a language that doesn't have a concept of case, too bad"? | 20:44 | |
timotimo | definitely not | ||
CurtisPoe | s/language/writing system/ | ||
timotimo | you are not forced to use upper vs lower case for classes vs traits at all | ||
m: class lowercaseclass { }; my $a = lowercaseclass.new; say $a.perl | |||
camelia | rakudo-moar 7662c4: OUTPUT«lowercaseclass.new» | ||
TimToady | maybe if you use a language that doesn't distinguish adjectives from nouns | 20:45 | |
20:45
telex left
|
|||
timotimo | if your language is Oog!, you'll run into a tiny bit of trouble | 20:45 | |
CurtisPoe | But that means one developer writes a trait named ラン and another one writes a class named ラン and their code breaks. | ||
timotimo | because we don't allow whitespace in these names | ||
PerlJam | TimToady: and you know programmers are a strange lot ... they may adjectivify nouns or noun adjectives or something too. | ||
20:45
telex joined
|
|||
timotimo | well, that one developer would have to import that trait into the same piece of code that also uses the class | 20:45 | |
CurtisPoe | Or a language which has adjectives which have the same meaning as nouns which have the same meaning as verbs :) | 20:46 | |
timotimo | based on your insights, i've suggested we make a compile-time warning or error available that complains when traits and classes collide like that | ||
TimToady | it's all declaration time, anyway, and you have to know the names that have been declared, so it's not a run-time confusion | ||
timotimo | so the code won't break in a surprising way | ||
CurtisPoe | timotimo++ | ||
timotimo | we should RT that | ||
i'm not going to build that right now | |||
CurtisPoe | I'm OK if it's a warning and not a compile time failure. | 20:47 | |
It's rare enough that it seems like a reasonable compromise. | |||
CurtisPoe is sorry for beating a half-dead horse. | |||
timotimo | no worries :) | 20:48 | |
TimToady | well, it might be a half-dead unicorn... | ||
20:48
diana_olhovik_ left
20:50
liztormato joined
|
|||
CurtisPoe | Or a one-winged butterfly ... :) | 20:50 | |
20:50
zacts left
20:51
diana_olhovik joined
|
|||
TimToady | m: class Foo :rw { has $.foo }; | 20:51 | |
camelia | rakudo-moar 7662c4: OUTPUT«===SORRY!===Cannot invoke this object» | ||
PerlJam | Also note that you could create a slang to distinguish trait application and class inheritance. | ||
TimToady | we also have this syntax in reserve for disambiguation | 20:52 | |
since types take precedence over traits | |||
20:55
[Sno] left
|
|||
timotimo | that looks like how you declare inheritance in cpp | 20:55 | |
20:57
kaare_ left
20:58
diana_olhovik left,
zacts joined
21:03
skids left
|
|||
jdv79 | i'm lost but cool. CurtisPoe++ for entertainment value. | 21:04 | |
21:05
lizmat joined,
liztormato left
21:08
cognominal joined
21:15
dha joined
|
|||
dalek | ast: e788818 | usev6++ | S14-roles/mixin.t: Add tests for RT #119925 |
21:15 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=119925 | ||
lizmat | good *, #perl6! | ||
yoleaux | 09:36Z <jnthn> lizmat: if you're reliably seeing S17-supply/start.t passing now, then maybe rt.perl.org/Ticket/Display.html?id=125460 can be closed... I've not seen it fail since my recent fixes in Moar. | ||
11:04Z <jnthn> lizmat: I think the .push/.pop error improvements in List have busted make test (54-lib.t) | |||
bartolin | o/ lizmat | ||
lizmat | hmmm... I did spectest the changes to List.push etc. not the "make test" :-( | 21:16 | |
bartolin o/ | |||
jdv79 | lizmat: o/ | ||
home yet? | |||
lizmat | jdv79 o/ | ||
nope... in Erlangen at the moment | |||
tomorrow we'll be driving home... | 21:17 | ||
bartolin | lizmat: I created a PR to fix 54-use-lib.t | ||
21:17
rindolf left
|
|||
dalek | kudo/nom: 1e58fc6 | usev6++ | t/01-sanity/54-use-lib.t: Adjust tests to improved error reporting After commit 86ddca2003 the tests in question die with X::Immutable |
21:18 | |
kudo/nom: 38c94bd | lizmat++ | t/01-sanity/54-use-lib.t: Merge pull request #533 from usev6/x_immutable Adjust tests to improved error reporting |
|||
lizmat | hmmm... essentially the tests I added to roast :-) | ||
bartolin | :-) | ||
jdv79 | mmm.. franconia. not far from Shlenkerla and the like | 21:19 | |
vendethiel | CurtisPoe++ as well. That was a fun ride ('cept not a unicorn one) | ||
dha | Do while loops still allow for a LABEL, and, if so, do we want to make a point of documenting that? | ||
yoleaux | 03:13Z <[Coke]> dha: looks like search is working again | ||
dha | \o/ | ||
Also, should the section in control.pod on return/while and return/until be after C<while> and C<until>'s documentation? | 21:20 | ||
jdv79 | i'll be in munich tomorrow for the fest | 21:23 | |
timotimo | the münchenfest? | ||
jdv79 | yes, i've never been | 21:26 | |
timotimo | oktoberfest* | ||
jdv79 | w/e | ||
timotimo | i heard there's lots and lots and lots of passed out drunks on all the streets | 21:27 | |
jdv79 | i hope there's enough room to step between the then | 21:28 | |
*them | |||
dalek | ast: 5f01fa1 | usev6++ | S02-literals/listquote.t: Fix test which dies with X:Immutable now |
||
timotimo | i hope you'll have a proper place to sleep instead | ||
jdv79 | i'll take pictures | ||
i have booked a hostel | 21:29 | ||
21:29
[Sno] joined
|
|||
masak | dha: yes, `while` loops allow for a label. and `next`/`redo`/`last` work in them, with and without labels. | 21:35 | |
m: L1: while False {}; while True { last L1 }; say "alive" | |||
camelia | rakudo-moar 7662c4: OUTPUT«No exception handler located for last_label» | ||
masak | that error message could probably be improved :) | 21:36 | |
21:36
colomon left
|
|||
dha | Great. In the meantime I'm going to write general while/until docs, and leave a TODO for labels. | 21:36 | |
masak | I know it's a lexotic thing, but we can see L1 from that `last` | ||
21:37
colomon joined,
telex left,
telex joined
|
|||
dha | ok, basic while/until docs. gist.github.com/dha/0a0736b9da74a8e61e49 | 21:40 | |
tony-o | just wrote an article discussing some of the higher level problems with parallel testing that Green addresses, and how it addresses them for anyone interested. j.mp/parallel-testing | 21:47 | |
dalek | ast: 6a475d4 | lizmat++ | S02-types/hash.t: Adapt error message checking to new message |
21:49 | |
21:51
rurban joined
|
|||
dalek | osystem: 9cc7454 | tony-o++ | META.list: Green, a parallel testing option Check it out. |
21:53 | |
21:54
camelia left
21:55
camelia joined
21:57
ChanServ sets mode: +v camelia
|
|||
grondilu | m: multi infix:<[+]>(Range $r) { .Int given ($r.min + $r.max)*($r.max - $r.min + 1) }; say [+] 1 .. 10; | 21:58 | |
camelia | rakudo-moar 38c94b: OUTPUT«55» | ||
grondilu | oops, meant prefix:<[+]>, but that can't work apparently. | 21:59 | |
m: multi prefix:<[+]>(Range $r) { .Int given ($r.min + $r.max)*($r.max - $r.min + 1) }; say [+] 1 .. 10; | |||
camelia | rakudo-moar 38c94b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6_XUTILSxuCalling prefix:<[+]>(int) will never work with any of these multi signatures: (Range $r)at /tmp/6_XUTILSxu:1------> 3 + $r.max)*($r.max - $r.min + 1) }; say 7⏏5[+] 1 .. 10;» | ||
grondilu | (also, forgot to divide by two. Nevermind) | 22:00 | |
flussence | m: multi prefix:<[+]>(Range $r) is looser(&infix:<..>) { .Int given ($r.min + $r.max)*($r.max - $r.min + 1) }; say [+] 1 .. 10 | 22:01 | |
camelia | rakudo-moar 38c94b: OUTPUT«110» | ||
grondilu | oh cool | ||
flussence | wait, that doesn't seem right... | ||
grondilu | as I wrote, I forgot to divide by two | ||
m: multi prefix:<[+]>(Range $r) is looser(&infix:<..>) { .Int given ($r.min + $r.max)*($r.max - $r.min + 1) div 2 }; say [+] 1 .. 10 | 22:02 | ||
camelia | rakudo-moar 38c94b: OUTPUT«55» | ||
flussence | there we go :) | ||
grondilu | I was wondering if that's the kind of optimization mentionned in ROADMAP: | ||
3 ** Optimizing multis for `[+] 1..10` and `[<=] 1..10` etc. | |||
TimToady | well, that's gonna be a bit of a problem | ||
dalek | kudo/nom: 425845d | lizmat++ | src/core/Whatever.pm: Make Whetever.new == Inf True It occurred to me that we have many places in the core setting where we are checking for whether a value is either Whatever or Inf. It also occurred to me that adding a Numeric method for Whatever would make such a check much easier, because it would just allow you to say: sub a($value) { say "foo" if $value == Inf } and pass either a(*) or a(Inf) would give the desired effect. Before applying this new capability, I thought I'd get it out in the world first. |
||
TimToady | m: multi prefix:<[+]>(Range $r) is looser(&infix:<..>) { .Int given ($r.min + $r.max)*($r.max - $r.min + 1) div 2 }; say [+] 1,2,3,4,5,6,7,8,9,10 | ||
camelia | rakudo-moar 38c94b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wBvmcAgLkGCalling prefix:<[+]>(int) will never work with any of these multi signatures: (Range $r)at /tmp/wBvmcAgLkG:1------> 3max)*($r.max - $r.min + 1) div 2 }; say 7⏏5[+] 1,2,3,4,5,6,7,8,…» | ||
tony-o | TimToady: you in the city on october? | ||
s/on/in/ | |||
TimToady | yup | ||
grondilu | m: say (1, 2, 3).WHAT | ||
camelia | rakudo-moar 38c94b: OUTPUT«(List)» | 22:04 | |
grondilu | ^it's not a RAnge | ||
tony-o | i may drive down for that, lots of good riding plus i can heckle you | ||
TimToady | mebbe I should figure out what a "Release Talk" should say | ||
tony-o | how long is that session planned for? | 22:05 | |
TimToady | actual talk is 1 hour, but social stuff around it | ||
lizmat wonders what city this city is | 22:06 | ||
grondilu | m: multi prefix:<[+]>(Range $r) is looser(&infix:<..>) { .Int given ($r.min + $r.max)*($r.max - $r.min + 1) div 2 }; multi prefix:<[+]>($l) { reduce * + *, $l }; say [+] 1,2,3,4,5,6,7,8,9,10 | ||
camelia | rakudo-moar 38c94b: OUTPUT«12345678910» | ||
tony-o | san francisco lizmat | ||
lizmat | ah, that city :-) | ||
22:06
hernanGOA left
|
|||
grondilu | m: multi prefix:<[+]>(Range $r) is looser(&infix:<..>) { .Int given ($r.min + $r.max)*($r.max - $r.min + 1) div 2 }; multi prefix:<[+]>($l) is looser(&infix:<,>) { reduce * + *, $l }; say [+] 1,2,3,4,5,6,7,8,9,10 | 22:06 | |
camelia | rakudo-moar 38c94b: OUTPUT«12345678910» | ||
cognominal | tales of the city... | 22:07 | |
grondilu | m: multi prefix:<[+]>(Range $r) is looser(&infix:<..>) { .Int given ($r.min + $r.max)*($r.max - $r.min + 1) div 2 }; multi prefix:<[+]>(*@l) is looser(&infix:<,>) { reduce * + *, @l }; say [+] 1,2,3,4,5,6,7,8,9,10 | ||
camelia | rakudo-moar 38c94b: OUTPUT«12345678910» | ||
grondilu gives up | |||
tony-o | i've lived in this area too long, rarely ever hear it called san francisco | ||
cognominal | en.wikipedia.org/wiki/Tales_of_the_City | ||
tony-o | cognominal: nice | 22:08 | |
cognominal | I am not from SF but I have read them all. | ||
well not all, apparently there are new ones. | 22:09 | ||
grondilu | m: say .elems given 1, [\*] 1..* | ||
camelia | rakudo-moar 38c94b: OUTPUT«2» | ||
grondilu | hum, the usual expression for factorial is not GLR-friendly | 22:10 | |
m: say .elems given 1, |[\*] 1..* | |||
camelia | rakudo-moar 38c94b: OUTPUT«Cannot .elems a lazy list in block <unit> at /tmp/OHZv3bAwT3:1Actually thrown at: in block <unit> at /tmp/OHZv3bAwT3:1» | ||
grondilu | m: say .elems given my @ = 1, |[\*] 1..* | ||
camelia | rakudo-moar 38c94b: OUTPUT«Cannot .elems a lazy list in block <unit> at /tmp/uV4mpu4rPt:1Actually thrown at: in block <unit> at /tmp/uV4mpu4rPt:1» | ||
22:12
vendethiel left
22:15
bbkr joined,
bbkr_ left
|
|||
dalek | kudo/nom: b3a7722 | lizmat++ | src/core/IO/Handle.pm: :eager is a noop for IO::Handle.lines now |
22:16 | |
22:16
dha left
22:18
Skarsnik left
|
|||
grondilu | m: constant fact = 1, [\*] 1 .. *; say fact[6] | 22:19 | |
camelia | rakudo-moar 38c94b: OUTPUT«Nil» | ||
grondilu | m: constant fact = 1, |[\*] 1 .. *; say fact[6] | ||
camelia | rakudo-moar 38c94b: OUTPUT«720» | ||
masak | 'night, #perl6 | 22:20 | |
TimToady | m: constant fact = [\*] 1, 1, 2, 3 ... *; say fact[6] | 22:24 | |
camelia | rakudo-moar 38c94b: OUTPUT«720» | ||
22:26
TEttinger joined,
FROGGS left
|
|||
grondilu | TimToady: I'm surprised infix:<...> finds a logical sequence here | 22:28 | |
22:29
Alina-malina joined
|
|||
grondilu | m: constant fact = [\*] 1, 1, 2 ... *; say fact[6] | 22:29 | |
camelia | rakudo-moar 425845: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VjhafoIf7jAn exception occurred while evaluating a constantat /tmp/VjhafoIf7j:1Exception details: Unable to deduce arithmetic or geometric sequence from 1,1,2 (or did you really mean '..'?) i…» | ||
grondilu has no idea how infix:<...> works | 22:30 | ||
TimToady | it considers only the final 3 | ||
grondilu | ok | ||
it's a better expression then, but it looks a bit magical | |||
TimToady | probably slower too | ||
tony-o | have you ever been heckled TimToady ? | 22:33 | |
TimToady | certainly | ||
though usually not maliciously | 22:34 | ||
timotimo | so only by accident? | ||
TimToady | "Never attribute to malice..." | 22:35 | |
timotimo | This repr (malice) doesn't support attribute access | 22:38 | |
22:42
skids joined
22:44
cognominal left
|
|||
lizmat | sleep& | 22:49 | |
22:52
LordVorp joined
|
|||
psch | hrm | 22:54 | |
22:54
telex left
|
|||
psch | after a few hour break and some looking at moarvm it seems i have to understand the uthash code to figure out how they prevent breaking on changing-while-iterating | 22:55 | |
i don't *really* feel up for that, neither in the short- nor mid-term :P | |||
i mean, i'm focusing on the jvm backend for a reason... | |||
22:55
telex joined
|
|||
timotimo | because it's so simple | 22:56 | |
22:56
kanishka joined
|
|||
psch | ...is that sarcasm? | 22:56 | |
timotimo | i think so | ||
psch | :P | ||
22:57
bbkr_ joined
|
|||
psch | i'm a bit weary of just stuffing bits onto VMHashInstance that (probably) wouldn't conform with any sixmodel interface | 22:57 | |
but that's the only way i can think of to make this work out | |||
as in, in the end it could be as easy as telling every VMHashInstance about all VMIterInstances that exist that access it | 22:58 | ||
22:58
LordVorp left
|
|||
psch | but 1) that's *probably* not particularly 6model-y 2) it might be noticeable overhead | 22:58 | |
i'm guessing here, but uthash probably was chosen because it allows (let's call it) async access to hash elements | 22:59 | ||
and the jvm doesn't allow that, which is why we can't iterate over a hash while changing it | |||
or rather, the other way around - change it while iterating over it | |||
...maybe moar is wrong here? (one can hope...) | 23:00 | ||
timotimo doesn't know uthash does anything to prevent trouble when accessing concurrently | |||
23:00
bbkr left
|
|||
timotimo | i expect it'd break spectacularly if you use it non-well | 23:00 | |
psch | r: my %h = a => 1, b => 2; for %h { %h{$_.key.uc} = $.value * 2 }; say %h.perl | ||
camelia | rakudo-{moar,jvm} b3a772: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileVariable $.value used where no 'self' is availableat /tmp/tmpfile:1------> 3b => 2; for %h { %h{$_.key.uc} = $.value7⏏5 * 2 }; say %h.perl expecting any of: term» | ||
psch | r: my %h = a => 1, b => 2; for %h { %h{$_.key.uc} = $_.value * 2 }; say %h.perl | 23:01 | |
camelia | rakudo-moar b3a772: OUTPUT«{:A(2), :B(4), :a(1), :b(2)}» | ||
..rakudo-jvm b3a772: OUTPUT«java.util.ConcurrentModificationException in block <unit> at /tmp/tmpfile:1» | |||
timotimo | oh, modification while iterating | ||
not modification from multiple threads | |||
psch | yeah | ||
timotimo | yeah, no clue. but that can certainly be done | ||
psch | i agree | 23:02 | |
timotimo | it's just that you may end up skipping things | ||
like you skipped A and B there :P | |||
23:02
telex left
|
|||
psch | but on jvm it means every VMHashInstance has to know all the VMIterInstances that iterate over it | 23:02 | |
timotimo | otherwise it would have been :A(4) :B(8) | ||
psch | ...or we copy | ||
huh | |||
maybe that works | 23:03 | ||
instead of creating an iterator for the HashMap we actually iterate over, we create it for a clone of that HashMap | |||
which should give the same semantics | |||
23:04
telex joined
|
|||
psch | well, it seems to build nqp fine at least :) | 23:06 | |
if this works i might fix 3+ test files with 7 chars :P | |||
which would somewhere between 50 and 400 tests vOv | 23:07 | ||
timotimo | ".clone" is 6 chars | ||
hmm | 23:08 | ||
psch | oh, 8 chars then | ||
'cause java, which means explicit () | |||
timotimo | ah | ||
of course | |||
psch | the reason for the range of tests is that failures in e.g. S02-types/bag.t abort the rest of the tests | ||
but not all tests that are aborted suffer from this bug | 23:09 | ||
timotimo | right, that's often problematic | ||
i wonder why this is A Thing now and wasn't before? | |||
psch | probably because the Seq code changed something | ||
timotimo | did we grab the full list of keys or pairs before? | ||
psch | star-j: say "hi" | ||
camelia | star-j 2015.03: OUTPUT«Error occurred during initialization of VMCould not reserve enough space for object heapError: Could not create the Java Virtual Machine.Error: A fatal exception has occurred. Program will exit.» | ||
psch | :/ | ||
yeah, glr code boils down to this: | 23:10 | ||
r: my %h = a => a => 1, b => b => 2; %h.DELETE-KEY{$_} for %h.values.map: { .keys } | |||
camelia | rakudo-{moar,jvm} b3a772: OUTPUT«Cannot call DELETE-KEY(Hash); none of these signatures match: (Any:U $:, *%_) (Any:D $:, *%_) (Hash:U $: *%_) (Hash $: \key, *%_) (Hash $: \key, :$SINK!, *%_) in block <unit> at /tmp/tmpfile:1» | ||
psch | err | ||
r: my %h = a => a => 1, b => b => 2; %h.DELETE-KEY($_) for %h.values.map: { .keys } # this | |||
camelia | ( no output ) | ||
..rakudo-jvm b3a772: OUTPUT«java.util.ConcurrentModificationException in block <unit> at /tmp/tmpfile:1» | |||
23:10
Alina-malina left
|
|||
psch | i'd guess before we had Seq that map got all the keys first, cached them and then iterated and deleted | 23:10 | |
timotimo | 'k | 23:11 | |
psch | didn't check history for that though, so that's really just a guess | ||
but now the .map builds a Seq | |||
and yeah, somehow that gets in its own way | |||
i still don't completely get where and why | |||
23:12
spider-mario left
|
|||
psch | interestingly the tests for <BagHash (&) Array[Str]> is what brought this up :P | 23:12 | |
which maybe means "can be change hashes (or other collection-y types) while iterating over them" is under-tested | 23:13 | ||
s/ be / we / | |||
23:15
thou left
|
|||
ShimmerFairy | I thought I'd look up the COMPOSE phaser (since I know it's NYI), but the spec only says "when a role is composed into a class" on it. That doesn't help much :( (are you supposed to put it in the role, class, or either/both? What if it's in the wrong spot? And what's it meant to help with?) | 23:18 | |
psch | ShimmerFairy: from what i remember, i thought it to be put into the role, useful to check for what the class already .^can, for example | 23:19 | |
ShimmerFairy: that's just my interpretation of course, and i suspect TimToady probably has a more descriptive concept :) | |||
psch runs a spectest | 23:20 | ||
ShimmerFairy | weird, because some of rakudo's core types have a "# XXX should be COMPOSE" comment in their classes, where they implement ^parameterize_role | ||
(which would at least suggest that it's not _quite_ as simple as "in a role only" ☺) | 23:21 | ||
psch shrugs | 23:22 | ||
23:22
telex left
|
|||
psch | you said yourself the design docs aren't particularly detailed :) | 23:22 | |
23:22
telex joined
|
|||
psch | (maybe s/detailed/helpful/, to be pedantic :P ) | 23:22 | |
ShimmerFairy | there's more documentation on a separate-seeming COMPOSE thingy for module exports :P | ||
23:24
Peter_R left
23:27
AlexDaniel joined
|
|||
timotimo | ShimmerFairy: a bit further up in the backlog, jnthn showed how to have mutator methods for attributes that return self so they can be chained | 23:46 | |
it uses a method compose that gets overriden | |||
(or is that method ^compose?) | |||
timotimo goes to bed | |||
psch | progress \o/ | 23:47 | |
only 88/200 tests in bag.t failed | 23:48 | ||
instead of 156/200 | |||
ugexe | modules installed with CURLI cause an error when use'd/require'd now :( | 23:49 | |
psch | i'll leave the rest of spectest to hack and also go to bed o/ | 23:50 | |
23:55
cognominal joined
23:57
tokuhiro_ joined
|