»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
TimToady | the basic problem is that P5 is too closely attached to its stack model; this is also the problem with XS | 00:08 | |
well, one of the problems | |||
00:08
fgomez joined
00:12
MikeFair left
|
|||
cognominal | if everything could be implemented using the perl5 engine, there would be no point inventing/using another engine for Perl 6. | 00:15 | |
mhasch | sjn: ... and funnily stated, too: "line noise visually encapsulated into a small pill that's easy to swallow" | ||
00:16
MikeFair joined
|
|||
cognominal | but hard to digest? | 00:16 | |
mhasch | probably easily enough digested, but lacking juice :-) | 00:17 | |
00:20
MikeFair left
00:21
benabik left
|
|||
TimToady | one of those "unneeded dietary supplements" kind of things | 00:23 | |
mostly harmless | |||
00:25
MikeFair joined
00:26
benabik joined
00:39
Targen_ left
00:48
xdf joined,
am0c left
00:50
xdf left
00:51
jeffreykegler left
|
|||
[Coke] grabs the latest NQP which is QAST enabled. | 00:55 | ||
nqp docs/bootstrapping.pod is for nqp-rx, not npq. | 00:56 | ||
pmichaud | indeed. | 00:57 | |
00:57
spider-mario left
|
|||
[Coke] | is docs/QASTMAP killable? | 01:01 | |
pmichaud | probably need to ask jnthn++ for that | ||
01:03
jeffreykegler joined
01:09
Targen joined,
scott__ joined
|
|||
[Coke] | if I'm using QAST, is there a "use" statement I need to include | 01:23 | |
? | |||
01:26
dayangkun joined
|
|||
[Coke] | pmichaud: feather.perl6.nl/~coke/foo.nqp | 01:27 | |
nqp foo.nqp -e "eek" | |||
Unable to obtain ast from NQPMatch | |||
if I add "make" as i suspect is needed, I get a NPMCA | 01:30 | ||
01:30
REPLeffect left
01:31
REPLeffect joined
01:37
dayangkun left
|
|||
[Coke] | I assume I need to wrap it in QAST::Stmts somehow. | 01:41 | |
01:45
dayangkun joined
01:51
FROGGS_ left
01:56
gongyiliao joined
02:05
FROGGS_ joined
02:22
orafu left,
orafu joined
02:30
jeffreykegler left
02:31
jeffreykegler joined
|
|||
sirrobert | How can I delete a method from a class at runtime? (opposite of .^add_method) | 02:39 | |
I tried del_method delete_method rem_method remove_method | |||
really I want to *replace* a method, but I can't use add_method if one already exists | 02:40 | ||
02:46
immortal left
|
|||
sorear | as far as I know, you can't | 02:48 | |
the default class system takes advantage of the append-only nature of classes for optimization | |||
sirrobert | ok, hmmm | 02:49 | |
I am trying to add to a grammar during runtime | |||
sorear | if you want to radically change the accepted methods at runtime you probably should be using a fallback instead | ||
sirrobert | know of another way I can do that? | ||
sorear | why do you need to delete methods to add to a grammar? | ||
sirrobert | (that is, I can add_method to add a new token... but I need to be able to rewrite TOP to recognize the new token | ||
or, rewrite some token, anyway | |||
benabik | Why not just use inheritance? | ||
sirrobert | hmmmmmmmmmmmmmmmmm | 02:50 | |
(trying to think of how that would be structured in this context) | |||
so every time a new rule is added (maybe a few dozen times), just create a new grammar, inherit from the current "head" grammar | |||
sorear | sirrobert: 1. STD uses inheritance to dynamically alter the grammar 2. this is what protoregexes are for! | ||
benabik | sorear++ | ||
sirrobert | hmmmmmm protoregexes... | ||
I'm out of my depth on this. I want to be in my depth on it by Wednesday =) | 02:51 | ||
any example code I can read about that? | |||
mostly I just need syntax help | |||
02:52
erkan joined,
erkan left,
erkan joined
|
|||
sirrobert | reading an advent calendar entry about ... protoregexes, maybe? =) | 02:52 | |
colomon | sirrobert: maybe. :) | 02:53 | |
sirrobert: github.com/perl6/std/blob/master/STD.pm6 has examples, but the advent calendar might be a more sensible place to start. | |||
(as std is crazy complex) | |||
sirrobert | colomon: heh ok | 02:54 | |
bookmarking it though | |||
p6 has a learning curve similar to vim's | 02:55 | ||
that's not a bad thing, but it's a thing =) | |||
now that I'm good at vim, I'm very good at it... but when I wasn't ... I wasn't | |||
colomon | sirrobert: rumor had it you're doing p6 stuff for $work, can you talk about it? | 02:56 | |
sirrobert | a bit =) | ||
anything in particular you want to know | |||
(and yes, I am) | |||
colomon | Just the basics, all I know I've already said, and I'm curious. | ||
sirrobert | well, | ||
we started a company a bit over a year ago | 02:57 | ||
colomon is planning on starting a p6 en.wikipedia.org/wiki/ISO_10303-21 parser soon for $work, biggest hurdle at the moment is figuring out what to name the github repo / p6 module. | |||
sirrobert | (we = me and my CTO/co-founder) | ||
we did R&D for a year (had a govt grant) | |||
colomon | oo, nice | ||
sirrobert | my partner had done a PhD dissertation and got his degree for the invention we're commercializing | 02:58 | |
but it was written in crazy shell scripts and stuff... a university research environment | |||
so we ported it to ruby | |||
(for the grant), and made it all conceptually solid and what not | |||
02:59
kaleem joined
|
|||
sirrobert | then, after doing some marketing research (meaning talking to prospective customers and such) | 02:59 | |
we ... re-wrote everything from the ground up | |||
more powerful, broader concept. bigger platform (in the "Big Data" space) | |||
"advanced analytics" type stuff | |||
anyway | |||
now we're using a LISP and P6 | |||
02:59
tokuhiro_ joined
|
|||
colomon | quite a combination! | 03:00 | |
sirrobert | we're having fun =) | ||
it was cool though that our LOC dropped amazingly | |||
like ... | |||
50%+ reduction | |||
colomon | that's always nice! | ||
sirrobert | heh nod | 03:01 | |
it turns out the LISP we're using is great for certain stuff | |||
but it's expressiveness is ... | |||
well, let me put it this way | |||
(sorry for the sketchy lack of details... more forthcoming, but I have to be a little secretive right now... we're in preliminary sales =) | |||
So, LISP trades semantic complexity for syntactic simplicity | 03:02 | ||
I realized that P6 does the reverse | |||
so when we wanted to represent real-world concepts (in a way that's accessible to end users), P6 is GREAT for modelling that | 03:03 | ||
LISP is great for modeling more "idealized" concepts | |||
(no one wants a LISP API) | |||
sorear | colomon: ISO-10303-21::Parser | ||
sirrobert | anyway, I've really had almost no trouble with P6 | ||
sorear | colomon: don't worry too much about squatting on valuable namespace, we have :auth<cpan:COLOMON> for that | 03:04 | |
sirrobert | the hardest thing is the lack of docs... there's so much syntax | ||
colomon | sirrobert++ | ||
03:04
tokuhiro_ left
|
|||
colomon | sorear: that's a very... dry name. | 03:04 | |
sirrobert | oh, and DBI/ORM would be nice ;) | ||
but really docs. We can write a DBI or ORM easily, if we can figure out what features are currently available. | 03:05 | ||
colomon | sorear: the other is my overall idea is a small set of ISO-10303-21 (ugh) tools, not just a parser. | ||
sirrobert | colomon: anyway, I'm happy to tell you more if you have any particular questions | 03:06 | |
colomon | *other... thing? ... I think I meant to say. | ||
sirrobert | if I can =) | ||
colomon | sirrobert: nah, I'll let you get back to work. But I'm very glad you're doing that, and wish you the best of luck. | ||
sirrobert | thanks =) | ||
colomon | sorear: btw, I'm anticipating the ISO-10303-21 might be good for profiling ... I have huge ISO-10303-21 files to throw at the parser. Though I suppose they're most not things I can redistribute. | 03:07 | |
afk # bedtime | 03:08 | ||
cognominal | p6: say 'a,a' ~~ / 'a' % ',' / | 03:15 | |
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===Preceding context expects a term, but found infix / insteadat /tmp/rq1q_9CORF:1» | ||
..niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===Unrecognized regex metacharacter % (must be quoted to match literally) at /tmp/NAW2KKBFn7 line 1:------> say 'a,a' ~~ / 'a' %⏏ ',' /Unable to parse regex; couldn't find final '/' at /tmp/NAW2KKBFn7 li… | |||
cognominal | hum | ||
p6: say 'a,a' ~~ / 'a' %* ',' / | 03:23 | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===Unrecognized regex metacharacter % (must be quoted to match literally) at /tmp/dmUV9rd1NG line 1:------> say 'a,a' ~~ / 'a' %⏏* ',' /Unable to parse regex; couldn't find final '/' at /tmp/dmUV9rd1NG l… | ||
..rakudo 962b9b: OUTPUT«===SORRY!===Preceding context expects a term, but found infix / insteadat /tmp/x1Q9PBGP0c:1» | |||
cognominal | p6: say 'a,a' ~~ / 'a'* % ',' / | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«#<match from(0) to(3) text(a,a) pos([].list) named({}.hash)>» | 03:24 | |
..rakudo 962b9b: OUTPUT«「a,a」» | |||
sorear | o/ cognominal | ||
03:33
mucker left
03:55
kaleem left
|
|||
Circlepuller | std: 0.say; | 04:02 | |
p6eval | std 2f65afc: OUTPUT«ok 00:00 40m» | ||
04:02
kaleem joined
|
|||
Circlepuller | std: -4.abs.Str.say; | 04:02 | |
p6eval | std 2f65afc: OUTPUT«ok 00:00 41m» | ||
Circlepuller | lol | ||
rakudo: <A B C>.length.say; | 04:04 | ||
p6eval | rakudo 962b9b: OUTPUT«No such method 'length' for invocant of type 'Parcel' in block at /tmp/RZyHpFd069:1» | ||
Circlepuller | o | ||
rakudo: <A B C>.*.say; | 04:05 | ||
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===Confusedat /tmp/tpPoiReW5f:1» | ||
Circlepuller | interesting | ||
sorear | o/ Circlepuller, I have not yet said hi to you | 04:06 | |
Circlepuller | 'ello | ||
sorear | std: say "ok 00:00 41m" | ||
p6eval | std 2f65afc: OUTPUT«ok 00:00 41m» | ||
sorear | Circlepuller: what are you trying to do? | 04:07 | |
Circlepuller | just toy around | 04:08 | |
sorear | r: <A B C>>>.say | 04:09 | |
p6eval | rakudo 962b9b: OUTPUT«CAB» | ||
sorear | b: <A B C>>>.say | ||
p6eval | b 922500: OUTPUT«ABC» | ||
sorear | b: <A B C>>>.say | ||
p6eval | b 922500: OUTPUT«ABC» | ||
sorear | pugs: <A B C>>>.say | ||
p6eval | pugs: OUTPUT«BCA» | ||
sorear | pugs: <A B C>>>.say | ||
p6eval | pugs: OUTPUT«BCA» | ||
sorear | pugs: <A B C>>>.say | ||
p6eval | pugs: OUTPUT«BCA» | ||
sorear | pugs: <A B C>>>.say | ||
p6eval | pugs: OUTPUT«BCA» | ||
sorear | wasn't there a vesion that did it randomly? | ||
Circlepuller | r: <A B A B B C C C>.uniq.say; | 04:11 | |
p6eval | rakudo 962b9b: OUTPUT«A B C» | ||
Circlepuller | r: <A B A B B C C C>.uniq>>.say; | ||
p6eval | rakudo 962b9b: OUTPUT«CAB» | ||
Circlepuller | r: <A B A B B C C C>.uniq>>>>.say; | ||
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===Missing << or >>at /tmp/C2lchSKmsP:1» | ||
Circlepuller | interesting | ||
04:14
xinming left
04:23
jeffreykegler left
04:27
kaleem left
04:31
xinming joined
04:33
kaleem joined
04:42
xinming left
04:43
xinming joined
04:44
gongyiliao left
04:55
kaleem left
05:03
fgomez left
05:17
sftp left
05:18
wk left
05:29
colomon left,
bruges left
05:30
bruges joined
|
|||
moritz | \o | 05:30 | |
05:50
fgomez joined
05:51
stepnem joined
05:56
nodmonkey joined
|
|||
sorear | is A.A.Alexeev a #perl6er? | 05:56 | |
felher | good morning #perl6 :) | 05:58 | |
05:59
xinming left
06:00
xinming joined
|
|||
sorear | good morning felher | 06:02 | |
masak | morning, #perl6 | 06:04 | |
sorear | o/ masak ! | ||
dalek | osystem: 6ca5f0c | (Alexandr A Alexeev)++ | META.list: added XML::Parser::Tiny |
06:06 | |
osystem: 708e6f5 | GlitchMr++ | META.list: Merge pull request #9 from afiskon/patch-1 added XML::Parser::Tiny |
|||
felher | o/ masak :) | 06:07 | |
06:11
wtw joined
06:13
xinming left
06:14
xinming joined
06:16
nodmonkey left
|
|||
tadzik | g'morning | 06:17 | |
masak | tadziku! \o/ | 06:18 | |
sorear | tadzik!!!!! | ||
tadzik | masak! sorear! \o/ | 06:24 | |
06:29
FROGGS_ left
06:34
am0c joined
06:38
jaldhar left
06:44
am0c left
06:46
jaldhar joined
06:47
SamuraiJack joined
06:49
Cofyc joined
06:50
Cofyc left
06:54
Cofyc joined
07:01
am0c joined,
brrt joined
07:03
simcop2387 left
07:04
simcop2387 joined
07:16
spider-mario joined
07:19
hoelzro|away is now known as hoelzro
07:47
FROGGS joined
|
|||
masak | rn: say (class {}).^name | 07:49 | |
p6eval | niecza v21-1-ga8aa70b: OUTPUT«ANON» | ||
..rakudo 962b9b: OUTPUT«<anon>» | |||
masak | rn: say (class {}) === (class {}) | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«False» | ||
..rakudo 962b9b: OUTPUT«True» | |||
masak | o.O | ||
Rakudo! really, "True"? | |||
r: say (class { has $.x }) === (class {}) | 07:50 | ||
p6eval | rakudo 962b9b: OUTPUT«True» | ||
masak | r: say (class { method foo {} }) === (class {}) | ||
p6eval | rakudo 962b9b: OUTPUT«True» | ||
masak | r: say Rat === (class {}) | ||
p6eval | rakudo 962b9b: OUTPUT«False» | ||
masak submits rakudobug | 07:51 | ||
Circlepuller | r: "\x032,4TEST".say | 07:53 | |
p6eval | rakudo 962b9b: OUTPUT«2,4TEST» | ||
Circlepuller | aww | ||
r: "\aTEST".say | |||
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===Unrecognized backslash sequence: '\a' at line 2, near "TEST\".say"» | ||
Circlepuller | r: printf "%c", <7 ''> | 07:55 | |
p6eval | rakudo 962b9b: OUTPUT«» | ||
Circlepuller | r: printf "%c", <7 ''> | ||
p6eval | rakudo 962b9b: OUTPUT«» | ||
Circlepuller | heh | ||
r: printf "%c", <7 ''> | |||
p6eval | rakudo 962b9b: OUTPUT«» | ||
masak | Circlepuller: arguments like <7 ''> don't flatten in Perl 6. | 07:58 | |
07:59
wk joined
|
|||
Circlepuller | interesting | 07:59 | |
still works | |||
FROGGS | what is <7 '' > suppose to mean? | 08:00 | |
tadzik | r: <7 '' >.perl.say | ||
p6eval | rakudo 962b9b: OUTPUT«("7", "''")» | ||
tadzik | this :) | ||
FROGGS | ya | ||
masak | n: say <7 ''>.perl | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«(val("7"), "''")» | ||
masak | Niecza gets closer, though. | ||
n: say val("7").^name | 08:01 | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«IntStr» | ||
FROGGS | its sometimes hard to recognize this stuff... but I guess I get used to it some day ;o) | ||
masak | you will :) | ||
Timbus | whats the main reason for val's behaviour? like keeping whitespace around a number | 08:02 | |
is there a case where you want.. that? i mean ive written a modest bit of perl and never wanted that | 08:03 | ||
masak | Timbus: not sure what you mean. | ||
Timbus: why do you put in whitespace in the argument to val() in the first place? :) | |||
08:03
Hariprasad joined
|
|||
Timbus | i belieeb that it's mentioned explicitly in the spec | 08:04 | |
masak | "In any case, use of such an intuited value as a string will reproduce the original string including any leading or trailing whitespace" | 08:05 | |
you belieeb correctly. | |||
it seems to be a case of retaining the original string as-is. | |||
like, val() provides you with two views of the object: the intended (often numeric) value, and the original string. | 08:06 | ||
Timbus | im just wondering if this is more an internal feature | ||
better question: when do you use val | 08:07 | ||
that might be my real question | 08:08 | ||
masak | ah. | ||
it was created due to a need for such an internal feature, yes. | |||
one use you've already seen: <1 2 3> turns into val("1") etc. | 08:09 | ||
the other use is in MAIN argument parsing. | |||
Timbus | ooh that one makes sense | ||
masak | yes, because everything comes in as strings, but not everything is intended as strings. | 08:11 | |
08:16
fhelmberger joined
08:17
Hariprasad left
08:19
Psyche^ joined
08:22
Patterner left,
Psyche^ is now known as Patterner
08:23
nodmonkey joined
|
|||
tadzik | masak: did you see feather.perl6.nl/~sergot/modules/? | 08:26 | |
08:27
FROGGS__ joined
08:28
thou left
|
|||
jnthn | tadzik: ooh :) | 08:29 | |
tadzik | jnthn: did you see feather.perl6.nl/~sergot/modules/? {_ | ||
:) | |||
it's the "Have you seen this dog" situation | |||
08:32
xinming left
|
|||
masak | tadzik: I saw it. it's nice. | 08:33 | |
need real icons instead of the solid-color circles. I might be able to contribute. | |||
08:34
xinming joined
|
|||
tadzik | yeah, the solid circles are LTA | 08:34 | |
jnthn | I didn't mind the circles fwiw :) | ||
FROGGS__ | I like the github icon font very much.... | ||
maybe this is an option too? | |||
tadzik | instead of circles? :) | 08:35 | |
08:36
popl left,
dakkar joined
|
|||
FROGGS__ | making a font having all symbols and icons for the site included | 08:36 | |
its scalable, so it looks pretty when you zoom in | |||
tadzik | hm | 08:37 | |
no idea if we have manpower for that | |||
masak | FROGGS__: fortawesome.github.com/Font-Awesome/ | 08:38 | |
I used that in one of my YAPC talks. | |||
FROGGS__ | its cool, isnt it? | 08:39 | |
I like it when it changes color like the text nearby when hovering over a link | |||
masak | jnthn: no, the circles don't blend in. something a little more shibui is needed there. | ||
08:44
Cofyc left
|
|||
jnthn | Well, they're not a prettiness optimum, but given the page without them or the page with them, I'd take the extra information even if it's not as pretty as we'd like just yet :) | 08:49 | |
FROGGS__ | using that font-awesome shouldnt be that hard... | 08:50 | |
its repo is on github, right? I can send a pull request these days | 08:51 | ||
08:56
colomon joined,
GlitchMr joined
|
|||
tadzik | yes | 08:59 | |
sergot/modules.perl6.org I think | |||
09:01
j0hnnY joined
09:15
jaldhar left
|
|||
masak | sirrobert: protoregexes. for a long time, I thought they were this fairly magical thing in grammars. but they're quite easy. | 09:16 | |
sirrobert: they're a nice way to make an open set of alternative ways to parse the same thing. | |||
09:16
c1sung left
|
|||
masak | sirrobert: like, consider "term". it is a protoregex in the Perl 6 grammar. if you specified "term" as a single rule, it would one big honking alternation of things that can be terms in Perl 6. | 09:17 | |
sirrobert: but with protoregexes, you say "proto token term {*}", and then you can specify all the alternatives individually after that. | 09:19 | ||
like, "token term:value", and "token term:colonpair". | |||
and it's an open-ended set, so inheriting grammars can easily add to that. | |||
sergot | hi! o/ | ||
masak | sergocie! \o/ | 09:20 | |
tadzik | oh hi | ||
sergot | \o/ | ||
masak | and the LTM treats each of these alternatives as part of one big alternation, and builds efficient NFAs based on that. | ||
jnthn | The NFAs look very much like the NFAs an alternation gives too :) | 09:21 | |
masak | well, because protoregexes are essentially alternations lifted to the rule level. | 09:23 | |
there's a shudder-inducingly nice strange consistency there between proto methods and proto regexes. | |||
it's just that a "method call" to a rule involves matching text using the LTM. | 09:24 | ||
09:25
mucker joined
|
|||
jnthn | .oO( it was shudder-incuding 'cus I had to redo multi dispatch... ) |
09:26 | |
09:26
am0c left
09:27
ChoHag left
|
|||
masak | jnthn: you had to redo multi dispatch because of LTM? | 09:27 | |
jnthn | masak: I had to redo multiple dispatch because the meaning of proto changed to look more like what proto means in regexes | ||
masak: It hadn't used to be so strangely consistent. | |||
That was one of the (many) changes that happened in the nom branch | 09:28 | ||
masak | right. | 09:30 | |
I hardly remember what proto usedta mean by now. but I remember liking the change. | |||
jnthn | Most people like it overall, I think. Only the change of meaning of .+ and .* was not always liked. | 09:31 | |
masak | oh, right. | 09:34 | |
yes, they seem to have gotten less useful after that. | |||
jnthn | Well, depending on what you want. | ||
09:37
Moukeddar joined
|
|||
Moukeddar | o/ perl6 | 09:38 | |
is masak traveling or something ? | |||
masak | no, I'm here. | 09:39 | |
just busy. | |||
09:39
dayangkun left
09:41
Moukeddar left
|
|||
mathw_ | hello!! | 09:41 | |
09:42
mathw_ is now known as mathw
|
|||
masak | mathw_! \o/ | 09:42 | |
mathw | hi masak | ||
09:43
dbr joined
|
|||
tadzik | hello mathw | 09:44 | |
jnthn | hi, mathw | ||
mathw | hello awesome people | 09:45 | |
especially awesome Sir jnthn of the Debugger. | |||
jnthn | mathw: You tried it? | ||
mathw | it made colours :) | 09:51 | |
I only tried it a little bit | 09:52 | ||
jnthn | :) | ||
mathw | but it's so good to know it's there | ||
jnthn | After I first demo'd it at YAPC, somebody told me afterwards they thought I had to be faking the demos. :D | 09:53 | |
tadzik | :) | 09:55 | |
09:56
Gesh left
09:59
Gesh joined
|
|||
FROGGS__ | jnthn: its just to good to be true | 10:07 | |
but I already tried it ;o) | |||
10:11
snearch joined,
dayangkun joined
10:12
snearch left
10:17
scott__ left,
dayangkun left
|
|||
GlitchMr | gist.github.com/e5ac91f3edb75a4d4891 | 10:19 | |
I was bored. | |||
FROGGS | whats that xBBxF6xAB for? | 10:23 | |
GlitchMr | We have robots.txt, so why not humans.txt? | ||
(ok, this is too silly to be on actual site) | 10:24 | ||
huf | FROGGS: unicode art for the butterfly, see also topic | 10:29 | |
GlitchMr | perl6: gist.github.com/e5ac91f3edb75a4d4891 | 10:31 | |
p6eval | niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===Confused at /tmp/9q4XfcY5MO line 1:------> https⏏://gist.github.com/e5ac91f3edb75a4d4891Undeclared routine: 'https' used at line 1Parse failed» | ||
..rakudo 962b9b: OUTPUT«===SORRY!===Confusedat /tmp/v0PHLoUe6a:1» | |||
GlitchMr | huh? | ||
I accidentally made it private? | 10:32 | ||
gist.github.com/3608429 | 10:33 | ||
perl6: gist.github.com/3608429 | |||
p6eval | rakudo 962b9b: OUTPUT«This site owes its existence to* Carl Mäsak (design, content, constructive bikeshedding)* Carlin Bingham (pedantic bug fixing)* Daniel Ruoso (content, design fixes)* Daniel Wright (perl6.org domain)* Herbert Breunung (minor content)* Larry Wall (Perl, Perl 6,… | ||
..niecza v21-1-ga8aa70b: OUTPUT«This site owes its existence to* Carl Mäsak (design, content, constructive bikeshedding)* Carlin Bingham (pedantic bug fixing)* Daniel Ruoso (content, design fixes)* Daniel Wright (perl6.org domain)* Herbert Breunung (minor content)* Larry Wall (Perl,… | |||
GlitchMr | Good :) | ||
FROGGS | huf: thanks | 10:34 | |
GlitchMr | But I don't like this Camelia | ||
It uses ISO-8859-1 characters | 10:35 | ||
But that's probably a feature | |||
huf | hmm? | 10:37 | |
it's in utf8 | |||
GlitchMr | But can be written in ISO-8859-1 | ||
huf | so? | ||
so can the letter P | 10:38 | ||
FROGGS | or the letters [GlitchMr] | ||
GlitchMr | I guess that >>o<< is in utf8 too | ||
(well, technically it is) | |||
huf | are you talking about the charset or the encoding here? | 10:39 | |
i dont see how the word "technically" enters into this\ | |||
GlitchMr | encoding, charset, whatever | 10:40 | |
huf | there's no case where those two things can be whatevered\ | 10:41 | |
>>o<< is absolutely in utf8. | |||
10:42
am0c joined,
skids joined
|
|||
GlitchMr | Or perhaps >>o"<< as Camelia alterantive | 10:42 | |
Or perhaps >>`o`<< | 10:43 | ||
huf | here, o: is the accepted substitute for ö | ||
but that's not very visually appealing | |||
Timbus | >>(ºдಠ)<< | 10:46 | |
catch the butterfly! `` (ノ ゜Д゜)ノ ` »ö« | 10:52 | ||
(ノ;゚Д゚)ノ»ö« ᴾᵁᵀ ᴹᴱ ᴰᴼᵂᴺ | 10:53 | ||
10:54
MayDaniel joined
|
|||
GlitchMr | Timbus: I'm not sure if this is feature, but $ev.what contains \r at end | 10:54 | |
Timbus | rrreally? | 10:55 | |
odd i never noticed that | |||
masak | doesn't sound like a feature... | 11:01 | |
Timbus | not sure where the \r is coming from then | 11:03 | |
perl -e 'print "test\r\n"' | perl6 -e 'say get.perl' | |||
GlitchMr | IRC server sends \r\n | ||
But Perl 6 only chomps \n | |||
Probably because it's UNIX or something | |||
Timbus | but | 11:04 | |
GlitchMr | Hmmm... but yeah, it's weird | ||
Timbus | or is the shell eating the \r | ||
GlitchMr | glitchmr@feather ~/SixtySixBot> cat factoids | 11:05 | |
{ "future" : "The future is already here \u00e2\u0080\u0094 it's just not very evenly distributed.\r" } | |||
Possibly... | |||
Also, binary data in JSON :P | |||
11:05
daxim joined
|
|||
GlitchMr | gist.github.com/3608585 | 11:05 | |
Just wondering, how can I initialize variable basing on other variable? | |||
I've | 11:06 | ||
has $.file; | |||
has %!content = try { from-json slurp $.file } // {}; | |||
But %!content tries to read $.file, so it doesn't work | |||
hoelzro | GlitchMr: maybe initialize %!content in BUILD? | ||
GlitchMr | Not really | 11:08 | |
$.file is Any in BUILD for some reason | 11:09 | ||
oh, it's submethod, not method | |||
Timbus | it's initialized after build | ||
or is that a lie | 11:10 | ||
GlitchMr | gist.github.com/3608610 | ||
Timbus | yeah | 11:11 | |
GlitchMr | Am I doing something wrongly? | ||
Timbus | you're making the same mistakes i made. | 11:12 | |
GlitchMr | When Perl 6 is making OOP easier, overloading .new is still complicated ;) | 11:14 | |
FROGGS | dont you have to access attributes from inside the class with exclamation mark instead of dot? | ||
GlitchMr | Exclamation mark is for private attributes | ||
Timbus | i think the solution was a custom new | ||
or, grab '$file' in build as a parameter and use that instead of $.file | 11:15 | ||
11:15
xinming left
|
|||
FROGGS | IMO you just use the dot when declaring the attrib | 11:15 | |
do you wanna pass $.file to new() ? | 11:16 | ||
GlitchMr | Yes | ||
11:16
MayDaniel left
|
|||
GlitchMr | Also, gist.github.com/3608623 | 11:16 | |
11:17
xinming joined
|
|||
GlitchMr | (by the way, prefix thing is worst hax ever) | 11:17 | |
Timbus | lol, oh i see | 11:18 | |
yeah i wouldn't rely on that | |||
FROGGS | try that: gist.github.com/3608624 | ||
fiddled around with this stuff this weekend | 11:20 | ||
GlitchMr | Works | ||
FROGGS | cool | ||
try using the dot instead of ! | |||
shoudnt work | 11:21 | ||
GlitchMr | 13:21:40 @GlitchMr | 66, add camelia »ö« | ||
13:21:44 @GlitchMr | 66, camelia | |||
13:21:44 SixtySixBot | GlitchMr: »ö« | |||
Good | 11:22 | ||
Timbus looks at FROGGS gist | |||
uh.. | |||
hm | |||
something about that feels wrong but im not savvy enough to pick it | 11:23 | ||
FROGGS | about what exactly? | ||
GlitchMr | { "future" : "The future is already here \u00e2\u0080\u0094 it's just not very evenly distributed.\r", "camelia" : "\u00c2\u00bb\u00c3\u00b6\u00c2\u00ab\r" } | ||
Except I still have weird \r | |||
FROGGS | whats your $*OS ? | 11:24 | |
11:25
tokuhiro_ joined
|
|||
GlitchMr | It's feather dev server | 11:25 | |
But it reports "linux" | |||
FROGGS | k | ||
I was thinking you might use macos | |||
GlitchMr | Would Perl 6 even compile on Classic Mac OS ;)? | 11:26 | |
daxim | people still use classic? | ||
FROGGS | well, I guess | ||
GlitchMr | I'm not sure, but today Perl 6 is used on two platforms - Unix-like and Windows | 11:28 | |
Timbus | FROGGS, i think what I don't like is the 'new' method. you can just remove it and use .new(file => $filename) | ||
FROGGS | my guess was that say using os specific line endings, and print will not | ||
Timbus | which is far more perl6ish | ||
FROGGS | Timbus: but what if I dont want named params? | 11:29 | |
like DateTime.new | |||
give it something, and according to its type it does some magic or not | |||
GlitchMr | But perhaps in future Perl 6 will support platforms like VMS or Android ;) | ||
(ok, Android is sort of Unix, I know) | |||
FROGGS | I believe Android is already supported somehow | 11:30 | |
11:30
crazycow joined
|
|||
GlitchMr | Without Debootstrap? | 11:30 | |
FROGGS | no idea | ||
GlitchMr | But, I guess it's possible | 11:31 | |
I already have Perl 5 on my Android phone | |||
FROGGS | cool, is there a howto to do that? | 11:32 | |
I thought the Android support got stuck in 2008 | 11:33 | ||
GlitchMr | code.google.com/p/perldroid/wiki/Compiling5160 | 11:34 | |
I've Perl on unrooted phone BTW ;) | 11:36 | ||
FROGGS | cool cool cool | ||
I always wanted to do that | |||
porting my games to my phone ;o) | |||
GlitchMr | I also have bash, vim, busybox and mc :) | 11:39 | |
FROGGS | mc++ | ||
*g* | |||
thats always the first thing I install on my boxes | |||
so you are able to use cpan on it? | |||
GlitchMr | Well, pure Perl modules work | 11:40 | |
FROGGS | great | ||
of course it wont compile xs stuff | |||
GlitchMr | Well, if you would install C compiler... possibly | ||
FROGGS | but I have to find a way to load libs somehow | ||
GlitchMr | Not that I have space for that on my device | ||
Every executable is on /data partition | 11:41 | ||
I want this to work without rooting, so I cannot make ext2 partition on SD card or anything like that | |||
But if you have rooted phone, I guess you can try making ext2 partition on SD card or something | 11:42 | ||
11:44
ChoHag joined
|
|||
FROGGS | hmmm, I'll give it a try and let you know... | 11:44 | |
GlitchMr | dl.dropbox.com/u/63913412/SC20120903-134346.png | 11:45 | |
tadzik | Perl 5 runs natively on my phone, but it's 5.8.6 or something | ||
GlitchMr | I also found this screenshot on my Dropbox: dl.dropbox.com/u/63913412/android.png | 11:46 | |
11:47
gongyiliao joined
11:58
ivan`` left
12:01
ivan`` joined
|
|||
cognominal | r: my $rxa = /a/; my $rx = / $rxa /; say 'match' if 'a' ~~ $rx; say $<rxa> | 12:04 | |
p6eval | rakudo 962b9b: OUTPUT«matchAny()» | ||
cognominal | By similarity with grammars, I would expect $<rxa> to return 'a'. Am I wrong? | 12:05 | |
jnthn | Yes | 12:06 | |
You need to explicitly capture it | |||
cognominal | ok, that's fine by me. | ||
I wanted to be sure that was intended behavior | 12:07 | ||
Sep 03 05:24:53 <sorear>o/ cognominal | 12:14 | ||
\o sorear and every one | |||
moritz | o/ | 12:24 | |
moritz at his first day at $new_work | 12:25 | ||
brrt | \o moritz | ||
what kind of $new_work | |||
probably not construction, but thats just me guessing | 12:26 | ||
moritz | perl 5 programming | ||
pmichaud | ...people still use that? ;-) | 12:27 | |
masak | those Perl 5 people are desperate. they put big fives on their conf shirts just so that people will take notice. | 12:28 | |
moritz: have the appropriate amount of new work ;) | 12:29 | ||
moritz | masak: takk :-) | 12:30 | |
masak sings New Work, New Work | 12:32 | ||
12:32
zby_home_ joined
12:38
skids left
12:48
Timbus left,
Timbus joined
12:50
JimmyZ joined
12:53
Cofyc joined
12:55
PacoAir joined
|
|||
TimToady | funny to call it jet *lag* when it makes you wake up several hours early... | 13:10 | |
13:11
Cofyc left
|
|||
jnthn | heh :) | 13:14 | |
FROGGS | TimToady: I call them Aaron or David when I wake up hours earlier ;o) | 13:18 | |
but, hey, just 16 years to go -.- | |||
13:20
jaldhar joined
13:29
FROGGS left,
FROGGS__ left
13:34
fhelmberger left
13:37
bbkr joined
|
|||
bbkr | perl6 -e '-1' # should this code work as in p5 ? in latest star it breaks because it thinks −1 is an option. | 13:39 | |
with "Option -e needs a value, but is followed by an option" error | |||
moritz | bbkr: that's an error, please submit a bug report for it | 13:40 | |
masak | bbkr++ | ||
bbkr reports | 13:41 | ||
13:41
crazycow left,
wk left
13:43
Circlepuller_ joined
|
|||
jnthn | stockholm & | 13:45 | |
13:45
Circlepuller left
13:48
ast left
14:01
felher left
|
|||
masak | sometimes the simplest path to solving a problem is to translate it to a different model, solve it there, and translate back. | 14:05 | |
14:06
whiteknight joined
|
|||
masak | I wish there were more tools in modern programming languages for doing this three-step thing. | 14:06 | |
flussence | .oO( /usr/bin/schwartz ) |
14:08 | |
masak | yes, the Schwartzian transform is a good example of this. there are many more. | 14:09 | |
TimToady | transform Perl 5 design to Perl 6 design, fix Perl 6, backport to Perl 5 | 14:10 | |
flussence | :D | ||
masak | ;) | ||
14:11
sisar joined,
felher joined
|
|||
sisar | o/ #perl6 ! | 14:11 | |
masak | sisar! \o/ | ||
estrai | hi, I heard some rumors about plans to put Perl6 on JVM, is there any truth in that, if yes is there a space that has more details? | ||
masak | for example, if I want to add an index before the first heading of an HTML document, created out of all the headings in that document... I'd much rather solve the text matching/rewriting problem as a tree rewriting problem. | ||
estrai: interesting, you're the second person to ask in less than 48 hours. is there some source of information about this that we don't know about? | 14:12 | ||
bbkr | std: q…say # is this STD bug (should be interpreted as .say on empty quoted string) or Rakudo bug (because it accepts this syntax)? | ||
p6eval | std 2f65afc: OUTPUT«===SORRY!===Couldn't find terminator … at /tmp/AcvWJzAI7G line 1 (EOF):------> do bug (because it accepts this syntax)?⏏<EOL>Parse failedFAILED 00:00 40m» | ||
masak | estrai: (yes, there are plans to make Rakudo target multiple VMs.) | ||
bbkr | r: q...say | ||
p6eval | rakudo 962b9b: OUTPUT«» | ||
masak | std: q...say | 14:13 | |
p6eval | std 2f65afc: OUTPUT«ok 00:00 40m» | ||
bbkr | estrai \o/ | ||
estrai | masak: my source is someone who went to YAPC | ||
masak | bbkr: I see no conflict there between STD and Rakudo. | ||
flussence | looks like q..\ .say to me. | ||
masak | estrai: ok. yes, that was discussed at YAPC::Europe. | ||
flussence: it is. | 14:14 | ||
flussence | r: q․.․.say | 14:15 | |
p6eval | rakudo 962b9b: OUTPUT«.» | ||
bbkr | nvm, my stupid IRC client changed 3x dot to tripple dot char :) | ||
.u ... | 14:16 | ||
phenny | U+0020 SPACE ( ) | ||
U+0021 EXCLAMATION MARK (!) | |||
U+0022 QUOTATION MARK (") [...] | |||
masak | bbkr: maybe switch to a less stupid IRC client? | 14:19 | |
daxim | loldium | 14:21 | |
14:22
am0c left
14:25
bbkr left
|
|||
estrai | masak: is there any other information available, ie conclusion of the discussions / anyone working on JVM implementation? | 14:28 | |
masak | estrai: well, here's what's going on. Rakudo has needed to be prepared for other VMs. part of that has been removing (Parrot-specific) PIR from the project. if I'm not mistaken, the last big bit was removed with the last branch, toqast, on Rakudo. | 14:29 | |
there's a corresponding toqast branch in nqp (on which Rakudo is built) that also needs to land. | 14:30 | ||
but these are just the last refactors in a long line of refactors leading up to being positioned for VM independence. | |||
I'm less clear what needs to be done now, beyond "port nqp to another VM". | 14:31 | ||
[Coke] | Didn't toqast in nqp just land this weekend? | ||
masak | oh, maybe. | ||
14:31
FROGGS__ joined
|
|||
masak has been distracted lately :) | 14:31 | ||
14:31
tokuhiro_ left
|
|||
gfldex | Merge latest master into toqast. jnthn authored 2 days ago | 14:32 | |
[Coke] does dislike that artifact of git merging. | 14:33 | ||
"but I'm IN maste... oh." | 14:34 | ||
flussence | merges should go one direction, rebases for the other | ||
estrai | that's really nice, thanks alot for the info | 14:35 | |
14:39
kaare_ joined,
smash joined
|
|||
moritz | eeks, the code I'm inheriting doesn't use whitespace after a comma | 14:40 | |
timotimo | huh,is that a problem? | 14:41 | |
colomon | timotimo: for legibility, yes. | ||
moritz | timotimo: only if I want to read the code, or write new code that follows the same "style" | 14:42 | |
colomon | anyone have a clue why token reverse_solidus { '\' } is a Malformed regex ? | ||
timotimo | i inherited some c++ code where all code was put into the class definitions inside the header file ... only benefit i saw from it was that the makefile is really simple. | ||
14:43
integral left
|
|||
colomon | oh, '\' is an exception to the norm? | 14:43 | |
14:43
integral joined,
integral left,
integral joined
|
|||
timotimo | wouldn't it be fairly straightforward to have an automated program fix the comma issue? | 14:43 | |
moritz | colomon: because the \ escapes the ' | ||
colomon | moritz++ | ||
moritz | timotimo: separate class definition doesn't work if you use templates | 14:44 | |
timotimo | yeah, but the code hardly does use templates at all | ||
as in: declares three different template classes in one file, but uses the same convention for all other files as well | |||
well, i shall not rant about other peoples' code too much. my own code is far from perfect as well :) | 14:45 | ||
14:46
skids joined
14:47
sftp joined
14:48
ChoHag left
14:49
ChoHag joined
14:55
FROGGS__ is now known as FROGGS
14:56
xinming left,
ChoHag left
14:57
ChoHag joined
|
|||
masak idly wonders if work has been done to automatically derive a grammar from a sufficiently well-specified class hierarchy with .Str methods | 14:58 | ||
14:58
xinming joined
|
|||
timotimo | do i misunderstand something here? wouldn't that require .Str to be essentially a reversible function? | 15:00 | |
15:00
Guest2527 left
|
|||
timotimo | i would understand if you meant a .FromStr method or something like that | 15:01 | |
arnsholt | masak: What are you thinking of? | ||
This may or may not be related to my academic speciality =) | 15:02 | ||
masak | arnsholt: having, say, an XML grammar be deduced from the class hierarchy of Element, Attribute, ProcessingInstruction, etc, and the way they can contain each other and serialize into XML. | 15:08 | |
arnsholt: that is, directly using the fact that XML parsing and XML serialization are (or should be) inverse operations. | 15:09 | ||
15:09
araujo left
15:21
araujo joined,
araujo left,
araujo joined
15:23
lumi_ left
15:26
thou joined
15:28
xinming left
|
|||
colomon is off on a new project for $work: github.com/colomon/perl6-ISO_10303-21 | 15:29 | ||
15:29
xinming joined
15:30
erkan left
15:31
erkan joined
|
|||
masak | hm, STEP? | 15:33 | |
oh, product manufacturing information. | |||
15:34
hoelzro is now known as hoelzro|away,
BlueT_ left
|
|||
colomon | masak: CAD files | 15:37 | |
masak | aha. | 15:38 | |
MikeFair | I'd like to do something like: say("$/") in a rule to find out what got passed into it. What can I do inside the regex to make that happen? I read somewhere that $/ isn't valid in the middle of the match and my attempts have so far yielded nothing but an empty string (despite that there is a match string it is operatng on). I'm just having a really hard time getting this expression right (and it seems like it should be so | ||
easy!) | |||
colomon | masak: and by far the most ridiculously over-wrote CAD specification I've seen. basically it's thousands of pages of class definitions without ever stopping to tell you how the classes are intended to be used. | 15:39 | |
moritz | { say "$/" } | ||
should work inside a rule | |||
that shows how much has been matched until that point | |||
colomon | masak: my current goal is a tool to help me reverse engineer STEP files. | ||
MikeFair: have you looked into the grammar debugger? | 15:40 | ||
MikeFair | moritz: Yeah I thought that was it, that's yielding blank for me (this is also parrot's compiler toolkit, so it's NQP) | ||
moritz | MikeFair: well, works in rakudo :-) | ||
MikeFair | moritz: :) | 15:41 | |
moritz | parrot's NQP is pretty old by now | ||
masak | r: "fafafa blob" ~~ / ([f.]+) { say $/ } \s* blob /; say ?$/ | 15:42 | |
p6eval | rakudo 962b9b: OUTPUT«「fafafa」 0 => 「fafafa」True» | ||
15:42
ponbiki joined
|
|||
MikeFair | colomon: yes, there's also some --trace options, but I can't seem to figure out what those are either | 15:42 | |
15:42
BlueT_ joined
|
|||
colomon | MikeFair: yeah, I'm sure the debugger doesn't work in NQP. | 15:43 | |
dalek | d: 0c2b471 | larry++ | viv: allow variables for /$start ~ $stop <thing>/ |
15:46 | |
d: 6b2f25b | larry++ | CursorBase.pmc: support <hexdigit> |
|||
d: e191c3c | larry++ | STD_P5.pm6: more cclass and tr cleanup; parse \xffabc right |
|||
masak | it's nice to see development on STD_P5.pm6. TimToady++ | 15:48 | |
15:52
am0c joined
|
|||
MikeFair goes about doing what it takes to upgrade nqp! :) | 15:55 | ||
15:56
zby_home_ left,
zby_home_ joined,
zby_home_ left
15:58
JimmyZ left
|
|||
arnsholt | masak: Right. Well, if all you have are the Str methods, you're sort of into run-time properties of code without running it land | 16:00 | |
(And the associated theorem whose name I keep forgetting) | |||
masak | *nod* | ||
yeah, I think I'm looking for something more static-analyzingly than that. | |||
16:01
brrt left
|
|||
arnsholt | An active research field in NLP is inducing a grammar for a language solely from running text, but that's different =) | 16:02 | |
skids | r: sub f (::T $g) { for ($g) -> T $h { } }; f("blah"); | 16:04 | |
p6eval | rakudo 962b9b: OUTPUT«Nominal type check failed for parameter '$h'; expected T but got Str instead in sub f at /tmp/nyEXnQAEAB:1 in block at /tmp/nyEXnQAEAB:1» | ||
masak | superstitious parentheses around $g... | 16:06 | |
...but weird error. T should contain Str, no? | 16:07 | ||
r: sub f (::T $g) { say T.^name }; f("blah") | |||
p6eval | rakudo 962b9b: OUTPUT«Str» | ||
masak | r: sub f (::T $g) { for $g -> T $h {} }; f("blah") | ||
p6eval | rakudo 962b9b: OUTPUT«Nominal type check failed for parameter '$h'; expected T but got Str instead in sub f at /tmp/QgoutP45wf:1 in block at /tmp/QgoutP45wf:1» | ||
masak | weyrd. | ||
skids | I do manage to run into some of the weirder ones, yes. :-) | 16:08 | |
masak | r: sub f (::T $g) { say $g ~~ Str; say $g ~~ T; say Str ~~ T }; f("blah") | 16:11 | |
p6eval | rakudo 962b9b: OUTPUT«TrueTrueTrue» | ||
masak | r: sub f (::T $g) { for $g -> $h { say Str ~~ T } }; f("blah") | ||
p6eval | rakudo 962b9b: OUTPUT«True» | ||
skids | it only happens in the for signature, every other place it works. | 16:12 | |
masak | r: sub f (::T $g) { for $g -> $h where { say Str ~~ T } {} }; f("blah") | ||
p6eval | rakudo 962b9b: OUTPUT«True» | ||
masak | curious. | ||
skids: mind if I submit a rakudobug? | |||
skids | please, thank you | ||
masak submits rakudobug | |||
16:21
erkan left,
erkan joined,
erkan left,
erkan joined
|
|||
arnsholt | masak: Rice's theorem | 16:25 | |
That's the name =) | 16:26 | ||
masak | oh, right. | 16:30 | |
"It's undecidable whether a function has a certain property." | 16:31 | ||
dalek | ast: 1312772 | larry++ | S32-list/sort.t: can't use placeholders in a hash subscript |
16:34 | |
16:39
s1n left
16:40
s1n joined
|
|||
arnsholt | That's the one. For some values of function and property I'm unable to make out from the Wikipedia article | 16:41 | |
masak | the value of function is "partial function", which means that the domain is too big so the function doesn't map all its values. | 16:43 | |
the value of property is "all non-trivial properties". where trivial is defined as "holds for all partial computable functions, or for none". I don't know exactly what that means. | 16:44 | ||
but that makes it sound like the trivial properties aren't very interesting, and so all the interesting properties fall victim to Rice. | |||
& | |||
arnsholt | Yeah, that's as far as I got | 16:48 | |
16:48
leont joined
16:53
dakkar left
17:14
marmay joined
|
|||
MikeFair | I didn't read it, but that definition of trivial makes it sound like sometest() returns true for either every partial computable function, or no function at all | 17:17 | |
dalek | d: e3d3982 | larry++ | / (2 files): correctly parse currently defined exceptions |
17:18 | |
MikeFair | or more specifically no partial computable function | ||
meaning the non-trivial properties will be true in some functions and not true in others | 17:20 | ||
at least that's my read of the sentence | 17:22 | ||
17:25
gongyiliao left,
am0c is now known as pets,
pets is now known as am0c
|
|||
diakopter | phenny: ask TimToady what results when you request a value of a key that doesn't exist in a hash that stores native ints? | 17:37 | |
phenny | diakopter: I'll pass that on when TimToady is around. | ||
17:39
rindolf joined
|
|||
rindolf | Hi all. | 17:39 | |
diakopter | o/ | ||
rindolf | diakopter: what's up? | 17:50 | |
I watched the "Perl 6 Benchmarks/Optimization" talk by pmichaud on YouTube. It was nice. | 17:51 | ||
Pretty impressive work on optimisations. | |||
GlitchMr | Can I do something like: | 17:52 | |
my $content = slurp('file') || 'File not found' | |||
? | |||
So, if exception will happen, use placeholder value | |||
dalek | ast: 5397065 | larry++ | S10-packages/basic.t: prefer 'can' over [can] (since [can] looks like it might be a character class) |
17:53 | |
ast: e6ba01a | larry++ | S (8 files): remove sigils from | and \ |
|||
GlitchMr | > try {slurp('a')}.perl | 17:54 | |
X::AdHoc.new(payload => "Unable to open filehandle from path 'a'") | |||
X::AdHoc? | |||
I guess that more detailed errors are NYI | |||
17:55
whiteknight left
18:00
fglock joined
|
|||
pmichaud | ...what's with all of the "Perl 6 is out" tweets, I wonder? | 18:00 | |
twitter.com/bufferzone/statuses/242...6144470016 # example | |||
leont | blame reddit | ||
18:00
yves__ left
|
|||
leont | No, it was HN | 18:00 | |
diakopter | oh dear | 18:01 | |
GlitchMr | what | ||
It isn't out | |||
diakopter | not in the sense they think, I'm sure | 18:02 | |
GlitchMr | But why they suddenly started to say "Perl 6 is out" | 18:03 | |
2012.08 is just like 2012.07 | |||
It's still incomplete | |||
Except more complete | |||
pmichaud | yeah, that is what is a little weird... why *this release* to start saying "oh, Perl 6 is out!" | ||
diakopter | news.ycombinator.com/item?id=4469513 | 18:04 | |
GlitchMr | "a useful and usable distribution of Perl 6" | ||
But that was always there | |||
huh? | |||
pmichaud | anyway, I think I'm actually happy with the tweets. Maybe it'll start to counteract the "Perl 6 is vaporware" meme :-) | ||
twitter.com/mrmarksteadman/statuses...0288011264 # another one :-) | 18:05 | ||
GlitchMr | "The title of this submission is in fact totally wrong. Rakudo has quarterly releases. Perl 6 is not finished." | ||
Aren't they monthly? | |||
leont | Star is quarterly, right? | 18:06 | |
pmichaud | it's monthly now | 18:07 | |
we'll go back to quarterly in 2013, likely. | |||
18:07
yves__ joined
|
|||
daxim | to catch up for the lack of releases during some rewrite? | 18:07 | |
leont hopes someone will package it for ubuntu/debian, or makes it easy to build that debian package | 18:08 | ||
pmichaud | it's already packaged | 18:09 | |
we time releases based on development momentum | 18:10 | ||
right now there are a lot of improvements occurring monthly, so we release monthly. If there's less improvement taking place, we'll release quarterly. | |||
__sri | and while you are at it update the one in homebrew ;) | ||
leont | pmichaud: there where are the .debs? | 18:11 | |
pmichaud | launchpad.net/ubuntu/+source/rakudo | 18:12 | |
leont | Those are ancient and older :-/ | ||
pmichaud | oh, you want up-to-date .debs :) | 18:13 | |
leont | (well, maybe the current+1 isn't ancient, but it sure isn't current either) | ||
pmichaud | ubuntu's speed is a lot slower than ours :) | ||
we've talked about publishing our own .debs, yes. | |||
it's a bit tricky, though, because we'd have to publish parrot .debs also | |||
__sri suddenly feels less bad about homebrew only being a month behind | 18:14 | ||
GlitchMr | Well, Ubuntu is supposed to be stable | 18:15 | |
So it includes outdated Perl 6 | |||
pmichaud | and outdated parrot :) | ||
GlitchMr | Ubuntu also includes Perl 5.14.2. Not that it matters, it's still supported. | ||
Perhaps I could make ppa with up-to-date Rakudo, but I don't know | 18:16 | ||
leont | Yeah, I'd love a ppa | ||
My laptop would not be a good place to compile this sort of stuff | 18:17 | ||
GlitchMr | Then I will try learning how to make ppa and make one :) | ||
frettled | When $perl6_implementation is sufficiently stable that spec details don't change significantly within three years, you'll notice that it won't matter much if Ubuntu or Debian are two or three years behind :) | ||
pmichaud | 18:05 <GlitchMr> "The title of this submission is in fact totally wrong. Rakudo has quarterly releases. Perl 6 is not finished." | ||
where did you see that? | |||
I'd like to respond with "The title of this submission is in fact totally wrong. Perl 5 has yearly releases. Perl 5 is not finished." | 18:18 | ||
GlitchMr | pmichaud: 20:04:14 diakopter | news.ycombinator.com/item?id=4469513 | ||
frettled | So right now, I think it would actually be better if these OS distributions did not confuse matters by including even Parrot, but then again, they have had similar issues with e.g. the packaging monstrosity that is ImageMagick earlier. | ||
pmichaud: and thank heavens that neither are finished! | |||
That would be a very, very sad day. | 18:19 | ||
A language is finished the day it lays down to die. | |||
TimToady | rn: $/ = 42; | 18:20 | |
phenny | TimToady: 17:37Z <diakopter> ask TimToady what results when you request a value of a key that doesn't exist in a hash that stores native ints? | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/ciDvp64RYk line 1:------> $/⏏ = 42;Parse failed» | ||
..rakudo 962b9b: ( no output ) | |||
TimToady | rn: $/ := 42; | ||
p6eval | niecza v21-1-ga8aa70b: ( no output ) | ||
..rakudo 962b9b: OUTPUT«===SORRY!===Cannot use bind operator with this left-hand sideat /tmp/ETDtUr1cLN:1» | |||
geekosaur | stable = dead, just as in biology | ||
TimToady | rn: ($/) = 42; | ||
p6eval | rakudo 962b9b: ( no output ) | ||
..niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Writing to readonly scalar at /tmp/23UDmnSYaT line 1 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571)  at /home/p6eval/niecza/lib… | |||
frettled | geekosaur: no, that's completely unlike biology :) | ||
TimToady | r and n still have very different ideas of what $/ is | 18:21 | |
frettled | TimToady: which one is closest to having the right idea? | ||
TimToady | not sure | 18:22 | |
diakopter: you get a fail (note that failures are allowed to violate return type constraints) | 18:23 | ||
GlitchMr | ok, I'm generating GPG key for PPA | 18:24 | |
colomon | r: say "this, is, a, test" ~~ / [\w+]+ % ',' /; | 18:25 | |
p6eval | rakudo 962b9b: OUTPUT«「this」» | ||
colomon | r: say "this, is, a, test" ~~ m:s/ [\w+]+ % ',' /; | 18:26 | |
p6eval | rakudo 962b9b: OUTPUT«「this」» | ||
colomon | n: say "this, is, a, test" ~~ m:s/ [\w+]+ % ',' /; | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«#<match from(0) to(17) text(this, is, a, test) pos([].list) named({}.hash)>» | ||
diakopter | TimToady: so for a hash that's trying to conserve space, the implementation needs to return the value and also mark a success flag, so the language can return the fail as appropriate? | ||
colomon | rn: say "this, is, a, test" ~~ m:s/ [\w+] [',' [\w+]]* / | 18:28 | |
p6eval | rakudo 962b9b: OUTPUT«「this, is, a, test」» | ||
..niecza v21-1-ga8aa70b: OUTPUT«#<match from(0) to(17) text(this, is, a, test) pos([].list) named({}.hash)>» | |||
moritz | sirrobert: you complained lack of docs earlier. Anything in particular that interests you? | ||
pmichaud | r: $/ := 42; # seems to me this should be allowed by rakudo | 18:29 | |
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===Cannot use bind operator with this left-hand sideat /tmp/_mmJdyRgJX:1» | ||
pmichaud | I don't know why Rakudo disallows that. | ||
18:30
daxim left
|
|||
moritz | pmichaud: it's probably more a case of not actively allowing it | 18:31 | |
(just guessing) | |||
sergot++ # feather.perl6.nl/~sergot/modules/ | |||
pmichaud | the error message implies it doesn't know what to do there | 18:32 | |
GlitchMr | oh wait, I don't need GPG key | 18:33 | |
moritz | aye | ||
GlitchMr | or I need | ||
18:34
erkan left,
wk joined
|
|||
pmichaud | I totally cannot find where that exception (X::Bind) is being generated/thrown, either. :-( | 18:35 | |
(the downside to typed exceptions) | |||
moritz | $ ack -w Bind src/Perl6/ | 18:36 | |
pmichaud | oh, it's ['X', 'Bind'] | 18:37 | |
I was looking for X::Bind | |||
moritz | that was from a time before we supported 'X::Bind' | ||
pmichaud | silly me. | ||
sorear | good * #perl6 | ||
moritz | I can change those for better greppability | ||
pmichaud | I wonder if the thrown exception should also display its type, too. | 18:38 | |
moritz | I've been wondering that too | ||
pmichaud | I.e., "(X::Bind) Cannot use bind operator with this left-hand-side" instead of making me grep for the exception message to figure out the exception type | ||
moritz | maybe as doc.perl6.org/type/X::Bind | ||
pmichaud | could be that too. | 18:39 | |
masak | sorear! \o/ | ||
pmichaud files rakudobug. | 18:40 | ||
filed. | 18:41 | ||
lunchtime. | |||
masak | pmichaud++ | ||
18:43
s1n left,
mtk left,
s1n joined,
telex left
18:44
telex joined
18:50
FROGGS_ joined
18:52
mtk joined
|
|||
sorear | o/ FROGGS_ | 18:53 | |
pmichaud | heh... on the other hand, anyone that actually follows the links in the "Perl 6 is released" tweets will land on the rakudo.org page, which is a long sequence of "Rakudo Star 2012.nn released" postings. :-P | 18:54 | |
leont | It's not bad PR | 18:56 | |
pmichaud | agreed; I'm happy for the PR... it's just a little weird. :) | ||
FROGGS_ | hi sorear | ||
pmichaud | okay, I'm afk for robotics meeting -- bbl | 18:57 | |
dalek | ast: 89f0409 | larry++ | S (23 files): warning suppression, mostly "not used" |
18:58 | |
tipdbmp | If I have the: sub flatten(|@array) { ... } # how do I access my elements? Using @array[0, 1, ..., etc] or with the @_[0, 1, ..., etc.]? | 19:02 | |
r: sub flatten(|@array) { say for @array } flatten(1 .. 4); | 19:03 | ||
p6eval | rakudo 962b9b: OUTPUT«Obsolete use of | or \ with sigil on param @array===SORRY!===Confusedat /tmp/Ai1RcTPy0x:1» | ||
tipdbmp | r: sub flatten(|@array) { say for @_ } flatten(1 .. 4); | 19:04 | |
p6eval | rakudo 962b9b: OUTPUT«Obsolete use of | or \ with sigil on param @array===SORRY!===Placeholder variable '@_' cannot override existing signatureat /tmp/WBOW3UJAUa:1» | ||
TimToady | semi required after } | ||
and |@array is wrong now | |||
just use |capture or some such | |||
19:05
araujo left
|
|||
pmichaud | or even just @array | 19:06 | |
TimToady | and you need .say rather than say | ||
tipdbmp | right | ||
pmichaud | r: sub flatten(@array) { .say for @array); flatten(1..4); | ||
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 2, near "); flatten"» | ||
pmichaud | r: sub flatten(@array) { .say for @array }; flatten(1..4); | ||
p6eval | rakudo 962b9b: OUTPUT«1234» | ||
tipdbmp | r: sub flatten(@array) { .say for @array }; my ($a, $b) = 1, 2; flatten($a, $b); | 19:07 | |
p6eval | rakudo 962b9b: OUTPUT«Nominal type check failed for parameter '@array'; expected Positional but got Int instead in sub flatten at /tmp/9MZ0A_Ojvg:1 in block at /tmp/9MZ0A_Ojvg:1» | ||
tipdbmp | r: sub flatten(@array) { .say for @array }; my ($a, $b) = 1, 2; flatten(($a, $b)); | 19:08 | |
p6eval | rakudo 962b9b: OUTPUT«12» | ||
pmichaud | r: sub flatten(*@array) { .say for @array }; my ($a, $b) = 1, 2; flatten($a, $b); | 19:09 | |
p6eval | rakudo 962b9b: OUTPUT«12» | ||
19:09
ivan`` is now known as ^ivan``
|
|||
tipdbmp | r: sub flatte(*@array) { .say for @array }; my @a = 1 .. 4; flatten(@a); | 19:10 | |
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&flatten' called (line 1)» | ||
tipdbmp | r: sub flatten(*@array) { .say for @array }; my @a = 1 .. 4; flatten(@a); | ||
p6eval | rakudo 962b9b: OUTPUT«1234» | ||
masak .oO( flattening won't get you anywhere... ) | 19:16 | ||
19:17
nodmonkey left
|
|||
dalek | d: 9f91d53 | larry++ | / (3 files): oops, that should be xdigit, not hexdigit |
19:33 | |
19:37
araujo joined,
araujo left,
araujo joined
19:39
nodmonkey joined
19:44
sivoais left
19:50
tokuhiro_ joined,
kaare_ left
19:53
fglock left
19:54
snearch joined,
fridim_ joined
19:56
GlitchMr left,
sivoais joined
|
|||
tipdbmp | r: sub flatten($a, $b, $c) { say $a, $b, $c } my @a = 1 .. 3; flatten(|@a); | 20:00 | |
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===Confusedat /tmp/fL9tMJpeL_:1» | ||
tipdbmp | r: sub flatten($a, $b, $c) { say $a, $b, $c } my @a = 1 .. 3; flatten(@a); | 20:01 | |
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===Confusedat /tmp/FtQom_Fi_P:1» | ||
diakopter | add a semicolon after the } | ||
tipdbmp | r: sub flatten($a, $b, $c) { say $a, $b, $c; } my @a = 1 .. 3; flatten(@a); | ||
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===Confusedat /tmp/64p2atdSSG:1» | ||
diakopter | *after, not before | ||
tipdbmp | r: sub flatten($a, $b, $c) { say $a, $b, $c }; my @a = 1 .. 3; flatten(@a); | 20:02 | |
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===CHECK FAILED:Calling 'flatten' will never work with argument types (Positional) (line 1) Expected: :($a, $b, $c)» | ||
tipdbmp | r: sub flatten($a, $b, $c) { say $a, $b, $c }; my @a = 1 .. 3; flatten(|@a); | ||
p6eval | rakudo 962b9b: OUTPUT«123» | ||
tipdbmp | tnx | ||
r: sub flatten($a, $b, $c) { say $a, $b, $c }; flatten(|1 .. 3); | 20:04 | ||
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&prefix:<|>' called (line 1)» | ||
tipdbmp | r: sub flatten($a, $b, $c) { say $a, $b, $c }; flatten(|(1 .. 3)); | ||
p6eval | rakudo 962b9b: OUTPUT«123» | ||
diakopter | n: sub flatten($a, $b, $c) { say $a, $b, $c }; flatten(|(1 .. 3)); | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method Capture in type Range at /tmp/mbgNOO8jQI line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571)  at /ho… | ||
20:05
MayDaniel joined
20:07
SamuraiJack left
|
|||
diakopter | I didn't see a Perl 6 Report in the last few days: blogs.perl.org/users/perl_6_reports/ | 20:09 | |
sorear | that's been commented yesterday | 20:12 | |
diakopter | ok | ||
FROGGS_ | hey, my name is on that page \o/ | ||
now I'm famous ;o) | 20:13 | ||
20:15
sisar left
20:33
leont left
20:34
leont joined
20:41
marmay left
20:44
Chillance joined
21:02
snearch left
|
|||
jnthn | evening o/ | 21:07 | |
mathw | oh hai jnthn | ||
FROGGS_ | r: my $thing = ( sub( $a ){ ... } ); $thing.(7) | 21:10 | |
p6eval | rakudo 962b9b: OUTPUT«===SORRY!===Variable $a is not declaredat /tmp/ZXLAojGplz:1» | ||
FROGGS_ | how can I declare a? | ||
jnthn | you need a space after the word sub | 21:11 | |
FROGGS_ | r: my $thing = ( sub ( $a ){ ... } ); $thing.(7) | ||
p6eval | rakudo 962b9b: ( no output ) | ||
FROGGS_ | ohh | ||
nice | |||
thanks | |||
jnthn | Otherwise it interprets it as a function call | 21:12 | |
FROGGS_ | I see | ||
masak | jnthn! \o/ | 21:16 | |
21:33
tokuhiro_ left
21:38
MikeFair left
21:39
MikeFair joined
|
|||
lizmat | from doc.perl6.org: | 21:42 | |
infix orelse | |||
Returns the first undefined argument, or else the last argument. Short-circuits | |||
s/undefined/defined ??? | |||
sorear | lizmat: that sounds like the documentation for "infix andthen" | 21:44 | |
maybe they got swapped | |||
lizmat | copy/paste error, I would think | 21:45 | |
Same as infix //, except with looser precedence. | |||
(for infix orelse) | |||
sorear | that's the correct definition of infix orelse | 21:46 | |
lizmat | so, for clarity: infix orelse returns first *defined* argument, right? | 21:47 | |
diakopter | I don't know whether it must check the last one for definedness.. sorear? | 21:48 | |
lizmat | not according to the doc: or else the last argument | 21:49 | |
diakopter | right, I agree with you it implies you don't have to check the last one | 21:50 | |
masak | the point of 'orelse' (just as with '||' and 'or' and '//') is that it thunks. | ||
if that's what you're asking. | |||
diakopter | huh? | 21:51 | |
masak | S03's definition is like this: | ||
Returns the first argument that evaluates successfully (that is, | |||
if the result is defined). Otherwise returns the result of the | |||
right argument. | |||
sorear | diakopter: you're right that when passing N arguments to orelse, you only need N-1 definedness checks | ||
lizmat | so the doc is incorrect | ||
sorear | diakopter: but that's material for _Implementing Perl 6_, not the userdocs | ||
lizmat has a patch ready to push with s/undefined/defined | 21:53 | ||
diakopter | I disagree; someone who hasn't learned about vivifying might be misled | ||
lizmat | infix // | ||
Defined-or operator. Returns the first defined operand. Short-circuits. | |||
infix orelse | 21:54 | ||
Same as infix //, except with looser precedence. | |||
Returns the first undefined argument, or else the last argument. Short-circuits. | |||
TimToady | note that 'andthen' and 'orelse' have complementary topicalizing behavior as well, that is supposed to make it easy to write backtrackcing engines using lazy lists like STD does | ||
*tracking | |||
lizmat | so the doc is correct for infix orelse ? | 21:55 | |
TimToady | haven't looked | ||
lizmat | "Returns the first undefined argument, or else the last argument. Short-circuits." | ||
is what it says now at the bottom of doc.perl6.org/language/operators | 21:56 | ||
TimToady | that much is true | ||
21:56
stepnem left
|
|||
TimToady | but it also sets $! to the undefined left side when evaluating the right side | 21:56 | |
lizmat | so "infix orelse" is *not* the same as "infix //" | ||
TimToady | it has additional behavior | 21:57 | |
so does 'andthen' | |||
lizmat | as infix // returns the first *DEFINED* operator, and infix orelse returns the first *UNDEFINED* operator | ||
according to the doc | |||
TimToady | 'orelse' is not the same as p5's 'dor' | ||
21:57
average_drifter left
21:58
average_drifter joined
|
|||
lizmat | but infix // is the same as p5's // ? | 21:59 | |
masak .oO( d'or! ) | |||
TimToady | yes | ||
(except for where p6 defined definedness differently) | |||
refs are always true in p5, and that's not so in p6 | |||
21:59
cognominal left,
cognominal_ joined
|
|||
sorear | npr: while 1 -> $x { last given 5 }; say $_ | 22:00 | |
p6eval | pugs: OUTPUT«*** Cannot bind to non-existing variable: "$x" at /tmp/Gp1kADXx7H line 1, column 1» | ||
..niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/7iTOHxH4Gq line 1:------> while 1 -> ⏏$x { last given 5 }; say $_Any()» | |||
..rakudo 962b9b: OUTPUT«Any()» | |||
sorear | npr: (sub () { my $x; $_ = 2; while 1 -> $x { last given 5 }; say $_ })() | ||
p6eval | rakudo 962b9b, pugs: OUTPUT«2» | ||
..niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/YYdxZsjm7S line 1:------> (sub () { my $x; $_ = 2; while 1 -> ⏏$x { last given 5 }; say $_ })()2» | |||
sorear | huh | ||
lizmat | is there a difference between "infix orelse" and "infix andthen" ? | 22:01 | |
diakopter | rn: my $x; say 1 orelse $x # TimToady, so this is wrong? | ||
sorear | npr: (sub () { my $x; $_ = 2; while 1 -> $x { 5 ~~ last }; say $_ })() | ||
p6eval | rakudo 962b9b, niecza v21-1-ga8aa70b: OUTPUT«1» | ||
rakudo 962b9b, pugs: OUTPUT«2» | |||
..niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/Eoia9I_LRg line 1:------> (sub () { my $x; $_ = 2; while 1 -> ⏏$x { 5 ~~ last }; say $_ })()2» | |||
lizmat | there is not according to the doc on docs.perl6.org | ||
sorear | lizmat: orelse and andthen are opposites | ||
lizmat | then the documentation is incorrect, as they *both* currently state: | 22:02 | |
sorear | npr: (sub () { my $x; $_ = 2; while 1 -> $x { $_ = 5; last }; say $_ })() #OK | ||
diakopter | TimToady: lizmat is asking about a possible typo in the documentation. "undefined" instead of "defined" | ||
p6eval | rakudo 962b9b, niecza v21-1-ga8aa70b, pugs: OUTPUT«5» | ||
sorear | wtf, why isn't this breaking!? | ||
lizmat | "Returns the first undefined argument, otherwise the last argument. Short-circuits." | ||
22:03
mucker left
|
|||
sorear | lizmat: you were right all along, there is a typo in the description of 'orelse'. diakopter and TimToady are making orthogonal points | 22:03 | |
lizmat | ack | ||
pushing fix | |||
dalek | c: 8759962 | (Elizabeth Mattijsen)++ | lib/operators.pod: Fixed copy/paste error in infix orelse documentation |
||
diakopter | sorear: what orthogonal point am I making? | ||
sorear | diakopter wants to make explicit the fact that 'orelse' doesn't call .defined on its rightmost argument | ||
diakopter | that was before the last 4 messages | 22:04 | |
sorear | TimToady wants to make explicit the fact that 'orelse' topicalizes $! | ||
lizmat | should these types of info not be part of the docs? | ||
sorear | rpn: Int orelse say $! | 22:05 | |
p6eval | pugs: OUTPUT«*** No such subroutine: "&orelse" at /tmp/Gocg0GMqW7 line 1, column 5 - line 2, column 1» | ||
..rakudo 962b9b, niecza v21-1-ga8aa70b: OUTPUT«Any()» | |||
sorear | would appear that the $! topicalization is not currently implemented by anyone | ||
TimToady | nobody actually implements that part yet | ||
sorear | should we document stuff that isn't implemented? | 22:06 | |
lizmat | perhaps not… :-) | ||
diakopter | if not, which implementations would have to implement it to qualify | ||
masak | 'night, #perl6 | ||
TimToady | it's not actually as important as having 'andthen' topicalize $_, I think, since one is usually more interested in adding successful constraints than unsuccessful ones | 22:07 | |
lizmat | 'night masak, and 'night #perl6 | ||
TimToady | if STD is any indication, failure just implies backtracking, and you're not usually interested in why it failed | ||
in regex terms, || doesn't usually care why the left side didn't match | |||
22:09
nodmonkey left
22:10
mucker joined
|
|||
TimToady | if you look at the P5 output of STD, there are more than 1000 instances of 'my $C=shift;', generally used to pass in the last candidate (or candidates, if it's a lazy list) | 22:10 | |
those are what are supposed to be replaced by the topicilization of 'andthen' | 22:11 | ||
*cal | |||
those are candidate cursors in the case of STD, but they can be any backtracking choice points | 22:12 | ||
that's how we're trying to get P6 close to the notion of logic programming | 22:13 | ||
it's most of what you need to write a unification engine, I think | |||
just need something resembling junction processing to handle all the threading through binding unbound parameter slots | 22:16 | ||
diakopter | TimToady: does Perl 6 throw an exception if an array or hash is modified by another thread while being iterated? or what? | 22:18 | |
TimToady | we're looking at a single-owner mechanism that might catch that, and perhaps implement rw/readonly params as well | 22:20 | |
it would imply every write operation has to check ownership though | |||
but reads would be free for the non-owner | 22:21 | ||
one could implement an exclusive iterator that claims ownership under that view | |||
diakopter | ok, multiple can iterate | ||
oh | |||
TimToady | but we'd rather push things toward immutable semantics by default | ||
and some things will always just be erroneous, I suspect | 22:22 | ||
diakopter | "we're looking at"..? | ||
TimToady | talked about it at YAPC::EU | 22:23 | |
or maybe it was in Perl, don't remmeber | |||
22:24
MayDaniel left
22:25
average_drifter left
|
|||
diakopter | so.. describe what you're leaning towards | 22:25 | |
22:25
average_drifter joined
|
|||
diakopter | iterators take read locks and a writer waits for a write lock? | 22:26 | |
iterators take read locks and a writer fails on writing? | |||
a 2nd iterator blocks until the first is done? | 22:27 | ||
I guess I need "a single-owner mechanism that might catch that, and perhaps implement rw/readonly params" explained more | 22:29 | ||
TimToady | well, for scalar access, it's simply the owner can write, and anyone else can read (assuming these operations are fast and appear to be atomic) | 22:32 | |
there is more than one model of composite behavior however | 22:33 | ||
you can have transactionally protected iterators that have "snapshot" semantics | 22:34 | ||
diakopter | a lock-free, wait-free, non-blocking hash implementation I saw does that for iteration | ||
er, redundant | 22:35 | ||
TimToady | or you can just say "it's erroneous to modify something that people are iterating through, if that results in inconsistent data" | ||
22:35
rindolf left
|
|||
diakopter | where inconsistent data would mean not seeing one of the keys available at the start of the iteration, or seeing a key twice | 22:36 | |
TimToady | under the single-owner model, you'd handle the transactions by having the transaction manager be the owner for enough of the time to direct traffic | ||
diakopter | if the hash implementation can handle it, can concurrent iterations/writes be allowed? | 22:37 | |
TimToady | or just violating some constraint | ||
"all these things need to add up to 42" | 22:38 | ||
presumably | |||
diakopter | ok; I'll assume the same for the array | 22:39 | |
TimToady | but Perl's hash semantics don't guarantee that | ||
(currently) | |||
one could also set up some kind of generational hash, where an iterator knows which generation it's iteerating and ignores new values | 22:41 | ||
and deleted values don't get GC'd until nobody is interested in that generation anymore | |||
leont | A lock-free hash? I'm not sure it'd be possible, but would more strongly doubt it's performance | 22:42 | |
TimToady | but there are external things that look Associative that we may have difficult enforcing transcational support for | ||
leont | No common architecture has stuff instructions like DWCAS that are necessary to do interesting things in a sane yet lock-free way | 22:43 | |
TimToady | so I'm not sure Associative should imly that by default | ||
and some of these things may be hard on some VMs | |||
diakopter | this looks interesting: www.cs.rice.edu/~javaplt/javadoc/co...shMap.html | 22:44 | |
TimToady | but I do like the owner model, if only because it resembles a capabilities model rather than a prohibitions model | ||
diakopter | ^ public domain | 22:45 | |
leont doesn't like the owner model, TBH | |||
TimToady dislikes the idea of using proxies to prevent writing | 22:46 | ||
when most processing involves reading rather than writing | |||
writes violate immutability, so writes should bear the overhead, not reads | 22:47 | ||
22:47
whiteknight joined
|
|||
TimToady | it's also nicely transitive; if you aren't the owner, you can't give away ownership either | 22:48 | |
leont | diakopter: that link is interesting | 22:49 | |
TimToady | so if we use such a model for parameters, a readonly parameter that you pass down to another routine is still readonly without any extra effort | ||
diakopter | leont: it depends a lot on the semantics of Java's volatile, so I don't know how easy it would be to mimic in another standalone VM | 22:50 | |
also there isn't a way to store ints or floats as values to the keys; only references | |||
leont | It's fairly easy to do C++11, and fairly easy but generally unportable to do in C on most architectures | ||
TimToady | diakopter: an implementation using that might restrict keys to boxed values, I suppose | 22:51 | |
leont | Can't comment on specific VMs though | ||
diakopter | the reason is it depends on sentinels and boxed values as another form of marker | 22:52 | |
sentinels for both keys and values | |||
TimToady | my %foo{int} would be forbidden, but my %foo{Int} okay | ||
diakopter | aww | ||
leont: I'm interested in reading about how to do Java 'volatile' in C - do you have some links? | 22:54 | ||
TimToady | and the owner model accounts for the large majority of bindings being readonly without regard to whether the caller has ownership | 22:55 | |
leont | diakopter: it's essentially using volatiles too, but you only use atomic operations | ||
22:56
xinming left
|
|||
diakopter | leont: ok; thx | 22:56 | |
TimToady | and the default for a readonly binding is to do nothing (other than making sure things are set up that the caller has a different id from the callee) | ||
leont | And sometimes memory barriers too | ||
e.g.: gcc.gnu.org/onlinedocs/gcc-4.1.1/gc...ltins.html | |||
TimToady | and multiple writers can still be handled with proxies that send requests to the actual owner for serialization | 22:58 | |
diakopter | should one try to abstract the atomic operations at the processor level or for particular compilers | ||
22:58
xinming joined
|
|||
leont | C++11 did just that: en.cppreference.com/w/cpp/atomic/atomic :-) | 22:59 | |
diakopter | right, but what should one do in C | ||
processor or compiler | |||
leont | You could do the same, though small differences get annoying. GCC's functions are type-overloaded, MSVC's aren't for example | 23:00 | |
TimToady | C was never a portable language, merely ubiquitous... | ||
diakopter | I wonder if they all support writing 8 bytes on 32-bit | ||
leont | Then again, most of the time you want compare-and-swap on either a pointer or an integer | ||
I wouldn't assume any architecture can write more than its wordsize atomically | 23:03 | ||
23:05
eiro_ joined
23:06
eiro joined
23:09
integral left
|
|||
diakopter | decommute from the lonely office & | 23:11 | |
23:17
Guest8767 joined
23:18
Guest8767 is now known as Stefler
|
|||
Stefler | hi | 23:18 | |
23:19
integral joined,
integral left,
integral joined
|
|||
dalek | rl6-roast-data: 87320dc | coke++ | p (2 files): today |
23:23 | |
rl6-roast-data: dc124df | coke++ | / (4 files): today |
|||
rl6-roast-data: 1684404 | coke++ | p (2 files): today |
|||
rl6-roast-data: f94fc20 | coke++ | p (2 files): today |
|||
rl6-roast-data: d2f35c5 | coke++ | / (4 files): today |
|||
rl6-roast-data: fca7b5f | coke++ | p (2 files): today |
|||
sorear | Stefler: hi | 23:26 | |
23:41
Stefler left
23:44
REPLeffect left
23:46
fridim_ left
23:53
kenjiskywalker joined
|