»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
ruoso | sorear: yay... apparently it worked :) | 00:01 | |
and if everything goes right I will have the support for blocked threads implemented | |||
00:17
benabik left
00:23
berekuk joined
00:26
benabik joined
|
|||
ruoso | ah... one other kinda fundamental problem | 00:29 | |
TimToady | stupid language designer? :) | ||
ruoso | heh... | ||
more concrete problem, actually | |||
rakudo on jvm has the worker threads fundamentally different than the others | 00:30 | ||
than the main thread, I mean | |||
so I can't schedule the main thread... | |||
TimToady | hmm, that's a Java-Think thing, isn't it? (iirc) | ||
00:31
colomon joined
|
|||
ruoso | well... yeah... I guess the correct semantics would be to have the main thread doing only scheduling | 00:31 | |
TimToady | one could switch to a model in which the main thread jsut starts the first worker thread...or that | ||
does Java always send (some) signals to the main thread? | 00:32 | ||
that would argue it should be the scheduler, I suppose | |||
ruoso | hmm... I'd have to re-read that part... | ||
I don't quite remember how posix signals are mapped to java | |||
TimToady is pulling factoids out of his memory that are probably far from accurate | 00:33 | ||
not having worked with Java for fifteen years or so... | |||
ruoso has last touched java in 2006 | 00:34 | ||
00:34
berekuk left
|
|||
ruoso | I guess I could use continuation trickery to move the main line of execution to one of the scheduled threads... | 00:35 | |
00:49
araujo left
|
|||
sorear | ruoso: woohoo | 01:05 | |
01:05
araujo joined
|
|||
ruoso hacking to move the main line of execution to one of the scheduled threads, leaving the main program only watching for the scheduled threads | 01:07 | ||
01:09
araujo left
01:10
araujo joined
|
|||
sorear | ruoso: i forgot, why is this necessary? | 01:24 | |
01:43
jaldhar left,
_jaldhar joined
02:02
colomon left
02:10
araujo left
02:20
colomon joined
02:25
araujo joined,
araujo left,
araujo joined
|
|||
ruoso | sorear: no perl or nqp-level code can be running in the main thread, because we can't let the threads block, we have to save the continuation and assign other thread instead | 02:42 | |
*assign other task instaed | |||
02:49
xilo joined
|
|||
ruoso | .tell jnthn I thikn we need to move the entire threading support to nqp, because the scheduler needs to start earlier and all actual code need to move to one of the scheduled threads, otherwise we won't be able to switch context in the main thread | 03:09 | |
yoleaux | ruoso: I'll pass your message to jnthn. | ||
ruoso looking at javaflow... I think this could be done entirely on the java side and be exposed as very few intrinsics | 03:23 | ||
03:23
colomon left
|
|||
ruoso | hmmm javaflow actually requires a lot of mechanics... may not be suitable | 03:24 | |
03:24
xilo left
03:26
preflex_ joined,
ChanServ sets mode: +v preflex_
03:27
BenGoldberg left,
preflex left,
preflex_ is now known as preflex
|
|||
sorear | ruoso: why can't we let the initial thread block? | 03:28 | |
AFAIK, the only difference between the initial thread and others is that when the initial thread exits, it takes the process with it? | 03:29 | ||
diakopter | sorear: I thought on some platforms only the initial thread receives certain signals | 03:32 | |
sorear: I don't remember where I read that | 03:33 | ||
benabik | I don't think the JVM does signals. | 03:34 | |
sorear | ==benabik | 03:35 | |
diakopter | ok; I didn't know we were only talking about the jvm | 03:36 | |
ruoso | sorear: if the initial thread is different, we will have to keep checking everywhere to know if we are in the main thread or not | 03:39 | |
which is going to be expensive and error prone | 03:40 | ||
like, every place that would block will have to see "hey, if this is the main thread, I can't yeld the continuation, i have to use a lock instead " | |||
sorear | ruoso: but what if the initial thread is just the same as all the other threads? | 03:42 | |
ruoso | if by "the same" you mean having the same continuationreset tag and being able to save the continuation to the queue, yes, that would solve the problem | 03:43 | |
but as it is now, there's no way to save the continuation, push to the queue and take the next item from the queue in the main thread | 03:44 | ||
the point I am trying to make is that the code running perl6 (or nqp) "main" should already simply be one task to be executed in the thread pool | 03:50 | ||
because if that code ends up in the other side of a slow promise, it needs to yield and let the other unblocked tasks to run | 03:53 | ||
04:00
jdv79 joined
|
|||
jdv79 | is stm still "on the map"? | 04:00 | |
just curious | 04:01 | ||
ruoso | jdv79: i don't think stm every got a real implementation | 04:02 | |
s/every/ever/ | |||
I mean, not restricted to Perl 6, but anywhere | |||
sorear | it's mature tech in haskell | 04:03 | |
jdv79 | so you think perl6 will get it evet? | 04:04 | |
*do | |||
sorear | in some form, yes | 04:05 | |
NCAS is cool | |||
it's not clear whether it can be transparently integrated with the rest of the language without causing unacceptable performance loss | |||
ruoso | Hah! after adding async around my entire sudoku solver and having $*SCHEDULER.main_loop explicitly called in the end of my main code, I have blocked threads working | 04:06 | |
sorear | sweet | ||
jdv79 | thansk | 04:08 | |
*thanks | |||
04:29
EvanTeitelman left
|
|||
TimToady | ruoso++ | 04:31 | |
04:47
birdwindupbird joined
05:21
ggoebel joined
05:23
SamuraiJack__ joined
05:36
kaleem joined
05:52
fridim__ left
06:32
dayangkun joined
06:36
crab2313 joined
06:50
FROGGS joined
06:53
birdwindupbird left
06:58
yves_ joined
06:59
pernatiy left
|
|||
japhb | Gah. Segfaults with rakudo-parrot are making me really want rakudo-jvm working with panda. | 07:08 | |
donaldh++ # Fixing remaining blockers to rakudo-jvm hugging pandas | 07:09 | ||
tadzik | two things I stumbled upon when trying is 1) running outside source directory 2) modifying INC through -I or PERL6LIB | 07:22 | |
07:23
xinming left
07:24
xinming joined
|
|||
moritz | tadzik: did you try 1) after the 'make install' patches? | 07:24 | |
tadzik | moritz: donaldh's patches? Nah, didn't | ||
07:26
kaleem left,
leont joined
|
|||
japhb | .tell timotimo I'm merging your JVM changes to perl6-bench (plus updating to the latest rakudo-jvm build instructions) in my local tree, but the testing is taking a while. After I push just that, I'll start looking through your other improvements. | 07:26 | |
yoleaux | japhb: I'll pass your message to timotimo. | ||
07:27
thou left
|
|||
japhb shuffles off to bed, early day tomorrow | 07:28 | ||
& | |||
07:34
domidumont joined
07:38
dayangkun_ joined
07:40
dayangkun left,
dayangkun_ left
07:41
domidumont left
07:45
berekuk joined
07:46
bearman joined
07:48
crab2313 left,
crab2313 joined
07:54
dmol joined
07:56
berekuk left
08:00
fhelmberger joined
08:07
daxim joined
|
|||
timotimo | japhb: cool, thanks :) | 08:07 | |
yoleaux | 07:26Z <japhb> timotimo: I'm merging your JVM changes to perl6-bench (plus updating to the latest rakudo-jvm build instructions) in my local tree, but the testing is taking a while. After I push just that, I'll start looking through your other improvements. | ||
mathw | o/ | 08:09 | |
FROGGS | o/ | 08:11 | |
08:29
cognominal joined
|
|||
jnthn | morning, #perl6 | 08:30 | |
mathw | lo jnthn | ||
FROGGS | morning jnthn | ||
08:32
dakkar joined
|
|||
dalek | : 6c54f53 | (Tobias Leich)++ | / (2 files): pull in changes from rakudo d3bd8dfbfe8b282d879643a5b06a724304b8e048 |
08:37 | |
masak | morning, #perl6 | ||
masak is teaching today | |||
timotimo | have fun! :) | 08:38 | |
masak | I am having fun :) | ||
timotimo | good. because i'm not paying you to not have fun. | ||
masak | :) | 08:39 | |
timotimo | HR analysis says you make more money when you're having fun, so have fun or you're FIRED! | ||
you make *us* more money, to be more exact | |||
masak | ...no pressure. | ||
08:41
sqirrel joined
|
|||
mathw | heh | 08:41 | |
mathw is also teaching today, informally, in the sense that his colleagues require a big infodump before mathw goes on holiday | 08:42 | ||
no doubt I'll forget to tell them something really important | |||
on saturday I was teaching aikido to children, that was more fun. We had a good class and they handled it well. | 08:43 | ||
08:43
brrt joined
|
|||
masak | mathw: was the big infodump avoidable? maybe you should optimize for getting trapped knowledge out into wikis and documents? | 08:44 | |
FROGGS | gah, documentation | 08:45 | |
FROGGS shudders | |||
masak | that seems to be the general reaction, yes. | ||
timotimo | just write more test cases instead | 08:46 | |
masak | if only everything were more like the (good) SYNOPSIS blocks on CPAN. | ||
08:46
berekuk joined
|
|||
timotimo discovers, that "loop invariants" are a very, very good thing. | 08:46 | ||
08:46
sqirrel left
|
|||
timotimo | also, the good thing about off-by-ones is that it's not dangerous to let them multiply | 08:46 | |
08:48
pernatiy joined,
donaldh joined
|
|||
timotimo | huh. preallocating the list to the size it's supposed to have and then inserting items with splice is not helpful, because the "empty slots" just get pushed back, too ... | 08:51 | |
r: my @vals = 1, 2, 3; @vals[5] = Nil; say @vals; splice @vals, 2, 0, (3, 2, 1); say @vals; | 08:52 | ||
camelia | rakudo ce2453: OUTPUT«1 2 3 (Any) (Any) (Any)1 2 3 2 1 3 (Any) (Any) (Any)» | ||
dalek | p/child-env: e8fb2cf | (Donald Hunter)++ | src/vm/jvm/ (3 files): Pass %*ENV contents into ProcessBuilder in nqp::shell |
||
p: e8fb2cf | (Donald Hunter)++ | src/vm/jvm/ (3 files): Pass %*ENV contents into ProcessBuilder in nqp::shell |
08:56 | ||
p: 8733f0e | (Donald Hunter)++ | src/vm/jvm/ (3 files): Merge pull request #111 from perl6/child-env Pass %*ENV contents into ProcessBuilder in nqp::shell Fixes 1 rakudo spectest in S02-magicals/env.t |
|||
timotimo | awesome! :) | 08:57 | |
08:59
rindolf joined
|
|||
lizmat | good *, #perl6! | 09:16 | |
jnthn | o/ lizmat | 09:17 | |
lizmat | r: my $h is dynamic; $h<a>=1; say $h<a>.VAR.dynamic # expected 1 | ||
camelia | rakudo ce2453: OUTPUT«0» | ||
09:17
grondilu_ joined,
sqirrel joined
|
|||
lizmat | I guess the autovivication of $h into a hash, is not copying the container | 09:17 | |
should we consider this a bug? | 09:18 | ||
jnthn | We did this case yesterday, no? | ||
lizmat | feels like a bug to me | ||
jnthn | $h ends up as a Scalar that contains a hash. | ||
lizmat | no, that was the case where we *had* a hash before | ||
09:18
atroxaper joined
|
|||
jnthn | It doesn't magically change from being a scalar | 09:18 | |
lizmat | that was the one where I explicitely put a Hash.new in there | ||
this one is implicit | 09:19 | ||
jnthn | Yes, that's what auto-viv is doing really. | ||
lizmat | { SELF.defined || &infix:<=>(SELF, Hash.new); | ||
jnthn | Right. | ||
So it's just the same :) | |||
lizmat | well, yes, from a core developer point of view | 09:20 | |
not so sure from a language user point of view | |||
09:21
grondilu left
|
|||
lizmat | I guess TimToady will let us know if he has any specific thoughts about this case | 09:22 | |
dalek | kudo/nom: f0ee01d | (Elizabeth Mattijsen)++ | src/core/ (3 files): Make .dynamic return a Bool rather than some number |
09:23 | |
lizmat | r: my $a is dynamic(0); say $a.VAR.dynamic # wonder whether this behaviour should be part of the spec | 09:24 | |
camelia | rakudo ce2453: OUTPUT«0» | ||
FROGGS | lizmat: the venue in 3 weeks is still the Jugendherberge? you already got a conference room or some such? | ||
lizmat | FROGGS: the Jugendherberge is out | 09:25 | |
FROGGS | k | ||
so I dont have to get something nearby :o) | |||
lizmat | Roland Schmitz is looking whether it would be possible to hold it in the conf room of the company he works for | ||
FROGGS | ohh cool | ||
lizmat | would be close to the YAPC::EU benue | ||
venue | |||
I hope to hear about that later today | |||
FROGGS | cool, thank you | 09:26 | |
lizmat | the other alternative is still on holday for the next 2 weeks, so much less likely to come through | ||
otoh, all we need is a room with tables and chairs | |||
projectors / screen / whiteboard / electricty blocks / etc. we can bring | |||
FROGGS | and ecleptic power | 09:27 | |
lizmat | well, yes | ||
Timbus | .. so python has a 'for.. else' and now im annoyed that perl 6 doesn't. | ||
lizmat | but 12 notebooks and a projector is not a lot of pwoer | ||
Timbus | how do I fix that | ||
FROGGS | true | ||
lizmat | power | ||
FROGGS | Timbus: and the else happens when the list is empty? | ||
Timbus | it happens when the for doesn't exit via a 'last' | 09:28 | |
lizmat | Timbus: 1 you change the spec, 2 nobody complains for a while, 3 you implement ? | ||
Timbus | or whatever the break statement is | ||
lizmat | fwiw, I've had cases where I had to add an extra layer of if | 09:29 | |
which for / else would have covered :-) | |||
Timbus | i guess in my case i could use next LABEL if it was implemented | ||
FROGGS | Timbus: that sounds like a continue block (Perl 5) | ||
Timbus | yes a bit | ||
lizmat | especially in combination with FIRST | ||
FROGGS | Timbus: but it is only executed once? | ||
Timbus | well uh. its a for in-a-for and i can skip the exceptional case using next. but only in this case | 09:30 | |
lizmat | if @todo { say "doing"; for @todo { … } } else { say "notihng to do" } | 09:31 | |
would become | |||
Timbus | (if labels worked) | ||
lizmat | for @todo { FIRST say "doing"; … } else { say "nothing to do" } | ||
FROGGS | so it would be like this? for ^3 { .say } else { say 42 } # 0 1 2 42 | ||
lizmat | FROGGS: no that would be just 0 1 2 | ||
FROGGS | and for ^3 { .say; last } else { say 42 } # 0 1 2 | ||
09:32
crab2313 left
|
|||
Timbus | lizmat has a polar opposite need | 09:32 | |
both are cool things to have :v | |||
oh dear | |||
grondilu_ | one thought about macros: has anyone considered using (( )) instead of {{{ }}}? | ||
lizmat | I haven't been feeling well lately, yes :-) | ||
09:32
grondilu_ is now known as grondilu
09:33
grondilu is now known as Guest14694
|
|||
Timbus | eh wait, shouldnt that be | 09:34 | |
for ^3 { .say; last } else { say 42 } # 0 | |||
lizmat | Timbus: yes | ||
Timbus | not 0 1 2 | ||
lizmat | in my pov | ||
the else would only fire if the for has nothing to do | 09:35 | ||
jnthn | (would be close to the YAPC::EU venue) I hope that's close in distance, not close in temperature :P | 09:36 | |
mathw | masak: the big infodump would've been avoidable if we'd been sensible enough to avoid specialising so much within the team. But we didn't. Thus are lessons learned. | 09:37 | |
lizmat | jnthn: close in distance is what I can guarantee, temperature not so much | ||
jnthn | :) | ||
FROGGS | Timbus: I was asking what you want to have | ||
lizmat | .oO( must take fans with us as well, just in case ) |
09:38 | |
Timbus | well, its what python has | 09:39 | |
jnthn | .oO( Don't forget to bring the groupies too! ) |
09:41 | |
lizmat | .oO( the beard stroking kind? ) |
09:42 | |
FROGGS | *g* | ||
I was going to ask about that | |||
09:42
Guest14694 left
|
|||
lizmat | the groupies ? | 09:42 | |
09:42
wtw left
09:43
grondilu_ joined
|
|||
diakopter | groupies = fans who travel along | 09:45 | |
09:45
grondilu_ is now known as grondilu
09:46
grondilu left,
grondilu joined
09:52
atroxaper1 joined
09:53
atroxaper1 left,
atroxaper left
|
|||
timotimo | maybe we should start advertising perl6 as nosql. will that help publicity? | 09:55 | |
jnthn | No, no, you should advertise it as WEB SCALE! | 09:56 | |
Like /dev/null is advertised | 09:57 | ||
diakopter | it's web 6.0 | ||
JimmyZ | advertising perl6 as noperl5 | ||
tadzik | let's advertise JVM interop moar | 09:59 | |
Su-Shee was very surprised when I told her about this | |||
timotimo | we don't make sufficiently big waves? | ||
maybe we should do that after our method invocation sugar is there | 10:00 | ||
brrt | web 6.0 is actually pretty good | ||
i like | |||
jnthn | Yes, let's get that in place first :) Then it'll be much nicer. :) | ||
diakopter | lol i like | ||
timotimo | except perl6's main focus isn't web development ;) | 10:01 | |
brrt | what kind of development today isn't web development in some way? | ||
timotimo | embedded development! | ||
brrt | well, yes | ||
timotimo | a very strong suit for perl6, now that ram is so cheap! | ||
jnthn | heh, the last (and only) place I worked that did embedded were putting in an embedded web server :P | 10:02 | |
DrEeevil | where "embedded" means 1.5Ghz quadcore with 8GB RAM ? ;) | ||
timotimo | ... i guess i lose :) | ||
DrEeevil: as long as you put it into a little box, it's embedded | |||
brrt | how little | ||
DrEeevil | allrighty then | ||
timotimo | brrt: smaller than a 19" rack :) | ||
DrEeevil | ... how little is "little" these days? I remember the old computers coming in a fullsize rack equivalent form factor | 10:03 | |
nwc10 | JimmyZ++ # advertising perl6 as noperl5 | ||
Timbus | beaglebone boards use node.js and callbacks to handle events on gpio pins :/ | ||
feels so strange | |||
brrt | which is evil | ||
DrEeevil | if I had had some money I could have gotten 16 racks of Alpha goodness ... | ||
brrt | brb folks | ||
10:03
brrt left
|
|||
DrEeevil | Timbus: wat :) that's amazingly inefficient | 10:03 | |
timotimo | oooh alpha | ||
would you have ported moarvm to alpha? :D | |||
nwc10 currently thinks that the strong points of Perl 6 will be | 10:04 | ||
1) first class grammars | |||
timotimo | moar might even do perl6 efficiently enough for the now somewhat dusty alpha processors | ||
nwc10 | 2) gradual typing | ||
3) concurrency | |||
4) NFG | |||
10:04
atroxaper1 joined
|
|||
nwc10 | (people aren't going to appreciate that last one for a few years) | 10:04 | |
DrEeevil | timotimo: heh, the "dusty" alphas @ 1.4Ghz still have enough oomph to compete with most other things | ||
10:04
atroxaper1 left
|
|||
timotimo | they have many cores, don't they? | 10:05 | |
DrEeevil | the dual 500Mhz a friend of mine had was on average equivalent to my 2Ghz dualcore amd64 ... | ||
10:05
atroxaper joined
|
|||
timotimo | wow, that's actually pretty impressive | 10:05 | |
10:05
donaldh left
|
|||
DrEeevil | yeah. they are amazingly designed, but were killed by bad management and FUD | 10:05 | |
arnsholt | Yeah, I remember my PPC Mac being pretty spiffy as well, even if the clock speed wasn't the same as the X86 processors | 10:06 | |
lizmat starts working on porting colomon's set/bag work from Niecza to Rakudo again | |||
timotimo | their bios alone was light years ahead and it seems like they still are better than efi | ||
DrEeevil | arnsholt: yeah, the G3 surprised me ... | ||
diakopter | bag, set, groupies = band lingo | 10:07 | |
DrEeevil | OpenFirmware, which was a Forth interpreter afair? that's the sane way to do it | ||
UEFI, liek, ur has CODE, now is maek compiel ... if compiel you say "done" and bossman happy | |||
lizmat | .oO( …. a joy forever ) |
10:08 | |
DrEeevil | I still have not managed to boot a UEFI machine cleanly, so I claim UEFI is the most expensive blinky cursor app ever | 10:09 | |
10:09
census left
10:12
atroxaper left
10:14
dayangkun joined
10:16
nyuszika7h left
10:18
nyuszika7h joined
|
|||
mathw | I always liked OpenFirmware | 10:18 | |
10:26
donaldh joined
10:32
pmurias joined
10:37
dayangkun left
10:42
kaleem joined
|
|||
donaldh | what is in progress for JVM method invocation sugar? | 10:42 | |
jnthn started poking at it, but doesn't have anything working yet | 10:43 | ||
donaldh is well impressed with what has been done already, after reading jnthn++s YAPC talk | |||
10:45
sqirrel left
10:50
bearman left
|
|||
donaldh | so, panda uses chdir. I'm starting to think that changing panda to not use chdir is close to a rewrite of panda | 10:53 | |
timotimo | yeah i suppose so | ||
donaldh | It does stuff like indir $where { … } | 10:54 | |
and the expectation of what can be done in the block is, well, pretty much everything. | |||
jnthn | .oO( Making it an acid test for our chdir emulation on JVM... ) |
||
donaldh | oO( damn that positive spin from jnthn ) | 10:55 | |
tadzik | oh, hm | 10:56 | |
what panda expects of the individual workers is "here is the directory, do your work with it" | |||
workers don't really have to chdir there. They do so because it's easier | |||
also, it's required for tests I'm afraid | 10:57 | ||
tests often rely on stuff being available in the current directory | |||
also, are we just discussing changing code because we have no chdir() on JVM or what? :) | |||
timotimo | yes :) | ||
tadzik | *grumble* | 10:58 | |
jnthn | We'll have to do the chdir stuff on JVM at some point... | 10:59 | |
It's probably better to spend the tuits on doing that rather than on changing Panda. Otherwise we'll just run up against it again when something else in the eocsystem needs it... | 11:00 | ||
donaldh | agreed | ||
jnthn | I agree it's not much fun. | ||
donaldh | Bits of it are really easy. Like shell | ||
tadzik | I outright refuse to change panda for these reasons :) | 11:01 | |
timotimo | i support you in this decision. we have to do it even if it hurts | ||
donaldh | The one that worries me is chdir $where; rm_rf $dir; | 11:02 | |
Really need to decide whether CWD is global or thread local and whether we let race conditions break that one. | 11:05 | ||
tadzik | oh, heh | 11:06 | |
11:07
ssutch left
|
|||
donaldh | Oh, it's specced as thread local perlcabal.org/syn/S16.html#line_182 | 11:09 | |
phew | 11:10 | ||
lizmat | yes, that would be the only way to make sense, at least to me | 11:15 | |
which also means that we would need this mechanism for MoarVM, I think | |||
because I'm pretty sure chdir is not thread local on many OS's | 11:16 | ||
similarly, one could consider chdir to be block local | |||
especially in the context of Promises and Channels | 11:17 | ||
pdurbin | lots of JVM chatter in here. must be a current focus | ||
lizmat | since Promises are handled by a thread pool, we don't want one Promises' chdir' to mess up the other Promises that just happen to be handled by the same thread | ||
s/block local/lexcial/ | 11:18 | ||
*lexical | 11:19 | ||
*sigh* | |||
lizmat gets another cuppa | |||
donaldh | yikes | 11:21 | |
11:21
brrt joined
|
|||
brrt | back | 11:22 | |
11:23
wtw joined
|
|||
lizmat | donaldh: yikes ? | 11:24 | |
feels to me, chdir() is more live a lexical pragma | |||
donaldh | okay, so $*CWD is currently just a Str and can be modified ( no side-effects ) | 11:25 | |
true for all backends from what I can see. | |||
lizmat | maybe all it needs is a STORE proxy that attaches a LEAVE block on the block it is called from ? | 11:26 | |
jnthn | Perhaps it's more that async { ... } should localize $*CWD | 11:27 | |
11:28
brrt left
|
|||
lizmat | why would you make that special ? | 11:29 | |
donaldh runs away | |||
lizmat | fwiw, the globalness of chdir has always been a hassle to me | ||
donaldh | yeah, most common shell idiom is (cd $where; do_stuff) | 11:30 | |
i.e. cd inside a block scope | |||
suggestion: remove the chdir op on all backends and always do chdir "emulation". | 11:34 | ||
lizmat | donaldh++ | ||
donaldh | Otherwise chdir functionality will be threads broken on parrot and MoarVM | 11:35 | |
lizmat | also note that S16:182 predates the advent of Promises and implicit thread pools | ||
synopsebot | Link: perlcabal.org/syn/S16.html#line_182 | ||
donaldh | Yep, i suspect it predates S32 as well. | 11:36 | |
11:38
rindolf left
|
|||
donaldh | When S16 talks about Path, does it mean IO::Path as specced in S32 ? | 11:38 | |
lizmat | I guess it does | ||
11:39
colomon joined
|
|||
donaldh | Okay, so the first step might be to rewrite $*CWD impl to use IO::Path and follow what is said so far in S16. i.e. check dir exists first. | 11:40 | |
dalek | ecs: 0567d88 | (Elizabeth Mattijsen)++ | S16-io.pod: Small Path -> IO::Path cleanup |
||
donaldh | Then it's trivial to get shell to use $*CWD. | ||
and then a bunch of work to trawl through all the file ops. | 11:41 | ||
11:41
brrt joined
|
|||
lizmat | also check it's not a relative path :-) | 11:42 | |
leont | What's the equivalent of perl5's $! ? | ||
tadzik | $!, duh ;) | 11:43 | |
but inside a CATCH, that's $_ I think | |||
masak | aye. | ||
because a 'CATCH' is a 'given' on the exception it catches. | 11:44 | ||
donaldh | okay, I'm willing to hack on $*CWD / chdir. | 11:45 | |
leont | Didn't seem to work for me when I tried that, must have been doing something else wrong then | ||
donaldh | I'm going to need some guidance on how to implement a thread local / block local $*CWD | ||
jnthn | easiest way in async is to just do a closure wrap trick | 11:46 | |
donaldh | plus ideas about what the nqp layer abstraction should look like. | ||
lunch& | 11:50 | ||
lizmat wonders whether $*CWD would need any nqp support | 11:51 | ||
11:51
pdurbin left
|
|||
donaldh | lizmat: either the nqp file op signatures need to change, or they all need wrapped, or they need to lookup the current $*CWD value | 11:53 | |
lizmat | ah, of course, yes | 11:54 | |
donaldh | lunch&; disown | ||
11:56
domidumont joined,
rindolf joined
|
|||
moritz | it seems to me that ops are low-level enough that they shouldn't look up a dynamic variable from user space | 12:05 | |
dalek | kudo/nom: 2857585 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Make "my $a of Array of Int" work (for typechecks at lowest level) |
12:07 | |
lizmat | moritz: you're probably right, but OTOH it would simplify customizing $*CWD behaviour | 12:08 | |
12:08
domidumont left
12:09
domidumont joined
|
|||
lizmat | r: my %a of Array; say %a.of; %a<a>=1 # something spooky with "of", although the typecheck works | 12:09 | |
camelia | rakudo f0ee01: OUTPUT«(Mu)Type check failed in assignment to '%a'; expected 'Array' but got 'Int' in block at /tmp/ROjtEHKjxp:1» | ||
12:10
donaldh left
|
|||
moritz | lizmat: well, the wrappers around the nqp ops in rakudo can resolve $*CWD for them | 12:13 | |
jnthn | lizmat: Guess it's not doing the mixin | ||
jnthn looks at le patch | |||
lizmat | the patch was to fix another problem | 12:14 | |
moritz | lizmat: for example we could spec sub run($program, :$cwd = $*CWD) | ||
lizmat | I think the problem is with .of, and that lives somewhere in NQP land I guess | ||
12:14
cognominal left
12:15
cognominal joined
|
|||
jnthn | lizmat: The patch doesn't quite make sense to me... | 12:15 | |
lizmat | jnthn: this is to fix the case of "my $a of Array of Int" | 12:16 | |
the type it got for "of" was (Hash+{TypedHash}" | |||
which clearly doesn't work as an "of" for type checking? | |||
r: my $a of Int; say $a.of | 12:17 | ||
camelia | rakudo 285758: OUTPUT«No such method 'of' for invocant of type 'Any' in block at /tmp/8BKUp1biTe:1» | ||
lizmat | r: my @a of Int; say @a.of | ||
camelia | rakudo 285758: OUTPUT«(Mu)» | ||
lizmat | I think .of is broken and should be phased out | 12:18 | |
if you need to know the type of something, you would need to use .VAR.of | |||
moritz | r: say Array | ||
camelia | rakudo 285758: OUTPUT«(Array)» | ||
jnthn | um, what? | ||
.VAR returns identify on non-scalars | |||
moritz | r: say Array[Int].new.of | ||
camelia | rakudo 285758: OUTPUT«(Int)» | ||
jnthn | So Array.VAR gives Array | 12:19 | |
lizmat | but a scalar can also be considered a one element array | ||
r: my $a of Int; say $a.VAR.of | |||
camelia | rakudo 285758: OUTPUT«(Int)» | ||
lizmat | r: my Hash[Int] $a=Hash[Int].new # huh? | 12:27 | |
camelia | rakudo 285758: OUTPUT«Type check failed in assignment to '$a'; expected 'Hash+{TypedHash}' but got 'Hash+{TypedHash}' in block at /tmp/X5RDN1WWSX:1» | ||
lizmat | I guess this is a can of worms best left alone for a while ? | 12:28 | |
I mean, type checking is only done at one level at a time right now, should that become more? | 12:29 | ||
jnthn | That should already work. Odd. | 12:30 | |
lizmat | just on the strings, you mean? | ||
if that's the case, I need to revert my patch of just now | |||
maybe we should stringify "Hash+{TypedHash}" as "Hash[Int]" in this case ? | 12:31 | ||
jnthn | No, not on the strings!! | 12:32 | |
We never ever ever ever compare types by stringification. | 12:33 | ||
dalek | kudo/nom: bc39ad2 | (Elizabeth Mattijsen)++ | src/core/ (2 files): Create proper .VAR.of methods for Array/Hash, makes 4 TODO tests pass |
||
timotimo | jnthn: but it could be helpful for people, no? | ||
jnthn | We can make it stringify nicer, yes | ||
timotimo | or at least stringify TypedHash in that case as TypedHash[Int] if that's possible | ||
jnthn | But not for the purpose of comparison. | ||
lizmat | okok | ||
timotimo | could perhaps roles stringify all their parameters in those cases? | ||
then we'll reach c++ levels of error reporting :D | 12:34 | ||
12:34
rindolf left
|
|||
mathw | not until the core data structures are built out of startlingly complex templates we won't :) | 12:34 | |
timotimo | i can look into making a patch tomorrow | ||
i think Any really ought to have a type parameter to define what things like .elems returns | 12:35 | ||
also, we need size_t | |||
lizmat | r: my Hash[Int] $a=Hash[Array].new # huh? | 12:37 | |
camelia | rakudo 285758: OUTPUT«Type check failed in assignment to '$a'; expected 'Hash+{TypedHash}' but got 'Hash+{TypedHash}' in block at /tmp/zrF2_piNeT:1» | ||
lizmat | r: my Hash[Int] $a=Hash[Int].new # so this should already work ? | ||
camelia | rakudo 285758: OUTPUT«Type check failed in assignment to '$a'; expected 'Hash+{TypedHash}' but got 'Hash+{TypedHash}' in block at /tmp/vWHfqSOQ1v:1» | ||
moritz | yes, known bug | ||
lizmat | ok, then I'll revert my patch mangling "of" | 12:38 | |
12:39
donaldh joined
|
|||
dalek | kudo/nom: 94b7b28 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Revert "Make "my $a of Array of Int" work (for typechecks at lowest level)" the type to the lowest level. This reverts commit 2857585a4d166896c308a8d84b0ebb6d6e826ae5. |
12:39 | |
12:42
kbaker joined
12:43
dayangkun joined
12:48
kbaker left
12:49
colomon left
12:52
kbaker joined
|
|||
donaldh is backlogging | 12:52 | ||
12:52
domidumont left
|
|||
timotimo | i made a little class for working with sorted arrays | 12:53 | |
you can push, pop and shift, as well as push_sorted | |||
tadzik | cool | ||
module! | |||
timotimo | yes, it will be one | 12:54 | |
i made it not for a specific use case, but for exactly that | |||
i'll add things like finding and removing values, too | |||
tadzik | also, if you have a sorted array, why would you want push that's not push_sorted? | ||
timotimo | but i need to test if my :by support is correct | 12:55 | |
push_sorted means "don't worry, this list is already sorted" | |||
since it takes a slurpy list you can't just supply an array.new but role { method sort() {} } | |||
12:56
ajr joined
12:57
ajr is now known as Guest76213,
dmol left,
Guest76213 is now known as ajr_
|
|||
tadzik | oh, so push_sorted is for pushing the arrays | 12:57 | |
timotimo | oh, yes, push and push_sorted both take *@a | ||
12:57
dmol joined
|
|||
lizmat | fwiw, I thnk something like that should be in core | 13:00 | |
timotimo | you think? | 13:01 | |
hm, i'm not sure | |||
tadzik | I think we have a bit too fat core already | 13:02 | |
tadzik grumbles at is-prime, as usual | |||
timotimo | i think it gets messy quick; depending on your algorithm you may prefer such a thign backed by an array, or by a n,m-tree, or you may want a binary heap instead of a fully sorted list, ... | ||
if you take the sorted list backed by an array into the core, you're opening the floodgates for "why do we have that, but not $similar-thing" | 13:03 | ||
TimToady | is-prime costs almost nothing, considering it just calls into libtommath | ||
tadzik | we have already opened that :( | ||
that's true | |||
lizmat | fwiw, I feel such a sorted array could serve as a backend for Sets of a certain size | 13:04 | |
grondilu | please don't remove is-prime from the core, I think it's cool to have that. | ||
moritz | we just need a better cultural acceptance for having datastructures provided by modules, not core | 13:05 | |
donaldh | heh. is-prime is even there on JVM | ||
timotimo | lizmat: yes, that's often what's done for sets if i understand correctly | ||
grondilu would prefer to have a Prime subset of Int, though. | |||
TimToady | in any case, what's in the core language vs what is preloaded is (potentially) two entirely different sets of code | ||
timotimo | that's true, i'm also looking forward to that :) | ||
tadzik | oh yes | ||
grondilu | r: subset Prime of Int where &is-prime; say 13 ~~ Prime | ||
camelia | rakudo 285758: OUTPUT«True» | ||
TimToady | we probably want to avoid preloading a number of things that the language considers part of itself on small machines | 13:06 | |
lizmat | TimToady: you mean additional settings ? | ||
TimToady | no | ||
pmurias | like avoid preloading eval? | ||
TimToady | I mean the language only has to know the names, and that if the name is referenced, then you pull in the functionality | ||
moritz | stuff like sockets, for example | ||
tadzik | or Temporal | ||
TimToady | or even, when the name is actually called | ||
lizmat | a sort of load on demand proxy objects ? | 13:07 | |
Object::Realize::Later ? | |||
metacpan.org/module/Object::Realize::Later | |||
tadzik | could we implement that as additional, precompiled settings? | ||
TimToady | even large machines might want to do things like that to speed up initial startup time | 13:08 | |
tadzik | which we can pull in when necessary | ||
TimToady | tadzik: I don't think so | ||
a setting holds the names | |||
in a sense, the setting is the language, not the implementation of the language | 13:09 | ||
tadzik | right | ||
TimToady | (ignoring the bits of the language that are defined in the grammar) | ||
13:10
PacoAir joined
13:15
SamuraiJack__ left
13:16
flussence_ joined,
hoelzro_ joined
13:17
betterworld joined,
colomon joined
|
|||
dalek | ast: 7b2783d | (Elizabeth Mattijsen)++ | S0 (2 files): Unfudge / fix "of Type" related tests |
13:17 | |
donaldh | back to emulating chdir, which we think we need to do on all backends to get thread local $*CWD, | 13:19 | |
13:20
sftp_ joined
|
|||
donaldh | perhaps we should make all nqp::file ops guard against relative paths | 13:20 | |
TimToady | note that $*CWD is automatically thread local as long as each thread does 'temp $*CWD' first thing | ||
since $*CWD is dynamically scoped | 13:21 | ||
13:21
eternaleye_ joined
|
|||
donaldh | and do all path composition in rakudo | 13:21 | |
13:21
Bucciarati_ joined
13:22
anocelot left,
sftp left,
Yappo__________ left,
betterwo1ld left,
eternaleye_ is now known as eternaleye,
anocelot joined
|
|||
lizmat | Since setting of $*CWD should check for existence of dir, I assume it should also die when the restore of the temp finds the directory has gone ? | 13:23 | |
donaldh | some nqp ops need to change signature, e.g. nqp::shell needs to know $where | ||
TimToady | on machines that can have an actual process-wide cwd, one could optimize by stripping the absolute path back off right before doing something in the cwd, so that the OS doesn't have to deal with the same prefix repeatedly (assuming we can strip it faster than the OS could retraverse it) | 13:24 | |
dalek | ast: 7613807 | (Elizabeth Mattijsen)++ | S09-typed-arrays/arrays.t: Some more .of -> .VAR.of I missed |
13:26 | |
donaldh | certainly easy to compare $*CWD to real cwd | ||
13:27
benabik left
|
|||
lizmat | still I'm a bit worried about people chaning $*CWD in a Promise without "temp"ing it | 13:28 | |
TimToady | lizmat: probably not; I can imagine scenarios where you are assuming you can back out of temporized $*CWD without again accessing the intermediate directories | ||
lizmat | *changing | ||
dylanwh | What does real cwd mean under the jvm? :-) | ||
13:28
benabik joined
|
|||
TimToady | dylanwh: probably only what the OS thinks it is, if JVM doesn't know how to think about it | 13:29 | |
lizmat | TimToady: so it would be like any other case where the directory pointed to by $*CWD disappears | ||
13:29
Yappo__________ joined
|
|||
lizmat | if you use it in a file/dir access, it will fail | 13:29 | |
if not, you're safe | |||
dylanwh | Note: java libraries tend to hate you when you use native calls to change the cwd. :( | 13:30 | |
TimToady | lizmat: a promise has no "inside" in that sense, it's a ref to another thread | ||
which has its own dynamic scope | |||
lizmat | the thing is that that thread may later be used by other Promises | ||
and would as such inherit changes to $*CWD that another promise has made | |||
13:31
colomon left
|
|||
lizmat | a Promise only gets temporary use of an existing thread | 13:31 | |
TimToady | promises don't have anything to do with CWD | ||
lizmat | it does not get a thread of its own | ||
Promises are code, code can change $*CWD | |||
TimToady | and that thread has a $*CWD that the promise doesn't change | ||
13:32
colomon joined,
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
lizmat | how can you be sure that a Promise doesn''t change $*CWD ? | 13:32 | |
TimToady | if a chunk of code does change cwd, it's dynamically scoped to the execution of that chunk of code | 13:33 | |
assuming proper use of temp | |||
lizmat | ah! assuming proper use of temp | ||
TimToady | which would presumably be enforced by 'chdir' | ||
to do otherwise would be a DIHWIDT | |||
donaldh | JVM knows what the OS cwd is and from JVM's point of view it's immutable | 13:34 | |
lizmat | I would be in favour of making sure you cannot push where it hurts | 13:35 | |
TimToady | so we can use it as a secondary "absolute" location, more or less | ||
lizmat | there are so many ways of actions at a distance / heisenbugs with threads, even when wrapped in promises, that we should make sure that all the obvious ways of doing this, are covered | 13:36 | |
TimToady | sure, as long as it's not the halting problem | ||
lizmat | if chdir would temp $*CWD, great! | ||
donaldh | chdir can do anything we like. | ||
lizmat | should direct assignment to $*CWD work ? | ||
donaldh | I suggest we remove nqp::chdir though | ||
TimToady | the whole point of dynamic variables is to make each dynamic scope behave a bit like env vars do in unix processes | 13:37 | |
we could maybe make $*CWD readonly by default, such that you may only set it with an appropriately scoped op | 13:38 | ||
donaldh | is it possible to make $*CWD proxy STORE to call chdir ? | 13:40 | |
lizmat | I guess a bit like undefine() and assignment with Nil ? | ||
TimToady | and if it comes down to it, we can probably make a promise track the "correct" cwd when it starts | ||
lizmat | but that would seem like unnecessary overhead | ||
brrt | lol @ sleep sort | ||
lizmat | O(zzzzz) | 13:41 | |
TimToady | donaldh: except there are multiple $*CWD variables, and how do you hook "going out of scope" to chdir back? | ||
lizmat | maybe chdir() should just be a frontend to assigning $*CWD | 13:42 | |
donaldh | well chdir updates the actual value of a local $*CWD | ||
touche | |||
lizmat | and have assignment temporize allways ? | ||
donaldh | ALWAYS | ||
TimToady | that sounds crazy to me | ||
lizmat | anyways, whatever :-) | ||
donaldh | crazy in what sense? | 13:43 | |
TimToady | better to not try mixing the emulation with the reality | ||
timotimo | i use dynamic vars to set values further up the stack often :| | ||
TimToady | only if the dynamic var is writeable | 13:44 | |
colomon | bunch of new module failures overnighjt | ||
looks like NativeCall might be the culprit? | |||
13:44
benabik left
|
|||
colomon | 97.95.33.142:3001/report | 13:44 | |
13:45
kaleem left
|
|||
TimToady | there should probably be a simple process-wide really-chdir that simply informs the chdir emulator that it now has a different secondary root | 13:45 | |
lizmat | TimToady: but that would be an optimization, no ? | 13:46 | |
donaldh | so $*CWD becomes readonly, chdir is used to modify $*CWD | ||
TimToady | any more dwimmery than that is just going to result in a lot of wat | ||
donaldh | file operations compose relative paths into absolute paths using dynamic scoped $*CWD | 13:47 | |
TimToady | and chdir is really just 'temp @*CWD ::= $newpath;' or some such | ||
lizmat | that's all the dwimmery I was going for | ||
TimToady | er $*CWD | ||
@*CWD is not a concept I want to think about :) | 13:48 | ||
donaldh | shell operations and other spawn type stuff uses $*CWD as cwd of new process | ||
lizmat | S16:189 mentions the Array interface wrt to $*CWD | ||
synopsebot | Link: perlcabal.org/syn/S16.html#line_189 | ||
lizmat | I'm not sure what that means or whether that is still applicable | 13:49 | |
donaldh | I think that just means push and pop of path segments | ||
lizmat | ah, ok | ||
hmmm…. | |||
donaldh | in other words @*CWD is sorta ~= split('/', $*CWD) | ||
that's the way I read it anyway | 13:50 | ||
TimToady | my brother-in-law interpreted it as pushd/popd though | 13:51 | |
13:51
atroxaper joined
|
|||
dalek | ecs: 1b16c7b | (Elizabeth Mattijsen)++ | S16-io.pod: Slight elaboration on the Array interface |
13:51 | |
TimToady | in either case, I don't want to think about it :) | ||
13:51
benabik joined,
dayangkun left
|
|||
donaldh | anything other than file ops and spawn ops that we need to worry about? | 13:52 | |
lizmat | unix file socket ops ? | ||
timotimo | i'm idly wondering about eliminating redundant stuff like .chars calling .Str which may be a no-op in many cases | ||
i wonder in how many, actually. | |||
(since our calls are apparently so expensive?) | 13:53 | ||
13:53
awwaiid left
|
|||
donaldh | lizmat: yeah, I had them under my file ops banner, but better to be explicit about them | 13:53 | |
so is this a good strategy: | 13:55 | ||
13:55
colomon left
|
|||
donaldh | change the nqp file ops to only accept absolute paths - prevent us from doing bad things | 13:55 | |
do all the magick $*CWD trickery in rakudoland | |||
13:57
kaleem joined,
kaleem left
13:58
kaleem joined
|
|||
lizmat | fwiw, sounds like a plan to me | 14:00 | |
jnthn | Seems reasonable to me. | 14:01 | |
donaldh | git branch :) | ||
jnthn | I tend to like approaches that don't lead to immense differences between backends... | ||
donaldh | This converges the backends, right ? | ||
jnthn | Right. | ||
That's why I like it. :) | |||
donaldh | it also sounds quite achievable :) | 14:02 | |
TimToady | absolutely :) | ||
lizmat | as an optimization, the nqp ops maybe later could take the "real" cwd into account where applicable | 14:03 | |
jnthn | Relatively easy to check it worked out too: just try Panda | ||
lizmat | so the OS would have tp retraverse ? | ||
would *not* have to | |||
TimToady | does Panda only chdir when going down a tree, or does it try to chdir back on the way out? | 14:04 | |
most of the latter would probably be harmless, though useless if the dynamic scope is going to restore it anyway | |||
I suppose it could be argued that a correct chdir emulation should ignore dynamic scoping and just set the current thread's cwd... | 14:06 | ||
lizmat | jnthn: where does ->type_check live? | ||
timotimo | whoops, my file system just got full ... but how?! | 14:07 | |
TimToady | but I think temp on chdir will ultimately lead to cleaner programs that don't have to un-chdir all over the place | ||
moritz | TimToady: panda tries to chdir back | ||
timotimo | i had 10 gb free last time i looked | ||
now down to 300 mb?!? :( | |||
jnthn | lizmat: sixmodelobject.c | ||
moritz | TimToady: it uses LEAVE chdir $old-dir | ||
timotimo | ah | ||
moritz | which isn't too bad :-) | ||
timotimo | hahahaha, that's so dumb :D | 14:08 | |
TimToady | perhaps we shouldn't name it chdir if it's going to have auto-un-unchdir semantics | ||
tempdir or some such | |||
timotimo | i used ulimit to limit my test runs to a few seconds of cpu time, so that they would be interrupted and restarted-after-source-changed automatically ... but my system created a coredump each time :D | ||
lizmat | perhaps chdir() is a bad name anyway, because of its history | ||
and unix centricity | 14:09 | ||
just assigning $*CWD feels better to me in a Perl 6 setting | |||
TimToady | well, chdir would just set the current $*CWD if we left it in, and tempdir (or whatever we name it) would do the 'temp $*CWD =' trick | ||
moritz | lizmat: the problem is that UNIX current directory really is process-wide | 14:10 | |
TimToady | visitdir, downdir, ... | ||
moritz | lizmat: and $*CWD isn't | ||
lizmat | moritz: exactly my point | ||
donaldh | moritz: the JVM just happily sits in one dir with an immutable cwd | ||
TimToady | we'd merely be treating the actual dynamic scope as the "process" | ||
donaldh | which is indeed process wide | ||
TimToady | chdir would still be emulating | 14:11 | |
so not process wide | |||
don't confuse the emulation chdir with the really-chdir | |||
donaldh | what do we want cwd to do? display the emulated $*CWD or the really OS cwd ? | ||
moritz | I'm a bit concerned about calling foreign functions | 14:12 | |
14:12
EvanTeitelman joined,
awwaiid joined
|
|||
moritz | those would lose the pretense of our emulated chdir | 14:12 | |
donaldh | moritz: you mean interop? | ||
moritz | donaldh: yes | ||
TimToady | if you know that one cares, you'd have to really-chdir before you call it | ||
if you don't know that it cares, it probably doesn't :) | 14:13 | ||
FROGGS .oO( ... except when it does ) | |||
tadzik | so, how would nqp::shell() work with emulated chdir? | ||
TimToady | you might have to wrap in a really-tempdir | ||
14:13
EvanTeitelman left
|
|||
TimToady | which would do the really-chdir and LEAVE really-chdir | 14:14 | |
donaldh | tadzik: that's easy, use $*CWD as the directory parameter to the ProcessBuilder | ||
moritz | tadzik: nqp::shell would have a $working-directory parameter | ||
TimToady | that works too | ||
tadzik | oh, alright | ||
TimToady | was thinking more about the foreign functions you have no control over | ||
what moritz++ was pointing out | |||
well, maybe really-chdir is named PROCESS::chdir | 14:15 | ||
that makes it clearer, I think | |||
timotimo | yeah, i'd understand when i saw it for the first time | ||
TimToady | so PROCESS::tempdir could do the dynamic save/restore, maybe--except there's a problem | 14:16 | |
er tempcwd | |||
lizmat | jnthn: sixmoduleobject.c's typecheck handling is way over my head right now, so reverting that to a later, possibly post-Frankfurt time | ||
TimToady | it really needs to be macroish if it's going to declare a temp $*CWD | 14:17 | |
donaldh | fwiw, any backdoor to the real chdir just exposes the thread safety issue again. | ||
jnthn | lizmat: oh... | ||
lizmat: yeah, that isn't where it'd need changing anyway | |||
lizmat | ah? | ||
jnthn | lizmat: That code is just looking through the type check cache then delegating to the meta-object. | ||
lizmat: The fixes would be in src/Perl6/Metamodel/ | 14:18 | ||
lizmat | r: my Hash[Int] $a; say $a.VAR.of === Hash[Int] # this works, so under the hood it seems ok | ||
camelia | rakudo 94b7b2: OUTPUT«True» | ||
TimToady | donaldh: sure, but the alternatives are worse--running in the wrong directory, and at least PROCESS::chdir can talk to the emulator | ||
*running foreign functions | |||
lizmat | jnthn: MROBasedTypeChecking.nqp ? | 14:19 | |
jnthn | lizmat: Probably not... | 14:20 | |
Perhaps something in CurriedRoleHOW | |||
moritz | justy.me/justy/2013/8/18/journey-to...st-5-hours # for the RPG lovers | ||
TimToady | of course, if a foreign function allows absolute pathnames, we can probably more safely just pass only absolute names to such a function, and then there's no reace | ||
14:20
thou joined
|
|||
TimToady | *race | 14:20 | |
timotimo | r: say (by => (*.key)) | ||
camelia | rakudo 94b7b2: OUTPUT«"by" => WhateverCode.new()» | ||
timotimo | r: say :by(*.key) | ||
camelia | rakudo 94b7b2: OUTPUT«» | 14:21 | |
timotimo | r: say (:by(*.key)) | ||
camelia | rakudo 94b7b2: OUTPUT«"by" => WhateverCode.new()» | ||
timotimo | hm. | ||
14:21
benabik left
|
|||
lizmat | the second one is just passing named parameters to "say" | 14:21 | |
timotimo | yes, i know | ||
lizmat | which, as it's implemented as a method, doesn't complain | 14:22 | |
TimToady | but yeah, going outside the emulation in two different threads can expose the race condition, if you PROCESS::chdir and pass relative paths | ||
timotimo | i thought my code was wrong because the pair constructor was being turned into a part of the whatever code | ||
but that is not the case | |||
r: class Array::Sorted { has $!by = &infix:<cmp>; has $!use-by-vals = ($!by.?count // 2) == 1; method foo() { say $!use-by-vals; say $!by } }; Array.Sorted.new(:by(*.key)).foo | |||
camelia | rakudo 94b7b2: OUTPUT«No such method 'Sorted' for invocant of type 'Array' in block at /tmp/7PELefz7Dq:1» | ||
timotimo | r: class Array::Sorted { has $!by = &infix:<cmp>; has $!use-by-vals = ($!by.?count // 2) == 1; method foo() { say $!use-by-vals; say $!by } }; Array::Sorted.new(:by(*.key)).foo | ||
camelia | rakudo 94b7b2: OUTPUT«Falsesub+{precedence} infix:<cmp>(, ) { ... }» | ||
TimToady suspects thread-safe libraries are moving in the direction of not supporting relative paths without a 'current dir' parameter | 14:23 | ||
timotimo | i don't understand why that is. | ||
TimToady: they would probably be well advised to do so | |||
moritz | timotimo: private attributes aren't initialized by .new | ||
timotimo | oh? | ||
i see! | |||
moritz | because they are private! | ||
timotimo | yes, of course m) | ||
thanks for the extra eyes | |||
and, i suppose, extra brain :) | |||
TimToady | .oO(private eyes?) |
14:24 | |
lizmat | .oO( very uNSAfe ) |
14:26 | |
donaldh | TimToady: I read the same somewhere, can't find the ref. | 14:27 | |
timotimo wonders why @!by-vals aren't being set on the first access and then sees the code: "my @by-vals = ..." | 14:29 | ||
donaldh | how do I create a thread local ? | ||
timotimo thinks: probably NYI | 14:30 | ||
unless you use the java classes for it | |||
14:31
aindilis joined
|
|||
donaldh is wondering what first incremental steps to take | 14:31 | ||
jnthn | 0) Make an appropriate beaverage | 14:32 | |
*beverage | |||
:) | |||
donaldh | 1. change the nqp ops and break lots of stuff. | ||
timotimo | tee hee, beaver-age | ||
a new dreamworks film maybe? | |||
donaldh was about to run outside and build a dam in a river | |||
donaldh makes coffee instead. | 14:33 | ||
2. Use the global $*CWD and worry about threads later | 14:34 | ||
timotimo | the thread local $*CWD will probably override the global $*CWD | 14:35 | |
huh. | 14:36 | ||
oh! by isn't a named parameter | |||
donaldh | timotimo: yep 3. implement thread locals | ||
14:36
Bucciarati_ is now known as Bucciarati
14:37
xinming left
|
|||
timotimo | i mean, it will do that just by itself | 14:37 | |
rather than having to say "give me the thread local version of $*CWD" | 14:38 | ||
14:39
Psyche^ joined
|
|||
dalek | ecs: 9607528 | larry++ | S32-setting-library/IO.pod: add visitdir and PROCESS::chdir, retarget chdir |
14:39 | |
14:41
xinming joined
14:42
Psyche^_ left,
FROGGS left
14:43
rindolf joined
14:44
cognominal left
14:45
cognominal joined
|
|||
lizmat | jnthn: ParametricRoleHOW.nqp, line 125 ? | 14:45 | |
am I getting warmer ? | |||
jnthn | lizmat: Maybe, but I'm not sure... | 14:46 | |
lizmat | I was suspecting a missing nqp::decont in line 126 | 14:47 | |
but alas | |||
jnthn | lizmat: I'm thinking the problem is mostly likely some kind of mis-copying to the punned class... | ||
r: say nqp::istype Hash[Int], Hash[Int] | |||
camelia | rakudo 94b7b2: OUTPUT«0» | ||
jnthn | um. | ||
lizmat | aha | ||
jnthn | Well, that's a golf... | ||
oh... | |||
We don't actually cache the role parameterizations yet... | 14:48 | ||
...'cus it made all kinds of fun with the BS... | |||
That's a very fiddly problem, I'm afraid... | |||
lizmat | BS? | ||
jnthn | bounded serialization | ||
lizmat | ok, then I'll leave it for now | ||
arnsholt | Oh, is this the same thing that makes CArray[int8] !~~ CArray[int8]? | ||
jnthn | (Yes, it's on the course. :)) | ||
Yeah. | |||
I did do some of the infrastructural stuff to try and deal with this but didn't quite get there with actually fixing it yet. | 14:49 | ||
lizmat | okidoki, the only reason I investigated was because you thought it worked | ||
jnthn | Yeah...now I suddenly realize why it doesn't :( | ||
timotimo | i'm annoyed by my Sorted::Array class | ||
the binary search logic for inserting elements is not correct, it switches elements around sometimes :( | |||
lizmat | going back to sets and bags | ||
timotimo: feels like an off-by-one error | 14:50 | ||
timotimo | yes, it always is, isn't it? | ||
arnsholt | Yeah, binary search can be a bit fiddly | ||
timotimo | it only happens in my :by(-*) case | ||
14:55
ajr joined,
ajr left,
ajr_ left,
FROGGS joined
15:03
EvanTeitelman joined
|
|||
timotimo | tadzik: if you'd like to fix up my wrongs, you can have my existing pre-sorted array code | 15:04 | |
it's wrong in strange ways :| | |||
15:05
jaffa4 joined
15:07
brrt left
|
|||
timotimo | i especially don't understand why the output is so strange while running, but the test claims it's correct | 15:07 | |
lizmat | once your sorted list is no longer sorted, corruption grows very quickly | ||
tadzik | timotimo: I may look at it later today if you push it somewhere, but don't hold your breath :) | 15:08 | |
jaffa4 | hi all | 15:09 | |
can you tell me how what is the syntax of goto? | |||
TimToady | std: JAIL: goto JAIL; goto "LATER"; LATER: 42; | 15:12 | |
camelia | std c2215f0: OUTPUT«ok 00:00 42m» | ||
15:12
berekuk left
|
|||
TimToady | std: goto LATER; LATER: 42; | 15:12 | |
camelia | std c2215f0: OUTPUT«===SORRY!===Illegally post-declared type: 'LATER' used at line 1Check failedFAILED 00:00 41m» | ||
15:13
berekuk joined
|
|||
jaffa4 | I think goto is defined in std | 15:14 | |
I could not find goto here github.com/perl6/std/blob/master/STD_P5.pm6 | |||
goto is NOT defined in STD | |||
FROGGS | TimToady: the label must be known at compile time? | ||
timotimo | tadzik: t.h8.lv/list-sorted.tar.bz2 | 15:15 | |
jnthn | Why hate .lv? :P | 15:16 | |
timotimo | it has a clever-ish display of what it's doing, except it's apparently b0rked for some cases | ||
TimToady | FROGGS: in p6, yes | ||
timotimo | it's not "hate love", it's hate and love. like a balance | ||
TimToady | jaffa4: yes, goto can just parse as a function in P6, so it's just in CORE.setting | 15:18 | |
jnthn | oh, I was thinking latvia, not love :P | ||
TimToady | the course of true latvia never did run smooth... | 15:19 | |
timotimo | ah | 15:20 | |
i think i need to give my wrist a bit of rest now :| | |||
15:21
Rotwang joined
|
|||
donaldh | haha | 15:22 | |
donaldh just walked into the nqp bootstrap trap | |||
daxim | it's a grep! | ||
diakopter | the circularity saw is an invisible band saw, not a table saw | 15:23 | |
jaffa4 | What is CORE.setting? | ||
TimToady | bootstrapping: get a grep on yourself! | ||
jnthn | .oO( I never saw that one coming... ) |
||
daxim | diakopter, why didn't you advertise the grant when you were on the podium? | ||
TimToady | because diakopter++ is nice | 15:24 | |
diakopter | sometimes | ||
donaldh | okay, so it's easy when creating new nqp ops. rebootstrap before using new op. | 15:25 | |
but wholesale changing the signature of many ops to include ThreadContext. not so easy. | |||
jnthn | donaldh: Well, Java supports overloading, so you can leave the old ones there until post-rebootstrap :) | 15:26 | |
donaldh | or somewhat nastily, make the tc a varargs parameter (temporarily) | 15:27 | |
15:28
benabik joined
|
|||
lizmat | r: say Hash[Int].WHAT # jnthn: is there a reason why this shouldn't just return (Hash[Int]) ? | 15:32 | |
camelia | rakudo 94b7b2: OUTPUT«(Hash+{TypedHash})» | ||
TimToady cringes every time it's implied that an ordinary Hash isn't typed, when it's really typed "Hash[Str()]" | 15:33 | ||
jnthn | lizmat: No, just needs doing | 15:34 | |
donaldh | hmmm. Maybe making nqp guard against relative paths is a really-bad-idea-TM | ||
lizmat | r: say Hash.WHAT # so this should say (Hash[Str()] ? | ||
camelia | rakudo 94b7b2: OUTPUT«(Hash)» | ||
moritz | TimToady: well, we don't have coercion types yet, so the default hash *is* "less" typed than an explicitly typed hash | 15:35 | |
TimToady | that's a temporary expedient, I hope | ||
donaldh | The impact on NQP itself is significant | ||
jnthn | r: my $t := Hash[Int]; say $t; $t.HOW.set_name($t, 'Hash[Int]'); say $t; | ||
camelia | rakudo 94b7b2: OUTPUT«(Hash+{TypedHash})(Hash[Int])» | ||
lizmat | jnthn: so I would change new_name in MetaModel/Mixins.nqp, line 13 to show the alternate format ? | ||
TimToady | note that if Hash's arg defaults to Str(), we can leave it out | ||
jnthn | lizmat: No, I don't thing you should change it in general... | 15:36 | |
dalek | : f806f4b | (Tobias Leich)++ | lib/Perl5/World.nqp: Any is the default |
||
: dc4aea6 | (Tobias Leich)++ | STATUS.md: status update after local regex changes |
|||
jnthn | lizmat: But you can do the above fiddle in PARAMETERIZE_TYPE in Hash.pm | ||
lizmat | ah, ok, gotcha | ||
jnthn | heh | ||
r: class A { }; A.^set_name('monkey'); say A | 15:37 | ||
camelia | rakudo 94b7b2: OUTPUT«(monkey)» | ||
jnthn | And that's why we never compare types by string :P | ||
lizmat | hehe :-) | ||
15:37
kaleem left
|
|||
jnthn | (And also why we have a MOP :D) | 15:37 | |
(No, I'm *not* giving a prize for the best abuse of this feature...) | |||
FROGGS | meh :/ | ||
moritz | r: Str.^set_name('Int'); sub f(Str) { }; f Int | 15:38 | |
camelia | rakudo 94b7b2: OUTPUT«===SORRY!===CHECK FAILED:Calling 'f' will never work with argument types (Int) (lines 1, 1) Expected: :(Str )» | ||
jnthn | moritz: BEGIN :) | ||
(you hit the compile-time type checker...) | |||
moritz | jnthn: oh, right | ||
r: BEGIN Str.^set_name('Int'); sub f(Str) { }; f Int | |||
camelia | rakudo 94b7b2: OUTPUT«===SORRY!===CHECK FAILED:Calling 'f' will never work with argument types (Int) (lines 1, 1) Expected: :(Int )» | ||
moritz | :-) | ||
jnthn | *groan* :) | 15:39 | |
TimToady | donaldh: note (if you didn't already) that I specced visitdir etc an hour ago | 15:40 | |
moritz | r: BEGIN Str.^set_name('Int'); BEGIN Int.^set_name('Str'); sub f(Str) { }; f Int | ||
camelia | rakudo 94b7b2: OUTPUT«===SORRY!===CHECK FAILED:Calling 'f' will never work with argument types (Str) (lines 1, 1) Expected: :(Int )» | ||
donaldh | TimToady: yes, I saw it thanks. | ||
grondilu | changing a name of a core class should not be that easy. | ||
(imho) | 15:41 | ||
r: BEGIN Str.^set_name('Int'); BEGIN Int.^set_name('Str'); say Int, Str | |||
masak | r: BEGIN Str.^set_name('a banana and a spaceship'); sub f(Str) { }; f Int | ||
camelia | rakudo 94b7b2: OUTPUT«(Str)(Int)» | ||
rakudo 94b7b2: OUTPUT«===SORRY!===CHECK FAILED:Calling 'f' will never work with argument types (Int) (lines 1, 1) Expected: :(a banana and a spaceship )» | |||
jnthn | grondilu: That mostly just devolves to saying "I want a pragma requird before I can do any meta-programming" | 15:42 | |
15:42
rindolf left
|
|||
TimToady | .set_name_really_I'm_not_a_dangerous_person_no_I'm_not | 15:42 | |
grondilu | well, we have MONKEY_TYPING, don't we? | 15:43 | |
jnthn | Yeah, but requiring that for whenever you want to use .^ or .HOW feels a bit...icky. | ||
TimToady | read vs write | ||
15:45
donaldh left
|
|||
moritz | but distinguishing the two isn't easy, is it? | 15:47 | |
jnthn | No, and constructing a new class at runtime and setting its name is kinda legit too... | ||
If anything we want to protected the composed | 15:48 | ||
masak | if you ask me, using .^ or .HOW should be considered a kind of MONKEY_TYPING in itself. | ||
i.e. it's almost inherently mucking around with machinery. | |||
and trying to make it "safe" is a fool's errand. | |||
grondilu | maybe a 'use METAMODEL'? | 15:49 | |
15:50
berekuk left
|
|||
grondilu | (because use MONKEY_TYPING sounds offensive if you ask me) | 15:50 | |
TimToady | it's supposed to :) | ||
grondilu | :) oh yeah, to discourage the user to use it. Kind of smart. | ||
TimToady | the idea is really from Ada, where you had to say things like 'with UNCHECKED_TYPE_CONVERSION' so that the boss could tell if you were cheating by looking at the front of your program :) | 15:51 | |
15:51
berekuk joined
|
|||
grondilu | that's fun. We should make a contest for best names like that, such as 'use TOTALLY_UNSAFE_FEATURES' | 15:53 | |
moritz | masak: fwiw I use .^name a lot | ||
15:53
sftp_ is now known as sftp
|
|||
TimToady | use LIKE_TOTALLY_UNSAFE_FEATURES_AND_STUFF | 15:53 | |
15:54
berekuk left
|
|||
TimToady | just disallow the method names with underscores :) | 15:54 | |
lizmat | sometimes I wonder whether we should have another word than "use" for lexical pragma type of things | 15:55 | |
TimToady | do you have a "use" case? | ||
lizmat | I'm just thinking about Perlito, which had to special case "use strict" and friends even though it couldn't load any modules | 15:56 | |
it feels to me a bit like "eval" being double used in Perl5 | |||
and not in Perl 6 | 15:57 | ||
TimToady | those who live by the subset, die by the subset... | ||
masak | moritz: let's just say it's more of a guideline than a rule. that said, even .^name, innocent as it is, *is* an introspection tool and as such a kind of magic. | ||
15:57
ssutch joined
|
|||
TimToady | use CODE_SMELL; | 15:57 | |
FROGGS | hehe | ||
grondilu | well, if you want to discourage introspection, what about 'use instrospection;'? | 15:58 | |
TimToady | esp if misspelled :) | ||
lizmat | hint lax; # auto-define undefined variables lexically | 16:00 | |
FROGGS | hmm | ||
TimToady | it's not a hint if it's mandatory | ||
lizmat | hint MONKEY_TYPING | ||
FROGGS | I'd prefere 'want lax;' | ||
because that is a bit like 'use' | 16:01 | ||
masak | I'm sorry, what problem are we solving here? | ||
TimToady | I see no reason to multiply entities | ||
FROGGS | OURS! | ||
masak | I thought unifying pragmas and modules was a feature. | ||
what TimToady said. | |||
TimToady | seems to have worked out pretty well for P5... | ||
lizmat | except for string eval | ||
masak | you could even argue that pragmas are a kind of module, by design. | 16:02 | |
TimToady | false analogy | ||
jnthn | The pragmas that are magical to the compiler are just the ones we didn't yet learn how to write as modules. | ||
Notice how "use lib" is actually a real module in Rakudo. | |||
TimToady | if anything, they're more unified in P6 because everything is lexially scoped now | 16:03 | |
*xic | |||
and 'use' is only going to gain more of the power of macros over time | 16:05 | ||
plus there are lots of modules that are a little bit pragmatical, but also normal modules; enforcing a false dichotomy is kinda silly | 16:06 | ||
lizmat | but that blurs the distinction between a compilation unit and a class / module / package again :-( | ||
jnthn | How so? | 16:07 | |
TimToady | a compilation unit, even an ordinary one, changes the language of the user, if you import any functions at all | ||
there really is not distinction | |||
*no | |||
lizmat | because "use", for better or worse, is not about a class / module / package, but about a compilation unit that may contain zero or more class / module / packages | ||
TimToady | to the extent there is one, we already distinguish 'need' for a module that explicitly doesn't change the language | 16:08 | |
perigrin thought the discussion in #moose about "Why is a role not a class" got too metaphysical ... | |||
TimToady | lizmat: what you point out is that even a 'needed' module can change your language to the extent your language is defined in World | 16:09 | |
masak | perigrin: a discussion about MOPs getting too metaphysical? well I never! | ||
lizmat | indeed | 16:10 | |
perigrin | masak: you shoudl soemtime, it's clensing. | ||
TimToady | so every module changes your language; where's the distinction? | ||
some modules poke stuff into GLOBAL, some poke stuff into your lexical scope, some might even return a textual macro to run immediately to introduce implicit declarations | 16:11 | ||
lizmat | good point, I guess jnthn already said it "The pragmas that are magical to the compiler are just the ones we didn't yet learn how to write as modules." | ||
TimToady | and for sure, there will be modules that want to do combinations of those things | 16:12 | |
jnthn++ :) | |||
PerlJam | good $localtime all. | 16:13 | |
TimToady | is that threadsafe? | ||
FROGGS | well, one pragma will never be a module | ||
( use v6.1.3 ) | 16:14 | ||
TimToady | so just load in v6.1.3.pm and see what happens :) | 16:15 | |
lizmat | I think that falls under the "didn't learn to write as a module yet) ;-) | ||
TimToady | does 'use v5' load in a module yet? | ||
FROGGS | well, on could create All The Modules for it... | ||
one* | |||
TimToady could imagine use v6.1.3 looking for v6.1.3, then v6.1, then v6, and passing the remaining version bits as a parameter | 16:16 | ||
16:16
rindolf joined
|
|||
TimToady | don't really have a "use" case for it though :) | 16:17 | |
grondilu | r: use v6.1.3; say "what is this?" | ||
camelia | rakudo 94b7b2: OUTPUT«what is this?» | ||
grondilu thought Perl 6 was still 6.0.0 | |||
TimToady | it's not even that yet | ||
masak | um. | 16:18 | |
TimToady | so that's still "magical", as in no-op | ||
masak | I can see us accepting 'use v6'; | ||
but I really think we should reject anything above that. | |||
grondilu | shouldn't it die with "this is only 6.0.0"? | ||
masak | right. | ||
it not doing that is bad to some non-zero degree. | |||
it breaks future compat. | |||
or something. | |||
TimToady | but this isn't 6.0.0+, it's 6.0.0- | 16:19 | |
.oO(use future v6.0.0) |
|||
grondilu | r: use v6.0.0-; | ||
camelia | rakudo 94b7b2: OUTPUT«===SORRY!===Could not find v6 in any of: /home/p6eval/nom-inst/lib/parrot/5.5.0-devel/languages/perl6/site/lib, /home/p6eval/nom-inst/lib/parrot/5.5.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/5.5.0-devel/languages/perl6/lib, /home/p6eval/… | ||
TimToady | curious | ||
grondilu | this 0[+-] notation is not reckognized anyway | ||
PerlJam | So ... are there bug tickets for turning the compiler-special pragmas into modules? :) | 16:20 | |
TimToady | std: use v6.0.0+; | ||
camelia | std c2215f0: OUTPUT«ok 00:00 41m» | ||
TimToady | std: use v6.0.0-; | ||
camelia | std c2215f0: OUTPUT«===SORRY!===Confused at /tmp/CKy9jkilsW line 1:------> use v6.0.0⏏-; expecting any of: feed_separator vnumParse failedFAILED 00:00 41m» | ||
TimToady | grondilu: the + is official | ||
masak .oO( Larry gets to pull unofficial syntax out of his colon ) | 16:21 | ||
TimToady is a colonialist | |||
lizmat | jnthn: wrt to PARAMETERIZE_TYPE, seems that +TypedHash always gets added anyway :-( | 16:22 | |
or is that what you meant? $ perl6 -e 'my Int %a; say %a.WHAT' | |||
(Hash[Int]+{TypedHash}) | |||
TimToady | you'd have to set it after the mixin/composition | ||
16:22
kaare_ joined
|
|||
lizmat | I tried that | 16:22 | |
TimToady | maybe we need a POSTCOMPOSE phaser | 16:23 | |
lizmat | I even tried to save the value of "self but TypedHash[$t.WHAT];" | ||
masak | don't we already have a COMPOSE phaser? | ||
TimToady | or maybe COMPOSE should be defined to run after | ||
masak | I thought it already was... | 16:24 | |
lizmat | and return that | ||
but then the name setting disappears | |||
masak | COMPOSE and POSTCOMPOSE don't make a nice pair. | ||
jnthn | lizmat: Can I see the patch? | ||
TimToady | lizmat: how were you deferring the name setting till after composition? | ||
lizmat | recreating patch | 16:25 | |
TimToady is assuming that composition is what adds the +{} | |||
lizmat | gist.github.com/lizmat/6271022 | 16:26 | |
I guess s/WHAT.perl/^name/ | 16:27 | ||
masak | and the POST in POSTCOMPOSE sounds like it has to do with DbC. | ||
16:28
bluescreen10 joined
|
|||
TimToady | masak: wasn't serious about the name; COMPOSE should run after anyway | 16:28 | |
lizmat | are COMPOSE phasers already run ? | ||
TimToady | still NYI afaik | 16:29 | |
lizmat | indeed, as is "will compose" trait on vars | 16:30 | |
16:30
daxim left
16:31
atroxaper left
|
|||
masak | TimToady: yes, still NYI. and yes, I think it should run after, unless someone has a use case for it running before. | 16:32 | |
16:34
benabik left
|
|||
TimToady | a BEGIN runs before alread | 16:35 | |
*dy | |||
as do traits | 16:36 | ||
16:40
iSlug left
|
|||
lizmat | I think I got it | 16:43 | |
$ perl6 -e 'my Int %a; say %a.WHAT' | |||
(Hash[Int]) | |||
$ perl6 -e 'my Int %a{Str}; say %a.WHAT' | 16:44 | ||
(Hash[Int,Str]) | |||
running spectest now | 16:46 | ||
jnthn | woo | ||
lizmat | updated gist also | 16:47 | |
jnthn | Sorry, got distracted and you fixed it already :) | ||
lizmat | Alas, it doesn't handle this case yet: $ perl6 -e 'my %a{Str} of Int; say %a.WHAT' | ||
(Hash[Any,Str]) | |||
nor this: $ perl6 -e 'my %a of Int; say %a.WHAT' | |||
(Hash) | |||
jnthn | Suspect something is wrong in the of handler | 16:48 | |
lizmat | well, nlt necessarily wrong, but NYI | ||
jnthn | Does it call .HOW.parameterize somewhere if it's a Hash or Array? | ||
aye | |||
lizmat | nope, it doesn't | ||
16:48
iSlug joined
|
|||
jnthn | ok, that'll be why :) | 16:48 | |
lizmat | it just sets the containerdescriptor | 16:49 | |
jnthn | yeah...that's not enough | ||
lizmat | ok, will look at that after the spectest | ||
16:50
berekuk joined
16:51
benabik joined
|
|||
jnthn | lizmat: I mighta written $t.WHAT.perl as $t.^name | 16:51 | |
lizmat | yes, I mentioned that just now already :-): [18:27:29] <lizmat> I guess s/WHAT.perl/^name/ | 16:52 | |
jnthn | ah :) | ||
dalek | p: 210cd15 | (Tobias Leich)++ | src/QRegex/P5Regex/ (2 files): enable non-capturing groups and named captures |
||
jnthn | ooh! | ||
FROGGS++ | 16:53 | ||
FROGGS | :o) | ||
lizmat | jnthn: not clear which named parameter to pass | 16:54 | |
to parameterize, passes it on to "new_type" | |||
jnthn | Hm, I thougth you passed positionals... :) | 16:55 | |
dalek | kudo/nom: da63d08 | (Tobias Leich)++ | src/Perl6/ (2 files): allow to run code in P5 regexes |
16:56 | |
jnthn | yeah... | ||
$var.var.^parameterize($the_of_type) # or so | |||
lizmat | spectest ok, now doing same for Array | 16:57 | |
jnthn: okidoki | |||
17:00
dakkar left
17:01
SamuraiJack__ joined
|
|||
jnthn | shop & | 17:03 | |
17:04
fhelmberger left
17:21
EvanTeitelman left
|
|||
lizmat | alas, using ^name is a problem | 17:24 | |
$ perl6 --ll-exception -e 'class Z { has Z @a }' | |||
Method 'dispatch:<.^>' not found for invocant of class 'Z' | |||
using WHAT.perl is not a solution either: | |||
$ perl6 --ll-exception -e 'class Z { has Z @a }' | |||
Method 'perl' not found for invocant of class 'Z' | |||
problem golfed from the only spectest failure: t/spec/S12-attributes/recursive.t | 17:25 | ||
jnthn: suggestions ? | |||
jnthn | Write it out as .HOW.name(...) maybe | 17:26 | |
lizmat | hmmm | ||
ack | |||
of course, duh | |||
jnthn | That usually fixes such things | ||
Though I'd like to make the .^ work at some point | |||
lizmat | feels hard to fix of the class is not inheriting from enything | 17:28 | |
*if | |||
*anything | |||
17:28
donaldh joined
|
|||
dalek | : de1632a | (Tobias Leich)++ | / (3 files): run code in regexes |
17:29 | |
17:32
donaldh left
17:36
spider-mario joined
17:37
pernatiy left
17:39
pernatiy joined
17:48
donaldh joined
17:52
donaldh left
|
|||
ruoso | kill firefox | 18:00 | |
TimToady | with fire, or with fox? | ||
jnthn: can you imagine a scenario in which the CREATE for an object is not directly controlled by the repr and any associated traits? | 18:02 | ||
TimToady thinks we should usually just inline that with the build plan | |||
and if we want a custom CREATE, maybe that should be passed as a trait on the class | 18:04 | ||
or with a repr that somehow knows it can have a polymorphic CREATE | |||
keeping it completely dynamic does not seem to buy us much | 18:05 | ||
18:06
rindolf left
|
|||
dalek | kudo/nom: 13f2f97 | (Elizabeth Mattijsen)++ | src/core/ (2 files): Make (Array|Hash).WHAT return something sensible for specifically typed case |
18:06 | |
18:07
flussence_ is now known as flussence
|
|||
dalek | ast: 8b7c044 | (Elizabeth Mattijsen)++ | S12-attributes/recursive.t: Add some more tests for recursively typed attributes |
18:07 | |
masak | r: say "{Date.new} will be the best Christmas ever for Perl 6!" | 18:08 | |
camelia | rakudo da63d0: OUTPUT«2013-12-24 will be the best Christmas ever for Perl 6!» | ||
FROGGS | masak++ # Ohh yes :o) | 18:10 | |
lizmat | r: say Date.new | 18:11 | |
camelia | rakudo da63d0: OUTPUT«2013-12-24» | ||
masak | lizmat: welcome to the Perl 6 community ;) | 18:12 | |
lizmat | what ? | ||
masak | we haz Easter eggs :P | ||
lizmat: (it's to discourage people from doing Date.new) | |||
(in a very mild way) | |||
lizmat | I assume on 2013-12-25, it will show 2014.12.24 ? | ||
masak | aye. | ||
it's funny :> | |||
jaffa4 | i get this install-jvm\bin\nqp is not executable; use --with-nqp or use --gen-nqp at ConfigureJVM.pl line 60.? | 18:13 | |
FROGGS | hmmm, I was thinking the right path would be instal\bin\nqp | ||
install* | |||
grondilu | why not make Date.new fail with no arguments instead of returning next Xmas? | 18:14 | |
masak | grondilu: because that wouldn't be as fun. | 18:15 | |
grondilu | oh, ok. | ||
masak | the behavior of Date.new is not spec'd, and thus we're in demons-out-of-nose land anyway. | ||
DateTime.new has it the boring way. | 18:16 | ||
lizmat | fail if $*VERSION == 6.0.0 ? | ||
masak | r: DateTime.new | ||
camelia | rakudo 13f2f9: OUTPUT«Must provide arguments to DateTime.new()current instr.: 'throw' pc 379051 (src/gen/CORE.setting.pir:160961) (src/gen/CORE.setting:10072)called from Sub 'sink' pc 412948 (src/gen/CORE.setting.pir:173645) (src/gen/CORE.setting:11379)called from Sub 'MAIN' pc 401 (… | ||
FROGGS | hmmm, we could make a Python module that connects to their irc channel and says 'lol' | ||
masak | lizmat: "when Perl 6 is released, every day will be like Christmas" -- so I guess then it should return Date.today :) | ||
FROGGS: lol | 18:17 | ||
FROGGS | (or we make it a slang just to be awesome) | ||
18:18
SamuraiJack__ left
|
|||
FROGGS | meh, waiting for spectests is boring | 18:19 | |
jaffa4 | FROGGS: that was a bug | 18:22 | |
lizmat | FROGGS: please remind me what it would take to make v5 a proper slang ? | 18:24 | |
jaffa4 | who is making perl 5 output? | 18:25 | |
18:26
berekuk left
|
|||
masak | jaffa4: what do you mean? please rephrase. | 18:26 | |
jaffa4 | i get this install-jvm\bin\nqp is not executable; use --with-nqp or use --gen-nqp at ConfigureJVM.pl line 60.? | 18:27 | |
FROGGS | lizmat: we need some sort of slang class, that has a grammar, actions, a module loader, and additional stuff (like impliit module loading when switching to that grammar) | ||
18:27
donaldh joined
|
|||
FROGGS | and especially for v5 I'd need to fix the module loader, so I dont have to misuse Perl6's anymore | 18:27 | |
lizmat: that's all | 18:28 | ||
18:28
berekuk joined
|
|||
lizmat makes mental note | 18:28 | ||
18:29
matt____ joined
|
|||
matt____ | hi | 18:29 | |
jaffa4 | masak: ok? | ||
FROGGS | lizmat: there are branches in nqp and rakudo alled 'from_nqp' that let you use nqp modules like QAST, which would help to write a slang in perl6 directly, rather than in nqp/perl6 mix | ||
lizmat: but there are two issues, before these can be merged | |||
18:29
matt____ left
|
|||
FROGGS | *which need to be fixed | 18:30 | |
jaffa4: re-pasting a sentence is not exactly what "rephrase" means | 18:31 | ||
jaffa4: you said something about perl 5, please ask that again in another way | |||
jaffa4 | masak: I ran the command perl configureJVM.pl to compile the JVM compiler and I got an error | ||
masak: the error was stall-jvm\bin\nqp is not executable; use --with-nqp or use --gen-nqp at ConfigureJVM.pl line 60.? | 18:32 | ||
masak | jaffa4: I see. | ||
jaffa4: I have no idea how to help you with that; sorry. | |||
FROGGS | jaffa4: does install-jvm\bin\nqp exist? | ||
lizmat | jaffa4: it was a perl5 error because the .pl file is a Perl 5 file | ||
FROGGS | ahh | ||
jaffa4 | masak: i I fixed it | ||
FROGGS | jaffa4: so, you are going to provide a patch? | 18:33 | |
lizmat | FROGGS: did you list the two issues already ? | ||
Mouq | lizmat: Was whatever was up with 144a3f8 fixed? | ||
FROGGS | that is what I call restless: github.com/sartak | ||
lizmat: no :o) | 18:34 | ||
lizmat | Mouq: completely and utterly, with a lot of help from jnthn++ | ||
Mouq | lizmat++ jnthn++ | ||
FROGGS | lizmat: 1) in the nqp code, it accepts a perl6 hash, where the perl6 code in rakudo should emit it instead | ||
arnsholt | FROGGS: And I guess one layer down from grammar/actions/loader is the need for a specced AST API for the action methods of the slang? | ||
jaffa4 | FROGGS: I pulled a request, can you see it? | ||
FROGGS | lizmat: 2) jvm's stage0 needs an update to support load_module's new signature | 18:35 | |
arnsholt: no, for now one could use QAST | |||
jaffa4: yes | |||
jaffa4: is there an executable flag on windows? | 18:37 | ||
jaffa4 | no | ||
18:37
ajr joined,
ajr is now known as ajr_,
pernatiy left
|
|||
lizmat | registry I guess ? | 18:37 | |
by extension ? | |||
FROGGS | jaffa4: but -x checks for that flag, right? | ||
jaffa4 | i do not know | 18:38 | |
I did not write Perl | |||
lizmat | pretty sure Perl 5 on Windows does whatever is necessary to make -x work | ||
jaffa4 | it probably checks extension | ||
and file existance | |||
jnthn | TimToady: At the moment, .CREATE would just do nqp::create. It's nice when we know what we are creating in so far as it can help with generating better code. | ||
FROGGS | well, checking for existence should be better IMO | 18:39 | |
TimToady | .mvm is a "MAGIX PhotoStory Slideshow" | ||
oops, ww | |||
jnthn | TimToady: Given the build plan isn't code-generated but rather interpreted, though, at the moment I guess it'd always be virtual... | ||
arnsholt | FROGGS: True dat. That risks QAST becoming the de facto API though, and I think TimToady/jnthn have said they'd rather not want QAST's API as the standard | 18:40 | |
TimToady | whatever api works is likely to become the defacto standard | 18:41 | |
FROGGS | arnsholt: true: but how long do you guess would it take to have something better instead? | ||
arnsholt | Good question | ||
FROGGS | I dont want to write an AST class hierarchy and map it to QAST changes... (but I dont want to break other's modules either) | ||
TimToady | there needs to be a use case for having more than one AST, I suppose | 18:42 | |
timotimo | it would be nice if one could get far by just using macros ... | ||
TimToady | we'd need to decide *why* QAST is unsuitable | ||
timotimo | but that's not realistic, is it? | ||
TimToady | maybe we should start out writing qacros instead | ||
timotimo | that name is not final, i take it? | 18:43 | |
FROGGS | qo qroblem | ||
timotimo | nacros would be better | ||
FROGGS | nachos? | ||
timotimo | past -> qast, macros -> nacros | ||
lizmat | .me just realizes it was exactly 1 year ago she did her first commits to nqp | 18:44 | |
TimToady | if it's before real macros, it should jacros or kakros or lacros | ||
well, I imagine the real answer is that we should type macro parameters with what kind of AST we think they are supposed to be | 18:45 | ||
timotimo | lizmat: how do you propose we celebrate? | ||
lizmat | with the appropriate amount of $beer ? | 18:46 | |
FROGGS | TimToady: kakros doesnt work well in germany | ||
timotimo | no, it works *especially* well | ||
FROGGS | lizmat: we can celebrate in three weeks or so :o) | 18:47 | |
lizmat | sounds like a plan :-) | 18:48 | |
jnthn will have a beer today anyway :) | |||
timotimo | hm, what's the date again for frankfurt? | 18:50 | |
ah there | |||
directly after my math exam | |||
two days to recover, though | |||
18:51
aindilis left
|
|||
masak | today's autopun: "If you already know what recursion is, just remember the answer. Otherwise, find someone who is standing closer to Douglas Hofstadter than you are; then ask him or her what recursion is." | 18:51 | |
jaffa4 | FROGGS: I test -x on Perl, it seems to work ok | 18:52 | |
masak | I love the fact that it uses Douglas Hofstadter as a base case :) | ||
TimToady | yes, but that always takes longer than you expect | ||
masak | though the algorithm may actually fail, if the next person to carry out the instruction is unwilling or unable. | ||
also, crossing oceans is problematic. | 18:53 | ||
or at least cumbersome. | |||
jnthn | And you have to know where Douglas Hofstadter is... | ||
TimToady | a ship with a sufficient number of passengers will solve that | ||
masak | jnthn: I think I can make a decent estimate. | ||
18:53
EvanTeitelman joined
|
|||
masak | EvanTeitelman: salutations. | 18:54 | |
TimToady wonders whether Douglas Hofstadter is standing closer to him than I am... | |||
the whole thing breaks down if Douglas Hofstadter isn't standing, and you pick the wrong path to him | 18:55 | ||
TimToady assumes there exists at least one person who knows Douglas Hofstadter who doesn't know what recursion is... | |||
Tag on Douglas Hofstadter: If you don't know what recursion is, please stay away from me, or you will soon learn what a failed recursion is. | 18:56 | ||
19:00
aindilis joined
|
|||
lizmat | jaffa4: that PR seems very Windows centric | 19:06 | |
jaffa4 | jaffa4: PR? what is PR? | 19:07 | |
lizmat | 19:08 | ||
lizmat | Pull Request | ||
github.com/rakudo/rakudo/pull/194 | |||
jaffa4 | lizmat: so? before that Perl program was written in a very unix-centric way. | 19:09 | |
lizmat | jnthn: I tried with parameterize in variable trait "of", but no success | ||
$what.HOW.set_name($what, "{$what.HOW.name($what)}[{nqp::decont($of).HOW.naa | |||
me(nqp::decont($of))}]"); | |||
jnthn | lizmat: It's just adding a check for the name that the runner is installed on under Windows also | 19:10 | |
19:10
abnorman left
|
|||
lizmat | well, if you're ok with it, I'll merge :-) | 19:10 | |
jnthn | maybe some whitespace around the infix . | 19:11 | |
but yeah, it's fine :) | |||
lizmat | $what.HOW.set_name($what, "{$what.HOW.name($what)}[{nqp::decont($of).HOW.name(nqp::decont($of))}]"); | ||
jnthn | You don't need nqp::decont of something you do .HOW on as it automatically deconts, fwiw :) | ||
dalek | kudo/nom: 366f5d7 | (Marton Papp)++ | ConfigureJVM.pl: D:\src\rakudo>perl ConfigureJVM.pl fixed |
19:12 | |
kudo/nom: 8f64f1e | lizmat++ | ConfigureJVM.pl: Merge pull request #194 from jaffa4/nom D:\src\rakudo>perl ConfigureJVM.pl |
|||
lizmat | r: class H is Hash {}; my $h=H[Int].new; say $h.WHAT # guess I need to fix some more :-) | 19:20 | |
camelia | rakudo 13f2f9: OUTPUT«(Hash[Int])» | ||
jnthn | d'oh :) | 19:21 | |
19:25
abnorman joined
|
|||
TimToady | words.steveklabnik.com/beware-subcl...re-classes | 19:25 | |
19:25
spider-mario left
19:28
spider-mario joined
|
|||
labster | r: my $x = Any; $x &&= True ||= False; say $x; | 19:29 | |
camelia | rakudo 13f2f9: OUTPUT«(Any)» | ||
labster | r: my $x = Any; ($x &&= True) ||= False; say $x; | 19:30 | |
camelia | rakudo 13f2f9: OUTPUT«False» | ||
labster | isn't and supposed to bind tighter than or? | ||
FROGGS | maybe it gets the prec from assignment op? | 19:31 | |
TimToady | yes, it does | ||
S03:4018 or so | 19:32 | ||
synopsebot | Link: perlcabal.org/syn/S03.html#line_4018 | ||
lizmat | r: my $x = Any; $x &&= (True ||= False); say $x; | ||
camelia | rakudo 13f2f9: OUTPUT«(Any)» | ||
TimToady | erm... | 19:33 | |
TimToady would like it if that were recognizably not an lvalue at compile time, somehow... | |||
FROGGS | well, any is falsish | ||
TimToady | r: True = False; | 19:34 | |
camelia | rakudo 13f2f9: OUTPUT«Cannot modify an immutable value in block at /tmp/x9byaBqi9w:1» | ||
TimToady | r: True ||= False; | ||
camelia | rakudo 13f2f9: ( no output ) | ||
masak | n: True ||= False | ||
FROGGS | r: 1 ||= 2 | ||
camelia | niecza v24-88-g1f87209: OUTPUT«Unhandled exception: Writing to readonly scalar at /tmp/_q4UJi6gae line 1 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4580 (module-CORE @ 576)  at /home/p6eval/niecza/li… | ||
rakudo 13f2f9: ( no output ) | |||
masak submits rakudobug | |||
FROGGS | r: say( 1 &&= 2 ) | 19:35 | |
camelia | rakudo 13f2f9: OUTPUT«Cannot modify an immutable value in sub METAOP_TEST_ASSIGN:<&&> at src/gen/CORE.setting:15325 in block at /tmp/4wHn30sNJm:1» | ||
FROGGS | r: say( 1 ||= 2 ) # noop | ||
camelia | rakudo 13f2f9: OUTPUT«1» | ||
lizmat | but but, there is no assignment taking place | ||
FROGGS | correct | ||
masak | point. | ||
still looks very wrong :) | |||
lizmat | you could argue the optimizer should take out ||= False | ||
as it will never fire | |||
19:35
itz_ joined
|
|||
masak | I hadn't considered that the short-circuiting wins... | 19:36 | |
lizmat | *or* spill out a warning / error that the user is doing something s/he probably didn''t mean ? | ||
masak .oO( it would assign if only True were falsy ) | |||
FROGGS | using X::Insulting? :P | ||
masak | r: (True but False) ||= False | ||
camelia | rakudo 13f2f9: OUTPUT«Cannot modify an immutable value in sub METAOP_TEST_ASSIGN:<||> at src/gen/CORE.setting:15324 in block at /tmp/gEpO9iOTTn:1» | ||
masak | there! | ||
FROGGS | hehe, and now change its ^name *g* | 19:37 | |
Perl 6 is funny | |||
masak | -Ofunny | 19:38 | |
TimToady | and you wonder why Wile E. Coyote doesn't have a good relationship with ACME? | ||
FROGGS has not seen that lately :o) | 19:39 | ||
jaffa4 | I am trying to understand something , anything that goes to the core, Is callable in Perl6 , right> | ||
TimToady | that doesn't make a lot of sense; True is in the core, and is not callable | 19:40 | |
Mouq | r: False &&= True | ||
camelia | rakudo 13f2f9: ( no output ) | ||
jaffa4 | ok subs in the core? | ||
FROGGS | jaffa4: if you put a sub in "core", yes | ||
TimToady | more to the point, if you put it into the setting; our base setting just happens to be named CORE :) | 19:41 | |
jaffa4 | Where should goto go ? | ||
donaldh | p: { temp $*CWD = ''; $*CWD; } | ||
camelia | pugs: OUTPUT«*** No such subroutine: "&temp" at /tmp/UmyWz9q1MZ line 1, column 3-18» | ||
donaldh | d'oh | ||
jnthn | jaffa4: probably src/core/control.pm | 19:42 | |
TimToady | the name should go into CORE.setting | ||
donaldh | r: { temp $*CWD = ''; $*CWD } | ||
camelia | rakudo 13f2f9: ( no output ) | ||
TimToady | the implementation, what jnthn++ said | ||
jaffa4 | but core.setting is generated... | ||
diakopter | r: 0 ||= 2 | ||
camelia | rakudo 13f2f9: OUTPUT«Cannot modify an immutable value in sub METAOP_TEST_ASSIGN:<||> at src/gen/CORE.setting:15324 in block at /tmp/CZlCDXAyuA:1» | 19:43 | |
jaffa4 | Nothing should go there? | ||
TimToady | notionally, that's where it goes | ||
labster | CORE.setting is generated (in rakudo anyway) but cating together the files in src/core | ||
FROGGS | jaffa4: core.setting get concatenated, like from src/core/control.pm | ||
TimToady | that it is generated is an accident of implementation | ||
jaffa4 | accident? | ||
jnthn | Not having to find things in a 15000 line file is a good kind of accident :) | 19:44 | |
labster | .oO ( pmichaud accidentally a whole setting ) | ||
lizmat | 15732 | ||
well, after my latest patches are pushed :-) | 19:45 | ||
jnthn | lizmat: please say you don't know that by heart? :P | ||
TimToady | yes, an accident is what happens when an unstoppable force like CORE runs into an immovable object like your compiler table sizes | ||
lizmat | jnthn: $ wc -l src/gen/CORE.setting | ||
15732 src/gen/CORE.setting | |||
diakopter | I once ate twelve helpings of containers in one setting | ||
TimToady | were they empty? | ||
jnthn | TimToady: Funnily enough, we throw it all at the compiler at once :) | ||
TimToady: They're broken up for making the implementers life easier :P | |||
TimToady | s/compiler/implementor/ :) | 19:46 | |
jnthn | But I probably shouldn't have admitted that :P | ||
FROGGS .oO( implementor table size? ) | |||
donaldh | oO( immediate contextual capacity ) | 19:47 | |
moritz | today I learned about `git config --global help.autocorrect 1` | 19:48 | |
jaffa4 | I learnt about git reset --hard | ||
donaldh | moritz++ # learning by proxy | ||
moritz | that's occasionally very useful too | ||
FROGGS | moritz: will it correct my usual wrong typing like 'git bistect bad' ? | ||
masak | moritz++ | 19:49 | |
moritz | FROGGS: TIAS | ||
masak .oO( help.damn.you.autocorrect ) | |||
diakopter | heh. help.autocorrupt works too | ||
lizmat | r: my %a{Str} of Int; say %a.WHAT' # guess this is legal syntax | ||
camelia | rakudo 13f2f9: OUTPUT«===SORRY!=== Error while compiling /tmp/zbjHthklsrTwo terms in a rowat /tmp/zbjHthklsr:1------> my %a{Str} of Int; say %a.WHAT⏏' # guess this is legal syntax expecting any of: method arguments postfix … | ||
moritz | diakopter: aren't we all autocorrupted? :-) | ||
lizmat | r: my %a{Str} of Int; say %a.WHAT # guess this is legal syntax | ||
camelia | rakudo 13f2f9: OUTPUT«(Hash[Any,Str])» | ||
FROGGS | moritz: cool! | 19:51 | |
donaldh | wow, git is _very_ configurable | ||
moritz | $ man git-config|wc -l | ||
2476 | |||
19:51
leont left
|
|||
masak | o.O | 19:52 | |
19:52
kaare_ left
|
|||
masak | $ perldoc perlre | wc -l | 19:52 | |
2318 | |||
git-config is more complex than Perl 5's regexes! :P | 19:53 | ||
moritz | wc -l S05-regex.pod | ||
4702 S05-regex.pod | |||
masak | makes sense :) | ||
19:53
zwut00 joined
19:54
pernatiy joined
|
|||
diakopter | rnp: my %a{%a} | 19:54 | |
camelia | rakudo 13f2f9: OUTPUT«===SORRY!=== Error while compiling /tmp/K2iV1Xdt96Variable '%a' is not declaredat /tmp/K2iV1Xdt96:1------> my %a{%a⏏} expecting any of: postfix» | ||
..pugs: ( no output ) | |||
..niecza v24-88-g1f87209: OUTPUT«===SORRY!===Variable %a is not predeclared at /tmp/rVDMc_aiN8 line 1:------> my %a{⏏%a}Postconstraints, and shapes on variable declarators NYI at /tmp/rVDMc_aiN8 line 1 (EOF):------> my %a{%a}⏏<EOL>… | |||
diakopter | std: my %a{%a} | ||
camelia | std c2215f0: OUTPUT«ok 00:00 43m» | ||
diakopter | masak: masakbot bug | ||
TimToady | how so? | 19:55 | |
jnthn | std: my %a{%a} | ||
camelia | std c2215f0: OUTPUT«ok 00:00 43m» | ||
moritz | wait, what? It's supposed to be visible before the declaration is finished? | ||
jnthn | stdbug :P | ||
masak | yeah, stdbug. | ||
TimToady | how so? | ||
masak | what? really? | ||
diakopter | :} | ||
jnthn | dude! | 19:56 | |
TimToady | it's just not caring about the semantics of {%a} | ||
FROGGS | ahhh | ||
masak reluctantly submits rakudobug | |||
jnthn | masak: um, why? :) | ||
TimToady | it's the same one we've already had | ||
%a isn't introduced soon enough | |||
masak | TimToady: different case, though. | ||
and this one might well be harder. | 19:57 | ||
diakopter | good luck finding the other(s)... | ||
TimToady | not if you fix the first one right... | ||
masak | yeah, right :) | ||
diakopter | seems legit | ||
jaffa4 | I found a problem makefile generated by configureJVM,pl always recompiles everything. is that normal? | ||
diakopter | r: our Any{Any} | 19:58 | |
camelia | rakudo 13f2f9: OUTPUT«===SORRY!===Type 'Any' is not declaredat /tmp/pbmOqWROFf:1------> our Any⏏{Any}Malformed ourat /tmp/pbmOqWROFf:1------> our Any⏏{Any} expecting any of: scoped declarator»… | ||
jnthn hasn't seen it do that | |||
moritz | "everything" is pretty much | ||
diakopter is feeling MeanFuzzer personality today | |||
jnthn | It only re-compiles the stuff that changed, and stuff downstream of it... | ||
lizmat | $ wc -l t/spec/*/* | 19:59 | |
150970 total | |||
masak | diakopter++ # MeanFuzzer | ||
diakopter | r: my \our{\our}:=\our | ||
camelia | rakudo 13f2f9: OUTPUT«===SORRY!===No such method 'ast' for invocant of type 'NQPMu'» | ||
jaffa4 | I am reading the make file | 20:00 | |
the next jar depends on previous one????? | |||
diakopter | masak: er, that one's seen. a few times. | ||
donaldh | jaffa4: is this in rakudo ? | 20:01 | |
masak | diakopter: *nod* | ||
jaffa4 | yes | ||
donaldh | jaffa4: some of the jars have content dependencies, declared in Makefile-JVM.in yes. | 20:02 | |
It's not Java code. It's nqp or perl6 code. | 20:03 | ||
jaffa4 | should not goto here work? | ||
moritz | how? | 20:04 | |
jaffa4 | if goto is a function, "goto here" does not work... | ||
moritz | I mean you already know it's not implemented | ||
jaffa4 | just goto 'here' | ||
moritz | we talked about that yesterday | ||
donaldh | compiled directly to .jar with a cliassfile and serialisation | ||
jnthn | goto here; would work presumably because some kind of label object is installed | ||
jaffa4 | it is not implemented.. but TimToady told me it should be defined as a function | 20:05 | |
masak | diakopter: you know what would be really cool? a semi-structured Markov-chain word salad generator that generated instructions for meanfuzzers in need of external inspiration. things like "a variable declaration, but it refers to itself inside the braces". | ||
diakopter | r: role popo { macro marco { $^a but popo }; marco popo; } | ||
camelia | rakudo 13f2f9: OUTPUT«===SORRY!=== Error while compiling /tmp/ix7YBbZNgRNone of the parametric role variants for 'popo' matched the arguments supplied.Null PMC access in get_pmc_keyed()at /tmp/ix7YBbZNgR:1------> » | ||
diakopter | npmca. win. | 20:06 | |
masak submits NPMCA rakudobug | |||
"a role with a macro in it. the macro mixes in the role" | |||
I'm pretty sure it can be done. | 20:07 | ||
jnthn | Aaaaaad....it's called marco! | ||
diakopter | seems legit | ||
masak | jnthn: seems I can't prevent diakopter doing this. | ||
donaldh laughs his socks off | |||
diakopter | r: say(Positional but Associative) | ||
camelia | rakudo 13f2f9: OUTPUT«No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW' in sub infix:<but> at src/gen/CORE.setting:14995 in sub infix:<but> at src/gen/CORE.setting:14970 in block at /tmp/BDUluWiLdk:1» | ||
masak | jnthn: maybe I should just start referring to him as "diakopter dikaopter". | 20:08 | |
diakopter | you can't mixin to Associative? | ||
20:08
kbaker left
|
|||
lizmat | dioptrake? | 20:09 | |
moritz | r: role A { }; role B { }; A but B; | ||
camelia | rakudo 8f64f1: OUTPUT«No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW' in sub infix:<but> at src/gen/CORE.setting:14995 in sub infix:<but> at src/gen/CORE.setting:14970 in block at /tmp/KveYxvBtIH:1» | ||
moritz | diakopter: you can't mix into roles | ||
jnthn | You're trying to a role into a role... | ||
masak | that's not how we role. | ||
lizmat | or rock | ||
diakopter stops breathing a bit | |||
jnthn | We could, um, make it work by punning the first role :) | 20:10 | |
masak | lizmat: or paper. or scissors. | ||
Mouq | std: $_='mOkjOkl'; tr/O/0/; .say | ||
camelia | std c2215f0: OUTPUT«ok 00:00 43m» | ||
jnthn | or ... | ||
:) | |||
Mouq | npr: $_='mOkjOkl';tr/O/0/;.say | ||
camelia | niecza v24-88-g1f87209: OUTPUT«===SORRY!===Action method quote:tr not yet implemented at /tmp/8niEsgrWlP line 1:------> $_='mOkjOkl';tr/O/0/⏏;.sayUnhandled exception: Unable to resolve method statement_level in type Any at /home/p6eval/niecza/… | ||
..rakudo 8f64f1: OUTPUT«===SORRY!=== Error while compiling /tmp/seEuVsun8cBogus statementat /tmp/seEuVsun8c:1------> $_='mOkjOkl';tr/O/0/⏏;.say expecting any of: postfix infix stopper infix or meta-infix prefix or… | |||
..pugs: OUTPUT«m0kj0kl» | |||
moritz | or simply give a more awesome error message | ||
masak | jnthn: shut up! shut up! | ||
diakopter | r: say role {} but Any but role {} | 20:11 | |
camelia | rakudo 8f64f1: OUTPUT«===SORRY!=== Error while compiling /tmp/sQpPIZK2pdOperators 'but' and 'but' are non-associative and require parenthesisat /tmp/sQpPIZK2pd:1------> say role {} but Any ⏏but role {} expecting any of: postfix … | ||
masak .oO( what what? in the but but ) | |||
FROGGS | jaffa4: are you sure you can declare a goto-sub now? IIRC the lable is parsed, but thrown away after that | 20:12 | |
label* | |||
jnthn | masak: aarrgh, I'd forgotten that song :P | ||
jaffa4 | FROGGS: you are righ, now it just prints not yet implemented for goto 'label' in my machine | 20:14 | |
FROGGS | masak-- # www.youtube.com/watch?v=fbGkxcY7YFU | ||
20:14
EvanTeitelman left
|
|||
FROGGS | it is not always good to spread knowledge :o) | 20:14 | |
jaffa4: ahh, now I know what you are doing | |||
jaffa4 | Is it worth committing? | 20:15 | |
moritz | "All knowledge is worth having" -- Jacqueline Carey | ||
jaffa4 | How to make an Abomb? | ||
masak | moritz: did Jacqueline Carey ever see goatse? | 20:16 | |
FROGGS: don't look that up! | |||
FROGGS | masak: I already know that one :o) | ||
moritz | masak: I have no idea. But given the contents of some of her books, it might not shock her too much :-) | ||
FROGGS | at least what it is about | ||
lizmat just realizes that .WHAT is not really specced directly ? | 20:17 | ||
masak hopes Parrot Raiser's won't be the last word in that p6l thread | |||
(it's a bit too dismissive) | |||
moritz doesn't have anything to add to that discussion, except the line "WHAT?" | |||
jnthn | lizmat: Pretty sure it is in S12? | 20:18 | |
moritz | yes, it's in S12/Introspection | 20:19 | |
Metamethods for objects are named with interrogative pronouns in uppercase: | |||
WHAT the type object of the type, .gist returns MyClass() | |||
lizmat | ah, yes, ack hid it between other unrelated stuff | ||
benabik | Huh. nntp.perl.org's p6l index says there are two messages in that thread, but only lists the one when I try to read the thread. | ||
moritz | speaking of S12 | 20:20 | |
diakopter | r: class { my $a=500; $_=2; $_=($_ but $a) while $a--; say $_.^parents } | ||
moritz | $obj.WHAT eq 'Dog()' | ||
TimToady | it's in 2, 3, 6, 9, 12, 14, 26, and 32/Numeric | ||
moritz | that looks very wrong, no? | ||
TimToady | other than that, not a word | ||
camelia | rakudo 8f64f1: OUTPUT«(timeout)» | ||
diakopter | r: class { my $a=200; $_=2; $_=($_ but $a) while $a--; say $_.^parents } | ||
camelia | rakudo 8f64f1: OUTPUT«(Int+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}+{<anon>}… | ||
diakopter | *headdesk* | ||
rakudo's sense of humor is lacking. it can handle only 50 puns/second | |||
er, 20 | 20:21 | ||
timotimo | the website interface to the p6l confuses me | ||
it says "2 messages", but when i click on the link i can see only one with no obvious way to get to the second | 20:22 | ||
dalek | p: 725cfa8 | (Tobias Leich)++ | src/QRegex/P5Regex/ (2 files): [P5Regex] added \r, \R, \t and \x |
||
ecs: 6d77944 | moritz++ | S12-objects.pod: [S12] fix wrong assumptions about type object stringification |
|||
timotimo | at least parrot raiser wrote "CS" and not "BS" ;) | ||
dalek | : 2f3f004 | (Tobias Leich)++ | STATUS.md: status udpate |
||
FROGGS | timotimo: still just off by one :o) | 20:23 | |
masak | moritz: I think it's a case of "X is cool, Perl 6 is cool -- have you thought about putting X in Perl 6?" | ||
timotimo | :) | ||
masak | moritz: ...but it still deserves a measured answer. | ||
timotimo | anyway, i was able to get the mail anyway | ||
hah, benabik ran into the same issue a few minutes ahead of me | 20:24 | ||
20:25
EvanTeitelman joined
|
|||
TimToady | nr: my $x = "A𝖲"; $x++; $x.say | 20:25 | |
camelia | rakudo 8f64f1, niecza v24-88-g1f87209: OUTPUT«B𝖲» | ||
benabik | .u 𝖲 | 20:26 | |
TimToady | looks better in the log | ||
20:26
aindilis left
|
|||
lizmat | seems yoleaux is not with us :-( | 20:27 | |
20:27
ChanServ sets mode: +o diakopter,
diakopter sets mode: -o diakopter
|
|||
diakopter | dpk's offline too | 20:28 | |
20:28
crab2313 joined
|
|||
TimToady | nr: my $x = "B𝖲"; $x++; $x.say; what happens when you increment BS? | 20:29 | |
camelia | rakudo 8f64f1: OUTPUT«===SORRY!=== Error while compiling /tmp/YTmoy6TXFOTwo terms in a rowat /tmp/YTmoy6TXFO:1------> .say; what happens when you increment BS⏏? expecting any of: argument list postfix infix stopper … | ||
..niecza v24-88-g1f87209: OUTPUT«===SORRY!===Confused at /tmp/_9MaF7mpAi line 1:------> .say; what happens when you increment BS⏏?Undeclared name: 'BS' used at line 1Undeclared routines: 'happens' used at line 1 'increment' used at line | |||
..1 'wh… | |||
TimToady | nr: my $x = "B𝖲"; $x++; $x.say; # what happens when you increment BS? | ||
camelia | rakudo 8f64f1, niecza v24-88-g1f87209: OUTPUT«C𝖲» | ||
TimToady | that's better :) | ||
diakopter | I see B [box with question makr] | 20:30 | |
TimToady | "looks better in the log" | ||
dalek | kudo/nom: e6419ae | (Elizabeth Mattijsen)++ | src/core/ (3 files): Make .WHAT return something more sensible for arrays/hashes |
||
diakopter | not really | 20:31 | |
TimToady | get an OS with better fonts? | ||
FROGGS | diakopter: your unix is broken :o) | ||
flussence | .u 𝖲 | 20:44 | |
argh | |||
jnthn hopes the bot actually does live more than onece :) | 20:45 | ||
*once | |||
flussence | U+1D5B2 MATHEMATICAL SANS-SERIF CAPITAL S | ||
looks like I don't have a monospace font for that :/ | |||
tadzik | trolled by my own rakudobrew :| | ||
$ rakudobrew build parrot-HEAD -> Building parrot-HEAD is NYI. Well volunteered! | |||
*grumble* volunteer yourself >:( | 20:46 | ||
jnthn | *lol* | ||
FROGGS | hehe | ||
20:46
kbaker joined
|
|||
FROGGS | tadzik++ | 20:46 | |
moritz | ++tadzik :-) | ||
tadzik | funny thing is, it is implemented: the syntax is 'build parrot HEAD' though :) | 20:47 | |
20:49
supernovus joined
|
|||
supernovus | Hiya #perl6 | 20:50 | |
TimToady | o/ | ||
FROGGS | hi supernovus | 20:51 | |
supernovus | I've been away a while. Quite a while... trying to catch up on stuff I've missed. MoarVM++ | 20:55 | |
tadzik | yay, it's supernovus! | 20:56 | |
masak | supernovus! \o/ | ||
jnthn | o/ supernovus | 20:57 | |
tadzik: Is the JVM socket support stuff merged or still in a branch? | 20:58 | ||
tadzik | jnthn: in a branch | ||
supernovus | *Waves to everyone* I'm doing a nice fresh checkout of Rakudo at the moment... my last build was from May... definitely outdated! | ||
tadzik | jnthn: I was hoping to at least pass the spectests, but we're lacking, for example, open(..., "rp") | ||
"p" in particular | |||
which is basically popen() | |||
I may try to tackle that tomorrow, if tuits come | 20:59 | ||
or rather, time | |||
we can of course merge it anyway ;) | |||
but I'd rather not, it's still a bit lacking imo | |||
jnthn | ok | ||
tadzik | lwp-simple doesn't always work with it, e.g. it fails with chunked downloads, dunno why | 21:00 | |
21:07
jaffa4 left,
fhelmberger joined
21:08
fhelmberger left
21:11
fhelmberger joined,
fhelmberger left,
crab2313 left
21:13
fhelmberger joined
21:14
fhelmberger left,
benabik left
21:15
bruges_ left,
donaldh left
|
|||
Mouq | The spec says Q :subst /// is totally a thing, and AFAICT it isn't. I can't find a bug report on it | 21:17 | |
masak | 'night, #perl6 | 21:19 | |
supernovus | Well, my internet is having some serious speed issues. Still downloading parrot... Have a great * everyone! | 21:20 | |
diakopter | masak: gnigghjt | ||
supernovus | night masak! | ||
Mouq | night | ||
PerlJam | g'night masak | ||
masak | :) | ||
21:21
supernovus left
|
|||
PerlJam | Mouq: you can rakudobug it yourself, if you think it's necessary. | 21:22 | |
Mouq | How in the world does s/// even work as a quote? I mean it's there in the grammar; method quote:sym<s> | 21:27 | |
FROGGS | Mouq: nicely :o) | 21:33 | |
Mouq: what exactly is disturbing you? | 21:34 | ||
dalek | ast: 4c359a1 | (Elizabeth Mattijsen)++ | S12-introspection/WHAT.t: Add hopefully comprehensive .WHAT tests (with still many TODO's :-( ) |
21:35 | |
Mouq | two args :p | ||
dalek | kudo/nom: bc0051f | (Elizabeth Mattijsen)++ | t/spectest.data: Make sure we run the .WHAT introspection tests |
21:36 | |
Mouq | Which I guess is b/c of <sibble(%*LANG<Regex>, %*LANG<!>, ['qq'])> somehow | 21:37 | |
Yeah, okay. I'm begining to understand... | 21:38 | ||
FROGGS | Mouq: we have quibble, sibble and tribble | ||
Mouq | Except we don't have a tribble because tr/// isn't implemented | 21:40 | |
FROGGS | ohh | 21:41 | |
well, we an steal it from std :o) | 21:42 | ||
Mouq | Ahhh, I wasn't looking at std. Probably a good first step | 21:43 | |
FROGGS | std: tr/O/o/ | 21:45 | |
camelia | std c2215f0: OUTPUT«ok 00:00 41m» | ||
21:48
spider-mario left
21:51
berekuk left
|
|||
Mouq | std: Q :cc "abc" | 21:55 | |
camelia | std c2215f0: OUTPUT«Use of uninitialized value $CCSTATE in string eq at STD.pm line 52755.ok 00:00 41m» | ||
21:56
donaldh joined
|
|||
FROGGS | O.o | 21:56 | |
Mouq | ... I'm having trouble finding the 52 thousandth line of STD.pm ... | ||
TimToady | that's probably the line in the translated P5 code, STD.pmc probably | 21:57 | |
or .pm5 if you want indentation, iirc | |||
Mouq | std: cc"abc" | 21:58 | |
donaldh | I don't understand the parameter syntax in multi method Str(IO::Path:D:) { ... } | ||
camelia | std c2215f0: OUTPUT«===SORRY!===Two terms in a row (listop with args requires whitespace or parens) at /tmp/orvHrZhiJ7 line 1:------> cc⏏"abc" expecting any of: POST argument list feed_separator infix or meta-infix infixed function | ||
..postci… | |||
donaldh | What does the :D: mean? | ||
FROGGS | D: is for defined | ||
Mouq | camelia missed a  | 21:59 | |
FROGGS | so you are not allowed to pass a type object | ||
donaldh | Thx | ||
Arcane. | 22:02 | ||
Mouq | This [ github.com/perl6/std/blob/master/STD.pm6#L4427 ] might be where the warning is from, though I can't tell :/ | 22:03 | |
lizmat | donaldh: :U for undefined (aka Type Object) | ||
donaldh | And the trailing : ? | 22:04 | |
lizmat | and on that thought, some :D for dreams for me& | ||
Mouq | night lizmat | 22:06 | |
dalek | d: 34cdff5 | larry++ | STD.pm6: don't warn if $expr<variable> :!exist |
||
d: 06636e4 | larry++ | STD.pm6: initialize $*CCSTATE earlier |
|||
Mouq | TimToady: Does it count as cheating if I just ask you what rule cc does? | 22:11 | |
Mouq afk | 22:13 | ||
22:13
pmurias left
22:14
PacoAir left
|
|||
donaldh | Where are :U and :D in the spec? | 22:18 | |
: D | |||
22:18
bluescreen10 left
|
|||
jnthn | donaldh: perlcabal.org/syn/S12.html#Abstract...rete_types | 22:19 | |
donaldh | jnthn++ | 22:20 | |
TimToady | Mouq: character classes and related tr/// parsing that want to parse character ranges | 22:21 | |
22:22
zwut00 left
|
|||
jnthn | 'night, #perl6 | 22:22 | |
ingy | night jnthn | ||
donaldh | 'Night o/ | 22:24 | |
22:25
Rotwang left
22:27
EvanTeitelman left,
EvanTeitelman joined
22:30
donaldh left
22:31
donaldh joined,
donaldh left,
EvanTeitelman left
22:40
eternaleye left
22:43
dmol left
22:46
eternaleye joined
22:49
logie joined
22:55
abnorman left
22:58
abnorman joined
22:59
xilo joined
23:00
colomon joined
23:07
ajr_ left
23:15
BenGoldberg joined
23:16
Ben_Goldberg joined
23:19
berekuk joined,
BenGoldberg left
23:20
Ben_Goldberg is now known as BenGoldberg
|
|||
dalek | kudo-star-daily: 5873b7c | coke++ | log/ (5 files): today (automated commit) |
23:21 | |
kudo-star-daily: e0c2678 | coke++ | log/ (5 files): today (automated commit) |
|||
kudo-star-daily: 652506f | coke++ | log/ (5 files): today (automated commit) |
|||
[Coke] | .to diakopter - is my cron output going anywhere? | 23:22 | |
BenGoldberg | .ping | ||
preflex: seen yoleaux | 23:24 | ||
preflex | yoleaux was last seen on #perl6 15 hours, 16 minutes and 9 seconds ago, saying: 07:26Z <japhb> timotimo: I'm merging your JVM changes to perl6-bench (plus updating to the latest rakudo-jvm build instructions) in my local tree, but the testing is taking a while. After I push just that, I'll start looking through your other improvements. | ||
diakopter | [Coke]: not unless you set it to | 23:26 | |
afaik | |||
BenGoldberg | Is this a bug? | 23:28 | |
rn: (gather {take 2} but role {})[0].print | |||
camelia | niecza v24-88-g1f87209: OUTPUT«2» | ||
..rakudo bc0051: OUTPUT«This type does not support elems in method REIFY at src/gen/CORE.setting:7497 in method reify at src/gen/CORE.setting:6723 in method gimme at src/gen/CORE.setting:7143 in method exists at src/gen/CORE.setting:7131 in method at_pos at src/gen/CORE.setting:… | |||
TimToady | yes, you keep asking the same question, basically, and it's still the same answer :) | 23:34 | |
niecza gets it right, so rakudo oughta too | |||
23:38
EvanTeitelman joined
23:50
colomon left
|
|||
BenGoldberg | It's not exactly the same question... yesterday it was a range, today it's a gather/take :) | 23:54 | |
rn: (^3 but role {})[0].print | |||
camelia | niecza v24-88-g1f87209: OUTPUT«0» | ||
..rakudo bc0051: OUTPUT«No such method 'BUILD' for invocant of type 'Range+{<anon>}' in method reify at src/gen/CORE.setting:6586 in method reify at src/gen/CORE.setting:6710 in method gimme at src/gen/CORE.setting:7143 in method exists at src/gen/CORE.setting:7131 in method at_… | |||
BenGoldberg | The error message is different | 23:55 | |
23:56
fridim__ joined
23:59
iSlug left
|