Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-08-19

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

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

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

Perl 6 | Reference Documentation | Rakudo