Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-12-05

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 kurahaupo joined #perl6
00:03 KCL_ joined #perl6
00:11 KCL_ joined #perl6
00:15 aborazmeh joined #perl6
00:21 vendethiel joined #perl6
00:26 KCL_ joined #perl6
00:47 vendethiel joined #perl6
01:05 dayangkun joined #perl6
01:30 Vlavv joined #perl6
01:35 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 hoelzro it seems like the default for &cb(Str) should be to *not* free the parameter
01:36 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:42 gtodd <doc>
01:42 gtodd 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 :-)
01:42 gtodd </doc>
01:42 gtodd :-)
01:42 gtodd cheers
01:46 davido___ joined #perl6
01:47 jimmy__ joined #perl6
01:49 Akagi201 joined #perl6
01:55 gtodd will work around it until IntStr arrives
02:00 vendethiel joined #perl6
02:01 Vlavv joined #perl6
02:07 araujo joined #perl6
02:14 DarthGandalf joined #perl6
03:02 chenryn joined #perl6
03:11 aborazmeh joined #perl6
03:17 Mso150 joined #perl6
03:19 noganex_ joined #perl6
03:39 Mso150 joined #perl6
03:47 raydiak \o #perl6
03:49 adu hey raydiak
03:49 raydiak hi adu
03:49 jakesyl joined #perl6
04:08 tinyblak joined #perl6
04:26 hagiri joined #perl6
04:45 kaare_ joined #perl6
04:48 tinyblak joined #perl6
04:51 vendethiel joined #perl6
05:22 vendethiel joined #perl6
05:35 davido_ joined #perl6
05:37 tinyblak_ joined #perl6
05:39 chenryn joined #perl6
05:42 adu joined #perl6
05:42 tinyblak joined #perl6
05:45 vendethiel joined #perl6
05:54 kaare_ joined #perl6
06:12 telex joined #perl6
06:17 kaleem joined #perl6
06:19 KCL_ joined #perl6
06:19 bjz joined #perl6
06:21 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
06:22 TimToady and the main point of the tiebreak is to privilege explicit keywords, which are almost always literal in the first atom anyway
06:23 TimToady 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:24 TimToady *says
06:24 TimToady and blow up if it's not a fixed number of chars
06:26 jimmy__ so time to refactor?
06:27 TimToady well, mostly go back to one of the earlier approaches, I think, more or less
06:27 tinyblak_ joined #perl6
06:27 TimToady but I'll need to look at the tests to see where they'd change
06:29 TimToady 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:30 TimToady anyway, just rethinking the problem a bit, and balancing out some performance goals in my head
06:30 TimToady I'm not planning to rewrite it all tonight :)
06:30 jimmy__ :P
06:34 jimmy__ looks like 2) and 3) is the real reason
06:34 TimToady well, yeah :)
06:34 TimToady I put them in order of increasing concern :)
06:35 TimToady 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
06:35 jimmy__ yeah
06:36 TimToady a DFA can't easily tell you which NFA states it passed through, so states that mark longest literals are a problem
06:37 jimmy__ you remember me this: http://www.jasq.org/just-another-scala-quant/fbfbfbfbfffbfbffbffbfbffbfbffbfbffbfgfbffbfbffbfgfbffbfgffbfbffbfffbffbfbffbf01
06:40 jimmy__ the tree at the bottom looks like good
06:43 * TimToady is allergic to some trees :)
06:46 robinsmidsrod joined #perl6
06:48 anaeem1 joined #perl6
06:49 anaeem1 joined #perl6
06:50 vendethiel joined #perl6
06:56 robinsmidsrod joined #perl6
06:57 tinyblak joined #perl6
07:03 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 lue m: say 12 == 19|12; say 12 %% 3|5  # what prompted this, in a nutshell
07:03 camelia rakudo-moar da7ff7: OUTPUT«any(False, True)␤any(True, 5)␤»
07:09 TimToady I think of it more as a math operator, actually...
07:09 TimToady Didn't you first learn "is this divisible by that?" when your gradeschool teacher was teaching you division?
07:10 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 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:13 TimToady best we can do is try to break the situtations that don't occur very often
07:13 TimToady unfortunatetly for this case, I consider $x %% 3|5 to not be a very common situation
07:14 vendethiel joined #perl6
07:14 lue Agreed. I can't quite think of a situation where you'd need %% to be on the same level as * and / , though.
07:17 gfldex joined #perl6
07:17 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:19 dayangkun joined #perl6
07:26 TimToady I suppose currently someone might write "." x $count + $count %% 2 to make sure only an odd number of dots are produced
07:27 bjz_ joined #perl6
07:28 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:29 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:30 * raydiak finds %% being different from == less surprising than being different from %
07:31 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)
07:32 TimToady there is that
07:32 TimToady course, maybe you should be using %% and !%% in that case
07:32 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
07:33 raydiak agreed, but my brain likes % a heck of alot more than !%%
07:33 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 #perl6
07:35 raydiak I'd almost rather see %% be a numeric operator :)
07:36 anaeem1__ joined #perl6
07:36 robinsmidsrod joined #perl6
07:36 jimmy_ joined #perl6
07:37 TimToady well, certainly George Boole considered boolean algrebra to be a part of math...
07:38 TimToady so saying that something that return True/False isn't math is not a strong argument to me :)
07:38 Isp-sec joined #perl6
07:38 TimToady *returns
07:39 lue Especially when you turn True/False into 1/0 :)
07:40 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:43 darutoko joined #perl6
07:44 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
07:46 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
07:46 TimToady m: say 1 ?& 2
07:46 camelia rakudo-moar da7ff7: OUTPUT«True␤»
07:46 TimToady these also return booleans, but are at the "math" level
07:47 TimToady m: say 1 !?& 2
07:47 camelia rakudo-moar da7ff7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/phCX1aLPX9�Cannot negate ?& because it is not iffy enough�at /tmp/phCX1aLPX9:1�------> [32msay 1 !?&[33m�[31m 2[0m�»
07:47 TimToady hmm
07:47 TimToady looks pretty iffy to me... :)
07:47 lue Isn't ?& just && ?
07:47 TimToady no
07:48 TimToady it doesn't short circuit, and coerces both sides to boolean
07:48 FROGGS joined #perl6
07:48 TimToady m: say 42 && 43
07:48 camelia rakudo-moar da7ff7: OUTPUT«43␤»
07:49 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 :) .
07:50 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 #perl6
07:50 TimToady doesn't short circuit
07:50 TimToady m: say ?(0 && die "oops")
07:50 camelia rakudo-moar da7ff7: OUTPUT«False␤»
07:50 TimToady does short circuit
07:51 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 :)
07:52 TimToady next thing you know, you'll be turning into a linguist
07:52 rurban joined #perl6
07:52 lue Well... :P
07:53 TimToady so basically, I like having %% in both places, but differently
07:54 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.
07:55 lue *args to matter
07:55 * lue is clearly rusty on discussing something like Perl 6 :P
07:55 TimToady but then -$x ** 2 won't work like the mathematicians want
07:56 TimToady m: say -4 ** 2
07:56 camelia rakudo-moar da7ff7: OUTPUT«-16␤»
07:56 TimToady 'course, that's because they're thinking -4²
07:57 lue I think I recall being all "whatever you say" when I first learned about -4² anyway :) .
07:57 TimToady so that's a dwim with a pretty obvious corresponding wat
07:58 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
07:59 TimToady spaces also doesn't really help us with ^10.foo
08:00 TimToady not unless we make ^10\.foo a precedence dropper, which I thought about and rejected several times now :)
08:01 lue I think at some point you simply have to memorize a larger version of PEMDAS (or keep a chart handy)
08:02 TimToady one runs into the (^10).foo situation frequently enough that one develops a neural twitch when one sees ^10.foo
08:02 TimToady %% 3|5 won't happen often enough to develop a neuron for that
08:02 lue TimToady: you could always make a low precedence version of . , like with &&/and ||/or :P    .oO( ^10 method foo )
08:03 TimToady at some point it's easier to just put parens around the left side :)
08:05 TimToady maybe use the 'wa' topicalizer from Japanese as a reverse 'given': ^10 wa .foo
08:06 * lue jokingly imagines a surprise return of -> , but this time as a looser method call: ^10->foo
08:06 TimToady alas, we use that currently for error reporting
08:08 robinsmidsrod joined #perl6
08:08 TimToady m: ^10->foo;  # curious
08:08 camelia rakudo-moar da7ff7: OUTPUT«[31m===[0mSORRY![31m===[0m 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â�¤------> [32m^10->[33mâ��[31mfoo;  #…»
08:08 TimToady well, there's that
08:10 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 TimToady we do something like that with .= currently though
08:11 TimToady we could do it with . too, except...
08:11 TimToady m: say 42 . foo
08:11 camelia rakudo-moar da7ff7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/q08jdEfK0S�Unsupported use of . to concatenate strings; in Perl 6 please use ~�at /tmp/q08jdEfK0S:1�------> [32msay 42 . [33m�[31mfoo[0m�»
08:13 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 TimToady it's all tradeoffs...
08:14 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 lue *wondering
08:14 TimToady and 42\ .foo is shorter than 'wa', plus there's history for line continuation with \
08:15 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 #perl6
08:16 TimToady so I've always just come back to parens, which don't generally spell wat, even in Lisp :)
08:17 jimmy_ lisp: parens is your friends
08:17 TimToady there is no precedence table possible that doesn't occasionally require parens
08:17 TimToady having no precedence table at all just means you require parens more often :)
08:18 BigBear joined #perl6
08:19 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
08:20 TimToady 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:21 TimToady 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:22 adu joined #perl6
08:22 TimToady I'll ask Dr Schrödinger
08:22 robinsmidsrod joined #perl6
08:22 TimToady or maybe I'll ask the Elves for advice
08:25 tinyblak_ joined #perl6
08:25 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:27 moritz TimToady: oh yes, you should
08:27 TimToady well, yes and no...
08:28 moritz :-)
08:29 robinsmidsrod joined #perl6
08:30 vti joined #perl6
08:32 raydiak g'night all \o
08:32 TimToady o/
08:33 Celelibi joined #perl6
08:35 [Sno] joined #perl6
08:35 Mso150 joined #perl6
08:44 robinsmidsrod joined #perl6
08:45 vendethiel joined #perl6
08:46 masak morning, #perl6
08:46 robinsmidsrod joined #perl6
08:49 robinsmidsrod joined #perl6
08:49 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:50 masak in these parts, Santa is probably just an obese, well-cladd human male working for the Coca Cola Company.
08:50 masak clad*
08:52 robinsmidsrod joined #perl6
08:52 TimToady cladistics should tell us whether Santa is an Elf
08:52 masak :)
08:54 robins joined #perl6
08:56 huf santa is one, that's ten less than elf
08:58 [Tux] joined #perl6
08:59 masak m: say 12 %% 5
08:59 camelia rakudo-moar da7ff7: OUTPUT«False␤»
08:59 abraxxa joined #perl6
08:59 masak ah, right.
09:03 vti m: "hi" ~~ /$<foo>=(.*)/ && say $<foo>
09:03 camelia rakudo-moar da7ff7: OUTPUT«「hi」␤␤»
09:03 vti m: my $re = q[$<foo>=[.*]]; "hi" ~~ /<$re>/ && say $<foo>
09:03 camelia rakudo-moar da7ff7: OUTPUT«(Any)␤»
09:03 vti any ideas why the named capture doesn't work in the second example?
09:06 kurahaupo joined #perl6
09:08 [Tux] joined #perl6
09:08 vendethiel joined #perl6
09:09 xinming joined #perl6
09:10 ptc_p6 joined #perl6
09:12 anaeem1_ joined #perl6
09:14 masak vti: if I remember right, regexes interpolated from strings simply do not capture anything.
09:15 masak 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:16 vti m: my $re = q[(.*)]; "hi" ~~ /<$re>/ && say $0
09:16 camelia rakudo-moar da7ff7: OUTPUT«(Any)␤»
09:18 fhelmberger joined #perl6
09:27 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 FROGGS and here you have the $
09:28 FROGGS m: my $re = q[(.*)]; "hi" ~~ /<re=$re>/ && say $0 # in case that is enough
09:28 camelia rakudo-moar da7ff7: OUTPUT«(Any)␤»
09:28 FROGGS err
09:28 FROGGS m: my $re = q[(.*)]; "hi" ~~ /<re=$re>/ && say $/ # in case that is enough
09:28 camelia rakudo-moar da7ff7: OUTPUT«「hi」␤ re => 「hi」␤␤»
09:29 FROGGS m: my $re = anon regex { (.*) }; "hi" ~~ /<re=$re>/ && say $/
09:29 camelia rakudo-moar da7ff7: OUTPUT«「hi」␤ re => 「hi」␤  0 => 「hi」␤␤»
09:29 FROGGS or do that if you need more power...
09:30 FROGGS interpolation a string as regex rules is like EVALing a piece of code... you sacrifice something when doing so
09:32 vti FROGGS: i think that's not the same
09:32 vti m: my $re = q[abc$<foo>=[.*]]; "abchi" ~~ /<re=$re>/ && say $/
09:32 camelia rakudo-moar da7ff7: OUTPUT«「abchi」␤ re => 「abchi」␤␤»
09:32 FROGGS I know
09:32 FROGGS use an anon regex if you need to capture beyond that point
09:33 FROGGS m: my $re = anon regex { abc$<foo>=[.*] }; "abchi" ~~ /<re=$re>/ && say $/
09:33 camelia rakudo-moar da7ff7: OUTPUT«「abchi」␤ re => 「abchi」␤  foo => 「hi」␤␤»
09:34 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
09:35 FROGGS right
09:35 vti FROGGS: wow, i woudn't figure that on my own, thanks
09:36 FROGGS vti: you're welcome :o)
09:41 masak FROGGS++ # simple rules of thumb
09:43 timotimo thumbs rule
09:47 vti FROGGS: wait a minute ... :) i still need to put a variable's content into that anon regex
09:48 FROGGS vti: where do you get that var's content from?
09:49 vti FROGGS: it just a simple string i build
09:51 * masak calls for more concrete examples!
09:51 timotimo don't build too much out of concrete, it looks so bland!
09:51 * masak .oO( too many concrete cows )
09:53 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:54 timotimo (very OT) so it turns out embroidery on a bathrobe works - sort of: https://imgur.com/a/7xVYz
09:56 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 :)
09:57 timotimo 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:58 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」␤␤»
09:59 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 :)
10:01 timotimo i kind of like embroidulize
10:02 timotimo embroidery machines are simply magical
10:02 vti FROGGS: EVAL seems to solve all the problems
10:02 timotimo iirc froggs embroidered a camelia onto a shirt some time ago already
10:03 FROGGS true
10:05 vti and spaces in regex are working again
10:06 moritz ping master.p6c.org # the community server is connected to the network
10:12 timotimo oooh sweet
10:16 tinyblak joined #perl6
10:17 mvuets joined #perl6
10:18 moritz # free -m total       used       free     shared    buffers     cached
10:18 moritz Mem:         32138       1331      30807         16         93        979
10:19 timotimo neato :)
10:22 FROGGS :o)
10:25 jimmy_ joined #perl6
10:35 onebitboy joined #perl6
10:37 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 mvuets joined #perl6
10:40 moritz timotimo: the guest will be a debian jessie, with cgroups enabled
10:40 moritz 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.
10:41 timotimo would we want to prevent network access for a "try rakudo" thing? :)
10:41 timotimo well, we could have it firewalled so that it can only talk to the "outside internets"
10:42 moritz http://0pointer.net/public/systemd-nluug-2014.pdf
10:43 woolfy moritz++ for community server
10:43 lue What is this community server, by the way?
10:43 moritz lue: do you know what feather is?
10:43 lue Yep.
10:43 moritz lue: its successor.
10:44 moritz see http://perlgeek.de/blog-en/perl-6/2014-community-server-funding.html
10:44 moritz and http://perlgeek.de/blog-en/perl-6/2014-community-server-update.html
10:44 * lue reads
10:45 timotimo moritz: doesn't sound too bad
10:45 woolfy Ha, I missed that second blog.  Again, moritz++
10:46 timotimo moritz: do you think there's a simple/sane way to throttle outgoing network traffic from a try-rakudo session?
10:47 timotimo so that it can't be repurposed as a spam machine or for attacking stuff?
10:47 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
10:47 moritz timotimo: I'd just firewall the usual smtp ports
10:47 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)
10:48 moritz also, we can give it a separate IP address, and have much fun with routing/forwarding it
10:52 arnsholt Forward all outgoing network connections to a server that spits out the same content as reading from STDIN, perhaps? =)
10:54 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:57 rindolf joined #perl6
10:58 Woodi hi today :)
11:00 robinsmidsrod joined #perl6
11:00 virtualsue joined #perl6
11:01 denis_boyun joined #perl6
11:01 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:13 Ulti is there some docs somewhere on what is/isnt part of the RESTRICTED setting?
11:14 vti i have added a label to a for loop, and started getting "This type cannot unbox to a native string" error
11:14 vti here the smallest script https://gist.github.com/vti/e4af50e401f0462f6274
11:14 vti if the class is defined in script.pl6, then there is no error
11:15 FROGGS hmmm
11:15 FROGGS vti: good catch
11:15 vti FROGGS: should i add a stacktrace?
11:15 FROGGS vti: can you please run the script with --ll-exception, and put that information to that gist?
11:15 FROGGS yeah :o)
11:16 vti FROGGS: updated the gist
11:17 FROGGS ohh, it fails to actually create the Label object
11:17 FROGGS I guess $?FILES is null or so
11:18 timotimo FROGGS: that's from star 09
11:18 FROGGS though, I thought we are handling that case
11:18 timotimo didn't we fix that?
11:18 FROGGS I think so
11:18 vti yeah, i am using 2014.09
11:18 timotimo m: class Foo { method foo() { ROUTE: for ^1 { } } }
11:18 FROGGS lemme check
11:18 camelia rakudo-moar da7ff7: ( no output )
11:18 timotimo star: class Foo { method foo() { ROUTE: for ^1 { } } }
11:19 camelia star-{m,p} 2014.09: ( no output )
11:19 timotimo huh.
11:19 FROGGS only in a module
11:19 vti yes, it reproduces only with 'use' from another file
11:19 FROGGS vti: that's the fix: https://github.com/rakudo/rakudo/commit/d3a28417f2d2461f6c65c7d2cdbd8c38898b694e
11:19 FROGGS which landed *after* 2014.09
11:19 vti i see
11:20 vti 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
11:20 FROGGS not now, but in about 7 hours from now :o)
11:21 * Ulti finds RESTRICTED.setting with the big long list in :3
11:21 vti FROGGS: :)
11:21 tinyblak joined #perl6
11:25 Ulti looks like classes that 'does' the restricted things are not themselves restricted? like IO::Socket::INET does IO::Socket
11:25 Ulti though I got back a 0 byte Buf :S so might just be failing silently
11:26 FROGGS I guess we should restrict the nqp ops at some point
11:26 FROGGS maybe we can reregister them
11:26 FROGGS m: say nqp::dir
11:26 camelia rakudo-moar da7ff7: OUTPUT«===SORRY!===␤No registered operation handler for 'dir'␤»
11:28 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")
11:28 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:29 FROGGS Ulti: when you forbid the use of specific nqp ops, then you can still provide a class that does other things
11:29 FROGGS that's the more safer and saner approach IMO
11:29 mvuets vti, did you try 2014.11 or tip?
11:29 Ulti m: IO::Socket::INET.new(:host("localhost"),:port(80)).read(10).say
11:30 camelia rakudo-moar da7ff7: OUTPUT«(timeout)»
11:30 Ulti erk sorry
11:31 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"
11:31 camelia rakudo-moar da7ff7: OUTPUT«I'm still happy␤»
11:31 Ulti gd gd
11:33 mvuets vti, i don't know for sure, but sounds about right.
11:33 baest joined #perl6
11:33 mvuets vti, i personally liked rakudobrew to install and manage rakudos. it's much convenient unless you hack on rakudo itself
11:34 mvuets vti: also might make sense to try out the latest release instead of tip
11:35 mvuets speaking of rakudo releases: rakudo.org is misleading as the last announcement there is about 2014.09 when in fact releases happen monthly
11:36 mvuets was it a deliberate choice, or is lack of time/will?
11:37 tinyblak joined #perl6
11:38 Ulti mvuets only Rakudo* releases are mentioned on the blog
11:39 Ulti 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/
11:39 camelia rakudo-parrot da7ff7: OUTPUT«===SORRY!===␤Error while compiling op shell: RESTRICTED␤»
11:39 Ulti cool
11:40 Ulti 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
11:40 FROGGS no
11:40 FROGGS I guess
11:40 mvuets Ulti: oooh, i see. they just happen to have the same versioning scheme which confused me. thanks
11:40 FROGGS brb
11:41 chenryn joined #perl6
11:41 colomon joined #perl6
11:42 tinyblak joined #perl6
11:42 Ulti mvuets yeah there is the same convention for version numbers but it's a different repo https://github.com/rakudo/star
11:46 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:47 Ulti huh?
11:48 timotimo er
11:48 timotimo that wasn't you, that was vti
11:48 Ulti heh
11:48 mvuets Ulti: if i was attentive enough i'd spot the word "star" in the post title q-:
11:49 mvuets 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
11:50 Ulti I guess you want something that isnt a moving target for people to agree upon as a release
11:51 vti rakudobrew was the way to go, label works now
11:51 mvuets vti: \o/
11:52 mvuets ...then do rakudo releases make sense as such?
11:53 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 Ulti you wouldnt want to support any commit ever made in the history of a language :S
11:53 mvuets sorry, i meant to say something else
11:54 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:55 Ulti 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)?
11:55 mvuets but i think it does
11:56 Alina-malina joined #perl6
11:56 mvuets as you said rakudo* release involves more time and efforts, so it would slow down plain rakudo releases
11:56 gtodd joined #perl6
11:56 Ulti its more you want module authors to have some solid to target patches against as a "release"
11:57 Ulti 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:59 * mvuets . o O ( http://img2.wikia.nocookie.net/__cb20110519114459/maxpayne/images/9/93/Rockstar_Games_logo.png (-: )
11:59 Ulti hah
12:03 Ulti the Toys R Us logo in the UK fits the camelia aesthetic http://payload127.cargocollective.com/1/0/12044/4859029/toysrus_rstar_5.jpg the message works if you replace /toys/ with /perl/
12:05 Ulti reaching for the stars would be a good slogan for R* :D
12:08 lizmat .oO( funny how Whatever becomes something to reach for )
12:12 Ulti the jingle "There's a magical place we're on our way there..." is brilliantly apt too :3
12:16 ptc_p6 joined #perl6
12:24 smls joined #perl6
12:25 smls Hi all
12:25 yoleaux 4 Dec 2014 17:44Z <ab5tract> smls: takend care of :)
12:25 smls lizmat: Will my «"foo.txt".IO.lines» still work when your I/O refactor is finished?
12:26 lizmat yes
12:27 smls Ok, thanks
12:39 prevost joined #perl6
12:56 rindolf joined #perl6
12:58 smls lizmat: Is «"foo".IO.lines» lazy, like «open("foo").lines» ?
12:58 smls And if so, when is the file closed?
12:59 lizmat both are lazy
12:59 lizmat the former closes the handle before finishing, the latter does not
13:00 lizmat currently, the only way to make them eager, is by adding the :eager named param
13:00 lizmat "foo".IO.lines(:eager)
13:01 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 perl6-examples: 05e0d46 | (Steve Mynott)++ | cookbook/0 (2 files):
13:01 dalek perl6-examples: fix warnings with scope and rename EVAL
13:01 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/05e0d4676b
13:02 smls In Perl 5, filehandles auto-close when they go out of scope.
13:02 lizmat smls: Perl 6 does not have timely destruction
13:02 lizmat the file handle *will* be closed when the GC finds it can
13:02 lizmat but there's no telling when that happens
13:03 lizmat that's why you probably want to use IO.lines
13:03 smls ok
13:03 lizmat another approach would be to add a LEAVE phaser to the block that opens a handle
13:03 lizmat { my $h = open "foo"; LEAVE $h.close }
13:04 felher I like that LEAVE-thingy. It's like golangs defer :)
13:05 mvuets indeed looks neat!
13:06 smls yeah
13:06 smls 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)
13:09 smls TL;DR: I agree with Bjarne Stroustrup on this - constructors are the ideal solution for resource management, and GC kills it.
13:09 smls s/constructors/destructors/
13:10 osfameron Rust's approach looked quite interesting
13:10 mvuets so scope guards are not possible?
13:10 moritz mvuets: LEAVE is a scope guard
13:10 mvuets on the other hand they should be, just need to be explicitly state it
13:10 mvuets 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
13:11 mvuets ok, i see
13:11 mvuets osfameron: what they've got?
13:12 mvuets osfameron++ watched your talk on zippers from yapc::eu recently, very liked it, though got overwhelmed to the end (-%
13:13 osfameron mvuets: thanks -- the 2nd half ("bonus materials") bit was kinda confusing tbh :-)
13:14 itz_ there are two directories of cookbooks examples "perl6/mu/examples/cookbook" and "perl6/perl6-examples/cookbook"
13:14 itz_ I'm proposing to merge and delete one? but which should remain?
13:15 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
13:15 * osfameron handwaves wildly
13:15 mvuets itz_: mu seems to be a legacy repo, so i vote for moving from mu and merging into perl6-examples
13:15 bjz_ osfameron: that is about right
13:17 bjz_ 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:18 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
13:18 moritz itz: if not, either refurbish it, or delete it
13:19 itz yeah I won't throw any anything useful
13:20 itz ^ away
13:20 moritz there's surprising little useful in mu, given its size
13:21 kaleem joined #perl6
13:26 tinyblak_ joined #perl6
13:32 blackbolt joined #perl6
13:40 vendethiel joined #perl6
13:40 erkan joined #perl6
13:40 erkan joined #perl6
13:41 anaeem1 joined #perl6
13:49 dalek perl6-examples: 5424841 | (Steve Mynott)++ | cookbook/ (4 files):
13:49 dalek perl6-examples: import three directories from perl6/mu/examples/cookbook
13:49 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/542484158b
13:49 dalek perl6-examples: 4737615 | (Steve Mynott)++ | cookbook/ (2 files):
13:49 dalek perl6-examples: tweak README
13:49 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/47376156fb
13:53 carlin Inline::Perl5 has started failing tests in the last couple of days
13:55 gtodd itz: to my (easily confused) mind it would be nice to merge those .... how about everything in perl6/examples/cookbook :-)
13:58 dalek mu: 5d402ce | (Steve Mynott)++ | examples/cookbook/ (34 files):
13:58 dalek mu: 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 dalek mu: review: https://github.com/perl6/mu/commit/5d402ce510
14:08 colomon carlin: last three overnight smokes also failed Crypt::Bcrypt, IO::Socket::SSL, LibraryMake, OpenSSL, and Questhub.
14:21 BigBear joined #perl6
14:21 anaeem1_ joined #perl6
14:22 BenGoldberg joined #perl6
14:23 dalek roast: 8dd72c2 | (Elizabeth Mattijsen)++ | integration/advent2014-day05.t:
14:23 dalek roast: Skip the test as it apparently can also hang
14:23 dalek roast: review: https://github.com/perl6/roast/commit/8dd72c2485
14:25 dalek rakudo/newio: 206edcb | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
14:25 dalek rakudo/newio: Fix tiebreaker on slurp()
14:25 dalek rakudo/newio:
14:25 dalek rakudo/newio: Why this way?  Because apparently it is legal / ok to put an IO::Handle into
14:25 dalek rakudo/newio: $*ARGFILES.
14:25 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/206edcb37e
14:27 [Coke] S32-io/io-spec-unix.t has 5 deprecated calls.
14:33 lizmat [Coke]: looking at that now
14:34 raiph joined #perl6
14:38 dalek roast: 355e77b | (Elizabeth Mattijsen)++ | S32-io/io-spec-unix.t:
14:38 dalek roast: Fix deprecations
14:38 dalek roast: review: https://github.com/perl6/roast/commit/355e77b23d
14:42 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 #perl6
14:49 vendethiel joined #perl6
14:54 isBEKaml joined #perl6
15:05 rindolf joined #perl6
15:09 [Coke] lizmat++ fixing things prettymuch as soon as I mention them.
15:09 lizmat actually, I had *just* opened that file
15:09 * [Coke] comes back to hear laptop fan noise. the rakudo jvm build is the only thing that does this.
15:09 lizmat so it's more a case of synchronous events
15:14 telex joined #perl6
15:17 [Coke] You can still keep the karma, though. :)
15:18 lizmat :-)
15:25 kaare_ joined #perl6
15:31 carlin_ joined #perl6
15:36 rurban joined #perl6
15:41 andreoss joined #perl6
15:41 andreoss https://fosdem.org/2015/schedule/event/get_ready_to_party/ can this information be relied on?
15:42 andreoss >2015 will be the year that Perl 6 officially launches for production use.
15:42 andreoss this part to be exact
15:43 kaare__ joined #perl6
15:43 lizmat andreoss: yes, I think that can be relied upon
15:45 rindolf joined #perl6
15:46 kaare_ joined #perl6
15:47 kaare_ joined #perl6
15:52 TimToady 15 years is a nice round number
15:53 masak I'm working on the last parts right now.
15:56 prevost joined #perl6
16:05 kaare_ joined #perl6
16:06 kaare_ joined #perl6
16:10 TimToady so are several other people :)
16:10 lizmat I'm not
16:10 lizmat oh wait, eh, I am
16:11 isBEKaml masak: "last parts"? Last mile problem? :)
16:11 TimToady .oO(that's the last thing we'd ever want...)
16:12 lizmat You just have to approach it from the other side  :-)
16:12 masak isBEKaml: this one? https://en.wikipedia.org/wiki/Last_mile
16:13 isBEKaml masak: yes
16:14 TimToady we just need to charge people a monthly fee for access to Perl 6, and that will fix everything
16:15 btyler P6aaS
16:15 btyler sounds exciting. need to find some investors...
16:16 isBEKaml btyler: no - that sounds very weird
16:16 isBEKaml pissass
16:17 TimToady "six" and "sux" are too close in levenshtein distance...
16:17 * lizmat is watching Orion splash down
16:17 TimToady though "six" and "sex" are closer in ascii
16:19 huf i've been struggling with the association "phat"
16:19 huf (hat is also 6)
16:20 BigBear joined #perl6
16:24 Akagi201 joined #perl6
16:24 tinyblak joined #perl6
16:25 mr-foobar joined #perl6
16:25 tinyblak_ joined #perl6
16:31 * itz has his money on SpaceX to beat NASA
16:32 * TimToady has most of his money on NASA, albeit involuntarily
16:34 Ben_Goldberg joined #perl6
16:37 tinyblak joined #perl6
16:38 * mr-foobar bets on metric system
16:41 * Ulti bets on the people working in m instead of mm their rocket will be a thousand times more powerful
16:44 BenGoldberg joined #perl6
16:45 itz when it explodes?
16:47 Ulti nah it will just be accidentally built a thousand times bigger almost touching space before launch :D
16:49 kaare_ joined #perl6
16:50 TimToady well, but a thousand times longer is a billion times bigger
16:51 TimToady 'course, here m would be taken as miles rather than meters, further compounding the difficulty
16:54 ugexe nice read, lizmat++
16:54 tinyblak joined #perl6
16:55 Ben_Goldberg joined #perl6
16:55 itz this NASA TV is a repeat. I'm sure I saw this show in the 70s
16:57 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 TimToady so at least the TV tech has improved, even if the space tech hasn't :)
16:58 dalek perl6-roast-data: 0f9ae9a | coke++ | / (5 files):
16:58 dalek perl6-roast-data: today (automated commit)
16:58 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/0f9ae9a4b8
16:58 dalek perl6-roast-data: d427281 | coke++ | bin/cull:
16:58 dalek perl6-roast-data: avoid "binary file..." with grep
16:58 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/d42728116c
17:01 masak Ven: ping
17:03 _rubioTerra_ joined #perl6
17:05 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:06 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:07 mr-foobar i was thinking has sytax can be multiplexed onto such "thread" operands.
17:07 mr-foobar s/has sytax/how syntax/
17:08 mr-foobar that way operands can be developed separately from syntax and multiplexing can happen through intermedia token passing.
17:09 TimToady itz: how could it not be?
17:10 mr-foobar TimToady: https://en.wikipedia.org/wiki/Dataflow_architecture <--
17:10 TimToady well, other than by artificially limiting the precision, which is silly
17:11 mr-foobar https://en.wikipedia.org/wiki/Out-of-order_execution
17:12 TimToady ideally, Instants are TAI, but not every machine has an atomic clock built in
17:13 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
17:13 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 #perl6
17:16 anaeem1_ joined #perl6
17:19 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 raiph joined #perl6
17:21 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:24 Mso150 joined #perl6
17:24 Akagi201 joined #perl6
17:24 gfldex joined #perl6
17:26 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:27 mr-foobar Using that xml I would queue to generic operations in separate threads.
17:28 mr-foobar there is so much decoupling here, you can even queue to the network. This I testing with my side project.
17:28 mr-foobar s/testing/tested/
17:32 mr-foobar you can see a video here -- http://vimeo.com/102371548 <-- but it is a very low level idea so I think it can be applied to interpreters as well.
17:33 dalek perl6-examples: 37f84e2 | (Steve Mynott)++ | cookbook/03dates-and-times/03- (9 files):
17:33 dalek perl6-examples: section 3 of perl cookbook - some simple datetime examples
17:33 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/37f84e2ea4
17:34 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:36 TimToady 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:38 TimToady though alternations still would want to default to left-to-right, which is odd too
17:41 * TimToady probably needs more caffeine to think about this than is good for him
17:43 * itz wonders what the easiest, lowest common denominator DBM to bind using nativecall would be?
17:44 BigBear joined #perl6
17:44 Mso150 joined #perl6
17:45 moritz itz: I have no idea, but I'd probably investigate berkeleydb
17:48 itz yeah but the cute cat logo one not the evil oracle one
17:53 Sqirrel_ joined #perl6
17:56 TimToady my machine comes with gdbm
17:56 TimToady sdbm probably has the free-est license, but was the slowest, last I checked, which was literally decades ago
17:57 ugexe joined #perl6
17:58 itz https://en.wikipedia.org/wiki/Ndbm claims possible data loss
17:59 raiph joined #perl6
18:05 b2gills mr-foobar: I think you should try your idea with a language designed to be small, like Lua.
18:06 TimToady or maybe nqp :)
18:07 vendethiel joined #perl6
18:09 mr-foobar b2gills: yeah. my strategy would be translate from syntax to xml or sexps -- a graph --
18:10 mr-foobar then the graph executor and operands can be on independantly.
18:11 mr-foobar does nqp serialise the program in anyway ?
18:11 mr-foobar there are not stacks and registers here ! it is a data flow graph.
18:12 mr-foobar *no
18:16 Alina-malina joined #perl6
18:16 mr-foobar hmm the assumption that I am making is -- every program is representable as a data flow graph --
18:16 mr-foobar may not be true :/
18:17 masak sounds true to me.
18:19 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:20 mr-foobar the hardware architecture guys have actually figured out how to interpret a graph on real hardware.
18:21 mr-foobar it's possible in software too !
18:22 TimToady where does the "tape" live in a dataflow machine?
18:22 dalek rakudo/newio: 36eb98c | (Elizabeth Mattijsen)++ | src/core/IO.pm:
18:22 dalek rakudo/newio: Introduce FORWARD/BACKWARD-SLASH primitive
18:22 dalek rakudo/newio:
18:22 dalek rakudo/newio: Actually, the TRANSPOSE-ONE primitive.  For quickly switching between forward
18:22 dalek rakudo/newio: and backwards slashes in paths.  Abour 500x faster than equivalent .trans.
18:22 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/36eb98c658
18:22 dalek rakudo/newio: b5caaa1 | (Elizabeth Mattijsen)++ | src/core/IO.pm:
18:22 dalek rakudo/newio: Make sure dir entries are forward slashed
18:22 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/b5caaa1054
18:22 dalek rakudo/newio: 1c14e3e | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
18:22 dalek rakudo/newio: Make sure paths to dir() are forward slashed
18:22 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/1c14e3ea3e
18:22 dalek rakudo/newio: b71da38 | (Elizabeth Mattijsen)++ | src/core/Cool.pm:
18:22 dalek rakudo/newio: Make sure .IO forward slashes
18:22 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/b71da38458
18:22 TimToady or more specfically, how do you implement an algorithm that requires a stack?
18:24 TimToady how 'bout referential types?
18:24 mr-foobar TimToady: you have the ram with you.
18:24 mr-foobar so stack becomes an array.
18:24 vendethiel joined #perl6
18:25 mr-foobar data flow people don't seem to have a tape. you can think of it as unix pipelines with control loops.
18:29 TimToady I mean tape in a turing sense, so ram is a tape
18:29 mr-foobar in electronics the equivalent is -- https://en.wikipedia.org/wiki/Asynchronous_circuit
18:30 TimToady but a turing machine shares its tape with all its instructions
18:31 TimToady what do you mean by "ram with you?"
18:31 mr-foobar TimToady: the hardware data flow people use a graph for everything.
18:32 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
18:32 mr-foobar operation has access to a global ram
18:32 mr-foobar edge is like a goto
18:32 mr-foobar so your don't have a goto operation, but an edge
18:33 TimToady well, that's basically what CPUs do inside anyway
18:33 TimToady they just send data around
18:33 mr-foobar but no clock, you see :)
18:33 TimToady people have proposed async CPUs too
18:34 mr-foobar yup. this is an async type.
18:34 TimToady or more like self-clocked
18:35 TimToady 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 TimToady otoh we're trying to introduce more data-centric empathy in P6 too :)
18:36 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
18:37 TimToady I'm sure some instructions would be easier to mung into that world view than others, though
18:38 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
18:39 mr-foobar oh, they use something called token store.
18:39 mr-foobar i think in perl5 you have tainted data right ?
18:39 TimToady sounds like a gensym :)
18:39 TimToady yes, not yet in p6 though
18:39 TimToady if ever...
18:40 mr-foobar heh. like tainted data, you mark the data with tag.
18:40 TimToady like old Burroughs machines, iirc
18:41 mr-foobar if you have 1000 nodes, you token store indexes continuation by <tag, node-name> ..
18:41 mr-foobar memory hungry.
18:42 mr-foobar 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:42 bcode joined #perl6
18:43 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 mr-foobar yup
18:44 * 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.
18:44 mr-foobar 5 in this case.
18:45 mr-foobar i have been told that the mysql query engine also works like this.
18:46 mr-foobar 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
18:50 TimToady just so you don't have lysdexia, which would be a broken right hand
18:51 mr-foobar heh
18:51 raiph joined #perl6
18:53 mr-foobar I find the hardware people really into this stuff https://en.wikipedia.org/wiki/TRIPS_architecture
18:53 Ugator joined #perl6
18:55 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:57 TimToady well, FSAs are data-driven in a different sense
18:58 mr-foobar that is a graph too, but few people try to see it that way.
18:59 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
18:59 TimToady my PDA broke...
19:01 mr-foobar pyrimidine: http://www.antha-lang.org/ these people are taking the visual flow approach
19:01 BenGoldberg joined #perl6
19:01 treehug88 joined #perl6
19:02 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:03 TimToady so people tend to prefer linguistic looking solutions
19:03 pyrimidine I recall seeing antha before, but haven't delved into it.  interesting...
19:04 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.
19:04 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:05 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.
19:05 TimToady at least, not by me :)
19:05 TimToady I like ¤ myself
19:06 japhb_ Imagine masak's examples, except $x replaced with §x (or similar for your marker).
19:06 japhb_ Even less syntax (like quoting '$x' as a string, blech), and safer too.
19:06 TimToady and § is a bit too visually like $
19:06 japhb_ Hmm, looks very different here, but that may just be a matter of font.
19:10 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:12 TimToady 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:13 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:14 Akagi201 joined #perl6
19:14 TimToady even if you say something like 'foo;' for your generic code, is that a statement control?  a term?  a listop?  a label?
19:15 * 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
19:15 moritz configured a bridge network for the guests, didn't quite work, 'ifdown br0' # no packets coming out afterwards :(
19:16 TimToady oopsie
19:16 Mso150_l_o joined #perl6
19:18 bcode joined #perl6
19:19 moritz I guess http://www.linux-kvm.org/page/Networking#public_bridge is what I want
19:19 moritz further configuration will have to wait until Monday :(
19:20 dalek rakudo/newio: 89b568a | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
19:20 dalek rakudo/newio: homdeir() only takes a path
19:20 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/89b568a829
19:21 TimToady we've waited 14.5 years, we can wait 3 days :)
19:21 treehug8_ joined #perl6
19:22 mr-foobar TimToady: gotto sleep now. my ideas are mostly from -- http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.124.1645
19:23 * mr-foobar will try to mess with nqp + data flow dsl if time permits
19:23 vti joined #perl6
19:23 mvuets joined #perl6
19:27 [Sno] joined #perl6
19:34 virtualsue joined #perl6
19:44 jnthn evening, #perl6
19:44 lizmat jnthn o/
19:44 jnthn ...ooh, no messages and no highlights. That's easy... :)
19:45 jnthn hi lizmat
19:45 lizmat yeah, trying not to put too much burden on you ;-)
19:46 jnthn :-)
19:49 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 masak (after being staunchly Texan for many years)
19:50 masak 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:54 TimToady you could always write the texas version as a macro :P
19:59 BigBear joined #perl6
20:01 Ugator joined #perl6
20:05 * masak bonks TimToady on the ¤
20:05 xinming joined #perl6
20:10 lizmat does anybody whether we're on schedule for sillymoose's advent post ?
20:10 lizmat *know
20:11 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
20:11 lizmat I guess it should always be a relative path
20:12 lizmat ah, I see there is a post scheduled for publishing tomorrow
20:12 lizmat sillymoose++
20:12 lizmat it's a bit meagre   :-(
20:12 tony-o it's sometimes a number and sometimes a full path that ends with the number
20:15 raydiak afternoon, #perl6
20:16 jnthn .u ¤
20:16 yoleaux U+00A4 CURRENCY SIGN [Sc] (¤)
20:16 jnthn Ah
20:17 jnthn |=| looks ugly and not box enough
20:18 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
20:18 jnthn One eye swolen, other poked out, due to macro use? :P
20:18 TimToady who gored your oX?
20:20 TimToady we could use .oO() since that makes anything abstract
20:20 TimToady or maybe >o<   :)
20:21 kurahaupo jnthn: isn't the currency sign more like an o that's got 4 stubby legs?
20:21 TimToady wait, that should be >ö<, or is it »o«?
20:22 Mso150_l_o joined #perl6
20:22 TimToady >o< is a minimalist »ö«
20:22 jnthn kurahaupo: Not so much in my font...
20:22 TimToady well, it's COMPOSE-ox in any case
20:26 TimToady ⫸Ö⫷
20:27 TimToady that's even bigger
20:28 lizmat ¤   )(  ?
20:29 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.
20:30 geekosaur alternately the default is to associate with existing names but you can specify that particular names are to be treated as locally defined
20:31 geekosaur 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 geekosaur (yep, solve one problem, get an uglier one...)
20:32 lizmat ¤   )o(  ?
20:38 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.
20:38 TimToady so something must declare A,B,C in advance
20:39 TimToady either parameter or separate declarator
20:39 TimToady or either, if it's just general sigginess
20:39 masak neither parameter or separate declarator implies separate sigil to me, though.
20:40 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.
20:40 TimToady it's not a sigil in that sense
20:40 masak if we could just do that in a safer way than AST.subst...
20:41 geekosaur thinking I need to rehabilitate my dw to produce a proper reply
20:42 * 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:43 TimToady we're just a bit picky abou tthat
20:44 TimToady 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.
20:45 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
20:46 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:47 raydiak .oO( we could use $$$ :P )
20:47 geekosaur it's harder than that because different things have different contexts within the AST
20:47 TimToady an AST has to know what parsed it, or any overloaded symbols in it are useless
20:48 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:50 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 TimToady the match object contains all of the ASTs returned by the grammar rule
20:51 geekosaur maybe a pre-sigil indicating that what follows is AST-scoped.  Q.codeToNode({ say _$x; say _$y; )} (_ is probably a bad choice...)
20:52 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:53 TimToady but an actoin routine is just code, so it can do anything with the parsed macro call it likes
20:53 TimToady the meaning of the AST is derived from the current language though
20:54 TimToady <variable> means something a little different in a regex than it does in mainline code
20:55 TimToady 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 virtualsue_ joined #perl6
20:56 TimToady sometimes I think even %*LANG is the wrong way to handle braids
20:56 TimToady it should go through the virtual current language system just as almost everything else does
20:58 TimToady </rant>
21:02 TimToady $¢.lang-Regex or so instead of %*LANG<Regex>
21:02 TimToady and then the remembered current language is not lost on subsequent passes
21:02 Akagi201 joined #perl6
21:03 Mso150_l_o joined #perl6
21:03 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:07 TimToady geezer nap &
21:30 dalek snake: fbff0a3 | (Arne Skjærholt)++ | src/Snake/ (3 files):
21:30 dalek snake: Rudimentary class inheritance.
21:30 dalek snake: review: https://github.com/arnsholt/snake/commit/fbff0a3d6d
21:31 [Coke] https://github.com/arnsholt/snake could use a readme.
21:31 arnsholt That's a good point!
21:31 arnsholt I should probably fix that =D
21:41 colomon arnsholt++
21:51 masak 'night, #perl6
21:53 raydiak g'night masak++, thanks for tirelessly banging your head against the macro situation
21:57 smls moritz: ping
21:58 tony-o lizmat: i end up with a manifest similar to this: https://gist.github.com/tony-o/801104a6f2e2db082e98
21:59 tony-o ids 0-2 all have full paths and 3+ all have relative
21:59 tony-o so when i call .candidates i get <full path><full path> back
22:01 lizmat tony-o: atm I have no idea
22:01 smls .tell moritz Would this be suitable for a p6advent post? http://smls.co.nf/advent/data-munging-in-perl-6-vs-perl-5/
22:01 yoleaux smls: I'll pass your message to moritz.
22:02 smls ^^ Comments from other people are welcome too... :)
22:02 smls Especially if  you think that any of the demonstrated code is not very idiomatic.
22:07 lizmat smls: looks pretty good to me  :-)
22:07 colomon smls: so far it looks awesome!
22:08 [Coke] smls: what colomon said.
22:10 telex joined #perl6
22:16 colomon smls++
22:19 perturbation joined #perl6
22:20 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? http://smls.co.nf/advent/data-munging-in-perl-6-vs-perl-5/
22:20 moritz (mostly because it gives better error messages with accidentally run with p5)
22:23 lizmat moritz: have you looked at the next advent post?  it looks a bit meager to me
22:26 moritz lizmat: I might add a paragraph, but I'm currently not in the shape to do anything significant
22:26 moritz lizmat: and IMHO it's also OK for some posts to be short and sweet
22:28 lizmat ok, fair enough
22:28 lizmat I'm not in a state to add anything significant either  :-)
22:32 colomon looks plenty long to me.
22:34 moritz colomon: are you also looking at "Running system commands"?
22:34 Mso150 joined #perl6
22:36 psch joined #perl6
22:36 psch hi #perl6
22:37 smls moritz: Doesn't the shebang line already take care of that?
22:38 moritz smls: not in my experiments :-)
22:43 dalek rakudo/newio: 69e59a2 | (Elizabeth Mattijsen)++ | src/core/IOU.pm:
22:43 dalek rakudo/newio: Make sure we remember any extra params
22:43 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/69e59a282b
22:43 dalek rakudo/newio: c024797 | (Elizabeth Mattijsen)++ | src/core/IO.pm:
22:43 dalek rakudo/newio: Make chdir/tmpdir/homedir take backslashes
22:43 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/c024797422
22:43 dalek rakudo/newio: cd9e5e8 | (Elizabeth Mattijsen)++ | src/core/IO/ (3 files):
22:43 dalek rakudo/newio: Various Win32 related fixes
22:43 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/cd9e5e8596
22:47 BenGoldberg joined #perl6
22:48 smls moritz: I added a note.
22:48 murthybalu joined #perl6
22:50 murthybalu_ joined #perl6
22:51 Akagi201 joined #perl6
22:51 murthybalu_ helo
22:52 murthybalu_ helo
22:52 smls hello
22:54 murthybalu_ Is this perl6 development area ?
22:55 lizmat well, perl 6 developers hang out here, if that is what you mean  :-)
22:57 Mso150 joined #perl6
22:58 dalek rakudo/nom: 6345f4f | (Elizabeth Mattijsen)++ | / (5 files):
22:58 dalek rakudo/nom: Introduce IO::Locally/Pathy roles
22:58 dalek rakudo/nom:
22:58 dalek rakudo/nom: Empty here, for easier switching between nom and newio branches
22:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6345f4fe94
23:02 raiph joined #perl6
23:02 dalek rakudo/newio: 6345f4f | (Elizabeth Mattijsen)++ | / (5 files):
23:02 dalek rakudo/newio: Introduce IO::Locally/Pathy roles
23:02 dalek rakudo/newio:
23:02 dalek rakudo/newio: Empty here, for easier switching between nom and newio branches
23:02 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/6345f4fe94
23:02 dalek rakudo/newio: e7c967a | (Elizabeth Mattijsen)++ | / (5 files):
23:02 dalek rakudo/newio: Merge branch 'nom' into newio
23:02 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/e7c967acfe
23:03 robinsmidsrod joined #perl6
23:04 kurahaupo joined #perl6
23:11 dalek mu: 389def2 | smls++ | misc/perl6advent-2014/schedule:
23:11 dalek mu: Claim day 9 of the advent calendar
23:11 dalek mu: review: https://github.com/perl6/mu/commit/389def2928
23:12 raiph smls: Looks great. I suggest you add a link to the last para ("Concurrency/Parallelism"); maybe http://jnthn.net/papers/2014-fosdem-perl6-today.pdf?
23:13 gfldex joined #perl6
23:21 kurahaupo joined #perl6
23:27 smls raiph: Thanks; I used http://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
23:28 raiph smls: the "Perl 6 version" link just before "Conclusion" points to a P5 version
23:28 smls not anymore, i already fixed that
23:28 gtodd trying to rethink simple (in perl5) exercises in perl6
23:29 raiph smls++
23:40 * lizmat goes to bed
23:52 aborazmeh joined #perl6
23:54 aborazmeh joined #perl6

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

Perl 6 | Reference Documentation | Rakudo