Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-07-09

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:09 [Coke] are exceptions slower on the JVM?
00:24 TimToady slower than what?
00:31 aindilis joined #perl6
00:36 [Coke] than on parrot.
00:36 [Coke] but it was that I didn't have the eval server running.
00:41 cognominal I received beaglebone black and starting playing with it.  It has a 1GHz ARM Cortex-A8 CPU with 512MB of RAM and 2GB of eMMC flash memory. I have not yet figured out how to access and to format a microSD card.  I hope that someday Perl 6 will run on it.
00:42 cognominal http://beagleboard.org/Products/BeagleBone%20Black
00:44 cognominal the rj45 connector looks huge on such a small card.
00:46 jaldhar_ joined #perl6
01:03 btyler joined #perl6
01:11 bluescreen100 joined #perl6
01:19 moritz joined #perl6
01:33 eternaleye joined #perl6
01:40 eternaleye joined #perl6
01:43 [Coke] I have some fudges for rakudo.jvm/rakudo.parrot I'm goign to push. it's not a full fudge, but will give us a few dozen more passes.
01:44 [Coke] (by skipping the tests where we explode)
01:44 [Coke] also, was able to convert some rakudo skips tp rakudo.parrot skips!
01:45 xilo joined #perl6
01:46 btyler joined #perl6
01:56 FROGGS_ joined #perl6
02:00 eternaleye joined #perl6
02:14 [Coke] r: say 1948 / 60
02:14 camelia rakudo c52f24: OUTPUT«32.466667␤»
02:17 dalek roast: a3be3ac | coke++ | / (17 files):
02:17 dalek roast: Rakudo (jvm/parrot) un/fudge
02:17 dalek roast: review: https://github.com/perl6/roast/commit/a3be3acbe7
02:21 * diakopter tries to remember which irc channel I talked about that rental car trick
02:26 diakopter TimToady: ping
02:29 jaldhar_ joined #perl6
02:32 logie joined #perl6
02:33 SamuraiJack joined #perl6
03:04 sorear good * #perl6
03:18 diakopter sorear: hi
03:24 * sorear is waiting for a constructive proof that the constant factors inherent in NFG can *ever* be brought down to a competitive level
03:25 sorear but it's probably acceptable to do coercions on Str
03:58 preflex joined #perl6
04:21 prevost joined #perl6
04:24 benabik joined #perl6
04:47 TimToady diakopter: pong
04:47 sorear let's make wrappers contravariant to mess with people.
04:48 TimToady :D
04:59 birdwindupbird joined #perl6
05:01 sorear this Str problem is hard
05:02 sorear for the common cases involving short strings like names of all kinds, it's probably best to treat strings as a value type and map them to native P6 strings, however those evolve
05:02 sorear but I don't want to impose copying on people who ask java for a 100MB string
05:04 sorear it might be possible to do the conversion lazily - make objects that look like grapheme strings but actually wrap a java.lang.String, and don't copy/convert until you do an operation that requires a grapheme representation
05:04 sorear perhaps say that strings longer than 1024 code units go to lazy conversion
05:50 ggoebel2 joined #perl6
06:19 salv0 joined #perl6
06:23 fhelmberger joined #perl6
06:39 FROGGS_ joined #perl6
06:42 FROGGS morning
06:43 FROGGS I believe my patch yesterday broke t/spec/S32-str/substr.rakudo.jvm 28..30 :(
06:44 FROGGS well, it made 2 tests pass and 3 fail
06:44 kaleem joined #perl6
06:47 FROGGS ahh, substr needs love
07:04 sjn_ joined #perl6
07:12 domidumont joined #perl6
07:21 rindolf joined #perl6
07:26 domidumont joined #perl6
07:37 lizmat goo *, #perl6!
07:37 lizmat .oO( needs to put more d in her goo )
07:38 moritz gOOd morning, *
07:38 moritz my good is full of OO :-)
07:44 sorear sleep&
07:46 lizmat gnight sorear!
07:56 FROGGS gnight sorear
07:56 FROGGS morning @all
08:07 domidumont joined #perl6
08:12 rindolf joined #perl6
08:14 daxim joined #perl6
08:32 Rix joined #perl6
08:37 Stygia joined #perl6
08:38 sqirrel joined #perl6
08:39 dakkar joined #perl6
08:45 rindolf joined #perl6
09:05 rindolf joined #perl6
09:06 pmichaud_ joined #perl6
09:09 drbean joined #perl6
09:10 exodist_ joined #perl6
09:13 nyuszika7h joined #perl6
09:13 robinsmidsrod joined #perl6
09:13 geekosaur joined #perl6
09:13 Teratogen joined #perl6
09:13 mangala joined #perl6
09:13 Ayiko joined #perl6
09:13 jercos joined #perl6
09:13 diakopter joined #perl6
09:13 cotto joined #perl6
09:13 avar joined #perl6
09:13 risou_awy joined #perl6
09:13 zamolxes joined #perl6
09:14 rindolf joined #perl6
09:15 daniel-s__ joined #perl6
09:15 bruges joined #perl6
09:15 GlitchMr joined #perl6
09:15 LordV joined #perl6
09:15 Tene joined #perl6
09:15 sqirrel joined #perl6
09:15 preflex joined #perl6
09:15 SamuraiJack joined #perl6
09:15 moritz joined #perl6
09:15 autumn joined #perl6
09:15 SmokeMachine joined #perl6
09:15 daniel-s joined #perl6
09:15 kst joined #perl6
09:15 dmol joined #perl6
09:15 xinming joined #perl6
09:15 ehouse joined #perl6
09:15 pecastro joined #perl6
09:15 itz joined #perl6
09:15 vaelxon joined #perl6
09:15 scottp joined #perl6
09:15 nebuchadnezzar joined #perl6
09:15 patspam joined #perl6
09:15 sunnavy joined #perl6
09:15 sivoais joined #perl6
09:15 lestrrat joined #perl6
09:15 cibs joined #perl6
09:15 mattp__ joined #perl6
09:15 markov1 joined #perl6
09:15 mathw_ joined #perl6
09:15 yves joined #perl6
09:15 bakedb_ joined #perl6
09:15 gabriel joined #perl6
09:15 Khisanth joined #perl6
09:15 sjohnson joined #perl6
09:15 tokuhirom_ joined #perl6
09:15 jnthn joined #perl6
09:15 ruoso joined #perl6
09:15 jfried joined #perl6
09:15 yeltzooo joined #perl6
09:15 cxreg joined #perl6
09:15 `patch` joined #perl6
09:15 larks joined #perl6
09:17 xinming_ joined #perl6
09:19 lue joined #perl6
09:31 domidumont joined #perl6
09:32 masak good antenoon full of OO, #perl6
09:33 FROGGS o/
09:44 tadzik nOOn
09:47 drbean joined #perl6
09:48 Croms joined #perl6
09:56 masak r: class C {}; for C.HOW.^methods { try say $_ }
09:56 camelia rakudo c52f24: OUTPUT«eager␤elems␤end␤classify␤categorize␤uniq␤squish␤infinite␤flat␤hash␤list␤lol␤pick␤roll␤reverse␤sort␤values␤keys␤kv␤pairs␤Array␤grep␤first␤join␤map␤min␤max␤minmax␤push␤tree␤unshift␤postcircumfix:<[ ]>␤at_pos␤all␤any␤one␤none␤postcircumfix:<{ }>␤at_key␤reduce␤FLATTENA…
09:56 masak hm.
09:57 masak I was trying to answer the question "is there any way to use the MOP to ask a class which roles it has composed?"
09:57 masak closest thing I found was RoleContainer.roles_to_compose
09:57 masak r: role R {}; class C does R { say +C.^roles_to_compose }; say +C.^roles_to_compose
09:57 camelia rakudo c52f24: OUTPUT«0␤0␤»
09:58 mst Moose provides calculate_all_roles and calculate_all_roles_with_inheritance
09:58 mst I've no idea if that fact helps you any.
09:58 masak hm, compile-time/run-time, I'll bet.
09:58 masak r: role R {}; class C does R { BEGIN say +C.^roles_to_compose }; BEGIN say +C.^roles_to_compose
09:58 camelia rakudo c52f24: OUTPUT«===SORRY!===␤No such method 'dispatch:<.^>' for invocant of type 'C'␤»
09:58 masak r: role R {}; class C does R { BEGIN say +C.HOW.roles_to_compose }; BEGIN say +C.^roles_to_compose
09:58 camelia rakudo c52f24: OUTPUT«===SORRY!===␤too few positional arguments: 1 passed, 2 (or more) expected␤»
09:58 masak oh right.
09:58 masak r: role R {}; class C does R { BEGIN say +C.HOW.roles_to_compose(C) }; BEGIN say +C.HOW.roles_to_compose(C)
09:58 eternaleye joined #perl6
09:59 camelia rakudo c52f24: OUTPUT«1␤0␤»
09:59 masak \o/
09:59 masak I have no idea, just looking at RoleContainer.nqp, how that value ever goes down to 0 again.
10:00 masak seems all RoleContainer does is push to the array, and query it.
10:00 masak oh! but I guess it leaks a reference to the array, so... yeah.
10:00 masak :/
10:00 * masak .oO( the escape analysis team just came back, and they say anyone's a suspect )
10:02 masak it seems it happens in ClassHOW and EnumHOW, though.
10:06 masak r: role R { method greet { say "OH HAI I AM {self} WHO ARE YOU" } }; enum Animal does R <whale bat dog octopus lolcat>; Animal.pick.greet
10:06 camelia rakudo c52f24: OUTPUT«OH HAI I AM octopus WHO ARE YOU␤»
10:06 masak sometimes Perl 6 is not bad. not bad at all.
10:06 zakalwe joined #perl6
10:06 zakalwe joined #perl6
10:07 huf masak: that's a fairly succint way to write those standard useless OO tutorials :)
10:07 masak :)
10:09 masak r: say "I have nothing to declare except my {(enum <genius infallibility lolcats tax alcohol>).roll.key}"
10:09 camelia rakudo c52f24: OUTPUT«I have nothing to declare except my lolcats␤»
10:09 masak \o/
10:10 masak most useless use of enum, ever.
10:10 huf what's the value? ints 1..* ?
10:10 masak 0..*, but yes.
10:10 huf ah!
10:10 masak conceptually, an enum is a bit like a package with constant declarations in it.
10:10 masak but you can sort of take a hash view on it too, fairly easily.
10:11 masak oh, sorry, I should say "an *enumeration* is"...
10:11 masak "enum" is meant to refer to the individual kv pairs.
10:12 huf so the keyword enum makes an enumeration, the elements of which are enums?
10:14 masak yeah.
10:14 masak (sorry about that) :/
10:14 huf nah, this is the good stuff :)
10:14 masak it's a bit like the keyword "subset" declares a subtype.
10:17 mstefanko joined #perl6
10:23 * FROGGS is sad
10:25 FROGGS fixing substr for jvm backend to handle >16bit unicode chars results stage parse = 72s instead of 57s or so
10:28 mtk0 joined #perl6
10:31 masak aww
10:32 giannisfaf joined #perl6
10:33 masak giannisfaf: greetings.
10:36 FROGGS ( http://www.ibm.com/developerworks/library/j-unicode/ )++
10:37 masak (what is it with these web.freenode users who join for four minutes and then quit without saying anything?)
10:37 FROGGS lunch &
10:48 masak ooh, good idea :)
10:53 eternaleye joined #perl6
11:01 vimal2012 joined #perl6
11:06 vimal2012 left #perl6
11:28 eternaleye joined #perl6
11:32 rindolf joined #perl6
11:33 FROGGS joined #perl6
11:36 ztt joined #perl6
11:41 gfldex masak: my bet would be that the timeout is 4 minutes (coming from the web frontent) and that the users aint human
11:41 masak oh!
11:54 masak well, by all means, don't let me stand in the way of bots slowly rising to general intelligence and taking over the world. I for one welcome our new 4-minute-timing-out CAPTCHA-foiling web.freenode-using utterly silent and kinda creepy IRC bot overlords.
11:54 rindolf joined #perl6
11:57 prammer joined #perl6
11:58 frettled with prejudicial oversight.
11:59 masak huh. another of my YAPC::EU talk submissions was accepted. \o/
11:59 masak ladies and gentlebots, I will now give *two* talks at YAPC::EU.
12:01 moritz masak++
12:01 moritz masak++
12:01 moritz # two talks, two ++
12:02 masak :) :)
12:06 dalek ecosystem: 26c35ee | sergot++ | META.list:
12:06 dalek ecosystem: [META.list] BreakDancer added
12:06 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/26c35eeb21
12:07 tadzik \o/
12:07 sergot tadzik++
12:07 tadzik the time has come :)
12:07 sergot :)
12:10 masak sergot++ tadzik++
12:11 masak # two brilliant coders, two ++ :)
12:18 tadzik I'm flattered :)
12:25 konundra joined #perl6
12:26 sergot nice to "hear" that
12:26 sergot :)
12:42 FROGGS rakudo-jvm Stage parse      : 543.946 \o/
12:42 frettled masak++ :)
12:49 FROGGS jnthn: I dont like Java's 16bit chars.... https://gist.github.com/FROGGS/5957075 (read the title)
12:58 FROGGS jnthn: maybe it would make sense to work with StringBuilders instead of Strings? (erverywhere)
13:09 PacoAir joined #perl6
13:11 prevost joined #perl6
13:19 Rix joined #perl6
13:19 pmurias joined #perl6
13:19 crab2313 joined #perl6
13:22 thou joined #perl6
13:48 rindolf joined #perl6
13:53 dalek rakudo-js: 047be23 | (Pawel Murias)++ | src/QAST/Compiler/JavaScript.nqp:
13:53 dalek rakudo-js: Quote all the reserved words in JavaScript.
13:53 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/047be23822
13:56 fridim_ joined #perl6
13:58 btyler joined #perl6
14:00 arlinius joined #perl6
14:04 skids joined #perl6
14:05 rindolf joined #perl6
14:05 haiferry joined #perl6
14:09 bluescreen10 joined #perl6
14:17 xilo joined #perl6
14:23 jaldhar_ joined #perl6
14:23 pmurias jnthn: is there a good platform independent name for a test that check methods named like javascript keywords work?
14:23 jaldhar_ joined #perl6
14:26 cibs joined #perl6
14:30 masak wanting such a test to be platform independent sounds like an odd desire.
14:30 masak the concern is there because of one of the backends, JavaScript.
14:32 pmurias yes, but that seems to be a concern to any backend that emits code in textual form
14:33 pmurias as I can imagine break being a keyword in other languages that JavaScript ;)
14:33 rindolf joined #perl6
14:34 pmurias masak: but perhaps just calling it javascript-keywords-as-method-names would be a honest name
14:36 [Coke] aye.
14:37 masak soundslike.
14:38 arlinius joined #perl6
14:43 ajr joined #perl6
14:45 dalek nqp: b0a3903 | (Pawel Murias)++ | t/nqp/69-js-keywords-as-identifier.t:
14:45 dalek nqp: Add a test which checks that JavaScript reserved words can be used as method names.
14:45 dalek nqp:
14:45 dalek nqp: Hopefully that test will be usefull on any future backends emitting source code.
14:45 dalek nqp: review: https://github.com/perl6/nqp/commit/b0a39036fb
14:46 pmurias argh, fixing...
14:46 rindolf joined #perl6
14:46 FROGGS waht... what is that?
14:49 masak o.O
14:49 dalek nqp: 086e95f | (Pawel Murias)++ | t/nqp/69-js-keywords-as-identifier.t:
14:49 dalek nqp: Fix commit b0a39036fb976b36150a3d6291e6db97e047f1e9.
14:49 dalek nqp: review: https://github.com/perl6/nqp/commit/086e95f839
14:49 masak talk about one massive typo.
14:50 pmurias in a mv command ;)
15:01 dmol joined #perl6
15:07 SamuraiJack joined #perl6
15:12 rindolf joined #perl6
15:16 rindolf joined #perl6
15:19 grondilu joined #perl6
15:22 rindolf joined #perl6
15:25 dalek specs: 554cef1 | (Elizabeth Mattijsen)++ | S11-modules.pod:
15:25 dalek specs: Some more CompUnitRepo documentation
15:25 dalek specs: review: https://github.com/perl6/specs/commit/554cef11fe
15:40 telex joined #perl6
15:42 kaare_ joined #perl6
15:46 dmol joined #perl6
15:48 rindolf joined #perl6
15:48 jnthn evening, #perl6
15:49 timotimo evening jnthn :)
15:50 timotimo is there something in place in perl6 to give users the ability to have a "OrderedDict" like type?
15:52 dalek rakudo/nom: 0c2d61f | (Elizabeth Mattijsen)++ | src/core/traits.pm:
15:52 dalek rakudo/nom: Make $!, $/ and $_ default Nil
15:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0c2d61f45a
15:53 lizmat evening jnthn!
15:53 lizmat timotimo: you mean, an enum ?
15:58 [Coke] I don't see how an enum gets you an ordered dictionary.
15:59 lizmat maybe an enum that gets built at runtime?
15:59 [Coke] how do you get arbitrary keys and values in an enum?
16:00 timotimo i'm not sure an enum covers what i mean?
16:00 lizmat ah, arbitrary values  :-)
16:00 timotimo an enumeration surely doesn't
16:00 PerlJam timotimo: you mean a hash that remembers the order in which keys/values were added?
16:00 timotimo indeed
16:01 [Coke] timotimo: you could write a class that did positional and associative, used a hash for storage, but intercepted keys, iter, etc.
16:01 [Coke] ... I think. :)
16:01 PerlJam yeah, what Coke said
16:01 [Coke] When I need that datastructure, I usually just have an array and a hash.
16:02 [Coke] (I have java code like that in my current codebase even)
16:02 lizmat but then you would need to store the keys twice, right?
16:03 PerlJam lizmat: but the optimizer should take care of the double-storage for us, so it shouldn't be a problem   ;)
16:03 * moritz coughs discretely
16:04 jnthn r: class OHash is Hash { has @!order; method at_key(\key) is rw { self.exists(key) || @!order.push(key); callsame; }; method pairs() { $_ => self.at_key($_) for @!order } }; my %h := OHash.new %h<a> = 1; %h<x> = 2; %h<b> = 3; for %h { .perl.say }
16:04 camelia rakudo c52f24: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    h used at line 1â�¤â�¤Â»
16:04 jnthn r: class OHash is Hash { has @!order; method at_key(\key) is rw { self.exists(key) || @!order.push(key); callsame; }; method pairs() { $_ => self.at_key($_) for @!order } }; my %h := OHash.new; %h<a> = 1; %h<x> = 2; %h<b> = 3; for %h { .perl.say }
16:04 camelia rakudo c52f24: OUTPUT«"a" => 1␤"x" => 2␤"b" => 3␤»
16:05 lizmat .oO( good that we can really subclass Hash now )
16:05 timotimo deleting things from it is a bit more tricky, though, right?
16:05 jnthn What you wanted a complete implementation? :P
16:06 timotimo haha
16:06 timotimo no, it's all right, i was just curious ;)
16:07 FROGGS joined #perl6
16:08 FROGGS o/
16:08 jnthn I guess method delete(\key) { @order .= grep(* !eq key); callsame; } is one way... :)
16:08 FROGGS so, since I dont like the JVM anymore, can we hack moarvm now? ó.ò
16:09 lizmat delete could build a reverse on $!order whenever it is first called
16:09 lizmat reverse hash
16:09 FROGGS hi jnthn, hi lizmat
16:09 jnthn FROGGS: I think we stick with JVM strings until we do NFG. :)
16:09 lizmat hi FROGGS!
16:10 jnthn FROGGS: Yes, we can hack on Moar :P
16:10 domidumont joined #perl6
16:10 FROGGS jnthn: and NFG will cover these issues? I guess the answer is "yes"
16:10 jnthn FROGGS: Well, it's fixed width so the substr issue goes away ;)
16:10 lizmat so, would it make sense to spec an OHash and implement it ?
16:10 FROGGS jnthn: do you think there is something I could already do vor MoarVM?
16:11 masak jnthn! \o/
16:11 FROGGS jnthn: good to here that (NFG), I was "a bit" disappointed about the 16bit chars
16:12 FROGGS hear*
16:12 rindolf joined #perl6
16:12 jnthn FROGGS: Oh, I knew the 16 bit chars would suck, I just didn't think they sucked hard enough to be 2-3 months behind where we are now. :)
16:12 masak in my not-so-humble opinion, if we've designed Perl 6 in such a way that you can't plop an ordered hash into a %-sigil variable, then we've failed somewhere.
16:13 jnthn masak: Um, I just did it :)
16:13 jnthn Chill dude :P
16:13 masak oh, I should backlog... :)
16:13 jnthn FROGGS: Yes, no doubt :)
16:13 masak jnthn++
16:13 PerlJam lizmat: seems like that would be something for module implementors to do, not necessarily "standard Perl 6"
16:14 masak my %h := OHash.new; # but we should be able to write 'my %h is OHash' or something, right?
16:14 jnthn masak: Yes, and if somebody implements variable traits... ;)
16:14 lizmat mu %h is ordered ?
16:14 lizmat my
16:15 jnthn my %h is SomeType; # is meant to set %h to SomeType
16:15 masak right.
16:15 lizmat so: my %h is OHash ?
16:15 TimToady could even have a 'use PHP;' to turn on the feature :)
16:16 jnthn I'm not sure we should call it OHash. :)
16:16 TimToady but I agree that it probably doesn't rise to the level of coreness; P5 has got along without it for many years
16:16 TimToady and modules will happen
16:17 lizmat but actually *did* have a discussion in the past months on the possibility of adding this particular feature
16:17 jnthn I'm trying to think of a pun involving "you need something Ohash-y" and chopsticks, but...
16:17 lizmat specifically in the light of unrepeatable hash order issues
16:18 TimToady also, what hapens with duplicates?
16:18 TimToady *pp
16:18 * FROGGS .oO( dupplicates? )
16:18 Tene joined #perl6
16:19 masak TimToady: or 'use JavaScript;'
16:19 lizmat duplicates would override previous value, but not the order (I don't think)
16:19 masak sounds about right.
16:19 FROGGS yeah
16:19 TimToady even if the duplicates are from a .push?
16:19 TimToady and which .push do you do?
16:20 PerlJam speaking of ordered things ... is there some specced order that Class.^attributes will return the attributes in?  Is it declaration order, or no order specified?
16:20 * lizmat checks spec on Hash.push
16:20 masak TimToady: I'm thinking of an ordered hash as primarily a hash, but it also preserves insertion order.
16:20 jnthn PerlJam: It'd probably better retain the order. :)
16:20 masak TimToady: now, that doesn't answer the question about first-wins or last-wins.
16:21 TimToady I just always get the feeling when I look at these languages that someone has handed me a combination hammer/screwdriver
16:21 jnthn PerlJam: The order it passes down when composing the REPR is certainly significant becus eit determines object layout.
16:21 masak TimToady: I guess there is prior art for last-wins, in signature binding, for example.
16:21 TimToady and darned if it isn't a plus screwdriver when I want a minus
16:21 jnthn PerlJam: And there's no reason to keep an ordered and an unordered copy around. So I'm pretty sure you can rely on the order of all of them.
16:22 TimToady (love the Japanese names for Phillips and slot screwdrivers)
16:22 masak TimToady: I've sometimes used Java's LinkedHashSet for what I think were excellent reasons.
16:22 masak TimToady: but I agree those are minority use cases.
16:22 PerlJam jnthn: excellent, thanks.
16:22 jnthn PerlJam: Also you can probably rely on .^methods to give an ordered answer too, 'cus we use the order to disamgibuate protoregexes :)
16:22 FROGGS TimToady: I just know Plilips(tm) and Pozidrive(tm)
16:23 TimToady I think a good ordered has needs a special implementation to work well, but I also think that using that for ordinary hash or list is going to be suboptimal when you don't care
16:23 PerlJam jnthn: is the order of ^attributes or ^methods actually specced?  I couldn't find it just now if so.  (should it be?)
16:23 domidumont joined #perl6
16:24 jnthn PerlJam: Doubt it, though S05 mentions that rule order disambiguates, and I guess S09 or some other thing about native calling implies that attribute ordering has to be significant.
16:24 TimToady I would tend to think of the order as the primary feature, and the hash as a secondary index into the list :)
16:24 jnthn Oh, there's another really important reason for attribute order to matter
16:24 jnthn has $.a; has $.b; has $.c = $!a + $!b; :)
16:25 TimToady well, but you can see that from textual order when you parse :)
16:25 jnthn TimToady: Yes, but that order has to be kept somewhere ;)
16:25 domidumont joined #perl6
16:25 TimToady the text already keeps the order
16:26 jnthn Yes, but the text is gone by runtime :P
16:26 TimToady why do you need the order at runtime?
16:27 TimToady nevermind, not enough coffee
16:27 jnthn :P
16:29 masak :)
16:29 jnthn lol...to #tag in Swedish is tagga
16:29 jnthn uh, ww :)
16:29 jnthn But it's still cute :)
16:29 masak we like to end our verbs with -a :)
16:29 jnthn yes :)
16:30 jnthn Oh, the joys of updating my address with SAS...now I get all the info about cheap flight deals in Swedish and actually have to think to read 'em :P
16:31 masak it was already in the common slang before Twitter and folksonomies. "tagga ned" means "cool it", probably by some hedgehog-related metaphor.
16:31 jnthn Is it used for grafiti also?
16:32 TimToady in fact, I'd probably implement it as a list of Pairs, with an index of keys to pairs, so that the user can pull out either the keys or the values in order
16:32 TimToady shower &
16:34 rindolf joined #perl6
16:37 masak jnthn: I believe so. but that's more of a straight loan.
16:38 masak jnthn: and it wouldn't be sv:"tagg" (en:"spike"), but sv:"tag" (en:"tag")
16:45 SmokeMachine joined #perl6
16:46 colomon joined #perl6
16:47 colomon o/
16:48 masak \o
16:48 sergot o/
16:48 konundra joined #perl6
16:48 colomon popped into the lodge to push my latest.
16:55 FROGGS hi colomon
16:55 colomon hi FROGGS
16:55 dalek nqp: 2753ede | (Solomon Foster)++ | t/jvm/06-sprintf.t:
16:55 dalek nqp: Fixed two wrong tests.
16:55 dalek nqp: review: https://github.com/perl6/nqp/commit/2753ede2e8
16:55 dalek nqp: 8466153 | (Solomon Foster)++ | t/jvm/06-sprintf.t:
16:55 dalek nqp: Test 0.0 sent to %e.
16:55 dalek nqp: review: https://github.com/perl6/nqp/commit/84661537ab
16:55 dalek nqp: 0ef9a28 | (Solomon Foster)++ | src/HLL/sprintf.nqp:
16:55 dalek nqp: Two tweaks to sprintf.
16:55 dalek nqp:
16:55 dalek nqp: Properly handle 0.0 sent to scientific notation.
16:55 dalek nqp: Properly convert double to big integer.
16:56 dalek nqp: review: https://github.com/perl6/nqp/commit/0ef9a28fe0
16:56 dalek nqp: d830d52 | (Solomon Foster)++ | t/jvm/06-sprintf.t:
16:56 dalek nqp: Fix incorrect tests.
16:56 dalek nqp: review: https://github.com/perl6/nqp/commit/d830d528df
16:56 dalek nqp: 8507211 | (Solomon Foster)++ | src/HLL/sprintf.nqp:
16:56 dalek nqp: Fix some previously incorrect details.
16:56 dalek nqp: review: https://github.com/perl6/nqp/commit/8507211b76
16:57 masak colomon++
16:58 colomon I frakked up a lot of the sprintf tests.  I've corrected more tests than I've fixed the code, and I'm not sure there aren't more incorrect tests.  :\
16:59 colomon but the good news is there should be like 16 more passes in roast's sprintf.t now.
16:59 colomon iterating toward correct code...
17:00 masak ;)
17:00 colomon TDD works better when the tests are correct
17:00 tadzik I need to read up on this NFG thing
17:01 tadzik 8bit characters and unicode and everything is good and nothing is bad
17:01 tadzik magic
17:02 tadzik hah! poznan.pm.org runs on Perl 6. Goodness
17:03 rindolf joined #perl6
17:04 FROGGS cool
17:04 lizmat well, runs?  generated by ?
17:04 tadzik generated by, yes
17:05 tadzik using BreakDancer
17:05 lizmat .oO( ah, the times when I generated our websites using TenCORE :-)
17:07 lizmat 1994 - 1997 approx
17:08 tadzik wow, I was even alive back then :P
17:08 FROGGS hehe
17:10 masak poznan.pm.org++
17:10 lizmat indeed, poznan.pm.prg++
17:10 lizmat especially considering there was no Poznan.pm before the first PLPW, right ?
17:10 masak hm, I wonder if they'd happily accept a new stylesheet, though.
17:11 tadzik yes, it's the new group :)
17:12 tadzik masak: I suppose so, they accept contributions. The website says so :)
17:12 tadzik makes me want to migrate Warsaw.pm website to Perl 6 as well
17:12 jnthn ooh, Poznan.pm :)
17:14 masak jnthn: we should visit Poznan at some point. give some talks in the new mongers group or something :)
17:15 abnorman joined #perl6
17:15 jnthn yes!
17:15 tadzik I'm planning to go to the first meeting too
17:15 jnthn Do they have an Indian restaurant? 'cus then we can nom some poz-nan bread :P
17:15 tadzik oooo
17:15 masak :P
17:15 tadzik poz-naan
17:16 tadzik so, um, people have talks on pm meetings? :P
17:16 jnthn ;)
17:16 masak Google Maps says there are Indian restaurants.
17:16 masak tadzik: depends.
17:17 masak there's http://www.tajindia.pl/ -- not exactly central, it seems, but looks quite genuine.
17:18 jnthn .oO( tadzindia )
17:19 jnthn wow, Polish pretending to be Sanskrit!
17:19 tadzik come on. I have to deal with Tadzikistan jokes all the time :P
17:19 masak yes! :)
17:19 masak tadzik: wow, the Tadzikistan connection hadn't even occurred to me. o.O
17:19 masak jnthn: almost as cool as Russian pretending to be Japanese :)
17:20 konundra joined #perl6
17:21 jnthn Wow, the prices are better than Sweden :P
17:22 masak news at 11.
17:22 jnthn OK, I'm sold :)
17:23 jnthn Poznan.pm gets a talk from me if it likes :)
17:23 jnthn Otherwise, just a visit and beer :)
17:23 [Coke] I used "nigh" as the todo tag for the rakudo.jvm todos.
17:24 jnthn [Coke]: Are we fudging now?
17:24 jnthn [Coke]: Any chance of a pre-fudge branch/tag? I'd prefer to work against unfudged a bit longer...
17:25 [Coke] jnthn: I didn't fudge everything. mainly was targetting things that were exploding and preventing other failures.
17:25 [Coke] err..
17:25 [Coke] preventing other *passes*
17:25 jnthn OK, guess I can make me a branch that points to before it :)
17:25 segomos joined #perl6
17:25 jnthn locally, even :)
17:26 [Coke] I can remove all the todos. would that be close enough?
17:26 jnthn [Coke]: Don't worry, so long as I can find a commit before the extra fudges I'm happy :)
17:26 [Coke] I did it in one chunk, should be fine.
17:26 [Coke] sorry. was talking about it on channel while you were probably in transit.
17:27 jnthn [Coke]: To be clear: I'm not unhappy it's being done, I just still find a pure "what we fail over Parrot" view useful for the moment. :)
17:27 jnthn And it seems it's easy for me to have that, so all is good :)
17:28 [Coke] I figured we were close enough that we could do 'ack rakudo.jvm'
17:28 [Coke] :)
17:28 [Coke] ok.
17:28 jnthn :)
17:28 jnthn There is that :)
17:28 [Coke] still failures in master, btw. I didn't fudge everything.
17:29 masak wow, the Advent calendar pulls in an average of 40 page views per day even in July.
17:32 timotimo doesn't surprise me much
17:32 timotimo i love that thing :)
17:33 [Coke] I find it has some of the better examples of things when googling.
17:34 masak that doesn't surprise me -- people put in lots of effort.
17:34 masak actually, the format (and the distributed community style of authoring it) seems to work very well.
17:34 jnthn Yes, there's been some very good posts written for the advent calendar.
17:35 masak the only thing you can't ask of that kind of format/style is 24 coherent posts making up a story.
17:35 domidumont joined #perl6
17:35 * jnthn will no doubt be willing to contribute some again this year. :)
17:35 * masak too :)
17:35 * tadzik too (:
17:35 rindolf joined #perl6
17:36 * lizmat might give it a whirl
17:37 * moritz too, if he can think of some topics
17:37 jnthn Well, there's 5 months to think of 'em :P
17:39 masak lizmat: yes, please!
17:39 * rjbs directs people to the p5 advent calendars pretty often.  That kind of article is often much better than RTFM.
17:41 * rjbs checks, finds that it gets 15-30 views per day.
17:43 vk joined #perl6
17:43 dalek perl6-roast-data: 1f0039b | coke++ | / (5 files):
17:43 dalek perl6-roast-data: today (automated commit)
17:43 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/1f0039b5a6
17:43 [Coke] that increase is not entirely legit - lots of new rakudo.parrot failures. 97.25 is closer.
17:43 [Coke] we are definitely passing tests that rakudo.parrot has todo'd or skip'd though.
17:44 masak curious.
17:44 masak is that because of Parrot limitations or bugs?
17:46 [Coke] mostly sprintf.
17:46 [Coke] there are some others that were todo'd but were passing on rakudo that I just fudged without verifying that it was a legit todo pass. (because then I would have had to skip it for rakudo.jvm and leave it todo'd for rakudo.parrot)
17:47 Targen joined #perl6
17:50 masak sprintf! \o/
17:55 tadzik https://github.com/tadzik/rakudobrew
17:55 tadzik some of you may like this :)
17:55 tadzik it's probably broken in one way or the other, but useful
17:56 jnthn It sounds like a beer, made by Rakudo devs :P
17:57 spider-mario joined #perl6
17:57 tadzik it's mostly random junk pulled from my .rakudobrew directory :)
17:57 tadzik which happens to work, mostly
17:57 tadzik also, I still don't know how to make rakudo-jvm runnable from anywhere but its source directory
17:58 tadzik I tried changing '.' to an absolute path in the 'perl6' script, but that didn't get me anywhere
17:58 timotimo a big piece of the puzzle is probably --with-nqp=/absolute/path/to/nqp
17:58 tadzik I did that :)
17:58 timotimo oke
18:05 rindolf joined #perl6
18:05 Croms joined #perl6
18:08 Rotwang joined #perl6
18:09 ssutch joined #perl6
18:09 ssutch jello!
18:10 tadzik curious. 'say "hi"' is cpu 0.418 total. 'say $*VM' is cpu 3.723 total
18:12 timotimo hey ssutch :)
18:12 masak ohhai ssutch
18:12 timotimo tadzik: yeah, for some reason stringification of hashes and such is pretty darn slow
18:12 timotimo try it with any big hash
18:13 lizmat there's a lot of ~ in the stringification
18:13 * lizmat just worked around there
18:13 tadzik a-ha
18:13 tadzik would join on a big array be faster than a lot of small ~'s?
18:13 lizmat let me see some other approaches
18:13 timotimo it really should
18:14 tadzik there, LHF :)
18:14 timotimo some time ago i tried to make ~ a list op and have it use join internally
18:14 timotimo it didn't work out very well sadly :(
18:15 lizmat it basically currently is: {' ~ self.pairs.map({.perl}).join(', ') ~ '}'
18:17 timotimo yes, and each of the pairs does '(' ~ $.key.perl ~ ') => ' ~ $.value.perl;
18:17 timotimo especially on $*VM there's a huge string that has to be copied two times to prepend a { and then append a }
18:18 timotimo "didn't work out very well" means i didn't get it to work, but i'm still convinced it would give a lot of small performance boosts all over the place, sometimes big ones.
18:18 tadzik ouch
18:18 diakopter timotimo: what's "huge"
18:18 tadzik diakopter: huuuuge
18:19 tadzik r: say $*VM.gist.chars
18:19 camelia rakudo 0c2d61: OUTPUT«12137␤»
18:20 timotimo i call that huge.
18:20 * diakopter hopes those are gigabytes
18:20 timotimo haha.
18:20 tadzik it's huge by rakudo speed standards :)
18:22 * lizmat wonders if implementing Cat would make things faster in this case
18:24 timotimo i think it could. in the current case there would still be constructions of strings for each pair and then one outer join
18:24 timotimo if there was cat, it could make everything in one fell swoop with one string builder at the very end
18:24 tadzik Cat is java's StringBuilder?
18:25 timotimo more or less, yes
18:25 tadzik pardon my french
18:25 timotimo except you can do a bunch of things on a cat before creating an actual string
18:26 lizmat S03:3878
18:26 tadzik may be a nice exercise to write it as a module, and possibly pull it into core
18:26 * tadzik visits ir clogs to click on a link
18:26 tadzik oh, I once wrote and irc bot in Perl 6 that did this on the channel
18:33 SmokeMachine joined #perl6
18:36 synopsebot joined #perl6
18:36 tadzik S03:3878
18:36 synopsebot Link: http://perlcabal.org/syn/S03.html#line_3878
18:36 tadzik perfect
18:36 diakopter wat.
18:37 masak \o/
18:37 tadzik may be more officient to just teach yolo to do it
18:37 tadzik I have to admit, though, that I rewrote it to Perl 5 so I can run it on my raspi
18:37 masak Perl 6 doesn't run on raspi?
18:38 tadzik well, I've looked at nwc10's experiences, and I don't want to do this at home ;)
18:42 synopsebot joined #perl6
18:46 lizmat there doesn't seem to be a difference in CPU usage between join and join('something')
18:47 lizmat I wonder whether nqp::join could be optimized to not join empty strings
18:47 timotimo huh?
18:47 TimToady it certainly could, unless it already has been, in which case you'd have to undo it first :)
18:48 * jnthn suspects it already has been
18:48 timotimo do you mean ("", "", "hello", "", "", "world").join should be as fast as ("hello", "world").join?
18:48 TimToady the main thing I'd check is that it adds up all the lengths first before allocating the target to the entire length
18:48 TimToady otherwise you're just doing concats and copying stuff around multiple times
18:49 timotimo i believe on parrot it uses parrot's own string builder pmc and on jvm it uses java's stringbuilder
18:49 timotimo but i may be wrong
18:49 TimToady timotimo: I believe she mean join('')
18:49 flussence .oO( those are the Japanese names? I've always called them that... )
18:49 timotimo oh!
18:49 TimToady *meant
18:49 timotimo javapanese?
18:49 flussence whoops, I'd scrolled up 2 hours without realising
18:49 lizmat timotimo: thanks for the clarification
18:49 TimToady flussence: it's not a usage I've ever seen in the US of A...
18:51 TimToady *can* you preallocate an area for string concats in the JVM?
18:52 jnthn It provides a join method directly
18:52 jnthn And one would suspect they already thought of that.
18:52 TimToady (this would be pretty easy in NFG-land, of course, where we have more buffer-like control of the chars)
18:52 lizmat jnthn: that's why I can't find one in NQP
18:52 lizmat and one would hope
18:53 jnthn Looking at method join, though, we probably could optimize it in a couple of ways.
18:53 lizmat but the lack of difference in joining with '' and something else, would lead me to think it wasn't
18:54 jnthn For one, if we know it's not infinite, we can pre-size the array of native strings on the elems it will contain, so the push never reallocates. For two, we could avoid calling .Stringy on things that a cheap typecheck can already tell us are strings. And that should actually be .Str anyway, as a Stringy doesn't promise you can nqp::unbox_s it.
18:54 TimToady certainly, if we have to do our own loop, it would pay to have a different loop for the '' case, but if it's just delegating to the VM, distinguishing '' might or might not make any difference
18:55 jnthn *nod*
18:55 jnthn If people want to go benchmarking, I can supply patches that may or may not help.
18:55 * timotimo currently unavailable for benchmarking
18:56 lizmat jnthn: yes please
18:56 TimToady .oO(TimToady is unavailable for MenschBarking.)
18:56 lizmat .oO( o oh, the start of ZZW )
18:58 * flussence would still like to use lazy Cat-based code instead of lots of temporary .join() strings someday
18:59 flussence or s/use/write/, even.
19:00 eternaleye joined #perl6
19:00 TimToady it's gonna take some rope tricks
19:01 * TimToady wonders what we should call the slurp-equivalent that returns a cat
19:02 TimToady assuming slurp stays "eager"
19:02 jnthn lizmat: https://gist.github.com/jnthn/5960231
19:02 flussence .lines? :)
19:02 diakopter .meow
19:02 yoleaux http://moar.edgecats.net/cats/T6GoqlE.gif
19:02 jnthn lizmat: imho, it's worth testing the two individually, as well as together.
19:02 lizmat will do
19:02 TimToady .lap
19:02 diakopter *facepalm*
19:02 flussence .nom
19:03 jnthn moar lolcats!
19:03 diakopter .meow
19:03 yoleaux http://moar.edgecats.net/cats/anigif_enhanced-buzz-26857-1364481357-6.gif
19:03 diakopter .meow
19:03 yoleaux http://moar.edgecats.net/cats/DWI3Z.gif
19:03 jnthn *lol*
19:04 jnthn Those two are great
19:04 TimToady lolling down the stairs
19:05 TimToady the second one would also work for .tree
19:05 jnthn oh wow, that's be great
19:05 jnthn Documentation of all the Perl 6 built-ins, each one with an appropriate lolcat to illustrate it
19:06 TimToady copyright issues, mebbe
19:06 TimToady the stairs would work nicely for .lol
19:06 diakopter .roll?
19:06 TimToady or that
19:07 TimToady but perhaps not random enough for .roll
19:07 TimToady you'd want a lolcat pawing dice for that, methinks
19:08 TimToady and one could certainly get cats picking things out of bags
19:08 * masak .oO( cats getting cats out of bags )
19:08 TimToady the first one might have done that, if not for the exception
19:10 lizmat jnthn: first one doesn't make a difference in CPU, but also generates the wrong result for $*VM
19:10 TimToady CATCH, CONTROL, LEAVE, KEEP, REDO, BEGIN, most of the phasers could work too
19:10 Util_ #ps in 20m
19:11 ilbot_nextgen joined #perl6
19:11 lizmat looks like the .push is adding elemens *after* the nqp::setelems.  aka, we have twice the number of elements in the list being joined
19:11 lizmat with half of them empty
19:12 * masak .oO( so push is a pessimist )
19:12 lizmat p5: my @a; $#a=10; push @a.1; say join',',@a
19:12 lizmat perl5: my @a; $#a=10; push @a.1; say join',',@a
19:13 moritz p5eval_: my @a; $#a=10; push @a.1; say join',',@a
19:13 moritz p5eval: my @a; $#a=10; push @a.1; say join',',@a
19:13 p5eval_ moritz: ERROR: Not an ARRAY reference at (eval 7) line 1.
19:13 TimToady eval 7?!?
19:13 lizmat p5eval: my @a; $#a=10; push @a,1; say join ',',@a
19:13 p5eval_ lizmat: ,,,,,,,,,,,11
19:13 GlitchMr rn: Range.new(1..2, 3..4).perl.eval
19:13 moritz p5eval_: die 'foo'
19:13 camelia niecza v24-86-g39ab531: OUTPUT«Unhandled exception: ".." and ".." are non-associative and require parens␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) ␤  at /home/p6eval/niecza/src/STD.pm6 line 5639 (STD.sorry @ 6) ␤  at /home/p6eval/niecza/src/STD.pm6 line 4642 (AN…
19:13 camelia ..rakudo 0c2d61: OUTPUT«Range objects are not valid endpoints for Ranges␤  in method new at src/gen/CORE.setting:5766␤  in method new at src/gen/CORE.setting:5761␤  in block  at /tmp/zAf3u1pcMi:1␤␤»
19:14 lizmat TimToady: 7.die.die.die
19:14 GlitchMr I've a feeling it's a bug in Niecza.
19:14 lizmat at least for now
19:14 diakopter hyperop: http://moar.edgecats.net/cats/tumblr_m61b7wEpyr1rows1to1_400.gif
19:14 lizmat that feels more like "race"
19:14 diakopter yes, that.
19:15 GlitchMr rn: my $blah = ('a' => 'b')..2; say $blah.min; say $blah.perl.eval.min;
19:15 camelia rakudo 0c2d61, niecza v24-86-g39ab531: OUTPUT«"a" => "b"␤"a" => "b"..2␤»
19:16 TimToady n: say 1..2, 3..4;
19:16 camelia niecza v24-86-g39ab531: OUTPUT«1..23..4␤»
19:16 masak n: say (1..2)..(3..4)
19:16 camelia niecza v24-86-g39ab531: OUTPUT«1..2..3..4␤»
19:16 TimToady hmm, is CORE.setting in niecza using an eval?
19:16 GlitchMr <camelia> rakudo 0c2d61, niecza v24-86-g39ab531: OUTPUT«"a" => "b"␤"a" => "b"..2␤»
19:16 diakopter lazy: http://moar.edgecats.net/cats/EYyO2.gif
19:16 GlitchMr And here both Rakudo and Niecza seem wrong.
19:17 GlitchMr .perl is complex.
19:17 masak diakopter: *lol*
19:17 masak diakopter: that one could work for .push, as well.
19:19 TimToady seems more like handling the exception by ignoring it
19:21 diakopter lap: http://moar.edgecats.net/cats/ibacte3KBbQyPn.gif
19:21 TimToady though it seems like it's playing dead, so maybe it's just a die
19:21 lizmat definitely a lack of CATCH there
19:22 diakopter concat: http://moar.edgecats.net/cats/tumblr_m3xwh7ViB81r1lkdko1_400.gif
19:23 diakopter alarm: http://moar.edgecats.net/cats/d9a4438a-f47c-40cb-82a9-de7e0b434fd9.gif
19:23 benabik Cat.concat?
19:23 TimToady looks like a Pair to me
19:23 lizmat concat feels more like subclassing to me
19:24 diakopter rand: http://moar.edgecats.net/cats/tumblr_mbasncPDG91qir3eco1_500.gif
19:26 TimToady I dunno, seems to have too much periodicity
19:27 diakopter clone: http://moar.edgecats.net/cats/catmagician.gif
19:28 TimToady .caller
19:28 TimToady (a form of reflection :)
19:29 [Coke] I thought it was a collar off-by-two. :P
19:31 notjack joined #perl6
19:31 diakopter ENTER: http://moar.edgecats.net/cats/tumblr_maqtusE7sh1re3wmmo1_400.gif
19:31 notjack o/j apl
19:32 diakopter LEAVE: http://moar.edgecats.net/cats/104.gif
19:32 jnthn lizmat: Oh... it'd need an nqp::setelems($rsa, 0); after the first setelems...so it sizes it, then sets the "next push" location back to 0.
19:32 lizmat okidoki
19:32 diakopter .VAR: http://moar.edgecats.net/cats/anigif_enhanced-buzz-9518-1323296240-13.gif
19:34 diakopter lolol  .max: http://moar.edgecats.net/cats/tumblr_m5s1ilFT9n1rq7mkpo1_500.gif
19:47 diakopter .splat http://moar.edgecats.net/cats/HPOIdtK.gif
19:47 diakopter er, is .splat a thing?
19:48 masak we sometimes call the '*' in parameters that, I think.
19:48 masak or is that the Python people?
19:50 ehouse left #perl6
19:51 lizmat_ joined #perl6
19:52 diakopter lives_ok: http://moar.edgecats.net/cats/anigif_enhanced-buzz-12805-1366466197-1.gif
19:52 lizmat_ r: my $a=1..10; my $b= [~] $a; say $b  # is this supposed to stringify with spaces ?
19:52 camelia rakudo 0c2d61: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
19:53 lizmat_ now *that* I would call "race" or "hyper"
19:54 lizmat r: 1
19:54 camelia rakudo 0c2d61:  ( no output )
19:54 FROGGS_ joined #perl6
19:55 * lizmat_ feels cloned
19:55 spider-mario_ joined #perl6
19:56 breinbaa1 joined #perl6
19:57 rhr_ joined #perl6
19:57 timotimo http://amazingasset.com/wp-content/uploads/2012/01/choco-milk.jpg - this is .slurp("chocolatemilk", :b)
19:57 nwc10_ joined #perl6
19:58 timotimo (get it? 'cause it's binary)
20:00 diakopter .flip: http://moar.edgecats.net/cats/tumblr_mjru5rk24u1s8rwuvo1_500.gif
20:00 yoleaux diakopter: Sorry: that command is a web-service, but it didn't respond in plain text.
20:00 diakopter yoleaux: ...
20:00 timotimo diakopter: "container shape mismatch"?
20:03 charsbar_______2 joined #perl6
20:03 diakopter FETCH: http://moar.edgecats.net/cats/ZFY42sY.gif
20:06 masak TimToady: I'm mulling over raiph's and rurban's comments at the bottom of http://perl6advent.wordpress.com/2012/12/23/day-23-macros/
20:06 diakopter die:
20:06 diakopter http://moar.edgecats.net/cats/tumblr_m7z66kARVD1rsqhy9o1_250.gif
20:06 jtpalmer joined #perl6
20:06 Rotwang joined #perl6
20:06 DarthGandalf joined #perl6
20:06 tadzik joined #perl6
20:06 kshannon joined #perl6
20:06 masak TimToady: raiph's request to make unquoting the default feels wrong to me.
20:08 masak I can't pinpoint exactly why, except to note that (a) Lisp has it like we do, with its prefix:<,> for unquoting, and (b) making it unquote-default would require magic. well, more magic. if there's anything we don't need in macros, it's more magic.
20:09 masak re reini's proposal, it may help to read his "macros" section at http://perl11.org/p2/p2-extensions.html
20:09 masak but I think we already have this, and we call it grammars/slangs.
20:10 domidumont joined #perl6
20:15 tadzik1 joined #perl6
20:16 Rotwang1 joined #perl6
20:18 PerlJam masak: raiph's request is to satisfy a different consistency I think:  macros look like subs, so they should act like subs inside and out.  Inside of a sub, you just use the parameters passed, you don't fiddle with their form first.   Maybe the problem is that the params to a macro don't clearly shout "I'm a syntax tree!"
20:20 diakopter masak: actually yeah. to "inline" the parameter syntax tree is to render it with the surrounding
20:21 masak diakopter: what utterance are you responding to?
20:21 PerlJam It seems kind of weird, but I'd almost want a different sigil inside the body of a macro so that I know it's really strange.
20:21 masak PerlJam: a different sigil has been proposed.
20:21 PerlJam good.  :)
20:22 masak PerlJam: actually, the "you just use" semantics is the one that is spec'd/implemented. the instrumentation (all the handling of quasis and ASTs) happens before and after the macro call.
20:22 PerlJam The problem I have with a different sigil that it would be using what's normally a general purpose construct in a highly special-purpose way
20:22 PerlJam but maybe that's part of the allure too.  It let's you know something strange is going on.
20:24 jtpalmer joined #perl6
20:24 DarthGandalf joined #perl6
20:24 kshannon joined #perl6
20:25 vk joined #perl6
20:26 snoopy joined #perl6
20:29 diakopter masak: dies in the compiler:
20:29 diakopter r: say "alive"; macro assign(\a) { sub ($b is rw) { $b = {{{ a }}} } }; my $c; say assign(55)($c); say $c
20:29 camelia rakudo 0c2d61: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
20:31 * masak submits rakudobug
20:37 bruges joined #perl6
20:37 jtpalmer_ joined #perl6
20:40 colomon joined #perl6
20:40 colomon o/
20:40 dalek nqp: eceeed3 | (Solomon Foster)++ | t/jvm/06-sprintf.t:
20:40 dalek nqp: Fix incorrect tests, add tests for e-20 in %g.
20:40 dalek nqp: review: https://github.com/perl6/nqp/commit/eceeed3fb0
20:40 dalek nqp: 7a54232 | (Solomon Foster)++ | src/HLL/sprintf.nqp:
20:40 dalek nqp: Fix bugs in %g.
20:40 dalek nqp: review: https://github.com/perl6/nqp/commit/7a5423223d
20:40 jlaire joined #perl6
20:41 DarthGandalf joined #perl6
20:41 kshannon joined #perl6
20:42 dalek roast: 839c3c3 | (Solomon Foster)++ | / (3 files):
20:42 dalek roast: Unfudge for Rakudo.jvm.
20:42 dalek roast: review: https://github.com/perl6/roast/commit/839c3c3e50
20:42 colomon that's another 32 or 40 passing tests for jakudo.
20:43 colomon rn: printf('%7.3g', 0)
20:43 camelia rakudo 0c2d61, niecza v24-86-g39ab531: OUTPUT«      0»
20:43 colomon n: printf('%7.3g', 3e20)
20:43 camelia niecza v24-86-g39ab531: OUTPUT«  3e+20»
20:44 colomon guess making that work is my next goal….
20:45 [Coke] jnthn: there, we're removing some of the fudges. ;)
20:45 jnthn \o/
20:45 colomon that was all of the fudges, I think.
20:45 colomon from sprintf,t, I mean.
20:45 notjack given the advent of MoarVM: is Parrot defunct?
20:46 * colomon is kind of anti-fudge in this case, too...
20:46 [Coke] notjack: We're still targetting parrot as a backend, and have no plans to remove it.
20:47 [Coke] there are 3 main reasons for the fudging: avoiding backsliding (not as important); run tests that we would otherwise never get to because of an abort() failure that killed the test; pass tests that rakudo.jvm passes but rakudo.parrot doesn't.
20:52 [Coke] just trying to keep things moving.
20:59 [Coke] https://gist.github.com/coke/5879701 - updated; format is in transit.
20:59 woolfy1 joined #perl6
21:01 [Coke] one more update to include the todoss
21:02 Ben_Goldberg joined #perl6
21:02 woolfy joined #perl6
21:04 spock joined #perl6
21:04 BenGoldberg joined #perl6
21:05 [Coke] one more update to include the failures from the test summary run
21:05 census joined #perl6
21:15 lue joined #perl6
21:38 masak notjack: note that MoarVM does not yet bootstrap NQP, much less run Rakudo.
21:39 masak [Coke]++ # https://gist.github.com/coke/5879701
21:43 bluescreen10 joined #perl6
21:45 FROGGS_ [Coke]++
21:47 jnthn [Coke]++ indeed.
21:47 timotimo truly so
21:48 BenGoldberg This is going to sound like a silly question, but how hard would it be to replace certain common methods which return strings (such as $foo.perl) with versions which optionally take a prefix argument (which would default to '')?  This way, instead of having to write code as "{" ~ $foo.perl ~ "}", one could write $foo.perl("{")~"}", which would probably save a lot of copying.
21:48 [Coke] oh, I got sidetracked and never got shell-with-env vars working. hurm.
21:48 timotimo BenGoldberg: that seems smelly to me
21:48 [Coke] BenGoldberg: that saves one character.
21:48 timotimo i think concat is the better way to do it; and on the way there, why not turn ~ into a list op as well ...
21:49 jnthn STD has it as a listop
21:49 jnthn uh, kist assoc
21:49 jnthn list
21:49 timotimo er, list assoc is what i meant of course
21:50 [Coke] r: use MONKEY_TYPING; augment class Str { method bracify() { return "{" ~ self ~ "}" } } ; say "something".perl.bracify
21:50 camelia rakudo 0c2d61: OUTPUT« ~ self ~ ␤»
21:50 jnthn hehe
21:50 jnthn Try ' :)
21:50 timotimo oh whoops :D
21:51 masak That Probably Didn't Mean What You Thought It Would(TM)
21:51 timotimo personally, i'd just interpolate.
21:51 timotimo hm, no, that doesn't look very nice
21:51 dalek rakudo/nom: 29a2480 | (Elizabeth Mattijsen)++ | src/core/Any.pm:
21:51 dalek rakudo/nom: Slight optimization in .join, as suggested by jnthn++
21:51 dalek rakudo/nom:
21:51 dalek rakudo/nom: Doesn't make "say $*VM" much faster, need more in the range of 10000 elements
21:51 dalek rakudo/nom: to join before it becomes noticeable.  And then only about 5%.
21:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/29a2480a50
21:52 timotimo lizmat: can you try looking into making ~ a list assoc operator? i may or may not have a branch that you can look at, hold on
21:54 timotimo https://github.com/timo/rakudo/tree/fast_tilde - here's two commits for that, but they don't work correctly
21:55 vk joined #perl6
22:01 kst joined #perl6
22:01 lizmat looking
22:05 timotimo it's not much, but it should point you at the right places so far
22:05 timotimo alternatively, if that approach turns out not to work at all for some reason, the optimizer could handle that stuff.
22:09 konundra joined #perl6
22:15 masak http://morsmachine.dk/go-scheduler # looks nice, and could be interesting for our future parallel/conc/async champion, as yet unidentified
22:16 lizmat perhaps add mention of it to S17 ?
22:16 lizmat is there a reason why we put spaces in .perl representations?
22:16 lizmat r: say (1,2,3,4).perl
22:16 camelia rakudo 29a248: OUTPUT«(1, 2, 3, 4)␤»
22:17 lizmat for .gist I could see that, but for .perl ?
22:17 felipe joined #perl6
22:17 masak lizmat: I had always assumed it represents "lowest common denominator Perl 6 code".
22:17 masak and such code is written with spaces.
22:21 lizmat that's not how I read S02:1992
22:21 synopsebot Link: http://perlcabal.org/syn/S02.html#line_1992
22:21 masak synopsebot: why, thank you :)
22:22 masak lizmat: I see nothing specific there to contradict what I said about .perl
22:23 diakopter masak: that's an interesting article (go)
22:24 lizmat it should be enough to roundtrip with eval(), nothing about readability
22:25 diakopter masak: so far (2/3 of the way through it) the design is identical to how I was going to do it in moarvm; we already have M,G; libuv event loop would be the P
22:25 masak diakopter: there's a HN thread about it too: https://news.ycombinator.com/item?id=6012392
22:25 masak diakopter: nice!
22:26 diakopter we weren't going to have scheduling points, however, necessarily
22:28 lizmat this seems counter intuitive: $ time perl6 -e 'my $p=""; $p ~= $_ for 1..100000' (user 0m4.441s) versus $ time perl6 -e 'my $p=""; $p = $p ~ $_ for 1..100000' (user 0m3.462s)
22:29 lizmat aka $p = $p ~ "foo" is faster than $p ~= "foo" ?
22:30 jnthn Believable. Sounds like we need a smarter optimizer...
22:31 skids joined #perl6
22:31 diakopter also a smarter optimizerer ;)
22:32 jnthn :P
22:32 lizmat I mean, if ~= is just sugar for p = p ~ , then they should be more or less the same, right
22:32 lizmat ?
22:32 jnthn It's not "just sugar" today, it's a METAOP_ASSIGN call, iirc.
22:32 lizmat aha, that makes sense
22:33 diakopter lizmat: do they both scale linearly?
22:33 timotimo the metaop_assign cannot be compile-time-evaluated?
22:33 timotimo maybe it just needs an "is pure" or something?
22:34 lizmat I guess this goes back to operators being methods again?
22:34 jnthn No, they're multi-subs
22:34 lizmat diakopter: not sure what you mean
22:34 jnthn It's all flattenable in the optimizer. It's just not smart enough to do it yet.
22:34 masak which should be very inlinable.
22:34 jnthn Giving the optimizer some more cycles is on my todo list...like many other things :)
22:35 jnthn Maybe add that particular issue to the optimizer section in ROADMAP
22:35 lizmat I was wondering why Parcel.perl was written the way it was…  now I know  :-)
22:35 diakopter lizmat: moving from 100000 to 300000 iterations is roughly the same time difference as moving from 300000 to 500000
22:36 lizmat yes, that's roughly true, at least on my MBP with plenty of RAM
22:40 FROGGS_ gnight pals
22:40 masak 'night, FROGGS_
22:41 lizmat gnight FROGGS
22:45 woolfy1 joined #perl6
22:47 lizmat gnight #perl6!
22:47 jnthn 'night lizmat
22:51 arlinius joined #perl6
23:00 berekuk joined #perl6
23:08 ilogger2 joined #perl6
23:25 jnthn 'night, #perl6
23:26 timotimo night jnthn!
23:26 masak 'night, jnthn!
23:27 markov joined #perl6
23:29 eternaleye joined #perl6
23:32 masak 'night, #perl6 :)
23:32 timotimo night masak
23:36 * timotimo tries make spectest with all METAOP_* marked "is pure"
23:37 timotimo aaw, that didn't change the way ~= works
23:40 timotimo oh, perhaps &infix:<~> doesn't pass the *.has_compile_time_value? or perhaps because it's *.named it won't resolve?
23:42 nwc10 joined #perl6
23:43 * timotimo realizes testing it on the jvm will be faster, but not give accurate results WRT regressions >_>
23:44 avar joined #perl6
23:44 avar joined #perl6
23:46 jnthn joined #perl6
23:46 [Coke] ff~.
23:47 markov joined #perl6
23:50 timotimo [Coke]: hate it when that happens!

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

Perl 6 | Reference Documentation | Rakudo