»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
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
and pulled in lazily
japhb TimToady: yes, agreed.
TimToady on demand, like an autouse
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
but radar says this is just about the last bit of raincloud 00:02
maybe it should be @*DISTRO, in "mro" order 00:03
maybe $*DISTRO is short for @*DISTRO[0]
or, as I said, we differentiate .name from .*name 00:04
though I could see that getting out of sync, if parents skip
00:05 dayangkun joined
timotimo ab5tract: "be on its merry way" was lacking a "way" 00:05
TimToady so maybe $*DISTRO.parent.name etc
timotimo: I think that's intended
00:05 dayangkun left
timotimo oh? 00:05
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
but yeah, its
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
the footnotes don't link back to the text they appear in 00:08
TimToady wonders if DISTRO could be a role that recursively instantiates its parents 00:09
ab5tract timotimo: those are ad-hoc footnotes 00:10
and i've been working on this for two nights straight :)
TimToady $*KERNEL could also be recursive, for virtual hosting 00:11
timotimo sorry :)
TimToady assuming we can even get at the info for the outer host
DISTRO.upstream maybe 00:12
since the parents may disavow the downstream 00:13
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:14
still, good suggestions, and all implemented 00:15
00:19 abraxxa left
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:21
00:24 kurahaupo left 00:25 BenGoldberg joined
tadzik what should I know :o 00:27
oh, Polish audience :)
00:44 ab5tract left 00:48 anaeem1_ left, kurahaupo joined, anaeem1 joined 00:50 vendethiel left 00:53 anaeem1 left 00:54 vendethiel joined
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:05
dwarring torbjorn: for @<foo> { ... } # try this 01:06
torbjorn ah indeed, thanks
timotimo alternatively $<foo>.list ought to work as well
torbjorn and it does too, thanks 01:07
timotimo for $foobar { } will only do a single iteration no matter what's in $foobar (except if you do evil sorcery maybe) 01:08
m: my $foobar := (1, 2, 3); for $foobar { say "tick" }
camelia rakudo-moar 725e26: OUTPUT«/bin/sh: lsb_release: command not found␤tick␤tick␤tick␤»
timotimo binding is evil sorcery
torbjorn yeah i think i understand
timotimo (because it replaces the container with the value) 01:09
torbjorn i need to know how sigils are used
TimToady yes, don't do that, it will probably be vorbotten someday 01:10
torbjorn does the bot execute perl6's stdout in shell?
m: say "id"
camelia rakudo-moar 725e26: OUTPUT«/bin/sh: lsb_release: command not found␤id␤»
TimToady no, it's a first attempt at trying to load up $*DISTRO 01:11
obviously standing in some need of improvement :)
torbjorn ah yes
timotimo TimToady: binding a non-container to a $ variable? 01:13
01:17 vendethiel left 01:20 vendethiel joined 01:28 Akagi201 joined
TimToady one should just say 'my \foo =' if one wishes to be non-committal 01:29
01:31 Akagi201_ left
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:42 vendethiel left 01:43 kurahaupo left 01:51 vendethiel joined
dalek kudo/nom: 6edc31b | TimToady++ | src/core/Distro.pm:
parse /etc/os-release if it's there
02:01
TimToady that should work for camelia 02:05
02:08 ash___ joined 02:10 ash___ left, bjz left 02:29 jimmy__ joined
TimToady m: say $*DISTRO.name 02:32
camelia rakudo-moar 6edc31: OUTPUT«opensuse␤»
TimToady m: say $*DISTRO.version
camelia rakudo-moar 6edc31: OUTPUT«v12.3.Dartmouth␤»
TimToady m: say $*DISTRO
camelia rakudo-moar 6edc31: OUTPUT«opensuse (12.3.Dartmouth)␤»
TimToady m: say $*DISTRO.auth
camelia rakudo-moar 6edc31: OUTPUT«unknown␤»
TimToady m: say $*DISTRO.release 02:33
camelia rakudo-moar 6edc31: OUTPUT«12.3␤»
02:37 vendethiel left 02:39 vendethiel joined
jimmy__ r: say $*DISTRO.signature 02:40
camelia rakudo-{parrot,moar} 6edc31: OUTPUT«(Blob)␤»
jimmy__ r: say $*DISTRO.desc
camelia rakudo-{parrot,moar} 6edc31: OUTPUT«(Str)␤»
02:52 chenryn joined 02:59 jimmy__ is now known as JimmyZ_ 03:09 Mso150 joined 03:18 chenryn left 03:19 chenryn joined 03:20 noganex joined 03:23 noganex_ left 03:29 KCL_ joined 03:37 j4janicej is now known as j4jackj 03:40 rurban1 left 03:45 j4jackj is now known as j4janiceej, j4janiceej is now known as j4janicej 03:46 vendethiel left 03:49 vendethiel joined 03:53 Mso150 left 04:13 vendethiel left 04:15 vendethiel joined
tony-o did someone need something verified on osx? 04:20
04:23 perturbation left 04:32 kaare__ joined 04:46 kaare__ left, kaare__ joined 04:47 kaare__ left, kaare__ joined 04:55 chenryn left 04:59 vendethiel left 05:04 sftp_ joined, sftp left, sftp_ is now known as sftp 05:06 jferrero_ joined, tinyblak joined 05:09 jferrero left 05:10 vendethiel joined, araujo left, Woodi left, Woodi joined 05:11 raiph left 05:12 araujo joined, tinyblak_ joined 05:14 salv0 left 05:15 salv0 joined, tinyblak left 05:24 anaeem1_ joined, chenryn joined 05:27 anaeem1_ left 05:34 BenGoldberg left 05:35 kaare__ left 05:36 PZt joined 05:52 vendethiel left 05:56 kaare__ joined 05:58 kurahaupo joined 06:01 vendethiel joined 06:03 kaare__ is now known as kaare_ 06:04 mr-foobar left 06:15 [Sno] left
Woodi morning #perl6 :) 06:20
raydiak \o Woodi 06:21
Woodi TimToady: thanx. understood that normal ';' finishes lists and other sugars&magics. 06:25
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:28
06:29 bjz joined 06:38 onebitboy left 06:40 onebitboy joined 06:48 kaleem joined, khisanth_ joined, Khisanth left
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」␤␤»
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
06:55 anaeem1 joined 06:56 anaeem1 left 06:57 anaeem1_ joined 07:01 tinyblak_ left, tinyblak joined 07:07 bjz left
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:10
raydiak every time you call make-grammar, or every time you call .parse? 07:11
TimToady probably every + at the moment
07:11 tinyblak left
raydiak ouch 07:11
TimToady yeah
07:12 tinyblak joined
TimToady we don't attempt to detect whether the array is changing or not 07:12
it just assumes it did
07:13 aborazmeh joined
raydiak hrm 07:13
TimToady m: $_ = 'foo'; my @chars = 'f'; say / ^ [ @chars { @chars = 'o' } ]+ $/ 07:16
camelia rakudo-moar 6edc31: OUTPUT«␤»
TimToady m: $_ = 'foo'; my @chars = 'f'; say / ^ [ @chars { @chars = 'f','o' } ]+ $/
camelia rakudo-moar 6edc31: OUTPUT«␤»
TimToady m: $_ = 'foo'; my @chars = 'f','o'; say / ^ [ @chars { @chars = 'f','o' } ]+ $/
camelia rakudo-moar 6edc31: OUTPUT«␤»
TimToady hmm
m: $_ = 'foo'; my @chars = 'f','o'; say / ^ [ @chars ]+ $/ 07:17
camelia rakudo-moar 6edc31: OUTPUT«␤»
TimToady dunno why that's not matching
m: $_ = 'foo'; my @chars = 'f','o'; say / ^ @chars+ $/ 07:18
camelia rakudo-moar 6edc31: OUTPUT«␤»
TimToady seems busted
m: $_ = 'foo'; my @chars = 'f','o'; say m/ ^ @chars+ $/
camelia rakudo-moar 6edc31: OUTPUT«「foo」␤␤»
TimToady m: $_ = 'foo'; my @chars = 'f'; say m/ ^ [ @chars { @chars = 'o' } ]+ $/
camelia rakudo-moar 6edc31: OUTPUT«「foo」␤␤»
TimToady yes, recomputes the NFA for @chars on every single char 07:19
07:19 FROGGS joined
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:19
TimToady not without an EVAL 07:20
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
but maybe you'd have to return the + from inside the <{ }> 07:23
you could pass in a precompiled rule and call it, I suppose
rx// being the equivalent of p5's qr//
raydiak oh, yeah that's what I was just looking for 07:24
TimToady but rakudo isn't very good at having parameters to its rules yet, I suspect 07:25
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
FROGGS TimToady: have you seen that comment? github.com/perl6/nqp/commit/6b22cf...nt-8825586
TimToady m: my token foo($x) { $x }; $_ = 'foo'; say m/ <foo('o')>+ / 07:27
camelia rakudo-moar 6edc31: OUTPUT«「oo」␤ foo => 「o」␤ foo => 「o」␤␤»
TimToady well, I guess it does that bit
07:28 anaeem___ joined
TimToady FROGGS: no, but it's a good comment 07:29
FROGGS it is :o)
I like code reviews
sadly this does not happen at $work 07:30
dalek p: e910232 | TimToady++ | src/QRegex/NFA.nqp:
fossil conditional noted by ptf++
07:31
07:32 anaeem1_ left
TimToady I think it's maybe proto regexes that aren't so good at parameters 07:32
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
pretty sure I'm already doing some array stuff in there
b/c of how all the ops and syntax are defined in a list, declarative-like, then used by the grammar 07:34
TimToady here's where we could use an immutable tuple type 07:35
'cuz a different value would have a different WHICH 07:36
(not that the code checks that currently)
masak morning, #perl6
raydiak morning masak
07:37 aborazmeh left
masak I notice that ab5tract++'s draft hasn't been published yet. 07:38
any special reason it hasn't? (I'm not fully backlogged.)
TimToady not that I know of 07:39
says today 8:00 am, which I assume is Zulu time 07:41
so another 20 minutes maybe
07:41 vti joined
masak yeah, just saw. 07:41
masak waits patiently 07:42
07:54 BigBear joined 07:59 tinyblak_ joined 08:00 mvuets joined, tinyblak left 08:01 KCL_ left 08:06 dwarring left 08:09 zakharyas joined 08:10 fhelmberger joined, cosimo left, cosimo joined 08:13 blackbolt joined
sergot morning #perl6 08:14
08:14 fhelmberger left
moritz \o sergot, #perl6 08:14
08:16 darutoko joined 08:18 [Sno] joined
raydiak o/ sergot, moritz 08:19
08:21 telex left 08:22 telex joined
sergot raydiak o/ 08:22
08:23 Ven joined, Mso150 joined
Ven o/, #perl6 08:23
blackbolt Hi, how can I create a new level window in GTK::Simple ?
raydiak \o Ven 08:24
mvuets waves 08:26
masak ab5tract++'s post! \o/ perl6advent.wordpress.com/2014/12/0...us-corner/ 08:41
masak reads
why Lisp macros are cool, by MJD: lists.warhead.org.uk/pipermail/iwe/...00130.html 08:47
08:48 vendethiel left
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
I mean, the first step of the solution to that is pretty clear already: work on trees.
I maintain that "hygiene" is a second, independent step, and that it can be implemented in many ways. 08:50
FROGGS prefers his office
arnsholt Yeah, hygiene by default is good 08:51
masak arnsholt: my point is more, hygiene != trees.
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
Oh, definitely!
masak some people sloppily assume that it is, and say "hygienic macros" when they really only have AST-based macros. 08:52
an AST does not hygiene make.
arnsholt Certainly. CL for instance
masak right.
moritz but hygiene implies trees, no? 08:53
masak CL's solution famously being "just gensym EVERYTHING"
08:53 vendethiel joined
masak moritz: sorta. 08:53
arnsholt Yeah
masak moritz: I mean, I could be difficult and imagine a text-based macro system that was really careful and did stuff.
moritz I mean, I haven't seen a single, text-based hygienic macro system
arnsholt Actually, string-level transformations should have a some other name than "macro"
masak moritz: actually, lambda calculus is kind of in that direction. 08:54
moritz arnsholt: "source filter"
masak moritz: even though the normal operations in lambda calculus only have to do with application/evaluation, not macros.
arnsholt Yeah. Or "rusted spoon" =)
08:57 denis_boyun joined
masak I still haven't come down to an opinion about whether we'll want gensymming in Perl 6. 08:59
my macro grant proposal mentions it, but since then I've sort of thought about it differently.
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:02
masak it did. 09:03
(the waterbed cost for that is that lack of hygiene will be tricky to implement)
but yeah, I don't think we'll need gensyms for anything right now. 09:04
or, let me put it like this. 09:07
dalek ecs: 111c2b5 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
Add empty gensym lemma (hint hint)
masak gensyms give you the ability to create something and then uniquely refer to it (a very little bit) later.
09:07 mephinet left
masak I believe we'll get that ability already by dint of Qtree nodes being uniquely identifiable. 09:08
dalek ecs: c562974 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
Fill gensym lemma (masak++)
09:11
raydiak 'night * o/ 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.
lizmat gnight raydiak
ah, ok
no
masak I went to Wikipedia and could find no confirmation either way. 09:13
dalek ecs: 5ab4260 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
Fix thinko, masak++
lizmat generated makes more sense to me in this context 09:14
in the old S17 spec, there was even a mention of a gensym() function
masak wow. 09:15
in the async/parallel synopsis?!
09:15 BigBear left
lizmat "method throttled::trait_auxiliary:<is> ($limit=1, :$key=gensym()) {" 09:15
no further mention than that
masak that's (a) a silly use of the word outside of macros 09:16
(b) completely unnecessary, what with `{}`
m: sub foo(:$key = {}) { return $key }; say foo() === foo()
camelia rakudo-moar 6edc31: OUTPUT«False␤»
lizmat I guess that's why the old S17 spec is no longer in the repo 09:17
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"
dalek ecs: bba0937 | masak++ | S99-glossary.pod:
clarify "gensym" entry a bit
lizmat masak++ :-) 09:22
09:22 vendethiel left
lizmat afk for a few hours& 09:23
09:24 cosimo left
Ven placeholdeeers 09:24
09:25 cosimo joined
masak yeah. my next writeup is probably going to be about that. 09:27
actually, "placeholdeeers" is a pretty catchy title ;)
09:27 vendethiel joined
arnsholt is an absolute maroon 09:29
09:31 ptc_p6 joined, dakkar joined
dalek ake: 465cf0f | (Arne Skjærholt)++ | src/Snake/World.nqp:
Fix a braino in previous commit.

If you don't wrap the CompUnit with the setting lexical scope, the setting won't work. Durr.
09:34
Ven masak: well, feel free to use it ;-) 09:42
masak: considering your current rhythm, you should've done a "consistent december", with 24 blog posts :P 09:43
masak if only. 09:45
09:46 bjz joined
masak today's autopun: "I'm kind of in two minds about this whole Schroedinger's cat thing..." 09:47
09:48 tinyblak_ left, mephinet joined, tinyblak joined 09:50 ptc_p6 left 09:51 ptc_p6 joined 09:52 vendethiel left 09:59 vendethiel joined 10:01 [Tux] left 10:02 rt joined, rt is now known as Guest16179 10:03 Guest16179 left, virtualsue joined 10:04 fhelmberger joined 10:05 kurahaupo left, BigBear joined 10:06 Ven left 10:07 [Tux] joined 10:10 rurban joined 10:15 abraxxa joined 10:20 brrt joined
brrt \o 10:20
ping nwc10
JimmyZ_ o/
yoleaux 3 Dec 2014 21:18Z <nwc10> JimmyZ_: I was hacking on fakecutables. Mailed to [email@hidden.address]
nwc10 here, or there? 10:21
brrt hey
here i suppose. i was also hacking on fakecutables
nwc10 I didn't know that.
JimmyZ_ brrt: but you're static one?
brrt no, also not in general, just in the specific case of perl6
yes, that's much the same idea isn't it? 10:22
nwc10 anyway, the actual "fakecutables" part wasn't hard.
it was the Makefiles
brrt nods
nwc10 and, also, I've "stopped"
so you're welcome to take/ignore/whatever I did
but I think it's important to start making the tool scripts in NQP
brrt ah... hmm
why? we already make the configure scripts in perl5
nwc10 long term this is futile 10:23
brrt true
nwc10 it would be like the Perl 5 build system still being written in Perl 4
brrt true
nwc10 and then having to keep Perl 4 around just to build Perl 5
brrt but on the other hand, there's nobody that ships with a default nqp yet
nwc10 it's also, I feel, a mistake that Parrot made
moritz the new hardware for the p6 community server has arrived
JimmyZ_ \o/
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
parrot didn't dogfood parrot in any part of the build system
admittedly NQP has a lot of dogfood, being self hosting
moritz next stage: build in to the racks, cabling
nwc10 but it would be good to start to write build systems in the host language 10:25
to find the problems there
brrt ok, fair enough; could we ship an nqp binary yet?
nwc10 brrt: I don't think that it matters
we do. it's "stage0"
brrt true :-)
JimmyZ_ btw: rust doesn't use libuv anyway.
nwc10 I can do this from a *clean* NQP directory: 10:26
../MoarVM/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm -e 'for nqp::backendconfig() { say(qq{moar::{$_.key}={$_.value}}) }'
brrt i see.. that's nice already
10:26 pecastro joined
nwc10 it is somewhat mind bending 10:26
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
brrt that can be a shell script, but that doesn't work on windows... :-)
10:27 JimmyZ_ left
brrt although 10:28
what if we'd use the moarvm included minilua to do that
FROGGS let's just use CMake :P
brrt muhahah
nwc10 brrt: I am sort of thinking that actually. 1 shell script, 1 batch file, and one README (for anywhere else)
FROGGS++
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...
nwc10 dogfood!
FROGGS yeah :o)
moritz nwc10: note that rakudo's and NQP's configure also build the backend(s) for you
nwc10 moritz: bother yes. I forgot that. I remembered that on the tram
brrt doesn't know CMake. at all
nwc10 (on the way to work, thining about it)
10:30 chenryn left 10:44 Mso150 left, rurban left 10:50 Hor|zon left, pmurias joined
pmurias nwc10: maybe we could have the system dependent part in both perl5 and batch script/shell script? 10:54
11:00 chenryn joined 11:11 tinyblak_ joined 11:12 BigBear left 11:13 kurahaupo joined, tinyblak left 11:19 Hor|zon joined 11:24 vendethiel left 11:31 brrt left 11:32 vendethiel joined, rindolf joined 11:40 [Sno]_ joined 11:42 [Sno] left, [Sno]_ is now known as [Sno] 11:49 bjz left 11:50 kaleem left, bjz joined 11:53 blackbolt left 11:56 vendethiel left 11:57 [Sno] left 11:58 [Sno]_ joined 12:00 TuxCM left 12:02 cosimo left 12:03 vendethiel joined 12:04 cosimo joined
lizmat jnthn: would you object to $supply.close without parameters closing *all* taps on the supply 12:13
.oO( ADD or Advent Driven Development )
12:14
12:14 bjz left, bjz joined
lizmat multi method close(Supply:D:) { self.close($_) for self.tappers } 12:16
12:16 anaeem___ left 12:17 anaeem1_ joined
masak nwc10: I think there should be a repository collecting all the todos/milestones towards build system dogfoodhood. 12:22
12:25 bjz left 12:26 tinyblak_ left, tinyblak joined
timotimo moritz: yay hardwares 12:28
12:29 pmurias left 12:31 bjz joined 12:32 TuxCM joined
dalek k-simple: d8a4d18 | (Timo Paulssen)++ | lib/GTK/Simple.pm6:
quick and dirty implementation of GTK::Simple::Window
12:37
12:44 Ugator joined
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:46
12:49 chenryn left
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:53
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
all modules start simple though
timotimo Ulti: jnthn called it GTK::Simple because he expected someone else would want to build a "proper" binding to replace it :P 12:56
12:57 anaeem1_ left
mvuets i guess it might be an excuse to build quick & dirty implementation 12:57
timotimo hehehe
Ulti like I get stressed at the thought of taking Stats already... when I have only five super basic stats functions
timotimo the way i add new stuff to GTK::Simple is pretty darn random 12:58
12:58 [Sno]_ is now known as [Sno]
Ulti I understand the impulse for ::Simple but it just looks a bit silly on the modules listings :P 12:58
in fact I'd go as far to say that all the ::Simple are the non simple modules lol
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
Ulti lol
but you're comfortable being a core language hacker :D
I think a lot of people will eventually grok Rakudo internals because it's all in a language the users know :) 13:00
timotimo nah, because you can't get far without becoming a core hacker! oh, wait, that was 2010 :P 13:01
Ulti yeah a no. of modules with time plot might be quite interesting I guess you can get that from the manifest file 13:04
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:05
13:06 kaleem joined
lizmat www.extremetech.com/extreme/195317-...live-video 13:19
T minus 8 minutes
T minus 5 13:22
13:22 krunen left
colomon lizmat: did you come up with a topic for a post? 13:23
lizmat Supplies
colomon cool
hold again on the launch? 13:24
lizmat yes, sounds like it
just over 1 hour of launch window left 13:26
masak .oO( the topic is a bit of a Supplies ) 13:32
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
13:33 smls joined
smls o/ 13:34
lizmat smls \o
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
maybe in ~ 10 days 13:36
smls ok
13:37 kaare_ left
masak <placeholder for joke about how I/O is all about sequencing and side effects> 13:39
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 :)
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:41 Hor|zon left
masak ab5tract: I like how your post is basically about a personal journey. 13:42
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
masak right. anyway, the argument can not be made that it "shares Huffman coding". 13:47
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:48
13:49 virtualsue left 13:50 jluis left 13:54 aborazmeh joined 13:55 aborazmeh left, anaeem1_ joined
moritz right, it's about standing out, not about length 14:03
14:03 jluis joined
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
err, :o) 14:04
moritz FROGGS: chars :-)
14:07 Hor|zon joined
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
my point is that making `BUILD` all-caps has nothing to do with its length and nothing to do with Huffmanization.
14:12 Hor|zon left
lizmat launch scrubbed for today :-( 14:37
timotimo no perl 6.0.0 launch today? :( 14:38
lizmat Orion's launch 14:39
or more precisely: the Orion Flight Test
www.extremetech.com/extreme/195317-...live-video
masak .oO( will not go to space today ) :( 14:40
14:47 onebitboy left, BigBear joined 14:48 kaare_ joined 14:50 virtualsue joined 14:56 raiph joined 14:57 onebitboy joined
arnsholt Aww, Orion cannot into space? =) 14:58
15:03 lucas___ joined
masak vendethiel: sanity check about having understood Gjorde diagram till Git Advanced (Gerrit). 15:03
ergh. 15:04
vendethiel: sanity check about having understood github.com/jashkenas/coffeescript/pull/3171 correctly.
lucas___ m: my @a = 1,Nil,2; say .WHICH for @a
camelia rakudo-moar 6edc31: OUTPUT«Int|1␤Int|2␤»
15:05 treehug88 joined
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?
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:07
essentially .subst is a kind of s:g/// on the AST node level. I'm guessing/hoping it even respects lexical shadowing. 15:09
um, provided coffeescript has that. I forget. 15:12
ooh, and there's also macro.valToNode, whose use should be obvious.
15:14 vendethiel left 15:15 BigBear left 15:16 Ugator left 15:17 vendethiel joined
masak gets lost trying to confirm his suspicions about what the {c1,c2,c3,c4} object literal shorthand means in cs 15:23
anyway, there's something here that's pretty similar to the way we do it in Perl 6. 15:24
that is, a macro is something that returns an AST.
15:25 FROGGS left
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:25
15:25 khisanth_ is now known as Khisanth 15:28 mr-foobar joined 15:30 BigBear joined 15:32 lucas___ left 15:33 davido___ left
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:38
15:39 davido_ joined, vendethiel left 15:40 vendethiel joined
dalek ake: bbe35be | (Arne Skjærholt)++ | t/class.t:
Add simple test file for classes.
15:41
ake: 3fb29bb | (Arne Skjærholt)++ | src/ (3 files):
First stab at function objects.
15:47 sven_123_ joined
masak arnsholt++ 15:53
15:54 adu joined, raiph left 15:55 jluis left 15:57 jluis joined 15:58 baest_ is now known as baest, sven_123_ left 16:00 jluis left
treehug88 is christmas coming? 16:03
masak faster than you might think.
16:03 sven_123_ joined, tinyblak_ joined
treehug88 one can dream 16:03
arnsholt Christmas is already here, it's just unevenly distributed 16:04
(With apologies to William Gibson =)
16:04 tinyblak left 16:05 sven_123_ left
masak it might be that not only is Christmas unevenly distributed, but the time-derivative of Christmas is also unevenly distributed... 16:05
thus, for some, Christmas is coming quite fast, for others it's coming more slowly, and for yet others, Christmas might be receding. 16:06
16:08 Hor|zon joined
hoelzro o/ #perl6 16:09
Rakudo doesn't support destructors yet, does it? 16:11
lizmat t supports DESTROY on moar, if you mean that
hoelzro that's exactly what I mean =) 16:12
that's non-determinstic, right? 16:13
16:13 Hor|zon left
hoelzro does Perl 6 have something like using(...) in C# or with in Python? 16:13
lizmat yes
arnsholt given($foo) { ... }
lizmat m: class { method DESTROY { say "goodbye" } }.new
camelia ( no output )
lizmat although I don't think you can rely on DESTROY being called at all, apparently 16:14
hoelzro: I'm not sure what you mean with given($foo) { ... }
it seems to have superstitious parens at the least :-) 16:15
arnsholt Oh, whoops
That's me not programming enough Perl 6
hoelzro with in Python guarantees that __exit__ will be called on an object before the block exits
I *think* that my $something will close = ... would do it
but I'm wondering if there are other ways
arnsholt Oh, right. Given doesn't do that stuff 16:16
16:16 betterwo1ld joined, integral joined, integral left, integral joined, retupmoc1 joined, japhb_ joined, bcode_ joined, brother joined
lizmat m: my $a will leave { say "goodbye" } 16:16
camelia rakudo-moar 6edc31: OUTPUT«goodbye␤»
lizmat is that what you mean?
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
masak m: my $foo = 42; given($foo) { .say }
camelia rakudo-moar 6edc31: OUTPUT«===SORRY!===␤Word 'given' interpreted as 'given()' function call; please use whitespace instead of parens␤at /tmp/hc1U_XfXgw:1␤------> my $foo = 42; given⏏($foo) { .say }␤Unexpected block in infix position (tw…»
hoelzro LEAVE { $a.close } would do it too, right?
masak m: my $foo = 42; given($foo); sub given($) { say "OH HAI" }
16:17 bcode left
camelia rakudo-moar 6edc31: OUTPUT«OH HAI␤» 16:17
16:17 bcode_ is now known as bcode
lizmat m: LEAVE say "goodbye" 16:18
camelia rakudo-moar 6edc31: OUTPUT«goodbye␤»
lizmat the "will leave" syntax is mostly syntactic sugar
16:18 Akagi201 left, hobbified joined, pnu left, hobbs left, integral_ left, dylanwh left, brother| left, geekosaur left, ingy left, japhb left, betterworld left, retupmoca left 16:19 pnu joined, pnu left, pnu joined, denis_boyun left, dylanwh_ joined, Akagi201 joined, dylanwh_ is now known as dylanwh 16:20 ingy joined
hoelzro mkay 16:20
and NativeCall - I forget, does it support callbacks?
colomon hoelzro: pretty sure yes 16:21
arnsholt You can pass a Perl 6 sub to C
lizmat hopes someone else will be able to answer that one as she s a complete NativeCall noob
arnsholt But can't invoke function pointers returned from C
hoelzro arnsholt: that's acceptable
that's in jnthn's repo?
arnsholt Yeah
hoelzro cool =) 16:22
16:22 geekosaur joined
hoelzro I'll see if I can update the README 16:22
arnsholt: what's the invocation for that look like?
16:22 sven_123_ joined
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
hoelzro ok, cool
that'll do fine
16:24 Akagi201 left 16:26 FROGGS joined 16:28 zakharyas left 16:29 mvuets left, adu left 16:37 Hor|zon joined 16:38 kaleem left, adu joined 16:43 telex left, tinyblak_ left, tinyblak joined, Hor|zon left 16:44 telex joined
masak who wants to grab Tuesday and Wednesday next week? github.com/perl6/mu/blob/master/mi...4/schedule 16:45
er, Tuesday *or* Wednesday, I should say.
16:53 BigBear left 16:57 sven_123__ joined 17:01 smls left 17:03 spider-mario joined, kurahaupo left 17:06 BigBear joined, fhelmberger left
flussence ooh, this is cool: www.qemu-advent-calendar.org/ 17:10
17:11 j4janicej left 17:17 j4jackj joined 17:18 Hor|zon joined 17:19 Akagi201 joined 17:20 j4jackj is now known as j4janicej 17:21 adu left 17:22 karb joined 17:24 Akagi201 left 17:28 abraxxa left 17:35 adu joined
moritz recently learned that KVM uses qemu to run its guest machines 17:38
17:38 BigBear left 17:41 gtodd left, tinyblak left 17:42 ab5tract joined
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.
TimToady either
ab5tract .tell smls takend care of :)
yoleaux ab5tract: I'll pass your message to smls.
ab5tract TimToady: i probably got that impression from you then :) 17:45
17:45 BigBear joined
TimToady I think BUILD is at least twice as hard to type, because you have to hold down the shift while typing 17:45
if you've disabled caps lock like me
even if not, that's two extra keys
Huffman Coding is really just shorthand for "easy things should be easy, and hard things should be possible" 17:46
and BUILD is harder than build :)
the length (oops) of a keyword is just one manifestation of the general principle 17:47
there's also the reader's mental energy of processing and/or ignoring, which is also higher for BUILD than for build
on some level 17:48
though if someone wrote 'method build' it'd certainly be a head scratcher :)
ab5tract :)
17:50 gtodd joined
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:50
but clearly from the wikipedia description, that's stretching the original meaning quite a bit 17:51
TimToady kind of a glob there
but a glob is a kind of whatever 17:52
ab5tract :)
TimToady or maybe kind of a multipler in a sig
*plier
"can match more than one"
also see regex
17:52 FROGGS_ joined
TimToady "can match more than zero" is more better 17:52
but in all cases, still kinda means "you figure this out, not me" 17:53
and ** kinda means "you figure these out harder" 17:54
17:55 Sqirrel left, FROGGS left 17:56 tinyblak joined 17:57 tinyblak left 17:58 dakkar left, tinyblak joined, rurban joined 18:03 xinming joined
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:04
18:06 xinming_ left 18:07 kurahaupo joined
TimToady it's because methods pay no attention to the $ vs @ distinction, while list flattening pays a great deal of attention to it 18:07
18:08 vendethiel left
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:09
I could not link the list flattening with this view 18:10
moritz but that's what it's all about
map(&block, $L1, $L2, $L3) will apply &block to $L1, $L2, $L3
independently of what's inside those $Ls 18:11
because the $ tells it "it's an item, don't look inside"
so, it doesn't flatten them, even if they are lists
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
because the method is dispatched on the value inside the container, not on the container
karb Okay. I was looking at list flattening as applicable only in converting map(&block, ($L1, $L2, $L3)) to map(&block, $L1, $L2, $L3)
moritz karb: the rabbit hole is deeper :-) 18:14
karb I see that :-)
18:14 aborazmeh joined 18:15 adu left 18:16 vendethiel joined
TimToady (...) is comparable to @list there, while [...] would be comparable to $list 18:17
vendethiel masak: sorry, but my backlog is cut here :P /me goes to irclog.perlgeek.de 18:20
masak: but from what I read, "yes"
18:21 KCL_ joined
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:22
18:23 NotJack joined
TimToady in Perl 6 this is conveyed with $committee vs @committee, without reliance on which verb you choose 18:23
18:23 aborazmeh left
TimToady method dispatches, by their nature, however, are naturally singular 18:23
18:24 aborazmeh joined
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
TimToady it's like the difference between argument processing on Unix vs Windows 18:26
in Windows the process has to do all the work, while in Unix, the shell does most of the work
well, at least old-time windows, dunnow about powershell 18:27
18:27 Sqirrel joined
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 BigBear left
TimToady that's what $ means 18:28
karb with $ ?
okay
TimToady Perl 6 inflects its nouns for singular/plural
18:29 virtualsue_ joined 18:30 virtualsue left, virtualsue_ is now known as virtualsue 18:31 Mso150 joined 18:32 treehug88 left 18:36 karb left, ab5tract left 18:38 treehug88 joined
TimToady well, Perl does, in general 18:41
18:43 aborazmeh left 18:44 aborazmeh joined 18:49 [Sno] left
NotJack coming from APL/J/K, I'm now unused to making the distinction between singular and plural 18:49
TimToady well, everything is plural there :) 18:50
NotJack year
yeah
singular/plural seems to me like inflecting my verbs to agree with the color of my interlocutor's hair
weird and irrelevant
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:51
NotJack so is it *grammatically* wrong to say "Hey dude!" to the Emperor? 18:52
TimToady basically :)
18:53 aborazmeh left
NotJack in some Amazon basin languages I believe there are inflections for communicating how you *know* whatever you're discussing 18:54
first hand information, hearsay, information from a trusted informer, etc
TimToady and in some African languages too
NotJack I guess because they don't have written records?
18:54 pecastro left
arnsholt French does it as well, in newspaper language 18:55
Using the conditional to mark uncertain knokwledge
18:55 rurban left 18:56 ab5tract joined
TimToady we inflect those with "I hear...", "I was told...", "I know" etc. along with our vestigial subjunctives 18:56
and our modals, of course 18:57
"I might" is arguably our optative
Anyway, languages differ not so much in what you can say, as in what you have to say. 18:58
and Perl requires you to say singular or plural, except when it doesn't
18:59 virtualsue left
TimToady and languages that don't have mandatory number still have ways to express that when necessary 19:00
just as we still can distinguish a pair of oxen from 3 or more, despite having lost the dual 19:01
I suppose it's not surprising that Ruby uses the Japanese approach to pluralizing, while Perl uses the English. :) 19:02
ab5tract "except when it doesn't" -- these kinds of statements always make me want to see an example :) 19:03
TimToady my \foo = something(); say foo 19:04
depends on whether something returned a $ or a @
m: my \foo = (1,2,3); .say for foo 19:06
camelia rakudo-moar 6edc31: OUTPUT«1␤2␤3␤»
TimToady m: my \foo = [1,2,3]; .say for foo
camelia rakudo-moar 6edc31: OUTPUT«1 2 3␤»
19:08 tinyblak left, ptc_p6 left, rindolf left
timotimo who let this language nerd in here :) 19:10
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
timotimo \o/
masak TimToady: welcome! :D
vendethiel: gonna write it up.
vendethiel masak: nice :-)
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)
masak nodnod
don't worry, I won't scapegoat anyone. 19:15
masak cackles
vendethiel looks up "cackling"
TimToady makes his escape 19:17
masak "To make the shrill cry characteristic of a hen after laying an egg." 19:20
"To laugh or talk in a shrill manner." 19:21
lizmat "chicken" ! 19:22
19:22 BigBear joined 19:23 rurban joined 19:25 KCL_ left, KCL_ joined
moritz just set up a kvm guest locally, to practice for the p6c server 19:31
dalek rl6-roast-data: 15641dd | coke++ | / (5 files):
today (automated commit)
rl6-roast-data: 879ce71 | coke++ | / (5 files):
today (automated commit)
colomon moritz++
moritz the server has been mounted in the rack today, and cabled 19:39
so it just waits for me to show up and configure
colomon \o/ 19:41
[Coke] parrot clean, still failures on moar (jit and non jit failing differently) 19:47
dalek ake: 42ad961 | (Arne Skjærholt)++ | src/Snake/Metamodel/ClassHOW.nqp:
Dead code removal.
19:49
ake: e635745 | (Arne Skjærholt)++ | src/Snake/Metamodel/ClassHOW.nqp:
Stub in a cheaty stringification for Python objects.
ake: 06becc4 | (Arne Skjærholt)++ | src/ (2 files):
Simpler builtin function handling.
lizmat [Coke]: I assume the failures are different every run ?
[Coke] lizmat: I can check a few. 19:51
pretty much. some overlap, not much. 4 days ago we had a clean run 19:54
(looking at -jit only
lizmat on OS X, right ? 19:55
[Coke] yes. 19:56
19:57 brother left, bcode left, immortal joined, brother joined, integral left
lizmat at the Amsterdam.PM meeting I was talking about this 19:58
19:58 bcode joined
lizmat and someone suggested we should at least try switching off memory compression to see whether that makes a difference 19:58
19:58 mvuets joined, integral joined, integral left, integral joined 19:59 erkan left
[Coke] lizmat: trying that now 20:02
lizmat can you do that without a reboot ?
masak m: macro swap($a, $b) { quasi { ({{{$a}}}, {{{$b}}}) = {{{$b}}}, {{{$a}}} } }; my $w = 5; my $z = 10; swap $w, $z; say [$w, $z].perl
camelia rakudo-moar 6edc31: OUTPUT«[10, 5]␤»
masak \o/
20:02 denis_boyun_ joined 20:05 ptc_p6 joined
[Coke] lizmat - nope, reboot required 20:05
lizmat yeah, thought so :-(
waiting for a good time to try that myself :-)
[Coke] lizmat; of course, everything feels slower now. :) 20:06
20:06 [Sno] joined
lizmat is it that noticeable ? 20:06
[Coke] if that's what it is, what the hell do we do to fix it?
spec test passed 1005 20:08
er, 100%
lizmat so, no problems all of a sudden ?
colomon what's the memory compression thing?
[Coke] I don't normally run with make spectest, I use test_summary, but did TEST_JOBS=12 make spectest and no errors.
lizmat wow
[Coke] this -without- a rebuild.
colomon try with test summary? 20:09
lizmat I was thinking that maybe *memory* pressure would be the reason for failings
rather than CPU pressure
and memory pressure would result in compression I gues
so I'm wondering whether we wouldn't need some flag to clang to make it safe 20:10
hoelzro is there a way to tell NativeCall "hey, don't free this string" 20:11
I see that 08-callbacks.t uses strdup to kind of get around this
20:13 BigBear left
[Coke] lizmat: memory compression shouldn't be altering the behavior of -any- program, I would think. 20:16
my academic friend suggests we bugreport this to apple.
(test summary isn't multi-threaded, this will take a while)
lizmat perhaps we should report it, yes 20:17
[Coke] Let's see if you can reproduce the finding.
lizmat after I finish my advent post 20:18
:-)
[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 darutoko left
hoelzro timotimo: the only Parameter trait I see that applies to Parameters deals with encodings 20:22
timotimo oh 20:23
20:23 FROGGS_ left
timotimo worst case: create it as a buf of int8 20:23
hoelzro hmm, good idea 20:24
timotimo oh 20:25
hm, no, nativecasting it to a CArray wouldn't work
hoelzro no? 20:26
timotimo probably not
hoelzro well, I see that strings in src/core/nativecall.c in MoarVM are always freed if they're parameters
which seems wrong for callbacks
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
ugexe ab5tract++ 20:38
20:38 virtualsue joined
hoelzro ab5tract++ indeed 20:41
20:43 NotJack left
arnsholt hoelzro: There's explicitly-manage (or something like that) 20:46
To prevent too early frees 20:47
Is ugly as hell, but sort of works
hoelzro ah, sure enough
I see it's not a trait
arnsholt There are a lot of rough edges in NativeCall, once you start doing real things
hoelzro I was thinking it'd be something like Str is dont-free
timotimo ah, it's not a trait, it's a sub
arnsholt Yeah 20:48
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:50
20:51 KCL_ left 20:52 BigBear joined
moritz why not encode straight to a buf8? 20:58
vti this code hangs rakudo+moarvm: perl6 -e 'my $re; $re = rx/$re/; say 1.match($re)' 21:05
21:05 denis_boyun_ left
lizmat same problem as: 21:05
m: my @a; @a[0] = @a; @a.perl 21:06
arnsholt moritz: buf8 is a Buf, isn't it?
camelia rakudo-moar 6edc31: OUTPUT«(timeout)»
jnthn No, it's not. The latter is potentially fixable. The first is a straight out infinite recursion.
hoelzro arnsholt: isn't that kind of what NativeCall does?
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...
lizmat perhaps a /"$re"/ ?
vti jnthn: i thougt rx// is smth like qr//, i wanted to compile a regex from a string 21:08
21:08 adu joined
jnthn vti: /<$the_string>/ and don't re-use the same var for the regex and the string. :) 21:09
It should be smart enough to cache it after first evaluation, iirc.
21:10 adu left
vti jnthn: ah 21:11
jnthn: thanks
21:13 pecastro joined
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?
jnthn: so $rx on the right is already a regex 21:16
21:17 Mso150 left
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
jnthn Uh, first class *code objects* is probably what I wanted to say :) 21:18
arnsholt hoelzro: Sounds excellent! 21:20
hoelzro: OOC, what're you working on wrapping?
vti m: say my $foo = $foo++ + $foo--
camelia rakudo-moar 6edc31: OUTPUT«1␤»
lizmat $ perl -E 'say my $foo = $foo++ + $foo--' 21:21
1
hoelzro arnsholt: libexpat 21:22
lizmat if a problem, it seems to be consistent across Perl versions :-)
vti lizmat: yeah, but use strict ;)
arnsholt hoelzro: Ooh, XML::Parser
leedo_ vti: maybe it's more akin to my $f; $f = sub { say "hi"; $f() }; $f(); 21:23
dalek ast: ab81dfb | usev6++ | S04-statements/for.t:
Add test for RT #123005
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123005
jnthn leedo_: Yes, that nicely captures what I was trying to say :)
jnthn gets an early night 21:24
o/
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)
vti leedo_: thanks, that makes sense.... after you know it %)
21:29 kurahaupo left
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
like a trigger of sorts?
lizmat draft for tomorrow's blog post: gist.github.com/lizmat/672dd8960a4ee299f447 21:32
comments welcome
21:35 anaeem1_ left, anaeem1 joined 21:36 kaare_ left
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:36
ab5tract masak: neat :) 21:37
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
hoelzro leedo_: oh, thanks!
I'll take a look
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
masak lol! I bloggered! strangelyconsistent.org/blog/macros...eholdeeers 21:40
arnsholt Not that wrapping expat is trivial, but less work than an XML grammar, I think
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]␤»
hoelzro lizmat: thanks
leedo_: that did the trick! 21:47
leedo_ awesome
21:50 BigBear left
lue "Does this whole thing remind you of beta reduction in lambda calculus?" um, sure :) . 21:54
masak I know, right!?
it's uncanny!
lue masak: aren't the key => value substitutions usually done by .trans, or is there something about .subst I didn't know? 21:55
gtodd m: [+]<1 2 3 4 5> 21:58
camelia ( no output )
gtodd m: say [+]<1 2 3 4 5>
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␤␤»
lue m: say [+] <1 2 3 4 5>
camelia rakudo-moar 6edc31: OUTPUT«15␤»
hoelzro "All templating syntax sucks." - here, here!
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
m: my $str = "^foo\$"; my $re = rx/<$str>/; say "foo" ~~ $re
camelia rakudo-moar 6edc31: OUTPUT«「foo」␤␤»
vti m: my $str = "^ foo \$"; my $re = rx/<$str>/; say "foo" ~~ $re
camelia rakudo-moar 6edc31: OUTPUT«Nil␤»
gtodd so I needed a space there 22:00
timotimo ooooh that's interesting
gtodd was wondering since I had no space in the script I have .... 22:01
I had (<1 2 3 4 5>) instead
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:02
gtodd eyes play trix ... need syntax highlighting 22:03
masak 'night, #perl6. will read your ample feedback in the backlog.
gtodd is there going to be a CoffeeSix slang?
errm CoffeeScript for perl6 :-)
night masak 22:04
if you are suggestible I suggest you dream of macros :-)
22:05 spider-mario left
gtodd not ;-) 22:05
22:05 BigBear joined
vendethiel gtodd: 'twould be hard :P 22:09
gtodd: current Coffee parser is a mess due to postfixes, and they're even more powerful in p6
22:09 bjz left 22:10 mvuets left
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 ...
lizmat I don't think there is currently a way to do that 22:12
22:14 vti left
ab5tract masak: nice post :) 22:16
22:16 BigBear left
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.
arnsholt "ooh, Lisp must have been successful because of the parentheses. Let's do them in triplicate!" =D 22:20
masak++
ab5tract speaking of meta ops declarations.. that doesn't feel as smooth as the normal method declaration syntax, at the moment 22:23
colomon we can declare meta ops? 22:24
ab5tract colomon: my point entirely :)
colomon has only ever done it in core. 22:25
22:25 Mso150 left
gtodd m: say <1 2 3 4 5 10>.max 22:25
ab5tract that's what is seems to take at the moment, aye 22:26
camelia rakudo-moar 6edc31: OUTPUT«5␤»
gtodd m: say "oh hai that's wrong" 22:27
camelia rakudo-moar 6edc31: OUTPUT«oh hai that's wrong␤»
gtodd m: say <1 2 3 4 5 10>.max [+]
camelia rakudo-moar 6edc31: OUTPUT«===SORRY!===␤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␤------> say <1 2 3 4 5 10>.max [+]⏏<EOL>␤ expecting any of…»
ab5tract m: say (1,2,3,4,5,10).max
camelia rakudo-moar 6edc31: OUTPUT«10␤»
bartolin that's also RT #112250 22:28
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=112250
ab5tract colomon: is the plan to have that be possible outside the core? 22:29
colomon ab5tract: darned if I know
ab5tract: I'd love that, but it seems like it would be kind of fiddly
ab5tract in fact, it seems like it might be a good story for macros 22:30
22:30 anaeem1 left
colomon could be, yes 22:30
22:30 treehug88 left
gtodd bartolin: ok thanks ... it's like the <> form is accidentally making lists out of the elements 22:30
lizmat tomorrow's advent post in draft here: perl6advent.wordpress.com/?p=2388&a...ew_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
.max
lue gtodd: the point of < > is to create an array of strings, e.g. <one two three> instead of ("one", "two", "three") 22:33
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, treehug88 joined 22:38 [particle] joined 22:41 [particle]1 left
ab5tract colomon: btw, mix 144 mix tests pass :) 22:41
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:42
bartolin lue: so you would say its correct [max] sorts <2 11> lexicographically? 22:43
m: say [max] <a z c>
camelia rakudo-moar 6edc31: OUTPUT«z␤»
bartolin m: say [max] <2 11>
camelia rakudo-moar 6edc31: OUTPUT«2␤»
lizmat yes, because in that context, 2 and 11 are Str
m: say [max] (2,11) 22:44
camelia rakudo-moar 6edc31: OUTPUT«11␤»
22:44 telex left
ab5tract m: say [max] (2.Str,11.Str) 22:44
camelia rakudo-moar 6edc31: OUTPUT«2␤»
lizmat m: say [max] ("2","11") # same thing 22:45
camelia rakudo-moar 6edc31: OUTPUT«2␤»
bartolin I'll add that to RT #112250
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=112250
22:45 treehug88 left 22:46 telex joined
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.
ab5tract of course, i've replicated my preferred comparator tests ;)
colomon m: say <2 11>.max(+*)
camelia rakudo-moar 6edc31: OUTPUT«11␤»
colomon lue: good point 22:48
n
n: say <2 11>.max
camelia niecza v24-109-g48a8de3: OUTPUT«11␤»
ab5tract i'll do a clean one from the nom behavior
colomon n: say <2 11>[0].WHAT
ab5tract and submit a pl
camelia niecza v24-109-g48a8de3: OUTPUT«(IntStr)␤»
colomon <2 11> is indeed supposed to be IntStrs, unless someone has changed that part of the spec again 22:49
bartolin and IntStr is probably NYI for rakudo ... 22:52
m: say <2 11>[0].WHAT
camelia rakudo-moar 6edc31: OUTPUT«(Str)␤»
colomon so I think lue is right that max is supposed to do what bartolin thinks it should
lue r: say IntStr
camelia rakudo-{parrot,moar} 6edc31: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Undeclared name:␤ IntStr used at line 1␤␤»
22:53 gfldex left
ab5tract colomon: oof.. actually, the situation is not so rosy. i was mistaken earlier :( 22:55
dalek ast: 4b7c128 | (Elizabeth Mattijsen)++ | integration/advent2014-day05.t:
Tests associated with 20141205 blogpost
22:57
colomon lizmat++
22:59 davido__ joined, davido_ left, ptc_p6 left
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:00
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
unfortunately, any my sub in the core, is visible in any code out there 23:03
ab5tract lizmat: no thanks then :( 23:04
lizmat well, if you look in the core settings, you will see that you wouldn't be the first 23:05
so I think for simplification of the set_operators code would warrant such a transgression
ab5tract my original plan was to do it as a meta op :) 23:06
23:07 perturbation joined
lue lizmat++ # advent post 23:11
23:12 immortal left
lizmat m: say 15 %% 3|5 # this feels like a bug 23:17
camelia rakudo-moar 6edc31: OUTPUT«any(True, 5)␤»
lizmat m: say 12 == 3|5 # this seems ok
camelia rakudo-moar 6edc31: OUTPUT«any(False, False)␤»
lizmat huh? 23:18
lue Looking at the chart, it is a bug: perlcabal.org/syn/S03.html#Operator_precedence
lizmat m: say 12 %% 3|5 # this seems ok
camelia rakudo-moar 6edc31: OUTPUT«any(True, 5)␤»
lizmat m: say 10 %% 3|5 # this seems ok
camelia rakudo-moar 6edc31: OUTPUT«any(False, 5)␤»
lue Or not, I'm silly.
lizmat advent post scheduled for 0:01 UTC 23:19
colomon m: say 15 % 3|5
camelia rakudo-moar 6edc31: OUTPUT«any(0, 5)␤»
colomon m: say 15 %% 3|5
camelia rakudo-moar 6edc31: OUTPUT«any(True, 5)␤»
colomon m: say 15 %% 5 23:20
camelia rakudo-moar 6edc31: OUTPUT«True␤»
23:20 mtj left
colomon m: say 15 %% 3 23:20
camelia rakudo-moar 6edc31: OUTPUT«True␤»
23:20 mtj joined
lue m: say 15 %% (3|5) 23:20
camelia rakudo-moar 6edc31: OUTPUT«any(True, True)␤»
colomon totally looks like a bug 23:22
a very odd one at that
n: say 15 %% 3|5 23:23
camelia niecza v24-109-g48a8de3: OUTPUT«any(Bool::True, 5)␤»
colomon huh. at least they're consistent?
23:24 rurban left
lue The precedence table I linked shows that it's the correct behavior; %% is tighter than | 23:24
colomon oh! 23:25
lizmat perhaps it shouldn't be tighter ?
colomon you're right, I wasn't looking at the results correctly
m: say 15 % 3|5
camelia rakudo-moar 6edc31: OUTPUT«any(0, 5)␤»
colomon second value is just 5
lizmat: I don't think so 23:26
lizmat well, it was a WAT for me
colomon because we want to be able to say things like 2 * $delta | 3 * $delta
and have it mean 2 * $delta or 3 * $delta rather than 2 * ($delta | 3) * $delta 23:27
lizmat I was thinking about adapting the level of %%, rather than | 23:29
as %%'s behaviour seems faulty to me
lue I'd say %% is a test operator rather than a multiplicative operator, despite its appearance. 23:30
lizmat agree
lue So perhaps knock it down to "C Chaining infix" ?
lizmat m: say 12 == 12|13
camelia rakudo-moar 6edc31: OUTPUT«any(True, False)␤»
lizmat so why does it work ok for == and not %% ? 23:31
lue Or somewhere around there, at least.
== is in the "Chaining infix" level, thus looser than |
lizmat I expect TimToady will want to chime in on that
colomon %% doesn't chain 23:32
lue I'm not %% should/could be chaining, but I think somewhere underneath | at least.
*not sure 23:33
colomon I'm not at all convinced. 23:34
dalek kudo/nom: 4c353cd | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Add Supply.close to close all known taps
kudo/nom: da7ff70 | (Elizabeth Mattijsen)++ | t/spectest.data:
Add 20141205 advent tests
lue m: say "a" eq "a"|"b"
camelia rakudo-moar 6edc31: OUTPUT«any(True, False)␤»
dalek kudo/newio: dd27056 | TimToady++ | tools/build/NQP_REVISION:
bump nqp
rakudo/newio: 8651016 | TimToady++ | tools/build/NQP_REVISION:
rakudo/newio: bump nqp
23:34 dalek left
colomon the 23:35
lizmat sorry dalek
23:35 aborazmeh joined, dalek joined, ChanServ sets mode: +v dalek
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.
colomon m: say 34 %% 3 + 1 23:37
camelia rakudo-moar 6edc31: OUTPUT«1␤»
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
camelia rakudo-moar 6edc31: OUTPUT«2␤»
dalek : 412970c | (Elizabeth Mattijsen)++ | misc/perl6advent-2014/schedule:
Claim day #19, fix day #5
23:39 virtualsue left
lizmat calls it a day... advent post should be visible in 20 mins 23:39
lue lizmat o/
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:45
lue To be fair, it's a fairly specialized test operator, for a built-in at least :) . 23:47
23:50 BenGoldberg joined 23:52 KCL_ joined 23:53 vendethiel left 23:56 vendethiel joined, adu joined 23:57 rmgk is now known as Guest37732, rmgk_ joined, Guest37732 left, rmgk_ is now known as rmgk 23:59 aborazmeh left