Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-12-04

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 japhb Oh, hmmm, interesting.  That assumes a post-install step for OS packages (though of course that's a well-supported thing)
00:00 TimToady it should populate at install time for the library
00:00 TimToady and pulled in lazily
00:00 japhb TimToady: yes, agreed.
00:00 TimToady on demand, like an autouse
00:01 japhb Our building is in the one sunbeam in a very dark purple-grey sky right now.
00:01 TimToady we're over under the cloud
00:02 TimToady but radar says this is just about the last bit of raincloud
00:03 TimToady maybe it should be @*DISTRO, in "mro" order
00:03 TimToady maybe $*DISTRO is short for @*DISTRO[0]
00:04 TimToady or, as I said, we differentiate .name from .*name
00:04 TimToady though I could see that getting out of sync, if parents skip
00:05 dayangkun joined #perl6
00:05 timotimo ab5tract: "be on its merry way" was lacking a "way"
00:05 TimToady so maybe $*DISTRO.parent.name etc
00:05 TimToady timotimo: I think that's intended
00:05 timotimo oh?
00:06 timotimo and i think it should be "its" rather than "it's"?
00:06 TimToady that's how I took it as a native English speaker, as a shortening for the longer
00:06 TimToady but yeah, its
00:07 ab5tract timotimo: Firefly reference
00:07 timotimo ab5tract: the "bag < of snowflakes >" gets treated by wordpress as html and the text in the angle brackets disappears in the resulting rendering
00:08 timotimo the footnotes don't link back to the text they appear in
00:09 * TimToady wonders if DISTRO could be a role that recursively instantiates its parents
00:10 ab5tract timotimo: those are ad-hoc footnotes
00:10 ab5tract and i've been working on this for two nights straight :)
00:11 TimToady $*KERNEL could also be recursive, for virtual hosting
00:11 timotimo sorry :)
00:11 TimToady assuming we can even get at the info for the outer host
00:12 TimToady DISTRO.upstream maybe
00:13 TimToady since the parents may disavow the downstream
00:14 ab5tract and if you notice the initial quote (which if no one has said before comes from me :), i sometimes get the nuances of 'its' as well ;)
00:15 ab5tract still, good suggestions, and all implemented
00:21 ab5tract so, goodnight #perl6! i hope the post does the calendar justice. usually it's the first thing i read on a December morning.. weird to have already read it :)
00:25 BenGoldberg joined #perl6
00:27 tadzik what should I know :o
00:27 tadzik oh, Polish audience :)
00:48 kurahaupo joined #perl6
00:48 anaeem1 joined #perl6
00:54 vendethiel joined #perl6
01:05 torbjorn how do you loop over grammar matches.. say $<foo>.elems says 4; # havent found anyone actually doing this, but i was trying: for $<foo> { ... } # no success
01:06 dwarring torbjorn: for @<foo> { ... } # try this
01:06 torbjorn ah indeed, thanks
01:06 timotimo alternatively $<foo>.list ought to work as well
01:07 torbjorn and it does too, thanks
01:08 timotimo for $foobar { } will only do a single iteration no matter what's in $foobar (except if you do evil sorcery maybe)
01:08 timotimo m: my $foobar := (1, 2, 3); for $foobar { say "tick" }
01:08 camelia rakudo-moar 725e26: OUTPUT«/bin/sh: lsb_release: command not found␤tick␤tick␤tick␤»
01:08 timotimo binding is evil sorcery
01:08 torbjorn yeah i think i understand
01:09 timotimo (because it replaces the container with the value)
01:09 torbjorn i need to know how sigils are used
01:10 TimToady yes, don't do that, it will probably be vorbotten someday
01:10 torbjorn does the bot execute perl6's stdout in shell?
01:10 torbjorn m: say "id"
01:10 camelia rakudo-moar 725e26: OUTPUT«/bin/sh: lsb_release: command not found␤id␤»
01:11 TimToady no, it's a first attempt at trying to load up $*DISTRO
01:11 TimToady obviously standing in some need of improvement :)
01:11 torbjorn ah yes
01:13 timotimo TimToady: binding a non-container to a $ variable?
01:20 vendethiel joined #perl6
01:28 Akagi201 joined #perl6
01:29 TimToady one should just say 'my \foo =' if one wishes to be non-committal
01:35 BenGoldberg m: my \foo = (1, 2, 3); for foo { say 'tick' }
01:35 camelia rakudo-moar 725e26: OUTPUT«/bin/sh: lsb_release: command not found␤tick␤tick␤tick␤»
01:51 vendethiel joined #perl6
02:01 dalek rakudo/nom: 6edc31b | TimToady++ | src/core/Distro.pm:
02:01 dalek rakudo/nom: parse /etc/os-release if it's there
02:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6edc31bc11
02:05 TimToady that should work for camelia
02:08 ash___ joined #perl6
02:28 jimmy__ joined #perl6
02:32 TimToady m: say $*DISTRO.name
02:32 camelia rakudo-moar 6edc31: OUTPUT«opensuse␤»
02:32 TimToady m: say $*DISTRO.version
02:32 camelia rakudo-moar 6edc31: OUTPUT«v12.3.Dartmouth␤»
02:32 TimToady m: say $*DISTRO
02:32 camelia rakudo-moar 6edc31: OUTPUT«opensuse (12.3.Dartmouth)␤»
02:32 TimToady m: say $*DISTRO.auth
02:32 camelia rakudo-moar 6edc31: OUTPUT«unknown␤»
02:33 TimToady m: say $*DISTRO.release
02:33 camelia rakudo-moar 6edc31: OUTPUT«12.3␤»
02:39 vendethiel joined #perl6
02:40 jimmy__ r: say $*DISTRO.signature
02:40 camelia rakudo-{parrot,moar} 6edc31: OUTPUT«(Blob)␤»
02:40 jimmy__ r: say $*DISTRO.desc
02:40 camelia rakudo-{parrot,moar} 6edc31: OUTPUT«(Str)␤»
02:52 chenryn joined #perl6
03:09 Mso150 joined #perl6
03:18 chenryn joined #perl6
03:20 noganex joined #perl6
03:29 KCL_ joined #perl6
03:49 vendethiel joined #perl6
04:15 vendethiel joined #perl6
04:20 tony-o did someone need something verified on osx?
04:23 perturbation left #perl6
04:32 kaare__ joined #perl6
04:46 kaare__ joined #perl6
04:47 kaare__ joined #perl6
05:04 sftp_ joined #perl6
05:06 jferrero_ joined #perl6
05:06 tinyblak joined #perl6
05:10 vendethiel joined #perl6
05:10 Woodi joined #perl6
05:12 araujo joined #perl6
05:12 tinyblak_ joined #perl6
05:15 salv0 joined #perl6
05:24 anaeem1_ joined #perl6
05:24 chenryn joined #perl6
05:36 PZt joined #perl6
05:56 kaare__ joined #perl6
05:58 kurahaupo joined #perl6
06:01 vendethiel joined #perl6
06:20 Woodi morning #perl6 :)
06:21 raydiak \o Woodi
06:25 Woodi TimToady: thanx. understood that normal ';' finishes lists and other sugars&magics.
06:28 TimToady depends on how you define "normal", but it's possible to see it the other way, that in statementlist context, the "normal" sublist separator semantics are hijacked to perform sequential execution of statements  :)
06:29 bjz joined #perl6
06:40 onebitboy joined #perl6
06:48 kaleem joined #perl6
06:48 khisanth_ joined #perl6
06:52 raydiak m: sub make-grammar (@chars) { grammar { token TOP { @chars+ } } }; make-grammar(<f o>).parse("foo").say # is this a reasonable way to attempt a "parametric grammar"?
06:52 camelia rakudo-moar 6edc31: OUTPUT«「foo」␤␤»
06:55 raydiak I wanted to just inherit, but then I have to define tokens instead of just pass a few lists and have the regex parts abstracted away entirely
06:55 anaeem1 joined #perl6
06:57 anaeem1_ joined #perl6
07:01 tinyblak joined #perl6
07:10 TimToady it's reasonable in the sense that it could work, but not reasonable in the sense that it will be very slow, since it would currently have to recompile @chars every time
07:11 raydiak every time you call make-grammar, or every time you call .parse?
07:11 TimToady probably every + at the moment
07:11 raydiak ouch
07:11 TimToady yeah
07:12 tinyblak joined #perl6
07:12 TimToady we don't attempt to detect whether the array is changing or not
07:12 TimToady it just assumes it did
07:13 aborazmeh joined #perl6
07:13 raydiak hrm
07:16 TimToady m: $_ = 'foo'; my @chars = 'f'; say / ^ [ @chars { @chars = 'o' } ]+ $/
07:16 camelia rakudo-moar 6edc31: OUTPUT«␤»
07:16 TimToady m: $_ = 'foo'; my @chars = 'f'; say / ^ [ @chars { @chars = 'f','o' } ]+ $/
07:16 camelia rakudo-moar 6edc31: OUTPUT«␤»
07:16 TimToady m: $_ = 'foo'; my @chars = 'f','o'; say / ^ [ @chars { @chars = 'f','o' } ]+ $/
07:16 camelia rakudo-moar 6edc31: OUTPUT«␤»
07:16 TimToady hmm
07:17 TimToady m: $_ = 'foo'; my @chars = 'f','o'; say / ^ [ @chars ]+ $/
07:17 camelia rakudo-moar 6edc31: OUTPUT«␤»
07:17 TimToady dunno why that's not matching
07:18 TimToady m: $_ = 'foo'; my @chars = 'f','o'; say / ^ @chars+ $/
07:18 camelia rakudo-moar 6edc31: OUTPUT«␤»
07:18 TimToady seems busted
07:18 TimToady m: $_ = 'foo'; my @chars = 'f','o'; say m/ ^ @chars+ $/
07:18 camelia rakudo-moar 6edc31: OUTPUT«「foo」␤␤»
07:18 TimToady m: $_ = 'foo'; my @chars = 'f'; say m/ ^ [ @chars { @chars = 'o' } ]+ $/
07:18 camelia rakudo-moar 6edc31: OUTPUT«「foo」␤␤»
07:19 TimToady yes, recomputes the NFA for @chars on every single char
07:19 FROGGS joined #perl6
07:19 raydiak could I get it to not do that by like building a string out of it and interpolating that into a rule or something?
07:20 TimToady not without an EVAL
07:21 raydiak that's a thought
07:21 TimToady well, you could probably distribute a <{ }>+ such that it would only calculate on entry to the <{ }>+, not every char
07:23 TimToady but maybe you'd have to return the + from inside the <{ }>
07:23 TimToady you could pass in a precompiled rule and call it, I suppose
07:23 TimToady rx// being the equivalent of p5's qr//
07:24 raydiak oh, yeah that's what I was just looking for
07:25 TimToady but rakudo isn't very good at having parameters to its rules yet, I suspect
07:26 raydiak I did get the feeling I was doing something uncommon
07:26 TimToady it doesn't actually parse regex assertions quite right to do that in the general case
07:26 FROGGS TimToady: have you seen that comment? https://github.com/perl6/nqp/commit/6b22cf4b8a8f1​81d90d2e7665badd789c1ed0928#commitcomment-8825586
07:27 TimToady m: my token foo($x) { $x }; $_ = 'foo'; say m/ <foo('o')>+ /
07:27 camelia rakudo-moar 6edc31: OUTPUT«「oo」␤ foo => 「o」␤ foo => 「o」␤␤»
07:27 TimToady well, I guess it does that bit
07:28 anaeem___ joined #perl6
07:29 TimToady FROGGS: no, but it's a good comment
07:29 FROGGS it is :o)
07:29 FROGGS I like code reviews
07:30 FROGGS sadly this does not happen at $work
07:31 dalek nqp: e910232 | TimToady++ | src/QRegex/NFA.nqp:
07:31 dalek nqp: fossil conditional noted by ptf++
07:31 dalek nqp: review: https://github.com/perl6/nqp/commit/e910232dd6
07:32 TimToady I think it's maybe proto regexes that aren't so good at parameters
07:33 raydiak well, maybe generating related grammars isn't going to work like I speculated, but at least now I have an idea how to make the existing Math::Symbolic::Grammar go faster
07:33 raydiak pretty sure I'm already doing some array stuff in there
07:34 raydiak b/c of how all the ops and syntax are defined in a list, declarative-like, then used by the grammar
07:35 TimToady here's where we could use an immutable tuple type
07:36 TimToady 'cuz a different value would have a different WHICH
07:36 TimToady (not that the code checks that currently)
07:36 masak morning, #perl6
07:36 raydiak morning masak
07:38 masak I notice that ab5tract++'s draft hasn't been published yet.
07:38 masak any special reason it hasn't? (I'm not fully backlogged.)
07:39 TimToady not that I know of
07:41 TimToady says today 8:00 am, which I assume is Zulu time
07:41 TimToady so another 20 minutes maybe
07:41 vti joined #perl6
07:41 masak yeah, just saw.
07:42 * masak waits patiently
07:54 BigBear joined #perl6
07:59 tinyblak_ joined #perl6
08:00 mvuets joined #perl6
08:09 zakharyas joined #perl6
08:10 fhelmberger joined #perl6
08:10 cosimo joined #perl6
08:13 blackbolt joined #perl6
08:14 sergot morning #perl6
08:14 moritz \o sergot, #perl6
08:16 darutoko joined #perl6
08:18 [Sno] joined #perl6
08:19 raydiak o/ sergot, moritz
08:22 telex joined #perl6
08:22 sergot raydiak o/
08:23 Ven joined #perl6
08:23 Mso150 joined #perl6
08:23 Ven o/, #perl6
08:23 blackbolt Hi, how can I create a new level window in GTK::Simple ?
08:24 raydiak \o Ven
08:26 * mvuets waves
08:41 masak ab5tract++'s post! \o/ http://perl6advent.wordpress.com/20​14/12/04/composers-coercers-and-the​-case-of-a-camels-curious-corner/
08:41 * masak reads
08:47 masak why Lisp macros are cool, by MJD: http://lists.warhead.org.uk/pipe​rmail/iwe/2005-July/000130.html
08:49 masak "People who come from the Perl and C world have a deep suspicion of source code transformation, because it's invariably unreliable." -- I wonder how much we can make that not be the case.
08:49 masak I mean, the first step of the solution to that is pretty clear already: work on trees.
08:50 masak I maintain that "hygiene" is a second, independent step, and that it can be implemented in many ways.
08:50 * FROGGS prefers his office
08:51 arnsholt Yeah, hygiene by default is good
08:51 masak arnsholt: my point is more, hygiene != trees.
08:51 arnsholt There are some arguments that you should be able to turn it off, but I'm not familiar enough with it to know whether that's actually a good idea or not
08:51 arnsholt Oh, definitely!
08:52 masak some people sloppily assume that it is, and say "hygienic macros" when they really only have AST-based macros.
08:52 masak an AST does not hygiene make.
08:52 arnsholt Certainly. CL for instance
08:52 masak right.
08:53 moritz but hygiene implies trees, no?
08:53 masak CL's solution famously being "just gensym EVERYTHING"
08:53 vendethiel joined #perl6
08:53 masak moritz: sorta.
08:53 arnsholt Yeah
08:53 masak moritz: I mean, I could be difficult and imagine a text-based macro system that was really careful and did stuff.
08:53 moritz I mean, I haven't seen a single, text-based hygienic macro system
08:53 arnsholt Actually, string-level transformations should have a some other name than "macro"
08:54 masak moritz: actually, lambda calculus is kind of in that direction.
08:54 moritz arnsholt: "source filter"
08:54 masak moritz: even though the normal operations in lambda calculus only have to do with application/evaluation, not macros.
08:54 arnsholt Yeah. Or "rusted spoon" =)
08:57 denis_boyun joined #perl6
08:59 masak I still haven't come down to an opinion about whether we'll want gensymming in Perl 6.
08:59 masak my macro grant proposal mentions it, but since then I've sort of thought about it differently.
09:02 moritz masak: what would we need gensymming for? my understanding was that we planned it for hygiene, but hygiene fell out of the scoping "for free"
09:03 masak it did.
09:03 masak (the waterbed cost for that is that lack of hygiene will be tricky to implement)
09:04 masak but yeah, I don't think we'll need gensyms for anything right now.
09:07 masak or, let me put it like this.
09:07 dalek specs: 111c2b5 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
09:07 dalek specs: Add empty gensym lemma (hint hint)
09:07 dalek specs: review: https://github.com/perl6/specs/commit/111c2b5c50
09:07 masak gensyms give you the ability to create something and then uniquely refer to it (a very little bit) later.
09:08 masak I believe we'll get that ability already by dint of Qtree nodes being uniquely identifiable.
09:11 dalek specs: c562974 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
09:11 dalek specs: Fill gensym lemma (masak++)
09:11 dalek specs: review: https://github.com/perl6/specs/commit/c562974edf
09:12 raydiak 'night * o/
09:12 lizmat gnight raydiak
09:12 masak lizmat: hm. do you have a source for "gensym" being "generic symbol" rather than "generated symbol"? the latter would make more sense to me.
09:12 lizmat ah, ok
09:12 lizmat no
09:13 masak I went to Wikipedia and could find no confirmation either way.
09:13 dalek specs: 5ab4260 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
09:13 dalek specs: Fix thinko, masak++
09:13 dalek specs: review: https://github.com/perl6/specs/commit/5ab42604e7
09:13 lizmat generated makes more sense to me in this context
09:14 lizmat in the old S17 spec, there was even a mention of a gensym() function
09:15 masak wow.
09:15 masak in the async/parallel synopsis?!
09:15 lizmat "method throttled::trait_auxiliary:<is> ($limit=1, :$key=gensym()) {"
09:15 lizmat no further mention than that
09:16 masak that's (a) a silly use of the word outside of macros
09:16 masak (b) completely unnecessary, what with `{}`
09:16 masak m: sub foo(:$key = {}) { return $key }; say foo() === foo()
09:16 camelia rakudo-moar 6edc31: OUTPUT«False␤»
09:17 lizmat I guess that's why the old S17 spec is no longer in the repo
09:20 lizmat grrrr.... wordpress just removed my "Draft" setting and Published my placeholder immediately
09:20 Ven masak: CL's solution is "we a lisp-2, lol"
09:20 dalek specs: bba0937 | masak++ | S99-glossary.pod:
09:20 dalek specs: clarify "gensym" entry a bit
09:20 dalek specs: review: https://github.com/perl6/specs/commit/bba0937b1a
09:22 lizmat masak++  :-)
09:23 lizmat afk for a few hours&
09:24 Ven placeholdeeers
09:25 cosimo joined #perl6
09:27 masak yeah. my next writeup is probably going to be about that.
09:27 masak actually, "placeholdeeers" is a pretty catchy title ;)
09:27 vendethiel joined #perl6
09:29 * arnsholt is an absolute maroon
09:31 ptc_p6 joined #perl6
09:31 dakkar joined #perl6
09:34 dalek snake: 465cf0f | (Arne Skjærholt)++ | src/Snake/World.nqp:
09:34 dalek snake: Fix a braino in previous commit.
09:34 dalek snake:
09:34 dalek snake: If you don't wrap the CompUnit with the setting lexical scope, the setting
09:34 dalek snake: won't work. Durr.
09:34 dalek snake: review: https://github.com/arnshol​t/snake/commit/465cf0f7dd
09:42 Ven masak: well, feel free to use it ;-)
09:43 Ven masak: considering your current rhythm, you should've done a "consistent december", with 24 blog posts :P
09:45 masak if only.
09:46 bjz joined #perl6
09:47 masak today's autopun: "I'm kind of in two minds about this whole Schroedinger's cat thing..."
09:48 mephinet joined #perl6
09:48 tinyblak joined #perl6
09:51 ptc_p6 joined #perl6
09:59 vendethiel joined #perl6
10:02 rt joined #perl6
10:03 virtualsue joined #perl6
10:04 fhelmberger joined #perl6
10:05 BigBear joined #perl6
10:07 [Tux] joined #perl6
10:10 rurban joined #perl6
10:15 abraxxa joined #perl6
10:20 brrt joined #perl6
10:20 brrt \o
10:20 brrt ping nwc10
10:20 JimmyZ_ o/
10:20 yoleaux 3 Dec 2014 21:18Z <nwc10> JimmyZ_: I was hacking on fakecutables. Mailed to perl6-compiler@perl.org
10:21 nwc10 here, or there?
10:21 brrt hey
10:21 brrt here i suppose. i was also hacking on fakecutables
10:21 nwc10 I didn't know that.
10:21 JimmyZ_ brrt: but you're static one?
10:21 brrt no, also not in general, just in the specific case of perl6
10:22 brrt yes, that's much the same idea isn't it?
10:22 nwc10 anyway, the actual "fakecutables" part wasn't hard.
10:22 nwc10 it was the Makefiles
10:22 * brrt nods
10:22 nwc10 and, also, I've "stopped"
10:22 nwc10 so you're welcome to take/ignore/whatever I did
10:22 nwc10 but I think it's important to start making the tool scripts in NQP
10:22 brrt ah... hmm
10:22 brrt why? we already make the configure scripts in perl5
10:23 nwc10 long term this is futile
10:23 brrt true
10:23 nwc10 it would be like the Perl 5 build system still being written in Perl 4
10:23 brrt true
10:23 nwc10 and then having to keep Perl 4 around just to build Perl 5
10:23 brrt but on the other hand, there's nobody that ships with a default nqp yet
10:23 nwc10 it's also, I feel, a mistake that Parrot made
10:23 moritz the new hardware for the p6 community server has arrived
10:23 JimmyZ_ \o/
10:24 nwc10 the crazy bit is that I inadvertently demosntrated something that masak figured out - we can ever write NQP's *configuration* system in NQP
10:24 nwc10 parrot didn't dogfood parrot in any part of the build system
10:24 nwc10 admittedly NQP has a lot of dogfood, being self hosting
10:24 moritz next stage: build in to the racks, cabling
10:25 nwc10 but it would be good to start to write build systems in the host language
10:25 nwc10 to find the problems there
10:25 brrt ok, fair enough; could we ship an nqp binary yet?
10:25 nwc10 brrt: I don't think that it matters
10:25 nwc10 we do. it's "stage0"
10:25 brrt true :-)
10:25 JimmyZ_ btw: rust doesn't use libuv anyway.
10:26 nwc10 I can do this from a *clean* NQP directory:
10:26 nwc10 ../MoarVM/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm -e 'for nqp::backendconfig() { say(qq{moar::{$_.key}={$_.value}}) }'
10:26 brrt i see.. that's nice already
10:26 pecastro joined #perl6
10:26 nwc10 it is somewhat mind bending
10:27 brrt yes
10:27 nwc10 the only part of Configure.pl that can't be NQP is the bit that figures out how to find a backend VM
10:27 brrt that can be a shell script, but that doesn't work on windows... :-)
10:28 brrt although
10:28 brrt what if we'd use the moarvm included minilua to do that
10:28 FROGGS let's just use CMake :P
10:28 brrt muhahah
10:28 nwc10 brrt: I am sort of thinking that actually. 1 shell script, 1 batch file, and one README (for anywhere else)
10:28 nwc10 FROGGS++
10:28 nwc10 FROGGS: I think you can now see what I was up to
10:29 Woodi when I was doing Rakudo on Parrot (probably year ago) I liked standard VM auto-discovery. Mkudo needs switches...
10:29 nwc10 dogfood!
10:29 FROGGS yeah :o)
10:29 moritz nwc10: note that rakudo's and NQP's configure also build the backend(s) for you
10:29 nwc10 moritz: bother yes. I forgot that. I remembered that on the tram
10:29 * brrt doesn't know CMake. at all
10:29 nwc10 (on the way to work, thining about it)
10:50 pmurias joined #perl6
10:54 pmurias nwc10: maybe we could have the system dependent part in both perl5 and batch script/shell script?
11:00 chenryn joined #perl6
11:11 tinyblak_ joined #perl6
11:13 kurahaupo joined #perl6
11:19 Hor|zon joined #perl6
11:32 vendethiel joined #perl6
11:32 rindolf joined #perl6
11:40 [Sno]_ joined #perl6
11:50 bjz joined #perl6
11:58 [Sno]_ joined #perl6
12:03 vendethiel joined #perl6
12:04 cosimo joined #perl6
12:13 lizmat jnthn: would you object to $supply.close without parameters closing *all* taps on the supply
12:14 lizmat .oO( ADD or Advent Driven Development )
12:14 bjz joined #perl6
12:16 lizmat multi method close(Supply:D:) { self.close($_) for self.tappers }
12:17 anaeem1_ joined #perl6
12:21 masak nwc10: I think there should be a repository collecting all the todos/milestones towards build system dogfoodhood.
12:26 tinyblak joined #perl6
12:28 timotimo moritz: yay hardwares
12:31 bjz joined #perl6
12:32 TuxCM joined #perl6
12:37 dalek gtk-simple: d8a4d18 | (Timo Paulssen)++ | lib/GTK/Simple.pm6:
12:37 dalek gtk-simple: quick and dirty implementation of GTK::Simple::Window
12:37 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/d8a4d18069
12:44 Ugator joined #perl6
12:46 lizmat jnthn: do you think we can guarantee that all taps on a supply will be always run in the order that they were created ?
12:53 Ulti Out of interest is there a reason for the trend of ::Simple in Perl6 when there isn't a normal module yet? My assumption was in P5 it was mostly because name spaces got taken and older APIs were just a massive nest of horror because it was the early 90s...
12:55 tadzik Ulti: I think it's a bit like "I started it as a small project for a single purpose and it accidentally became the Real Thing" :P
12:55 Ulti Email::Simple Auth::PAM::Simple HTTP::Server::Simple when all of the sans ::Simple don't exist just feels kind of odd :S
12:55 Ulti all modules start simple though
12:56 timotimo Ulti: jnthn called it GTK::Simple because he expected someone else would want to build a "proper" binding to replace it :P
12:57 mvuets i guess it might be an excuse to build quick & dirty implementation
12:57 timotimo hehehe
12:57 Ulti like I get stressed at the thought of taking Stats already... when I have only five super basic stats functions
12:58 timotimo the way i add new stuff to GTK::Simple is pretty darn random
12:58 Ulti I understand the impulse for ::Simple but it just looks a bit silly on the modules listings :P
12:58 Ulti in fact I'd go as far to say that all the ::Simple are the non simple modules lol
12:59 Ulti as in they are harder things to implement
12:59 timotimo i'm not ready to commit to being a full-blown proper bona fide library author and stuff
12:59 Ulti lol
12:59 Ulti but you're comfortable being a core language hacker :D
13:00 Ulti I think a lot of people will eventually grok Rakudo internals because it's all in a language the users know :)
13:01 timotimo nah, because you can't get far without becoming a core hacker! oh, wait, that was 2010 :P
13:03 Ulti yeah a no. of modules with time plot might be quite interesting I guess you can get that from the manifest file
13:05 Ulti I was shocked when I finished writing a P6 module to do soundex that it was already on there :) so now I'm working on some extra phonetic algorithms
13:06 kaleem joined #perl6
13:19 lizmat http://www.extremetech.com/extreme/1953​17-watch-nasas-orion-launch-live-video
13:19 lizmat T minus 8 minutes
13:22 lizmat T minus 5
13:23 colomon lizmat: did you come up with a topic for a post?
13:23 lizmat Supplies
13:23 colomon cool
13:24 colomon hold again on the launch?
13:24 lizmat yes, sounds like it
13:26 lizmat just over 1 hour of launch window left
13:32 * masak .oO( the topic is a bit of a Supplies )
13:33 lizmat fwiw, I'm actually writing a test-file to go along with it, so people can more easily play with the code
13:33 smls joined #perl6
13:34 smls o/
13:34 lizmat smls \o
13:35 smls lizmat: Why is you IO advent post no longer listed? I was looking forward to that... :)
13:35 lizmat so was I, but I felt the timing was wrong
13:36 lizmat maybe in ~ 10 days
13:36 smls ok
13:39 masak <placeholder for joke about how I/O is all about sequencing and side effects>
13:40 smls .seen ab5tract
13:40 yoleaux I saw ab5tract 00:21Z in #perl6: <ab5tract> so, goodnight #perl6! i hope the post does the calendar justice. usually it's the first thing i read on a December morning.. weird to have already read it :)
13:41 smls .tell ab5tract The subheadings in your advent post should all be demoted by one level (h2-->h3, h3-->h4), because the post title automatically becomes a h2, which makes h2 subheadings look slightly awkward on the post's own page, and *very* awkward on the front page which shows the most recent articles.
13:41 yoleaux smls: I'll pass your message to ab5tract.
13:42 masak ab5tract: I like how your post is basically about a personal journey.
13:46 masak ab5tract: nit: the fact that `BUILD` is all-caps has nothing whatsoever to do with Huffman coding. its length would be unchanged if it was spelled not-in-all-caps.
13:46 lizmat masak: it's one more keypress
13:47 masak right. anyway, the argument can not be made that it "shares Huffman coding".
13:48 masak such an argument could maybe be made if we named it `Bui` or something, to be just as prominent as `Int` and `Str` and `Num`.
13:54 aborazmeh joined #perl6
13:55 anaeem1_ joined #perl6
14:03 moritz right, it's about standing out, not about length
14:03 jluis joined #perl6
14:03 timotimo to  be fair, the supply of allcaps words is kind of limited
14:03 FROGGS moritz: length is banned in Perl 6, please use something else :o9
14:03 FROGGS err, :o)
14:04 moritz FROGGS: chars :-)
14:07 Hor|zon joined #perl6
14:11 masak Huffman coding *is* about length. it's used both in the shortening and lengthening direction, though. (and called "de-Huffmanization" when something was deemed too short for its relative unimportance.)
14:11 masak my point is that making `BUILD` all-caps has nothing to do with its length and nothing to do with Huffmanization.
14:37 lizmat launch scrubbed for today :-(
14:38 timotimo no perl 6.0.0 launch today? :(
14:39 lizmat Orion's launch
14:39 lizmat or more precisely: the Orion Flight Test
14:39 lizmat http://www.extremetech.com/extreme/1953​17-watch-nasas-orion-launch-live-video
14:40 * masak .oO( will not go to space today ) :(
14:47 BigBear joined #perl6
14:48 kaare_ joined #perl6
14:50 virtualsue joined #perl6
14:56 raiph joined #perl6
14:57 onebitboy joined #perl6
14:58 arnsholt Aww, Orion cannot into space? =)
15:03 lucas___ joined #perl6
15:03 masak vendethiel: sanity check about having understood   Gjorde diagram till Git Advanced (Gerrit).
15:04 masak ergh.
15:04 masak vendethiel: sanity check about having understood https://github.com/jashken​as/coffeescript/pull/3171 correctly.
15:04 lucas___ m: my @a = 1,Nil,2; say .WHICH for @a
15:04 camelia rakudo-moar 6edc31: OUTPUT«Int|1␤Int|2␤»
15:05 treehug88 joined #perl6
15:05 masak macro.codeToNode takes a function as input, and returns an AST of the function.
15:05 lucas___ So, will Nil disappear or be there in the future?
15:07 masak this AST has a .subst method, which allows substitution of symbols. it's exclusively used to bind the macro's parameters to local variables inside the function.
15:09 masak essentially .subst is a kind of s:g/// on the AST node level. I'm guessing/hoping it even respects lexical shadowing.
15:11 masak um, provided coffeescript has that. I forget.
15:12 masak ooh, and there's also macro.valToNode, whose use should be obvious.
15:17 vendethiel joined #perl6
15:23 * masak gets lost trying to confirm his suspicions about what the {c1,c2,c3,c4} object literal shorthand means in cs
15:24 masak anyway, there's something here that's pretty similar to the way we do it in Perl 6.
15:24 masak that is, a macro is something that returns an AST.
15:25 masak when the macro gets invoked, at parse-time, it runs, produces its AST, and that AST is spliced into the code being generated, in place of the macro call.
15:28 mr-foobar joined #perl6
15:30 BigBear joined #perl6
15:38 masak actually, the biggest difference seems to be that vanviegen++'s macros ditch quasi quotes and unquoting, and go with .subst-from-the-outside instead.
15:39 davido_ joined #perl6
15:40 vendethiel joined #perl6
15:41 dalek snake: bbe35be | (Arne Skjærholt)++ | t/class.t:
15:41 dalek snake: Add simple test file for classes.
15:41 dalek snake: review: https://github.com/arnshol​t/snake/commit/bbe35be882
15:41 dalek snake: 3fb29bb | (Arne Skjærholt)++ | src/ (3 files):
15:41 dalek snake: First stab at function objects.
15:41 dalek snake: review: https://github.com/arnshol​t/snake/commit/3fb29bbcae
15:47 sven_123_ joined #perl6
15:53 masak arnsholt++
15:53 adu joined #perl6
15:57 jluis joined #perl6
16:03 treehug88 is christmas coming?
16:03 masak faster than you might think.
16:03 sven_123_ joined #perl6
16:03 tinyblak_ joined #perl6
16:03 treehug88 one can dream
16:04 arnsholt Christmas is already here, it's just unevenly distributed
16:04 arnsholt (With apologies to William Gibson =)
16:05 masak it might be that not only is Christmas unevenly distributed, but the time-derivative of Christmas is also unevenly distributed...
16:06 masak thus, for some, Christmas is coming quite fast, for others it's coming more slowly, and for yet others, Christmas might be receding.
16:08 Hor|zon joined #perl6
16:09 hoelzro o/ #perl6
16:10 hoelzro Rakudo doesn't support destructors yet, does it?
16:11 lizmat t supports DESTROY on moar, if you mean that
16:12 hoelzro that's exactly what I mean =)
16:13 hoelzro that's non-determinstic, right?
16:13 hoelzro does Perl 6 have something like using(...) in C# or with in Python?
16:13 lizmat yes
16:13 arnsholt given($foo) { ... }
16:13 lizmat m: class { method DESTROY { say "goodbye" } }.new
16:13 camelia rakudo-moar 6edc31: ( no output )
16:14 lizmat although I don't think you can rely on DESTROY being called at all, apparently
16:14 lizmat hoelzro: I'm not sure what you mean with given($foo) { ... }
16:15 lizmat it seems to have superstitious parens at the least  :-)
16:15 arnsholt Oh, whoops
16:15 arnsholt That's me not programming enough Perl 6
16:15 hoelzro with in Python guarantees that __exit__ will be called on an object before the block exits
16:15 hoelzro I *think* that my $something will close = ... would do it
16:15 hoelzro but I'm wondering if there are other ways
16:16 arnsholt Oh, right. Given doesn't do that stuff
16:16 betterwo1ld joined #perl6
16:16 integral joined #perl6
16:16 integral joined #perl6
16:16 retupmoc1 joined #perl6
16:16 japhb_ joined #perl6
16:16 bcode_ joined #perl6
16:16 brother joined #perl6
16:16 lizmat m: my $a will leave { say "goodbye" }
16:16 camelia rakudo-moar 6edc31: OUTPUT«goodbye␤»
16:16 lizmat is that what you mean?
16:17 masak superstitious parens, and if you actually write it without a space: `given($foo)`, then Perl 6 will go off looking for a &given sub.
16:17 hoelzro lizmat: yes
16:17 masak m: my $foo = 42; given($foo) { .say }
16:17 camelia rakudo-moar 6edc31: OUTPUT«[31m===[0mSORRY![31m===[0m�Word 'given' interpreted as 'given()' function call; please use whitespace instead of parens�at /tmp/hc1U_XfXgw:1�------> [32mmy $foo = 42; given[33m�[31m($foo) { .say }[0m�Unexpected block in infix position (tw…»
16:17 hoelzro LEAVE { $a.close } would do it too, right?
16:17 masak m: my $foo = 42; given($foo); sub given($) { say "OH HAI" }
16:17 camelia rakudo-moar 6edc31: OUTPUT«OH HAI␤»
16:18 lizmat m: LEAVE say "goodbye"
16:18 camelia rakudo-moar 6edc31: OUTPUT«goodbye␤»
16:18 lizmat the "will leave" syntax is mostly syntactic sugar
16:18 hobbified joined #perl6
16:18 pnu joined #perl6
16:18 pnu joined #perl6
16:19 dylanwh_ joined #perl6
16:19 Akagi201 joined #perl6
16:20 ingy joined #perl6
16:20 hoelzro mkay
16:20 hoelzro and NativeCall - I forget, does it support callbacks?
16:21 colomon hoelzro: pretty sure yes
16:21 arnsholt You can pass a Perl 6 sub to C
16:21 * lizmat hopes someone else will be able to answer that one as she s a complete NativeCall noob
16:21 arnsholt But can't invoke function pointers returned from C
16:21 hoelzro arnsholt: that's acceptable
16:21 hoelzro that's in jnthn's repo?
16:21 arnsholt Yeah
16:22 hoelzro cool =)
16:22 geekosaur joined #perl6
16:22 hoelzro I'll see if I can update the README
16:22 hoelzro arnsholt: what's the invocation for that look like?
16:22 sven_123_ joined #perl6
16:22 hoelzro let's say I have a C function set_callback(int (*cb)(void *, const char *))
16:22 arnsholt Err, can't remember off-hand. There's a test file you can look at
16:22 hoelzro ok, cool
16:22 hoelzro that'll do fine
16:26 FROGGS joined #perl6
16:37 Hor|zon joined #perl6
16:38 adu joined #perl6
16:43 tinyblak joined #perl6
16:44 telex joined #perl6
16:45 masak who wants to grab Tuesday and Wednesday next week? https://github.com/perl6/mu/blob/ma​ster/misc/perl6advent-2014/schedule
16:45 masak er, Tuesday *or* Wednesday, I should say.
16:57 sven_123__ joined #perl6
17:03 spider-mario joined #perl6
17:06 BigBear joined #perl6
17:10 flussence ooh, this is cool: http://www.qemu-advent-calendar.org/
17:17 j4jackj joined #perl6
17:18 Hor|zon joined #perl6
17:19 Akagi201 joined #perl6
17:22 karb joined #perl6
17:35 adu joined #perl6
17:38 * moritz recently learned that KVM uses qemu to run its guest machines
17:42 ab5tract joined #perl6
17:44 ab5tract masak: re: huffman coding.. i never thought of it as entirely length based
17:44 yoleaux 13:41Z <smls> ab5tract: The subheadings in your advent post should all be demoted by one level (h2-->h3, h3-->h4), because the post title automatically becomes a h2, which makes h2 subheadings look slightly awkward on the post's own page, and *very* awkward on the front page which shows the most recent articles.
17:44 * TimToady either
17:44 ab5tract .tell smls takend care of :)
17:44 yoleaux ab5tract: I'll pass your message to smls.
17:45 ab5tract TimToady: i probably got that impression from you then :)
17:45 BigBear joined #perl6
17:45 TimToady I think BUILD is at least twice as hard to type, because you have to hold down the shift while typing
17:45 TimToady if you've disabled caps lock like me
17:45 TimToady even if not, that's two extra keys
17:46 TimToady Huffman Coding is really just shorthand for "easy things should be easy, and hard things should be possible"
17:46 TimToady and BUILD is harder than build :)
17:47 TimToady the length (oops) of a keyword is just one manifestation of the general principle
17:47 TimToady there's also the reader's mental energy of processing and/or ignoring, which is also higher for BUILD than for build
17:48 TimToady on some level
17:48 TimToady though if someone wrote 'method build' it'd certainly be a head scratcher :)
17:48 ab5tract :)
17:50 gtodd joined #perl6
17:50 ab5tract i guess i always had some implicit understanding of 'shortest way to encode a meaning consistently' .. so '*' means whatever, which means when you see it doing in a signature, it still means that, but in a contextual way that means 'whatever args, put in a single list'
17:51 ab5tract but clearly from the wikipedia description, that's stretching the original meaning quite a bit
17:51 TimToady kind of a glob there
17:52 TimToady but a glob is a kind of whatever
17:52 ab5tract :)
17:52 TimToady or maybe kind of a multipler in a sig
17:52 TimToady *plier
17:52 TimToady "can match more than one"
17:52 TimToady also see regex
17:52 FROGGS_ joined #perl6
17:52 TimToady "can match more than zero" is more better
17:53 TimToady but in all cases, still kinda means "you figure this out, not me"
17:54 TimToady and ** kinda means "you figure these out harder"
17:56 tinyblak joined #perl6
17:58 tinyblak joined #perl6
17:58 rurban joined #perl6
18:03 xinming joined #perl6
18:04 karb TimToady: As per pmichaud's blog on GLR, $list.map(&block) iterates $list's contects and map(&block, $list) iterates once applying &block once on $list. Is this because methods are considered privileged subs that can "look into" the list object's contents?
18:07 kurahaupo joined #perl6
18:07 TimToady it's because methods pay no attention to the $ vs @ distinction, while list flattening pays a great deal of attention to it
18:09 karb Okay. But in this case it is more about whether a block is applied on the contents of the container vs the block being applied on the container itself
18:10 karb I could not link the list flattening with this view
18:10 moritz but that's what it's all about
18:10 moritz map(&block, $L1, $L2, $L3) will apply &block to $L1, $L2, $L3
18:11 moritz independently of what's inside those $Ls
18:11 moritz because the $ tells it "it's an item, don't look inside"
18:11 moritz so, it doesn't flatten them, even if they are lists
18:12 moritz whereas for $L.map(&block), to a first approximation, the .map method doesn't even see that it's from inside a container
18:12 moritz because the method is dispatched on the value inside the container, not on the container
18:12 karb Okay. I was looking at list flattening as applicable only in converting map(&block, ($L1, $L2, $L3)) to map(&block, $L1, $L2, $L3)
18:14 moritz karb: the rabbit hole is deeper :-)
18:14 karb I see that :-)
18:14 aborazmeh joined #perl6
18:16 vendethiel joined #perl6
18:17 TimToady (...) is comparable to @list there, while [...] would be comparable to $list
18:20 vendethiel masak: sorry, but my backlog is cut here :P /me goes to irclog.perlgeek.de
18:20 vendethiel masak: but from what I read, "yes"
18:21 KCL_ joined #perl6
18:22 TimToady it's sort of the singular/plural distinction that is more natural in British English than in American English: "The committee is tasked with deciding this." vs "The committee are largely undecided on this."
18:23 NotJack joined #perl6
18:23 TimToady in Perl 6 this is conveyed with $committee vs @committee, without reliance on which verb you choose
18:23 TimToady method dispatches, by their nature, however, are naturally singular
18:24 aborazmeh joined #perl6
18:25 TimToady so @ corresponds more to the "members of the committee" that an American would feel compelled to circumlocutalize with
18:25 karb so method dispatches would naturally keep the structure
18:26 TimToady it's like the difference between argument processing on Unix vs Windows
18:26 TimToady in Windows the process has to do all the work, while in Unix, the shell does most of the work
18:27 TimToady well, at least old-time windows, dunnow about powershell
18:27 Sqirrel joined #perl6
18:27 karb why does map(&block, $L1, $L2) not flatten $L1 and $L2 into a single list
18:27 TimToady because you told it not to
18:28 TimToady that's what $ means
18:28 karb with $  ?
18:28 karb okay
18:28 TimToady Perl 6 inflects its nouns for singular/plural
18:29 virtualsue_ joined #perl6
18:31 Mso150 joined #perl6
18:38 treehug88 joined #perl6
18:41 TimToady well, Perl does, in general
18:44 aborazmeh joined #perl6
18:49 NotJack coming from APL/J/K, I'm now unused to making the distinction between singular and plural
18:50 TimToady well, everything is plural there :)
18:50 NotJack year
18:50 NotJack yeah
18:50 NotJack singular/plural seems to me like inflecting my verbs to agree with the color of my interlocutor's hair
18:50 NotJack weird and irrelevant
18:51 TimToady in Japanese you inflect your verbs to agree with the status of who you're speaking to, and who you're talking about :)
18:52 NotJack so is it *grammatically* wrong to say "Hey dude!" to the Emperor?
18:52 TimToady basically :)
18:54 NotJack in some Amazon basin languages I believe there are inflections for communicating how you *know* whatever you're discussing
18:54 NotJack first hand information, hearsay, information from a trusted informer, etc
18:54 TimToady and in some African languages too
18:54 NotJack I guess because they don't have written records?
18:55 arnsholt French does it as well, in newspaper language
18:55 arnsholt Using the conditional to mark uncertain knokwledge
18:56 ab5tract joined #perl6
18:56 TimToady we inflect those with "I hear...", "I was told...", "I know" etc. along with our vestigial subjunctives
18:57 TimToady and our modals, of course
18:57 TimToady "I might" is arguably our optative
18:58 TimToady Anyway, languages differ not so much in what you can say, as in what you have to say.
18:58 TimToady and Perl requires you to say singular or plural, except when it doesn't
19:00 TimToady and languages that don't have mandatory number still have ways to express that when necessary
19:01 TimToady just as we still can distinguish a pair of oxen from 3 or more, despite having lost the dual
19:02 TimToady I suppose it's not surprising that Ruby uses the Japanese approach to pluralizing, while Perl uses the English.  :)
19:03 ab5tract "except when it doesn't" -- these kinds of statements always make me want to see an example :)
19:04 TimToady my \foo = something(); say foo
19:04 TimToady depends on whether something returned a $ or a @
19:06 TimToady m: my \foo = (1,2,3); .say for foo
19:06 camelia rakudo-moar 6edc31: OUTPUT«1␤2␤3␤»
19:06 TimToady m: my \foo = [1,2,3]; .say for foo
19:06 camelia rakudo-moar 6edc31: OUTPUT«1 2 3␤»
19:10 timotimo who let this language nerd in here :)
19:13 masak vendethiel: having mulled over it for dinner, I think I have a fairly clear picture about the risks of the substitution thing.
19:13 TimToady everyone, apparently
19:13 timotimo \o/
19:13 masak TimToady: welcome! :D
19:13 masak vendethiel: gonna write it up.
19:13 vendethiel masak: nice :-)
19:14 TimToady he didn't say they were acceptable risks, or that he'd write it up well... :P
19:14 vendethiel masak: (I was just pointing you to it because it's a similar approach, not because it's a good one)
19:14 masak nodnod
19:15 masak don't worry, I won't scapegoat anyone.
19:15 * masak cackles
19:15 * vendethiel looks up "cackling"
19:17 * TimToady makes his escape
19:20 masak "To make the shrill cry characteristic of a hen after laying an egg."
19:21 masak "To laugh or talk in a shrill manner."
19:22 lizmat "chicken" !
19:22 BigBear joined #perl6
19:23 rurban joined #perl6
19:25 KCL_ joined #perl6
19:31 * moritz just set up a kvm guest locally, to practice for the p6c server
19:31 dalek perl6-roast-data: 15641dd | coke++ | / (5 files):
19:31 dalek perl6-roast-data: today (automated commit)
19:31 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/15641dd842
19:31 dalek perl6-roast-data: 879ce71 | coke++ | / (5 files):
19:31 dalek perl6-roast-data: today (automated commit)
19:31 colomon moritz++
19:31 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/879ce71dd2
19:39 moritz the server has been mounted in the rack today, and cabled
19:39 moritz so it just waits for me to show up and configure
19:41 colomon \o/
19:47 [Coke] parrot clean, still failures on moar (jit and non jit failing differently)
19:49 dalek snake: 42ad961 | (Arne Skjærholt)++ | src/Snake/Metamodel/ClassHOW.nqp:
19:49 dalek snake: Dead code removal.
19:49 dalek snake: review: https://github.com/arnshol​t/snake/commit/42ad961d91
19:49 dalek snake: e635745 | (Arne Skjærholt)++ | src/Snake/Metamodel/ClassHOW.nqp:
19:49 dalek snake: Stub in a cheaty stringification for Python objects.
19:49 dalek snake: review: https://github.com/arnshol​t/snake/commit/e6357452b0
19:49 dalek snake: 06becc4 | (Arne Skjærholt)++ | src/ (2 files):
19:49 dalek snake: Simpler builtin function handling.
19:49 dalek snake: review: https://github.com/arnshol​t/snake/commit/06becc4ca5
19:49 lizmat [Coke]: I assume the failures are different every run ?
19:51 [Coke] lizmat: I can check a few.
19:53 [Coke] pretty much. some overlap, not much. 4 days ago we had a clean run
19:54 [Coke] (looking at -jit only
19:55 lizmat on OS X, right ?
19:56 [Coke] yes.
19:57 immortal joined #perl6
19:57 brother joined #perl6
19:58 lizmat at the Amsterdam.PM meeting I was talking about this
19:58 bcode joined #perl6
19:58 lizmat and someone suggested we should at least try switching off memory compression to see whether that makes a difference
19:58 mvuets joined #perl6
19:58 integral joined #perl6
19:58 integral joined #perl6
20:02 [Coke] lizmat: trying that now
20:02 lizmat can you do that without a reboot ?
20:02 masak m: macro swap($a, $b) { quasi { ({{{$a}}}, {{{$b}}}) = {{{$b}}}, {{{$a}}} } }; my $w = 5; my $z = 10; swap $w, $z; say [$w, $z].perl
20:02 camelia rakudo-moar 6edc31: OUTPUT«[10, 5]␤»
20:02 masak \o/
20:02 denis_boyun_ joined #perl6
20:05 ptc_p6 joined #perl6
20:05 [Coke] lizmat - nope, reboot required
20:05 lizmat yeah, thought so  :-(
20:05 lizmat waiting for a good time to try that myself  :-)
20:06 [Coke] lizmat; of course, everything feels slower now. :)
20:06 [Sno] joined #perl6
20:06 lizmat is it that noticeable ?
20:06 [Coke] if that's what it is, what the hell do we do to fix it?
20:08 [Coke] spec test passed 1005
20:08 [Coke] er, 100%
20:08 lizmat so, no problems all of a sudden ?
20:08 colomon what's the memory compression thing?
20:08 [Coke] I don't normally run with make spectest, I use test_summary, but did TEST_JOBS=12 make spectest and no errors.
20:08 lizmat wow
20:08 [Coke] this -without- a rebuild.
20:09 colomon try with test summary?
20:09 lizmat I was thinking that maybe *memory* pressure would be the reason for failings
20:09 lizmat rather than CPU pressure
20:09 lizmat and memory pressure would result in compression I gues
20:10 lizmat so I'm wondering whether we wouldn't need some flag to clang to make it safe
20:11 hoelzro is there a way to tell NativeCall "hey, don't free this string"
20:11 hoelzro I see that 08-callbacks.t uses strdup to kind of get around this
20:16 [Coke] lizmat: memory compression shouldn't be altering the behavior of -any- program, I would think.
20:16 [Coke] my academic friend suggests we bugreport this to apple.
20:16 [Coke] (test summary isn't multi-threaded, this will take a while)
20:17 lizmat perhaps we should report it, yes
20:17 [Coke] Let's see if you can reproduce the finding.
20:18 lizmat after I finish my advent post
20:18 lizmat :-)
20:19 [Coke] aha. no, I'm still getting malloc errors with test_summary
20:19 lizmat ah, ok  well, it was a thought  :-)
20:20 timotimo hoelzro: is managed or something is the name of the trait
20:22 hoelzro timotimo: the only Parameter trait I see that applies to Parameters deals with encodings
20:23 timotimo oh
20:23 timotimo worst case: create it as a buf of int8
20:24 hoelzro hmm, good idea
20:25 timotimo oh
20:25 timotimo hm, no, nativecasting it to a CArray wouldn't work
20:26 hoelzro no?
20:26 timotimo probably not
20:26 hoelzro well, I see that strings in src/core/nativecall.c in MoarVM are always freed if they're parameters
20:26 hoelzro which seems wrong for callbacks
20:27 hoelzro libraries that use callbacks tend not to require callbacks to clean up a string themselves
20:27 timotimo maybe the answer is "if you want a long-living blob of characters, you really want a CArray rather than a Str coerced into a CString"
20:29 gfldex joined #perl6
20:38 ugexe ab5tract++
20:38 virtualsue joined #perl6
20:41 hoelzro ab5tract++ indeed
20:46 arnsholt hoelzro: There's explicitly-manage (or something like that)
20:47 arnsholt To prevent too early frees
20:47 arnsholt Is ugly as hell, but sort of works
20:47 hoelzro ah, sure enough
20:47 hoelzro I see it's not a trait
20:47 arnsholt There are a lot of rough edges in NativeCall, once you start doing real things
20:47 hoelzro I was thinking it'd be something like Str is dont-free
20:47 timotimo ah, it's not a trait, it's a sub
20:48 arnsholt Yeah
20:50 arnsholt The "correct" (FSVO correct) way to handle strings would be encoding the string into Buf, copying the Buf into a CArray and then passing that off to C
20:52 BigBear joined #perl6
20:58 moritz why not encode straight to a buf8?
21:05 vti this code hangs rakudo+moarvm: perl6  -e 'my $re; $re = rx/$re/; say 1.match($re)'
21:05 lizmat same problem as:
21:06 lizmat m: my @a; @a[0] = @a; @a.perl
21:06 arnsholt moritz: buf8 is a Buf, isn't it?
21:06 camelia rakudo-moar 6edc31: OUTPUT«(timeout)»
21:06 jnthn No, it's not. The latter is potentially fixable. The first is a straight out infinite recursion.
21:06 hoelzro arnsholt: isn't that kind of what NativeCall does?
21:07 arnsholt No, NativeCall doesn't handle any of that stuff ATM
21:07 jnthn vti: What did you expect it to do? It's a pretty obvious "will never terminate" to me...
21:07 lizmat perhaps a /"$re"/ ?
21:08 vti jnthn: i thougt rx// is smth like qr//, i wanted to compile a regex from a string
21:08 adu joined #perl6
21:09 jnthn vti: /<$the_string>/ and don't re-use the same var for the regex and the string. :)
21:09 jnthn It should be smart enough to cache it after first evaluation, iirc.
21:11 vti jnthn: ah
21:11 vti jnthn: thanks
21:13 pecastro joined #perl6
21:15 arnsholt hoelzro: NativeCall *should* handle it though. If you extend it do handle that stuff a PR would be excellent
21:15 vti jnthn: that's because of 'my $foo = $foo++' thing?
21:16 vti jnthn: so $rx on the right is already a regex
21:17 hoelzro arnsholt: I already have a list of things I want to do with it =)
21:17 jnthn The latter part is true, the first one I'm not sure I see quite so much... The way I think of it is that since regexes are first class in Perl 6, then a regex referring to a variable outside of it is just a closure.
21:17 Mso150 joined #perl6
21:17 jnthn Uh, first class *code objects* is probably what I wanted to say :)
21:20 arnsholt hoelzro: Sounds excellent!
21:20 arnsholt hoelzro: OOC, what're you working on wrapping?
21:20 vti m: say my $foo = $foo++ + $foo--
21:20 camelia rakudo-moar 6edc31: OUTPUT«1␤»
21:21 lizmat $ perl -E 'say my $foo = $foo++ + $foo--'
21:21 lizmat 1
21:22 hoelzro arnsholt: libexpat
21:22 lizmat if a problem, it seems to be consistent across Perl versions :-)
21:22 vti lizmat: yeah, but use strict ;)
21:22 arnsholt hoelzro: Ooh, XML::Parser
21:23 leedo_ vti: maybe it's more akin to my $f; $f = sub { say "hi"; $f() }; $f();
21:23 dalek roast: ab81dfb | usev6++ | S04-statements/for.t:
21:23 dalek roast: Add test for RT #123005
21:23 dalek roast: review: https://github.com/perl6/roast/commit/ab81dfbdd5
21:23 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123005
21:23 jnthn leedo_: Yes, that nicely captures what I was trying to say :)
21:24 * jnthn gets an early night
21:24 jnthn o/
21:25 lizmat gnight jnthn!
21:25 hoelzro arnsholt: yeah, I need something that supports SAX that doesn't keep the whole tree in memory; afaik, grammars can't do that (yet)
21:25 vti leedo_: thanks, that makes sense.... after you know it %)
21:30 hoelzro so, one can use 'is rw' to create a setter on an attribute; is there a way to do something with the value after someone has called $obj.value = $value?
21:30 hoelzro like a trigger of sorts?
21:32 lizmat draft for tomorrow's blog post: https://gist.github.com/li​zmat/672dd8960a4ee299f447
21:32 lizmat comments welcome
21:35 anaeem1 joined #perl6
21:36 hoelzro is there some way to subclass Scalar, perhaps, and return a dummy scalar that would know when a way is being pushed into it?
21:37 ab5tract masak: neat :)
21:38 leedo_ hoelzro: there is that Proxy class, wonder if that would work?
21:38 ab5tract oops, i was scrollbacked.. that was in reference to the macro you passed to camelia
21:38 hoelzro leedo_: oh, thanks!
21:38 hoelzro I'll take a look
21:39 leedo_ i've not used it but it looks handy-ish :)
21:39 arnsholt hoelzro: Yeah, I think streaming grammars are a way off. Also, writing a proper XML parser in Perl 6 would be a major undertaking
21:40 masak lol! I bloggered! http://strangelyconsistent.or​g/blog/macros-placeholdeeers
21:40 arnsholt Not that wrapping expat is trivial, but less work than an XML grammar, I think
21:42 lizmat m: class A { method push(A:U \SELF: *@a) { SELF = @a }}; my $a = A; $a.push(1,2,3); say $a.perl   # hoelzro
21:42 camelia rakudo-moar 6edc31: OUTPUT«[1, 2, 3]␤»
21:42 hoelzro lizmat: thanks
21:47 hoelzro leedo_: that did the trick!
21:47 leedo_ awesome
21:54 lue "Does this whole thing remind you of beta reduction in lambda calculus?" um, sure :) .
21:54 masak I know, right!?
21:54 masak it's uncanny!
21:55 lue masak: aren't the key => value substitutions usually done by .trans, or is there something about .subst I didn't know?
21:58 gtodd m: [+]<1 2 3 4 5>
21:58 camelia rakudo-moar 6edc31: ( no output )
21:58 gtodd m: say [+]<1 2 3 4 5>
21:58 camelia rakudo-moar 6edc31: OUTPUT«postcircumfix:<{ }> not defined for type Int␤  in method gist at src/gen/m-CORE.setting:13768␤  in method gist at src/gen/m-CORE.setting:7821␤  in sub say at src/gen/m-CORE.setting:16516␤  in block <unit> at /tmp/N5GbDtE2Af:1␤␤»
21:58 lue m: say [+] <1 2 3 4 5>
21:58 camelia rakudo-moar 6edc31: OUTPUT«15␤»
21:58 hoelzro "All templating syntax sucks." - here, here!
21:59 vti the spaces in regexes are ignored, but when interpolating a variable they are not, i guess that's because the spaces are removed during compile time or smth like that... is there any way to tell rx/<$var>/ to ignore spaces in $var? can't find that in docs
21:59 vti m: my $str = "^foo\$"; my $re = rx/<$str>/; say "foo" ~~ $re
21:59 camelia rakudo-moar 6edc31: OUTPUT«「foo」␤␤»
21:59 vti m: my $str = "^ foo \$"; my $re = rx/<$str>/; say "foo" ~~ $re
21:59 camelia rakudo-moar 6edc31: OUTPUT«Nil␤»
22:00 gtodd so I needed a space there
22:00 timotimo ooooh that's interesting
22:01 gtodd was wondering since I had no space in the script I have ....
22:01 gtodd I had (<1 2 3 4 5>) instead
22:02 masak lue: it's AST.subst in this case. the name was borrowed from the CoffeeScript example without much thought as to how appropriate the naming would be in Perl 6.
22:03 gtodd eyes play trix ... need syntax highlighting
22:03 masak 'night, #perl6. will read your ample feedback in the backlog.
22:03 gtodd is there going to be a CoffeeSix slang?
22:03 gtodd errm CoffeeScript for perl6 :-)
22:04 gtodd night masak
22:04 gtodd if you are suggestible I suggest you dream of macros :-)
22:05 gtodd not ;-)
22:05 BigBear joined #perl6
22:09 vendethiel gtodd: 'twould be hard :P
22:09 vendethiel gtodd: current Coffee parser is a mess due to postfixes, and they're even more powerful in p6
22:11 tony-o lizmat: is there a mechanism to remove modules in a CURI or do I need to modify the MANIFEST file manually?
22:11 gtodd one day ...
22:11 lizmat I don't think there is currently a way to do that
22:16 ab5tract masak: nice post :)
22:19 ab5tract .tell TimToady thanks for the example :) i was puzzling over the \var syntax when I started digging into meta op declaration
22:19 yoleaux ab5tract: I'll pass your message to TimToady.
22:20 arnsholt "ooh, Lisp must have been successful because of the parentheses. Let's do them in triplicate!" =D
22:20 arnsholt masak++
22:23 ab5tract speaking of meta ops declarations.. that doesn't feel as smooth as the normal method declaration syntax, at the moment
22:24 colomon we can declare meta ops?
22:24 ab5tract colomon: my point entirely :)
22:25 * colomon has only ever done it in core.
22:25 gtodd m: say <1 2 3 4 5 10>.max
22:26 ab5tract that's what is seems to take at the moment, aye
22:26 camelia rakudo-moar 6edc31: OUTPUT«5␤»
22:27 gtodd m: say "oh hai that's wrong"
22:27 camelia rakudo-moar 6edc31: OUTPUT«oh hai that's wrong␤»
22:27 gtodd m: say <1 2 3 4 5 10>.max [+]
22:27 camelia rakudo-moar 6edc31: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argumentâ�¤at /tmp/GN33KlInSf:1â�¤------> [32msay <1 2 3 4 5 10>.max [+][33mâ��[31m<EOL>[0mâ�¤    expecting any of…»
22:27 ab5tract m: say (1,2,3,4,5,10).max
22:27 camelia rakudo-moar 6edc31: OUTPUT«10␤»
22:28 bartolin that's also RT #112250
22:28 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=112250
22:29 ab5tract colomon: is the plan to have that be possible outside the core?
22:29 colomon ab5tract: darned if I know
22:29 colomon ab5tract: I'd love that, but it seems like it would be kind of fiddly
22:29 ab5tract in fact, it seems like it might be a good story for macros
22:30 colomon could be, yes
22:30 gtodd bartolin: ok thanks ... it's like the <> form is accidentally making lists out of the elements
22:32 lizmat tomorrow's advent post in draft here: http://perl6advent.wordpress.com/?p=238​8&amp;preview=true&amp;preview_id=2388
22:32 gtodd but I'm splittling a line and pushing the number into an array and they are still tricking max into seeing them as strings
22:32 gtodd .max
22:33 lue gtodd: the point of < > is to create an array of strings, e.g. <one two three> instead of ("one", "two", "three")
22:33 lue stuff like [+] <1 2 3> works simply because infix:<+> tries to coerce its arguments to numbers if they aren't already.
22:34 j4janicej left #perl6
22:34 treehug88 joined #perl6
22:38 [particle] joined #perl6
22:41 ab5tract colomon: btw, mix 144 mix tests pass :)
22:42 ab5tract can't claim i did much though. a search and replace and re-intepretation of the test variables, the bag tests fit like a glove
22:43 bartolin lue: so you would say its correct [max] sorts <2 11> lexicographically?
22:43 bartolin m: say [max] <a z c>
22:43 camelia rakudo-moar 6edc31: OUTPUT«z␤»
22:43 bartolin m: say [max] <2 11>
22:43 camelia rakudo-moar 6edc31: OUTPUT«2␤»
22:43 lizmat yes, because in that context, 2 and 11 are Str
22:44 lizmat m: say [max] (2,11)
22:44 camelia rakudo-moar 6edc31: OUTPUT«11␤»
22:44 ab5tract m: say [max] (2.Str,11.Str)
22:44 camelia rakudo-moar 6edc31: OUTPUT«2␤»
22:45 lizmat m: say [max] ("2","11") # same thing
22:45 camelia rakudo-moar 6edc31: OUTPUT«2␤»
22:45 bartolin I'll add that to RT #112250
22:45 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=112250
22:46 telex joined #perl6
22:47 colomon ab5tract++
22:47 lue Unless <2 11> is supposed to be a list of IntStrs, and unless the Int part of IntStr is supposed to win when either part would do, I think [max] <2 11> -> 2 is right.
22:47 ab5tract of course, i've replicated my preferred comparator tests ;)
22:47 colomon m: say <2 11>.max(+*)
22:47 camelia rakudo-moar 6edc31: OUTPUT«11␤»
22:48 colomon lue: good point
22:48 colomon n
22:48 colomon n: say <2 11>.max
22:48 camelia niecza v24-109-g48a8de3: OUTPUT«11␤»
22:48 ab5tract i'll do a clean one from the nom behavior
22:48 colomon n: say <2 11>[0].WHAT
22:48 ab5tract and submit a pl
22:48 camelia niecza v24-109-g48a8de3: OUTPUT«(IntStr)␤»
22:49 colomon <2 11> is indeed supposed to be IntStrs, unless someone has changed that part of the spec again
22:52 bartolin and IntStr is probably NYI for rakudo ...
22:52 bartolin m: say <2 11>[0].WHAT
22:52 camelia rakudo-moar 6edc31: OUTPUT«(Str)␤»
22:52 colomon so I think lue is right that max is supposed to do what bartolin thinks it should
22:52 lue r: say IntStr
22:52 camelia rakudo-{parrot,moar} 6edc31: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    IntStr used at line 1â�¤â�¤Â»
22:55 ab5tract colomon: oof.. actually, the situation is not so rosy. i was mistaken earlier :(
22:57 dalek roast: 4b7c128 | (Elizabeth Mattijsen)++ | integration/advent2014-day05.t:
22:57 dalek roast: Tests associated with 20141205 blogpost
22:57 dalek roast: review: https://github.com/perl6/roast/commit/4b7c128edc
22:57 colomon lizmat++
22:59 davido__ joined #perl6
23:00 ab5tract in order to be a bit more DRY, i'd like to create a helper function for converting to the correct QuantHash type set_operators.pm
23:02 ab5tract is it ok to define a local sub a la "my Sub" ?
23:02 lizmat ab5tract: if you do, please make it a long ALL-CAPS name
23:03 lizmat unfortunately, any my sub in the core, is visible in any code out there
23:04 ab5tract lizmat: no thanks then :(
23:05 lizmat well, if you look in the core settings, you will see that you wouldn't be the first
23:05 lizmat so I think for simplification of the set_operators code would warrant such a transgression
23:06 ab5tract my original plan was to do it as a meta op :)
23:07 perturbation joined #perl6
23:11 lue lizmat++ # advent post
23:17 lizmat m: say 15 %% 3|5   # this feels like a bug
23:17 camelia rakudo-moar 6edc31: OUTPUT«any(True, 5)␤»
23:17 lizmat m: say 12 == 3|5  # this seems ok
23:17 camelia rakudo-moar 6edc31: OUTPUT«any(False, False)␤»
23:18 lizmat huh?
23:18 lue Looking at the chart, it is a bug: http://perlcabal.org/syn/S0​3.html#Operator_precedence
23:18 lizmat m: say 12 %% 3|5  # this seems ok
23:18 camelia rakudo-moar 6edc31: OUTPUT«any(True, 5)␤»
23:18 lizmat m: say 10 %% 3|5  # this seems ok
23:18 camelia rakudo-moar 6edc31: OUTPUT«any(False, 5)␤»
23:18 lue Or not, I'm silly.
23:19 lizmat advent post scheduled for 0:01 UTC
23:19 colomon m: say 15 % 3|5
23:19 camelia rakudo-moar 6edc31: OUTPUT«any(0, 5)␤»
23:19 colomon m: say 15 %% 3|5
23:19 camelia rakudo-moar 6edc31: OUTPUT«any(True, 5)␤»
23:20 colomon m: say 15 %% 5
23:20 camelia rakudo-moar 6edc31: OUTPUT«True␤»
23:20 colomon m: say 15 %% 3
23:20 camelia rakudo-moar 6edc31: OUTPUT«True␤»
23:20 mtj joined #perl6
23:20 lue m: say 15 %% (3|5)
23:20 camelia rakudo-moar 6edc31: OUTPUT«any(True, True)␤»
23:22 colomon totally looks like a bug
23:22 colomon a very odd one at that
23:23 colomon n: say 15 %% 3|5
23:23 camelia niecza v24-109-g48a8de3: OUTPUT«any(Bool::True, 5)␤»
23:23 colomon huh.  at least they're consistent?
23:24 lue The precedence table I linked shows that it's the correct behavior; %% is tighter than |
23:25 colomon oh!
23:25 lizmat perhaps it shouldn't be tighter ?
23:25 colomon you're right, I wasn't looking at the results correctly
23:25 colomon m: say 15 % 3|5
23:25 camelia rakudo-moar 6edc31: OUTPUT«any(0, 5)␤»
23:25 colomon second value is just 5
23:26 colomon lizmat: I don't think so
23:26 lizmat well, it was a WAT for me
23:26 colomon because we want to be able to say things like 2 * $delta | 3 * $delta
23:27 colomon and have it mean 2 * $delta or 3 * $delta rather than 2 * ($delta | 3) * $delta
23:29 lizmat I was thinking about adapting the level of %%, rather than |
23:29 lizmat as %%'s behaviour seems faulty to me
23:30 lue I'd say %% is a test operator rather than a multiplicative operator, despite its appearance.
23:30 lizmat agree
23:30 lue So perhaps knock it down to "C  Chaining infix" ?
23:30 lizmat m: say 12 == 12|13
23:30 camelia rakudo-moar 6edc31: OUTPUT«any(True, False)␤»
23:31 lizmat so why does it work ok for == and not %% ?
23:31 lue Or somewhere around there, at least.
23:31 lue == is in the "Chaining infix" level, thus looser than |
23:31 lizmat I expect TimToady will want to chime in on that
23:32 colomon %% doesn't chain
23:32 lue I'm not %% should/could be chaining, but I think somewhere underneath | at least.
23:33 lue *not sure
23:34 colomon I'm not at all convinced.
23:34 dalek rakudo/nom: 4c353cd | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
23:34 dalek rakudo/nom: Add Supply.close to close all known taps
23:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4c353cd43a
23:34 dalek rakudo/nom: da7ff70 | (Elizabeth Mattijsen)++ | t/spectest.data:
23:34 dalek rakudo/nom: Add 20141205 advent tests
23:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/da7ff70d51
23:34 lue m: say "a" eq "a"|"b"
23:34 camelia rakudo-moar 6edc31: OUTPUT«any(True, False)␤»
23:34 dalek rakudo/newio: dd27056 | TimToady++ | tools/build/NQP_REVISION:
23:34 dalek rakudo/newio: bump nqp
23:34 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/dd27056fcb
23:34 dalek rakudo/newio: 8651016 | TimToady++ | tools/build/NQP_REVISION:
23:34 dalek rakudo/newio: bump nqp
23:35 colomon the
23:35 lizmat sorry dalek
23:35 aborazmeh joined #perl6
23:35 dalek joined #perl6
23:36 colomon the thing is, I'm pretty sure moving %% down can actually change the meaning of (junction-less) math expressions.
23:36 lue As I understand it, the "testing" operators are all looser than junctions, so I think %% (an operator that tests) should be moved to their level.
23:37 colomon m: say 34 %% 3 + 1
23:37 camelia rakudo-moar 6edc31: OUTPUT«1␤»
23:38 lue colomon: % is a math operator, %% isn't (unless you consider converting a Bool to 1 or 0 part of math)
23:38 colomon m: say 34 % 3 + 1
23:38 camelia rakudo-moar 6edc31: OUTPUT«2␤»
23:38 dalek mu: 412970c | (Elizabeth Mattijsen)++ | misc/perl6advent-2014/schedule:
23:38 dalek mu: Claim day #19, fix day #5
23:38 dalek mu: review: https://github.com/perl6/mu/commit/412970cb0b
23:39 * lizmat calls it a day...  advent post should be visible in 20 mins
23:39 lue ♞ lizmat o/
23:45 colomon yeah, it isn't really comfortable thinking of %% as a math operator, I guess, because it takes you out of the realm of math
23:47 lue To be fair, it's a fairly specialized test operator, for a built-in at least :) .
23:50 BenGoldberg joined #perl6
23:52 KCL_ joined #perl6
23:56 vendethiel joined #perl6
23:56 adu joined #perl6
23:57 rmgk_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo