»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by lichtkind on 5 March 2010. |
|||
jnthn | ooh, that works. :-) | 00:01 | |
diakopter++ | |||
TimToady | sorear: one optimization that STD does there is to not rebuild LTM tables that didn't change from the parent | ||
sjohnson | no alt+\d for me :/ | 00:04 | |
ctrl works hto | |||
tho* | |||
sorear | phenny: tell diakopter : I am conflicted for both #parrotsketch and #rakudosketch. Permanently. Every week. | 00:07 | |
phenny | sorear: I'll pass that on when diakopter is around. | ||
00:09
fengshaun joined
|
|||
diakopter | sorear: oh | 00:11 | |
phenny | diakopter: 00:07Z <sorear> tell diakopter : I am conflicted for both #parrotsketch and #rakudosketch. Permanently. Every week. | ||
spinclad | that's worth making a search for a better time (yet again) (having no idea if there is a better time all around) | 00:16 | |
sjohnson | heh | 00:19 | |
spinclad | (i can be pretty sure there's no _good_ time all around) | 00:23 | |
Tene | #rs is new to me. | 00:24 | |
sorear | actually, not quite permanently; #ps and #rs fall in prime classes time in this timezone | 00:26 | |
so when I leave school I'll probably be free :D | |||
and I can always backlog. | |||
also, RT never processed my reply. | |||
so pmichaud presumably never saw my reply. | 00:27 | ||
00:28
Casan joined
|
|||
sorear | I sent it out seven hours ago to the Reply-To on RT's return mail | 00:28 | |
and ... nothing. | |||
we rely on RT so much, why aren't the BP team lurking here? | |||
diakopter | obra: OUBG | 00:29 | |
ping, I mean | |||
spinclad | (cryptographer deduces QWERTY keyboard) | 00:30 | |
obra | yes? | ||
diakopter | something about RT | ||
obra | rt.perl.org...is not ours. | ||
diakopter forgot (again) | 00:31 | ||
sorear | phenny: tell pmichaud : RT ate my followup, so here - pastie.org/956317 | ||
phenny | sorear: I'll pass that on when pmichaud is around. | ||
obra | they have, among other things, heavy spamfiltering | ||
sorear | obra: Did I send that message to the right address? | ||
00:31
jonrafkind left
|
|||
diakopter | you proably have to retain all the other header fields, like thread id in-reply-to and such | 00:32 | |
sorear | Does RT have a manual? | ||
Trying to guess how it works is very disconcerting | |||
diakopter: I did a full reply | |||
00:33
rgrau_ left
|
|||
obra | just seind a reply is what you want to do | 00:34 | |
00:38
lestrrat is now known as lest_away
|
|||
sorear | obra: Did that seven hours ago, it hasn't appeared on the ticket yet | 00:39 | |
00:40
envi^home joined
|
|||
obra | sorear: the spamfiltering involves quarentine and manual review | 00:41 | |
sorear | Ah. | ||
00:44
yinyin joined
|
|||
ruoso just sent an email about the "object-belongs-to-thread" idea | 00:44 | ||
ruoso hopes to kick-start a more consistent discussion on the threading model... | 00:45 | ||
spinclad | phenny: tell pmichaud i see a race possibility still between when !A1 sets &B's outer_ctx to !A1, (suspends), !A2 does the same, (suspends), !A1 clones &B : #B1 -> !A2 (oops) and later !B1 likewise. | 00:46 | |
phenny | spinclad: I'll pass that on when pmichaud is around. | ||
lue | hello! | 00:48 | |
00:48
envi^home left
|
|||
spinclad | hellue! | 00:48 | |
00:51
orafu left
|
|||
spinclad | phenny: tell pmichaud i don't see a coherent meaning to embedded our's, but what meaning i do see seems to include an ordinary rvalue (at an incoherent time). | 00:51 | |
phenny | spinclad: I'll pass that on when pmichaud is around. | ||
00:51
cdarroch left
|
|||
lue | alpha: my @a=(1,2,3,4); @a[3] := @a[0]; @a[9] = 3; say @a[0] | 00:58 | |
p6eval | alpha 30e0ed: OUTPUT«rtype not setin Main (file <unknown>, line <unknown>)» | ||
lue | why didn't that work? | 01:00 | |
01:00
wknight8111 left
|
|||
sorear | because it's alpha? | 01:04 | |
lue | would it work though? (checking) | ||
std: my @a=(1,2,3,4); @a[3] := @a[0]; @a[9] = 3; say @a[0] | 01:05 | ||
p6eval | std 30618: OUTPUT«ok 00:01 113m» | ||
sorear | it should work, yes | ||
01:05
plobsing joined
|
|||
sorear | hello plobsing | 01:06 | |
Switched to branch 'topic/binding' | 01:07 | ||
let's see. | |||
01:14
plobsing left
01:16
rv2733 left
|
|||
sorear | I think the left hand side of := should *always* be a signature | 01:25 | |
not sure how that interacts with one-pass parsing though. | |||
lue would have to look up what a signature is, then. | 01:30 | ||
01:33
plobsing joined
01:37
lest_away is now known as lestrrat
|
|||
sorear | lue: the stuff you put between () in sub definitions | 01:39 | |
01:42
plobsing left
|
|||
lue | oh. | 01:42 | |
so anything I were to stuff in, say, sin(), becomes a signature (assuming no errors pop up)? | 01:43 | ||
afk | 01:48 | ||
sorear | no | 01:53 | |
anything you were to stuff in sub foo (#`( SIGNATURE GOES HERE )) { ... } | 01:54 | ||
when you call, you pass a Capture | |||
which is the opposite of a signature | |||
01:55
jaldhar_ joined
02:01
pmichaud joined
|
|||
pmichaud | ESTILLNOFEATHER? | 02:01 | |
phenny | pmichaud: 00:31Z <sorear> tell pmichaud : RT ate my followup, so here - pastie.org/956317 | ||
pmichaud: 00:46Z <spinclad> tell pmichaud i see a race possibility still between when !A1 sets &B's outer_ctx to !A1, (suspends), !A2 does the same, (suspends), !A1 clones &B : #B1 -> !A2 (oops) and later !B1 likewise. | |||
pmichaud: 00:51Z <spinclad> tell pmichaud i don't see a coherent meaning to embedded our's, but what meaning i do see seems to include an ordinary rvalue (at an incoherent time). | |||
sorear | Actually, S03 already specs the LHS of := as being a signature | 02:05 | |
02:05
kfo_ joined
|
|||
pmichaud | ...it does?! | 02:05 | |
sorear | S03:1519 | ||
pmichaud | alas, I don't have a current copy of S03, and feather is down :-( | 02:06 | |
.oO( about now is when I wish such things were stored in git instead of svn ) |
|||
02:08
kfo left,
kfo_ is now known as kfo
|
|||
pmichaud | sorear: short answer to your reply (since I seem to be having internet problems) -- #1: instead of cloning !UNIT_START, it can be sensitive to a contextual. #3: no, I don't think this logic belongs in PAST::Compiler -- I think it should go in HLL::Compiler. But ultimately I think the generated PAST should remain the same and then we wrap it appropriately in REPL context. | 02:09 | |
(as opposed to changing it altogether in REPL context) | 02:10 | ||
afk again (sorry) | 02:11 | ||
sorear | Perhaps part of the problem is that my PAST-enlightenment is incomplete. | 02:14 | |
I see PAST as a tree-structure, highly abstracted PIR | |||
You seem to see it as something deeper | |||
pmichaud | actually, PAST is abstracted HLL | ||
POST is abstracted PIR | |||
sorear | Language-independant processing of PAST to add autoprints is unthinkable to me | ||
pmichaud | I don't think the PAST should have to be processed. | ||
I think the autoprinting should be wrapped around it. | 02:15 | ||
sorear | wrapped... around it? | ||
pmichaud | sure, you're just printing (or not printing) the return value that comes back. | ||
sorear | HLL::Compiler doesn't compile statments, though; it compiles lines | 02:16 | |
printing lines feels wrong to me | |||
pmichaud | it compiles code. | ||
it doesn't know about "lines" | |||
sorear | 'interactive' knows about lines | ||
pmichaud | right, 'interactive' is what needs to be fixed. | 02:17 | |
sorear | how would you fix it? | ||
pmichaud | so that it can do autoprinting of the result | ||
basically it compiles the code, executes it, then autoprints the result | |||
TimToady | hmm, I would read that example as saying that you can have a signature on the left, not that you must. But I can see how you'd read it the other way... | 02:18 | |
pmichaud | please tell me that it's "can" and not "must" :-) | ||
02:18
bluescreen joined
|
|||
TimToady | "can" is the intention | 02:18 | |
pmichaud | ty | ||
sorear | It doesn't really make sense to have anything other than a "signature" on the left | 02:19 | |
02:19
bluescreen is now known as Guest4173
|
|||
TimToady | though other forms may well need a macroish 'make bvalue' action at compile time | 02:19 | |
pmichaud | $a := $b # makes perfect sense | ||
sorear | since "signatures" are the only Perl 6 concept that can be bvalueish | ||
$a is a signature | |||
my $a; # this is specced to parse $a as a signature | |||
TimToady | yes, but lvalues in general aren't quite bvalues | 02:20 | |
so $a := $b really turns into something like 'VAR($a) := $b', or however we get the un-indirection | 02:21 | ||
sorear | part of me wants to call VAR a multi macro | 02:22 | |
TimToady | this is more apparent with $x[42] := $b; somehow the array has to bind its native pointer to scalar, presuming it has a compact array of native pointers somewhere inside | ||
and if it doesn't, then the binding fails, as with a compact array of int | 02:23 | ||
sorear | TimToady: please go on | 02:24 | |
TimToady | so as with exists and delete, it's really a modifier on the subscripting operation to return something more primitive than usual | ||
the reason, btw, for the current :exists and :delete adverbs is related | |||
the problem is that we haven't specced what a subscript really turns into as an object | 02:25 | ||
a Slicel or some such | |||
but when you have @foo[42]:delete | |||
it's easy enough to grok it as the same as @foo.delete(42) | |||
but what about slices and multidims? | |||
what does @foo[42,43;@x]:delete desugar to? | 02:26 | ||
we probably need a special form for passing a subscript as an argument | |||
sorear | could do "delete" as a setting macro pretty easily, rewriting itself into the adverb form | 02:27 | |
02:27
patspam left
|
|||
TimToady | then we could say it desugars to @foo.delete(:subscript[42,43;@x]) or some such | 02:27 | |
anyway, in all these delete/exists/bvalue cases, it's an instruction to the @foo to not actually follow the subscript to the end | 02:28 | ||
sorear | I'll need to think about what sort of thing VAR / :bvalue returns | ||
TimToady | so maybe there's a primitive @foo.bvalue(:subscript[]) form | ||
sorear | pmichaud: Back to interactive; can you explain in more detail what you want the 'interactive' to do on 2+2; 3+3, and how it works? | 02:29 | |
TimToady | and in a sense, .delete is just .bvalue = Nil | ||
except delete returns the old value | |||
sorear | pmichaud: !UNIT_START looking at contextuals feels wrong; the lexical parent of a module is a lexical thing, not a dynamical thing | 02:30 | |
TimToady: Unifying signatures and bvalues feels right to me. If anything you could apply VAR() to is valid in a signature, then we get multi binding $x[1], $x[0] := $x[0], $x[1] for free | 02:32 | ||
TimToady | it'd be a bit strange to allow @x[42] in a signature though | 02:33 | |
02:36
meppl joined
|
|||
TimToady | よし! I think I've implemented circumfixes in STD, finally...testing | 02:46 | |
sorear | std: (2) | 02:47 | |
p6eval | std 30618: OUTPUT«ok 00:01 112m» | ||
sorear | ? | ||
02:50
agentzh joined
02:52
Heame joined
03:03
Heame left
|
|||
sorear | huh. | 03:07 | |
mutablevar.pmc appears to be entirely dead code in rakudo | |||
03:09
duff_ joined
|
|||
diakopter very glad others are figuring out details of semantics | 03:16 | ||
not my forte. | 03:17 | ||
sorear | Why does rakudo support ObjectRef and Perl6Scalar pointing to other ObjectRef values? | 03:20 | |
03:21
meppel joined
03:24
meppl left
03:25
meppel is now known as meppl
|
|||
sorear | I'm lost. What's the purpose of having ObjectRef at all? | 03:26 | |
03:32
duff_ left
03:39
TiMBuS joined
03:42
stephenlb left,
hercynium joined
03:54
Guest4173 left
04:02
BrowserUk joined
|
|||
BrowserUk | ? | 04:02 | |
04:03
JimmyZ joined
|
|||
sorear | ! | 04:03 | |
04:03
gfx joined
|
|||
sorear | or is that ¿ | 04:03 | |
JimmyZ | \o I can't make spectest | 04:06 | |
04:15
BrowserUk left
04:17
JimmyZ left
|
|||
sorear | std: sub infix:<¢>($a,$b) { ... }; 2 ¢ 3 | 04:25 | |
p6eval | std 30618: OUTPUT«ok 00:01 115m» | ||
sorear | std: { sub infix:<¢>($a,$b) { ... }; }; 2 ¢ 3 | ||
p6eval | std 30618: OUTPUT«===SORRY!===Confused at /tmp/gDzAX4LEVA line 1:------> { sub infix:<¢>($a,$b) { ... }; }; 2 ⏏¢ 3 expecting any of: bracketed infix infix or meta-infix statement modifier loopParse failedFAILED 00:01 112m» | ||
sorear | TimToady: Where is operator overloading implemented in STD? | 04:26 | |
TimToady | Cursor.pmc add_macro | ||
04:27
ash__ joined,
plobsing joined,
jonrafkind joined
|
|||
TimToady | doesn't do anything with is parsed yet | 04:28 | |
sorear | is parsed works with operator overloading ?! | 04:29 | |
how does the match object get into the sub? | |||
TimToady | well, it will by the time add_macro actually adds macros :) | 04:30 | |
sorear | (hmm. Cursor's implementation is... completely unsuitable for Rakudo ;)) | ||
TimToady | I guess you'd need a ponie... | ||
04:32
Bzek joined
|
|||
sorear | Where does the actual language switchover happen? | 04:33 | |
TimToady | it's really just add_operator currently | ||
sec | |||
sorear | add_macro creates a new $~MAIN, but $¢ is still on the old $~MAIN | ||
04:34
[mark] joined
|
|||
TimToady | cursor_fresh is what actually does the swap | 04:35 | |
04:36
BrowserUk joined
|
|||
sorear | cursor_fresh only looks like it makes a new cursor | 04:36 | |
TimToady | the optional argument specifies language to switch to | ||
ash__ | with closures, when a capture happens, does it capture the world or just values it knows to capture? for instance, if you had an eval (so you don't know what value your closure is referencing) does it freeze the world? or would that not work right? sub foo($a) { my $b = $a + 1; return -> ($c) { eval "$c + $b" }; }; my $d = foo(1); say $d(2); I think demonstrates what I mean. From lexically analysis of the closure you couldn't tell | 04:37 | |
phenny | ash__: 11 May 23:20Z <spinclad> tell ash__ i can argue that whenever you use a function you use it as a rvalue, so create a closure. | ||
ash__ | it would need to capture, so it seems to capture the world, that seems expensive... | ||
phenny | ash__: 11 May 23:26Z <spinclad> tell ash__ (even if thrown away in sink context) ... but pmichaud seemed to have a different point of view on #rs. | ||
04:37
ashleydev joined
|
|||
sorear | TimToady: how does the main rule engine know to do $¢ = %*LANG<MAIN>? | 04:37 | |
ash__ | my lexical scope in nq-nqp is broken it seems, its almost right... but not exactly... i think i see the right way of doing things, you do need to freeze the world when you make a capture | 04:38 | |
TimToady | STD.pm6:1468 | ||
ash__ | sorry, ignore me, i am kinda thinking by typing | 04:39 | |
sorear | <!!{ $*LASTSTATE = $¢.pos; $¢ = %*LANG<MAIN>.bless($¢); }> | ||
? | |||
(that's 1465 for me. (feather being down)--) | |||
TimToady | ah right, my last checkin failed | 04:40 | |
sorear | what does <!! mean? | ||
double negation? | 04:41 | ||
TimToady | same as ?, but don't count as LTM | ||
sorear nods | |||
std: (my sub infix:<¢>($x, $y) {...}).(2 ¢ 3, 4 ¢ 5) | 04:42 | ||
p6eval | std 30618: OUTPUT«===SORRY!===Unable to parse argument list at /tmp/L3x9CpKowT line 1:------> (my sub infix:<¢>($x, $y) {...}).(⏏2 ¢ 3, 4 ¢ 5)Couldn't find final ')'; gave up at /tmp/L3x9CpKowT line 1:------> (my sub infix:<¢>($x, $y) {...}).(2 | ||
..⏏[3… | |||
TimToady | looks like a buglet | 04:44 | |
it knows to switch languages in the {...}, but outside that not till after the current statement | |||
sorear | that was actually a test of my understanding as much as anything else | 04:45 | |
partly motivated by NQP-rx not doing roles, and partly by a desire for diversity, I'm going to try to do lexical operator overloading a bit differently in rakudo | 04:46 | ||
it will temporalize the same grammar | |||
there'll be a stack of grammar temporalizations | |||
with a bit of dynamic-wind-y trickery at module loads | |||
TimToady | that won't work if you also do Cursor's trick of representing continuations with cursors | 04:47 | |
sorear | reprewhatting whats with cursors? | ||
diakopter | heh | 04:49 | |
TimToady | Cursor does backtracking using lazy lists of cursors that keep the entire match state including current position, match tree, and language | 04:50 | |
04:50
lestrrat is now known as lest_away
|
|||
TimToady | no work is done to backtrack; you merely throw away the current cursor and find the next one | 04:51 | |
04:51
Bzek left
04:52
BrowserUk left
|
|||
sorear | bleh | 04:52 | |
NQP-rx basically works like that... | |||
the temporalization *might* automatically undo | |||
(except we keep our cursors on the stack, and return to backtrack) | |||
TimToady | you can't backtrack into a match that way | 04:53 | |
sorear | well then. looks like I'm going to wait for any("pmichaud to change his mind on mixins in NQP-rx", "Rakudo bootstrapped") | 04:54 | |
TimToady | the neat think about the Cursor approach is that the ratchet optimization simply throws away all but the first result | 04:56 | |
hence most of the rules turn into if/thens instead of nested lazymaps | 04:57 | ||
bbl & | 04:58 | ||
spinclad | ash__: re does it capture the world, a naive display implementation will do so, and an eval will force you to. not expensive in what it has to do on closing, but, yes, expensive in what it hangs on to. | 05:00 | |
ash__ | yeah, you only need to clone lexpads, which shouldn't be to bad, but if you have an object that represents 30MB of memory, that can be expensive to hang on to for a closure that may or may not be needed much | 05:01 | |
spinclad | (not expensive in that you already have the outer context/display with the world already in it, and you just clone and lengthen it by a layer) | ||
ash__ | and you could just set a flag to COW the variables so you don't have to actively clone everything | ||
spinclad | (clone is O(lexical depth) | ||
) | |||
ash__ | you could do some lexical analysis to see if you would eval in the closure, and which variables need capturing to minimize the amount of work, but a naive implementation would probably just copy the lexpads of the lexical scope | 05:03 | |
spinclad | right, and for that you need an escape analysis, which the eval (or YOU_ARE_HERE also) blocks | ||
05:06
kcwu left,
kcwu joined
05:07
kaare joined
|
|||
spinclad | needn't copy the lexpads (layers) i think, they can be shared by reference among different displays (naively) | 05:07 | |
05:07
kaare is now known as Guest49481
|
|||
ash__ | well, right now, my plan in nq-nqp was to scan the closure for variables it used and copy them into a special lexpad that is pushed to the top of the lexical scope when you call the closure, which i think i can still do, but now i have to make my lexpads a bit smarter and set a flag on variables that should be captures so when they get updated, it pushes the old value into that special lexpad | 05:09 | |
i think that would give me the right functionality for my program | |||
spinclad | in fact, for shared lexical state they should/must be shared (naively) | ||
ash__ | was perlcabal on feather? | 05:10 | |
spinclad | variables it uses: declares and uses? that's the new layer in my rough language | 05:11 | |
05:11
justatheory left
|
|||
diakopter | ash__: yes | 05:12 | |
spinclad: your rough language? | 05:13 | ||
Juerd should be waking up sometime soon :) | |||
and might resurrect feather | |||
spinclad | diakopter: don't know if layer is established terminology | ||
i'm just rough-hewing the language there | 05:14 | ||
diakopter | oh you don't mean a programming language. got it | ||
ash__ | well... this is going to be a fun re-design of my lexical scoping >.< | ||
spinclad | i think lexpad a good common term there | 05:15 | |
05:23
spinclad left,
spinclad joined
|
|||
ash__ | well, thanks for talking, sleep time | 05:23 | |
diakopter | 'nite | 05:24 | |
05:24
ash__ left
05:39
jonrafkind left
05:46
snarkyboojum joined
05:48
fengshaun left
|
|||
moritz_ | good morning butterflymoose | 06:00 | |
diakopter | howdy | 06:01 | |
TimToady | butterflymeese? | ||
spinclad | flutter-by meeses | 06:02 | |
sorear | hello moritz_ | ||
moritz_: can you tell me what the purpose of ObjectRef is? | 06:04 | ||
I can understand Perl6Scalar | |||
sorear is trying to implement binding and maybe !FETCH | 06:06 | ||
moritz_ | sorear: not really; as far as I understand it's used to distinguish array containers that flatten, and those that don't | ||
sorear | Who would know more? | ||
moritz_ | sorear: pmichaud would | ||
06:06
uniejo joined
06:07
ashleydev left
|
|||
sorear | hmm, I wonder if I should switch to e-mail for extracting information from him. | 06:07 | |
06:08
Su-Shee joined,
ashleydev joined
|
|||
moritz_ | maybe ask on p6c; perhaps somebody else knows too | 06:08 | |
is feather known to be down/unreachable atm? | |||
sorear | yes | 06:09 | |
TimToady | doesn't even have DNS at the moment | ||
sorear | hmm. My RT reply went to p6c, but not to the ticket itself | 06:10 | |
so much for Reply-To: | |||
ah, it finally made the ticket too... | 06:11 | ||
moritz_ | rt + mailing lists introduce quite a delay | 06:17 | |
which is why I usually also CC the one I'm replying to | 06:18 | ||
06:22
dual left
|
|||
moritz_ | btw if anybody wants a git clone of the pugs repo, please go to github.com/moritz/Mu | 06:27 | |
last commit it recorded is from 13 hours ago | |||
06:28
dual joined
06:29
kel_ joined
06:33
proller left
06:38
colomon left
06:44
alester left
06:52
iblechbot joined
07:05
kel_ left,
Trashlord joined
07:06
kel_ joined
07:11
gfx left
07:20
zloyrusskiy joined
07:34
gfx joined
07:35
M_o_C joined
|
|||
sorear | :/ My IRC client is trying to turn into a full reactive programming framework | 07:42 | |
moritz_ | emacs? | 07:43 | |
sorear | no | 07:44 | |
a long-term project of mine that I've been using as a scaffold to learn perl56 | |||
perl6 | |||
moritz_ | oh, then one you're writing | 07:46 | |
sorear | it's what I started playing with macros for | ||
07:59
arnsholt left
08:24
dakkar joined
08:30
plobsing left,
envi^home joined
08:42
xinming left
08:45
arnsholt joined,
yinyin left
08:46
yinyin joined
08:51
zloyrusskiy left
09:04
k23z__ joined
09:07
M_o_C left
09:08
M_o_C joined
09:15
proller joined
|
|||
ruoso | phenny, tell BrowserUK please take a look at perl6-language history. TimToady sent your comments about the threading model there and I'm posting a reply... | 09:28 | |
phenny | ruoso: I'll pass that on when BrowserUK is around. | ||
09:29
molaf joined
|
|||
k23z__ | !seen BrowserUK | 09:29 | |
09:32
JimmyZ joined,
athomason left
09:38
masak joined
|
|||
masak | oh hai, #perl6 | 09:38 | |
moritz_ | lolitsmasak | ||
masak | lol! | ||
Casan | cat | 09:39 | |
09:40
molaf_ joined,
dalek joined
|
|||
snarkyboojum | masak-san o/ | 09:41 | |
dalek | meta: r265 | diakopter++ | trunk/Sprixel/ (4 files): [perlesque] fix bug exposed by similar pugsbug; ash__++ |
||
meta: r266 | diakopter++ | trunk/Sprixel/ (2 files): [perlesque] remove debug |
|||
meta: r267 | diakopter++ | trunk/Sprixel/ (2 files): [perlesque] add dynamic .dll resolution/loading |
|||
meta: r268 | diakopter++ | trunk/Sprixel/src/Grammar/Grammar.cs: [perlesque] catch dll load exceptions |
|||
meta: r269 | diakopter++ | trunk/Sprixel/ (2 files): [perlesque] this is only a test. if this were a real emergency, ... |
|||
meta: r270 | diakopter++ | trunk/Sprixel/src/Grammar/Grammar.cs: [perlesque] yes. |
|||
masak | someone is up hacking :) | ||
09:41
pmichaud_ joined
09:42
Juerd joined
09:43
iblechbot left
|
|||
Su-Shee | so called "flood by productivity". | 09:44 | |
09:45
molaf left,
pugssvn joined
09:46
rv2733 joined
|
|||
masak | rakudo: sub A($a) { our sub B { say $a } }; A(4); B() | 09:48 | |
p6eval | rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in Bcurrent instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
masak | ah, our-scoped subs. :) | ||
rakudo: sub A($a) { our sub B { say $a } }; B() | |||
p6eval | rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in Bcurrent instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
masak | alpha: sub A($a) { our sub B { say $a } }; B() | ||
p6eval | alpha 30e0ed: OUTPUT«Null PMC access in type()in Main (file <unknown>, line <unknown>)» | ||
masak | I guess I could submit an RT ticket over something here, but frankly there doesn't seem to be much point. I have no idea how it all should work. | 09:49 | |
moritz_ | perl 5 warns in such situation | 09:50 | |
"Variable $a not shared in sub B, $location_info" | 09:51 | ||
or so | |||
"will not stay shared" or "is not available" | |||
snarkyboojum | "Variable "$a" will not stay shared" | 09:53 | |
masak | TimToady commented on that the other day. | ||
when I asked impossible questions. | |||
masak digs in the logs | |||
aye, here: irclog.perlgeek.de/perl6/2010-04-27#i_2269712 | 09:54 | ||
I got the impression that since Perl 6 has 'real closures', the problem had somehow gone away. | |||
but right now my li'l head hertz from thinking about all the details :/ | |||
moritz_ | it's not really about closures; it's about being able to access soemthing by name which hasn't set up an environment yet | 09:55 | |
unless you spec that at compile time a stub environment for these closures needs to be established | 09:56 | ||
masak | I think something like that is the long-term vision. | 09:57 | |
09:57
yinyin left
|
|||
masak | so if A wasn't called, calling B would print 'Any()'. | 09:58 | |
moritz_ | which will kinda annoy pmichaud, because in parrot there's no lexpad before the invocation | ||
masak | and if't was called, calling B would print the last value of the $a parameter. | ||
moritz_ | (iiuc) | ||
wolverian | /aw | 10:02 | |
whoops. | |||
masak | 'Mu' is a lovely name for the repository formerly known as the Pugs repository, by the way :) | 10:03 | |
moritz_ | :-) | 10:04 | |
JimmyZ | "JimmyZ" at 192.168.1.3 pasted "Rakudo Test Summary Report" (81 lines) at nopaste.snit.ch/20535 | 10:15 | |
moritz_ | it's known to be pretty noise on new parrots | 10:16 | |
10:17
Casan left
10:26
am0c joined
|
|||
mathw | Hey | 10:27 | |
masak | hoi | ||
moritz_ | heu | ||
masak | std: sub A { our sub B {} }; B | ||
p6eval | std 30618: OUTPUT«ok 00:01 112m» | ||
10:27
pmurias joined
|
|||
pmurias | diakopter: you switched to git-svn? | 10:28 | |
phenny | pmurias: 11 May 15:26Z <TimToady> tell pmurias no, we will not remove .say from Any; you seem to have lost track of the idea that the main point of superclasses is to *lose* the separation of concerns imposed by the subclasses. Language design is more about *balance* of concerns. | ||
masak | phenny: you already said that. | ||
hm, maybe not. | |||
the above sounds like the core of Liskov defiance, by the way. :) | 10:29 | ||
at least reading between the lines. | 10:30 | ||
but I guess that was the intent. :) | 10:32 | ||
on a more worldly note, Rakudo make install has been failing for me lately: gist.github.com/398424 | 10:34 | ||
the cuase is something with permissions, but I don't see anything which looks immediately wrong. | 10:35 | ||
lunch & | 10:36 | ||
10:42
gfx left
10:49
JimmyZ left
10:51
ruoso left
11:00
Trashlord left
|
|||
masak | yay! Web.pm is mentioned in a TPF grant summary report. news.perlfoundation.org/2010/05/run...y-rep.html | 11:06 | |
it's been a while since that happened. when your grant organization stops including you in their summary reports, and you're unable to reach your grant manager, things get so much less straightforward... :/ | 11:07 | ||
Alberto++ | |||
behind the scenes, via email, communication has been picking up lately. all in all, it's a relief. | |||
jnthn | masak++ # not giving up on it | 11:09 | |
11:09
agentzh left
11:10
mikehh joined
|
|||
masak | it's been one long, drawn-out project. but I still think it has many good parts. | 11:10 | |
in a sense, the Web.pm project started both way too early and right on time. | |||
on a Rakudo/Perl 6 timeline with perfect hindsight, that is. | 11:11 | ||
jnthn | It's chicken and egg. Rakudo needs more apps developed to make it better. Devloping apps being fun needs Rakudo to be better. | 11:12 | |
hejki | i can't see the proto-chicken dinosaur which egg evolved into a chicken egg in that analogy | 11:13 | |
masak | I'm sure all small language communities face this Catch 22 in some way. | ||
jnthn | We have a growing number of modules/apps and Rakudo is steadily improving, so I guess we're getting it somewhat right. | 11:14 | |
moritz_ | masak: re install, that line should be pod2man docs/running.pod > /usr/local/man/man1/perl6.1 | 11:25 | |
masak: could you please nopaste the generated Makefile? | |||
masak | okie. | ||
gist.github.com/398455 | 11:26 | ||
line 29: | 11:27 | ||
POD2MAN = | |||
there you go. | |||
moritz_++ | |||
moritz_ | masak: do you have a pod2man in $PATH? | ||
masak | likely not. | 11:28 | |
whence do I get that? | |||
11:28
M_o_C left,
KyleHa joined
|
|||
moritz_ would have thought that's shipped with perl | 11:28 | ||
masak | hm, I do seem to have one in /opt/local/bin/pod2man | ||
moritz_ | it is, on Debian | ||
KyleHa | Howdy #perl6 | ||
moritz_ | is that in $PATH? | ||
hello KyleHa | 11:29 | ||
masak | KyleHa: hi! | ||
moritz_: yes. | |||
KyleHa | Pugs SVN is running again \o/ | 11:30 | |
11:31
envi^home left
|
|||
moritz_ | masak: what does parrot_config has_pod2man pod2man print? | 11:31 | |
masak | has_pod2man => '0'\n no such key: 'pod2man' | 11:32 | |
moritz_ | so parrot's Configure.pl doesn't detect it | 11:33 | |
masak | odd. | ||
moritz_ | do you use the perl in /opt/local/bin/ to configure parrot? | ||
masak | possibly not. | ||
moritz_ | do you have a pod2man in the same directory as the perl that you use for configuring? | 11:34 | |
masak | hm. | ||
cognominal | |||
masak | moritz_: no. | 11:35 | |
moritz_ | hm | ||
11:36
envi^home joined
|
|||
masak | hold on; yes. | 11:36 | |
but it's not executable! o.O | |||
moritz_ | :/ | 11:37 | |
then make it so :-) | |||
masak | 'The contents of this script should normally never run! The perl wrapper should pick the correct script in /usr/bin by appending the appropriate version.' | ||
and there are scripts with version numbers appended, which are executable. | |||
11:37
KyleHa left
|
|||
moritz_ | and no wrapper or symlink in /usr/bin? | 11:38 | |
called /usr/bin/pod2man, I mean | |||
masak | yes, but that's the non-executable one with the above quote. | ||
not sure I want to mess with the way things are currently set up. | |||
moritz_ | huh, that looks silghtly weird | ||
any other macos user around? | 11:42 | ||
11:42
clintongormley joined
|
|||
masak | filling the POD2MAN variable in the Makefile with /usr/bin/pod2man5.10.0 works, fwiw. | 11:43 | |
but it's hardly a long-term solution. :) | |||
moritz_ | the long term solution is probably to fix your pod2man/perl installation | 11:44 | |
or bribe the parrot devs into patching Configure.pl to work with your setup | 11:45 | ||
11:45
JimmyZ joined
|
|||
masak | aye. | 11:45 | |
11:46
colomon joined
|
|||
snarkyboojum | I'm a macos user :) | 11:49 | |
but I use a custom built perl 5.12 by default :) | |||
moritz_ | snarkyboojum: do you have a /usr/bin/pod2man? | ||
snarkyboojum | moritz_: yep - same story as masak | 11:50 | |
but $ which pod2man -> /usr/local/bin/pod2man | |||
moritz_ | and that's executable? | ||
masak | I get that too. | ||
but that's not my default perl installation, AFAIK. | 11:51 | ||
snarkyboojum | both are executable on my system | ||
i.e. /usr/bin and /usr/local/bin | |||
pod2man | |||
$ which perl -> /usr/local/bin/perl | 11:53 | ||
for me | |||
i.e. perl 5.12 | |||
11:53
cognominal left,
\shade\ left,
Trey left
|
|||
moritz_ | snarkyboojum: and parrot detects your pod2man correctly? | 11:54 | |
snarkyboojum | it did last time I did a perl Configure.pl --gen-parrot | ||
at least I could view the man pages if I gave it the right search path i.e. man -M blah | |||
moritz_ | and can you install a current rakudo? | ||
snarkyboojum | current as of last night | ||
11:54
M_o_C joined
|
|||
moritz_ | thanks | 11:55 | |
that's new enough | |||
snarkyboojum | welcome :) | ||
snarkyboojum tries again anyway | |||
yep - my generated Makefile has 'POD2MAN = /usr/local/bin/pod2man' | 11:56 | ||
moritz_ | the patch that uses pod2man was applied yesterday morning | ||
by me :( | |||
11:57
Trashlord joined,
pmurias left
11:58
Trey joined
|
|||
snarkyboojum | just did another build and it works fine | 11:59 | |
man pages are installed locally i.e. in my home directory, using /usr/local/bin/pod2man | |||
12:01
\shade\ joined,
bluescreen joined
12:02
cognominal joined,
bluescreen is now known as Guest80406
|
|||
pmichaud_ | yay, feather is back! | 12:05 | |
good morning, #perl6 | |||
Juerd | 3;0 juerd@feather:~$ uptime | ||
14:05:44 up 42 days, 18:28, 5 users, load average: 0.03, 0.10, 0.05 | |||
twas the fiber. | |||
jnthn | morning, pmichaud_ | ||
colomon | o/ | ||
masak | morning, pm. | 12:06 | |
pmichaud_ | whether it twas feather or fiber, I was unable to get spectests yesterday :-| | ||
Juerd | I was unable to get sleep... | ||
masak | musta been the fiber, 'cause the www.november-wiki.org is still up :) | ||
Juerd | 14:06 here and I'm about to go to bed now. Finally. | ||
moritz_ | juerd: suspected as much, because the dns was also down | 12:07 | |
good sleep :-) | |||
Juerd | Thanks | ||
moritz_ | pmichaud_: git mirror of the pugs repo at github.com/moritz/Mu/ | ||
pmichaud_ | moritz_: oooh -- good to know :-) | 12:08 | |
moritz_ | (I'm slowly trying to weed out the term "pugs repo", because pugs isn't in there anymore) | ||
Juerd | What's in a name :) | ||
moritz_ | but it's hard as long as the path is still svn.pugscode.org/pugs | ||
Juerd: confusion | |||
Juerd | That's the thing we need more of, right? | 12:09 | |
12:10
ruoso joined
|
|||
pmichaud_ | I always thought we had plenty. :-) | 12:15 | |
moritz_ | speaking of confusion... most .de domains aren't resolvable right now | 12:16 | |
12:16
pmichaud left
|
|||
moritz_ | or maybe half of them | 12:16 | |
12:16
pmichaud_ is now known as pmichaud
|
|||
masak | why? | 12:16 | |
moritz_ | seems 4 of the 6 primary DNS server don't want to give any answer except NXDOMAIN | 12:17 | |
pmichaud suspects volcano ash. | |||
moritz_ suspects technical incompetence | |||
pmichaud | or perhaps it has to do with greek sovereign debt. | 12:18 | |
12:19
moritz_ sets mode: +ooo pmichaud masak Juerd
|
|||
moritz_ | ah | 12:22 | |
pmichaud | afk, kid to school | 12:23 | |
moritz_ | there was an announcement on a denic mailing list | ||
"maintenance for increasing system redundancy" | |||
somebody asked "will the nameservers be affect" - "no" | |||
of course not. | |||
12:27
snarkyboojum left,
snarkyboojum joined
|
|||
masak | snarkyboojum: the more I think about subs and their scoping, the more I realize that I do not fully understand them yet. it would be nice if we could sit down at some point and try to figure them out together, such that the road ahead is clear. | 12:32 | |
probably after my talk on Monday :) | |||
moritz_ | the more I think about subs, the more I'm convinced that having them lexically scoped is a good idea. | 12:33 | |
snarkyboojum | masak: gladly - sounds like a fun evening of rakudo machinations :) | ||
talk on Monday is a Moscow talk? | 12:34 | ||
masak | aye. | ||
snarkyboojum | topic? | ||
grammars? :D | |||
masak | devconf.ru/perl/page/programm | ||
for once, not grammars. | 12:35 | ||
I'll be talking about Yapsi, Tardis and Sigmund. | |||
snarkyboojum | masak: w00t - looks v. cool :) | 12:36 | |
"The future is now, it's just unevenly distributed." in my translation | |||
:) | |||
masak | aye. that's an accurate enough translation. | ||
snarkyboojum | masak: do subs have lexical scope by default in rakudo? | 12:40 | |
err.. perl 6 :) | |||
masak | yes, I think so. | 12:41 | |
moritz_ | both | ||
masak | but they can still be called textually before they're defined, because the compile phase comes before the run phase. | ||
snarkyboojum | at least in the symtable when looking at --target=past you get "scope" => "lexical" | 12:42 | |
masak | rakudo: foo; sub foo() { say "OH HAI" } | ||
p6eval | rakudo ed2409: OUTPUT«OH HAI» | ||
masak | rakudo: BEGIN { foo }; sub foo() { say "OH HAI" } | ||
p6eval | rakudo ed2409: OUTPUT«Could not find sub &foocurrent instr.: '_block13' pc 25 (EVAL_1:0)» | ||
moritz_ | that's because the lexpad sits notionally at the start of each block | 12:43 | |
rakudo: eval 'say $x'; my $x = 4; | |||
p6eval | rakudo ed2409: OUTPUT«Any()» | ||
moritz_ | rakudo: eval 'say $x'; my $x = 4; BEGIN { $x = 4 } | ||
p6eval | rakudo ed2409: OUTPUT«Symbol '$x' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
moritz_ | rakudo: eval 'say $x'; my $x = 4; BEGIN $x = 4; | ||
p6eval | rakudo ed2409: OUTPUT«Symbol '$x' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
pmichaud suggests 'INIT' | 12:44 | ||
moritz_ | rakudo: eval 'say $x'; my $x = 4; INIT { $x = 4 } | ||
p6eval | rakudo ed2409: OUTPUT«Null PMC access in getprop()current instr.: '&infix:<=>' pc 17523 (src/builtins/Junction.pir:205)» | ||
pmichaud | bah :-) | ||
moritz_ | :-) | ||
anyway | |||
the fact that the eval '...' doesn't die, but print anything, shows that $x is in scope | |||
even if not yet initialized | |||
masak | *nod* | 12:45 | |
another way to state the same thing is that 'my' keywords play no role after compilation. | |||
JimmyZ | ya, Null PMC access in getprop again! | ||
masak | that one's reported already :) | ||
snarkyboojum | rakudo: eval 'my $a = 5'; say $a; | 12:47 | |
p6eval | rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
snarkyboojum | :) | ||
12:48
hanekomu joined
|
|||
masak | snarkyboojum: that doesn't work, because the compiler doesn't see your 'my' while compiling the program. | 12:48 | |
JimmyZ | rakudo: my $a = \Int; say $a | ||
p6eval | rakudo ed2409: OUTPUT«Capture()<0x33534d0>» | ||
snarkyboojum | masak: yeah, was testing that out | ||
JimmyZ | rakudo: my $a = \Int; say &$a | ||
p6eval | rakudo ed2409: OUTPUT«» | ||
snarkyboojum | so my is processed 'statically'? | ||
masak | rakudo: eval '$a = 5'; say my $a | ||
snarkyboojum | or something... | ||
p6eval | rakudo ed2409: OUTPUT«5» | ||
masak | snarkyboojum: yes. | 12:49 | |
snarkyboojum | cool | ||
ruoso just sent a second version of the threading model to p6-l | |||
JimmyZ | eval doesn't like " ? | ||
pmichaud | eval likes " just fine. But you have to escape the $'s :-) | 12:50 | |
rakudo: my $a = 5; eval "$a = 5"; | |||
p6eval | rakudo ed2409: ( no output ) | ||
pmichaud | rakudo: my $a = 5; eval "$a = 5; say $a"; | ||
p6eval | rakudo ed2409: ( no output ) | ||
pmichaud | rakudo: my $a = 5; eval "\$a = 7; say \$a"; | ||
snarkyboojum | rakudo: eval "my $a = 5"; | ||
p6eval | rakudo ed2409: OUTPUT«7» | ||
rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | |||
pmichaud | rakudo++ | 12:51 | |
snarkyboojum | that's kinda weird - so it doesn't see the declaration at eval time, but it see the initialisation attempt | ||
pmichaud | uh, no. | ||
snarkyboojum | ok :) | ||
pmichaud | with the double quotes, it's trying to substitute a value of $a into the string, but there is no $a | 12:52 | |
JimmyZ | rakudo: eval "use MONKEY_TYPING; class Foo{ }; augment class Foo { method Str() { "hi"; } } ; say ~Foo.new" | ||
moritz_ | it interpolates the string before eval() is ever called | ||
p6eval | rakudo ed2409: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespaceUseless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespaceNull PMC access in get_string()current instr.: '_block14' | ||
..pc 29… | |||
snarkyboojum | eek ok | ||
JimmyZ | rakudo: eval 'use MONKEY_TYPING; class Foo{ }; augment class Foo { method Str() { "hi"; } } ; say ~Foo.new' | ||
p6eval | rakudo ed2409: OUTPUT«hi» | ||
JimmyZ | rakudo: eval "use MONKEY_TYPING; class Foo\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | ||
p6eval | rakudo ed2409: OUTPUT«hi» | ||
JimmyZ | rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} } ; say ~Foo.new" | 12:53 | |
p6eval | rakudo ed2409: OUTPUT«You can't backslash that at line 11, near "}; augment"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
JimmyZ | rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | ||
masak | "You can't backslash that" -- that's what I was thinking :) | ||
p6eval | rakudo ed2409: OUTPUT«You can't backslash that at line 11, near "}; augment"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
pmichaud | nqp: sub xyz($a) { -> { say $a } }; my $x := xyz(4); my $y := xyz(5); $x(); | 12:54 | |
p6eval | nqp: OUTPUT«Missing block at line 1, near "-> { say $"current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
JimmyZ | rakudo: eval "use MONKEY_TYPING; class Foo\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | ||
p6eval | rakudo ed2409: OUTPUT«hi» | ||
pmichaud | nqp: sub xyz($a) { { say $a } }; my $x := xyz(4); my $y := xyz(5); $x(); | ||
p6eval | nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1664 (src/Regex/Cursor-builtins.pir:179)» | ||
pmichaud | nqp: sub xyz($a) { { say($a) } }; my $x := xyz(4); my $y := xyz(5); $x(); | ||
JimmyZ | rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | ||
p6eval | nqp: OUTPUT«45invoke() not implemented in class 'Integer'current instr.: '_block11' pc 0 (EVAL_1:5)» | ||
rakudo ed2409: OUTPUT«You can't backslash that at line 11, near "}; augment"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | |||
pmichaud | nqp: sub xyz($a) { -> { say($a) } }; my $x := xyz(4); my $y := xyz(5); $x(); | ||
p6eval | nqp: OUTPUT«Missing block at line 1, near "-> { say($"current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
pmichaud | nqp: sub xyz($a) { sub { say($a) } }; my $x := xyz(4); my $y := xyz(5); $x(); | ||
p6eval | nqp: OUTPUT«Routine declaration requires a signature at line 1, near "{ say($a) "current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
pmichaud | arrrrrgh | ||
moritz_ | sub () { ... } maybe? | 12:55 | |
pmichaud | nqp: sub xyz($a) { return { say($a) } }; my $x := xyz(4); my $y := xyz(5); $x(); | ||
p6eval | nqp: OUTPUT«5» | ||
JimmyZ | rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a{ }; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | ||
pmichaud | there | ||
p6eval | rakudo ed2409: OUTPUT«Null PMC access in invoke()current instr.: '!postcircumfix:<{ }>' pc 14451 (src/builtins/Code.pir:30)» | ||
pmichaud | (yes, output is wrong -- that's what I was testing) | ||
JimmyZ | rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { 'hi'; } } ; say ~Foo.new" | ||
p6eval | rakudo ed2409: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespaceUseless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespaceNull PMC access in invoke()current instr.: | ||
..'!postcircumfix:<{ }… | |||
moritz_ | JimmyZ: the {...} still interpolate in double-quoted strings | 12:56 | |
JimmyZ | How can I get it to work? my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | ||
or Is it a bug? | |||
moritz_ doesn't see a bug | 12:57 | ||
JimmyZ | then how can I get it working? | ||
moritz_ | JimmyZ: first construct the string; then print it out, to verify it's actually what you expect | ||
once you've got that work, feed it into eval | 12:58 | ||
pmichaud | note that you need a space between the $a and the brace | ||
i.e., "class $a \{ \};" and not "class $a\{ \};" | |||
JimmyZ | rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a \{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | 12:59 | |
p6eval | rakudo ed2409: OUTPUT«hi» | ||
JimmyZ | rakudo: eval "use MONKEY_TYPING; class Foo\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | ||
p6eval | rakudo ed2409: OUTPUT«hi» | ||
JimmyZ | rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class {$a}\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | ||
p6eval | rakudo ed2409: OUTPUT«hi» | ||
JimmyZ | ~~ | ||
pmichaud | interesting. :-) | ||
JimmyZ | then the error message bugs me | 13:00 | |
pmichaud | well, the error message is actually pointing to the error, as far as it goes | 13:01 | |
although Null PMC is certainly wrong -- not sure why that's coming up. | |||
JimmyZ | Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace? | ||
moritz_ | www.denic.de/typo3temp/pics/i_64bbbffdb3.jpg # that pretty much explains the DNS failure | ||
pmichaud | JimmyZ: what error are you referring to, then? | 13:02 | |
JimmyZ | How can I get it to work? my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | ||
sorry | |||
rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { 'hi'; } } ; say ~Foo.new" | 13:03 | ||
p6eval | rakudo ed2409: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespaceUseless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespaceNull PMC access in invoke()current instr.: | ||
..'!postcircumfix:<{ }… | |||
13:03
actualmind joined
|
|||
moritz_ | rakudo: my $a = 'Foo'; print "use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { 'hi'; } } ; say ~Foo.new" | 13:03 | |
p6eval | rakudo ed2409: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespaceUseless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespaceNull PMC access in invoke()current instr.: | ||
..'!postcircumfix:<{ }… | |||
JimmyZ | rakudo: eval "use MONKEY_TYPING; class Foo\{ \}; augment class Foo\{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | ||
snarkyboojum | masak: "View History" for pages at november-wiki.org/ is giving "An internal error occurred. Apologies." | ||
p6eval | rakudo ed2409: OUTPUT«hi» | ||
JimmyZ | but this one works | ||
the former doesn't work | 13:04 | ||
moritz_ | JimmyZ: that's because the { ... } is run *outside* the eval | ||
masak | snarkyboojum: I think there's a long-standing Issue ticket for that on github. | ||
moritz_ | JimmyZ: and that way it's also run outside any class | ||
snarkyboojum | masak: okydoke | ||
moritz_ | JimmyZ: so the error message does make sense | 13:05 | |
masak | snarkyboojum: lichtkind discovered it months ago, and I haven't really taken the time to investigate. it wasn't always like that, though. | ||
JimmyZ | rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new" | 13:06 | |
p6eval | rakudo ed2409: OUTPUT«You can't backslash that at line 11, near "}; augment"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
JimmyZ | rakudo: my $a/ = 'hi'; say $a/; | 13:07 | |
p6eval | rakudo ed2409: OUTPUT«Confused at line 11, near "my $a/ = '"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
JimmyZ | rakudo: my $a\ = 'hi'; say $a\; | ||
p6eval | rakudo ed2409: OUTPUT«Confused at line 11, near "say $a\\;"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
13:10
orafu joined
13:12
colomon left,
colomon joined
|
|||
jnthn afk, talk i Malmö | 13:14 | ||
13:14
raj joined,
Guest49481 left
13:15
raj left,
PerlJam joined
|
|||
JimmyZ | rakudo: my $a = 'Foo'; eval " class $a\{ \}" | 13:16 | |
p6eval | rakudo ed2409: OUTPUT«You can't backslash that at line 11, near "}\""current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
JimmyZ | rakudo: eval " class Foo\{ \}" | ||
p6eval | rakudo ed2409: ( no output ) | ||
moritz_ | JimmyZ: unless there's something that you want to demonstrate, could you please use private message with p6eval? | 13:17 | |
that would reduce the noise level here | |||
JimmyZ | I think it's a bug. | ||
moritz_ | then report it as such | 13:18 | |
including a description why you think it's a bug | |||
std: my $a = 'Foo'; eval " class $a\{ \}" | 13:19 | ||
p6eval | std 30618: OUTPUT«ok 00:01 113m» | ||
moritz_ | ah, unspace interpolation issue, probably | ||
JimmyZ | $a\ is not a var | ||
moritz_ | $a{ is the beginning of an interpolation of a variable + postcircumfix | 13:20 | |
and $a\{ is the same thing with an unspace, in rakudo's opinion | |||
JimmyZ | and Foo\{ ? | 13:21 | |
moritz_ | Foo has no sigil | 13:22 | |
JimmyZ | then I can send report, because std works | 13:23 | |
:) | |||
moritz_ | 15:18 <@moritz_> then report it as such | ||
JimmyZ | will do, I forgot std :( | 13:24 | |
13:25
hanekomu left
|
|||
snarkyboojum | masak: you'll have to put up that moscow preso somewhere once done :) | 13:28 | |
masak | I usually publish presentations as PDFs here: feather.perl6.nl/~masak/ | 13:29 | |
ruoso actually sent a third and simplified version of the threading model | |||
snarkyboojum | ah yes, read them all :P | 13:30 | |
masak | :) | 13:31 | |
not sure how much sense some of them make without a speaker. | |||
13:31
TiMBuS left
13:45
plobsing joined
13:47
iblechbot joined
13:48
snarkyboojum left
13:53
perlygatekeeper joined
|
|||
masak | wikitravel.org/en/Moscow -- "There are no English signs inside so have your itinerary ready beforehand or learn to read Cyrillic, which is possible." I like that last part. :) | 13:56 | |
PerlJam | I think there may be an "im" missing :) | 14:02 | |
masak | oh, I wouldn't say that. | 14:05 | |
most people in the sciences already have some familiarity with the Greek alphabet. | 14:06 | ||
and Russian has a refreshingly mismatch between spelling and pronunciation. at least compared to English. | |||
s/refreshingly/refreshingly small/ | |||
k23z__ | I just generated | 14:07 | |
14:11
rgrau` joined
|
|||
masak | k23z__: missing direct object near line 1 :) | 14:11 | |
k23z__ | masak, haha | ||
pugssvn | r30619 | lwall++ | [STD,Cursor] implement circumfix:«X Y» as grammar derivation | 14:12 | |
r30619 | [Cursor] recognize foofix:("\x[face]") and foofix:("\c[YOUR CHARACTER HERE]") | |||
r30619 | without actually evaluating | |||
14:16
uniejo left
14:17
ash__ joined
14:19
actualmind left
|
|||
colomon | rakudo: say (-.5).floor | 14:19 | |
p6eval | rakudo ed2409: OUTPUT«-1» | ||
masak | rakudo: say .floor | 14:20 | |
p6eval | rakudo ed2409: OUTPUT«Method 'floor' not found for invocant of class ''current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
14:20
ashleydev left
|
|||
masak | rakudo: say .WHAT | 14:21 | |
p6eval | rakudo ed2409: OUTPUT«Any()» | ||
masak | guess floor is Cool nowadays. | ||
moritz_ | rakudo: say Cool.^methods(:local).map({.name}).grep(any <ceiling floor round>) | 14:22 | |
p6eval | rakudo ed2409: OUTPUT«floorroundceiling» | ||
moritz_ | rakudo: say Cool.^methods(:local).map({.name}).grep(any <ceiling floor round>).join: ', ' | ||
p6eval | rakudo ed2409: OUTPUT«ceiling, floor, round» | ||
colomon | okay, that was an impressive string of p6. moritz_++ | 14:23 | |
ash__ | know what would be a cool operator | 14:24 | |
14:25
iblechbot left
|
|||
ash__ | something that means ( )., so in the above you could do .map { .name } NEWOP | 14:25 | |
well, NEWOP grep or maybe NEWOP .grep | |||
moritz_ | ash__: *.name | ||
ash__ | ah | ||
true | |||
moritz_ | just forgot that it was implemented | 14:26 | |
ash__ | but you'd still have to ( ) around that | ||
.map *.name .grep wouldn't work, would it? | |||
moritz_ | map: *.name ==> grep any <... > ==> say | 14:27 | |
ash__: yours would be two terms in a row | |||
TimToady | you can already use . for free after {} | 14:28 | |
at least in STD | |||
since {} terminates an argument list unless followed by , or : | 14:29 | ||
ash__ | so, could you write .map {.name}.grep(...) ? | ||
PerlJam | almost | 14:30 | |
TimToady | not without a : after the map | ||
ash__ | i am thinking of the cascading message operator in smalltalk, thats were i have seen it before | ||
moritz_ | std: .map: {.name}.grep(...) | ||
p6eval | std 30619: OUTPUT«ok 00:01 112m» | ||
TimToady | methods assume there are no arguments | ||
and these days you can drop the space | |||
std: .map:{.name}.grep(...) | |||
p6eval | std 30619: OUTPUT«ok 00:01 110m» | ||
ash__ | cool | 14:31 | |
moritz_ thinks that feed operators will make nice syntax | |||
TimToady | since we don't allow name extension with closures :) | ||
yah, but nobody quite knows how to think of them yet | |||
moritz_ | I have a mental model of them, and it's probably mostly wrong :-) | 14:32 | |
TimToady | I have several mental models, so most of 'em are guaranteed wrong :) | ||
but if they set up threads, and if we go the Erlangish no-shared variables route, then suddently ==> looks like it's breaking lexical scoping | 14:33 | ||
otoh, if ==> is just a lazy list writ large, then lazy lists could break lexical scoping too... | 14:34 | ||
moritz_ kinda thought that the Perl 6 model was to share everything from outer scopes | |||
no idea how sane that is, though | |||
TimToady | well, that's not what ruoso++'s current model does | 14:35 | |
ash__ started reading the messages from ruoso and is not sure what perl 6s threading model will be | |||
moritz_ | TimToady: well, it's not in any S\d\d document yet, so I feel free to ignore it for a moment | ||
TimToady | we might be able to analyze use of an outer lexical and determine which thread is the reader and which is the writer | ||
moritz_ | what I miss from these proposals are examples | 14:36 | |
ash__ | that would be useful | ||
moritz_ | use cases, and how the proposed model handles them | ||
I'm not into die-hard concurrency terminology | |||
ash__ | he also mentions erlang and IO a lot and i am not familiar with those... i know they exist, but i haven't threaded with them before | ||
TimToady | and if ==> implies async, we probably want to force use of {} on one end or both | ||
ruoso always thought that ==> implies async | 14:37 | ||
moritz_ | so most of that is just abstract talk with not relation to reality - and kinda fits well into p6l (no offense meant) | ||
(at least to me it is) | |||
ash__ | ruoso: do you have any references for erlang i can glance over to understand their threading model better? | 14:38 | |
ruoso | ash__, www.c2.com/cgi/wiki?ActorsModel | ||
TimToady | but if so, you don't want (my @abc = ...; ...) ==> @abc sorts of lexical visibility, probably | ||
ruoso would be quite confused by that | 14:39 | ||
TimToady | {my @abc} ==> @abc would catch that | ||
that's assuming only the source is async | |||
I guess the default in Unix pipes is that the sink is sync, unless you put & | 14:40 | ||
ruoso | TimToady, agreed | ||
TimToady | but it's still a separate process to its shell | ||
so it can't make lexical vars for the shell | 14:41 | ||
ruoso | I have considered that when resolving outer variables inside a different thread, you would get a RemoteValue bvalue | ||
TimToady | I guess shell's & is spelled '==> sink' in p6 | 14:42 | |
ruoso | which means the actual variable manipulation would be delegated to the original thread | ||
pugssvn | r30620 | renormalist++ | Sync with github version rebased to upstream v6.2 | ||
14:42
dakkar left
|
|||
ruoso | TimToady, no... that'd be the equivalent to "> /dev/null" | 14:42 | |
TimToady | printing to the terminal is a mere side effect :) | 14:43 | |
moritz_ | just to make sure I understood that correctly, the parent and child threads are asymmetrical in that proposal? | ||
ruoso | "async { .... ==> ... }" would be the equivalent to & | ||
14:44
jotr^afk is now known as jotr
14:45
bubaflub joined
|
|||
ruoso | moritz_, the point is that there isn't child and parent threads... it's a plain list, not a tree | 14:45 | |
TimToady, sink is sync | |||
hejki | unless you have a master thread that runs a bunch of threads :) | ||
TimToady | I would like to have it both ways :) | ||
but from the standpoing of message passing policy, flat is pretty good | 14:46 | ||
ruoso | that's the point... | ||
not even the coroutines stack is a tree | |||
it's a flat list | 14:47 | ||
and coroutines waiting for a return value are simply blocked | |||
CPS ftw | |||
TimToady | structure is reflected in the names/locations of sources and sinks | ||
ruoso | precisely | ||
TimToady | and doesn't necessary have to be duplicated in thread table | ||
*rily | |||
ruoso | sources and sinks are the "pipes" | 14:48 | |
TimToady | Erlang has some nice properties which it would be good to steal, to the extent possible | ||
are the ends of the pipes | |||
ruoso | TimToady, yes... yes... I meant they are not the actual thing reading or writing to them... | 14:49 | |
TimToady | Erlang's threads are very lightweight, and you can run 100,000 without bogging down | ||
PerlJam makes a mental note to learn erlang next | |||
TimToady | the other property that is nice is that you can upgrade a module in place, and since the state is mostly reflected in the messages, the new module just fits in and takes up where the old one left off | 14:50 | |
we perhaps have more state that is not in message, so it might be harder for us | |||
moritz_ | you can't even run 100,000 iterations sequentially with Rakudo without bogging down :-) | ||
14:50
dakkar joined
|
|||
ruoso | TimToady, yes... I wouldn't try to natively support network-bound messaging yet... | 14:50 | |
(as things that would be harder to us) | 14:51 | ||
TimToady | it would be nice to hit a sweet spot that is extensible in various ways, though | ||
ash__ | would there be a N:M threading model? (where there are X schedulers running in kernel threads and M threads in each scheduler?) | ||
ruoso | one thing i still didn't think much about is how to share the data in the setting... | 14:52 | |
ash__, yes... where M are the coroutines in my model | |||
ash__ | got ya | ||
TimToady | most setting data is immutable | ||
unless you're speaking of the setting of the async | |||
ruoso | or the fact that the setting of the async is mostly the same as the setting of the calling coroutine | 14:53 | |
14:53
JimmyZ left
|
|||
ruoso | maybe we just assume that the setting should be immutable and thread-safe | 14:53 | |
TimToady | I think the setting of an async has to be the language in force at the point of the async, just like eval does by default | ||
predeclarations have to be visible | 14:54 | ||
that doesn't mean that any kind of access is allowed | |||
we can restrict access without restricting visibility, where such is necessary for sanity | |||
s/eval does/eval is supposed to do/ :) | 14:55 | ||
ruoso | and... compile-time optimizations might be sufficient... | ||
14:55
ashleydev joined
|
|||
TimToady | if static analyis can look at an outer construct and distribute it sanely over its users, sure | 14:55 | |
ruoso | if the symbol is known to come from the setting at compile time (and we do know it), we can have a different policy | ||
14:55
plobsing left
|
|||
TimToady | there are many settings, when you start talking about eval and friends | 14:56 | |
ruoso | otherwise it will have to ask the caller thread what does "infix:<+>" menas | ||
*means | |||
TimToady | no, that's lexical | ||
only macros have to worry about that sort of thing | |||
and other such generic code, like maybe roles | 14:57 | ||
ruoso | yes... it's lexical... but in { my $foo = 1; async { sleep 1; say $foo}; $foo = 2} | ||
it needs to ask the caller thread what $foo means | |||
but in { my $foo = 1; async { sleep1; say $foo + 2 }; $foo = 2 } | 14:58 | ||
TimToady | well, sure, but that's dynamic data, and yes, if you rebind &infix:<+> in the outer, then it has to ask about that too, unless we restrict that | ||
ruoso | it doesn't need to ask what infix:<+> is | ||
that was what I was talking about | |||
14:58
kel_ left
|
|||
ash__ | well, what about custom ops? | 14:59 | |
or multi's | |||
TimToady | all lexically scoped | ||
ash__ | wouldn't it need to ask about the ops? | ||
ruoso | and you know about'em at compile time | ||
TimToady | (again, unless explicitly rebound) | 15:00 | |
but we can recognize that and pessimize | |||
ruoso | ash__, if it's declared in another thread, it will need to ask to that thread for it... | ||
TimToady | but can cache an immutable | ||
just as it can cache the value of an immutable $*FOO | 15:01 | ||
ruoso | we can even make it thread-safe eventually | ||
the immutables, I mean | |||
TimToady | immutables work much better than mutables under multiprocessing of various sorts, but people like to program with mutables, so it's another balance fo concerns | 15:03 | |
*of | |||
ruoso | but there are a lot of immutables in a lot of places, even if people prefer mutables | 15:05 | |
TimToady | sure, and sometimes you can sneak 'em in and make 'em look mutable, as with strings | 15:06 | |
ruoso | for instance, as much as I like the idea of applying a Role to a method, I'd be pretty much confortable with requiring that to be made at declaration time | ||
so methods can be immutable | 15:07 | ||
TimToady | well, there's always 'use SLOW_MONKEYS;' | 15:08 | |
15:08
uniejo joined
|
|||
TimToady | and many things can be proven effectively immutable simply because nobody changes them anywhere in the application | 15:09 | |
if you do whole program analysis | |||
ruoso | (which is completely possible in Perl 6) | 15:10 | |
TimToady | which, in fact, we require for class finalization | ||
ash__ | will/should async provide a synchronization point mechanism? | ||
oh duh | |||
stupid question, thats the maybe/deferrer/contend | |||
TimToady | that does extend the lockless paradigm into shared objects, if we can work it out nicely | 15:12 | |
ruoso | the problem is making sure they are thread-safe | ||
TimToady | but we might have to put constraints and requirements on Responder Interfaces | ||
ruoso | thread-safeness can be a target for code in the setting, otoh | 15:13 | |
TimToady | or tell the RI "you aren't allowed to participate in STM" | ||
one could go as far as to manage foreign data with before-and-after snapshot comparisons, provided there's a way to reset to 'before' state | 15:14 | ||
and someday it could potentially integrate into a well-behaved database interface | |||
ruoso | that's what STM does... and it's way too complicated | ||
TimToady | well, but the other way just has different complicatoins | 15:15 | |
I like the sandwich model that does STM on top and messages on the bottom | |||
ruoso | the issue is how deep the complications are... | ||
TimToady | with a scheduler as the filling | ||
ruoso | hmmm... STM on top?... | 15:16 | |
15:17
molaf_ left
|
|||
TimToady | the phrase to google is "unify events and threads" | 15:19 | |
unfortunately the original article seems to have disappeared from upenn | |||
ruoso just loves when "I'm feeling lucky" returns a paper | |||
TimToady | *unifying events and threads | 15:21 | |
LtU has some discussion, even if you can't get at the original | |||
ruoso | hah! that's the same article you pointed me three years ago... :D | 15:22 | |
ash__ | what if you made each thread a share nothing threading, and they have to ask for things from the rest of the world via contend blocks, or is that to cumbersome? | ||
15:22
molaf joined
|
|||
ruoso | ash__, the idea is making it transparent to the user | 15:22 | |
15:22
uniejo left
|
|||
ruoso | i.e.: make them easier then Perl 5 shared variables | 15:23 | |
15:23
hercynium left
|
|||
ruoso | ash__, it kinda works like that, but it's hidden by a "RemoteValue" object | 15:23 | |
ruoso lunch & | 15:24 | ||
ash__ | i am just thinking of how to keep the threads as light weight as possible, doesn't erlang (i could be completely wrong on this) do a share nothing? and everything each thread does know about, it became aware of through a message queue? | ||
ruoso | ash__, a RemoteValue isn't aware of the other thread... it's a proxy to a message queue | 15:25 | |
ash__ | ah, got ya | 15:26 | |
15:26
molaf left
|
|||
ash__ | so your just doing that automatically thats cool | 15:26 | |
moritz_ | \o/ I've got support from TPF for buying t-shirts for new Perl 6 contributors | 15:43 | |
colomon | moritz_++ | ||
moritz_ | TPF++ | 15:44 | |
masak | \o/ | 15:45 | |
TimToady | *o* <-- waving pompoms | 15:53 | |
ash__ | neat | ||
if you want to buy one, how would this be accomplished? | |||
moritz_ | rakudo.spreadshirt.com/ | 15:54 | |
there are other shops too | |||
k23z__ | what's a second system ? | ||
moritz_ | there's a wikipedia entry about that | 15:55 | |
en.wikipedia.org/wiki/Second-system_effect | |||
clintongormley | hi all, i'm hoping that somebody can answer a not-perl-related-at-all question | ||
it's about unicode and DUCET | 15:56 | ||
masak | sounds like a question for #unicode-and-ducet :P | ||
clintongormley | if only that existed ;) | ||
masak | sorry; carry on. :) | ||
clintongormley | ok - the thing i'm trying to do is to sort search results by 'name', where 'name' can contain characters from pretty much any language | 15:57 | |
results are being returned from a Lucene based full text search | |||
Su-Shee offers a tissue. you will cry. | |||
clintongormley | heh yeah :) | 15:58 | |
unfortunately, java's unicode library (ICU) doesn't seem to support DUCET | |||
just to clarify, if i've understood it correctly, DUCET is a best-attempt at sorting across most scripts | |||
moritz_ | Unicode::Collate | ||
clintongormley | moritz_: yeah, except this is coming from java | 15:59 | |
Su-Shee | return it unsorted and pipe it through something else. | ||
clintongormley | so best solution would be (1) somebody saying, oh you do it like this with ICU, or failing that (2) this is how you can store the strings, so that an ordinary sort would fix it | 16:00 | |
Su-Shee: the problem is the number of results. it'd be much more efficient if i can do this inside lucene | |||
so i'm thinking something like: 'João' would get stored as 'joa2o', while 'joan' would become 'joa1n' | 16:01 | ||
is this something I could hijack Unicode::Collate to do? | |||
Su-Shee | die DUCET wikipedia article says, ICU can do it. | 16:02 | |
clintongormley looks again | |||
moritz_ | "#perl6 - we are not afraid of Unicode" | ||
isn't that a nice slogan? | |||
clintongormley | Su-Shee: as far as I understand it, ICU supports the Unicode collation algorithm, which is a baby brother to DUCET | 16:03 | |
although, this is from piecing together bits of info from 4 billion websites, so may well be wrong | |||
Su-Shee | clintongormley: I'm googling around as well.. | 16:04 | |
clintongormley | ICU seems to require knowing the language up front | ||
Su-Shee | hm. the icu website says nothing about ducet. no good sign. | ||
clintongormley | yeah :( | ||
16:04
jonrafkind joined
|
|||
clintongormley | (again, apologies for hijacking #p6 for this) | 16:04 | |
16:06
araujo left
|
|||
Su-Shee | you can pay #perl6 by writing a something nice for it some day. ;) like, let's say a cool text processing framework. :) | 16:06 | |
clintongormley | sure, can you do it by tuesday? ;) | 16:07 | |
oh whoops, i misread that | |||
moritz_ | sure; depends on the Tuesday you mean :-) | ||
clintongormley notes that moritz_ resembles a lazy operator | |||
moritz_ would rather be a lazy meta operator | 16:08 | ||
the moperator! | |||
16:10
masak left,
justatheory joined
|
|||
moritz_ | it seems that the Unicode collation algorithm needs a table | 16:11 | |
and ducet is just the default | |||
so I'd assume that icu uses ducet by default if it sorts | |||
clintongormley | i think it uses ducet's baby brother | ||
which is about 10kB instead of 100kB | |||
and doesn't sort João correctly | 16:12 | ||
Su-Shee | hm, I found a blog entry about icu which at least seems to assume that the c++ version works | 16:14 | |
clintongormley | link? | ||
Su-Shee | also, it seems that you want UCA and not DUCET | 16:15 | |
here: useless-factor.blogspot.com/2007/12...icode.html | |||
16:16
cdarroch joined,
cdarroch left,
cdarroch joined
|
|||
moritz_ wonders if decomposing and sorting isn't a sufficient approximation | 16:16 | ||
or maybe decomposing, removing all marks, and then sorting | |||
clintongormley | hmm, so according to that blog DUCET is the data table for the UCA. I thought the UCA was like a subset of DUCET | ||
16:17
cotto_w0rk left
|
|||
Su-Shee | clintongormley: I'm so very much not sure :) | 16:17 | |
moritz_ | UCA is an algorithm; DUCET is a table | ||
clintongormley | moritz_: yes, removing the marks may be a reasonable approximation | ||
16:17
cotto_w0rk joined,
cotto_w0rk is now known as cotto_work
|
|||
clintongormley | i wonder how it will work with Cyrillic though | 16:17 | |
(we have a russian site as well) | 16:18 | ||
Su-Shee | we sort per language only. | ||
k23z__ | "Nulla dies sine linea" | 16:19 | |
clintongormley | the problem is, i'm running several websites off a single DB and a single full text engine. so different languages get stored in the same field, and for performance, should be analysed (for later sorting) at the time it is stored | 16:20 | |
Su-Shee nulled plenty of lines today while refactoring. ;) | |||
clintongormley | thanks for the help all, and apologies again for the interruption. just know that you guys are valued :) | ||
moritz_ | clintongormley: normal form KC should help you then | ||
... and gals, please | |||
clintongormley | moritz_: thanks - will check it out | ||
Su-Shee | clintongormley: do you _really_ need sorting mixed by languages? | 16:21 | |
if not, I wouldn't even store different languages in one field and instead separate them and optimize per language. | |||
16:21
araujo joined
|
|||
clintongormley | Su-Shee: yeah, would mean rewriting my app completely, so don't want to go down that road | 16:22 | |
Su-Shee | and btw.. what db? | ||
clintongormley: well if it doesn't really work.. do it early and spare you many headaches later. | |||
clintongormley | i'm using mysql, which actually has a decent unicode collation based on ducet. it does the right thing | ||
Su-Shee | clintongormley: and mysql doesn't have a fulltext search? | ||
clintongormley | but we're switching the full text search to ElasticSearch (based on Lucene) which is why i'm hitting these issues | 16:23 | |
Su-Shee | clintongormley: we simply use the postgres fulltext search for our stuff. | ||
clintongormley | FTS on MySQL is slooooow, and not terribly good | ||
moritz_ | it does, but it's not comparable to a proper search engine | ||
clintongormley | it's fine with small datasets, but not now | ||
6 million objects | |||
Su-Shee | well right now, you lucene doesn't seem to work at all :) | ||
clintongormley | sometimes it'll lock up for 50 sec +, which also stops all updates :( | ||
16:23
araujo left
|
|||
clintongormley | Su-Shee: one part of Lucene :) | 16:23 | |
16:24
araujo joined
|
|||
Su-Shee | well I can tell you we _have_ all languages in one field and this doesn't help you with anything and only causes nuisance and headaches and sucks big time. | 16:24 | |
16:26
araujo left
16:27
araujo joined
16:28
_Vi joined
|
|||
_Vi | perl -pe 'commands' Which perl6 invocation corresponds to this? perl6 -pe 's/q/w/' doesn't work. | 16:28 | |
moritz_ | _Vi: most command line options aren't implemented in Rakudo yet | 16:29 | |
_Vi: S19 contains the gory details | |||
_Vi | So perl6 can't be used for simple sed-like oneliners now? | ||
Su-Shee | if I wanted to do a perl 6 art project, I'd print the specs by number on their city train counterparts. ;) | 16:30 | |
_Vi: no, only for huge powerful parsing stuff. | |||
moritz_ | _Vi: masak wrote a module that fakes those... | ||
_Vi | E.g. I want to do "perl -i * -pe 's/Qqq/Www/i' but with features of Perl6 regexes (like :ii). | ||
moritz_ | _Vi: github.com/masak/pun/ | ||
and :ii isn't implement yet either :( | 16:31 | ||
however Str.samecase is | 16:33 | ||
_Vi | moritz_, Does this document (perlgeek.de/en/article/5-to-6) describes which things are already done in Perl6 or just planned? | ||
moritz_ | _Vi: planned | ||
to quote from the first sub-article: "It is also not oriented on the current state of the implementations, but on the ideal language as specified." | 16:35 | ||
16:35
envi^home left
|
|||
_Vi | moritz_, How much of Perl6 is approximately done and when will it be ready? [in about 5 years?] | 16:36 | |
moritz_ | "enough to use it in some cases, never enough" | 16:37 | |
and readiness strongly depends on your needs | |||
16:38
k23z__ left
|
|||
cotto_work | Is there a likely date for the Rakudo * release or is that still unknown? | 16:38 | |
moritz_ | cotto_work: "June" | 16:39 | |
cotto_work | How firm is that? | ||
moritz_ | I haven't seen any indication for it being moved | 16:40 | |
cotto_work | (I'm gathering dates to figure out when the best time for Parrot to move to Git is with minimal disruption to Parrot-based projects.) | ||
ko | 16:41 | ||
ok | |||
16:41
_Vi left
|
|||
[Coke] | (for future reference, if someone is having trouble contacting their TPF grant manager, ping me. I am on the GC.) | 16:45 | |
clintongormley | hah! Unicode::Collate rocks! $sortKey = $Collator->getSortKey($string) | 16:48 | |
colomon | [Coke]: you do garbage collection for TPF? | 16:49 | |
;) | |||
Su-Shee | clintongormley: well perl loves you. ;) | 16:50 | |
clintongormley | and boy do I love Perl :) | ||
Su-Shee | so you're throwing away your java? good boy :) | ||
clintongormley | nope - ElasticSearch works really well - me likee. it's the first java project that has made me go, hmm, interesting | 16:51 | |
moritz_ | .oO( KinoSearch ) |
||
Su-Shee | someone in a stack overflow thread called java the cobol of the 21st century ;) | 16:52 | |
clintongormley | KinoSearch has faltered, last I looked. and its unicode support was pretty poor (nonexistent?) | ||
moritz_ | KinoSearch is currently being revamped in a branch | ||
clintongormley | ok | ||
moritz_ | of which there are development releases | ||
clintongormley | the guy who wrote ElasticSearch has done a really nice job of making it DWIM, and easy to use, and scalable | 16:53 | |
moritz_ | the old one was pretty limited; I've planned to use the new one to re-do the search in th IRC logs | ||
bubaflub | moritz_: yesterday you asked me to add some tests for pairs being assigned to variables that have twigils | ||
some of those twigils are for class variables (like public and private) stuff | 16:54 | ||
moritz_ | bubaflub: not being assigned to, but built from | ||
bubaflub | oh, ok | ||
clintongormley | moritz_: you should check out elasticsearch, it's got a lot going for it. JSON REST API | ||
i've written a Perl interface : search.cpan.org/~drtech/ElasticSear...cSearch.pm | |||
moritz_ will take a look | 16:55 | ||
clintongormley | www.elasticsearch.com | ||
moritz_ | bubaflub: and yes, some of them are attributes | ||
rakudo: class Foo { has $!a; method pair { :$!a } }; say Foo.new(a => 5).pair.perl | 16:56 | ||
p6eval | rakudo ed2409: OUTPUT«Symbol '$!a' not predeclared in paircurrent instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
moritz_ | that should return 'a' => 5 | ||
pmichaud: is there a way to apply an external modifier to a regex? | 16:57 | ||
pmichaud: I want to implement $str.subst($re, '', :ii) - which requires setting the :ignorecase modifier on the regex | |||
16:59
_Vi joined
17:00
[mark] left
17:06
alester joined
17:11
pmurias joined
|
|||
pmurias | diakopter: hi | 17:11 | |
17:11
k23z__ joined
17:12
SmokeMachine joined
|
|||
bubaflub | moritz_: should that be a skip test then? | 17:16 | |
moritz_ | bubaflub: yes | ||
bubaflub | ok, i'll add some tests to S02-literals/pairs.t | 17:17 | |
diakopter | pmurias: hi | ||
pmurias: no I didn't switch to git-svn, why | |||
17:18
hercynium joined,
SmokeMachine left
17:19
stephenlb joined
|
|||
pmichaud | moritz_: not yet, no. | 17:20 | |
17:20
ash___ joined
|
|||
pmichaud | moritz_: and I haven't quite figure out how to make modifiers work on already-compiled regexes. | 17:20 | |
because it involves changing the regex code. | 17:21 | ||
17:21
ashleydev_ joined
|
|||
moritz_ | store the original text, and recompile? | 17:21 | |
sorear | pmichaud: we seem to be running on skewed schedules here... shall I take the patch discussion to e-mail? | ||
17:21
ashleydev left
|
|||
moritz_ | probably not that easy, because of lexical context... | 17:21 | |
pmichaud | sorear: sure, that works. I would've answered last night but I was having internet and flooding issues at home. | 17:22 | |
pmurias | diakopter: when using git-svn you first commit to your local copy of the repo and then push the commits "dcommit" to the central server | 17:23 | |
pmichaud | for example, I was going to answer via the rt ticket, but ran into problems there. | ||
17:23
Chillance joined
|
|||
diakopter | pmurias: oh, yes. | 17:23 | |
pmurias | diakopter: 6 commits in a short time span looked like a dcommit | ||
diakopter | :) | ||
17:24
ash__ left
|
|||
PerlJam | pmurias: could have been SVK too :) | 17:26 | |
pmurias | isn't SVK dead? | 17:27 | |
PerlJam | It isn't dead if people are using it. (I have no idea if people are using it) | 17:28 | |
pmichaud | what if only dead people are using it? | ||
PerlJam | Then it's good that we live in Texas where there are guns-a-plenty to take care of the zombies. | 17:29 | |
sorear | this is quite surreal. perfectionism has *always* been my greatest coding failure | 17:30 | |
and now pmichaud is complaining that I'm being too short-term. | 17:31 | ||
pmichaud | no, just that it doesn't see a larger picture :) | ||
and it's not really a complaint, it's more of a "comment from the designer" | |||
PerlJam | sorear: you're a short-term perfectionist? | 17:32 | |
17:34
SmokeMachine joined
|
|||
bubaflub | moritz_: here's a gist of my diff for the test, not sure if this is what you want gist.github.com/397483 | 17:36 | |
17:44
iblechbot joined
17:48
SmokeMachine left
17:50
_Vi left
17:51
SmokeMachine joined
|
|||
sorear | pmichaud: since you seem to be here right now. 1. In !UNIT_START, you propose using a contextual to figure out where to load code. I'm not sure I follow - surely lexical scoping is a static property? | 17:53 | |
17:55
hercynium left
|
|||
pmichaud | except in the case of interactive mode | 17:55 | |
at any rate, we always have .set_outer to be able to explicitly set the lexical scope of a Parrot sub | 17:56 | ||
sorear | in the output it's static, though | ||
since, as soon as the parser starts to process some code, it has to commit to the correct lexical scope | |||
old-rakudo didn't do this, but it's necessary for sigilled variables | |||
pmichaud | sure, but we can tell the parser of any existing lexical scope | ||
sorear | yes | 17:57 | |
pmichaud | we already have to do that, e.g., for 'use' modules | ||
sorear | the parser knows the lexical scope - why shouldn't it tell !UNIT_START directly? | ||
pmichaud | because the parser isn't the thing responsible for calling !UNIT_START | ||
more to the point, it shouldn't be that. | |||
sorear | the parser... currently is the thing responsible for setting up !UNIT_START | 17:58 | |
pmichaud | it is? | ||
pmichaud looks | |||
sorear | src/Perl6/Actions.pm +75 | 17:59 | |
pmichaud | looks to me like the actions do it. | ||
right, that's not really "the parser" | |||
that's the "compiler" or "translator" | |||
sorear | I consider the actions part of the parser | ||
they're completely inseperable | |||
pmichaud | they're not. Or more to the point, they shouldn't be inseperable. | ||
sorear | ok, then | 18:00 | |
18:00
hercynium joined
|
|||
pmichaud | the actions cannot live without the parser, but the parser should be able to live without the actions. That's part of the theory behind STD.pm. | 18:00 | |
sorear | the *compiler* needs to commit to a lexical scope immediately | ||
pmichaud | sure, no problem. | ||
sorear | so why shouldn't the *compiler* tell !UNIT_START? | ||
pmichaud | because the compiler also isn't responsible for invoking !UNIT_START | ||
18:00
sahadev joined
|
|||
pmichaud | it generates code that invokes !UNIT_START< yes. | 18:01 | |
but more generally, I believe that having a working REPL is something that ought to be doable across all HLLs | |||
and that each HLL shouldn't have to roll its own from scratch | |||
18:01
SmokeMachine left
|
|||
pmichaud | thus the core pieces of the REPL should be in the HLL::Compiler object | 18:01 | |
!UNIT_START is purely a Rakudo feature | 18:02 | ||
sorear | you have this wonderful and lofty goal, but I can see absolutely no way to implement it | ||
pmichaud | I see how to implement it though. | ||
sorear | would you please tell me? | ||
compilers differ far too much; I don't see how to pass an initial lexical scope to an arbitrary compile | 18:03 | ||
18:03
am0c left
|
|||
sorear | compilers differ too much; I don't see how to extract the "inner lexical scope" from compiled output to pass to the next compilation | 18:03 | |
pmichaud | in the PCT/NQP world, it would be done via a dynamic variable that holds the current lexical scope | ||
the compiler would then be able to look up things in that lexical scope | 18:04 | ||
this already happens -- e.g., for eval() | |||
when we compile a string in eval(), all we have is the existing dynamic scope of whatever is calling eval. | 18:05 | ||
18:05
ShaneC joined
|
|||
pmichaud | indeed, arguably Rakudo's eval() and the interactive mode should end up using very similar (ideally identical) mechanisms for this. | 18:06 | |
18:06
SmokeMachine joined,
ShaneC left,
ShaneC joined,
ShaneC left
|
|||
pmichaud | to that end, there's potentially an argument to be made that HLL::Compiler's eval should be lexically aware, and able to easily pass outer lexical context information to the compiler it invokes. | 18:08 | |
18:08
sahadev left
18:10
hercynium left
|
|||
sorear | so all that's needed is the back hook | 18:10 | |
pmichaud | right, and a reasonable API for using it | 18:11 | |
sorear | given: a PAST::Node tree returned from (some compiler) | ||
how do we: find the new value of outer_ctx | |||
pmichaud | I think the question doesn't quite fit | ||
at the point of evaluating code, we already know an outer_ctx | 18:12 | ||
sorear | find the *new* value of outer_ctx | ||
which is inner to the current code | |||
pmichaud | oh, we don't get that from a PAST::Node tree | ||
we get that from the Parrot Sub object | |||
or, from a context | 18:13 | ||
at runtime, we have Parrot Subs | |||
sorear | where in HLL::Compiler does the "get that" code fit? | ||
Tene | not all compilers will necessarily use PAST, remember | ||
18:13
patspam joined
|
|||
pmichaud | in interactive mode, we compile some source down to a Parrot executable sub, then invoke that sub, and keep the sub around to be used as the outer context for the next line of interactive input | 18:14 | |
Tene | Ah, nice. | ||
I see. :) | |||
pmichaud | when the next line comes in, we compile the source (having the previous outer sub stashed away in a dynamic variable somewhere), the compiler can make use of the lexical information in that outer sub, it compiles to a new sub that is returned to interactive mode, interactive mode then invokes the new sub and keeps it around to be used as the outer context for the next line of interactive input | 18:15 | |
and so on... | |||
PerlJam | pmichaud: does that preclude "incomplete" lines in interactive mode? | 18:16 | |
pmichaud | PerlJam: not at all | ||
TimToady | that'll screw up all your OUTER::s | ||
PerlJam | you just wait until an appropriate sequence point before compiling and executing? | ||
ash___ | i don't think winxed uses PAST, i think it has its own system for emiting PIR, if i am not mistaken | ||
pmichaud | it just means that interactive mode has to work with the grammar a bit more to be able to detect when it has a complete statement. This is somewhat anticipated by the 'moreinput' method in STD.pm | ||
TimToady: yes, OUTER::s are a bit of a problem with this approach. I'm aiming to crawl before running. | 18:17 | ||
TimToady | why not just have the compiler call the evaluator on the sub-tree like you'd do for BEGIN? | ||
pmichaud | TimToady: we could potentially have each newly compiled sub duplicate its outer lexical context and then discard the old outer. | ||
TimToady | then you don't have to play any games with scopes--it's just there | ||
18:18
ethel joined
|
|||
pmichaud | TimToady: right now we have a problem with BEGIN being able to affect its outer lexical scope as well. | 18:18 | |
for similar reasons. | |||
TimToady | in p6 BEGIN isn't even required to have a lexical scope | ||
std: BEGIN my $x = 2; | |||
p6eval | std 30620: OUTPUT«ok 00:01 113m» | 18:19 | |
sorear | pmichaud: simply using the previous compiled sub as the lexical outer won't work | ||
pmichaud | sorear: why not? | ||
sorear | because rakudo generates an inner lexical scope | ||
my $x = 2 becomes UNIT_START({ my $x = 2 }) | |||
more or less | |||
18:19
SmokeMachine left
|
|||
pmichaud | sorear: yes, why is that a problem? | 18:19 | |
sorear | because $x is not lexically visible at the level of the UNIT_START | 18:20 | |
so it won't be visible in subsequent lines | |||
pmichaud | I mean, I can fix the compilation process so that the compiler can designate the correct scope | ||
just a sec | |||
sorear | "I" can? You seem to be taking a lot onto yourself | ||
18:21
yahooooo7 left
|
|||
pmichaud | I don't follow that last comment. | 18:21 | |
18:22
yahooooo joined
|
|||
pmichaud | if it helps, s/I/we/ as appropriate. | 18:23 | |
sorear | ok | ||
pmichaud | but it's entirely possible for us to set it up so that the correct block is used as the outer scope | 18:24 | |
Juerd | "We don't follow that last comment."? Confusing ;) | ||
pmichaud | indeed, the simplest way to do it might be to have !UNIT_START set a dynamic variable that says "use the block I received as a parameter as the outer_scope for any subsequent eval" | 18:25 | |
(and this can be done entirely without modifying the current AST generation) | 18:26 | ||
18:28
bubaflub left,
bubaflub joined
|
|||
TimToady | is the current AST capable of representing BEGIN my $x = 1; without curlies? | 18:28 | |
pmichaud | TimToady: the AST, yes. But Parrot isn't currently capable of executing things outside of a lexical context. | 18:29 | |
i.e., we always have some sort of (complete) context that we're executing in. Yes, it's a big problem that we've not yet addressed. | |||
rakudo: my $x; BEGIN { $x = 5; }; say $x | 18:30 | ||
p6eval | rakudo ed2409: OUTPUT«Symbol '$x' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
sorear | should I feel dissuaded from attempting to address this problem? | ||
pmichaud | which problem? | ||
sorear | lack of protolexpads | ||
pmichaud | that would be a very nice problem to have addressed, so no, please do not feel dissuaded. :-) | 18:31 | |
TimToady | +1 | ||
pmichaud | but I will say that it will involve going completely around the default Parrot lexicals implementation | 18:32 | |
it likely will involve dynlexpads of some sort, and then the compiler will need to be able to merge that dynlexpad into a "normal" lexpad as it gets to the CHECK phase. | |||
PerlJam | So ... how much "going around parrot" equals "switching vms"? :) | 18:33 | |
pmichaud | PerlJam: that remains to be seen :) | ||
sorear | pmichaud: I see a problem with your set_outer REPL. | 18:35 | |
set_outer needs there to be a call frame for the sub somewhere in order for lexpads to work | |||
this works for 'eval', because the sub that called eval is running (duh) | 18:36 | ||
this works for !YOU_ARE_HERE, because !YOU_ARE_HERE itself is running (even if the mainline isn't) | |||
this won't work for just passing the previous sub to set_outer the new one | |||
pmichaud | sorear: currently Parrot stores the call fram as a property of the sub. | ||
*call frame | |||
so it's available, even after the sub exits. | |||
18:37
hercynium joined
|
|||
sorear | what. | 18:37 | |
OK. | |||
pmichaud | even if we decide not to use that because it's too icky, we can set up a simple call in the mainline code to keep track of the callframe (a-la eval), and do that on every execution, not just interactive ones | 18:38 | |
sorear | that's a memory leak waiting to happen, but it's good enough for now | ||
pmichaud | I agree, it's a memory leak, but it's a parrot design issue. | ||
chromatic has looked at it somewhat extensively and backed away from changes as being pretty involved. | |||
diakopter garners helpful intel from this convo | |||
pmichaud | but parrot will need to resolve that eventually. at any rate, we can either store the call frame or use parrot's method of doing it | 18:39 | |
*sigh* wife is calling me for some assistance -- I'll be gone another hour or two | |||
18:40
sahadev joined
|
|||
pmichaud | bbl | 18:40 | |
18:41
athomason joined
18:43
SmokeMachine joined,
justatheory left
|
|||
sorear doesn't know how to feel about how his ideas get completely redesigned | 18:43 | ||
diakopter | ours is not to question why | 18:44 | |
sorear | parse error | ||
TimToady | mys is but to gather or fail | 18:45 | |
sorear | parse error | ||
PerlJam | sorear: get used to communication through implication and pun around here :) | ||
18:45
sahadev left
|
|||
TimToady | for those following along at home, we've been having allusions to en.wikipedia.org/wiki/The_Charge_of...ade_(poem) | 18:46 | |
18:46
dakkar left
|
|||
mdxi | Use Your Allusion | 18:46 | |
TimToady | the spoon is an allusion | ||
18:46
sahadev joined
|
|||
pmichaud | Allusion Randal? | 18:47 | |
(ideas completely redesigned) I can probably make the same claim. :) | 18:48 | ||
(back for a bit.. turns out wife wanted me to be _ready_ to leave in a few minutes) | 18:49 | ||
TimToady | I presume you are likely to miss the phone call | ||
pmichaud | actually, probably not. I'll probably be riding in a vehicle. | ||
Paula has an errand to run this afternoon and needs someone to accompany her; she was going to take our son (so I can stay and work), but he's now going to a friend's house so I'm the only one left. | 18:50 | ||
18:51
ive joined
18:53
patrickas joined
|
|||
pmurias | TimToady: re Any.say what's the rationale for the invocant in Any.say being the thing to be printed and in IO.say the invocant being the thing doing the printing | 18:53 | |
18:53
ive left
|
|||
pmurias | TimToady: sorry if that's excess bikeshedding | 18:54 | |
18:54
kel joined
18:56
kel left
|
|||
TimToady | I just think that's one of those places where typical users will prefer it to dwtm rather than be perfectly consistent | 19:01 | |
colomon | "do what TimToday means"? ;) | ||
TimToady | most english speakers are used to sorting out the arguments to a verb by meaning anyway | ||
and most verbs are rather heavily overloaded on valences | 19:02 | ||
colomon | (agree 100% with TimToady here, for what it's worth.) | ||
19:02
pyrimidine joined
|
|||
TimToady | nobody writing 42.say is going to expect file descriptor 42 to try to do the IO | 19:02 | |
colomon | Can Any.say take arguments? | 19:03 | |
that is to say, if I say $a.say: blueberry | |||
TimToady | it might take an optional IO handle :) | ||
pmichaud | alternatively, does IO.say require an argument? | 19:04 | |
colomon | thinking $a is an IO and it's actually something else, that's an error, right? | ||
TimToady | I would tend to think that Any.say wouldn't be looking for a slurpy | ||
pmurias | $a being an IO and assuming that's it something that can stringify and calling $a.say would be the quiet error | 19:06 | |
TimToady | maybe an output handle carps if you stringify it | 19:07 | |
colomon | If Any.say wants no arguments (or at most an IO object), and IO.say must have an argument, making the double error required to use it wrongly seems unlikely. | ||
TimToady | I think this bikeshed lives on a remote desert island. | 19:08 | |
19:09
SmokeMachine left
|
|||
pmurias | perl6: $OUT.say(); | 19:09 | |
p6eval | rakudo ed2409: OUTPUT«Symbol '$OUT' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
..elf 30620: OUTPUT«Global symbol "$OUT" requires explicit package name at (eval 122) line 3. at ./elf_h line 5881» | |||
..pugs: OUTPUT«» | |||
pmurias | perl6: $*OUT.say(); | ||
p6eval | elf 30620, pugs, rakudo ed2409: OUTPUT«» | ||
colomon | rakudo: $*OUT.say | 19:10 | |
p6eval | rakudo ed2409: OUTPUT«» | ||
colomon | I'd say it was worth making that not work to avoid confusion. | 19:11 | |
TimToady | so we want a + slurpy instead of a * slurpy :) | ||
colomon | :) | ||
19:12
kel_ joined
|
|||
colomon | slurpy where { ?@slurpy } | 19:12 | |
TimToady | or that | ||
or *$, *@ | 19:13 | ||
colomon | (I assumed your smiley meant + slurpy was a hypothetical, not a language feature I wasn't aware of. :) | ||
TimToady | yes, but it's been thought about several times by now | ||
since the * is, in fact, a pattern quantifier, more or less | 19:14 | ||
ruoso | one can always declare :($a, *@a) | ||
19:15
ashleydev_ left
|
|||
TimToady | though it's silly to have to split it into two variables just to get that behavior | 19:16 | |
19:16
Trashlord left
|
|||
ruoso | there's just one point that holds my opinion... | 19:17 | |
*@a might be entirely lazy | |||
TimToady | rakudo: multi foo() { say "You're ugly." }; multi foo(*@a) { say ~@a }; foo() | ||
ruoso | +@a would require at least one item being evaluated | ||
p6eval | rakudo ed2409: OUTPUT«You're ugly.» | ||
TimToady | multi dispatch already does what we want here though. | ||
ruoso | I'd better have :($a, *@a) to make it explicit about the eager evaluation of first item of the capture... | 19:19 | |
TimToady | I'm not worried, because Perl 6 is not about strict laziness | 19:20 | |
we just have mostly lazy and mostly eager, most of the time | |||
and it is erroneous to assume that a lazy list cannot work ahead in batches | 19:21 | ||
sorear | in perl 6, laziness is an operational concept | 19:22 | |
you can't generally have _|_ in lists | |||
TimToady | we generally try to avoid the bottom of the barrel... :) | ||
but it is a bit FP oriented, insofar as we assume that working ahead in batches doesn't matter if the list is philosophically immutable | 19:23 | ||
19:24
clintongormley left
|
|||
TimToady | I guess Nil is about as close as we get to _|_ | 19:25 | |
and even Nil is lazy about deciding whether it's in scalar or list context | 19:26 | ||
turns into a placeholder arg in item context, but not in list context | |||
and in a parcel, isn't committed yet | 19:27 | ||
colomon | woah, that's actually a big complication for lazy lists, isn't it? | 19:28 | |
just occurred to me. | |||
TimToady | I suppose Nil's bottomliness is one way to explain why 'my Foo $x = Nil;' works | ||
19:28
_Vi joined
|
|||
colomon | any of the examples we just came up with involve getting the first element from the list. | 19:28 | |
but if it's a "forget about it" list, that first element is now lost. | 19:29 | ||
particularly sucky if it's happening in the middle of multi dispatch. | |||
pmichaud | colomon: which is why I've been saying it has to do with binding :-) | ||
TimToady | that's why binding is a form of pattern matching that can involve backtracking | ||
pmichaud | if it's being bound, then the "forget about it" semantic gets changed | ||
colomon | pmichaud: but it's not bound until it matches, is it? | ||
pmichaud | colomon: attempted binding, then. | 19:30 | |
TimToady | and it gets more complicated with repeated binding such as map does | ||
colomon | but then how can you ever not bind it? | ||
pmichaud | colomon: but yes, this is one of the huge complication features of lazy lists :-) | ||
TimToady | and I still have to spec capture cursors... | ||
colomon | (in a sub call) | ||
I guess there's no reason we can't unshift on lists, so something like that can handle it without binding. | 19:33 | ||
TimToady | unget, but yes | 19:35 | |
to the first approximation, all arrays and all lists have (at least potentially) a reified region and a lazy region | 19:36 | ||
they just differ in API | |||
however, we do have a slight problem if we commit a capture to slurping at some point, and then want to back that out and bind non-slurpy | 19:37 | ||
maybe candidate ordering precludes this, generally | |||
but maybe not | |||
19:37
_Vi left
19:38
SmokeMachine joined
|
|||
sorear | bottom = nontermination | 19:39 | |
1, 1, 2, (while 1 {}), 3 | |||
the categorical/poset model of the lambda calculus is truly a thing of beauty | 19:40 | ||
hrm. pmichaud's approach seems to require me making two patches, sending them to two trackers, and getting approval twice from two sets of people | 19:43 | ||
pmichaud | ? | ||
sorear | HLL::Compiler doesn't live in the rakudo repo | 19:44 | |
pmichaud | sorear: yes, this is true. | ||
sorear: that's really no different from Rakudo changes that require fixes/improvements to Parrot, though | |||
we do have to strike a balance between language interoperability and the needs of Rakudo itself | 19:45 | ||
and since nqp-rx and rakudo currently have the same pumpking, it only requires one approval :-) | 19:46 | ||
sorear | what about PCT? | ||
pmichaud | that's still part of Parrot, yes. | ||
although I'm the nominal pumpking for that as well | 19:47 | ||
eventually significant portions of pct may move to nqp-rx ; it's just not a pressing need at the moment | |||
sorear | I actually meant PCT::HLLCompiler :/ | ||
pmichaud | oh, that's definitely moving | ||
I just haven't had time to do it | |||
but HLL::Compiler overrides PCT::Compiler, so changes can easily go there | 19:48 | ||
it doesn't have to be fixed in PCT::Compiler | |||
er, PCT::HLLCompiler | |||
also, ideally the code for HLL::Compiler should be written in nqp instead of PIR :-) | |||
and, of course, any HLL compiler (e.g., Rakudo) can override methods from HLL::Compiler, and we can see about backporting them into nqp-rx | 19:49 | ||
(as long as they've been written with backporting in mind, of course) | |||
sorear wonders if all of PCT should be moved to nqp-rx | 19:50 | ||
following all the conditional jumps in PAST::Compiler gets confusing after a while | |||
pmichaud | well, moving PCT (at least PAST) into nqp has been a goal of mine. as I said, it's not a pressing need, since what we have now works fairly well. | 19:51 | |
I think the next major thing that ought to be done is to start eliminating pir::opcode() in favor of nqp::opcode() | 19:53 | ||
that way nqp can decide how best to translate to the underlying vm, instead of requiring PIR directly. | |||
19:53
_Vi joined
|
|||
jnthn is back from talking/pizzaing. | 19:54 | ||
sorear | pmichaud: In your alternate world where neither the parser nor the compiler knows that it's running in the REPL, how does autoprinting work? | ||
pmichaud | the interactive mode calls a method on the compiler object to display the results that it received back from the code execution | 19:55 | |
self.'autoprint'(result) or something like that | |||
19:55
bubaflub left
|
|||
pmichaud | each compiler can then override autoprint to do whatever it thinks is the right thing | 19:55 | |
jnthn | pmichaud: That sounds quite clean. | ||
sorear | So only one value should be printed per loop through the compiler? | ||
pmichaud | (and there's a default one that simply stringifies and displays on stdout) | ||
sorear | *interactive | ||
pmichaud | ? | 19:56 | |
"only one value"? | |||
sorear | > 2+2; 3+3 | ||
4 | |||
6 | |||
pmichaud | oh yes | ||
I think it should only print the result of the input statement | |||
jnthn is a little surprised that prints 4 and 6 | |||
pmichaud | I don't think it should print the result of all intermediate expressions that might've been there. | ||
jnthn | (would have expected just the final result) | 19:57 | |
Especially since 2+2; is in Sink context in normal code | |||
pmichaud | precisely. | ||
sorear | ohhhhh | 19:59 | |
you see that as like the inside of a block | |||
the value is the last statement | |||
pmichaud | any statement that is not the last statement of a block is in void context. | ||
s/void/sink/ | |||
sorear | I was seeing it as a semicolon-separated list of statements, each to be (maybe) printed separately | ||
TimToady | phone | ||
sorear | where autoprint applies to all sink statements | 20:00 | |
20:00
chitragupt left
|
|||
pmichaud | I wouldn't expect "foo(); 2+3;" to autoprint the return value from foo(), though. | 20:00 | |
(and it's in sink context) | 20:01 | ||
sorear | out of curiousity, why does chromatic always blog exactly five days later? | ||
20:01
justatheory joined
|
|||
obra | the meeting minutes? | 20:01 | |
sorear | yes | ||
moritz_ | phenny: tell bubaflub gist.github.com/397483 looks good, except it should be .pair.value, not .pair.perl.value (.perl returns a string) | ||
phenny | moritz_: I'll pass that on when bubaflub is around. | ||
obra | It's policy that folks on the call get a chance to review them and correct mistakes before they go live | 20:02 | |
TimToady | to give people a chance to read his transcription and fix up mis-hearings | ||
sorear | I see. | 20:03 | |
20:03
chitragupt joined
20:04
justatheory left
20:05
justatheory joined
|
|||
sorear | pmichaud: Should draft2 go into PCT::HLLCompiler, HLL::Compiler, or Perl6::Compiler? | 20:06 | |
pmichaud | sorear: if you want to just work in Perl6::Compiler for now, that's fine. Just keep in mind that I'd like it to ultimately live in HLL::Compiler :) | 20:19 | |
moritz_ | pugs: class A { has $!b; method p { :$!b } }; say A.new(b => 5).p.value | ||
p6eval | pugs: OUTPUT«5» | ||
moritz_ | wow, not only correct, but actually fast | ||
pugs: class A { has $!b; method p { :$!b } }; say A.new(b => 5).p.key | 20:20 | ||
p6eval | pugs: OUTPUT«b» | ||
diakopter | heh | ||
yeah in that July 08 blog entry audreyt mentioned she sped up the startup time tremendously | |||
or 09 | |||
I don't remember | |||
moritz_ | yes, I remember that too | ||
08, more likely | 20:21 | ||
20:22
nihiliad joined
|
|||
sorear | pmichaud: So 'interactive' should be reimplemented in HLL::Compiler? Currently, it lives in PCT::HLLCompiler | 20:31 | |
Tene | did rakudo ever get HLL::Compiler vs PCT::HLLCompiler sorted out? Last I looked, months ago, it was using both in different parts. | 20:32 | |
sorear | PCT::HLLCompiler --> HLL::Compiler --> Perl6::Compiler | ||
it's an inheritence hierarchy | 20:33 | ||
Tene | when I looked, rakudo created Perl6::Compiler class as a subclass of one in one place and as a subclass of the other elsewhere. I never got around to checking which order it did them in. | 20:34 | |
moritz_ | current it just seems to inherit form HLL::Compiler | 20:35 | |
in src/Perl6/Compiler.pir | |||
Tene | You're right, it's not using PCT::HLLCompiler anymore. :) | 20:37 | |
20:42
SmokeMachine left
20:47
rgrau left,
rgrau joined
|
|||
pmichaud | it's using PCT::HLLCompiler indirectly | 20:47 | |
because HLL::Compiler inherits from PCT::HLLCompiler | |||
sorear: yes, I'd reimplement 'interactive' to do more of what we want | 20:48 | ||
20:48
ruoso left
20:57
_buno_ joined
21:00
k23z__ left
21:01
_buno_ left
21:05
alester left
21:06
cdarroch left
21:09
pyrimidine left
21:10
pyrimidine joined
21:13
pmurias left
21:18
Trashlord joined
21:24
Schwern joined
21:30
cotto_work left
21:32
wknight8111 joined
21:35
pyrimidine left
21:39
Intensity left
21:43
cotto_work joined
21:44
Guest80406 left
|
|||
[Coke] | if you need another language to test this out, partcl is missing its REPL post-nqp conversion. | 21:45 | |
(and may have more requirements on prompt changing, incomplete commands, that sort of thing.) | |||
21:50
_Vi left
21:51
patrickas left
21:55
stephenlb left,
snarkyboojum joined
21:59
holli joined
22:04
sahadev left
22:06
eternaleye left
22:07
M_o_C left
22:08
eternaleye joined
22:09
sahadev joined
22:11
bubaflub joined
22:16
kfo left
22:24
meppl left
22:27
iblechbot left
22:29
nihiliad left
|
|||
bubaflub | moritz_: should i make skip tests for the other twigils as well? | 22:29 | |
phenny | bubaflub: 20:01Z <moritz_> tell bubaflub gist.github.com/397483 looks good, except it should be .pair.value, not .pair.perl.value (.perl returns a string) | ||
22:30
Su-Shee left
22:32
kel_ left
22:33
kel joined
22:34
kel left
22:35
kel joined
22:37
kel left,
sahadev left,
kel joined,
gabiruh joined
|
|||
lue | hello! | 22:38 | |
22:38
holli left
|
|||
sorear | [Coke]: pmichaud is punting on "incomplete commands" | 22:40 | |
22:40
lest_away is now known as lestrrat
|
|||
pmichaud | I'm punting it to slightly later, yes. | 22:41 | |
22:41
k23z__ joined
|
|||
pmichaud | if someone wants to take a crack at it, I'm in favor of that :-) | 22:41 | |
I don't know if STD.pm has a working version yet, but that would be hugely helpful. | |||
sorear | pmichaud: I wonder if there's a good way to lift !UNIT_START and friends up to the NQP layer | ||
lue | .oO(interesting, pmichaud went from light green to red in my IRC client) |
22:42 | |
sorear | A lot of languages have a concept of pre-seeding the referencing environment | ||
and it's so similar to the repl/eval thing | |||
pmichaud | sorear: it's possible, it'd be a method on HLL::Compiler then | 22:43 | |
(which gets overloaded by subclasses) | 22:44 | ||
sorear | The main complication is that we would need to require Rakudo + NQP-backend to be loaded when loading precomp'd PIR | ||
pmichaud | that's already the case. | 22:45 | |
well, where "NQP-backend" is really "HLL::Compiler + Regex + PCT" | |||
pre-comp'd PIR always ends up loading Rakudo, if only to get the setting. | |||
sorear | I've heard various people talking about "Setting-NQP". What is this? | 22:46 | |
22:46
rv2733 left
22:50
kel left
22:55
sahadev joined
22:58
Psyche^ joined
23:00
justatheory_ joined,
justatheory left,
justatheory_ is now known as justatheory,
eternaleye left
23:01
Patterner left,
Psyche^ is now known as Patterner
|
|||
lue | joindiaspora.com/ and I thought we were the only death star. Oh well, at least it's privacy-aware social networking. | 23:08 | |
And also like us, it's NYI :) | |||
23:08
eternaleye joined
|
|||
bubaflub | phenny: tell moritz_: ok. lemme know if i should add similar tests for the other twigils | 23:08 | |
phenny | bubaflub: I'll pass that on when moritz_ is around. | ||
23:10
bluescreen joined,
bluescreen is now known as Guest37407
23:24
rgrau` left
23:29
k23z__ left
|
|||
lue | afk | 23:37 |