»ö« 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.
00:02 kurahaupo joined 00:03 KCL_ left, KCL_ joined 00:10 KCL_ left 00:11 KCL_ joined 00:15 aborazmeh joined 00:20 vendethiel left 00:21 vendethiel joined 00:26 KCL_ left, KCL_ joined 00:45 vendethiel left 00:47 vendethiel joined 00:57 araujo left 01:04 ab5tract left 01:05 Vlavv left, dayangkun joined 01:30 Vlavv joined
hoelzro so I noticed with my experimentation with NativeCall that MoarVM will free() any strings passed to callbacks; is that the behavior we want? 01:35
it seems like the default for &cb(Str) should be to *not* free the parameter
gtodd lue: bartolin: ok thanks it seemed to be something the list/array was supposed to be doing that the operator [max] was failing to account for ... i.e. it is failing to coercing to number I guess 01:36
<doc> 01:42
lue: bartolin: perl6 -e 'say <1 2 3 4 5 6 10>.max(+*)' I'd agree that is correct since perl6 -e 'say (1, 2, 3, 4, 5, 6, 10).max' works ... just needed documentation :-)
</doc>
:-)
cheers
01:46 davido___ joined 01:47 jimmy__ joined 01:48 Vlavv left, davido__ left 01:49 Akagi201 joined
gtodd will work around it until IntStr arrives 01:55
01:55 vendethiel left 01:57 KCL_ left 02:00 vendethiel joined 02:01 Vlavv joined 02:07 araujo joined 02:13 DarthGandalf left 02:14 DarthGandalf joined 02:31 dayangkun left 02:32 aborazmeh left 03:02 chenryn joined 03:11 perturbation left, aborazmeh joined 03:17 Mso150 joined 03:19 noganex_ joined 03:20 aborazmeh left 03:22 noganex left 03:34 BenGoldberg left 03:38 Mso150 left 03:39 Mso150 joined
raydiak \o #perl6 03:47
adu hey raydiak 03:49
03:49 Mso150 left
raydiak hi adu 03:49
03:49 jakesyl joined 04:03 kurahaupo left 04:08 tinyblak joined 04:26 hagiri joined 04:45 kaare_ joined 04:47 vendethiel left, tinyblak left 04:48 tinyblak joined 04:51 vendethiel joined 05:11 davido___ left 05:19 vendethiel left 05:21 chenryn left 05:22 colomon left, vendethiel joined 05:30 kaare_ left 05:35 davido_ joined 05:37 tinyblak_ joined 05:40 chenryn joined, tinyblak left 05:41 adu left, tinyblak_ left 05:42 adu joined, tinyblak joined 05:43 vendethiel left 05:45 vendethiel joined 05:48 mr-foobar left 05:54 kaare_ joined 06:10 hagiri left 06:11 telex left 06:12 telex joined 06:15 adu left 06:17 kaleem joined 06:19 KCL_ joined, bjz joined
TimToady Upon further reflection, I think I've over-engineered the longest-literal tiebreaker, and should go back to static analysis, because the current dynamic method 1) is too difficult ot understand or explain, 2) slows down the NFA engine a bit, and 3) interferes with possible DFA optimizations. 06:21
yoleaux 4 Dec 2014 22:19Z <ab5tract> TimToady: thanks for the example :) i was puzzling over the \var syntax when I started digging into meta op declaration
TimToady and the main point of the tiebreak is to privilege explicit keywords, which are almost always literal in the first atom anyway 06:22
for weird cases we could have a :chars(5) or so that say to treat the first 5 chars as literal, for cases like [Kk]nock, or possible some marker that says "just measure to here" 06:23
*says 06:24
and blow up if it's not a fixed number of chars
jimmy__ so time to refactor? 06:26
TimToady well, mostly go back to one of the earlier approaches, I think, more or less 06:27
06:27 tinyblak_ joined
TimToady but I'll need to look at the tests to see where they'd change 06:27
the other approach would be some pragma that says it's okay to ignore longest literals to generate a DFA, but I don't like that as much 06:29
anyway, just rethinking the problem a bit, and balancing out some performance goals in my head 06:30
I'm not planning to rewrite it all tonight :)
jimmy__ :P
06:30 tinyblak left
jimmy__ looks like 2) and 3) is the real reason 06:34
TimToady well, yeah :)
I put them in order of increasing concern :)
if someone uses a regex that can turn entirely into a DFA, it would be nice to be able to do so 06:35
jimmy__ oh, so the key is about DFA
yeah
TimToady a DFA can't easily tell you which NFA states it passed through, so states that mark longest literals are a problem 06:36
jimmy__ you remember me this: www.jasq.org/just-another-scala-qua...fbfbffbf01 06:37
the tree at the bottom looks like good 06:40
06:42 robinsmidsrod left
TimToady is allergic to some trees :) 06:43
06:44 vendethiel left 06:46 robinsmidsrod joined 06:48 anaeem1 joined 06:49 anaeem1 left 06:50 anaeem1 joined, vendethiel joined 06:55 robinsmidsrod left 06:56 robinsmidsrod joined, tinyblak_ left 06:57 tinyblak joined
lue TimToady: earlier there was some discussion that perhaps %% should have a lower precedence than it does, seeing as it's a test operator more than a math operator, and it was suggested you'd want to weigh in :) . 07:03
m: say 12 == 19|12; say 12 %% 3|5 # what prompted this, in a nutshell
camelia rakudo-moar da7ff7: OUTPUT«any(False, True)␤any(True, 5)␤»
TimToady I think of it more as a math operator, actually... 07:09
Didn't you first learn "is this divisible by that?" when your gradeschool teacher was teaching you division?
lue Yeah, it's a bit funny. I would classify it as a test operator, but a very specialized, mathy one. 07:10
TimToady and it's partly there just for mnemonic reasons, because you can remember where % is already
07:12 vendethiel left
TimToady and there's always going to be traps in the precedence table regardless, so one can't really justify moving something merely because someone got tricked, because every time you fix something, you break something else 07:12
best we can do is try to break the situtations that don't occur very often 07:13
unfortunatetly for this case, I consider $x %% 3|5 to not be a very common situation
07:14 vendethiel joined
lue Agreed. I can't quite think of a situation where you'd need %% to be on the same level as * and / , though. 07:14
07:17 gfldex joined
lue To put it another way, $x %% (3 | 5) may not be common, but I don't think ($x %% 3) | 5 is common either. 07:17
07:19 dayangkun joined, dayangkun left
TimToady I suppose currently someone might write "." x $count + $count %% 2 to make sure only an odd number of dots are produced 07:26
07:27 bjz_ joined
TimToady and the counterargument that %% doesn't really chain is not a great issue, really...it doesn't blow up either if you say $x %% y %% $z and it's chaining...it's not like it makes any sense at the current precedence level either 07:28
lue If you were to move %% down to somewhere below | , that snippet would essentially be "....." %% 2, which I can't say would ever make much sense :) . 07:29
07:29 bjz left
raydiak finds %% being different from == less surprising than being different from % 07:30
TimToady of course, to a C programmer, it's short for a % plus == 0, so that has an affinity to == as well 07:31
raydiak (especially since I'll sometimes interchange % and %% to logically negate an expression)
TimToady there is that 07:32
course, maybe you should be using %% and !%% in that case
raydiak and what happens when you do $x %% 4 & $y %% 3 ? 07:33
TimToady currently %% is an exception to the usual rule that meta ! applies to chaining ops
raydiak agreed, but my brain likes % a heck of alot more than !%%
07:33 robinsmidsrod left
lue I think I've done % <-> %% once or twice myself, but perhaps it's not a good idea to flip between a numeric and a boolean operator so freely. :) 07:33
TimToady to a C programmer, % is a boolean operator :)
07:34 robinsmidsrod joined, jimmy__ left
raydiak I'd almost rather see %% be a numeric operator :) 07:35
07:36 robinsmidsrod left, anaeem1__ joined, robinsmidsrod joined, jimmy_ joined
TimToady well, certainly George Boole considered boolean algrebra to be a part of math... 07:37
so saying that something that return True/False isn't math is not a strong argument to me :) 07:38
07:38 anaeem1 left, Isp-sec joined
TimToady *returns 07:38
lue Especially when you turn True/False into 1/0 :) 07:39
07:40 [Sno] left
raydiak oddly, I've been puzzling over that distinction for a few days...trying to figure out if math::symbolic relations are/should-be operators or not 07:40
07:43 darutoko joined
lue I think it's worth noting that %% is less likely to appear in a more complex math expression than % . 07:44
TimToady yes, it's almost always used directly in a boolean context
raydiak that's true, so guess the precedence change is a non-issue for % <-> %% in most cases 07:46
TimToady except with junctions, as we've seen
m: say 1 ?& 2
camelia rakudo-moar da7ff7: OUTPUT«True␤»
TimToady these also return booleans, but are at the "math" level
m: say 1 !?& 2 07:47
camelia rakudo-moar da7ff7: OUTPUT«===SORRY!=== Error while compiling /tmp/phCX1aLPX9␤Cannot negate ?& because it is not iffy enough␤at /tmp/phCX1aLPX9:1␤------> say 1 !?&⏏ 2␤»
TimToady hmm
looks pretty iffy to me... :)
lue Isn't ?& just && ?
TimToady no
it doesn't short circuit, and coerces both sides to boolean 07:48
07:48 FROGGS joined
TimToady m: say 42 && 43 07:48
camelia rakudo-moar da7ff7: OUTPUT«43␤»
TimToady && does neither 07:49
lue well, ?& is just ?($a && $b) then. I think I'm perhaps too used to using && just for the ultimate True/False result :) .
TimToady m: say 0 ?& die "oops" 07:50
camelia rakudo-moar da7ff7: OUTPUT«oops␤ in block <unit> at /tmp/2BrmOsP9N5:1␤␤»
07:50 zakharyas joined
TimToady doesn't short circuit 07:50
m: say ?(0 && die "oops")
camelia rakudo-moar da7ff7: OUTPUT«False␤»
TimToady does short circuit
lue by "is just", I realize I really meant "is kinda like" 07:51
TimToady you're startin' to get as fuzzy-brained as me :)
next thing you know, you'll be turning into a linguist 07:52
07:52 rurban joined
lue Well... :P 07:52
TimToady so basically, I like having %% in both places, but differently 07:53
07:53 onebitboy left
TimToady on the whole, though, I don't think moving %% gains us all that much 07:54
lue Yeah, I think 12 %% 3|5 is maybe one of those times where you wish there was a sane way for the number of spaces you put between an operator and its args matter sometimes, because a human would first assume 12 %% (3|5) from that.
*args to matter 07:55
lue is clearly rusty on discussing something like Perl 6 :P
TimToady but then -$x ** 2 won't work like the mathematicians want
m: say -4 ** 2 07:56
camelia rakudo-moar da7ff7: OUTPUT«-16␤»
TimToady 'course, that's because they're thinking -4²
lue I think I recall being all "whatever you say" when I first learned about -4² anyway :) . 07:57
07:57 gfldex left
TimToady so that's a dwim with a pretty obvious corresponding wat 07:57
lue (not to mention focusing on spaces would be a suspiciously pythonesque decision :P) 07:58
TimToady we could possibly dwim a warning in such situations, but I don't really feel like forcing people to write -$x**2 just to suppress it
spaces also doesn't really help us with ^10.foo 08:00
not unless we make ^10\.foo a precedence dropper, which I thought about and rejected several times now :)
lue I think at some point you simply have to memorize a larger version of PEMDAS (or keep a chart handy) 08:01
TimToady one runs into the (^10).foo situation frequently enough that one develops a neural twitch when one sees ^10.foo 08:02
%% 3|5 won't happen often enough to develop a neuron for that
lue TimToady: you could always make a low precedence version of . , like with &&/and ||/or :P .oO( ^10 method foo )
TimToady at some point it's easier to just put parens around the left side :) 08:03
maybe use the 'wa' topicalizer from Japanese as a reverse 'given': ^10 wa .foo 08:05
lue jokingly imagines a surprise return of -> , but this time as a looser method call: ^10->foo 08:06
08:06 robinsmidsrod left
TimToady alas, we use that currently for error reporting 08:07
08:08 robinsmidsrod joined
TimToady m: ^10->foo; # curious 08:08
camelia rakudo-moar da7ff7: OUTPUT«===SORRY!=== Error while compiling /tmp/tsyzSbmFd5␤Unsupported use of -> as postfix; in Perl 6 please use either . to call a method, or whitespace to delimit a pointy block␤at /tmp/tsyzSbmFd5:1␤------> ^10->⏏foo; #…»
TimToady well, there's that
lue ^10 wa .foo is probably a better route; I'm not sure what would happen if we tried figuring out the rules between two different method call operators. 08:10
08:10 anaeem1__ left
TimToady we do something like that with .= currently though 08:10
we could do it with . too, except... 08:11
m: say 42 . foo
camelia rakudo-moar da7ff7: OUTPUT«===SORRY!=== Error while compiling /tmp/q08jdEfK0S␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/q08jdEfK0S:1␤------> say 42 . ⏏foo␤»
TimToady we could go the tuxic route and say that 42 .foo is allowed, especially with newline whitespace, but then it becomes much more difficult to notice missing semicolons 08:13
it's all tradeoffs...
lue I'm just wonder what you'd expect from ^10->foo->bar and ^10.foo->bar . ^10->foo.bar is obvious (as hopefully is ^10.foo.bar ☺). 08:14
*wondering
TimToady and 42\ .foo is shorter than 'wa', plus there's history for line continuation with \
08:15 robinsmidsrod left
lue Though ^10\ .foo would probably break some people's expectation that unspace doesn't change behavior. 08:15
moritz also 'wa' is just one character away from "wat"
08:16 robinsmidsrod joined
TimToady so I've always just come back to parens, which don't generally spell wat, even in Lisp :) 08:16
jimmy_ lisp: parens is your friends 08:17
TimToady there is no precedence table possible that doesn't occasionally require parens
having no precedence table at all just means you require parens more often :)
08:18 BigBear joined
lue I get the feeling that, after well over a decade, Perl 6's precedence table is probably well-thought-out at this point, so no surprise if nothing gets changed :) . 08:19
TimToady or you can have a very simple precedence table, like APL, and you still need parens
well, the %% | thing was new to me, but just doesn't quite rise to the level of We Gotta Fix This Now Or Never 08:20
and people have lived with much worse precedence warts in C for many years 08:21
lue
.oO(Well, seeing you said earlier you like %% in both positions, maybe we need quantum precedences...)
08:21 robinsmidsrod left 08:22 adu joined
TimToady I'll ask Dr Schrödinger 08:22
08:22 robinsmidsrod joined
TimToady or maybe I'll ask the Elves for advice 08:22
08:25 tinyblak_ joined
raydiak btw thanks TimToady++ for the tips yesterday on (not) using arrays in regexes...math::symbolic::grammar is much (I think several times) faster now 08:25
TimToady should not make obscure LotR references, sorry..
08:25 tinyblak left
moritz TimToady: oh yes, you should 08:27
TimToady well, yes and no...
08:28 robinsmidsrod left
moritz :-) 08:28
08:29 robinsmidsrod joined 08:30 vti joined
raydiak g'night all \o 08:32
08:32 Celelibi left
TimToady o/ 08:32
08:33 Celelibi joined 08:34 Isp-sec left 08:35 [Sno] joined, Mso150 joined 08:41 vendethiel left, robinsmidsrod left 08:44 robinsmidsrod joined 08:45 vendethiel joined, robinsmidsrod left
masak morning, #perl6 08:46
08:46 robinsmidsrod joined 08:47 robinsmidsrod left 08:49 robinsmidsrod joined
masak by the way, in Scandinavian tradition, I'm pretty sure Santa !~~ Elf. in fact, I don't think we have elves of that kind here. we have other kinds of elves. 08:49
08:49 [Tux] left
masak in these parts, Santa is probably just an obese, well-cladd human male working for the Coca Cola Company. 08:50
clad*
08:51 robinsmidsrod left 08:52 robinsmidsrod joined
TimToady cladistics should tell us whether Santa is an Elf 08:52
masak :)
08:53 robinsmidsrod left 08:54 robins joined
huf santa is one, that's ten less than elf 08:56
08:58 [Tux] joined
masak m: say 12 %% 5 08:59
camelia rakudo-moar da7ff7: OUTPUT«False␤»
08:59 abraxxa joined
masak ah, right. 08:59
vti m: "hi" ~~ /$<foo>=(.*)/ && say $<foo> 09:03
camelia rakudo-moar da7ff7: OUTPUT«「hi」␤␤»
vti m: my $re = q[$<foo>=[.*]]; "hi" ~~ /<$re>/ && say $<foo>
camelia rakudo-moar da7ff7: OUTPUT«(Any)␤»
vti any ideas why the named capture doesn't work in the second example?
09:06 kurahaupo joined, vendethiel left 09:07 [Tux] left 09:08 [Tux] joined, vendethiel joined 09:09 xinming left, xinming joined 09:10 ptc_p6 joined 09:12 anaeem1_ joined
masak vti: if I remember right, regexes interpolated from strings simply do not capture anything. 09:14
vti: I don't remember the rationale, though. I can see it more easily for numbered captures, where Perl 6 has it as statically determinable what ends up where. 09:15
vti m: my $re = q[(.*)]; "hi" ~~ /<$re>/ && say $0 09:16
camelia rakudo-moar da7ff7: OUTPUT«(Any)␤»
09:18 fhelmberger joined
FROGGS vti: there is a simple rule of thumb: if the first thing after the < is a non-word character, it won't capture 09:27
and here you have the $
m: my $re = q[(.*)]; "hi" ~~ /<re=$re>/ && say $0 # in case that is enough 09:28
camelia rakudo-moar da7ff7: OUTPUT«(Any)␤»
FROGGS err
m: my $re = q[(.*)]; "hi" ~~ /<re=$re>/ && say $/ # in case that is enough
camelia rakudo-moar da7ff7: OUTPUT«「hi」␤ re => 「hi」␤␤»
FROGGS m: my $re = anon regex { (.*) }; "hi" ~~ /<re=$re>/ && say $/ 09:29
camelia rakudo-moar da7ff7: OUTPUT«「hi」␤ re => 「hi」␤ 0 => 「hi」␤␤»
FROGGS or do that if you need more power...
09:30 sven_123__ left
FROGGS interpolation a string as regex rules is like EVALing a piece of code... you sacrifice something when doing so 09:30
vti FROGGS: i think that's not the same 09:32
m: my $re = q[abc$<foo>=[.*]]; "abchi" ~~ /<re=$re>/ && say $/
camelia rakudo-moar da7ff7: OUTPUT«「abchi」␤ re => 「abchi」␤␤»
FROGGS I know
use an anon regex if you need to capture beyond that point
m: my $re = anon regex { abc$<foo>=[.*] }; "abchi" ~~ /<re=$re>/ && say $/ 09:33
camelia rakudo-moar da7ff7: OUTPUT«「abchi」␤ re => 「abchi」␤ foo => 「hi」␤␤»
FROGGS it might be fixable to do that for the interpolated string, though 09:34
vti FROGGS: and then $<re><foo>? yeah, that seems to work
FROGGS right 09:35
vti FROGGS: wow, i woudn't figure that on my own, thanks
FROGGS vti: you're welcome :o) 09:36
masak FROGGS++ # simple rules of thumb 09:41
timotimo thumbs rule 09:43
vti FROGGS: wait a minute ... :) i still need to put a variable's content into that anon regex 09:47
FROGGS vti: where do you get that var's content from? 09:48
vti FROGGS: it just a simple string i build 09:49
masak calls for more concrete examples! 09:51
timotimo don't build too much out of concrete, it looks so bland!
masak .oO( too many concrete cows )
lue I was about to say "I wish abstract was a real material you could pun around with too", but I guess that'd defeat the purpose of the word :) . 09:53
timotimo (very OT) so it turns out embroidery on a bathrobe works - sort of: imgur.com/a/7xVYz 09:54
masak timotimo: all you had to do to make it on topic was to make it Camelia! :) 09:56
timotimo right, i was suggesting that should be next :)
sadly, the under thread (bobbin thread? shuttle thread? lower thread?) comes through quite easily, so unless i want to have one of those for each color of camelia, it'd possibly look not terribly good 09:57
vti m: my $string = "/abc\$<foo>=[.*]/"; my $re = EVAL $string; "abchi" ~~ /<re=$re>/ && say $/ 09:58
camelia rakudo-moar da7ff7: OUTPUT«「abchi」␤ re => 「abchi」␤ foo => 「hi」␤␤»
timotimo i think i'd want to put a camelia onto something more sturdy, though. or perhaps embroiderize (embroidify? embroidulize?) it onto a fleece and iron it onto the material in question 09:59
lue timotimo: "embroider" is the verb :)
timotimo i kind of like embroidulize 10:01
embroidery machines are simply magical 10:02
vti FROGGS: EVAL seems to solve all the problems
timotimo iirc froggs embroidered a camelia onto a shirt some time ago already
FROGGS true 10:03
vti and spaces in regex are working again 10:05
moritz ping master.p6c.org # the community server is connected to the network 10:06
timotimo oooh sweet 10:12
10:16 tinyblak_ left, tinyblak joined 10:17 mvuets joined
moritz # free -m total used free shared buffers cached 10:19
Mem: 32138 1331 30807 16 93 979
timotimo neato :)
FROGGS :o) 10:22
10:22 adu left 10:23 jimmy_ left 10:25 jimmy_ joined, jimmy_ left 10:33 sven_123_ left 10:35 onebitboy joined 10:37 mvuets left
timotimo even though we're going to have a guest for high-risk stuff, i'm still not comfortable coding up a "try rakudo" type service without finding more ways to have security 10:37
10:37 mvuets joined
moritz timotimo: the guest will be a debian jessie, with cgroups enabled 10:40
timotimo: if you write a systemd service file, it makes it trivial to give it an isolated /dev/, read-only /etc/, no outbound network etc.
timotimo would we want to prevent network access for a "try rakudo" thing? :) 10:41
well, we could have it firewalled so that it can only talk to the "outside internets"
moritz 0pointer.net/public/systemd-nluug-2014.pdf 10:42
10:42 Mso150 left
woolfy moritz++ for community server 10:43
lue What is this community server, by the way?
moritz lue: do you know what feather is?
lue Yep.
moritz lue: its successor.
see perlgeek.de/blog-en/perl-6/2014-com...nding.html 10:44
and perlgeek.de/blog-en/perl-6/2014-com...pdate.html
lue reads
timotimo moritz: doesn't sound too bad 10:45
woolfy Ha, I missed that second blog. Again, moritz++
timotimo moritz: do you think there's a simple/sane way to throttle outgoing network traffic from a try-rakudo session? 10:47
so that it can't be repurposed as a spam machine or for attacking stuff?
moritz this morning I spent a fun hour in the data center, installing debian (because the pre-installed one didn't come with root password, and init=/bin/bash didn't work...), configuring the network and installing openssh
timotimo: I'd just firewall the usual smtp ports
timotimo (kind of unlikely that someone would actually go to the trouble of building a spam-making thing in perl6, or figuring out how to "upload a script" and run it, but you never know)
moritz also, we can give it a separate IP address, and have much fun with routing/forwarding it 10:49
arnsholt Forward all outgoing network connections to a server that spits out the same content as reading from STDIN, perhaps? =) 10:52
timotimo just set up a honeypot; there's already made services for that and they ought to offer a variety of different services you may want to try out :P 10:54
10:57 rindolf joined, BigBear left
Woodi hi today :) 10:58
10:58 robins left 11:00 robinsmidsrod joined, virtualsue joined 11:01 denis_boyun joined
Woodi moritz: would be nice to have some "DOS protection" of some kind. but probably it's a network provider service... lonely host on the net is a bit helpless 11:01
11:08 chenryn left 11:11 rindolf left
Ulti is there some docs somewhere on what is/isnt part of the RESTRICTED setting? 11:13
vti i have added a label to a for loop, and started getting "This type cannot unbox to a native string" error 11:14
here the smallest script gist.github.com/vti/e4af50e401f0462f6274
if the class is defined in script.pl6, then there is no error
FROGGS hmmm 11:15
vti: good catch
vti FROGGS: should i add a stacktrace?
FROGGS vti: can you please run the script with --ll-exception, and put that information to that gist?
yeah :o)
vti FROGGS: updated the gist 11:16
FROGGS ohh, it fails to actually create the Label object 11:17
I guess $?FILES is null or so
timotimo FROGGS: that's from star 09 11:18
FROGGS though, I thought we are handling that case
timotimo didn't we fix that?
FROGGS I think so
vti yeah, i am using 2014.09
timotimo m: class Foo { method foo() { ROUTE: for ^1 { } } }
FROGGS lemme check
camelia ( no output )
timotimo star: class Foo { method foo() { ROUTE: for ^1 { } } }
camelia ( no output ) 11:19
timotimo huh.
FROGGS only in a module
vti yes, it reproduces only with 'use' from another file
FROGGS vti: that's the fix: github.com/rakudo/rakudo/commit/d3...38898b694e
which landed *after* 2014.09
vti i see
i tried to use the latest rakudo days ago, but it didn't work out, i will try again 11:20
FROGGS vti: I'd be happy to help you there
not now, but in about 7 hours from now :o)
11:21 tinyblak left
Ulti finds RESTRICTED.setting with the big long list in :3 11:21
vti FROGGS: :)
11:21 tinyblak joined
Ulti looks like classes that 'does' the restricted things are not themselves restricted? like IO::Socket::INET does IO::Socket 11:25
though I got back a 0 byte Buf :S so might just be failing silently
11:26 tinyblak left
FROGGS I guess we should restrict the nqp ops at some point 11:26
maybe we can reregister them
m: say nqp::dir
camelia rakudo-moar da7ff7: OUTPUT«===SORRY!===␤No registered operation handler for 'dir'␤»
Ulti I dunno in some ways it's nicer at the class level, since I could make my own Socket that doesn't let you do that much or only lets you connect to a single host 11:28
FROGGS m: chdir("foo")
camelia rakudo-moar da7ff7: OUTPUT«Failed to change the working directory to '/home/camelia/foo': does not exist␤ in method <anon> at src/gen/m-CORE.setting:13772␤ in any find_method_fallback at src/gen/m-Metamodel.nqp:2725␤ in any find_method at src/gen/m-Metamodel.nqp:988␤ in …»
11:28 baest left
FROGGS Ulti: when you forbid the use of specific nqp ops, then you can still provide a class that does other things 11:29
that's the more safer and saner approach IMO
mvuets vti, did you try 2014.11 or tip?
Ulti m: IO::Socket::INET.new(:host("localhost"),:port(80)).read(10).say
camelia rakudo-moar da7ff7: OUTPUT«(timeout)» 11:30
Ulti erk sorry
vti i have replaced rakudo/ in rakudo-start-2014.09 with a symlink to the latest git, and then compile everything as usual, am i doing it right? 11:31
Ulti m: say "I'm still happy"
camelia rakudo-moar da7ff7: OUTPUT«I'm still happy␤»
Ulti gd gd
mvuets vti, i don't know for sure, but sounds about right. 11:33
11:33 baest joined
mvuets vti, i personally liked rakudobrew to install and manage rakudos. it's much convenient unless you hack on rakudo itself 11:33
vti: also might make sense to try out the latest release instead of tip 11:34
speaking of rakudo releases: rakudo.org is misleading as the last announcement there is about 2014.09 when in fact releases happen monthly 11:35
was it a deliberate choice, or is lack of time/will? 11:36
11:37 tinyblak joined
Ulti mvuets only Rakudo* releases are mentioned on the blog 11:38
since they are tested against the existing ecosystem a bit more 11:39
FROGGS p: BEGIN { nqp::getcomp('QAST').operations.add_hll_op('perl6', 'shell', -> $qastcomp, $op { die "RESTRICTED" }) }; nqp::shell() # \o/
camelia rakudo-parrot da7ff7: OUTPUT«===SORRY!===␤Error while compiling op shell: RESTRICTED␤»
Ulti cool
FROGGS so it will all be compile time erors too rather than runtime? 11:40
FROGGS though, that's just one step, since we want to compile the script but forbid the execution of these ops
no
I guess
mvuets Ulti: oooh, i see. they just happen to have the same versioning scheme which confused me. thanks
FROGGS brb
11:41 chenryn joined, colomon joined 11:42 tinyblak left, kaleem left, tinyblak joined
Ulti mvuets yeah there is the same convention for version numbers but it's a different repo github.com/rakudo/star 11:42
timotimo Ulti: if you change the thing in rakudo/star you'll be able to create a new star distribution, which is possibly not what you want 11:46
Ulti huh? 11:47
timotimo er 11:48
that wasn't you, that was vti
Ulti heh
mvuets Ulti: if i was attentive enough i'd spot the word "star" in the post title q-:
Ulti: i think i just presumed star releases happen monthly as well as rakudo ones 11:49
Ulti mvuets it does kind of raise the question what star is about as Rakudo is increasingly stable though, since rakudobrew+Task::Star sort of does everything people on OSX/Linux would want
I guess you want something that isnt a moving target for people to agree upon as a release 11:50
vti rakudobrew was the way to go, label works now 11:51
mvuets vti: \o/
...then do rakudo releases make sense as such? 11:52
Ulti yeah because they are tested and a label that you can compare between rather than being some hash version at the second you decided to build 11:53
you wouldnt want to support any commit ever made in the history of a language :S
mvuets sorry, i meant to say something else
Ulti mvuets the Rakudo* and Rakudo version numbers are linked, since the Rakudo* of the same version uses the source of that release of Rakudo 11:54
its just it has all the modules bundled at some fixed point too 11:55
mvuets rather this: does it make sense to have two separate release cycles (rakudo and star)?
but i think it does
11:55 gtodd left, Alina-malina left 11:56 Alina-malina joined
mvuets as you said rakudo* release involves more time and efforts, so it would slow down plain rakudo releases 11:56
11:56 gtodd joined, ptc_p6 left
Ulti its more you want module authors to have some solid to target patches against as a "release" 11:56
it only doesnt really matter at the moment because there arent many people involved in the modules included in R* and most of them are part of the Rakudo release anyway 11:57
mvuets . o O ( img2.wikia.nocookie.net/__cb2011051...s_logo.png (-: ) 11:59
Ulti hah
the Toys R Us logo in the UK fits the camelia aesthetic payload127.cargocollective.com/1/0/...star_5.jpg the message works if you replace /toys/ with /perl/ 12:03
reaching for the stars would be a good slogan for R* :D 12:05
lizmat
.oO( funny how Whatever becomes something to reach for )
12:08
12:11 jakesyl left
Ulti the jingle "There's a magical place we're on our way there..." is brilliantly apt too :3 12:12
12:16 ptc_p6 joined 12:18 chenryn left 12:24 smls joined
smls Hi all 12:25
yoleaux 4 Dec 2014 17:44Z <ab5tract> smls: takend care of :)
smls lizmat: Will my «"foo.txt".IO.lines» still work when your I/O refactor is finished?
lizmat yes 12:26
smls Ok, thanks 12:27
12:39 prevost joined 12:56 rindolf joined
smls lizmat: Is «"foo".IO.lines» lazy, like «open("foo").lines» ? 12:58
And if so, when is the file closed?
lizmat both are lazy 12:59
the former closes the handle before finishing, the latter does not
currently, the only way to make them eager, is by adding the :eager named param 13:00
"foo".IO.lines(:eager)
13:01 anaeem1_ left
smls So the filehandle returned by «open("foo")» is never closed if I don't store it in a variable and call .close on it manually? 13:01
dalek pan style="color: #395be5">perl6-examples: 05e0d46 | (Steve Mynott)++ | cookbook/0 (2 files):
fix warnings with scope and rename EVAL
13:02
smls In Perl 5, filehandles auto-close when they go out of scope.
lizmat smls: Perl 6 does not have timely destruction
the file handle *will* be closed when the GC finds it can
but there's no telling when that happens
that's why you probably want to use IO.lines 13:03
smls ok
lizmat another approach would be to add a LEAVE phaser to the block that opens a handle
{ my $h = open "foo"; LEAVE $h.close } 13:04
felher I like that LEAVE-thingy. It's like golangs defer :)
mvuets indeed looks neat! 13:05
smls yeah 13:06
though this kind of thing is why I still really doubt that GC is a better approach than reference counting. We gain a little convenience for an advanced and uncommon case (cyclic data-structures), but loose a lot of convenience/elegance for something (that should be) common, namely resource management (of resources that are not necessarily memory)
TL;DR: I agree with Bjarne Stroustrup on this - constructors are the ideal solution for resource management, and GC kills it. 13:09
s/constructors/destructors/
osfameron Rust's approach looked quite interesting 13:10
mvuets so scope guards are not possible?
moritz mvuets: LEAVE is a scope guard
mvuets on the other hand they should be, just need to be explicitly state it
which is not necessary a bad thing 13:11
moritz mvuets: it's just not an object-destruction-based scope guard as you'd do in p5
mvuets ok, i see
osfameron: what they've got? 13:12
osfameron++ watched your talk on zippers from yapc::eu recently, very liked it, though got overwhelmed to the end (-%
osfameron mvuets: thanks -- the 2nd half ("bonus materials") bit was kinda confusing tbh :-) 13:13
itz_ there are two directories of cookbooks examples "perl6/mu/examples/cookbook" and "perl6/perl6-examples/cookbook" 13:14
I'm proposing to merge and delete one? but which should remain?
osfameron I don't really grok the Rust stuff, but it looks like they have layers of functionality from scope-based (but which can be extended by giving ownership to another routine), and then optional reference counting & GC if you need it 13:15
wolv Haskell is exploring the solution space for lazy IO, but I'm not sure if pipes / conduits / iteratees are the way to go yet
osfameron handwaves wildly
mvuets itz_: mu seems to be a legacy repo, so i vote for moving from mu and merging into perl6-examples
13:15 itz_ is now known as itz
bjz_ osfameron: that is about right 13:15
osfameron: you use the ownership/borrow semantics to build other safe memory management abstractions via unsafe code under the hood. it's not as clean as if your language is implicitly GCed, but it gives you more control 13:17
osfameron yeah, I didn't deeply follow the ownership/borrowing semantics, but the impression was that it was formal enough that it prevents most memory errors, while being very simple/cheap in terms of overhead 13:18
moritz itz: first check if the stuff works at all
itz: if not, either refurbish it, or delete it
itz yeah I won't throw any anything useful 13:19
^ away 13:20
moritz there's surprising little useful in mu, given its size
13:21 kaleem joined 13:22 rindolf left 13:27 tinyblak_ joined 13:29 abraxxa left 13:30 tinyblak left 13:32 blackbolt joined 13:34 vendethiel left 13:40 vendethiel joined, erkan joined, erkan left, erkan joined 13:41 anaeem1 joined
dalek pan style="color: #395be5">perl6-examples: 5424841 | (Steve Mynott)++ | cookbook/ (4 files):
import three directories from perl6/mu/examples/cookbook
13:49
pan style="color: #395be5">perl6-examples: 4737615 | (Steve Mynott)++ | cookbook/ (2 files):
tweak README
carlin Inline::Perl5 has started failing tests in the last couple of days 13:53
gtodd itz: to my (easily confused) mind it would be nice to merge those .... how about everything in perl6/examples/cookbook :-) 13:55
13:57 kaare_ left
dalek : 5d402ce | (Steve Mynott)++ | examples/cookbook/ (34 files):
README points to perl6/perl6-examples/cookbook which now contains any extra directories existing only here. diffed other content and destination is newer. deleting
13:58
colomon carlin: last three overnight smokes also failed Crypt::Bcrypt, IO::Socket::SSL, LibraryMake, OpenSSL, and Questhub. 14:08
14:17 anaeem1 left 14:21 BigBear joined, anaeem1_ joined 14:22 BenGoldberg joined 14:23 anaeem1_ left
dalek ast: 8dd72c2 | (Elizabeth Mattijsen)++ | integration/advent2014-day05.t:
Skip the test as it apparently can also hang
14:23
kudo/newio: 206edcb | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
Fix tiebreaker on slurp()

Why this way? Because apparently it is legal / ok to put an IO::Handle into
  $*ARGFILES.
14:25
[Coke] S32-io/io-spec-unix.t has 5 deprecated calls. 14:27
14:33 BigBear left
lizmat [Coke]: looking at that now 14:33
14:34 raiph joined 14:36 blackbolt left
dalek ast: 355e77b | (Elizabeth Mattijsen)++ | S32-io/io-spec-unix.t:
Fix deprecations
14:38
b2gills .tell timotimo to improve the quality of the embroidery you could try adding a backing material, perhaps using some water soluble fusible web. ( I don't know if the paper backed stuff would work on its own, or if you would have to fuse some fabric to the back ) 14:42
yoleaux b2gills: I'll pass your message to timotimo.
14:46 BigBear joined, vendethiel left 14:49 vendethiel joined 14:54 isBEKaml joined 14:57 KCL_ left 15:05 rindolf joined
[Coke] lizmat++ fixing things prettymuch as soon as I mention them. 15:09
lizmat actually, I had *just* opened that file
[Coke] comes back to hear laptop fan noise. the rakudo jvm build is the only thing that does this.
lizmat so it's more a case of synchronous events
15:13 telex left 15:14 telex joined
[Coke] You can still keep the karma, though. :) 15:17
15:17 prevost left
lizmat :-) 15:18
15:25 kaare_ joined 15:31 carlin_ joined 15:32 carlin left, rurban left 15:33 carlin_ is now known as carlin 15:36 rurban joined, rindolf left 15:40 BigBear left 15:41 andreoss joined
andreoss fosdem.org/2015/schedule/event/get..._to_party/ can this information be relied on? 15:41
>2015 will be the year that Perl 6 officially launches for production use. 15:42
this part to be exact
15:43 kaare__ joined, kaare_ left
lizmat andreoss: yes, I think that can be relied upon 15:43
15:44 denis_boyun left 15:45 rindolf joined 15:46 kaare_ joined 15:47 kaare_ left, kaare_ joined 15:48 FROGGS left 15:49 kaare__ left 15:50 kaleem left
TimToady 15 years is a nice round number 15:52
masak I'm working on the last parts right now. 15:53
15:56 prevost joined 16:04 kaare_ left 16:05 kaare_ joined 16:06 kaare_ left, kaare_ joined
TimToady so are several other people :) 16:10
lizmat I'm not
oh wait, eh, I am
isBEKaml masak: "last parts"? Last mile problem? :) 16:11
TimToady
.oO(that's the last thing we'd ever want...)
lizmat You just have to approach it from the other side :-) 16:12
masak isBEKaml: this one? en.wikipedia.org/wiki/Last_mile
isBEKaml masak: yes 16:13
TimToady we just need to charge people a monthly fee for access to Perl 6, and that will fix everything 16:14
btyler P6aaS 16:15
sounds exciting. need to find some investors...
isBEKaml btyler: no - that sounds very weird 16:16
pissass
TimToady "six" and "sux" are too close in levenshtein distance... 16:17
lizmat is watching Orion splash down
TimToady though "six" and "sex" are closer in ascii
huf i've been struggling with the association "phat" 16:19
(hat is also 6)
16:20 BigBear joined 16:23 Akagi201 left 16:24 Akagi201 joined, tinyblak_ left, tinyblak joined 16:25 mr-foobar joined, tinyblak_ joined 16:28 Akagi201 left 16:29 tinyblak left
itz has his money on SpaceX to beat NASA 16:31
TimToady has most of his money on NASA, albeit involuntarily 16:32
16:34 Ben_Goldberg joined 16:36 BenGoldberg left, tinyblak_ left 16:37 tinyblak joined, andreoss left
mr-foobar bets on metric system 16:38
Ulti bets on the people working in m instead of mm their rocket will be a thousand times more powerful 16:41
16:43 Ben_Goldberg left 16:44 BenGoldberg joined
itz when it explodes? 16:45
Ulti nah it will just be accidentally built a thousand times bigger almost touching space before launch :D 16:47
16:48 kaare_ left 16:49 kaare_ joined 16:50 zakharyas left
TimToady well, but a thousand times longer is a billion times bigger 16:50
'course, here m would be taken as miles rather than meters, further compounding the difficulty 16:51
16:53 tinyblak left
ugexe nice read, lizmat++ 16:54
16:54 tinyblak joined 16:55 Ben_Goldberg joined
itz this NASA TV is a repeat. I'm sure I saw this show in the 70s 16:55
TimToady nah, didn't have live shots from the capsule back then, or pix of the thing coming down through the stratosphere from a drone 16:57
16:57 retupmoc1 is now known as retupmoca
TimToady so at least the TV tech has improved, even if the space tech hasn't :) 16:57
dalek rl6-roast-data: 0f9ae9a | coke++ | / (5 files):
today (automated commit)
16:58
rl6-roast-data: d427281 | coke++ | bin/cull:
avoid "binary file..." with grep
16:58 BenGoldberg left, vendethiel left 16:59 tinyblak left, isBEKaml left 17:00 carlin left
masak Ven: ping 17:01
17:03 _rubioTerra_ joined
mr-foobar TimToady: recently I was working on a side project of mine. I had to implement a virtual machine -- not register, not stack -- it's a Manchester Data Flow machine. 17:05
itz is the resolution of Instant system dependent? 17:06
mr-foobar One peculiarity of the Data Flow machine is, every operand -- perl5op in the perl5vm for eg -- every operand is a "thread".
17:06 mvuets left
mr-foobar i was thinking has sytax can be multiplexed onto such "thread" operands. 17:07
s/has sytax/how syntax/
that way operands can be developed separately from syntax and multiplexing can happen through intermedia token passing. 17:08
TimToady itz: how could it not be? 17:09
mr-foobar TimToady: en.wikipedia.org/wiki/Dataflow_architecture <-- 17:10
TimToady well, other than by artificially limiting the precision, which is silly
17:11 raiph left
mr-foobar en.wikipedia.org/wiki/Out-of-order_execution 17:11
TimToady ideally, Instants are TAI, but not every machine has an atomic clock built in 17:12
17:13 bcode left
itz oh src/core/Instant.pm is nice and readable :D 17:13
TimToady 'course, any atomic clock will drift a bit from TAI at various times of the day too
moritz itz: I find most of the setting quite readable (with some of the list-y/iterator bits being the exception)
17:15 vendethiel joined 17:16 [Sno] left, anaeem1_ joined
TimToady hmm, it occurs to me that tiebreaker #3 is actually #1, since the set of rules over which longest token and longest literal are computed will be the most derived ones 17:19
17:19 raiph joined 17:21 fhelmberger left
TimToady that is, the NFA lookups when we merge are already done virtually; the run-time dispatch to the rule chosen by fate does not add any information 17:21
17:24 Mso150 joined, Akagi201 joined, gfldex joined
mr-foobar TimToady: I know I am not a regular :) I would love to test the syntax -> operands-threads idea myself but I would need to compile perl6 -> XML or sexps or some independent format. 17:26
Using that xml I would queue to generic operations in separate threads. 17:27
there is so much decoupling here, you can even queue to the network. This I testing with my side project. 17:28
s/testing/tested/
17:29 Akagi201 left
mr-foobar you can see a video here -- vimeo.com/102371548 <-- but it is a very low level idea so I think it can be applied to interpreters as well. 17:32
dalek pan style="color: #395be5">perl6-examples: 37f84e2 | (Steve Mynott)++ | cookbook/03dates-and-times/03- (9 files):
section 3 of perl cookbook - some simple datetime examples
17:33
TimToady I'm also thinking that maybe the 'earliest in compunit' is backwards, insofar as most grammars put general rules up front, and more specific rules later 17:34
but if we reversed that, it would naturally count used grammars as lower precedence in terms of rule order, since uses are up front 17:36
though alternations still would want to default to left-to-right, which is odd too 17:38
17:38 vti left
TimToady probably needs more caffeine to think about this than is good for him 17:41
17:42 BigBear left
itz wonders what the easiest, lowest common denominator DBM to bind using nativecall would be? 17:43
17:43 Mso150 left 17:44 BigBear joined, Mso150 joined
moritz itz: I have no idea, but I'd probably investigate berkeleydb 17:45
17:45 virtualsue left
itz yeah but the cute cat logo one not the evil oracle one 17:48
17:50 ugexe left 17:53 Sqirrel_ joined 17:54 raiph left, Sqirrel left
TimToady my machine comes with gdbm 17:56
sdbm probably has the free-est license, but was the slowest, last I checked, which was literally decades ago
17:57 ugexe joined
itz en.wikipedia.org/wiki/Ndbm claims possible data loss 17:58
17:59 raiph joined 18:00 BigBear left 18:02 vendethiel left 18:04 _rubioTerra_ left
b2gills mr-foobar: I think you should try your idea with a language designed to be small, like Lua. 18:05
TimToady or maybe nqp :) 18:06
18:07 vendethiel joined
mr-foobar b2gills: yeah. my strategy would be translate from syntax to xml or sexps -- a graph -- 18:09
then the graph executor and operands can be on independantly. 18:10
does nqp serialise the program in anyway ? 18:11
there are not stacks and registers here ! it is a data flow graph.
*no 18:12
18:16 Alina-malina left, Alina-malina joined
mr-foobar hmm the assumption that I am making is -- every program is representable as a data flow graph -- 18:16
may not be true :/
masak sounds true to me. 18:17
mr-foobar masak: neat ! my idea is to try for a data flow interpreter. any way I can get nqp to give me a graph ? 18:19
18:20 raiph left
mr-foobar the hardware architecture guys have actually figured out how to interpret a graph on real hardware. 18:20
18:20 vendethiel left
mr-foobar it's possible in software too ! 18:21
TimToady where does the "tape" live in a dataflow machine? 18:22
dalek kudo/newio: 36eb98c | (Elizabeth Mattijsen)++ | src/core/IO.pm:
Introduce FORWARD/BACKWARD-SLASH primitive

Actually, the TRANSPOSE-ONE primitive. For quickly switching between forward and backwards slashes in paths. Abour 500x faster than equivalent .trans.
kudo/newio: b5caaa1 | (Elizabeth Mattijsen)++ | src/core/IO.pm:
Make sure dir entries are forward slashed
kudo/newio: 1c14e3e | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
Make sure paths to dir() are forward slashed
kudo/newio: b71da38 | (Elizabeth Mattijsen)++ | src/core/Cool.pm:
Make sure .IO forward slashes
TimToady or more specfically, how do you implement an algorithm that requires a stack?
how 'bout referential types? 18:24
mr-foobar TimToady: you have the ram with you.
so stack becomes an array.
18:24 vendethiel joined
mr-foobar data flow people don't seem to have a tape. you can think of it as unix pipelines with control loops. 18:25
TimToady I mean tape in a turing sense, so ram is a tape 18:29
mr-foobar in electronics the equivalent is -- en.wikipedia.org/wiki/Asynchronous_circuit
TimToady but a turing machine shares its tape with all its instructions 18:30
what do you mean by "ram with you?" 18:31
18:31 vendethiel left
mr-foobar TimToady: the hardware data flow people use a graph for everything. 18:31
TimToady is the me that the ram is with the data, or the instruction? 18:32
mr-foobar each node in the graph is like an operation - + - / or control flow
operation has access to a global ram
edge is like a goto
so your don't have a goto operation, but an edge
TimToady well, that's basically what CPUs do inside anyway 18:33
they just send data around
mr-foobar but no clock, you see :)
TimToady people have proposed async CPUs too
mr-foobar yup. this is an async type. 18:34
TimToady or more like self-clocked
I would guess that, while interesting, this approach would not work well for the general public, because the general public doesn't think in graphs :) 18:35
otoh we're trying to introduce more data-centric empathy in P6 too :)
mr-foobar true. can syntax act as a facade to it ? 18:36
TimToady the trite answer is "of course", if you can emulate a turing machine
I'm sure some instructions would be easier to mung into that world view than others, though 18:37
mr-foobar yeah. can't get it out of my head though. data flow is very pretty :) 18:38
TimToady it would be interesting to see what continuations and exceptions look like in this view
mr-foobar oh, they use something called token store. 18:39
i think in perl5 you have tainted data right ?
TimToady sounds like a gensym :)
yes, not yet in p6 though
if ever...
mr-foobar heh. like tainted data, you mark the data with tag. 18:40
TimToady like old Burroughs machines, iirc
mr-foobar if you have 1000 nodes, you token store indexes continuation by <tag, node-name> .. 18:41
memory hungry.
each node can store whatever context it wants for a given tag. 18:42
TimToady so a continuation is viewed more as a history
18:43 bcode joined
mr-foobar if user1 and user2 interact with a 1000-node graph, they won't interfere each other because the tags are different. 18:43
yup
TimToady is reminded of git 18:44
mr-foobar if a user1 has visited 5 nodes the context of each node is saved in token store.
5 in this case.
i have been told that the mysql query engine also works like this. 18:45
infact x86 also works like ! in the before pipelines it does some data flow analysis and decides if those instructions can be executed in parallel. 18:46
mr-foobar has dyslexia
TimToady just so you don't have lysdexia, which would be a broken right hand 18:50
mr-foobar heh 18:51
18:51 raiph joined
mr-foobar I find the hardware people really into this stuff en.wikipedia.org/wiki/TRIPS_architecture 18:53
18:53 Ugator joined
mr-foobar unix pipelines and some domain specific applications (aviation) are the only equivalents I can find in software where such graph approaches are taken. 18:55
TimToady well, FSAs are data-driven in a different sense 18:57
mr-foobar that is a graph too, but few people try to see it that way. 18:58
pyrimidine mr-foobar: quite a bit of bioinformatics data are naturally graph-based (taxonomy and phylogenetics data being the easy ones, but also lots of ontological data) 18:59
mr-foobar in data flow with continuations, each node is actually equivalent to a PDA
TimToady my PDA broke...
mr-foobar pyrimidine: www.antha-lang.org/ these people are taking the visual flow approach 19:01
19:01 BenGoldberg joined, treehug88 joined
TimToady but that's the basic problem here; people are hardwired to deal visually with only a few nodes and edges at once, while linguistically they're hardwired to deal with dozens of rules and myriads of lexemes 19:02
so people tend to prefer linguistic looking solutions 19:03
pyrimidine I recall seeing antha before, but haven't delved into it. interesting...
mr-foobar TimToady: I agree. I tried pure data, which does it for music dsp. Doesn't nest, very little info on a screen. 19:04
japhb_ masak, TimToady: Just read the macro placeholders blog. Has *requiring* unicode been formally ruled out for *macros*? This seems like one of the places where using something truly out of band (not in the ASCII subset) makes sense.
TimToady DNA is of course a linear language, but as soon as you start analyzing its syntax, semantics, and pragmatics, it goes all non-linear
19:04 erkan left
TimToady japhb_: it has not been ruled out 19:05
japhb_ I suggest § as a 'substitution marker', which indicates the next token names a substition item in the macro source.
TimToady at least, not by me :)
I like ¤ myself
japhb_ Imagine masak's examples, except $x replaced with §x (or similar for your marker). 19:06
Even less syntax (like quoting '$x' as a string, blech), and safer too.
TimToady and § is a bit too visually like $
japhb_ Hmm, looks very different here, but that may just be a matter of font.
TimToady also, I think the CoffeeScript approach only works well for pieces of grammar that can have a specific piece of code stand in for a generic node, which is easier for nouns, but harder for more abstract grammatical constructs, like a new trait syntax, or a new parameter syntax 19:10
so I'd rather see something tied a little closer to grammatical categories rather than just ad hoc chunks of target text that the substituter might have to guess on which thing, or level of thing, is actually being referred to 19:12
19:13 Ugator left
mr-foobar TimToady: basically, to avoid the visual peril for all things data flow things, make graph vm and write syntax for that vm. 19:13
19:14 Akagi201 joined, Mso150 left
TimToady even if you say something like 'foo;' for your generic code, is that a statement control? a term? a listop? a label? 19:14
moritz managed to accidentally take offline the new community server 19:15
TimToady it's also very difficult to parse things that are not "declared" till afterwards
moritz configured a bridge network for the guests, didn't quite work, 'ifdown br0' # no packets coming out afterwards :(
TimToady oopsie 19:16
19:16 bcode left, Mso150_l_o joined 19:18 Akagi201 left, bcode joined
moritz I guess www.linux-kvm.org/page/Networking#public_bridge is what I want 19:19
further configuration will have to wait until Monday :(
dalek kudo/newio: 89b568a | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
homdeir() only takes a path
19:20
TimToady we've waited 14.5 years, we can wait 3 days :) 19:21
19:21 treehug8_ joined, treehug88 left
mr-foobar TimToady: gotto sleep now. my ideas are mostly from -- citeseerx.ist.psu.edu/viewdoc/summa...1.124.1645 19:22
mr-foobar will try to mess with nqp + data flow dsl if time permits 19:23
19:23 vti joined, mvuets joined 19:24 Ben_Goldberg left 19:25 rindolf left 19:27 [Sno] joined 19:28 mr-foobar left 19:34 virtualsue joined
jnthn evening, #perl6 19:44
lizmat jnthn o/
jnthn ...ooh, no messages and no highlights. That's easy... :)
hi lizmat 19:45
lizmat yeah, trying not to put too much burden on you ;-)
jnthn :-) 19:46
masak japhb_: call me old-fashioned, but I think Perl 6's approach so far with boldly going into Unicode but also providing a Texan fallback solution is exactly right. case in point, it has gradually lured me over to relying more and more on the Unicode operators. 19:49
(after being staunchly Texan for many years)
as such, I will reflexively frown upon any solution that proposes a Unicode sigil as The Solution to our placeholder woes, and nothing more. 19:50
TimToady you could always write the texas version as a macro :P 19:54
19:59 BigBear joined 20:01 Ugator joined 20:04 xinming left
masak bonks TimToady on the ¤ 20:05
20:05 xinming joined
lizmat does anybody whether we're on schedule for sillymoose's advent post ? 20:10
*know
tony-o lizmat: do you know why when using a CURLI i sometimes get a full path to the file and other times just get the filename in the MANIFEST file? 20:11
lizmat tony-o: no, I don't
I guess it should always be a relative path
ah, I see there is a post scheduled for publishing tomorrow 20:12
sillymoose++
it's a bit meagre :-(
tony-o it's sometimes a number and sometimes a full path that ends with the number
20:13 darutoko left
raydiak afternoon, #perl6 20:15
jnthn .u ¤ 20:16
yoleaux U+00A4 CURRENCY SIGN [Sc] (¤)
jnthn Ah
|=| looks ugly and not box enough 20:17
TimToady the texas would be OX or XO or some such, but don't tell masak++ or he'll stop ranting 20:18
jnthn O.X
One eye swolen, other poked out, due to macro use? :P
TimToady who gored your oX?
we could use .oO() since that makes anything abstract 20:20
or maybe >o< :)
kurahaupo jnthn: isn't the currency sign more like an o that's got 4 stubby legs? 20:21
20:21 Mso150_l_o left
TimToady wait, that should be >ö<, or is it »o«? 20:21
20:22 Mso150_l_o joined
TimToady >o< is a minimalist »ö« 20:22
jnthn kurahaupo: Not so much in my font...
TimToady well, it's COMPOSE-ox in any case
⫸Ö⫷ 20:26
that's even bigger 20:27
lizmat ¤ )( ? 20:28
TimToady too likely to occur in real text, I think 20:29
geekosaur masak: re "placeholders", seems to me we need (a) some way to introspect the names mentioned in an AST (b) these names should default to be new names not related to any existing ones (i.e. it is an independent scope) unless <a> is used to associate with names presumably via CALLER:: or etc.
alternately the default is to associate with existing names but you can specify that particular names are to be treated as locally defined 20:30
also I think this has to include nested scopes, to resolve the issue with a local $s being declared --- that $s is not the same as the one in the top level, so would not be substituted by something iterating the names defined at the top level 20:31
(yep, solve one problem, get an uglier one...)
lizmat ¤ )o( ? 20:32
TimToady quasi { ¤A ¤B ¤C } # is A a listop? is it a declarator? is B an infix? is C an initializer? the parser must know in advance in order to parse correctly 20:38
masak yes. this is a central problem.
TimToady so something must declare A,B,C in advance
either parameter or separate declarator 20:39
or either, if it's just general sigginess
masak neither parameter or separate declarator implies separate sigil to me, though.
TimToady but something also wants to associate those things with parsing rules more directly for the arguments to the macro outside, not just the parser internally 20:40
masak the thing I kinda liked from the placeholder approach is that it starts from an "unsullied" piece of code, and then sort of "grows" it into what it needs to be for the macro.
TimToady it's not a sigil in that sense
masak if we could just do that in a safer way than AST.subst...
geekosaur thinking I need to rehabilitate my dw to produce a proper reply 20:41
TimToady points out that an undeclared $x blows up in Perl 6, so you can't just throw it out there for a placeholder, because That's A Different Language 20:42
we're just a bit picky abou tthat 20:43
we must know which bits are generic at the moment it is parsed 20:44
geekosaur right, the block in the placeholder thing needs to be some kind of "quoted" or "independent" thing, you get a raw AST that is independent of the current program and scope. which is why you then need some way to poke through it and add associations.
TimToady otherwise we're falling back into accidental genericity 20:45
geekosaur one problem with this... anyone familiar with the P5 "Safe" module? it effectively lets you do this... and the bookkeeping needed gets kinda nasty
masak TimToady: let me ask it this way: a piece of AST comes in as a macro parameter. which piece "knows" or is supposed to know what grammatical category it is? the mainline code, the macro/quasi environment, or the AST itself? which peg does the information hang naturally off of? 20:46
raydiak
.oO( we could use $$$ :P )
20:47
geekosaur it's harder than that because different things have different contexts within the AST
TimToady an AST has to know what parsed it, or any overloaded symbols in it are useless
geekosaur you may use classes from your program but also introduce variables which have meaning only local to that AST until bound to something else (with the .subst stuff) 20:48
TimToady action methods are provided the match object, which also provides the cursor, which provides the exact current language in effect at the location of the parse 20:50
the match object contains all of the ASTs returned by the grammar rule
geekosaur maybe a pre-sigil indicating that what follows is AST-scoped. Q.codeToNode({ say _$x; say _$y; )} (_ is probably a bad choice...) 20:51
TimToady the most generic macro in P6 is going to look a lot like a parsing rule with an AST maker for its action closure, which may or may not build the returned AST out of quasis, that may or may not refer to the bits parsed by the parse rule, presumably by the same name they were parsed under 20:52
but an actoin routine is just code, so it can do anything with the parsed macro call it likes 20:53
the meaning of the AST is derived from the current language though
<variable> means something a little different in a regex than it does in mainline code 20:54
to the extent we want an extensible macro system that grows with Perl 6, we have to make the slangs and macros derive all their structure and meaning from the current language, and not assume anything global, and as little as possible that is dynamic 20:56
20:56 virtualsue_ joined
TimToady sometimes I think even %*LANG is the wrong way to handle braids 20:56
20:56 virtualsue left, virtualsue_ is now known as virtualsue
TimToady it should go through the virtual current language system just as almost everything else does 20:56
</rant> 20:58
20:59 BenGoldberg left 21:00 anaeem1_ left
TimToady $¢.lang-Regex or so instead of %*LANG<Regex> 21:02
and then the remembered current language is not lost on subsequent passes
21:02 Akagi201 joined 21:03 Mso150_l_o left, Mso150_l_o joined
TimToady and each strand of the braid stands or falls on the inheritance of a single method, not the reprocessing of an entire hash 21:03
21:07 Akagi201 left, virtualsue left
TimToady geezer nap & 21:07
21:08 Mso150_l_o left
dalek ake: fbff0a3 | (Arne Skjærholt)++ | src/Snake/ (3 files):
Rudimentary class inheritance.
21:30
[Coke] github.com/arnsholt/snake could use a readme. 21:31
arnsholt That's a good point!
I should probably fix that =D
colomon arnsholt++ 21:41
masak 'night, #perl6 21:51
raydiak g'night masak++, thanks for tirelessly banging your head against the macro situation 21:53
smls moritz: ping 21:57
tony-o lizmat: i end up with a manifest similar to this: gist.github.com/tony-o/801104a6f2e2db082e98 21:58
ids 0-2 all have full paths and 3+ all have relative 21:59
so when i call .candidates i get <full path><full path> back
22:00 raiph left
lizmat tony-o: atm I have no idea 22:01
smls .tell moritz Would this be suitable for a p6advent post? smls.co.nf/advent/data-munging-in-p...vs-perl-5/
yoleaux smls: I'll pass your message to moritz.
smls ^^ Comments from other people are welcome too... :) 22:02
Especially if you think that any of the demonstrated code is not very idiomatic.
22:04 ohcamacj-2 left
lizmat smls: looks pretty good to me :-) 22:07
colomon smls: so far it looks awesome!
[Coke] smls: what colomon said. 22:08
22:09 telex left 22:10 telex joined
colomon smls++ 22:16
22:19 perturbation joined
moritz smls: very nice. I'd just include 'use v6;' in the p6 boilerplate 22:20
yoleaux 22:01Z <smls> moritz: Would this be suitable for a p6advent post? smls.co.nf/advent/data-munging-in-p...vs-perl-5/
moritz (mostly because it gives better error messages with accidentally run with p5)
22:21 kaare_ left
lizmat moritz: have you looked at the next advent post? it looks a bit meager to me 22:23
22:25 kurahaupo left
moritz lizmat: I might add a paragraph, but I'm currently not in the shape to do anything significant 22:26
lizmat: and IMHO it's also OK for some posts to be short and sweet
lizmat ok, fair enough 22:28
I'm not in a state to add anything significant either :-)
colomon looks plenty long to me. 22:32
moritz colomon: are you also looking at "Running system commands"? 22:34
22:34 Mso150 joined 22:36 psch joined
psch hi #perl6 22:36
smls moritz: Doesn't the shebang line already take care of that? 22:37
moritz smls: not in my experiments :-) 22:38
dalek kudo/newio: 69e59a2 | (Elizabeth Mattijsen)++ | src/core/IOU.pm:
Make sure we remember any extra params
22:43
kudo/newio: c024797 | (Elizabeth Mattijsen)++ | src/core/IO.pm:
Make chdir/tmpdir/homedir take backslashes
kudo/newio: cd9e5e8 | (Elizabeth Mattijsen)++ | src/core/IO/ (3 files):
Various Win32 related fixes
22:47 BenGoldberg joined
smls moritz: I added a note. 22:48
22:48 murthybalu joined 22:50 murthybalu_ joined 22:51 Akagi201 joined
murthybalu_ helo 22:51
22:52 murthybalu left
murthybalu_ helo 22:52
smls hello
murthybalu_ Is this perl6 development area ? 22:54
22:55 ptc_p6 left
lizmat well, perl 6 developers hang out here, if that is what you mean :-) 22:55
22:55 vti left, Akagi201 left 22:56 Mso150 left 22:57 Mso150 joined
dalek kudo/nom: 6345f4f | (Elizabeth Mattijsen)++ | / (5 files):
Introduce IO::Locally/Pathy roles

Empty here, for easier switching between nom and newio branches
22:58
23:02 raiph joined
dalek kudo/newio: 6345f4f | (Elizabeth Mattijsen)++ | / (5 files):
Introduce IO::Locally/Pathy roles

Empty here, for easier switching between nom and newio branches
23:02
kudo/newio: e7c967a | (Elizabeth Mattijsen)++ | / (5 files):
Merge branch 'nom' into newio
23:02 robinsmidsrod left 23:03 robinsmidsrod joined 23:04 kurahaupo joined, kurahaupo left
dalek : 389def2 | smls++ | misc/perl6advent-2014/schedule:
Claim day 9 of the advent calendar
23:11
raiph smls: Looks great. I suggest you add a link to the last para ("Concurrency/Parallelism"); maybe jnthn.net/papers/2014-fosdem-perl6-today.pdf? 23:12
23:12 gfldex left 23:13 gfldex joined, BenGoldberg left 23:18 treehug8_ left 23:21 kurahaupo joined
smls raiph: Thanks; I used jnthn.net/papers/2013-yapceu-conc.pdf though ('cause it gets to the concurrency primitives faster and drives the point home more clearly). 23:27
gtodd tries to catch up on daily sixer-sizing
raiph smls: the "Perl 6 version" link just before "Conclusion" points to a P5 version 23:28
smls not anymore, i already fixed that
gtodd trying to rethink simple (in perl5) exercises in perl6
raiph smls++ 23:29
23:29 kurahaupo left 23:30 rurban left 23:38 smls left 23:40 Ugator left
lizmat goes to bed 23:41
23:43 BigBear left 23:50 mvuets left 23:52 aborazmeh joined 23:54 aborazmeh left, aborazmeh joined