»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by moritz on 25 December 2014. |
|||
lue | "half stumbles to the place on the floor here the gun is." missing 'w' in 'where' | 00:01 | |
00:02
BenGoldberg_ joined
|
|||
masak | lue: fixed. lue++ | 00:02 | |
00:03
eternaleye left
00:04
dj_goku joined,
dj_goku left,
dj_goku joined
|
|||
lue | "the aim is to produce something a Perlish macro system" did you mean "something of a" ? | 00:05 | |
masak | removing the "something". | 00:06 | |
geekosaur | or something resembling... | ||
00:06
Ben_Goldberg left
|
|||
lue | masak++ I love how it starts out as perfectly serious, then halfway through instantly breaks down into something silly :) | 00:08 | |
masak | \o/ | ||
timotimo just watched Airplane! with friends | |||
good times | |||
00:10
eternaleye joined
|
|||
b2gills | m: say 5 ~~ Int:D; say 5 ~~ Int:U; # I wonder if this can be easily made to work by adding adverbs to &infix:<~~> | 00:13 | |
camelia | rakudo-moar e37eb0: OUTPUT«TrueTrue» | ||
masak | b2gills: that... seems like an odd way to implement it... | ||
b2gills: what about `my $t = Int:U; say 5 ~~ $t;` ? | 00:14 | ||
00:22
rurban left
|
|||
masak | b2gills: also, what about all the places where smartmatching is used, but not infix:<~~>? where clauses, when statements...? | 00:23 | |
00:34
virtualsue joined
00:43
tgt left
|
|||
masak | 'night, #perl6 | 01:02 | |
01:02
Ben_Goldberg joined
01:03
eternaleye left
|
|||
dalek | kudo/nom: 285435e | TimToady++ | src/core/Any.pm: use object hashes for .classify and .categorize |
01:03 | |
kudo/nom: 20c0958 | TimToady++ | src/core/Signature.pm: internal use of .classify needs object semantics |
|||
kudo/nom: 949d82c | TimToady++ | src/ (2 files): make :{} mean object hash |
|||
01:06
BenGoldberg_ left
01:09
eternaleye joined
|
|||
dalek | ecs: 1159122 | TimToady++ | S03-operators.pod: describe :{} object hash composer |
01:17 | |
01:22
Mso150 joined
|
|||
dalek | kudo/nom: 989bb60 | TimToady++ | src/core/Hash.pm: make :{} symbol available to rest of setting |
01:24 | |
vendethiel | seems useful :D | 01:25 | |
TimToady | m: say :{}.perl | 01:41 | |
camelia | rakudo-moar 949d82: OUTPUT«:{}» | ||
01:41
virtualsue left
|
|||
TimToady | m: say :{ 0 => 42, 1 => 43 }{0} | 01:42 | |
camelia | rakudo-moar 949d82: OUTPUT«42» | ||
TimToady | m: say :{ 0 => 42, 1 => 43 }<0> | ||
camelia | rakudo-moar 949d82: OUTPUT«(Any)» | ||
vendethiel | is "custom indexing" implemented in rakudo? | 01:43 | |
TimToady | m: say (^100).classify(* % 7).perl | ||
camelia | rakudo-moar 949d82: OUTPUT«Hash[Any,Any].new(2 => [2, 9, 16, 23, 30, 37, 44, 51, 58, 65, 72, 79, 86, 93], 5 => [5, 12, 19, 26, 33, 40, 47, 54, 61, 68, 75, 82, 89, 96], 0 => [0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98], 4 => [4, 11, 18, 25, 32, 39, 46, 53, 60, 67, 74, 8…» | ||
TimToady | not yet | ||
hmm | 01:44 | ||
m: say (^100).classify(* % 7).item.perl | |||
camelia | rakudo-moar 949d82: OUTPUT«:{4 => [4, 11, 18, 25, 32, 39, 46, 53, 60, 67, 74, 81, 88, 95], 3 => [3, 10, 17, 24, 31, 38, 45, 52, 59, 66, 73, 80, 87, 94], 0 => [0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98], 1 => [1, 8, 15, 22, 29, 36, 43, 50, 57, 64, 71, 78, 85, 92, 99], …» | ||
TimToady | yeah, has to be item to get :{} form back out of it | 01:48 | |
m: .say for (^100).classify(* % 12).sort | 01:50 | ||
camelia | rakudo-moar 949d82: OUTPUT«0 => 0 12 24 36 48 60 72 84 961 => 1 13 25 37 49 61 73 85 972 => 2 14 26 38 50 62 74 86 983 => 3 15 27 39 51 63 75 87 994 => 4 16 28 40 52 64 76 885 => 5 17 29 41 53 65 77 896 => 6 18 30 42 54 66 78 907 => 7 19 31 43 55 67 79 918 =>…» | ||
TimToady | \o/ (numeric sort) | ||
01:52
kaare__ left
|
|||
timotimo | i don't really know what an object hash is? | 01:57 | |
TimToady | a hash of objects rather than strings | 02:00 | |
Any --> Any rather than Str --> Any | |||
02:02
BenGoldberg_ joined
02:04
eternaleye left
02:06
Ben_Goldberg left
|
|||
timotimo | oh | 02:10 | |
of course | 02:11 | ||
these are useful very often | |||
02:16
eternaleye joined,
tinyblak joined
|
|||
JimmyZ | moritz: Thanks :) | 02:39 | |
02:57
kjs_ joined
03:01
Sqirrel left
03:02
Sqirrel joined
|
|||
dalek | ast: b5e1723 | TimToady++ | S32-list/categorize.t: update to use new :{} notation |
03:02 | |
TimToady | forgot to check that one in... | ||
03:03
Ben_Goldberg joined,
eternaleye left
03:06
BenGoldberg_ left
03:09
erdic left
03:10
erdic joined
03:17
eternaleye joined
03:18
Patterner joined
03:19
gfldex left
03:22
Psyche^ left
03:43
leont left
|
|||
novice777 | Does anyone knows best(good?) TrueType Unicode font for Windows console with the wide range support of character code tables? | 03:48 | |
03:54
kjs_ left
|
|||
TimToady | dunno about windows; on linux I use the font 'Monospace' augmented with Aegean.ttf Aegyptus_B.ttf Aegyptus_R.ttf Akkadian.ttf Analecta.ttf Anatolian.ttf Gardiner.ttf HAN NOM A.ttf HAN NOM B.ttf Maya.ttf Musica.ttf Symbola.ttf Unidings.ttf | 03:54 | |
03:58
noganex_ joined
04:01
noganex left
04:02
eternaleye left
04:12
Mso150 left
04:13
eternaleye joined
|
|||
raydiak | iirc dejavu mono has above-average unicode coverage...download is a ttf, iirc that installs just fine in windows | 04:15 | |
04:18
telex left
04:20
telex joined
|
|||
raydiak | I think "Monospace" means "use the system's default mono font" usually | 04:22 | |
geekosaur | yes, it's a font alias and usually mapped to bitstream vera mono or dejavu mono | 04:53 | |
04:56
Rounin joined
|
|||
geekosaur | vera sans mono that is | 04:56 | |
raydiak | panda doesn't work on rakudo more than a few months old since the reporter branch merge | 05:00 | |
wonder if rakudobrew build-panda should at least take an optional arg for a commit so you can build older pandas with older rakudos | 05:02 | ||
05:04
eternaleye left
05:08
KCL_ joined
05:10
eternaleye joined
05:21
kurahaupo1 joined
05:43
eternaleye left,
eternaleye joined
05:45
Ben_Goldberg left
05:52
novice777 left
06:03
rindolf joined
06:05
eternaleye left
06:06
eternaleye joined
|
|||
japhb | masak++ # github.com/masak/007/blob/master/README.md | 06:10 | |
06:15
Rounin left
06:21
booly-yam-4706 left
06:24
Rounin joined
06:30
tinyblak left,
tinyblak joined
06:55
keyle joined
06:56
Akagi201 joined
06:58
keyle left,
tinyblak_ joined
07:01
booly-yam-4706 joined,
tinyblak left
|
|||
dalek | c: 5be61c2 | skids++ | lib/Type/EnumMap.pod: Remove old caveat about operator adverbs .{}:exists has worked in rakudo for some time now |
07:06 | |
07:12
booly-yam-4706 left
07:15
darutoko joined,
Rounin left
07:25
xfix joined
07:39
kaare__ joined
|
|||
moritz | m: enum A <b c>; say A.^mro; say b.^mro | 07:50 | |
camelia | rakudo-moar 989bb6: OUTPUT«(A) (Int) (Cool) (Any) (Mu)(A) (Int) (Cool) (Any) (Mu)» | ||
moritz | m: enum A <b c>; say A.^roles; say b.^roles | 07:51 | |
camelia | rakudo-moar 989bb6: OUTPUT«No such method 'roles' for invocant of type 'Perl6::Metamodel::EnumHOW' in block <unit> at /tmp/uGmEMJDYcU:1» | ||
moritz | m: enum A <b c>; say b.^roles | ||
camelia | rakudo-moar 989bb6: OUTPUT«No such method 'roles' for invocant of type 'Perl6::Metamodel::EnumHOW' in block <unit> at /tmp/QynMOU3Zr_:1» | ||
moritz | m: enum A <b c>; say $_ ~~ Enumeration for A, b | ||
camelia | rakudo-moar 989bb6: OUTPUT«FalseFalse» | ||
07:52
rindolf left
07:54
kurahaupo1 left
|
|||
moritz | masak++ # 007 REAMDE | 08:01 | |
08:05
prime left
08:06
prime joined
|
|||
moritz | m: enum A <b c>; say b.pick | 08:09 | |
camelia | rakudo-moar 989bb6: OUTPUT«b» | ||
moritz | m: enum A <b c>; say A.pick | ||
camelia | rakudo-moar 989bb6: OUTPUT«c» | ||
08:23
kurahaupo1 joined
|
|||
dalek | c: ea577db | moritz++ | lib/Type/Supply.pod: Document Supply.from-list |
08:24 | |
08:34
booly-yam-4706 joined
08:35
vendethiel left
08:36
vendethiel joined
|
|||
dalek | q: bb96233 | moritz++ | answers.md: Expand a bit on private attributes set from a constructor |
08:38 | |
q: 5aecccd | moritz++ | answers.md: Explain numierc types, and which ones to use as type constraints |
|||
08:45
gfldex joined
08:46
booly-yam-4706 left
|
|||
dalek | q: bb42933 | moritz++ | answers.md: Linkify some types |
08:49 | |
q: e0a4272 | moritz++ | answers.md: Link to container docs |
08:52 | ||
08:57
kurahaupo1 left
09:14
booly-yam-4706 joined
09:22
Rounin joined
09:24
kurahaupo1 joined,
rurban joined
09:26
molaf__ joined
09:30
molaf_ left
09:34
adu joined
09:48
kurahaupo1 left
09:55
Alina-malina left
|
|||
dalek | q: 9c47517 | moritz++ | answers.md: Mention gradual typing |
09:58 | |
10:01
booly-yam-4706_ joined
10:02
booly-yam-4706 left
10:08
adu left
10:12
Alina-malina joined
10:14
tinyblak_ left,
tinyblak joined
10:20
spider-mario joined
10:30
FROGGS joined,
anaeem1 joined
10:34
espadrine joined
|
|||
FROGGS | moritz: I get a service timeout for the dalek webhook :o( | 10:57 | |
moritz: is this the correct url? hack.p6c.org/dalek?t=freenode,perl6-lwp-gsoc | |||
11:03
jluis_ joined
|
|||
FROGGS | ohh, found it at: github.com/perl6/mu/blob/master/mi...k-push.txt | 11:08 | |
moritz | \o/ docs++ | 11:09 | |
FROGGS | indeed :o) | 11:11 | |
11:13
anaeem1 left
11:14
denis_boyun_ joined
11:15
anaeem1 joined
|
|||
jnthn | afternoon, #perl6 | 11:24 | |
FROGGS | hi jnthn | 11:25 | |
lizmat | FROGGS jnthn o/ | 11:29 | |
11:30
pmurias joined
|
|||
FROGGS | hi lizmat | 11:31 | |
jnthn is well rested and mostly free of cold o/ | 11:32 | ||
...and still has a BS bug /o\ | |||
dalek | kudo/nom: 20d5ef3 | lizmat++ | / (4 files): Introduce Rangeint: simple integer ranges like ^10 Is not used in the core (yet). The idea being that the whole range machinery is not needed for simpel integer ranges like ^10 or 200..500. Bolting on will need to wait until some bugs are fixed. |
11:33 | |
lizmat | jnthn FROGGS: need some nqp:: functions related help | 11:34 | |
do you see anything obviously wrong in Rangeint.BUILD ? | |||
jnthn | Not immediately. | 11:36 | |
Other than it's one of the unsubclassable ones 'cus it breaks the normal contract. | 11:37 | ||
11:37
denis_boyun_ left
|
|||
lizmat | well, it's supposed to be an internal class, to be used only if Range.new sees it's possble to use | 11:37 | |
jnthn | For these cheating ones it may be better to write them as !BUILD | ||
lizmat | ok | 11:38 | |
jnthn | Ah, then fair enough...but it will leak out due to .WHAT of course. | ||
lizmat | $ 6 'my $r = Rangeint.new(0,9); say $r.flat.perl' | ||
This type does not support positional operations | |||
jnthn: yes, but ~~ Range should be True | |||
jnthn | $!list := nqp::null(); | ||
null doesn't support positional operations... | |||
:P | |||
I wonder if there's a missing guard... | 11:39 | ||
lizmat | so, I want $!list to be populated only when needed | ||
FROGGS | --ll-exception will at least point you to the offending line... | 11:40 | |
jnthn | yeah, I can see...I'm not sure where it's not being done | ||
11:40
booly-yam-4706_ left
|
|||
jnthn | lizmat: How much overhead does the "is this an Int range" stuff actually have? | 11:41 | |
I thought we already special-cased this inside of Range. | |||
lizmat | not much, really | ||
and there's all the include/exclude min checks | 11:42 | ||
that Rangeint doesn't have | |||
reification | |||
at_pos wouldn't need to reify, e.g. | 11:43 | ||
jnthn | Yes, your class missed reify | ||
*misses | |||
lizmat | nope, it has one | ||
self.flat | |||
jnthn | ah, I see | ||
lizmat | but I'm not sure that just shouldn't return anything | 11:44 | |
especially since we don't need reification for at_pos | |||
jnthn | Still, I don't know we should be handling this with type explosion. | ||
Rather than the "stash a closure that knows how to reify" approach we're looking at for the GLR. | 11:45 | ||
lizmat | at startup, already 6 Range objects are created, all that could be handled by this class | ||
jnthn | Yes, but at startup 50% of our time is spent deserializing. | ||
Well, 50% of our CPU cycles. | |||
And adding more types/methods doesn't help that, if we're looking at startup cost. | |||
lizmat | so you're saying this is a bad idea? | 11:46 | |
11:46
rindolf joined
|
|||
lizmat | any slice with a range should become much faster with this as well | 11:46 | |
jnthn | Yeah,b ut when do we slice integer ranges? | 11:47 | |
*but | |||
The really simple iteration cases like "for ^1000 { }" should already be getting re-written by the optimizer to while loops. | 11:48 | ||
lizmat | in the core, in Termporal | ||
jnthn | Line? | ||
lizmat | 198, 206, 215 | ||
but I'm more thinking about ecosystem doing @a[^10] and stuff | 11:49 | ||
ok, that's for the exception | |||
jnthn | Yes, those are for exceptions | ||
For ^10 note that if we were a little smarter we could constant-fold ^10 | 11:50 | ||
But now I see you meant slicing *with* a range, not slicing the range itself. | |||
lizmat | ah, yes, sorry for the unclarity | ||
jnthn | np | ||
lizmat | anyway, doing an at_pos on a range like this wouldn't need reification | 11:51 | |
jnthn | But don't we .at_pos($_) for @the-param-that-has-the-range ? | ||
lizmat | there's quite a lot ^$var in the core | 11:52 | |
jnthn | multi sub postcircumfix:<[ ]>( \SELF, Positional:D \pos ) is rw { | 11:53 | |
nqp::iscont(pos) | |||
?? SELF.at_pos(pos.Int) | |||
!! POSITIONS(SELF,pos).map({ SELF[$_] }).eager.Parcel; | |||
}So the range is passed to POSITIONS | |||
And overload of POSITIONS on Range might be the easier place to get a win? | 11:54 | ||
lizmat | well, that would be the next step: if pos is a Rangint | 11:55 | |
jnthn | The whole POSITIONS mechanism - introducing a chain of 2 maps once you include the one in the postcircumfix:<[ ]> method - looks not entirely cheap | ||
lizmat | I'm open to suggestions :-) | ||
remember, it also needs to handle nested arrays / hashes and attributes | 11:56 | ||
11:56
tgt joined
|
|||
lizmat | the fact that we need to make so many different MMD candidates is also something that may need some scrutiny | 11:56 | |
11:57
kjs_ joined
|
|||
jnthn | Attributes? | 11:59 | |
lizmat | yup | ||
FROGGS | in case I have an xml attribute: <foo:bar xmlns:foo="kungfoo"/> - what should be the .name? | ||
I'd tend to "bar", but I dunno is that's too lax | 12:00 | ||
jnthn | lizmat: Example? | ||
lizmat | multi sub postcircumfix:<[ ]>( \SELF, int $pos, :$delete!, *%other ) is rw { | 12:01 | |
moritz | FROGGS: it could be 'bar' or 'foo:bar' | ||
jnthn | lizmat: Adverbs? | ||
lizmat | multi sub postcircumfix:<[ ]>( \SELF, int $pos, :$exists!, *%other ) is rw { | ||
multi sub postcircumfix:<[ ]>( \SELF, int $pos, :$kv!, *%other ) is rw { | |||
FROGGS | moritz: yes, the question is: "foo:bar" to be more strict by default, or should it be "bar" ? | ||
arnsholt | FROGGS: Isn't there an answer to that in the XML standards? | ||
lizmat | jnthn: etc etc | ||
FROGGS | moritz: and... in case it is "bar", what's the long form? .fq-name? .longname? ... | 12:02 | |
jnthn | Right, but I see no attributes there...I can only guess you are talking about the adverbs. In which case, yes. | ||
FROGGS | arnsholt: no idea | ||
lizmat | sorry, yes, adverbs | ||
*sigh* :-( | |||
FROGGS | the P5 lib has .name as "foo:bar", and "bar" is .localname | ||
jnthn | FROGGS: And presumably .namespace or so for getting the foo? | 12:03 | |
FROGGS | .ns, aye | ||
there is .ns.prefix (will change it to .ns.name probably), and .ns.uri and some more | |||
jnthn | lizmat: On the upside, each of the multi candidates is quite short and isn't doing much in the way of introspection. | ||
arnsholt | Yeah, I think that's the correct way | ||
FROGGS | arnsholt: with .localname? | 12:04 | |
lizmat | jnthn: yes, that's why it's that way | ||
otherwise a lot of checks would need to be done inside a single candidate | |||
FROGGS | arnsholt: the naming in libxml2 is quite inconsistent and weird btw... | 12:05 | |
lizmat | jnthn: re code size: Range could become smaller, as no special casing for Int would be needed there anymore | ||
I also wonder whether adding MMD for infix:<..> and friends would help | 12:07 | ||
FROGGS | arnsholt: do you have any resources at that about a good naming scheme? | ||
arnsholt | Don't have any good references, sorry | ||
But "local name" sounds familiar | 12:08 | ||
FROGGS | yeah, it sounds sane in some way | ||
12:10
KCL joined
12:11
denis_boyun_ joined
|
|||
moritz | can somebody recommend a book on evidence-based software engineering practices? | 12:12 | |
I've come across " Making Software: What Really Works, and Why We Believe It" by Andy Oram and Greg Wilson | |||
it looks interesting, but also pretty heterogenous (many authors) and rather thick | 12:13 | ||
12:13
KCL_ left
|
|||
moritz | something more condensed would be very welcome | 12:13 | |
(unless you all recommend it very highly) | |||
FROGGS | I can't recommend anything | 12:14 | |
pmurias | masak: 007 will only have integers? | 12:19 | |
masak | good afternoon, #perl6 | 12:22 | |
pmurias: I imagine so, yes. | |||
I'm glad y'all like the README.md :) | |||
it was fun to write. | 12:23 | ||
here it is again for those who missed it: github.com/masak/007/blob/master/README.md | |||
pmurias: floats and complex numbers are not really on the critical path to exploring macros ;) | 12:25 | ||
12:26
Rounin left
|
|||
arnsholt | +1 to that =) | 12:27 | |
pmurias | adding float support with macros could prove informative ;) | ||
12:31
kjs_ left
|
|||
masak | well, there's a thought there that I keep returning to: "adding support for [data type X], using macros" | 12:36 | |
but I usually reach the conclusion that it's not that feasible. and probably the wrong tool for the job. | |||
macros are good for adding syntax, keywords, and influencing control flow. | |||
they're not that good at runtime things, like values and their types. | 12:37 | ||
12:37
pmurias left
|
|||
moritz | well, maybe for floating point literals | 12:40 | |
arnsholt | Yeah. You can add pretty much whatever you want with macros (cf. TeX), but it might not always be the best way to go about it (cf. TeX, again =) | 12:43 | |
12:44
zakharyas joined
|
|||
masak | moritz: literals should be fine, as long as I implement macro term:<...> | 12:45 | |
moritz: the problem is more on the other end: what should such a macro emit? | 12:46 | ||
12:47
mr-foobar left
|
|||
arnsholt | Same thing as an expression macro, no? | 12:47 | |
masak | it seems reasonable to reply "sign, mantissa, and exponent, encapsulated in a suitable data structure". in 007, arrays could do that, but then you'd have to somehow distinguish a "normal" array value from one that pretends to encode a float. | ||
arnsholt | Oh, that kind of "what should it emit". Never mind me | 12:48 | |
masak | and (crucially) the whole runtime has to make that distinction, which turns the change into a nastily global one. | ||
hence "not that feasible". | |||
moritz | well, just add (primitive) custom types to the language | ||
arnsholt | Well, you could always ignore that particular aspect of the problem | 12:50 | |
moritz | round to the nearest integer :-) | ||
arnsholt | In Perl 6 a new literal would for example create an instance of a class, but 007 can very well choose to ignore problems of typing | 12:51 | |
New datatypes simply being lists under the hood is very much in the Lisp tradition, after all =) | |||
12:52
Rounin joined
|
|||
moritz | how does lisp folks distinguish the various data types that are all implemented as lists? | 12:56 | |
arnsholt | They don't, necessarily | 12:57 | |
My thought is that 007 can just ignore typing concerns like that. In Perl 6 the existing type system should be fine, I think | 12:58 | ||
13:01
zakharyas left
13:03
denis_boyun_ left
|
|||
moritz | news.ycombinator.com/item?id=8906331 another discussion about the "Why Perl Didn't Win" article from last year | 13:03 | |
13:08
kjs_ joined
13:09
Ben_Goldberg joined
13:10
Ben_Goldberg left
13:11
Ben_Goldberg joined
|
|||
rurban | moritz: Just an old rehash from the typical perl6 killed perl5 mindset | 13:17 | |
not a really original and educated post | 13:18 | ||
13:21
booly-yam-4706_ joined
|
|||
woolfy | moritz: what rurban said, plus, please don't read that shit, it is what makes me depressed every so often, and makes me unfriend people on Facebook and ignore people on irc... | 13:23 | |
moritz: I will not ignore you, just be clear! | |||
moritz | woolfy: now I'm glad | 13:24 | |
jnthn | Well, it seems the thing I ran into with the mixin stuff has been discovered by lizmat++ before... | 13:31 | |
irclog.perlgeek.de/perl6/2014-06-26#i_8936466 and irclog.perlgeek.de/perl6/2013-08-30#i_7523993 | |||
Took me multiple hours to get to the bottom of what I think is going on... | 13:32 | ||
And now I want lunch. But at least we might get a fix for a more general issue out of this, even if it's blocking the stuff I actually want to be doing. :) | |||
lizmat | that's always good :-) | ||
jnthn | Aye. Will see if I can fix it post-eating. :) | 13:33 | |
13:33
denis_boyun_ joined
|
|||
rurban | t/spectest.data seems to be not adjusted yet: Missing test file: t/spec/S32-list/uniq.t | 13:35 | |
woolfy: It's not shit. that's the bad reality out there. we need to educate the people | 13:36 | ||
JimmyZ we will keep silent on that | 13:37 | ||
woolfy | rurban: it becomes shit when Perl-people start believing that they are working in a dead or dying language, and start iterating it to other Perl-people, utterly de-motivating developers on the way... | ||
JimmyZ | *hopes we | ||
lizmat | rurban: you need a more recent rakudo then | 13:38 | |
it *is* in there now | |||
moritz | it's unique.t now | ||
lizmat | if you want a quick fix, symlink it locally to unique.t | ||
rurban | I've got the new test, saw it. just got this warning also | 13:41 | |
13:44
leont joined
|
|||
moritz | lizmat: S17-lowlevel/lock.t is commented out in t/spectest.data -- is that as a flapper? | 13:48 | |
lizmat | yes | ||
13:54
virtualsue joined
|
|||
masak | arnsholt: you opened my eyes a bit. if I just give up and accept that (a) my float is an array, (b) if people want to misuse it, they can -- then I can basically have macros implement floats. | 13:55 | |
even better, that works for any data type. I could even build a MOP that way. | 13:56 | ||
vendethiel | *g* | ||
arnsholt | Welcome to Lisp! ;) | ||
masak attempts to implement custom operators, which are all but switched on in 007 already | 13:57 | ||
how does one say "commit to this rule" again? was that `::` ? | 13:59 | ||
m: grammar G { rule foo { OH :: HAI } }; say "alive" | 14:01 | ||
camelia | rakudo-moar 20d5ef: OUTPUT«===SORRY!=== Error while compiling /tmp/SkWOK0AkRH:: not yet implementedat /tmp/SkWOK0AkRH:1------> grammar G { rule foo { OH ::⏏ HAI } }; say "alive"» | ||
masak | oh, you've got to be *kidding* me. | ||
masak adds a bunch of red cells to perl6.org/compilers/features | 14:02 | ||
n: grammar G { rule foo { OH :: HAI } }; say "alive" | |||
camelia | niecza v24-109-g48a8de3: OUTPUT«(signal ABRT)Stacktrace: at <unknown> <0xffffffff> at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_string (intptr,intptr,int) <0xffffffff> at (wrapper alloc) object.AllocString (intptr,int) <0xffffffff> at string…» | ||
masak | Niecza is feeling a bit under the weather. but I bet it implements `::`. | 14:03 | |
14:07
beastd joined
|
|||
dalek | atures: a807c94 | masak++ | features.json: [features.json] add "::" Currently NYI in Rakudo (though I think we had it before, sometime pre-ng). |
14:08 | |
nwc10 | Double colon LTA? stopper | 14:09 | |
masak | nwc10: see evals above. | 14:10 | |
oh, "LTA". hm. | |||
"LTM", hold on :) | |||
it would be nice if we could stop LTA sometimes... | |||
jnthn | masak: You can use {} to terminate LTM. | ||
dalek | atures: 06ae482 | masak++ | features.json: [features.json] s/LTA/LTM/ typo nwc10++ |
14:11 | |
masak | jnthn: thanks. I'll try that. | ||
jnthn: is the behavior *exactly* identical? can we use the `{}` semantics to implement `::` ? | |||
jnthn | masak: I don't think it's identical, no, it's just that they are equally good at LTM termination and that's what, afaik, STD relies on it for. | 14:12 | |
lizmat | m: say 1.5 ~~ 1^..^2 # this is a bit of a WAT to me | ||
camelia | rakudo-moar 20d5ef: OUTPUT«True» | ||
FROGGS | no, it differs wrt backtracking IIRC | ||
jnthn | masak: Which is largely why it didn't get implemented yet, I guess; there's a workaround that's usually good enough. :) | 14:13 | |
lizmat: Why? | |||
masak | lizmat: then we have different understandings of what 1^..^2 means. | ||
jnthn | m: say 1 ~~ 1^..^2 | ||
camelia | rakudo-moar 20d5ef: OUTPUT«False» | ||
jnthn | m: say 1 ~~ 1..^2 | ||
camelia | rakudo-moar 20d5ef: OUTPUT«True» | ||
masak | lizmat: does it help if you think of it as an intercal on the real line? | ||
jnthn | Looks like it does what I want. | ||
*I'd | |||
masak | interval* | ||
lizmat | I guess I'm thinking too much int :-) | 14:14 | |
jnthn | .oO( COME FROM the_real_line ) |
||
masak | lizmat: with the ^ thingies excluding *only* one real number. | ||
lizmat | yeah, gotcha | ||
masak | jnthn: my reason for adding it to the compiler comparison table is *purely* to shame us all into implementing it. the fact that we once had the feature only makes it more depressing that we don't now. | 14:15 | |
14:15
eternaleye left
|
|||
jnthn | masak: I don't remember us having it, tbh. | 14:17 | |
masak: It hasn't been there so long as I've been aware of the regex engine internals, at least. | |||
nwc10 | masak: so I guessed right that there was someting LTA with the "LTA"? :-) | 14:23 | |
14:26
spider-mario left
14:29
tinyblak_ joined
14:32
anaeem1 left
14:33
tinyblak left
|
|||
FROGGS | masak: btw, I was thinking about implementing ::, :::, ::::, <cut> and <commit>... but after reading the spec carefully I shuddered | 14:33 | |
my regex engine backtracking foo is not good enough | |||
14:37
anaeem1_ joined
|
|||
masak | "fu". | 14:53 | |
jnthn | "fu2!" :P | 14:55 | |
jnthn has sorted out his flights for FOSDEM o/ | 14:56 | ||
14:56
denis_boyun_ left
|
|||
lizmat | ;-) | 14:56 | |
14:56
kurahaupo joined
|
|||
jnthn | Arrive (well, plane lands) at 1pm on the 30th | 14:56 | |
lizmat | well in time for delirium tremens | 14:58 | |
jnthn | ;) | ||
Only if I finished writing my talk! | 14:59 | ||
lizmat | :-) | ||
15:00
BenGoldberg joined
15:02
zakharyas joined
|
|||
masak .oO( sorry about slides 26..51 being all shaky-like. that's as far as I got before the delirium tremens ) | 15:05 | ||
15:07
kjs_ left
|
|||
masak | m: grammar G { regex TOP { <foo> }; proto rule foo {*}; rule foo:one { sub {} foo }; rule foo:two { \w+ \w+ } }; say ?G.parse("sub bar") | 15:08 | |
camelia | rakudo-moar 20d5ef: OUTPUT«True» | ||
itz | delirium tremens? that's a cafe in Belgium isn't it? :) | ||
yoleaux | 17 Jan 2015 20:24Z <lizmat> itz: what happened to szabgab's post on pl6anet.org ? | ||
masak | if the `{}` commits the parse to foo:one, shouldn't the above parse fail? | ||
itz | lizmat: it came back | ||
masak | itz: it's also a beer. www.ratebeer.com/beer/delirium-tremens/1039/ | ||
15:14
kurahaupo left
|
|||
lizmat | itz: I'm not seeing any of them? | 15:15 | |
jnthn | masak: I didn't say it commits, I said it terminates LTM. | 15:16 | |
masak: As in, ends, the declarative prefix | |||
lizmat | itz: Delirium is the bar where people hang out the night before FOSDEM | ||
masak | jnthn: hm. ok. | ||
how do I make a rule commit at some point, and fail the whole parse if the rule fails? | |||
lizmat | itz: deliriumcafe.be | 15:17 | |
jnthn | The Perl 6 grammar usually does something like 'sub' [ ...what we want... || <.panic: 'OH NOES'> ] } | ||
masak | ok, that works, I guess. | ||
jnthn | Well, it also means you get a good error. :) | ||
masak | right. | 15:18 | |
15:21
rurban left
|
|||
dalek | kudo/6pe-mop: f21a64c | jnthn++ | src/Perl6/ (2 files): Keep compiler callbacks in place during optimizer. The optimizer may trigger compilation of things that it calls - in the setting because it defines many built-ins, but also in normal code that uses, for example, 'is pure'. This prevents us from removing fixup infrastructure too early. A pre-requisite for fixing problems with multis that get run during compilation when a subclass has derived the proto. |
15:22 | |
15:24
brrt joined
|
|||
brrt | (i suppose most of you have seen the 'why perl didn't win' article now) | 15:24 | |
does it make sense to even write and post a counterargument? | 15:25 | ||
lizmat | brrt: it's old news | ||
but feel free to :-) | |||
brrt | :-) | ||
15:25
rurban joined
|
|||
moritz | brrt: it's from Aug 2014 | 15:25 | |
brrt | o really? | ||
itz | lizmat: I'm seeing szabgab's feed now .. I assume his server was down at some point yesterday since it wasn't displayed then | ||
moritz | brrt: just now on hackernews again | ||
itz | I've found avoiding perl postings on mainstream tech sites a good idea particularly if it's "old news" from last year | 15:26 | |
brrt | i'll brb. the weakness of that argument is that it focuses only on the programmers, as if they're making the decisions | 15:27 | |
:-) | |||
15:28
denis_boyun_ joined,
kurahaupo joined
15:31
brrt left
15:34
denis_boyun_ left
|
|||
lizmat | jnthn: what's the 2nd parameter to p6parcel for ? | 15:36 | |
ENODOC :-( | |||
jnthn | lizmat: "Replace nulls with this value", iirc | ||
lizmat | ah, ok | ||
15:38
denis_boyun joined
|
|||
lizmat | m: class A is Range { has int $.a }; nqp::getattr(A.new(0,10),A,q/$!a/) # sort of expect this to work | 15:45 | |
camelia | rakudo-moar 20d5ef: OUTPUT«No such method 'BUILD' for invocant of type 'A' in method new at src/gen/m-CORE.setting:8278 in block <unit> at /tmp/f5MACDNJqR:1» | ||
lizmat | oops | 15:46 | |
15:46
BenGoldberg left
|
|||
jnthn | Yes, that's the danger of non-standard new, BUILD, etc. | 15:46 | |
lizmat | no, locally I get another error | 15:47 | |
P6opaque: no such attribute '$!a' | |||
JimmyZ | I think somewhere is using = for nqp:create, it want := | 15:49 | |
jnthn | Hm, mixin caching helps a bit. 100,000 mixins benchmark now runs in a tenth of the time it used to. :) | ||
lizmat | :) | ||
JimmyZ: hmmm.... | 15:51 | ||
15:52
denis_boyun left
15:54
grondilu joined
|
|||
jnthn | m: say 13866276 - 12781785 | 15:56 | |
camelia | rakudo-moar 20d5ef: OUTPUT«1084491» | ||
jnthn | Wow, 1MB off CORE.setting from the mix-in re-use too | ||
Turns out we generated a LOAD of them. | |||
Because of using them to add precedence info. | 15:57 | ||
15:57
booly-yam-4706_ left
15:58
leont left
|
|||
jnthn | And a bit more than 3MB off the process base memory. | 15:58 | |
And some spectest fails. Aww. | 16:00 | ||
arnsholt | jnthn++ # smo-pe | 16:01 | |
dalek | kudo/6pe-mop: aa14b2a | jnthn++ | src/Perl6/World.nqp: Track and update clones of uncompiled coderefs. This happens if a proto method in a base class is cloned as part of deriving a proto for a subclass, and afterwards the proto in the base class was invoked before the compilation process was over. The lack of update led to a problem locating the appropriate static code object during serialization. |
16:02 | |
kudo/6pe-mop: 4c52df6 | jnthn++ | src/Perl6/Metamodel/ (2 files): Implement per-class mixin cache. Uses the 6model parametric extensions to handle the interning of them. We get some spectest failures out of this, though they may be showing up an existing, somewhat hiding, bug. On the upside: 100,000 mixins benchmark runs in 10% of the time, CORE.setting shrinks by 1MB, and perl6 -e "loop { }" has over 3MB knocked off it too. |
16:06 | ||
jnthn | Hm, curious. | 16:13 | |
role R { }; class C { }; for ^100000 { C.new.^mixin(R) } # runs in 0.93s, including startup | |||
role R { }; class C { }; for ^100000 { C.new does R }; # 4.78s | 16:14 | ||
timotimo | "does" causes global deopt, but ^mixin doesn't? | ||
jnthn | What does does do? | ||
timotimo: Nope. | |||
16:14
xfix left
|
|||
jnthn | It's the VM-level changetype op that triggers it. | 16:14 | |
timotimo | mhm | 16:15 | |
is 6pe-mop at spectest success again? :) | |||
jnthn | No. | ||
But it's not going to be a merge candidate for a while. | 16:16 | ||
timotimo | oh | ||
OK | |||
jnthn | Since 6pe will need to be up to scratch on Moar and JVM, and at least not regression-inducing on Parrot. | 16:17 | |
Plus the mixin cache thing is just the easiest thing I could do to start giving it some exercise. | 16:18 | ||
Other things I'll be doing with it include coercion types, typed array/hash improvements, and it's also one ingredient for native arrays. | 16:21 | ||
And hopefully fixing various role-related pre-comp bugs along the way. :) | 16:22 | ||
jnthn away for a bit | |||
timotimo | ah, yes of course | 16:23 | |
i'm only interested in the moar aspect at the moment :P | |||
because i'm also interested in what can possibly be achieved with spesh | |||
16:27
pmurias joined
|
|||
pmurias | jnthn: is 6pe something that I should be concered about for nqp-js? | 16:27 | |
16:30
KCL left
16:33
jluis_ left
16:37
KCL_ joined
16:38
mr-foobar joined
16:47
virtualsue_ joined
16:49
virtualsue left,
virtualsue_ is now known as virtualsue
|
|||
psch | hi #perl6 \o | 16:49 | |
16:50
telex left,
salv0 left
|
|||
psch | FROGGS: i had had a look at the composetype op a bit ago, but i don't quite see how to work that into what i have | 16:52 | |
16:52
telex joined
|
|||
FROGGS | well, I don't know what you have :o) | 16:52 | |
psch | github.com/peschwa/rakudo/blob/jav...JavaHOW.pm | 16:54 | |
although that's probably the wrong-ish aproach in at least one other aspect - namely the new op near the bottom | |||
should probably do that similar to how we do other types, i.e. declare them in BOOTSTRAP | |||
i've tried throwing more MOP-roles at it and that didn't help... :P | 16:55 | ||
arnsholt | The composetype op is basically to send information from Perl 6 land to the REPR instance. Not sure if that's what you need or not | 16:57 | |
psch | basically, what i'm trying is to write the JavaHOW in Perl6 instead of NQP, so i can access other Perl6-level types to automatically get accessors to native fields | ||
and do this automatically: gist.github.com/peschwa/0f8830ba3c6a2eb852ba | 16:58 | ||
for which the first step is having JavaHOW in the CORE.setting instead of inside the Metamodel, if i understood jnthn++ correctly | 16:59 | ||
masak | "What does does do?" is a screwey sentence. :) | ||
arnsholt | Use-mention is always a bit weird =) | 17:00 | |
psch: Right. Not really composetype, I agree | 17:01 | ||
I'm not really familiar with what is required for a HOW in Perl 6, but probably a liberal application of nqp::ops and a certain amount of care in whether the objects you're working with are NQP or Perl 6 objects | 17:02 | ||
masak | arnsholt: speaking of use-mention: twitter.com/wokingwriter/status/55...7844271105 (#autopun) | ||
vendethiel | psch: "@methods[+@methods] =" isn't there a .push? | 17:04 | |
psch | vendethiel: yes, there is, but that's a VMArray iirc | 17:05 | |
vendethiel | makes sense, noted | ||
FROGGS | psch: look at this example: github.com/perl6/nqp/blob/master/t...pes.t#L115 | ||
arnsholt | masak: Oooh, I love it! | ||
FROGGS | psch: forget about the serialization bit... but line 132 is rather important I bet | ||
psch | FROGGS: so compose attaches the Method to the type and makes it invokable? | 17:06 | |
(among other things) | |||
FROGGS | psch: I think so.... you can test what happens if you comment out that line and runt the test | 17:07 | |
arnsholt | Not quite, I think | ||
The call to HOW.compose isn't the composetype | 17:08 | ||
FROGGS | ohh | ||
arnsholt | Grep for composetype in src/Perl6/Metamodel for examples | ||
FROGGS | I thought so and that's why I mentioned composetype in the first place | ||
arnsholt | Also: github.com/perl6/nqp/blob/master/d...l.markdown | 17:09 | |
psch | that's another thing, JavaHOW.nqp has "method is_composed($obj) { 1 }", and .^add_method works | ||
FROGGS | (on an unrelated note, XML::LibXML now has working xpaths...) | ||
psch | simply running the same code in CORE.setting instead of from the Metamodel gives me the mentioned "no such postcircumfix:<( )> for type 'Method'" | ||
17:09
salv0 joined
|
|||
arnsholt | Those are the things the standard 6model REPRs understand. You are of course free to add new things to your own REPR | 17:09 | |
psch | which also means there's no .invoke | ||
*on Method | 17:10 | ||
17:15
booly-yam-4706_ joined
|
|||
psch | i now wonder if i actually was justified in writing add_method myself in the JavaHOW instead of does'ing MethodContainer... currently running build will tell i suppose | 17:21 | |
lizmat | .oO( what does does and but do? ) |
17:27 | |
masak: ^^^ | |||
moritz | m: say Submethod ~~ Method | 17:28 | |
camelia | rakudo-moar 20d5ef: OUTPUT«False» | ||
17:29
booly-yam-4706_ left
|
|||
masak just saw whiteknight.github.io/2015/01/15/pa...heend.html | 17:31 | ||
haven't read it yet. | |||
moritz | m: class A { submethod x() { say 42 } }; say A.^can("x").perl | ||
camelia | rakudo-moar 20d5ef: OUTPUT«()» | ||
moritz | is that correct? | ||
masak | m: class A { submethod x { say 42 } }; A.new.x | ||
camelia | rakudo-moar 20d5ef: OUTPUT«42» | 17:32 | |
masak | moritz: I'd say "no", since you can call it. | ||
vendethiel | should "can" take another parameter, for private method, or for walking the inheritance chain? | ||
17:32
anaeem1_ left
|
|||
masak | is that a separate question? submethods are not private. | 17:33 | |
17:33
anaeem1 joined
|
|||
vendethiel | that's an idea | 17:33 | |
masak | if you ask me, it makes little sense to ask .can questions about the non-public interface of an object. | ||
moritz | vendethiel: there are ways to walk private methods through the MOP if you really want/need to | 17:34 | |
like .^find_private_method($name) and .^private_method_table | 17:35 | ||
walking the MRO makes little sense for that, because they aren't inherited | |||
17:35
spider-mario joined
17:37
kjs_ joined,
anaeem1 left
17:40
mvuets joined
17:43
rmgk is now known as Guest85303,
rmgk_ joined,
Guest85303 left,
rmgk_ is now known as rmgk
17:46
Vlavv_ joined
17:48
anaeem1_ joined
17:50
Rounin left
|
|||
dalek | c: 91e654e | moritz++ | type-graph.txt: type graph: s:g/"Perl6::Metamodel"/Metamodel/ |
18:00 | |
18:06
anaeem1_ left,
booly-yam-4706_ joined
|
|||
dalek | c: 2c651c3 | moritz++ | lib/Type/Metamodel/ClassHOW.pod: more s:g/"Perl6::Metamodel"/Metamodel/ |
18:06 | |
18:06
anaeem1 joined
18:07
anaeem1 left
18:08
anaeem1 joined
|
|||
jnthn | pmurias: (6pe) Yes, but you may want to wait for the dust to settle a bit more before porting it. | 18:08 | |
18:11
booly-yam-4706_ left,
pnu left
18:12
araujo joined,
araujo left,
araujo joined,
clkao_ left,
pnu joined,
booly-yam-4366 joined,
clkao joined
|
|||
jnthn | About | 18:13 | |
m: class A { submethod x() { say 42 } }; say A.^can("x").perl | |||
camelia | rakudo-moar 20d5ef: OUTPUT«()» | ||
jnthn | Pretty sure that one has to be a bug. | ||
I can easily imagine how it'd happen too :) | |||
RT it; it's likely a very easy fix. | |||
cooking & | |||
masak RTs it | |||
did Parrot "kick [Rakudo] out" of the Parrot repo? that's not quite how I remember it. | 18:16 | ||
lizmat | context? | ||
ah, I see it | 18:17 | ||
18:19
Sqirrel left
|
|||
masak | reading the postmortem of a Parrot developer is a little bit like reading something from a mirror world. | 18:20 | |
because I'm so squarely placed in the Perl 6 side of things. | |||
18:21
regreg joined
|
|||
masak | as Perl 6 people we can say "oh well, things might not always have evolved as quickly or as successfully as we hoped/planned -- but at least we're not Parrot" | 18:21 | |
lizmat++ # "Edsel" meme, "everything to everybody" | 18:22 | ||
18:22
Sir_Ragnarok left
|
|||
masak | another thought: many in the Parrot project saw the benefit that could have been gained by re-hosting on top of 6model. they didn't have the skills to invent 6model (or similar) in the first place, but they saw the advantages of it. but even as they wanted to move to it, *they were unable to do so* -- due to some unknown mix of technical debt and lack of tuits. | 18:25 | |
18:25
booly-yam-4366 left
|
|||
masak | I also note that WhiteKnight's Parrot postmortem has basically the same dark shade of grey background as does Dan's Parrot postmortem :) | 18:26 | |
apparently, that's the background to do it in. | |||
18:27
Akagi201_ joined
|
|||
timotimo | i'm not sure i remember dan's parrot postmortem | 18:28 | |
18:28
Akagi201 left
|
|||
skids | That's just the background for the site. I actually wish liht text on dark was more popular I find it better on my eyes. | 18:31 | |
timotimo | skids: i recommend "hacker vision" chrome plugin | 18:32 | |
skids | Maybe I'll give that a spin. Certainly we are long past the day when you can just set browser colors and expect anything functional to happen. | 18:33 | |
18:33
FROGGS_ joined,
grondilu left
|
|||
masak | skids: I know it's the background for the site. I still thought it was a weird coincidence. | 18:33 | |
skids: maybe Parrot bloggers like that background color. | |||
18:35
kurahaupo left,
booly-yam-4366 joined
|
|||
masak | "What I do know is that we *did have the good ideas*, we just weren’t able to implement them correctly or quickly enough." -- I think this sums it up. all of it. | 18:35 | |
18:36
FROGGS left
|
|||
masak | I said something similar back in 2011. irclog.perlgeek.de/perl6/2011-08-23#i_4316480 | 18:37 | |
I *think* M0 was their 6model effort? don't recall exactly. it had something to do with a very small core. | |||
vendethiel | masak: I actually first thought it was the same post :P (I never read whiteknight's) | 18:40 | |
lizmat | timotimo: dan's post mortem was about PONIE: www.sidhe.org/~dan/blog/archives/000435.html | ||
or not? hmmm.. apparently it *was* about parrot | 18:41 | ||
masak | it was about Parrot. | ||
18:42
Sqirrel joined
|
|||
lizmat | this was the PONIE one, by Jesse Vincent: www.nntp.perl.org/group/perl.ponie....sg487.html | 18:42 | |
masak | by the way... assume the Parrot people at some (surely distant) moment wishes to announce the end of the Parrot project. how *do* they do that, given that the project has that name and, yes, is based on that sketch? it'd have to be a helluva convincing announcement. | 18:43 | |
TimToady | they obviously would have to do it on April 1st | ||
pity we probably can't get to beta by then... | 18:44 | ||
pmurias | rurban is still working on parrot... | ||
skids | I'm sure that was just a funny hypothetical. | 18:45 | |
TimToady | well, we're not really into shooting our wounded, more like "them's as falls behind, gets left behind" | 18:46 | |
rurban | Mo or lorito is a llvm-like bytecode project, small core, based on the assumption that parrot is fast and c not. ha! | 18:47 | |
And the parrot people who destroyed it already left, So they cannot announce anymore that they failed. | 18:49 | ||
But there still good stuff in it, which can be revived. Esp. threads are good. Better than moar, the rest is better in moar | |||
18:49
adu joined
|
|||
masak | rurban: I keep seeing absolutely zero evidence that Parrot threads are better in any way at anything. | 18:52 | |
timotimo | i'm looking forward to a demonstration :) | ||
rurban | masak: maybe you should about it then? | 18:53 | |
the demos are out there since 2012, showing linear, lockfree performance. show me that in another vm. | |||
esp for arrays and hashes | 18:56 | ||
adu | "about it"? | ||
rurban: is "about" a verb? | 18:57 | ||
rurban | read about it | ||
adu | ah | ||
rurban | "Those who cannot read need to walk" | 18:58 | |
adu | writing is good too | ||
masak | rurban: can you link me to some Perl 6 code running on Parrot showing off this nice threading? | 18:59 | |
rurban: I'll happily look at any URL you give me. | |||
rurban | Perl6 does not yet support parrot threading | 19:00 | |
And I don't know enough nqp to write it by myself | 19:01 | ||
adu | blog.klocwork.com/user-documentatio...better-fm/ | ||
rurban | The easy to read part is this one: perl6advent.wordpress.com/2012/12/...t-threads/ | 19:03 | |
with winxed and pir samples | |||
masak | rurban: there is *no* Perl 6 code making use of Parrot's allegedly awesome threading!? | 19:04 | |
rurban | you are the perl 6 coders. I'm just maintaining parrot | 19:05 | |
masak | rurban: all this time since 2012, no-one has bothered to show off the fantastically impressive threading *on Parrot* by making it work on Perl 6? | ||
rurban | nobody cared | ||
and I doubt that perl6 has enough competence in this field to see the bigger picture | 19:06 | ||
there was a famous flamefest initiated by diakopter when we added native threads | |||
masak | what language is threading awesome in, then? PIR? | ||
timotimo | froggs tried at one point to make something work with parrot threading, was it hypers and math or something? | ||
19:07
booly-yam-4366 left
|
|||
rurban | and the original author never defended his work, so it stayed | 19:07 | |
19:07
anaeem1 left
|
|||
rurban | in parrot of course, not comparable to moars' locked, conservative threading. moar locks on everything | 19:07 | |
adu | rurban: I care | ||
rurban | so add it | ||
adu | I'm busy working on slangs | 19:08 | |
pmurias | masak: from an outsider perspective a lot of the parrot folk loved pir | ||
19:08
anaeem1_ joined
|
|||
rurban | but it's a bit tricky, because you need to track the owner and schedule writer tasks for all updates, if you are not the owner. only owner may write | 19:09 | |
all clients who want to write need to do it via little updaters | |||
so it's basically lockfree but not wait free. | 19:10 | ||
19:12
booly-yam-4366 joined
19:14
zakharyas left
|
|||
timotimo | so it's basically asynchronous? | 19:14 | |
masak | rurban: "I am the best chess player in the world. it's just that I don't want to play with other chess players." | 19:15 | |
pmurias | isn't it a crude for of software transactional memory | 19:17 | |
masak | rurban: if Parrot has super-awesome threading, and Rakudo is arguably the only client that ever gained any foothold to speak of on Parrot, and Rakudo can't exploit Parrot's threading model, then Parrot effectively doesn't have super-awesome threading. | ||
19:21
kjs_ left
|
|||
skids | Is it that Rakudo "can't" or that it "hasn't"? | 19:22 | |
masak | the latter, surely. | ||
19:22
booly-yam-4366 left
|
|||
lizmat | jnthn: I'm trying to establish whether the ^100 -> while $i optimization is being done | 19:22 | |
but apparently it doesn't even enter "optimize_for_range" in Optimizer.nqp ? | |||
pmurias | masak: pir is also a parrot client | 19:23 | |
FROGGS_ | my parrot threading tests in nqp resulted in a single cpu core use... because lexical access is only possible from the main thread | ||
rurban | because nqp uses its own broken lexpad implementation | ||
FROGGS_ | you can use more cores, but that only works for operations that can be done without lexicals (and adding two bigints uses the lexical &infix:<+>) | 19:24 | |
masak | pmurias: from my perspective, PIR seems to me to be pessimal for both human authoring and code generation. it might be the single biggest concrete mistake that got perpetuated as a component of Parrot. | ||
pmurias: and no, I do not consider it a client. I consider it technical debt. | |||
timotimo | lizmat: --target=ast and --target=optimize should be a good entry point to figuring out if/whether an optimization is happening | ||
though i'd say a tool that can diff trees like that more "prettily" or "domain-knowledgingly" would be helpful | 19:25 | ||
pmurias | rurban: have you looked at STM (software transactional memory)? | ||
19:27
booly-yam-4366 joined
|
|||
rurban | we looked into it some decades ago, yes. | 19:27 | |
lizmat | timotimo: if I do an "nqp::say" in optimize_for_range, it should show up when optimizing, no ? | ||
rurban | it's documented in the threads pdd somewhere | ||
timotimo | it should, aye | 19:28 | |
lizmat | it doesn't :-( | ||
timotimo | but that requires a full core setting recompile, which takes about 5 minutes. oh wait, we have 2015 now :) | ||
lizmat | yeah, <1minute now | ||
$ time perl6 -e 'for ^5000000 { 1 }' # with optimizing: real0m3.521s | 19:29 | ||
$ time perl6 --optimize=off -e 'for ^5000000 { 1 }' # without: real0m4.739s | 19:30 | ||
so it *is* optimizing, but apparently not where I think it is :-( | |||
pmurias | rurban: it seems what you are proposing is a subset of STM | 19:31 | |
rurban: if I remember correctly it adresses one of the best cases for STM | 19:34 | ||
it should have excelent peformance | |||
rurban | pmurias: I'm proposing nothing. parrot has excellent threads and nqp does not use it. Not my problem really. | 19:35 | |
all the other things are better in moar, but I will catch up sooner or later | |||
pmurias | rurban: do you think parrot threads are enough for all uses? | 19:37 | |
lizmat | timotimo: ok, it looks to me that if I disable SPESH, there is no difference between using --profile or not | 19:38 | |
*--optimize=off | |||
19:38
regreg left,
Sqirrel left
|
|||
lizmat | which leads me to think that the difference we see is purely caused by SPESH/JIT | 19:38 | |
19:40
brrt joined
19:44
Mso150 joined
19:48
davercc`` left
19:49
adu left,
Bucciarati left
19:51
rindolf left
|
|||
masak | I think my personal conclusion from this discussion is that Parrot people and Perl 6 people are no longer actively communicating across the two communities. nor does there seem to exist much interest in such communication. for some time now -- maybe two-three years. | 19:51 | |
FROGGS_ | that meets my perception | 19:54 | |
masak | if Parrot's only edge over other established VMs out there is threading, and Rakudo doesn't use it and hasn't since it was built in 2012, then... it's because the communities are no longer in an ongoing relationship. | ||
Perl 6/Rakudo is busy courting MoarVM and (to a lesser extent) the JVM. | |||
Parrot is busy doing who-knows-what. | 19:55 | ||
skids | The impression I get is that there is a hole where an nqp/parrot-focused dev needs to be. | ||
19:55
Bucciarati joined
|
|||
FROGGS_ | solving existing github issues | 19:55 | |
19:55
Sqirrel joined
19:56
LLamaRider joined
|
|||
masak read that as "rearranging deck chairs on the Titanic" | 19:57 | ||
FROGGS_ | one problem (for me) is the development turn-around for perl6-p is quite huge... it takes a while to recompile nqp-p + rakudo+p, not to mention parrot | ||
I mean, you can recompile moarvm without needing to touch nqp or rakudo... you can play with the .java files in nqp and you can test perl6-j just like that... | 19:59 | ||
nothing like that works for parrot/nqp-p | |||
moritz | rurban, masak: iirc somebody did try to use parrot threads with rakudo (maybe FROGGS_++?), and failed, because access to lexicals from threads caused segfaults, or something | ||
no idea where that idea went | 20:00 | ||
FROGGS_ | moritz: yes, and when it did not segfault it was limited to one core... | ||
masak | moritz: ok, that's like half of a data point, then. I remain unimpressed by Parrot's threads. | ||
FROGGS_ | and since nobody helped me (from neither side), I left it at that state - sleeping in a github issue | ||
moritz | masak: not trying to prove anything, except that there *was* at least one attempt to use parrot threads from rakudo | 20:01 | |
masak | FROGGS_: was the github issue ever resolved? | ||
moritz: one attempt, which didn't prove Parrot's threads' superiority, but dug up some segfaults instead. | 20:02 | ||
moritz | and the "nqp uses its own broken lexpads" argument is moot, because parrot's lexpads didn't provide the necessary functionality, so there was a *need* to reinvent them | ||
masak: yes, we're in violent agreement here | |||
20:02
brrt left
|
|||
pmurias | the moarvm and parrot threads would have different apis | 20:03 | |
even if Rakudo used the parrot ones | |||
moritz | pmurias: that's fine; the JVM threads have another different API, presumably | ||
pmurias | moritz: why? | 20:04 | |
moritz | pmurias: why what? | ||
skids | Well, that depends on exactly why nqp lexpads were broken. Is it just bitrot? | ||
FROGGS_ | masak: no, not resolved: github.com/parrot/parrot/issues/889 | 20:05 | |
pmurias | moritz: why does Rakudo on JVM expose threading differently than on MoarVM? | ||
dalek | kudo/nom: b76f601 | lizmat++ | src/Perl6/Optimizer.nqp: Fix broken for ^1000 -> while $i < 1000 opt |
||
moritz | skids: I see no evidence that they are, except rurban's comment about them being broken in context of parrot threads | ||
pmurias: it doesn't. JVM and MoarVM presumably have different thread APIs | |||
pmurias: but nqp + rakudo unify them | 20:06 | ||
pmurias | but it won't be possible on Parrot threads | ||
FROGGS_ | pmurias: why not? | ||
moritz | pmurias: which is why I meant it's fine that parrot has another different API - as long as it's powerful enough for rakudo + nqp to unify it with the others | ||
masak | FROGGS_: that github issue is like a parody of the broken communication between Perl 6 and Parrot. | ||
FROGGS_ | masak: :o) | ||
moritz | m: say nqp::null().perl | 20:07 | |
camelia | rakudo-moar 20d5ef: OUTPUT«Cannot call method 'perl' on a null object in block <unit> at /tmp/uYMkPpdZBq:1» | ||
pmurias | FROGGS_: I can't imagine how to unify their api | ||
20:07
rmgk left
|
|||
masak | "If we can't compute in parallel when lexicals are involved, then I'm not sure how usable it is." | 20:07 | |
pmurias | FROGGS_: they parrot threads are a stripped down STM | ||
masak | when *lexicals* are involved. | 20:08 | |
well, good thing not much of my everyday code uses *lexicals*. | |||
dalek | kudo/nom: 6279e12 | moritz++ | t/spectest.data: Run S16-io/print.t |
||
masak | rurban: yeah, it's not looking good for Parrot threads. :( | 20:09 | |
20:09
kjs_ joined
|
|||
moritz | masak: be careful with sarcasm on the Internet | 20:09 | |
pmurias is not sure what mocking rurban is trying to accomplish | |||
20:10
rmgk joined
|
|||
FROGGS_ | masak: well, you should in general try to avoid accessing lexicals, or rather avoid to share variables between threads... | 20:10 | |
20:10
zakharyas joined
|
|||
FROGGS_ | masak: the problem is more that our routines are lexicals too | 20:10 | |
dalek | c: 397e0c0 | moritz++ | lib/Type/Metamodel/PrivateMethodContainer.pod: Document Metamodel::PrivateMethodContainer |
20:11 | |
20:11
darutoko left
|
|||
moritz | let's ask a different question: what advantages does rakudo-parrot offer over rakudo-moar *right now*? | 20:12 | |
lizmat | www.youtube.com/watch?v=Iu7vySQbgXI | ||
FROGGS_ | lizmat: :o) | 20:13 | |
skids | So OOC, if OSthread M owns X, OSthread A tells M to write X, OSthread B tells M to write X, and thread A reads X, how does A know to use B's value for X and desist using the value it wrote, under the "lock-free" model? | 20:16 | |
20:16
brrt joined
20:23
denis_boyun_ joined
|
|||
FROGGS_ | skids: good question | 20:26 | |
lizmat | skids: how does OSthread M "own" X ??? | 20:28 | |
skids | Just on a surface level the parrot model has advantages with 2-thread sharing, and possibly a downside of more bookeeping vs locking. | ||
lizmat | skids: or was that about the parrot model? | ||
skids | lizmat: according to the parrot model only one OS thread has write access to any particular var. | ||
lizmat | ah, ok | ||
20:34
denis_boyun_ left,
adu joined
20:36
denis_boyun_ joined
|
|||
masak | pmurias: I would be delighted if Parrot threads were useful enough to be measurable against anything else. unfortunately, they seem several steps away from that. this makes me sad, especially if it's true as several people claim that threads is the only remaining edge Parrot has on other VMs. | 20:38 | |
pmurias | masak: they are usable from winxed | 20:40 | |
masak | moritz: thanks for the warning about sarcasm. that was very helpful. | 20:43 | |
pmurias: does winxed have a community where I could discuss their experience of the Parrot threads? | 20:44 | ||
20:44
adu left
|
|||
pmurias | masak: you can ask the stm community how they feel about not using any reads in their transactions | 20:45 | |
masak: parrot threads are a stm subset | |||
so we could sort of fake using them on top of pugs | 20:46 | ||
20:47
anaeem1_ left
20:52
denis_boyun_ left,
LLamaRider left
|
|||
FROGGS_ | huh "Streaming decode NYI for encoding 4" | 20:54 | |
I tried to: "example/utf-16-2.xml".IO.slurp( :enc<utf-16> ) | |||
:o( | 20:55 | ||
21:00
Mso150_o joined
21:04
Mso150 left
21:09
jakesyl joined
21:11
Mso150_o left,
zakharyas left,
Mso150 joined
|
|||
masak | I think the consensus in the Perl 6 universe is that (a) STM is an interesting solution to apply in some cases, a bit like Prolog is, but it's not universal, and (b) where the composability of STM really shines is with fully immutable runtime models, which figure heavily in languages like Haskell, but basically not at all in Perl 6. | 21:12 | |
at least that's what I've come to understand. I picked up (a) during the Pugs days, and (b) in the past few years. | |||
21:13
KCL_ left
21:14
Ovid joined,
Ovid is now known as Guest12460
21:15
Guest12460 is now known as CurtisOvidPoe
|
|||
CurtisOvidPoe | m: class Point { has $.x; has $.y; multi method set(:$x = $.x) { $!x = $x }; multi method set(:$y = $.y) { $!y = $y } }; my $p = Point.new( x => 5, y => 2 ); $p.set( y => -3 ); say $p.y; | 21:15 | |
camelia | rakudo-moar b76f60: OUTPUT«2» | ||
CurtisOvidPoe | I’ve created a point object, trying to use named multi methods and tried to set y to -3, but it still says that it’s 2. | 21:16 | |
masak | CurtisOvidPoe: named params are optional by default. | ||
CurtisOvidPoe: try adding ! | |||
also, you could get away with writing just `:$!x!`, etc | 21:17 | ||
CurtisOvidPoe | masak: I don’t understand that comment. | ||
If my code is wrong, how is it wrong? | |||
masak | m: class Point { has $.x; has $.y; multi method set(:$x! = $.x) { $!x = $x }; multi method set(:$y! = $.y) { $!y = $y } }; my $p = Point.new( x => 5, y => 2 ); $p.set( y => -3 ); say $p.y | ||
camelia | rakudo-moar b76f60: OUTPUT«===SORRY!===Cannot put default on required parameter $xat /tmp/xzGarl9Sr8:1------> .x; has $.y; multi method set(:$x! = $.x⏏) { $!x = $x }; multi method set(:$y! = Cannot put default on required parameter …» | ||
masak | m: class Point { has $.x; has $.y; multi method set(:$x!) { $!x = $x }; multi method set(:$y!) { $!y = $y } }; my $p = Point.new( x => 5, y => 2 ); $p.set( y => -3 ); say $p.y | ||
camelia | rakudo-moar b76f60: OUTPUT«-3» | ||
masak | there. | 21:18 | |
CurtisOvidPoe: hope my comment makes sense now. | |||
m: class Point { has $.x; has $.y; multi method set(:$!x!) {}; multi method set(:$!y!) {} }; my $p = Point.new( x => 5, y => 2 ); $p.set( y => -3 ); say $p.y | |||
camelia | rakudo-moar b76f60: OUTPUT«-3» | ||
masak | and that was my other comment. | ||
FROGGS_ | which works but might be kinda awkward :o) | ||
masak | the `:$!x!` pill looks kind confusing at first, yes. | 21:19 | |
jnthn | FROGGS_: It means what it says; there's an NYI. | ||
masak | one has to mentally disambiguate the first `!` (private attr) from the second (mandatory parameter). | ||
FROGGS_ | jnthn: yes, but... | 21:20 | |
CurtisOvidPoe | masak: I agree that my code doesn’t make sense, but nonetheless, it doesn’t appear to be dispatching properly. | ||
FROGGS_ | I don't want to ó.ò | ||
moritz | or | ||
jnthn | FROGGS_: Then write a MoarVM ticket and I'll look at it in the next days. | ||
moritz | method set(:$!x, :$!y) { } | ||
masak | CurtisOvidPoe: unless it's clear already, you also fell prey to several matching candidates picking the first one in text order. | ||
FROGGS_ | jnthn: no, I won't distract you from doing 6pe :o) | ||
masak | CurtisOvidPoe: also, what moritz++ just said. | ||
moritz | m: class Point { has ($.x, $.y); method set(:$!x, :$!y) { } }; my $p = Point.new( x => 5, y => 2; $p.set( y => -3 ); say $p.y | 21:21 | |
camelia | rakudo-moar b76f60: OUTPUT«===SORRY!=== Error while compiling /tmp/4O83QGu8LOUnable to parse expression in argument list; couldn't find final ')' at /tmp/4O83QGu8LO:1------> > 5, y => 2; $p.set( y => -3 ); say $p.y⏏<EOL> expectin…» | ||
CurtisOvidPoe | masak: actually, I didn’t fall prey to several candidates picking the first one because *neither* value is changed. | ||
m: class Point { has $.x; has $.y; multi method set(:$x = $.x) { $!x = $x }; multi method set(:$y = $.y) { $!y = $y } }; my $p = Point.new( x => 5, y => 2); $p.set( y => -3 ); say $p.y;say $p.x; | |||
camelia | rakudo-moar b76f60: OUTPUT«25» | ||
masak | CurtisOvidPoe: that's because it dispatched to the first one. | ||
CurtisOvidPoe: which doesn't care about $.y | |||
CurtisOvidPoe | No, as you can see from the above, $p.x isn’t changed, either. | 21:22 | |
masak | I didn't say it was. | ||
I just said it dispatched to the first one. | |||
which doesn't care about $.y, and defaults $x to $.x | |||
so you've successfully changed $.x to $.x | |||
FROGGS_ | CurtisOvidPoe: is this about chowing multi methods or about setting attributes? | 21:23 | |
CurtisOvidPoe | So that means that multi foo(:$x) can take multiple named arguments and ignores those which do not show up? | ||
FROGGS_ | CurtisOvidPoe: yes | ||
CurtisOvidPoe | (ignores those which don’t match $x) | ||
masak | CurtisOvidPoe: yes, that's what "not mandatory" means. | ||
moritz | m: class Point { has ($.x, $.y); method set(:$!x, :$!y) { } }; my $p = Point.new( x => 5, y => 2); $p.set( y => -3 ); say $p.y | ||
camelia | rakudo-moar b76f60: OUTPUT«-3» | ||
jnthn | To be clear, the 3 things going on here are 1) Methods happily accept any unexpected named parameters for reasons of interface consistency, 2) named parameters are optional by default, 3) named parameters don't affect candidate sorting, but required ones can serve as a constraint. | ||
FROGGS_ | there is an implicit *%_ on methods | 21:24 | |
masak | jnthn++ | ||
21:24
denis_boyun_ joined
|
|||
CurtisOvidPoe | Thanks, jnthn! I expect that this ties in with the multi method ambiguity issue and is going to cause confusion. | 21:24 | |
moritz | design.perl6.org/S12.html#Interface_Consistency | ||
masak | I think we all hate interface consistency with some degree of passion -- but no-one seems keen on arguing against it either, as it makes some amount of sense. | ||
CurtisOvidPoe | In short, $p.set( y => -2 ) being a no-op is very confusing. | ||
ab5tract | FROGGS_: that's a useful note to make, but not entirely fitting with CurtisOvidPoe's talk which aims at mere mortals | 21:25 | |
21:25
rurban left
|
|||
ab5tract | CurtisOvidPoe: sure, but then again so is the mechanism through which you have set it up | 21:25 | |
masak | CurtisOvidPoe: your original code is not very idiomatic. | ||
CurtisOvidPoe | Agreed! | ||
masak | CurtisOvidPoe: so while I agree that it being a no-op is very confusing, it's not a path that I would expect people to follow and not a trap I would expect people to land in. | 21:26 | |
FROGGS_ | m: class Point { has $.x is rw; has $.y is rw }; my $p = Point.new( x => 5, y => 2 ); $p.y = -3; say $p.y; | ||
camelia | rakudo-moar b76f60: OUTPUT«-3» | ||
FROGGS_ | that's idiomatic but does not show MMD of course | ||
ab5tract | MMD is not necessary where named parameters are concerned | ||
masak | CurtisOvidPoe: moritz++' suggestion is more idiomatic. | ||
and shorter. | |||
CurtisOvidPoe | Confised the case of Perl 5: new programmers usually don’t write “idiomatic” Perl code. | ||
masak | *nod* | ||
CurtisOvidPoe | moritz’s suggestion is pretty much what I already have in my talk :) | ||
masak | \o/ | 21:27 | |
jnthn | Also, why a set method at all? | ||
skids | When I was first learning P6 that (named parm dispatch) did manage to snag me once. It's just one of those things to be pointed out to beginners | ||
ab5tract | jnthn: excellent point | ||
jnthn | "is rw" is the (not hard to understand) way to get a public accessor | ||
FROGGS_ | is what I showed, aye | ||
CurtisOvidPoe | jnthn: I don’t have a set() method the final Point class I show. I was using one as an example of “you really don’t need this after all” | 21:28 | |
And I throw a subset on $.x and $.y to make it clear we can safely expose them. | |||
FROGGS_ | m: class Point { has $.x is rw; has $.y is rw }; my $p = Point.new( :5x, :2y ); $p.y = -3; say $p # :o) | ||
camelia | rakudo-moar b76f60: OUTPUT«Point.new(x => 5, y => -3)» | ||
ab5tract | CurtisOvidPoe: for MMD (and doing more than necessary) you could create PosX and PosY classes | 21:29 | |
FROGGS_ | (or roles) | ||
ab5tract | .... :5x ? | ||
jnthn | CurtisOvidPoe: Ah, OK, then fair enough. | ||
ab5tract | do we really need more ways to frame a pair? | ||
FROGGS_ | ab5tract: is meant when you have units.... $date.add( :24hours ) | ||
ab5tract | ah | ||
ok | 21:30 | ||
i guess :. | |||
:/ | |||
jnthn | Well, the reason we got it is because :2nd, :3rd, etc. as a regex modifier. | ||
FROGGS_ | jnthn: but it is awesome for datetime math :o) | ||
jnthn | FROGGS_: Opinions vary ;) | ||
FROGGS_ | jnthn: that's your opinion :P | 21:31 | |
jnthn implemented it and remembers the mixed reactions of "way cool" and "omfg WHY" :) | |||
FROGGS_ | yeah | ||
"Every DWIM comes with a WAT" | |||
ab5tract | i assume that is only ever possible with numeric values? | 21:32 | |
pmurias | masak: I haven't used STM at all so I don't have any opinions about it, I just read the rurban blog post and it reminded me of STM | ||
FROGGS_ | ab5tract: aye | ||
masak | pmurias: url? | ||
ab5tract | i was reading the backlog on the train | 21:33 | |
pmurias | masak: the advent one | ||
pmurias hasn't figured out how to copy & paste stuff into an xterm without a mouse | |||
ab5tract | a data point i had was at YAPC::EU 2012, after the guy who implemented it (name escapes) how well it was working with P6 | ||
masak | ok, I might be able to find it. hold on. | ||
pmurias | (it's in the irc log) | ||
ab5tract | he simply looked at me like i was insane and replied "don't care" | 21:34 | |
masak | got it. perl6advent.wordpress.com/2012/12/...t-threads/ | ||
FROGGS_ | ab5tract: what are you talking about? | ||
masak | ab5tract: maybe "Nat Tucks"? | 21:35 | |
ab5tract | FROGGS_: parrot threads | ||
FROGGS_ | ab5tract: ahh | ||
masak | ab5tract: that's what the p6advent post says. | ||
geekosaur | pmurias, blog.ssokolow.com/archives/2011/05/...rms-paste/ ? | ||
FROGGS_ | nine++ implemented it and gave that talk | ||
ab5tract^^ | |||
masak | or it was nine, yes. | ||
ab5tract | ok | ||
wish that didn't make things even more confusing | 21:36 | ||
CurtisOvidPoe | m: say .3.^methods | ||
camelia | rakudo-moar 6279e1: OUTPUT«Rat FatRat new nude Num floor ceiling Int Bridge base succ pred norm narrow abs sign conj sqrt rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotanh acotanh round unpolar …» | ||
CurtisOvidPoe | m: say .3.HOW.methods | ||
camelia | rakudo-moar 6279e1: OUTPUT«Too few positionals passed; expected 2 arguments but got 1 in any methods at src/gen/m-Metamodel.nqp:453 in block <unit> at /tmp/dI37LKjaUr:1» | ||
21:36
kurahaupo joined
|
|||
pmurias | masak: "wait" from the blog post is just atomic (thread_has_ended_flag == 1) {} | 21:37 | |
CurtisOvidPoe | ^ and HOW aren’t the same thing? | ||
jnthn | CurtisOvidPoe: No | ||
masak | m: say .3.HOW.methods(.3) | ||
camelia | rakudo-moar 6279e1: OUTPUT«Rat FatRat new nude Num floor ceiling Int Bridge base succ pred norm narrow abs sign conj sqrt rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotanh acotanh round unpolar …» | ||
jnthn | CurtisOvidPoe: Meta-methods take the object being operated on as a first argument | ||
pmurias | masak: and each parrot thread starts a transaction for each write | ||
jnthn | a.^foo(b) is a.HOW.foo(a, b) but without re-evaluating a | ||
vendethiel | "Every DWIM comes with a WAT" <- this is so well said, FROGGS_ | ||
CurtisOvidPoe | jnthn: cheers! | ||
pmurias | masak: and the transactions don't contain any reads so they always succeed | 21:38 | |
moritz guesses it's time to write perlmop.pod instead of j API documentation for the MOP | 21:39 | ||
jnthn | moritz: I suspect the latter is more useful with the former :) | ||
masak | I think both are useful. it's just, I would look for the former first. | 21:40 | |
ab5tract agrees | 21:41 | ||
jnthn | Right, that's a better way of saying what I was trying to :) | ||
moritz | it's also that writing the API documentation gives man anoverview over the available MOP functionality | ||
CurtisOvidPoe | Night all. | ||
jnthn | 'night | ||
masak | jnthn: oh you said *with* the former. I read *than* the former. sorry :) | ||
'night, Ovid | |||
21:41
denis_boyun_ left
|
|||
jnthn | masak: I wondered why you were seeming disagreeable :P | 21:42 | |
jnthn goes hunting a basic block eliminator bug... | |||
masak | jnthn: I seem to do that a lot tonight ;) | ||
rawr! | |||
FROGGS_ | *g* | ||
moritz | basic blog alligator bug! | ||
masak | seen on Twitter: "Someone once said I was fun and easy-going. I laughed so hard I accidantally ate them." | 21:43 | |
ab5tract | moritz: my miscomprehension matrix is missing, can i have it back please? :) | ||
pmurias | masak: the more I think about the parrot threads the more crazy they seem | ||
masak | pmurias: whee! | ||
moritz | ab5tract: sorry, I already diagnolized it | ||
masak | pmurias: crazy *awesome*, right? | ||
"The solution for these problems implemented in hybrid threads is to sidestep them altogether by disallowing write access to shared variables." -- you what? | 21:47 | ||
that's not a solution. that's avoiding the problem. | 21:48 | ||
vendethiel | I strongly believe that's a solution :P | ||
moritz | .oO( you communicate between threads over avian carriers) |
||
vendethiel | to a different problem, through | ||
which happens to fix gracefully both... | |||
masak | vendethiel: heh :) | ||
if I am reading this post right, it's saying that if I have a program with an array `@results`, then I am allowed to fork 100 threads to compute results in parallel -- as long as I don't push the results to the `@results` array from any of the threads. | 21:50 | ||
dalek | c: bebee61 | moritz++ | lib/Type/Submethod.pod: document type Submethod |
||
masak | "In other words, all data is owned by the thread creating it and only the owner may write to it. Other threads have only read access." -- yeah, I'm sorry, that's not awesome. | 21:51 | |
that sucks. | |||
21:52
raiph joined
|
|||
lizmat is looking at a segfault and decides to sleep on it | 21:52 | ||
ab5tract | masak: your disagreeable threads are showing quite plainly today ;) | ||
masak | ab5tract: I'll bet. | ||
I take full responsibility. I clearly should be doing something fun and constructive instead. | 21:53 | ||
I don't even care that much about Parrot. | |||
ab5tract | that said, it was really interesting to see the linear performance increases from the (admittedly arbitrary) mandelbrot test | ||
jnthn | lizmat: Hah, you've just made me wnat a pillow with SEGV written on it :P | 21:54 | |
ab5tract | and in practice, i haven't gotten any shared array code working in moar threads either | ||
which is what i understand we need Supply.act for | 21:55 | ||
masak | ab5tract: ooh, I should totally try that. | ||
std: our enum day of int <Sun Mon Tue Wed> | |||
camelia | std f9b7f55: OUTPUT«ok 00:00 135m» | ||
masak | m: our enum day of int <Sun Mon Tue Wed> | ||
camelia | rakudo-moar 6279e1: OUTPUT«===SORRY!=== Error while compiling /tmp/QEVPGELusOMethod 'set_of' not found for invocant of class 'Perl6::Metamodel::EnumHOW'at /tmp/QEVPGELusO:1------> » | 21:56 | |
masak | NYI? | ||
ab5tract cannot tell if masak is being sarcastic | |||
masak | ab5tract: I'm not. | ||
ab5tract: trying it now. | |||
ab5tract | i have about zero experience with concurrent programming | 21:57 | |
jnthn | If you're going to have multiple threads producing results to a common consumption point, you either want a Channel or a Supply, or sometimes just to solve the problem more functionally. :) | ||
FROGGS_ | jnthn: you can get such a pillow if that helps :o) | ||
jnthn | FROGGS_: I'm not sure it'd *help*... :) | 21:58 | |
FROGGS_ | *g* | ||
masak | m: my @results; for (1..20).pick(*) -> $n { $*SCHEDULER.cue: { @results.push($n) } }; say @results.perl; say @results.elems | ||
camelia | rakudo-moar 6279e1: OUTPUT«Could not spawn thread: errorcode -1» | ||
masak | hm. this works locally. | ||
jnthn | Odd | ||
ab5tract | but when i read/heard that constraint, it didn't seem like a big deal at all because my limited uynderstanding was "yeah, you can't push onto a common array from threads anyway" | ||
masak | maybe some restriction put on camelia? | ||
jnthn | Maybe | 21:59 | |
masak | anyway, I got twenty elements at home. | ||
hobbs | masak: yeah, a process/thread rlimit wouldn't be surprising for an IRC bot :) | ||
ab5tract | at least without some sort of arbiter, as jnthn points out with Channel or Supply | ||
masak | if this way is dangerous, then I seem to have been lucky. | ||
jnthn | masak: You shouldn't get it to SEGV, but it's NOT a good idea | ||
masak | I'd be happy to learn how to do the above code with a Channel or Supply. | ||
ab5tract | masak: why not use start? | 22:00 | |
pmurias | masak: you are free to fork off 100 threads which modify @results in parallel | ||
masak: their modifications will trickle down to your thread in random order | 22:01 | ||
jnthn | m: my @results = await do for (1..20).pick(*) -> $n { start { $n } }; say @results; | ||
camelia | rakudo-moar 6279e1: OUTPUT«Could not spawn thread: errorcode -1» | ||
jnthn | Yeah, must be some restriction. | ||
pmurias | masak: and you can call wait for all the modifications to trickle down | ||
jnthn | m: Thread.start({ sleep 1 }) | ||
camelia | ( no output ) | ||
jnthn | m: Thread.start({ sleep 1 }) xx 10 | ||
camelia | ( no output ) | ||
jnthn | m: Thread.start({ sleep 1 }) xx 20 | ||
camelia | rakudo-moar 6279e1: OUTPUT«Could not spawn thread: errorcode -1» | ||
jnthn | m: Thread.start({ sleep 1 }) xx 16 | ||
camelia | rakudo-moar 6279e1: OUTPUT«Could not spawn thread: errorcode -1» | ||
ab5tract | poor camelia | 22:02 | |
jnthn | 16 is the maximum thread poo size by the dfault, iirc | ||
ab5tract | :) | ||
jnthn | uh, pool | ||
FROGGS_ | hehe | ||
+1 | |||
jnthn | As in, Rakudo won't spawn more than 16 | ||
But Camelia won't handle that it seems | |||
masak | pmurias: ok, that sounds saner than how I understood it. | ||
ab5tract | jnthn: is maximum thread pool size a compile time or run time switch for rakudo? | 22:03 | |
jnthn | ab5tract: If you change $*SCHEDULER you can control it at runtime. | ||
ab5tract | ok | 22:04 | |
jnthn | ab5tract: In the future it will look at the hardware you have and factor in throughput etc. | ||
ab5tract | sweet! | ||
the concurrency bits are one thing i would really love to see both ironed out *and* fully documented for 6.0 | 22:05 | ||
masak | +1 | ||
ab5tract | jnthn: i can still make moar segfault by calling say | ||
jnthn | masak: A better example of the restriction: you have a monitor or actor (using OO::Monitor or OO::Actor modules I hacked up). Under the Moar/JVM model you have in Perl 6, any thread can modify them, but an ordering (one at a time) is imposed on the method calls, giving safety. | ||
masak | jnthn: cool. | 22:06 | |
jnthn | masak: So your concurrent web app can process requests that work against those objects over a bunch of threads, and whichever thread wants can modify it - but only one at a time. | ||
masak | jnthn: are there any guarantees given about reads not seeing intermediate states? | ||
jnthn | masak: As I understand the Parrot model, all changes to an object have to go to the thread that creates it, meaning if that thread is busy doing something else, the first has to block. | 22:07 | |
masak: (intermediate states) monitors/actors are object with state, and you can only be inside a method call on a particular instance in one thread at a time. | 22:08 | ||
masak | m: my enum CoinFace <Heads Tails>; say CoinFace.mapping # NYI? | ||
camelia | rakudo-moar 6279e1: OUTPUT«No such method 'mapping' for invocant of type 'CoinFace' in block <unit> at /tmp/5dauX1OCWv:1» | ||
masak | jnthn: ah; got it. | ||
jnthn | masak: So, provided you don't do something crazy with your OO design, no :) | ||
masak: Ain't that method called .enums | 22:09 | ||
masak | oh, possible. I'm reading an old spec commit. | ||
jnthn | m: my enum CoinFace <Heads Tails>; say CoinFace.enums | ||
camelia | rakudo-moar 6279e1: OUTPUT«Heads => 0, Tails => 1» | ||
masak | m: my enum CoinFace <Heads Tails>; say CoinFace.enums.^name | 22:10 | |
camelia | rakudo-moar 6279e1: OUTPUT«Hash» | ||
masak | heh -- the old spec commit had the type as "PairValSet" :P | ||
jnthn | Such enterprisey :P | ||
m: say &die.WHAT | 22:12 | ||
camelia | rakudo-moar 6279e1: OUTPUT«(Sub+{<anon>})» | ||
jnthn | m: say &die.^roles | ||
camelia | rakudo-moar 6279e1: OUTPUT«(<anon>) (Callable)» | ||
jnthn | m: say &die ~~ Callable | ||
camelia | rakudo-moar 6279e1: OUTPUT«False» | ||
jnthn | m: say nqp::istype(&die, Callable) | ||
camelia | rakudo-moar 6279e1: OUTPUT«0» | ||
masak guesses jnthn is fixing some RT ticket or other | 22:13 | ||
jnthn | m: &die.^compose; say nqp::istype(&die, Callable) | ||
camelia | rakudo-moar 6279e1: OUTPUT«1» | ||
jnthn | masak: Well, it probably exists. | ||
FROGGS_ | m: say nqp::istype(&fail, Callable) | ||
camelia | rakudo-moar 6279e1: OUTPUT«1» | ||
jnthn | masak: It's just that what once was an obscure bug that showed up in the case of some setting built-ins is now a bug causing spectest fails in my branch that caches mixins. | 22:14 | |
m: class A { ... }; class A does Rational { ... }; class A { method omg() { } }; say A.omg; say A.^roles; say A ~~ Rational | 22:15 | ||
camelia | rakudo-moar 6279e1: OUTPUT«===SORRY!===None of the parametric role variants for 'Rational' matched the arguments supplied.Cannot call ''; none of these signatures match::(::$?CLASS ::::?CLASS $, ::NuT $, ::DeT $)» | ||
jnthn | oh... :) | ||
m: class A { ... }; class A does Positional { ... }; class A { method omg() { } }; say A.omg; say A.^roles; say A ~~ Rational | |||
camelia | rakudo-moar 6279e1: OUTPUT«Nil(Positional)False» | ||
jnthn | m: class A { ... }; class A does Positional { ... }; class A { method omg() { } }; say A.omg; say A.^roles; say A ~~ Positional | ||
camelia | rakudo-moar 6279e1: OUTPUT«Nil(Positional)True» | ||
jnthn | OK, good...it won't be a horrid fix :) | ||
22:19
Mso150 left
22:22
mvuets left,
kjs_ left
|
|||
jnthn | Aww, nah, it will be. | 22:23 | |
Guess that can be my problem to sleep on tonight :) | 22:24 | ||
22:25
leont joined
|
|||
masak embroiders "horrid fix" on a pillow for jnthn | 22:25 | ||
jnthn | m: package Foo { }; sub x(Foo) { } | 22:26 | |
camelia | rakudo-moar 6279e1: OUTPUT«===SORRY!=== Error while compiling /tmp/oSrLMcGBowFoo cannot be used as a nominal type on a parameterat /tmp/oSrLMcGBow:1------> package Foo { }; sub x(Foo⏏) { }» | ||
jnthn | m: package Foo { }; my Foo $x = 42; | ||
camelia | rakudo-moar 6279e1: OUTPUT«Type check failed in assignment to '$x'; expected 'Foo' but got 'Int' in block <unit> at /tmp/5PVuLGRbHg:1» | ||
22:40
tgt left
|
|||
dalek | kudo/6pe-mop: e6a6677 | jnthn++ | src/Perl6/Actions.nqp: Only allow appropriate types on variables. |
22:42 | |
22:42
FROGGS_ left
22:43
espadrine left
|
|||
timotimo | lizmat++ # fixing the for -> while opt | 22:53 | |
masak | I was thinking earlier today -- would it be feasible/worthwhile to have a special test suite for optimizations? maybe something that mocked certain parts of the compiler stack to be able to check whether an optimization triggered? | 22:58 | |
23:05
beastd left
|
|||
tadzik | hello hello! | 23:06 | |
yoleaux | 17 Jan 2015 19:36Z <raydiak> tadzik: noticed I can't "rakudobrew switch moar-2014.12" :) github.com/tadzik/rakudobrew/pull/25 | ||
tadzik | oh :) | ||
raydiak++ colomon | |||
colomon++ | |||
pmurias | masak: it seems like something that would be worthwhile, especially if we introduce better and more complex optimalisations | 23:09 | |
masak: the hard part is how to test for correctness without hardcoding resulting qast? | 23:10 | ||
masak | pmurias: that's what the mocks could do. there could be a mock for the `for --> while` optimization; the test would check that it set a bit somewhere, indicating "the optimization triggered". | 23:11 | |
23:18
telex left
23:20
telex joined
23:24
spider-mario left
23:25
Ben_Goldberg left,
raiph left
|
|||
pmurias | masak: that sort of makes hardcoding qast input and output seem a good option :/ | 23:25 | |
23:25
Ben_Goldberg joined
|
|||
timotimo | i wonder how much faster spesh_diff would run if i turned it from a line-by-line thing into a grammar instead that does a whole bunch of work in the actions | 23:25 | |
that could also very well make the source code simpler, as i don't have to keep an "accumulator" object around that gets stashed into a storage hash and replaced by a new empty one at a somewhat arbitrary looking point | 23:26 | ||
masak | pmurias: I don't see why you think so. hardcoding qast output seems brittle, if what we care about is that an optimization is done for a certain input. | ||
timotimo | it's also very hard to compare 1:1 qast outputs | 23:27 | |
as soon as something else changes, your matcher for "success of optimization" vs "failure to optimize" must be looked at again | |||
jnthn | I think that already each optimization is separated out into a method that does the transform | ||
So there's analysis methods, and then if they decide to do something they call a transform | |||
23:28
Ben_Goldberg left
|
|||
jnthn | So if you can intercept those calls (like by subclassing) and record them, you have a way to test it. | 23:28 | |
23:28
Ben_Goldberg joined
23:30
KCL_ joined
23:31
Ben_Goldberg is now known as BenGoldberg
|
|||
jnthn | Time for some rest...'night | 23:32 | |
masak | 'night, jnthn | ||
23:33
brrt left
|
|||
BenGoldberg | On the subject of creating a test for whether an optimization is being done, how about compiling with optimizations turned off, then again with them turned on, and see if there's *any* differences between the qasts? | 23:33 | |
masak | <timotimo> it's also very hard to compare 1:1 qast outputs | 23:34 | |
23:35
kjs_ joined,
tangentstorm joined
|
|||
BenGoldberg | But at least it's future proof, so if something else changes (some new optimization is done), the test can still say, "something was optimized", even though it might not know precisely which optmization triggered. | 23:36 | |
masak | right, but you're assuming that any difference between two QAST output is significant, which it may not be. | 23:37 | |
23:38
kjs_ left
23:39
gfldex left
23:50
Alina-malina left
23:56
Alina-malina joined
23:58
pmurias left
|