Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-04-30

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
08:18 ilbot_bck joined #perl6
08:18 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend! ! temporary logs at http://colabti.org/irclogger/irclogger_log/perl6
08:29 moritz masak: #masakism is logged again, the logs just aren't availble in real time :/
08:35 jnthn morning o/
08:36 dalek specs: 2a92e08 | (Brent Laabs)++ | S32-setting-library/IO.pod:
08:36 dalek specs: add IO::Spec, add IO::Path methods cleanup and resolve
08:36 dalek specs: review: https://github.com/perl6/specs/commit/2a92e084f1
08:36 moritz \o jnthn
08:36 labster good morning
08:40 tgt joined #perl6
09:05 dakkar joined #perl6
09:09 FROGGS morning labster, jnthn
09:15 tgt joined #perl6
09:22 labster r: &say.WHAT;  our $*PERL is Cool??  True!! our $PERL is Cool
09:22 camelia rakudo 3252c3:  ( no output )
09:22 tadzik :D
09:22 tadzik labster++
09:24 jnthn hehe :)
09:24 jnthn .oO( that's the REAL reason we changed ? : to ?? !! )
09:31 labster r: #`{  jnthn:  }  "sad" but True;
09:31 camelia rakudo 3252c3:  ( no output )
09:31 jerome_ joined #perl6
09:32 mathw hehe
09:33 mathw morning all \o/ o/ \o
09:33 jnthn o/ mathw
09:36 labster /\o/\ mathw
09:41 FROGGS hey hey mathw
09:42 eternaleye joined #perl6
09:43 kresike joined #perl6
09:43 kresike hello all you happy perl6 people
09:43 FROGGS hi kresike
09:47 mathw hello!
09:47 tadzik hello!
09:48 tadzik mathw: how is your t430 that arrived on time because the sender is not a total dick? :|
09:53 mathw tadzik: It's very nice. Unfortunately Fedora 18 is a bit... umm... broken
09:53 mathw broken in ways I didn't notice on my previous laptop!
09:54 mathw I actually had to switch to ubuntu, and we'll see how long that lasts before I throw the laptop out of the window
09:54 kresike FROGGS, o/
09:55 tadzik mathw: I'm running ubuntu everywhere these days, it's not that bad
09:55 tadzik but I don't even try unity and all those things
09:55 mathw I've decided to give it a chance
09:55 FROGGS eval: my $x = "abc"; say chop $x; say $x
09:55 FROGGS O.o
09:55 mathw although I wasn't very happy when I found out that they don't have a haskell-platform package in 13.04
09:55 tadzik I'm just installing xubuntu and then ignoring xfce anyway :)
09:56 FROGGS p5eval: help
09:56 p5eval FROGGS: help
09:56 tadzik hehehe
09:56 mathw the reason why? Because there's no platform release yet which uses GHC 7.6. Which makes me wonder why did they upgrade the compiler and thus break the haskell dev experience?
09:56 FROGGS -.-
09:56 FROGGS p5eval: my $x = "abc"; say chop $x; say $x
09:56 p5eval FROGGS: cab1
09:56 jaldhar joined #perl6
09:57 FROGGS p5eval: my $x = "abc"; chop $x; say $x
09:57 p5eval FROGGS: ab1
09:57 FROGGS ahh, I see
09:57 mathw chop returns the chopped character?
09:57 mathw err
09:58 FROGGS p5eval: my $x = "abc"; printf("%s %s\n", chop $x; $x)
09:58 p5eval FROGGS: ERROR: syntax error at (eval 7) line 1, at EOFsyntax error at (eval 7) line 3, near "$x)"
09:58 mathw no, I'm still not getting that
09:58 FROGGS p5eval: my $x = "abc"; printf("%s %s\n", chop $x, $x)
09:58 p5eval FROGGS: c ab1
09:58 mathw where's the 1 coming from?
09:58 kresike FROGGS, where's that 1 coming from ?
09:58 FROGGS chop returns the chopped one, ya
09:58 FROGGS 1 is because the statement is true
09:58 FROGGS r: my $x = "abc"; printf("%s %s\n", chop $x, $x)
09:58 camelia rakudo 3252c3: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in sub chop at src/gen/CORE.setting:2522␤  in block  at /tmp/0iNKPwtRhG:1␤␤»
09:58 FROGGS r: my $x = "abc"; printf("%s %s\n", chop($x), $x)
09:59 camelia rakudo 3252c3: OUTPUT«ab abc␤»
09:59 FROGGS and rakudos chop returnes the opposite :/
09:59 * FROGGS will read spec now
10:01 jnthn In Perl 6 we tend to lean towards immutability.
10:02 jnthn $a.=chop; # to mutate
10:07 mathw and a nice thing it is too
10:07 mathw (says the Haskell programmer)
10:10 * jnthn finds code that mutates less tends to be easier to refactor
10:10 jnthn And/or reuse, evolve, extend, etc.
10:12 jaldhar joined #perl6
10:14 * mathw finds that too
10:17 tgt joined #perl6
10:19 * mathw is writing real proper unit tests using a real proper mocking framework and loving it
10:22 * jnthn is generally happier when he can find a factoring that spares him the need for a mocking framework, but that isn't always an option
10:22 geekosaur joined #perl6
10:31 Timbus joined #perl6
10:31 geekosaur joined #perl6
10:34 mathw Especially since I'm retrofitting a system I didn't write
10:35 mathw Fortunately it was fairly easy to persuade it to take all its external dependencies in an easily-mockable way
10:35 jnthn Yeah, that's one of the cases where it tends to be needed.
10:49 cognominal joined #perl6
10:51 mathw What this is really letting me do is verifying that the components which glue various other components together coordinate things properly
10:52 mathw So when it gets an input of this sort of value, does it attempt to invoke this operation over here, and then this one over here, and then this one with the response from the first one, and so forth
10:52 mathw Or, does it explode and leave a mess on the floor?
10:53 masak either solution has its appeal :P
11:00 mathw Not when you're trying to crunch a giant data set into a suitable format to send off to a government department. They tend to prefer the non-messy outcome :)
11:00 mathw Boring I know, but it's the government
11:01 * jnthn forms The Floor Is To Damn Clean party
11:03 mathw I think I'll have some lunch now
11:03 mathw While jnthn writes his manifesto
11:03 mathw &
11:17 snearch joined #perl6
11:23 mtk joined #perl6
11:30 pmichaud good morning, #perl6
11:30 jnthn o/, pmichaud
11:30 FROGGS hi pmichaud
11:34 pmichaud jnthn: TimToady's answer to spec #35 makes me think that we don't get the "easy" solution for Nil in Match objects.  :-)
11:36 pmichaud i.e., we should explicitly bind slots to Nil so that :exists responds properly.
11:36 pmichaud (with ?-quantifiers)
11:37 jnthn pmichaud: Yeah, I saw that and realized...eek.
11:37 pmichaud oh, I don't think it'll be too hard.
11:37 jnthn pmichaud: So, 'tis a bit more work. But I hope not so bad.
11:37 pmichaud it just means that we keep the failed match objects in the cstack
11:37 jnthn pmichaud: I just hope it doesn't slow down CAPHASH and MATCH.
11:37 pmichaud and that failed match objects always return Nil
11:37 cognominal nqp:  https://gist.github.com/cognominal/5488167
11:37 camelia nqp: OUTPUT«Method 'ast' not found for invocant of class 'String'␤current instr.: 'TOP' pc 608 ((file unknown):173676329) (/tmp/Oq8Q7j94td:7)␤»
11:37 pmichaud I think it'll be just as fast; perhaps even a little faster
11:38 jnthn pmichaud: OK. They typically show up as hot paths in profiles of parsing.
11:38 cognominal hi everyone.
11:38 jnthn pmichaud: I've done what I can to improve things.
11:38 jnthn pmichaud: Well, I've done the immediate things I could think of ;)
11:38 pmichaud yeah, I still have some ideas for improvement.  I think we still need to look at string encodings and make sure we're not overly copying stuff.
11:38 domidumont joined #perl6
11:39 cognominal in the giest I just pasted, I forgot some wiring in my actions but which?
11:39 pmichaud and having a fast substr-compare still might be a useful option
11:39 jnthn cognominal: missing @make@ in TOP
11:39 cognominal oops
11:39 cognominal thx
11:39 jnthn pmichaud: Yeah, I need to fiddle the JVM version to use regionMatches or whatever it's called.
11:40 jnthn pmichaud: I did a pretty direct port out of "I want this to work so faithful translation first is preferable" :)
11:40 pmichaud jnthn: yeah.
11:41 pmichaud unless speed is a huge issue, I'm thinking we want QAST::Compiler to have a lot more in common among the vms
11:41 pmichaud especially the regex compiler
11:41 pmichaud (and yes, speed is a huge issue)
11:41 pmichaud i.e., refactor it to use generic nqp ops instead of vm-specific ones
11:41 pmichaud (and define nqp ops as needed to enable that to happen)
11:42 pmichaud I'm afk for a bit... have to fetch the tea-stained paper from the oven.  :-P
11:42 saxx joined #perl6
11:42 pecastro joined #perl6
11:46 pmichaud (from backscroll)   we really might want to start publishing our own .deb packages :-/
11:49 FROGGS I'd do it if I had help on creating deb packages properly
11:49 cognominal jnthn, indeed the make is missing, but the problem I hit so far is that <EXPR>.ast is a string :(
11:50 FROGGS cognominal: what about givin it a sigil?
11:50 cognominal arf
11:50 FROGGS :P
11:50 cognominal I need a walk
11:50 cognominal thx
11:50 FROGGS you'Re welcome
11:51 arnsholt pmichaud: Any idea how complicated that'd be to set up?
11:51 nwc10 perl 6 - diving people to walks and naps since, well, quite a while.
11:51 nwc10 er, driving
11:51 nwc10 that would be funnier.
11:51 cognominal I don't ever write a string as <EXPR>. I wish the compiler could know that
11:52 nwc10 pmichaud: I wrote a latin 1 vs UTF-8 string compare routine for Perl 5 for some reason
11:52 mavcunha joined #perl6
11:52 nwc10 not sure if that's the sort of thing you're thinking of. The use case was eq/ne/cmp etc between two strings of different encodings, to avoid the need to transcode
11:54 nwc10 also, return value was not just -1/0/-1 but -2/-1/0/1/2 so that it could also report things like "LHS is the initial substring of RHS"
11:54 pmichaud nwc10: that's sort of it, yes.  we already transcode our strings to a fixed-width encoding
11:54 nwc10 not sure we've needed that, but it was free to return that info
11:54 nwc10 yes, fixed width for the win
11:54 nwc10 but I suspect that it's potentially the same thing - avoid transcoding at O(length) when you can find something at O(much earlier)
11:54 pmichaud right now we incur a cost for comparing substrings
11:55 sizz joined #perl6
11:55 pmichaud e.g., if we have a really long string (e.g. program source) and we need to find out if the string at position N is "if", we currently do
11:55 pmichaud $S0 = substr source, N, 2
11:55 pmichaud if $S0 == "if" ...
11:56 pmichaud which means that we do a _lot_ of substr operations in Parrot
11:56 pmichaud better would be
11:56 pmichaud $I0 = strposcmp source, "if", N
11:56 pmichaud which does the comparison without having to first create the substring to compare to
11:56 nwc10 did you miss a 2 from that?
11:57 pmichaud perhaps
11:57 pmichaud or the 2 could be deduced from the "if"
11:57 nwc10 oh, sorry, I misread the 2 as pos, not len
11:57 nwc10 PEB(my)KAC
11:58 pmichaud and since string objects in Parrot act somewhat like gc-ables.... there's a lot of churn we should probably avoid
11:58 jnthn nwc10: If you code standing up, that can't happen so easily, btw. ;)
11:59 jnthn (provided you move the chair to not be behind you, of course...)
11:59 pmichaud if you keep the chair in front of you, then it becomes CEBPAK
12:00 nwc10 and lots of substrings means lots of garbage?
12:00 pmichaud well, lots of string headers
12:00 pmichaud I guess that would qualify as garbage.  I'm not exactly sure how Parrot handles those these days
12:01 pmichaud at any rate, we should be able to improve the substr compare a fair bit.
12:02 mathw \o/
12:03 nwc10 that would be \o/
12:03 mathw I noticed a huge speedup last time I compiled Rakudo, but that was because I'd just got a new laptop with a Core i7 in it
12:03 pmichaud whether that translates to a speed improvement... I dunno.  I did some preliminary work here on a substr compare and was a little disappointed in it
12:03 * jnthn may try it on the JVM port to see what happen
12:04 jnthn I know each new string is a GCable object. OTOH, JVMs do clever things like inlining and EA
12:05 pmichaud oooh, oooh
12:05 pmichaud I might be able to get the string comparison to handle case-insensitivity, too.
12:05 jnthn :)
12:06 * pmichaud looks up details on regionMatches in java for comparison.
12:07 jnthn iirc there's a case insensitive form also
12:07 pmichaud there is
12:07 pmichaud I think I'll put that in as well
12:19 pmichaud afk, kids to school
12:25 nwc10 jnthn: presumably inlining and Escape Analysis is still work that the compiler (or JIT) needs to do
12:25 nwc10 so if it's easy enough for NQP or Rakudo to generate better code directly, that is a runtime win
12:25 nwc10 (Albeit trading runtime for jnthn/Pm-time)
12:28 jnthn nwc10: For sure, and also optimizations take time to kick in
12:28 jnthn It optimizes over time as it better understands the hot spots
12:30 masak pmichaud++ # CEBPAK
12:35 tangentstorm computer exists between problem and keyboard?
12:37 nwc10 *chair*
12:37 nwc10 see about 40 minutes ago
12:38 tangentstorm oh right. duh :)
12:46 * FROGGS .oO( computer exists between chair and keyboard? )
12:46 pmichaud if you sit on the keyboard, it's  KEBPAC  :-)
12:47 FROGGS xccccccccccccccccccccccccccc>a'q9 #
12:48 tangentstorm this is why they invented http://en.wikipedia.org/wiki/SHRDLU
12:49 * pmichaud notes that kebpac.org and kebpac.com are both available.
12:54 ajr joined #perl6
13:11 tgt joined #perl6
13:16 bluescreen10 joined #perl6
13:26 test__ joined #perl6
13:29 mavcunha joined #perl6
13:32 Util joined #perl6
13:33 plobsing joined #perl6
13:36 Util HEAD (54a9a07) of NQP is broken for me, even with a fresh build:
13:36 Util `git clone git://github.com/perl6/nqp.git && cd nqp && perl Configure.pl --gen-parrot && make`
13:36 Util Sometimes this fails here:
13:36 Util /Users/bruce/NQP_temp_crashin​g_head/nqp/install/bin/parrot -L. -X. --library=src/vm/parrot/stage0 src/vm/parrot/stage0/nqp.pbc --target=pir --output=src/stage1/gen/NQPHLL.pir --module-path=src/stage1 --setting-path=src/stage1 --no-regex-lib src/stage1/gen/NQPHLL.nqp
13:36 timotimo r: my @a = 1, 2, 3; my @b = 1, 0, 1; (@a Z/ @b).perl.say;
13:36 Util parrot(39640,0x7fff7e8f7180) malloc: *** error for object 0x7fd1d91aaf60: incorrect checksum for freed object - object was probably modified after being freed.
13:36 Util Other times, it fails here: (it also fails here if you run `make` after that first failure)
13:36 Util /Users/bruce/NQP_temp_comm​it/nqp/install/bin/parrot -L. -X. --library=src/vm/parrot/stage0 src/vm/parrot/stage0/nqp.pbc --target=pir --output=src/stage1/QAST.pir --module-path=src/stage1 --setting-path=src/stage1 --no-regex-lib src/stage1/QAST.nqp
13:36 Util Invalid dependencies table index encountered (index 8718)
13:37 camelia rakudo 3252c3: OUTPUT«(timeout)»
13:37 Util jnthn: ^^^ Your commits
13:37 Util Looks like 176fa67 was last successful, 1d92734 was first failure.
13:37 timotimo why is my thing timing out? it gives "divide by zero" without the .perl.say
13:38 toebu joined #perl6
13:39 timotimo i suppose there's no good way to do this in a short form
13:40 Util r: my @a = 1, 2, 3; my @b = 1, 0, 1; my @c = (@a Z/ @b); @c.say;
13:40 camelia rakudo 3252c3: OUTPUT«Divide by zero␤  in sub infix:<div> at src/gen/CORE.setting:3324␤  in sub infix:<div> at src/gen/CORE.setting:2975␤  in method floor at src/gen/CORE.setting:8652␤  in method Str at src/gen/CORE.setting:8670␤  in method Str at src/gen/CORE.setting:876␤  in method St…
13:41 Util timotimo: Using an intermediate var (@c) allows the failure to happen before .perl tries to get involved.
13:42 timotimo i've settled on this form now for my "production code":     for ($self.ships, $other.ships) Z (@dpot-other, @dpot-self) -> $count, $dpot { $quick-rounds min= $count / $dpot if $dpot > 0; }
13:42 timotimo i think it still looks plenty readable.
13:42 jnthn Util: I'm assuming you're building a branch?
13:43 jnthn oh, hang on
13:43 jnthn that one went into master
13:43 Util jnthn: No, master
13:43 Util That `git clone...` is the exact command that I used.
13:44 timotimo jnthn: pretty usable rakudo on JVM by end of next month; what do you reckon?
13:45 jnthn Util: Yeah, I see now...sorry, multiple distractions here :)
13:45 jnthn Util: I'll have a closer look a bit later
13:46 arnsholt jnthn: Speaking of Rakudo on JVM, I think NativeCall for JVM should be doable within a reasonable timeframe. It turns out I'm going to YAPC::NA, so I plan on spending my time on NativeCall stuff
13:46 arnsholt Er, hackathon time, that is
13:46 Util jnthn: Thanks! I will commit my RT#117731 is-prime fix after NQP HEAD builds correctly again.
13:48 pmichaud timotimo: I think our official position is that we're not making any predictions about when rakudo on JVM might be available/usable.
13:48 timotimo hehe. i was looking for an unofficial prediction :)
13:49 nwc10 "not this week"
13:49 pmichaud s/I think our/Our/
13:49 pmichaud "we're not making any preductions"  includes "unofficial predictions"  :-)
13:49 pmichaud *predictions
13:49 mathw ready by Christmas?
13:50 * pmichaud likes "preductions", though -- sounds like the reverse of "induction" :)
13:50 pmichaud mathw: we're not making any predictions.  :)
13:50 nwc10 I'm sticking to "not this week"
13:50 mathw heh
13:51 nwc10 I think that that has a good chance of being correct
13:51 mathw I thought the standard prediction for all Perl 6 projects was Christmas
13:51 nwc10 "not next week either" seems pretty safe
13:51 * jnthn will go with "not this week" :P
13:51 mathw "not this week" does seem pretty safe
13:51 jnthn It's actually quite easy for me to achieve that too ;)
13:51 mathw wish my boss would accept that kind of timescale
13:51 pmichaud given that jnthn++ is working on it, though, "not this week" isn't even a safe prediction.  :)
13:52 arnsholt pmichaud: Apparently there's something called co-induction. Probably not the same as preduction though
13:52 jnthn pmichaud: Well, I've got distractions coming up, though.
13:52 jnthn Gotta make a (literally) flying visit to Finland soon.
13:53 pmichaud nqp HEAD is broken?
13:53 pmichaud (reading backscroll)
13:53 jnthn "works for me"
13:53 mavcunha joined #perl6
13:53 pmichaud I'll try it here.
13:53 jnthn thanks
13:53 * jnthn digs back into $dayjob thing
13:53 jnthn Will have some tuits later
13:54 grondilu joined #perl6
13:54 mavcunha joined #perl6
13:57 mathw flying? Are you travelling by catapult?
14:00 dalek nqp: afbc772 | pmichaud++ | t/qregex/ (2 files):
14:00 dalek nqp: Fix up incomplete quantified captures commit 54a9a07.
14:00 dalek nqp: review: https://github.com/perl6/nqp/commit/afbc7722c1
14:02 pmichaud Util: nqp builds okay for me on my box.  I'm guessing there's a GC or pointer problem somewhere that your system is exposing.
14:03 timotimo what are the current LHF in rakudo and nqp on parrot or jvm? anything in particular i could pay some attention to today?
14:04 Util pmichaud: I will try on my Linux box. Failure was on OS X Mountain Lion.
14:06 nwc10 Util: 4 is sometimes prime on OS X (and FreeBSD), which seems to be down to the GC
14:06 nwc10 so that's a known seen on OS X, not on Linux, problem
14:06 pmichaud I think Util is seeing a build failure on his box.
14:06 nwc10 aha.
14:06 nwc10 that's a lot more "fun" :-(
14:09 saxx joined #perl6
14:10 Util Yes, I have fixed the prime problem, but was doing a test against HEAD before pushing the fix.
14:13 FROGGS jnthn: if I have an <EXPR> which matched $x, how do I bind to it in the actions?
14:13 FROGGS sub bind_op tells me, that it can't bind to this lhs
14:16 jnthn FROGGS: Well, that means the case analysis failed I guess...
14:17 jnthn FROGGS: Can you give me a little more context?
14:17 FROGGS hmmm, or I passed the wrong args
14:17 FROGGS oaky
14:17 jnthn The set of things we can bind to is constrained 'cus binding is a fairly low level operation.
14:18 jnthn It's not like assignment where you can throw pretty much what you like on the LHS and provided it somehow produces a container-y thingy you're good.
14:18 FROGGS I have token term:sym<chop> { <sym> » <?before \s*> <.ws> <EXPR('q=')>? }
14:18 FROGGS so I thought I could do: bind_op($/, $<EXPR>[0].ast, $chopped_var, '$') # $chopped_var is QAST::Var.new(...
14:19 FROGGS btw, P5's chop modifies the arg in place
14:19 jnthn That sounds like an odd way to implement it to me... I'd have expected chop to be a built-in that takes a container, does the choperation, then assigns the result into the container.
14:20 FROGGS how do I "take container" ?
14:20 jnthn like sub prefix:<chop>($x is rw) { $x = low-level-chop-thingy($x) } # or so
14:20 FROGGS a*
14:21 jnthn But however you write such things...I dunno what you're writing your Perl 5 setting/built-ins in... :)
14:21 FROGGS well, basically at the same level where Perl6::Actions is
14:22 kaare_ joined #perl6
14:22 FROGGS the problem with things like chop is, that I think it really needs to be a term
14:23 FROGGS because you can do: my @array = "a", "b",  chop "abc", "def"
14:23 FROGGS chop will only take "abc" as an arg
14:24 FROGGS or I have to turn it all around and make the perl 5 subroutine prototypes work first >.<
14:25 jnthn A prefix at the right precedene will get it right, no?
14:27 FROGGS hmmm, this could work for the zero/one-scalar-argument case, yeah
14:28 alester joined #perl6
14:29 geekosaur joined #perl6
14:30 xilo joined #perl6
14:31 skids joined #perl6
14:31 baest joined #perl6
14:32 geekosaur joined #perl6
14:41 FROGGS jnthn: so, lets say I make my own core/terms.pm, so like rakudo I'd create a setting.pir and bootstrap is somehow?
14:41 baest joined #perl6
14:41 * FROGGS has no idea about bootstrapping yet
14:42 FROGGS gtg home, will read backlog...
14:42 FROGGS but thanks already! :o)
14:45 donaldh joined #perl6
14:48 rindolf joined #perl6
14:50 gtodd joined #perl6
14:58 kbenson joined #perl6
15:00 jnthn FROGGS: having pondered it a bit, it occurs to me that the best way may be to have a CORE5.setting that has the Perl 6 setting as its outer setting and maybe try using that. Then you can override/replace all the things you need to, and gradually work towards independence.
15:01 thou joined #perl6
15:26 sizz joined #perl6
15:30 dmol joined #perl6
15:56 masak evening, #perl6! \o
15:57 tgt joined #perl6
16:00 masak it is now exactly 24 hours before #masakism begins. things are heating up on the channel. excited.
16:00 masak I'll post a few reminders tomorrow, for people who aren't on the channel yet.
16:01 isBEKaml joined #perl6
16:01 isBEKaml OHHAI, I just looked at rakudo.org - was there no 2013.03 star release?
16:02 isBEKaml how about this month?
16:04 timotimo there was no such release.
16:05 isBEKaml :(
16:07 FROGGS joined #perl6
16:08 census joined #perl6
16:09 isBEKaml BTW - we have package build scripts available for slackware. It's a little slow getting things up live here, I'll try to keep things as close to release versions as possible. http://slackbuilds.org/resu​lt/?search=nqp&amp;sv=14.0
16:09 isBEKaml I've deferred R* for now.
16:10 kresike bye folks
16:10 isBEKaml o/ kresike
16:11 isBEKaml I mean, the package script for R* in slackbuilds.
16:19 SmokeMachine joined #perl6
16:21 mavcunha joined #perl6
16:22 [Coke] there is no guarantee of monthly star releases.
16:22 [Coke] (as opposed to the compiler, which we're pretty solid on.)
16:25 isBEKaml Is there anything that makes it so? I mean, if it can be released by non-committers, maybe I can take it up until someone comes along?
16:26 domidumont joined #perl6
16:46 Chillance joined #perl6
16:47 gtodd isBEKaml: I am still learning how to make a release :-|
16:48 isBEKaml gtodd: hmm, would you be willing to take this up if it falls down to you? (even on a semi-permanent basis) :)
16:49 gtodd isbechamel:  in the future I will help ... I almost was ready to step up but my git learning curve ... the 9 pull requests and my parrot problems were "blockers" :-)
16:51 gtodd isBEKaml: well I am more of project manager/bureaucrat and I'm more at ease in perl5 (and even there barely) from a oldster scripting sysadmin perspective
16:51 isBEKaml gtodd: heh. :) I was just throwing that out there.
16:51 gtodd but sure ... just don't ask me to talk about compiler theory or resolve disputes with any kind of technical merit :-P
16:52 * isBEKaml keeps isbechamel in mind. :)
16:52 gtodd hmm
16:52 gtodd strange that I typed that?!? Must be lunchtime in my TZ
16:52 gtodd or past
16:53 isBEKaml cutting releases don't require deep technical chops. Just some commands to type in and out pops release packages. :)
16:53 gtodd yeah that's why I would volunteer
16:53 isBEKaml gtodd: no worries.
16:53 gtodd put me down for june :)
16:53 isBEKaml gtodd: erm, I'm not actually sure that's all set in stone. I'm waiting for core committers to speak up. :)
16:54 gtodd hah np :-)
16:54 ajr joined #perl6
16:54 * gtodd toys with the idea of a perl conference
16:55 gtodd as in trying to set one up ...
16:55 gtodd hmm maybe I'll start simple with a perl BarCamp
16:56 bluescreen10 joined #perl6
16:57 pmichaud I may be able to cut a star release today.
16:59 gtodd pmichaud: where does one twiddle things so at the top level the star release defaults to grabbing parrot-5.3.0 ?
17:00 jerome_ joined #perl6
17:01 gtodd when using --gen-parrot or --gen-nqp
17:03 isBEKaml gtodd: I believe that would be: perl Configure --gen-parrot=RELEASE_5_3_0 # usually --gen-parrot=BRANCH_NAME
17:04 spider-mario joined #perl6
17:04 gtodd yeah I'm doing that and it works
17:04 gtodd just wondering how to make 5_3_0 the default
17:06 FROGGS there is a tools/build/PARROT_REVISION or so
17:06 isBEKaml pmichaud: awesome :-)
17:07 gtodd so it's a rakudo not a rakudo star issue
17:07 gtodd FROGGS: great
17:07 FROGGS and a tools/build/NQP_REVISION in the rakudo repo
17:07 isBEKaml gtodd: that would be in the star repo to generate a makefile.
17:08 pmichaud NONONONO
17:08 pmichaud don't change the rakudo or NQP revision for star, that's the wrong approach.
17:09 isBEKaml pmichaud: I believe gtodd was asking about how to make a default versions in order to build a star package.
17:10 pmichaud isBEKaml: yes, and FROGGS was suggesting changing PARROT_REVISION and NQP_REVISION, which would be the wrong way to do it.
17:10 pmichaud the way to adjust star and rakudo versions is described in step 2 of the star release guide  :-/
17:11 isBEKaml pmichaud: ah, yeah - I pointed them towards the star repo.
17:11 FROGGS I just said where there version are in, I actually dont know what he's up to, just grabbed a single line and answered
17:11 isBEKaml gtodd: it's in tools/star/Makefile in star repo.
17:12 isBEKaml gtodd: also, read the release guide in the same folder.
17:13 isBEKaml pmichaud: what do you think about an informal group of volunteers stepping up to cut star releases every month?
17:14 gtodd pmichaud: :-) I'm just reading the docs/release_guide.pod for rakudo
17:14 pmichaud isBEKaml: that's the way it's supposed to work, yes.  Same as Rakudo releases :)
17:14 gtodd when I volunteered it was for rakudo !! :-|
17:15 gtodd j/k
17:15 isBEKaml gtodd: that's for rakudo compiler release. Star has its own release guide outlined in star repo: https://github.com/rakudo/star
17:16 isBEKaml pmichaud: heh - by informal, I meant non-committers. :) (though it was just one compiler release done by a non-committer)
17:17 pmichaud isBEKaml: the commiters for star are already separate from the commiters for the compiler, and star doesn't require a CLA.
17:17 gtodd FROGGS: was trying to simulate a release following the docs/release_guide.pod ... got everything to work but the pull requests and updating the parrot version
17:17 gtodd isBEKaml: thanks
17:18 gtodd isBEKaml: so the star repo is separate from rakudo repo or ....
17:18 pmichaud isBEKaml: so short answer to your question is -- anyone that wants a star commitbit can get one.
17:19 isBEKaml pmichaud: great, sign me up! :)
17:19 isBEKaml pmichaud: I can step in when no one comes forward.
17:19 gtodd isBEKaml: I'm hoping the rakudo and parrot parts of the star  release are just clones of the rakudo repot :-)
17:20 pmichaud gtodd: they are not.
17:20 pmichaud gtodd: star releases are built from parrot and rakudo *tarballs*
17:20 pmichaud not from the repos.
17:20 pmichaud i.e., star releases are created directly from rakudo and parrot *releases*
17:20 isBEKaml gtodd: star releases are always after compiler releases. so releasing star is just about pulling in recently released tarballs of rakudo, parrot + some more p6 modules.
17:21 gtodd good :-)
17:21 gtodd gtodd: I don't want my rakudo/parrot pains to go to waste
17:21 pmichaud so far p6 modules tend to come from git repos, yes, because many of the modules don't have a published release cycle
17:21 gtodd right
17:23 gtodd but star != "core modules"   for some eventual  completed perl6 release
17:34 pmichaud ..."completed perl6 release" ?
17:34 tadzik we have like 60 of those ;)
17:34 tadzik also, there are like 3 "core"
17:35 tadzik <insert moritz's post>
17:35 japhb_ joined #perl6
17:36 masak moritz' blog is down, too? :(
17:36 isBEKaml pmichaud: I see three new issues filed last month for star. Were they fixed since?
17:37 pmichaud masak: all of perlgeek.de, iiuc
17:37 pmichaud isBEKaml: I don't know if they were fixed or not.  I suspect "not".
17:37 isBEKaml tadzik: R* issue #19's in your ground. :-)
17:38 tadzik uh-oh :)
17:39 tadzik aw
17:39 tadzik hm
17:39 tadzik tests pass according to http://feather.perl6.nl/~sergot/modules/
17:40 tadzik I'll verify locally and resolve this
17:49 JamesTaylor left #perl6
17:51 isBEKaml okay, great
17:52 tadzik thanks for reminding me
17:52 JamesTaylor joined #perl6
17:53 isBEKaml np :) Now that leaves #18 and #20.
17:55 JamesTaylor left #perl6
17:59 gtodd pmichaud: I don't know .... perl-6.0.0
18:01 pmichaud gtodd: "Perl 6.0.0" refers to a specification, not an implementation or release.
18:01 tadzik like C99 or C++11
18:01 tadzik when you think of C99, the joke of "not yet implemented after over 10 years" gets a new meaning :)
18:02 gtodd oops meant rakudo :)
18:02 gtodd I thought I understood that rakudo star was rakudo and what perl5 would consider core modules
18:03 pmichaud "rakudo star", yes.
18:03 pmichaud "rakudo compiler" is something else.
18:03 pmichaud there can be more than one end-user-level distribution.
18:03 pmichaud there's not one that is considered to be the official Perl 6 release.
18:03 pmichaud just like there's not an "official Linux distribution"
18:04 isBEKaml tadzik: I think part of the reason perl6 got the reputation it did was due to expectations of a single official implementation like perl5. No amount of words on our part convinces the hivemind. :)
18:04 pmichaud yeah, the perl5 hivemind seems to be strongly bound to the notion of "one official compiler and distribution"
18:04 isBEKaml tadzik: in fact, when I first stepped in here, I confused parrot with perl6.
18:05 pmichaud there's also a binding to "one CPAN", too :)
18:05 isBEKaml yeah, that too. "Will it replace CPAN? NooOOOOO!" :)
18:06 gtodd so for some rakudo-star release (1.0) it will conform testably to perl 6 spec and include rakudo compiler and a set of finalized tested released modules (aka the * star part) but that for now those modules are just pulled in from github or whereever
18:06 pmichaud in the main, yes.
18:06 PacoAir joined #perl6
18:07 pmichaud although it might be called something other than "star" at that point.  "Star" was intended to be the first of a series of distributions, each with potentially different targets.
18:08 masak it's hard to top "star" ;)
18:08 TimToady .oO(Query, Star, Plus, DotDot...)
18:10 isBEKaml So That's A Release.
18:10 gtodd :-D
18:11 masak isBEKaml++
18:11 TimToady we could start down the Actually Apposite, Becomingly Beautiful, Charmingly Chipper route...
18:12 gtodd or pick a movie
18:12 gtodd and use characters
18:12 TimToady nobody wants the Jar Jar release...
18:12 * masak .oO( this was actually the apposite of what I expected... ) :P
18:13 gtodd heh
18:13 geekosaur http://en.wikipedia.org/wi​ki/Stellar_classification
18:13 TimToady Oh, Be A Fine Girl Kiss Me etc.?
18:13 gtodd well the movie would need lots of characters ... it could not be Hiroshima mon amour ...
18:13 Guest66708 Is there enough scope in the periodic table?
18:13 TimToady periodically
18:14 TimToady Periodic acid, my favorite chemical...
18:14 geekosaur plus extensions
18:15 gtodd what about unicode character names ...
18:15 * masak .oO( Rakudo co-Star )
18:15 masak it's a dual release!
18:15 TimToady Acetylene, Butane, Caffeine, Dextromethorphan ... *
18:16 gtodd hah
18:17 Guest66708 Methane, Ethane, Propane....?
18:17 gtodd apparently this is how some towns were named in western Canada ... so rail conductors could have something alphabetical
18:18 estrabd_ joined #perl6
18:18 TimToady Guest66708: too ane-al
18:18 Yappo________ joined #perl6
18:18 gtodd assuming those molecules were chosen to sort alphabetically
18:19 TimToady organic chemistry has to be good for something...
18:19 mathw_ joined #perl6
18:19 nwc10_ joined #perl6
18:19 isBEKaml Guest66708: all of them would burst in flames at the slightest provocation.
18:19 s0rear joined #perl6
18:19 TimToady Caffeine?
18:20 TimToady .oO(maybe this explains spontaneous combustion...)
18:20 salv01 joined #perl6
18:20 isBEKaml and refuelling in rapid succession.
18:21 sqirrel joined #perl6
18:24 TimToady Aspirin, Botox, Cloriform, Digitalis...
18:26 TimToady Addled, Befuddled, Confused, Drunk...
18:26 SmokeMachine joined #perl6
18:29 colomon isBEKaml++
18:29 isBEKaml colomon: what did I do? :)
18:33 geekosaur aspergillus, botrytis, cladosporium, dendryphiella, ...
18:33 colomon isBEKaml: on rereading, apparently you just managed to confuse me in the backlog.  ;)
18:34 * colomon 's latest build for $work has 4485 test failures.  That's a new record level of bad for colomon's code.
18:34 isBEKaml colomon: okay, that's a new one for me. :)
18:35 diakopter well, it's better than zero failures and zero successes, sort of
18:35 colomon diakopter: I had 2020 successes, should I ship it?
18:35 diakopter does it work? ;)
18:35 colomon diakopter: 4485 failures suggests NO.
18:36 diakopter I dunno. sometimes tests cover completely useless things or are wrong
18:36 colomon as does actually trying it.
18:37 isBEKaml if those tests are autogenerated, I'd say some not-so-insignificant portion of those tests are useless. :)
18:37 colomon isBEKaml: alas, those tests are laboriously generated by hand.  In C++.  :(
18:38 isBEKaml colomon: ah, sucks. :( But hey, it's so great that you were able to generate 6k+ tests by hand!
18:39 colomon isBEKaml: it's taken me ten years...
18:39 colomon oh, found my bug!  \o/
18:40 colomon passed i, j as the degrees of my B-Spline curve, when actually those were loop indices (as one would expect).
18:41 isBEKaml colomon: 10 years to build a trade, 10 years to gain expertise and so it goes... ossum!
18:42 colomon I thought it was 7 years?
18:42 * isBEKaml mumbles something about norvig...
18:43 colomon I've been doing "this" for 19 years now.  First started working on these libraries 14 years ago.  Just took me a few years to start adding tests...  :)
18:45 colomon ah, crap.  with the stupid bug fixed, my test suite now gets a segmentation fault.  :\
18:48 FROGGS joined #perl6
18:49 tgt joined #perl6
18:50 isBEKaml colomon: wow, that's a long time. C++ is scary land for me. :)
18:51 colomon isBEKaml: let's say it should be obvious why I don't hang out in C++ land in my spare time....
18:52 tgt joined #perl6
18:53 isBEKaml colomon: yeah, right.
18:57 woolfy joined #perl6
18:57 TimToady Arsenic, Botulin, Curare, Digitalis...
19:00 colomon hurmph.  two ecosystem modules failing now that were not failing a week ago.
19:00 isBEKaml 3 cycles of poison/darkness followed by flowery dawn? :)
19:00 * FROGGS .oO( Adenine, Aadodine, Lidestolinine, Asporanine )
19:02 TimToady if Digitalis is not your poison of choice, pick your own poison...
19:04 bluescreen10 joined #perl6
19:14 isBEKaml Arquebus, Blunderbuss, Carronade, Drill Purpose, Elephant, Falconet... choose your gun carefully.
19:17 xinming joined #perl6
19:21 [Coke] gtodd: I'm stuck in backscroll, but the 9 pull requests were not true blockers. It's ok to cut a release with pending pull requests.
19:23 [Coke] ... and I'm back.
19:25 ggoebel joined #perl6
19:36 TimToady LA Times: "Would an antimatter apple fall upward from the earth?"
19:36 ggoebel joined #perl6
19:36 TimToady No, actually, it would be blown off, along with about a third of the earth...
19:37 * masak .oO( I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. )
19:38 [Coke] masak: I can. they they that anti-gravity is also involved.
19:38 [Coke] *think
19:38 masak because anti-gravity is totally a thing.
19:39 TimToady you find antigravity repellant?
19:40 [Coke] it's the sort of thing the media lepton.
19:42 masak *groan*
19:42 * TimToady flips the boson bit
19:48 lizmat and all was silent
19:48 crab2313 joined #perl6
19:51 * geekosaur higgses nervously
19:52 PerlJam #perl6 never fails to make me smile at least once a day  :-)
19:52 TimToady well, maybe it would only blow LA away
19:52 * TimToady isn't particuler...
19:53 TimToady but in this case, LA would be a good city to be from
19:53 lizmat S06:344 "(To construct pseudo-named arguments that come in via C<@_> as in Perl 5, the p5-to-p6 translator will define and use the ugly C<< p5=> >> operator instead of Perl 6's C<< => >> Pair constructor.)"
19:53 sorear to be fair there is serious research being done on this...
19:54 * TimToady researches being from LA all the time
19:54 sorear general relativity predicts that matter and antimatter are affected identically by gravitational fields, but this has never been tested...
19:54 lizmat TimToady: is that still something that may happen?
19:54 lizmat fwiw, p5=> seems to be NYI at the moment
19:54 masak I thought p5=> was gone long ago.
19:54 TimToady it was originally specced, but we realized the translator could just write it on the fly
19:55 jnthn lizmat: It says that the translator will define it.
19:55 geekosaur me too
19:55 cognominal__ joined #perl6
19:55 lizmat ack, so the wording in S06:344 is still correct and not outdated
19:56 pmichaud back again
19:56 TimToady except insofar as it assumes there is a translator :)
19:56 pmichaud actually, gone again.
19:56 jnthn No no, it says there *will* be one ;)
19:56 pmichaud brb
19:56 arnsholt_ joined #perl6
19:57 lizmat so the wording is correct
19:57 lizmat who's to tell what will ever be?
19:57 masak until there is one, it's correct :P
19:57 TimToady you never know until someone actually tries to drop the apple
19:58 odoacre joined #perl6
19:59 pmichaud joined #perl6
19:59 sorear antimatter apples are very hard to come by.  if you can do it with a single antihydrogen atom, that would work much better
20:01 TimToady all you have to do is figure out whether it hits the floor or the ceiling, assuming you can start it without velocity
20:01 Util I *have* a translator! It just isn't very *complete* yet :)
20:02 TimToady but it says "The translator", so there must be only one.
20:02 lizmat util: does it do p5=> or will it?
20:02 Util and my tuit crop is growing.
20:02 labster that LA Times article was too strange fermi.
20:02 Util labster: looking...
20:03 geekosaur The envisioned translator...
20:05 Util labster: I see my notes from last year (in my not-yet-committed code slush; Util--) to implement a "$need_p5_arrow" flag, which will cause the "p5=>" sub to be included in the output.
20:06 Util So, I know that I do plan to do that, and that I had an idea of how when I wrote the note :)
20:06 Util It does not do it yet.
20:07 Util https://github.com/Util/Blue_Tiger
20:08 labster Util: la\t hits me, not lizmat now, sorry.
20:08 roll joined #perl6
20:08 Targen joined #perl6
20:09 Util Doh! I misread the feed. Sorry!
20:10 Util lizmat: ^^^ All the above was for you.
20:10 lizmat Util: thank you
20:11 dalek nqp/rak-jvm-support: 6d8b63d | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
20:11 dalek nqp/rak-jvm-support: Use constants for argless instructions.
20:11 dalek nqp/rak-jvm-support:
20:11 dalek nqp/rak-jvm-support: Should cut down a bit on memory usage and be a little faster.
20:11 dalek nqp/rak-jvm-support: review: https://github.com/perl6/nqp/commit/6d8b63d108
20:11 lizmat fwiw, I'm just trying to grok all Synopses before embarking on actually writing stuff
20:12 Util lizmat: Admirable! Also helpful: http://rosettacode.org/wiki/Category:Perl_6
20:13 lizmat Util: am aware of that  :-)
20:14 grondilu Do boolean operator keep their laziness when used with the reduce metaoperator?  Like when I write:  [&&] @aVeryLongArrayOfBooleans  ?
20:15 TimToady only in the sense that the list is lazy
20:15 flussence r: say [&&] False, False, False ... *
20:15 TimToady however, the bits of the list have to be evaluated to see what produces the list
20:15 camelia rakudo 3252c3: OUTPUT«(timeout)»
20:15 flussence n: say [&&] False, False, False ... *
20:15 TimToady e.g. there's no thunking there
20:15 camelia niecza v24-37-gf9c8fc2: OUTPUT«[31m===[0mSORRY![​31m===[0m��This macro cannot be used as a function at /tmp/4qCL411wH_ line 1 (EOF):�------> [32msay [&&] False, False, False ... *[33m�[31m<EOL>[0m��Unhandled exception: Check failed��  at /home/p6eval/niecza/boot/lib/CORE.setting …
20:15 grondilu But if it has like 1000 terms?  Will it evaluate all of them even if only one would suffice?
20:16 TimToady again, it depends on what you mean by "evaluate"
20:16 TimToady [&&] foo()   # has to call foo, but foo might return a lazy list
20:17 TimToady and it should short circuit your False list above
20:17 grondilu I'm planning on running something like [&&] map &expensiveFunction, @longarray
20:18 grondilu I guss that's a bad idea.
20:18 xinming joined #perl6
20:18 TimToady n: say [?&] False xx *;
20:19 camelia niecza v24-37-gf9c8fc2: OUTPUT«(timeout)»
20:19 TimToady r: say [?&] False xx *;
20:19 camelia rakudo 3252c3: OUTPUT«(timeout)»
20:19 TimToady r: say [&&] False xx *;
20:19 camelia rakudo 3252c3: OUTPUT«(timeout)»
20:20 TimToady that last one ought work
20:20 TimToady r: say [||] True xx *;
20:20 camelia rakudo 3252c3: OUTPUT«(timeout)»
20:20 TimToady so should that
20:21 grondilu ok, so it's NYI?
20:21 TimToady NYIC anyway
20:22 pmichaud not sure how to get [||] to know that it's to short circuit... unless we define &infix:<[||]> directly.
20:22 grondilu would that be acceptable?
20:22 lizmat rn: module C { sub a is export { say "a" } }; import C "a"; a
20:22 camelia niecza v24-37-gf9c8fc2: OUTPUT«[31m===[0mSORRY![3​1m===[0m��Action method statement_control:import not yet implemented at /tmp/OaLaKqNWl9 line 1:�------> [32m a is export { say "a" } }; import C "a"[33m�[31m; a[0m��Unhandled exception: Unable to resolve method statement_level in …
20:22 camelia ..rakudo 3252c3: OUTPUT«===SORRY!===␤Error while importing from 'C': no EXPORT sub, but you provided positional argument in the 'use' statement␤»
20:23 pmichaud er, prefix:<[||]>
20:23 * lizmat assumes import NYI
20:24 pmichaud rn: module C { sub a is export { say "a" } };  import C; a
20:24 camelia niecza v24-37-gf9c8fc2: OUTPUT«[31m===[0mSORRY![3​1m===[0m��Action method statement_control:import not yet implemented at /tmp/Eb3bzRnjD1 line 1:�------> [32msub a is export { say "a" } };  import C[33m�[31m; a[0m��Unhandled exception: Unable to resolve method statement_level in …
20:24 camelia ..rakudo 3252c3: OUTPUT«a␤»
20:24 FROGGS lizmat: positionals there NYI
20:24 pmichaud look like just that part of 'import' is NYI
20:24 lizmat ack, thanks
20:25 Targen joined #perl6
20:25 jnthn Util: Think I may have found the NQP build issue.
20:27 Util jnthn: Great! I failed to reproduce it on Linux.
20:28 jnthn Util: I'm a little surprised it worked anywhere...
20:28 jnthn Util: If it's what I think it is, anyway...
20:28 TimToady http://rosettacode.org/wiki/9_billi​on_names_of_God_the_integer#Perl_6 is definitely a stress test of large integers
20:29 jnthn TimToady: How does Rakudo do on it?
20:29 TimToady not as well
20:29 TimToady mostly chews up memory faster
20:29 jnthn Hm...
20:30 jnthn Wonder if that's due to big integer library stuff, or other stuff
20:31 TimToady dunno, mono's problems seemed to have nothing to do with slinging arrays of Int around, more like just the storage for the Ints themselves, which are many, and large.
20:32 dalek nqp: cde4d6d | jnthn++ | src/vm/parrot/6model/serialization.c:
20:32 dalek nqp: Fix a version check thinko.
20:32 dalek nqp: review: https://github.com/perl6/nqp/commit/cde4d6d574
20:32 jnthn Util: Hopefully ^ helps
20:32 * TimToady is trying to see if checkpointing and restoring the Int data makes it get any further, but saving/restoring a gigabyte of Int data takes a while...
20:36 mavcunha joined #perl6
20:36 TimToady nothing else I tried helped the GC problem; replacing shift with pop or with explicitly copy-down, using => lists instead of arrays, etc.  Always blows up at about N=10200 or so
20:36 TimToady nap &
20:42 Util jnthn: Trying it...
20:42 donaldh_ joined #perl6
20:43 pmichaud nqp build failed for me.. realcleaning and trying again
20:43 pmichaud can someone remind me what 'iffy', 'diffy', 'pure', etc. mean in STD.pm6 ?
20:44 pmichaud (and then I will add the meanings to STD.pm6 so I don't have to ask again :)
20:44 jnthn pmichaud: If you continue to have problems, try removing ModuleLoader.pbc the parrot/runtime/ install directory
20:44 jnthn pmichaud: iffy means it produces a boolean result or something that makes sense in a boolean context
20:44 jnthn pmichaud: diffy means it returns a different kind of thing that it takes
20:45 grondilu rn: my $n = 3; say "foo" ~~ / . ** $n /;  # trying to use a variable as a quantifier
20:45 jnthn They idea is to catch mis-uses of meta-ops
20:45 camelia niecza v24-37-gf9c8fc2: OUTPUT«Potential difficulties:�  Unsupported use of atom ** $n as separator; nowadays please use atom+ % $n at /tmp/sc4h8mm_X4 line 1:�------> [32mmy $n = 3; say "foo" ~~ / . ** $n[33m�[31m /;  # trying to use a variable as a qua[0m��「​f」��»
20:45 camelia ..rakudo 3252c3: OUTPUT«[31m===[0mSORRY![​31m===[0m�Quantifier quantifies nothing�at /tmp/MDqPEObKRl:1�------> [32mmy $n = 3; say "foo" ~~ / . ** [33m�[31m$n /;  # trying to use a variable as a q[0m�    expecting any of:�        postfix�        infix stopper�        infix or meta-i…
20:45 grondilu rn: my $n = 3; say "foo" ~~ / . ** {$n} /;  # trying to use a variable as a quantifier
20:45 camelia niecza v24-37-gf9c8fc2: OUTPUT«「foo」␤␤»
20:45 camelia ..rakudo 3252c3: OUTPUT«[31m===[0mSORRY![​31m===[0m�Quantifier quantifies nothing�at /tmp/4WFKba9dpx:1�------> [32mmy $n = 3; say "foo" ~~ / . ** [33m�[31m{$n} /;  # trying to use a variable as a[0m�    expecting any of:�        postfix�        infix stopper�        infix or meta-i…
20:45 dalek ecosystem: c8c85fe | (Timothy Totten)++ | META.list:
20:45 dalek ecosystem: Added DateTime::Format and DateTime::Math
20:45 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/c8c85fe917
20:45 pmichaud grondilu: ** {$n} is correct, and NYI in rakudo iirc.
20:47 timotimo can't seem to figure out how exactly to build jvm nqp (and then try rakudo jvm)
20:47 timotimo i've checked out jvm-rak-support and jvm-support
20:48 * lizmat just notices that "perl6 -e '1 while 1' claims to use 2 threads on OS X, with CPU more or less evenly divided between 2 cores
20:48 tadzik on jvm?
20:48 lizmat nope, parrot
20:48 timotimo there seems to be no makefile target for jvm
20:48 jnthn timotimo: There's nothing really interesting to try yet, but perl ConfigureJVM.pl --prefix=..\install-jvm && make install in NQP directory, then perl ConfigureJVM.pl && make in Rakudo
20:49 pmichaud I wonder if reduction can use the iffy flag to determine short-circuiting behavior.
20:49 diakopter lizmat: weird..
20:50 jnthn pmichaud: Doesn't immediately sound iffy...
20:50 jnthn ;)
20:50 pmichaud oh, I could create slurpy forms of &infix:<||> and &infix:<&&>
20:51 pmichaud jnthn: build failed again... trying 'git clean -xdf' this time.
20:52 tadzik lizmat: bad probing by htop?
20:52 tadzik or something
20:53 lizmat not sure… the same with perl5 shows only 1 thread in use
20:53 jnthn pmichaud: Where did it fail?
20:53 pmichaud jnthn: let me report after this build
20:53 jnthn Right at the end building P5Regex?
20:53 pmichaud (the failed build has scrolled out of my buffer)
20:54 jnthn pmichaud: OK, did you try the ModuleLoader.pbc thing?
20:54 timotimo ah, like that :)
20:54 pmichaud I just went with the clean -xdf
20:54 timotimo jnthn: anything i could try to improve to help you out a bit?
20:55 jnthn timotimo: We're probably missing some of the bigint ops still (not many, mind) on JVM, and also the nqp::mkdir and friends are NYI on JVM
20:56 pmichaud jnthn: build succeeded this time.
20:57 jnthn pmichaud: ah, ok
21:02 Util jnthn: Build succeeded here, too. Thanks!
21:02 jnthn phew :)
21:04 [particle] joined #perl6
21:04 fhelmberger joined #perl6
21:09 donaldh_ jnthn: How are the nqp ops bound in jvm?
21:10 timotimo running on src/gen/CORE.setting seems to foreverloop or something?
21:10 jnthn timotimo: Did you ConfigureJVM.pl ?
21:10 jnthn donaldh_: 'cus the JVM build doesn't try to do CORE.setting yet...
21:10 timotimo oh, not on rakudo
21:11 * PerlJam is building the nqp-jvm for the first time.
21:11 jnthn donaldh_: The mappings are made in src/vm/jvm/QAST/Compiler.nqp
21:11 jnthn donaldh_: Are you working on anything particular at the moment?
21:11 donaldh_ just figuring out how to add ops.
21:11 donaldh_ Was going to add some missing ops.
21:12 jnthn OK, nice :)
21:13 djanatyn masak: hey! I'm interested in the perl6 workshop tomorrow but wasn't sure what time 16:00Z was.
21:13 djanatyn when does it start, in EST?
21:14 masak djanatyn: http://everytimezone.com/#2013-5-1,240,6bj
21:14 PerlJam djanatyn: do you mean EDT?
21:14 PerlJam (or the EST that is not in the continental united states?)
21:14 masak djanatyn: looks like 12:00 pm.
21:14 djanatyn hmm!
21:15 Util Hmmm. I am a member of the organization (https://github.com/perl6?tab=members), but I cannot commit to NQP (https://github.com/perl6/nqp).
21:15 djanatyn I may not be able to attend :\
21:15 supernovus joined #perl6
21:15 masak djanatyn: ok. too bad. :/
21:16 jnthn Util: What's your github id?
21:16 Util jnthn: "Util"
21:16 [Coke] timezone rant. say "eastern" instead, then you don't have to worry about DST.
21:16 [Coke] Util: that shows a clear lack of imagination!
21:16 jnthn Util: Try again
21:16 [Coke] at least my freenode nick has some gratuituous punctuation.
21:16 djanatyn ...actually. this seems interesting enough and relevant enough to my life that I might consider skipping school for this
21:17 djanatyn I'm already using perl at my job all the time. what kind of stuff are you going to cover?
21:17 djanatyn and are you going to cover perl6 specific stuff?
21:17 djanatyn I see the stuff you listed, but what specifically?
21:17 PerlJam djanatyn: it's a surprise!  :)
21:20 lizmat S06:830 says: "    doit :$when,1,2,3;  # always a named arg of :when<now>"
21:21 lizmat shouldn't that be: "    doit :$when,1,2,3;  # always a named arg ( when => $when )" or something like that
21:22 dalek nqp: 16fa719 | util++ | src/vm/parrot/ops/nqp_bigint.ops:
21:22 dalek nqp: Fix bigint_is_prime via intermediate int result (RT #117731)
21:22 dalek nqp: review: https://github.com/perl6/nqp/commit/16fa719eca
21:22 lizmat argh, should have read the spec better, please ignore
21:22 Util Coke: Heh
21:22 Util jnthn: Worked. Thanks!
21:23 FROGGS lizmat: :o)
21:24 FROGGS jnthn: so I made a Perl5::Setting (.pm), and compiled like ./perl6 --setting=CORE ..., is that so far what you meant?
21:25 FROGGS jnthn: it compiles, and its mainline gets executed when I load it via load_module from my EXPORT sub of Perl5.pm
21:26 jnthn FROGGS: Well, --setting=CORE is the default ;)
21:26 FROGGS I'm not sure how to export/import the newly declared subs though
21:26 FROGGS okay, I take it as a "yes" :o)
21:27 jnthn FROGGS: Oh, there's a load_setting
21:27 FROGGS ohh, yeah, must have missed that
21:28 FROGGS jnthn: so I can just create a plain Perl 6 script, add a sub and a you_are_here, and use that as a setting?
21:29 jnthn FROGGS: Yeah. That's all that the restricted does for example
21:29 jnthn FROGGS: Oh but...hmmm
21:29 FROGGS O.o
21:30 jnthn Trouble is that if you make it the setting...
21:31 jnthn ...then you can't see lexicals in the otuer scope of the v5 block.
21:31 jnthn Hmm, how on earth do we get this right.
21:31 FROGGS hmmm, bad
21:31 jnthn TimToady: Thoughts? ;)
21:32 FROGGS I'd be fine for the moment if I just could add subs for example
21:32 timotimo i'm having trouble installing nqp for jvm properly :|
21:32 jnthn FROGGS: Well, if you just write a normal module and load_module that, then they'll hid any Perl 6 setting ones.
21:32 jnthn FROGGS: Just thanks to lexical scoping.
21:32 jnthn *hide
21:33 timotimo oh, it goes *there*
21:33 jnthn .oO( trouble solved :) )
21:34 FROGGS jnthn: so I should create a Cool.pm, Str.pm, ... ? did you say that?
21:35 donaldh_ jnthn: looks like the missing bigint ops are isprime_I, rand_I, gcd_I and lcm_I
21:35 donaldh_ jnthn: does that sound about right?
21:35 timotimo you probably already know this problem by heart: src/vm/jvm/runtime/org/perl6/rakudo/Ops.java:3: error: package org.perl6.nqp.runtime does not exist
21:36 jnthn donaldh_: Yeah, that's about the obscurity and number of them I expected :)
21:36 donaldh_ :-)
21:36 jnthn timotimo: Well, it sounds like a classpath fail
21:37 jnthn timotimo: Where did you put your install?
21:37 timotimo do i have to do classpath trickery?
21:37 timotimo i just ran make install and hoped for the best
21:37 jnthn timotimo: No, the makefile shoudl get it right
21:37 jnthn timotimo: OK, did you configure with a prefix?
21:37 timotimo no
21:38 Typhoon22 joined #perl6
21:39 Typhoon22 hi all
21:39 masak hi Typhoon22
21:40 Typhoon22 I'm hoping someone can help me. I'm looking to generate a very large random integer, but it keeps doing the old xE23 thing to me. Is there a way of stopping it doing that?
21:41 pmichaud how large?
21:41 diakopter upgrade to Perl 6 ?
21:42 pmichaud r:  say (0..9).roll(100);   # a 100-digit random integer
21:42 camelia rakudo 3252c3: OUTPUT«9 9 5 9 7 8 0 1 1 5 1 4 0 6 3 3 7 7 7 3 8 7 3 4 7 0 2 4 2 1 9 0 8 5 5 0 7 9 6 2 1 6 7 5 5 9 8 9 5 1 8 7 7 4 3 1 5 9 9 9 2 3 3 4 4 7 5 0 4 0 4 1 6 7 0 9 6 4 3 9 7 8 7 6 2 0 0 4 5 8 8 7 2 3 1 8 0 5 0 5␤»
21:42 pmichaud r:  print (0..9).roll(100);   # a 100-digit random integer
21:42 camelia rakudo 3252c3: OUTPUT«28748748750213288615056579574​7482151478253181177608448000052891020​6017208658418297682123019994178528»
21:42 timotimo but that's a string, isn't it? :)
21:42 pmichaud r:  print +~((0..9).roll(100));   # a 100-digit random integer
21:42 camelia rakudo 3252c3: OUTPUT«Cannot convert string to number: trailing characters after number in '5⏏ 1 4 9 3 8 4 5 7 5 8 3 4 9 4 4 6 2 0 6 8 3 4 2 5 2 2 2 1 8 0 7 9 9 5 6 6 2 8 1 3 6 1 4 4 1 8 7 8 2 8 7 0 0 7 6 3 4 0 4 8 9 1 1 1 8 0 5 7 5 1 7 1 5 2 9 2 5 2 4 2 5 7 9 8 1 8 9 0 2 2 8 5 9 6 8 7 …
21:43 timotimo whoops :)
21:43 timotimo there's spaces
21:43 pmichaud oh, yes, it stringified the list
21:43 timotimo r:  print +(((0..9).roll(100)).join(""));
21:43 jnthn r:  print +((0..9).roll(100).join)
21:43 camelia rakudo 3252c3: OUTPUT«15819342632002598643790927528​7547666920770421083399012046617018082​0935906087771344886225698200819599»
21:43 camelia rakudo 3252c3: OUTPUT«45928563145802558101526623711​1737126800075036990225454393519566362​6171831007026289757157179124029519»
21:43 timotimo :)
21:43 jnthn r:  print +((0..9).roll(1000).join)
21:43 camelia rakudo 3252c3: OUTPUT«54293811301826918760884907154040100356​6246972583510874409852679220613994793709518944​9091677241232419378142486944906237912440110087​2170007413166267797635539510136033500454112792​3585212484301262547681040283782837041130662434​4561937223717098640340821851357039878250307…
21:43 pmichaud that's not a string :-)
21:43 jnthn r:  print +((0..9).roll(1000).join).is-prime
21:43 camelia rakudo 3252c3: OUTPUT«No such method 'is-prime' for invocant of type 'Str'␤  in block  at /tmp/lH2VAUO1Tl:1␤␤»
21:43 jnthn um.
21:44 pmichaud method precedence
21:44 timotimo more braces
21:44 jnthn oh
21:44 jnthn duh :)
21:44 timotimo jnthn: so i will need to set the prefix manually for nqp in configurejvm.pl?
21:44 pmichaud r: print (+(0..9).roll(1000).join).WHAT
21:44 camelia rakudo 3252c3: OUTPUT«use of uninitialized value of type Int in string context  in block  at /tmp/sDIi9k5SpJ:1␤␤»
21:44 PerlJam That's one of those things that tends to continually trip me up with Perl 6.
21:44 pmichaud r: print (+(0..9).roll(1000).join).is-prime
21:44 camelia rakudo 3252c3: OUTPUT«False»
21:44 pmichaud darn.
21:45 pmichaud should I keep trying until I find one?
21:45 Typhoon22 thanks guys. Also picked up that i didn't need to make my own "dice roller" there :)
21:45 jnthn pmichaud: No, hack on lists ;)
21:45 pmichaud r: print (+(0..9).roll(1000).join).is-prime
21:45 camelia rakudo 3252c3: OUTPUT«False»
21:45 pmichaud r: print (+(0..9).roll(1000).join).is-prime
21:45 camelia rakudo 3252c3: OUTPUT«False»
21:45 pmichaud r: print (+(0..9).roll(1000).join).is-prime
21:45 camelia rakudo 3252c3: OUTPUT«False»
21:45 pmichaud *sigh*
21:45 pmichaud funny thing is, when it says "True" I'll have no idea what the number was :-P
21:45 lizmat r: print (+(0..9).roll(1000).join).is-prime
21:45 camelia rakudo 3252c3: OUTPUT«False»
21:46 lizmat too bad, I was feeling lucky
21:46 PerlJam r: print (+(0..9).roll(1000).join).is-prime   # this one will be prime
21:46 camelia rakudo 3252c3: OUTPUT«False»
21:46 FROGGS r: print (+(0..9).roll(1000).join).is-prime
21:46 pmichaud our new game:  "The Prime Lottery"
21:46 camelia rakudo 3252c3: OUTPUT«False»
21:46 FROGGS :/
21:46 pmichaud "Lottery of Primes"
21:46 pmichaud "Primal Lottery"
21:46 Typhoon22 I'm trying to prove that any sufficiently large integer has a 99+% probability (or 0.999999...) chance of have a 3 in it
21:47 pmichaud Typhoon22: you mean a digit '3' ?
21:47 kurahaupo joined #perl6
21:47 Typhoon22 yes
21:47 jnthn timotimo: The thing that I know works is if you make sure you give the ConfigureJVM.pl in NQP a --prefix=../install-jvm
21:47 FROGGS well, not in binary representation :o)
21:48 jnthn timotimo: Where that install-jvm directory is inside your Rakudo directory
21:48 pmichaud isn't that just a matter of taking  0.1 ** $n  with $n being large enough to get your epsilon as small as you like?
21:48 lizmat night #perl6
21:48 FROGGS gnight lizmat
21:48 jnthn 'night, lizmat
21:49 Typhoon22 pmichaud: I don't know...my maths isn't great
21:49 pmichaud easier is to ask "what's the probability of a large integer that doesn't have a 3 in it"
21:49 pmichaud for a 1 digit integer, the probability is .9
21:49 pmichaud for a 2 digit integer, the probability is .81  (.9 x .9)
21:49 pmichaud for a n digit integer, the probability is .9 ** $n
21:50 donaldh_ timotimo: jnthn: I just did ln -s ../nqp/install install-jvm
21:50 FROGGS and the opposite is .1 ** $n
21:50 pmichaud the opposite would be (1 - .9 ** $n)
21:50 donaldh_ timotimo: in rakudo obv.
21:50 Typhoon22 pmichaud: is that true though? if n is 100, then there are 18 numbers with a 3 in
21:51 pmichaud did you mean if $n == 2 ?
21:51 colomon r: say +(1..100).grep(/3/)
21:51 camelia rakudo 3252c3: OUTPUT«19␤»
21:51 pmichaud those are 2-digit integers
21:52 pmichaud so $n == 2
21:52 pmichaud so there are 81 integers without a 3
21:52 pmichaud meaning there are 19 with a 3
21:52 Typhoon22 pmichaud: oh sorry, i see what you mean
21:52 FROGGS r: say 1 - .9 ** 100
21:52 pmichaud i.e.,   ( 1 - 0.9 ** 2) == .19
21:52 camelia rakudo 3252c3: OUTPUT«0.999973438601112␤»
21:52 Typhoon22 pmichaud: this is why I wanted to script it :)
21:52 colomon pmichaud: luckily rakudo agrees with you there.  ;)
21:52 FROGGS >99% already
21:53 pmichaud so, for a 100-digit integer, the probability is (1 - .9 ** 100) that there will be at least one 3 in it
21:53 pmichaud == 99.997343 %
21:54 Typhoon22 cool :)
21:54 pmichaud increase $n until you get the probability you want :-)
21:54 Typhoon22 thats pretty sweet guys, thanks very much
21:55 Typhoon22 saved me a headache or 6
21:55 * FROGGS .oO( or 3? )
21:55 pmichaud FROGGS: probably.
21:56 Typhoon22 not sure, what is the P value of me having, or not having a headache after trying to define the P of an integer with a 3 in it?
21:56 Typhoon22 :)
21:56 pmichaud in my experience, there's no value to having a headache.  :-P
21:56 Typhoon22 but there is great value in having a P? ;)
21:56 PerlJam Typhoon22: only if your bladder is full
21:57 Typhoon22 haha!
21:58 tadzik :D
22:00 Typhoon22 thanks for your time and help guys, I must be off. its appreciated
22:00 timotimo jnthn: install-jvm works very well
22:02 masak 'night, #perl6
22:03 jnthn 'night, masak
22:03 timotimo jnthn: there's no rakudo tests to be run as of yet, right?
22:04 jnthn timotimo: No, it doesn't actually build a CORE.setting yet.
22:04 timotimo right
22:04 jnthn timotimo: Getting it to build the whole thing will be a heck of a job, but we'll take it a bit at a time :)
22:04 timotimo i'll have to create a JAST for things like mkdir?
22:05 timotimo oh, actually individual bytecodes?
22:06 jnthn timotimo: No
22:06 xinming joined #perl6
22:06 jnthn timotimo: You write a method in the Ops.java somewhere under src/vm/jvm/runtime/ in the NQP repo
22:06 timotimo ah, there!
22:06 timotimo i looked at Ops.nqp and wondered :)
22:06 jnthn timotimo: Then you write it up in src/vm/jvm/QAST/Compiler.nqp
22:06 timotimo but that makes more sense.
22:07 jnthn Try and add things in the same order as Operations.nqp for Parrot has them.
22:07 jnthn (They already are roughly like that)
22:08 timotimo will try
22:13 donaldh_ timotimo: I'm working on the missing bigint ops just now
22:15 timotimo cool. i'd like to try chmod/mkdir/...
22:17 timotimo how do i figure out what to return from the operations?
22:17 jnthn nqp: say(nqp::mkdir('foo'))
22:17 camelia nqp: OUTPUT«Error while compiling block : Error while compiling op call (source text: "nqp::mkdir('foo')"): Error while compiling op mkdir (source text: "nqp::mkdir('foo')"): The 'mkdir' op expects two operands␤current instr.: '' pc 48819 (src/stage2/QAST.pir:17874) (src/stage2/QAST.nqp…
22:17 jnthn two?!
22:17 pmichaud mode
22:17 jnthn oh
22:17 jnthn nqp: say(nqp::mkdir('foo', 42))
22:17 camelia nqp: OUTPUT«get_string() not implemented in class 'OS'␤current instr.: '' pc 768 (src/stage2/gen/NQPCORE.setting.pir:355) (src/stage2/NQPCORE.setting:665)␤»
22:18 pmichaud looks like nqp::mkdir is returning the OS PMC
22:18 jnthn yeah
22:18 pmichaud probably not what is wanted.
22:18 jnthn Any opinions on what it should do?
22:18 jnthn It throws an exception on failure.
22:18 timotimo er, chmod won't even be covered by java, will it? because it's not portable
22:19 pmichaud I'm not sure every operation we can think of belongs in the nqp:: space, fwiw.
22:19 timotimo er, did i make that mkdir operation?
22:19 pmichaud at some point we have to delegate to some object that provides vm-specific wrappers.
22:19 timotimo yes. yes, i did.
22:19 timotimo m(
22:20 pmichaud well, maybe not "have to", but "may want to"
22:21 jnthn I'm not sure they have sensible return values, tbh.
22:22 jnthn Can always hand back some true value (1 or so) for now
22:22 xilo joined #perl6
22:22 pmichaud the chmod(2) call returns an int
22:22 pmichaud as does mkdir(2)
22:22 pmichaud they're just success or failure
22:23 pmichaud 0==success, -1==failure
22:24 pmichaud or, have the return value be undefined, such that if you nqp::say() it then you get what you deserve.
22:26 timotimo thank you :)
22:26 timotimo do i return that as an int or long?
22:27 jnthn timotimo: long
22:27 jnthn timotimo: $RT_INT actually means a long
22:28 timotimo where would i see a $RT_INT?
22:28 jnthn timotimo: Compiler.nqp, when you're setting up the nqp::mkdir mapping to the thing you're currently writing.
22:28 timotimo i'll have to implement chmod based on setReadable, setWritable, set Executable, and i don't see how to set the last tribit with these functions
22:29 jnthn tri harder!
22:29 jnthn :P
22:30 timotimo we have java7, right?
22:30 donaldh_ timotimo: yes, you can use Files.setPosixFilePemissions
22:31 timotimo awesome
22:31 donaldh_ timotimo: nqp is already using java.nio.file.Files
22:32 timotimo i just saw that
22:32 jnthn Yes, we use invokedynamic which is also a 7 thing
22:35 pmichaud I'm thinking of bumping NQP_REVISION to get the is-prime fix and also the ?-quantifier changes... any objections?
22:35 pmichaud Util++
22:37 FROGGS jnthn: just load_module (with/without do_import) doesnt change anything :/
22:38 FROGGS it still has a chop(Cool $s), even if I changed that in the Cool.pm I use
22:38 timotimo am i allowed to let exceptions fall through? i don't think so.
22:38 timotimo how about SecurityException? everything seems to throw that, but i'm not sure if nqpjvm will ever use that?
22:38 FROGGS any Ideas? otherwise I'll push to a branch tomorrow, so I can actually show something
22:41 timotimo why do i have to turn a number into Set<PosixFilePermission> manually? >_>
22:41 timotimo at least they have a predefined order that i am apparently allowed to (ab)used
22:44 donaldh_ any suggestions for a test for bigint op nqp::rand_I
22:45 diakopter distribution?
22:45 skids joined #perl6
22:45 FROGGS gnight kids
22:46 diakopter donaldh_: that was a joke. :D
22:46 diakopter donaldh_: besides, shouldn't it have a parameter of "don't use more than X GB of digits"?
22:48 donaldh_ :)
22:49 timotimo 001 would be an octal constant in java, right? as would be everything starting with 0?
22:53 dalek nqp: b48b5c3 | pmichaud++ | / (3 files):
22:53 dalek nqp: P6regex: Switch ?-quantifier to be an item quantifier instead of a list quantifier.
22:53 dalek nqp:
22:53 dalek nqp: In other words, using ? on a capturing expression no longer produces
22:53 dalek nqp: a list of captures; it's a single capture (or Nil/nonexistent).
22:53 dalek nqp: review: https://github.com/perl6/nqp/commit/b48b5c3f70
22:56 timotimo will nqp::rmdir delete non-empty directories?
22:57 pmichaud timotimo: I'd say "no"
22:58 timotimo great
22:58 flussence rn: (10**99..^10**100).pick # doing that stuff an hour back with string chopping is overcomplicating things a bit :)
22:58 camelia rakudo 3252c3, niecza v24-37-gf9c8fc2:  ( no output )
22:58 flussence rn: (10**99..^10**100).pick.say
22:59 camelia rakudo 3252c3: OUTPUT«675229515316915350992267130096​05453487421737433651100705007964322995​43392463137830008313642569861450␤»
22:59 camelia ..niecza v24-37-gf9c8fc2: OUTPUT«121864783814228988941638276810​19251681052920407208403854521955448765​73862678845162548699273043353198␤»
22:59 timotimo so, i've got mkdir, rmdir, chmod now. what's the best way to test if they work?
22:59 timotimo unfudge some tests perhaps?
23:00 flussence timotimo: you could take a look at what sort of edge cases coreutils tests for...
23:01 flussence (assuming it does)
23:01 timotimo hm, i've implemented them in Ops.java, but i bet i'll have to add them somewhere else, too.
23:01 timotimo ah, compiler.nqp of course
23:04 berekuk joined #perl6
23:05 roll joined #perl6
23:06 sarella joined #perl6
23:21 timotimo huh, there is no mkdir in nio?
23:24 donaldh_ I'm worried that testing nqp::rand_I will randomly fail :-(
23:26 donaldh_ timotimo, just use java.io.File
23:28 donaldh_ sleep
23:31 pecastro joined #perl6
23:32 grondilu my @a = <foo bar>; say "foo" ~~ / @a /;
23:32 grondilu rn: my @a = <foo bar>; say "foo" ~~ / @a /;
23:32 camelia rakudo 3252c3, niecza v24-37-gf9c8fc2: OUTPUT«「foo」␤␤»
23:34 grondilu Is this ^ optimized in any way?
23:35 grondilu .oO(I doubt it is)
23:37 timotimo java.lang.NoSuchMethodError: org.perl6.nqp.runtime.Ops.m​kdir(Ljava/lang/String;J)J  -  not sure what i did wrong (or where the L and J came from)
23:40 jnthn Those are rine
23:40 jnthn uh, fine
23:40 jnthn Does your Compiler.nqp entry have a :tc named arg?
23:40 jnthn That means "pass a final parameter which is the current ThreadContext object"
23:41 jnthn Oh, no, it doesn't
23:41 jnthn But maybe your method has a ThreadContext arg?
23:41 jnthn If so remove it (unless you need it)
23:41 jnthn Or if you're really confused now just paste me the line you added in Compiler.nqp and the signature of the thing you added in Ops :)
23:42 [particle] joined #perl6
23:42 timotimo i removed :tc, becaues i don't take a ThreadContext arg
23:42 timotimo QAST::OperationsJAST.map_classlib_core_op('mkdir', $TYPE_OPS, 'mkdir', [$RT_STR, $RT_INT], $RT_INT);
23:42 Targen joined #perl6
23:42 timotimo oh, i think i see what went wrong
23:42 timotimo i used int instead of long
23:43 timotimo wow, what did i do
23:44 timotimo wow, i botched the permissions something fierce
23:46 jnthn yeah, int instead of long would do it.
23:47 timotimo 0123 is syntax for an octal value in java, right?
23:47 jnthn Um, not sure :)
23:47 jnthn hm, http://en.wikibooks.org/wik​i/Java_Programming/Literals says so
23:48 timotimo i'm confused as to why my permissions are not being set correctly. i call nqp::mkdir("foo", 0b777); and it ends up being rwxrwxr-x
23:48 geekosaur that's consiustent with a umask of 002
23:49 timotimo and that's my umask!
23:49 timotimo thanks for the hint!
23:49 lue timotimo: I didn't know 777 was a binary number
23:49 timotimo lue: right. i meant to type 0o777
23:49 timotimo which is what i have in the code :)
23:49 lue OK, just checking :)
23:50 timotimo i actually did write 0b777 first, but it bailed out with "Confused" or something.
23:50 jnthn Time for some sleep...should have a few tuits tomorrow &
23:50 * geekosaur figured that had to be a typo since it would either be a compile error or something *really* messed up
23:52 timotimo okay, mkdir, rmdir and chmod seem to somewhat work.
23:52 timotimo i'll commit&push :)
23:53 timotimo i commit'd! :)
23:53 dalek nqp/rak-jvm-support: 13cd383 | (Timo Paulssen)++ | src/vm/jvm/ (2 files):
23:53 dalek nqp/rak-jvm-support: implement nqp::mkdir, rmdir and chmod.
23:53 dalek nqp/rak-jvm-support: review: https://github.com/perl6/nqp/commit/13cd3833d7

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

Perl 6 | Reference Documentation | Rakudo