Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-12-03

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:00 lue Added pragmas to that gist.
00:00 xenoterracide joined #perl6
00:00 * lue plans a blog post surrounding that gist some time.
00:01 jnthn FROGGS: Bug exists in socketops.c too
00:02 FROGGS ahh, good that you checked that
00:02 jnthn Searching for u.handle->data shows 'em up.
00:03 jnthn TimToady: Well, we don't know that this is *the* bug, but since it extends the lifetime of standard handles, it correlates well.
00:06 FROGGS it is at least the thing that made me crazy for two or three days now
00:10 jnthn FROGGS: OK. Do you plan to work on it at some point?
00:10 jnthn Or should I put it on my todo list?
00:10 FROGGS jnthn: ahh, I thought you are fixing it atm...
00:11 jnthn Ah, no... :)
00:11 jnthn I already gave up writing code for the day. :)
00:11 FROGGS I can do that I think... just need to figure out what to do :o)
00:11 jnthn Well, the "easy" fix is to just hold the body structure a level of indirection off...
00:11 jnthn Then just point to it from the movable thing.
00:12 FROGGS and the "proper" fix?
00:12 jnthn Might be to look at exactly why the code is stashing the pointer into the body, and see if there's a better design.
00:13 FROGGS k, I'll do that first
00:13 jnthn May turn out that the extra level of indirection is still the best way anyway.
00:13 jnthn I can't tell without diving deeper into it
00:13 rurban1 joined #perl6
00:13 FROGGS ahh, it is used to access the body in a callback
00:13 FROGGS tty_on_read
00:15 jnthn I guessed that much. It's more whey it needs it :)
00:15 jnthn ...I curd have typed that better...
00:15 masak joined #perl6
00:16 TimToady well, that's just tuffet
00:17 zakharyas joined #perl6
00:19 [Coke] lue: "numeral values" -> "numeric values" ?
00:20 lue [Coke]: got it.
00:29 ingy joined #perl6
00:29 pecastro joined #perl6
00:30 FROGGS jnthn: if that is our bug, then should commenting out the offending lines change its behaviour, no?
00:31 jnthn FROGGS: Depends which offenders you mean...
00:31 FROGGS all six occurrences of body->u.handle->data = body
00:32 jnthn But then anything that relies on it being set will crash I guess...
00:33 FROGGS that is what I had expected, but:
00:33 FROGGS --vmlibs=dynext/libperl6_ops_moar.so=Rakudo_ops_init src/gen/m-BOOTSTRAP.nqp
00:33 FROGGS Heap corruption detected: pointer 0x2aeba49ae650 to past fromspace
00:33 araujo joined #perl6
00:34 FROGGS and I reconfigured and built nqp and rakudo
00:34 btyler joined #perl6
00:34 jnthn hm
00:35 ingy jnthn: I got a new eye today
00:36 jnthn ingy: A...new eye?
00:37 * jnthn needs sleep...
00:37 jnthn 'night
00:37 TimToady o/
00:38 lue ingy: look at you, you made jnthn think he's crazy! :)
00:38 ingy cataract surgery
00:38 ingy jnthn: ^
00:39 ingy AND… I just switched to weechat
00:39 ingy big day
00:46 lue .oO(It is surprisingly and unbelievably difficult to find a website that'll print the current NTP time on its page.)
00:48 diakopter FROGGS: I'm curious how much overhead that heap corruption check creates... ;)
00:48 diakopter (hopefully we can remove it someday)
00:49 TimToady obviously not yet :)
00:51 TimToady lue: if they did that, you'd see how much they're cheating with caching :)
00:51 FROGGS ohh, that is interesting
00:51 FROGGS the exploding object is a MVMStaticFrame
00:51 TimK1 joined #perl6
00:52 TimToady well, obviously you need to make it dynamic then :P
00:52 FROGGS dynamite, even
00:57 lue TimToady: you'd think at least one page would think to display it or something. It's generally hard to see if your ntp stuff is actually running.
00:58 xinming joined #perl6
01:05 lue Looking at heredocs, "A null terminating delimiter..." Example of a null-terminating delimiter please?
01:05 TimToady a blank line, basically
01:06 lue so q:to//; ?
01:06 TimToady r: say q:to//␤foo␤␤
01:06 camelia rakudo-parrot 874e35, rakudo-jvm 874e35: OUTPUT«foo␤␤»
01:08 lue r: say q:to//␤foo␤
01:08 camelia rakudo-jvm 874e35: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7_WvuwQ8cZâ�¤Ending delimiter  not foundâ�¤at /tmp/7_WvuwQ8cZ:3â�¤------> [32m<BOL>[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        whitespaceâ�¤        vertical whitespaceâ�¤Â»
01:08 camelia ..rakudo-parrot 874e35: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/YJYlPqo7tiâ�¤Ending delimiter  not foundâ�¤at /tmp/YJYlPqo7ti:3â�¤------> [32m<BOL>[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        whitespaceâ�¤        vertical whitespaceâ�¤Â»
01:10 FROGGS gnight
01:11 timotimo jnthn: it wold have been great if you had mentioned that java code can call back into perl6 code as well
01:12 timotimo i should really get one of these wordpress accounts so i can read all the drafts in the future
01:25 arcterus joined #perl6
01:29 _thou joined #perl6
01:43 daverce joined #perl6
01:49 jnap joined #perl6
01:55 btyler joined #perl6
01:55 raiph joined #perl6
02:01 raiph lue: added a comment to your s15 gist
02:01 raiph s/lue/lue++/
02:04 jnap joined #perl6
02:17 rjbs Somebody please msg me diakopter's email?
02:20 rjbs got it, thanks
02:20 eternaleye joined #perl6
02:22 berekuk joined #perl6
02:27 eternaleye joined #perl6
02:55 japhb__ raydiak: Is your Pray code available anywhere?  I don't see it from your github page ....
02:56 japhb__ And given that I've got a barely contained addiction to optimizing graphics code, I'd love to have a look at what you have so far.  ;-)
02:57 raydiak japhb__: I'm working furiously to make it ready for the public ASAP.  I don't want people to start forking and committing until I have it a little more settled (and I don't want to make a fool out of myself because I'm still learning).  :)
03:00 raydiak did you see the image I put up today w/rudimentary shadows implemented?
03:03 ggoebel111 joined #perl6
03:06 cooper joined #perl6
03:06 cooper joined #perl6
03:06 autumn joined #perl6
03:08 daverce left #perl6
03:09 lue raiph: my definition of ord and chr (and ords and chrs) is based on what Perl 6 already does, that's not my fault :) .
03:09 lue r: say "many letters".ord
03:09 camelia rakudo-parrot 874e35, rakudo-jvm 874e35: OUTPUT«109␤»
03:12 japhb__ raydiak: No, I haven't seen today's image.  Link?
03:12 raydiak japhb__: as far as optimization goes, I haven't done any to speak of so far, it's pretty much just a transliteration of the math into classes and methods with little thought towards performance yet...so there ought to be plenty of fun to be had in that area
03:13 raydiak japhb__: http://cyberuniverses.com/pray/#pray-image-6
03:13 japhb__ :-)
03:13 japhb__ nice
03:14 raydiak thanks :)  the awesome feedback from people is a lot of what has kept the momentum so high on this project
03:15 japhb__ raydiak: BTW, if you haven't already read it, I recommend the book Physically Based Rendering (http://www.pbrt.org/).  I only have the first edition, but I really enjoyed it.
03:16 japhb__ -Ofun is a really strong part of our culture here.
03:16 lue raiph: could you point me to the part of Unicode that guarantees not clashing with 32-bit signed integers? I'm not aware of it off-hand.
03:16 lue (negative signed integers that is)
03:17 japhb__ Oh, and PBRT is the largest and most well written piece of literate programming I've had the joy of reading.
03:19 raydiak japhb__: I noticed the -Ofun...it's quite refreshing (nobody asked me WTF I was doing writing it in the first place).  thanks for the pointer to the book, it sounds right up my alley!  I've been reading about more advanced stuff like that lately (radiosity, lightmapping, volumetric lighting, etc etc)
03:20 raydiak oops, just saw the time!  gotta run!
03:39 colomon joined #perl6
03:47 araujo joined #perl6
04:10 arcterus joined #perl6
04:13 jnap joined #perl6
04:26 segomos thank you guys for not writing a spec like scala's language spec
04:34 dylanwh you're a pal and a confidant
04:39 xinming joined #perl6
04:45 japhb__ segomos: What do you mean?
04:45 TimToady I think that means "Thank you for not writing a spec."  :)
04:45 TimToady we just make suggestions to the people writing the test suite...
04:49 raydiak japhb__: apologies for my sudden departure; was almost late to pick my g/f up after work...I try not to make her wait in December at night alone in the back parking lot of the mall :P
04:51 segomos i mean thank you for the language spec that doesn't read like some comp sci professor wrote it to show new CS students how smart he/she is
04:51 segomos scala's language spec is painful to read
04:52 preflex_ joined #perl6
04:52 segomos perl6's ever changing spec is, at the very least, concise
04:56 lue segomos: I could change S05 to talk about terminals, non-terminals, semi-terminals, hyper-terminals, junctionary terminals, and whatever made up fluff I can come up with if you want, for starters :)
04:56 * lue , needless to say, looks for the scala spec
04:56 segomos https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=5&amp;cad=rja&amp;ved=0CFAQFjAE&amp;url=http%3A%2F%2Fwww.scala-lang.org%2Fdocu%2Ffiles%2FScalaReference.pdf&amp;ei=imSdUo0MgvqgBLaggPgI&amp;usg=AFQjCNHwxfm9PxRh99_Ld9rj6oJnBboKQg&amp;bvm=bv.57155469,d.cGU
04:57 segomos sorry - that is a long link
04:57 TimToady usually better to follow the link and then copy it from the location bar
04:57 lue or don't use Google :)
04:57 segomos yea i noticed :)
04:58 lue (yeesh, apparently gtk's document view (evince was it?) updated since I last used it, now it looks *awful*)
05:00 geekosaur this is the evolution of gtk/gnome in a nutshell....
05:01 lue geekosaur: I don't mind the UI, it just happens to look like crap in places with Greybird. Luckily I use KDE most of time :)
05:01 lue [although whatever update I did apparently broke some settings reading thing. Hopefully a restart that I rarely do will fix it.]
05:01 raydiak wow, I just jumped to a random page in the middle, and the first thing I read is: ""Assume a selection of the form e.x where the type of e conforms to scala.Dynamic.  Further assuming the selection is not followed by any function arguments, such an expression can be rewitten under the conditions given in §6.26"
05:02 * lue should get around to telling GTK to make firefox open pdfs in Okular sometime...
05:02 lue "3.2.10 Existential Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26" Oh no. :)
05:02 * raydiak hides
05:04 * lue wonders what Scala means by not being able to support Unicode codepoints > 0xFFFF
05:04 TimToady it means it uses Java strings
05:06 lue Hang on, I need to restart my computer. That settings bug is being unreasonable ☹
05:10 lue joined #perl6
05:10 lue hello again o/
05:12 dwoldrich joined #perl6
05:12 TimToady sucks to program in Java if you speak Ugaritic...
05:15 lue TimToady: there's no way to generate a unique and static number for every possible non-precomposed grapheme, is there? (i.e. the number of possible graphemes is ∞)
05:17 lue (unless there's some sort of "5 diacritics per character" limit in Unicode I'm unaware of...)
05:18 TimToady well, Int is arbitrarily big, but we're not trying to encode them in an Int, since that wouldn't fit into a native int
05:18 TimToady and string ops have to be fast most of the time, so native is a necessity
05:20 TimToady but if our Int arrays turn out to be super fast, we could reconsider
05:20 TimToady that's a mighty big "if" though
05:21 lue yeah, I was assuming int32 (or int64 if we, say, felt like inventing UTF-64 or something ☺)
05:21 TimToady that would really chew up memory fast
05:21 TimToady 32 is bad enough that way
05:22 lue Oh? I see no problems with U+00000047 :)
05:23 TimToady that would be a G-string
05:23 lue But there's no way to generate a negative number based on the grapheme without eventually running into either a break in the algorithm ("Numbers get too large after 10 combining chars") or just too many possibilities.
05:23 lue At least I don't think.
05:24 TimToady right, that's why we're not doing that
05:24 lue So it's essentially just (0x80000000..0xFFFFFFFF).pick per-process then, right?
05:25 TimToady well, I think we're going with per-string tables to avoid DOS attacks
05:26 TimToady though we could have some shared tables in some implementations
05:27 lue oh? So "ä" and "äb" would have different numbers for ä (assume ä is a generic uncomposable grapheme) then?
05:27 TimToady if we're dealing with a language that has few precomposed graphemes, for instance
05:27 TimToady yes, if you get negatives, you have to do the indirection to compare the actual graphemes, unless you happen to be sharing tables
05:27 lue (That throws a wrench in NFG-level chr() and ord(), though those arguably become needless at the NFG level anyway)
05:28 TimToady yah
05:28 lue .oO( say chr(ord("☃")); # OUTPUT: ☄ (maybe) )
05:29 TimToady we probably just have to force people down to the Uni level for chr/ord processing
05:29 lue The easiest thing to do in that case would be to force codepoints for chr/ord. ...which you just said.
05:29 TimToady or emulate it when used on NFG
05:30 TimToady though again we wouldn't know whether they want NFC or NFD semantics unless they say
05:30 lue Force codepoints within sub chr/ord() { } is what I meant.
05:30 lue TimToady: if it helps, my provisional idea of an S15 says Perl 6 prefers NFC (step down from NFG) whenever NFG doesn't work: https://gist.github.com/lue/7761244
05:30 TimToady but NFC and NFD produce different lists of codepoints, so we either have to assume, or force them to be specific
05:31 * TimToady is biased towards NFC too
05:31 lue (that part is there to take care of  say "NFG string"  and similar, though)
05:32 TimToady but we might end up with a .nfdords or so
05:33 TimToady of course, if NFD is a Buf[Uint32] that already can behave as a list of ords
05:34 TimToady r: "abc".encode('utf8')[1].say
05:34 camelia rakudo-parrot 874e35, rakudo-jvm 874e35: OUTPUT«98␤»
05:34 TimToady much like that
05:34 lue I wouldn't be surprised if we just turn ords and chrs into shorthand to-buf converters or something.
05:34 lue (and from-buf, for chrs)
05:35 TimToady well, I'm not sure a buf will flatten like we want in list context
05:35 lue True.
05:35 TimToady but we'll have to feel our way into it as NFG comes online
05:36 lue (I would prefer .ords(:nfd) to .nfdords by the way. Feels righter. Or perhaps .nfd.ords even)
05:36 TimToady .oO(dfnords)
05:37 * lue feels just a bit proud of himself for the NF pragma's spelling, by the way :)
05:37 * TimToady should read it when his crosses aren't eyeing
05:39 lue Fair enough.
05:41 SamuraiJack_ joined #perl6
05:42 zakharyas joined #perl6
05:42 lue .oO(There's a weird intersection between the NF* / buf division of viewpoints and the graphs/codes/units/bytes division of viewpoints, from what I've noticed.)
06:11 kaare_ joined #perl6
06:24 synopsebot joined #perl6
06:25 darutoko joined #perl6
06:25 rurban1 joined #perl6
06:47 w0rm_x joined #perl6
06:47 w0rm_x Hello.
06:49 Rix joined #perl6
06:53 kaleem joined #perl6
07:26 rurban1 joined #perl6
07:39 denis_boyun joined #perl6
07:50 timotimo o/
07:51 jnap joined #perl6
08:07 Rix joined #perl6
08:10 felher Ui, already three advents post. Hip Hip Array! moritz++ masak++ jnthn++
08:13 FROGGS TimToady: are you going to write something for the calender?
08:22 huf joined #perl6
08:29 moritz \o morning
08:30 FROGGS morning moritz
08:30 Woodi morning :)
08:31 timotimo earthings, fellow greetlings!
08:31 FROGGS hi Woodi :o)
08:32 Woodi I have long awaiting request for a post or documentation: a pictures of Perl6/nqp/moar internals (usually ractangles :)
08:32 FROGGS Woodi: moritz updated an svg a few months ago
08:32 moritz Woodi: you mean like docs/architecture.svg in the rakudo repo?
08:32 nwc10 +--------------+
08:32 nwc10 | Clever stuff |
08:32 nwc10 +--------------+
08:32 timotimo there's pictures in jnthns slides about moarvm and friends
08:32 nwc10 there, done.
08:33 nwc10 actually,
08:33 FROGGS Woodi: https://raw.github.com/rakudo/rakudo/nom/docs/architecture.svg
08:33 FROGGS nwc10++
08:34 moritz but, bringing that to an advent calendar post wouldn't hurt
08:34 nwc10 actually, I have a better one:
08:34 nwc10 +-------------------------------------------+
08:34 nwc10 | Just code (mostly Perl 6, so take a look) |
08:34 nwc10 +-------------------------------------------+
08:35 tadzik it may be helpful to have a kind of data flow diagram, showing how code text goes in and program output gets out
08:35 tadzik how it goes to HLL::Compiler, then Grammar, Actions, backend, and execution in setting's context, or so
08:38 FROGGS tadzik++ # go ahead!
08:38 FROGGS I'd like to have that too
08:39 moritz well, with the exception of HLL::Compiler, that's what architecture.svg shows
08:39 Woodi I was not aware of this, checking
08:40 Woodi ee, my browser shows  <?xml version="1.0" encoding="UTF-8" standalone="no"?> .......... :)
08:40 raydiak Woodi: save it and view it locally
08:41 Woodi I know :)
08:42 raydiak sorry, of course. it's late, I'm not thinking clearly.
08:42 moritz raydiak: don't apologize for helping
08:45 raydiak I find "helping" and "condescending" to be a blurry line, wanted to make sure I don't come off on the wrong side of it :)
08:45 brrt joined #perl6
08:46 moritz raydiak: that's a good attitude, right
08:46 Woodi I just thinked firefox know about svg format...
08:47 tadzik github probably doesn't send proper content-type for that
08:47 moritz raydiak: speaking of good, have you decided on a day to write for the advent calendar? :-)
08:47 raydiak Woodi: github does it on purpose in the HTTP headers so people don't use it to host web content and such
08:48 moritz and, very importantly, so that browsers don't act on active content while having the github cookie set
08:48 Woodi they do not want to expand to new teritories ? creating social portal or something ? in 2013 ?? ;)
08:49 moritz that's what the github.io domain is for
08:53 hummeleB1 joined #perl6
08:54 raydiak moritz: indeed, I'm down for day 8...looking forward to researching and writing it; thanks for encouraging me to do it!
08:54 FROGGS raydiak++ # \o/
08:55 tadzik nice!
08:55 Woodi got Inscape portable. btw. I wondered about Rakudo-windows-portable but later I stop thinking it is good idea. Just share...
08:56 FROGGS errm
08:56 FROGGS tadzik: you forgot to pick your days :o)
08:56 moritz raydiak: ah great, I hadn't seen your commit
08:56 lizmat joined #perl6
08:57 moritz raydiak: are you also writing about your ray tracer? that would be really, really cool
08:57 tadzik FROGGS: yeah, I couldn't figure out what to write about
08:57 tadzik I was embarassingly inactive this last year
08:57 FROGGS Woodi: IIRC parrot is not very portable... but hopefully we get the jvm/moar backends to be portable so we can release a usb-stick version
08:57 FROGGS hmmm
08:58 raydiak moritz: Hah!  Never even occurred to me!
08:58 moritz making nqp-j and rakudo-j relocatable shouldn't be too hard
08:58 moritz raydiak: we're always happy to hear/read about Perl 6 being actually used :-)
08:58 Woodi architecture.svg is general view. I thinked about something more detailed what can help new developers to dig into code...
08:59 tadzik Woodi: do you have a particular need here, like "I'd like to dig into this part, but I don't know how or where?"
09:01 raydiak moritz: that was one of my big goals for Pray, a real working p6 app, today...and a flashy one at that, I hope by the time I'm done
09:01 FROGGS moritz: and once we have S11 module repositories these are movable too
09:11 xinming joined #perl6
09:12 kivutar joined #perl6
09:15 hoelzro morning #perl6
09:15 FROGGS hi hoelzro
09:16 arnsholt It should be possible to bundle NQP/Rakudo as a single runnable JAR
09:16 arnsholt That'd be pretty cool, actually
09:19 lizmat_ joined #perl6
09:19 tadzik aww yiss
09:25 grep0r joined #perl6
09:27 carlin joined #perl6
09:28 rurban1 joined #perl6
09:28 FROGGS r: say 4 x "." ~ "{"
09:28 camelia rakudo-parrot 874e35: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/F9iG2RVvd8â�¤Unable to parse expression in double quotes; couldn't find final '"' â�¤at /tmp/F9iG2RVvd8:1â�¤------> [32msay 4 x "." ~ "{"[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        s…»
09:28 camelia ..rakudo-jvm 874e35: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/p76cFcf9qQâ�¤Unable to parse expression in double quotes; couldn't find final '"' â�¤at /tmp/p76cFcf9qQ:1â�¤------> [32msay 4 x "." ~ "{"[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        stat…»
09:29 FROGGS r: say 4 x "." ~ '{'
09:29 camelia rakudo-jvm 874e35: OUTPUT«Cannot convert string to number: radix point must be followed by one or more valid digits in '.⏏' (indicated by ⏏)␤  in sub infix:<x> at gen/jvm/CORE.setting:1395␤  in block  at /tmp/NWhf5IlxyO:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤ …»
09:29 camelia ..rakudo-parrot 874e35: OUTPUT«Cannot convert string to number: radix point must be followed by one or more valid digits in '.⏏' (indicated by ⏏)␤  in method Int at gen/parrot/CORE.setting:12012␤  in method Int at gen/parrot/CORE.setting:5447␤  in sub infix:<x> at gen/parrot…»
09:29 FROGGS r: say "." x 4 ~ '{'
09:29 camelia rakudo-parrot 874e35, rakudo-jvm 874e35: OUTPUT«....{␤»
09:29 FROGGS k
09:31 raydiak moritz: how's this for an idea? if all goes smoothly and there is still an opening in the schedule when the code is ready, I'll write another advent post, about Pray, which will also be the release announcement
09:32 raydiak I hesitate to advertise it too much before it is "real" in the sense that programmers expect there to be...you know...a program :)
09:32 arnsholt Actually, a single runnable JAR should maybe be our build product on JVM anyways
09:34 w0rm_x joined #perl6
09:34 moritz raydiak: sounds good
09:36 dakkar joined #perl6
09:40 xinming joined #perl6
09:44 diakopter whoa; who has access to my email that they can forward it to rjbs??!?!
09:46 moritz diakopter: I have access to your email address, but not to your email account :-)
09:46 moritz diakopter: but I'm not quite sure what you actually want to know
09:46 * diakopter runs away screaming
09:47 diakopter sry; being silly. will desist.
09:48 mudler joined #perl6
09:48 timotimo hoelzro: +1 on persisting on perl6 support on github >_>
09:51 tadzik diakopter: how was lpw?
09:53 jnap joined #perl6
09:53 hoelzro it's silly how long it's taken
09:53 timotimo yes.
09:54 timotimo it's like ... hey please click this button for us.
09:54 timotimo yeah we'd all appreciate it!
09:54 timotimo hey, how about clicking that button?
09:54 timotimo you know, the one that does everything for us? it would be a great help!
09:54 hoelzro I've even done the work for them!
09:54 timotimo hey, look, we made the continuous integration happy!
09:54 tadzik clickthatbutton.js
09:55 timotimo obviously we have to find a way to h3x0r github.com into merging that pull request
09:55 timotimo social engineering didn't work so far
09:55 tadzik we can contact the rails exploiter guy ;)
09:55 hoelzro hehe
09:56 diakopter yeah but just think if theyadded every language with >40 users... the list would be way too long
09:57 moritz there are 136 members in the 'perl6' team of the 'perl6' organization
09:58 tadzik well, the list is way long anyway
09:58 tadzik I don't know what Augeas, BlitzMax or Bro are, and I didn't even scroll very far
09:59 moritz Bro is for brogrammers, no? :-)
09:59 timotimo .o( bilbro swaggins )
09:59 tadzik also, they have 3 different languages related to Parrot
09:59 tadzik Parrot, PASM, PIR
10:00 tadzik whatever "Parrot" is
10:00 timotimo anything with the name /usr/bin/parrot
10:01 kaare_ joined #perl6
10:03 diakopter parrot parrots your parrot
10:04 timotimo it's just parroting for the fjords
10:05 timotimo (starring Parrotson Fjord)
10:06 FROGGS >.<
10:07 cognominal joined #perl6
10:12 Alina-malina joined #perl6
10:13 timotimo (also starring AwardBIOS-winning actress Demi Moar)
10:15 FROGGS /o\
10:15 tadzik bazinga!
10:22 FROGGS hint: neeeeeeeeonggg
10:23 tadzik I wish I could asciify the inhale-laugh
10:24 FROGGS seen that episode yesterday evening :o)
10:24 tadzik https://www.youtube.com/watch?v=O12ZNxm7EUs#t=15
10:24 tadzik it's like dog sniffing sound
10:28 timotimo hm
10:32 rindolf joined #perl6
10:33 jnthn ohhai o/
10:33 FROGGS jnthn: o/
10:35 masak ohhai \o
10:36 FROGGS jnthn: I've pasted three interesting lines to #moarvm yesterday evening
10:36 masak FROGGS: a choo-choo train?
10:36 FROGGS a what?
10:37 FROGGS what have I done wrong now?
10:37 masak <FROGGS> hint: neeeeeeeeonggg
10:37 FROGGS ahh, hehe
10:37 FROGGS masak++
10:37 masak :)
10:38 nwc10 good UGT, jnthn
10:38 baest joined #perl6
10:38 tadzik I like trains
10:38 masak tadzik: in Soviet Russia, trains like you!
10:39 tadzik neeeong
10:41 masak w0rm_x: hello! welcome!
10:41 fhelmberger joined #perl6
10:42 tgt joined #perl6
10:46 mathw good $whenever-it-is
10:46 masak antenoon!
10:46 mathw whatever
10:47 masak good *, mathw
10:47 mathw Oh wait I do care, because if it's the afternoon that means it's approaching time for a musical evening of fun
10:48 mathw hi masak
10:49 masak I find the "musical evening of fun" to be a much more successful concept than either "musical evening of pain" or "musical evening of duck sauce"
10:49 mathw my local .pm group's going to start having tech talks
10:49 masak ooh
10:49 mathw the organiser was worried about interest. So far it looks like almost everyone's volunteered to give one
10:49 masak yay
10:49 mathw not sure if anybody wants to *listen*
10:49 mathw but we all like to talk, apparently :)
10:49 masak was gonna say :)
10:49 masak at least there'll be a speaker :)
10:50 mathw and yes, a musical evening of fun is better than a musical evening of pain
10:50 mathw I had a non-musical evening of pain last night
10:50 masak that's like, the worst combination.
10:50 masak pain *and* no music!
10:51 mathw well, it was aikido
10:51 masak oh.
10:51 mathw so this is sort of expected when you check the week's schedule and it says "Monday: ikkajo and self defence"
10:51 mathw it's the latter part that hurts
10:53 mathw but I was the only person last night to defeat the chief instructor's "you can't do katate mochi ikkajo osae ichi" game :)
10:54 * masak can't even say "karate mochi ikkajo osae ichi" :)
10:54 mathw katate
10:54 w0rm_x masak, I recently started to take a look at perl 6 (I never used perl before so I dont know perl 5), specially the syntax. The surprise was that it has couple of things that I wish it existed in a language. But from what I have been reading it isn't ready yet.
10:54 mathw karate is different :)
10:54 masak mathw: see? my point exactly.
10:54 masak mathw: I can't even say it.
10:54 masak :P
10:54 masak w0rm_x: it's not ready for everything, no.
10:55 masak w0rm_x: we're working on it.
10:55 mathw Actually I'm hoping somebody has some wisdom about generating documents for print
10:55 slavik joined #perl6
10:56 mathw w0rm_x: it might be ready, depending on exactly what you want to do with it. There's a lot it can do, but it might not be able to do it quickly enough for you, for example.
10:56 masak w0rm_x: the short story is: it's slow, sometimes unstable, and the documentation story is so-so.
10:56 mathw Or there might not be libraries you need, and you can't write them yourself for whatever reason
10:56 masak w0rm_x: but we like the language, the community is great, there are many examples, and people are really willing to help.
10:57 masak compared to Perl 5's CPAN, we're not very far along on modules.
10:57 masak those that exist can be seen at modules.perl6.org
10:58 w0rm_x masak, slow & unstable; for all the implementations? There are few of them from what I read.
10:58 masak w0rm_x: there is one in the lead: Rakudo.
10:59 masak w0rm_x: Rakudo currently targets Parrot and the JVM.
11:00 slavik joined #perl6
11:00 w0rm_x masak, does that mean Rakudo has to be re-written in some way to improve speed?
11:02 masak w0rm_x: yes and no. there are no big refactors on the horizon.
11:02 jnthn Rakudo is in decent shape architecturally, but it needs to be optimized, and to learn how to better optimize Perl 6 code.
11:02 masak w0rm_x: but there is work to be done on optimizing.
11:02 masak what jnthn said.
11:02 mathw It's been more about making things work than making things fast, so far.
11:02 w0rm_x Ah ok.
11:03 masak w0rm_x: the one in second place, Niecza, is no longer in active development. but it has a fair amount of features, and it's decently fast.
11:03 masak Niecza runs on the CLR.
11:05 w0rm_x Fair enough. Thanks for the clarifying things.
11:08 * mathw starts wondering about calling Clojure libraries from Rakudo-JVM
11:08 mathw probably need some sort of adapter interface to make them look less weird
11:08 mathw and macros might be a problem
11:08 mathw ('might', hah)
11:09 arnsholt Well, we'd be limited to whatever's callable from ordinary Java code
11:10 arnsholt Somehow, I doubt macros are part of that =)
11:14 slavik joined #perl6
11:16 mathw Generally Clojure programmers jump through a few hoops to make anything callable from Java at all
11:16 mathw Or at least, anything callable without the Java programmers going mad
11:17 mathw I'll have to look into it when I've got time. It's not like Rakudo has an entirely happy story about calling Java libraries yet anyway.
11:24 colomon joined #perl6
11:40 timotimo w0rm_x, ooc what language(s) did you come from?
11:40 timotimo i went straight from python to p6 :)
11:42 timotimo maybe today i will look into the java calling thing
11:42 w0rm_x timotimo, some of Lisp dialects, Haskell, C/C++. I tried Python before, nothing serious though.
11:43 timotimo i may be able to make methods that have unique arity callable without the wursyt
11:43 timotimo wurst
11:48 timotimo as a haskeller, can you tell me if the ADT module i built is okay?
11:49 jnthn timotimo: Saussage? :)
12:03 timotimo yup
12:03 timotimo the java method identifier string sausage
12:06 timotimo jnthn: except when i first looked at the code i didn't see an obvious method to create the dispatchers or to do a dispatching
12:10 timotimo i guess computeInterop does that
12:11 timotimo and the for loop that iterates over the names.entrySet bails out if it finds duplicates, otherwise creates a short-named method
12:12 timotimo now all i have to figure out, i guess, is how to make proto/multi methods while inside java code :\
12:12 jnthn Yeah, https://github.com/perl6/nqp/blob/master/src/vm/jvm/runtime/org/perl6/nqp/runtime/BootJavaInterop.java#L266 is the line that spots the dupe and makes sure we don't get shortname methods...
12:12 jnthn I don't think you want to do it that way.
12:12 timotimo fair enough. alternatives?
12:13 timotimo should i create a method that takes a capture and manually dispatches for the arity?
12:13 jnthn I was "just" going to generate a method that does something like that, yeah.
12:13 jnthn I mean, you just do it with the normal args processing things available in Ops
12:14 jnthn Trouble is that it's createAdaptor that probably needs to be updated...
12:14 jnthn As that's where you have chance to generate stuff.
12:14 jnthn So I guess it needs detecting in there...
12:14 timotimo mhm
12:15 arnsholt And Java dispatches methods statically rather than at run-time. There may be some dragons lying in wait for users there as well
12:17 timotimo what do i have to search for to find a specification for the name format they use?
12:17 arnsholt I can't remember. I found it at some point
12:17 arnsholt It might have been somewhere in the JVM spec
12:18 arnsholt (Not the Java spec, mind, but the JVM one)
12:18 timotimo mhm
12:18 dalek nqp/indy-args: a7f2425 | jnthn++ | src/vm/jvm/ (4 files):
12:18 dalek nqp/indy-args: Special-case one object arg case of invocation.
12:18 dalek nqp/indy-args:
12:18 dalek nqp/indy-args: Many method invocations where no extra parameters look like this, such
12:18 dalek nqp/indy-args: as almost all grammar rule invocations.
12:18 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/a7f24251b0
12:18 dalek nqp/indy-args: 343fb95 | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
12:18 dalek nqp/indy-args: Unbust Rakudo after indy arg handling work.
12:18 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/343fb9557b
12:19 timotimo i think i see it
12:19 timotimo jnthn: ooooh, rakudo compiles again with the branch?
12:19 jnthn Yeah
12:19 timotimo cool!
12:20 timotimo i'll measure stage compile timings :)
12:20 timotimo er, stage parse
12:20 timotimo since the action methods should be invoked much faster now?
12:20 jnthn No, not actions yet; those are obj,obj
12:20 jnthn I may special-case that path next.
12:20 jnthn But I've not really wired up all the goodness yet...
12:20 timotimo oh
12:21 timotimo hm, ok :(
12:21 jnthn Almost all the grammar rule invocations are improved in this regard, though
12:21 jnthn So it should help a bit on that front.
12:21 preflex_ joined #perl6
12:23 timotimo so stuff I need to parse looks like '(' [ '['* <[BCDFIJSZ]> | 'L' .*? ';' ]
12:23 timotimo er, with a * at the end
12:24 timotimo what mechanism should i be using for that in java-space? seems like a very simple finite automaton that feeds a counter would suffice
12:24 jnthn Well, I think you can do it off the normal reflection objects rather than parsing?
12:25 timotimo oh, well that would certainly be nice :)
12:25 atroxaper joined #perl6
12:26 colomon joined #perl6
12:28 timotimo i can't find documentation for ClassContext
12:28 timotimo oh
12:28 timotimo of course not
12:38 masak of course not?
12:41 timotimo yeah, it's declared in the same file :)
12:41 timotimo it's not something java offers
12:41 timotimo jnthn: should i worry about var-args methods?
12:44 jnthn Eventually perhaps...
12:44 timotimo for now i'll just poison a method name if there's a method with var args with that name i guess
12:45 arnsholt Java varargs are equivalent to a single last argument which is Something[], aren't they?
12:45 pecastro joined #perl6
12:45 timotimo maybe
12:45 dalek nqp/indy-args: 7e17160 | jnthn++ | src/vm/jvm/ (3 files):
12:45 dalek nqp/indy-args: Also special-case (obj,obj); also very common.
12:45 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/7e17160ac6
12:45 jnthn arnsholt: yes
12:48 dmol joined #perl6
12:48 kivutar joined #perl6
12:54 timotimo i think i found the right datastructure for the arity stuff
12:55 * masak .oO( an ar-ray ) :P
12:55 timotimo aharr!
12:55 timotimo nope, in this case a hashmap of hashmaps
12:56 timotimo though the inner one is a hash from integer to string, so it could just as well be a list.
12:56 masak but I guess it would be sparse?
12:56 timotimo yes
12:56 jnap joined #perl6
12:56 timotimo but also: i need to differentiate between "i haven't seen a method with this arity yet" and "i have seen more than one method of this arity"
12:57 timotimo the former is a missing key, the latter is a key that has "null" as its value at the moment
12:57 jnthn timotimo: Keep in mind that we want to also do this by type later on too...
12:57 hoelzro anyone going to FOSDEM 2014?
12:57 dmol joined #perl6
12:57 hoelzro trying to decide whether or not to go
12:58 jnthn hoelzro: I'm planning to go
12:58 jnthn timotimo: So good to pick something that'll let us keep the things of different arities around for the future...
12:58 timotimo hm, aye
12:59 dmol joined #perl6
13:02 hoelzro cool, I can pick your brain ;)
13:03 lizmat_ hoelzro: on the Sat we'll have a Perl devroom with probably a lot of Perl 6 talks  :-)
13:03 hoelzro \o/
13:03 lizmat_ on both days, we will have a Perl booth also
13:06 tangentstorm joined #perl6
13:07 timotimo i suppose a List<String> instead of String will already do the trick
13:10 denis_boyun joined #perl6
13:10 timotimo does java have the [] syntax for hashmaps?
13:11 jnthn No
13:11 timotimo hm
13:11 timotimo i suppose the answer to all questions of the kind "does java have $SYNTAX for $THING" is "no"
13:17 timotimo oof.
13:17 timotimo if a HashMap has a .size of 1, how do i get the only value out of it without a thousand lines of code?
13:18 timotimo i guess .values.toArray(new *magical type here*)[0] would work
13:19 denis_boyun joined #perl6
13:22 jnthn Isn't there a way to get the list of values? .values() or so?
13:23 arnsholt .values().get(0) innit?
13:23 timotimo oh
13:24 timotimo Collection doesn't have .get
13:24 arnsholt Huh. Indeed it doesn't
13:25 arnsholt toArray()[0] is probably it, in that case
13:25 timotimo oh well.
13:26 arnsholt If you know the type of the collection toArray(new TheThingCollected[0]) gets you a typed array
13:27 timotimo i have to [0] that?
13:28 arnsholt Yeah
13:28 timotimo OK, thanks!
13:28 arnsholt It'll just get you an object of the right type, rather than just an Object
13:28 timotimo i'll have a prototype that prints out diagnosis text if it thinks it can generate an arity-unambiguous dispatcher
13:29 timotimo if there's like 5 arities for a method and only one of them has ambiguous calling possibilities, should i generate a dispatcher for the other 4, or no dispatcher at all?
13:30 tangentstorm any chance we could get camelia to join #learnprogramming?
13:30 timotimo you're teaching perl6 in #learnprogramming? :)
13:31 tangentstorm well, there's a guy studying perl... don't know which version. :)
13:31 moritz tangentstorm: is that on freenode too?
13:31 timotimo glomp him at once! ;)
13:31 tangentstorm moritz: yeah... it's the irc channel for http://reddit.com/r/learnprogramming/
13:32 tangentstorm we have a j bot and used to have a haskell bot.
13:33 camelia joined #perl6
13:33 dalek evalbot/host07: 2b7d4c6 | moritz++ | freenode.org.conf:
13:33 dalek evalbot/host07: join #learnprogramming (for tangentstorm++)
13:33 dalek evalbot/host07: review: https://github.com/perl6/evalbot/commit/2b7d4c6cc3
13:33 moritz EWRONGBRANCH
13:34 dalek perl6-roast-data: 3a8cbed | coke++ | p (2 files):
13:34 dalek perl6-roast-data: today (automated commit)
13:34 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/3a8cbedeb4
13:34 dalek evalbot: aa7a8c9 | moritz++ | freenode.org.conf:
13:34 dalek evalbot: join #learnprogramming (for tangentstorm++)
13:34 dalek evalbot: review: https://github.com/perl6/evalbot/commit/aa7a8c9463
13:35 jnthn timotimo: I'd generate it for the other 4...seems more useful :)
13:36 jnthn timotimo: And maybe even throw on the ambig cases saying "use X or Y to be clear which you mean" so people can even copy-paste the descriptors :)
13:40 tangentstorm moritz: thank you! :)
13:40 moritz tangentstorm: you're welcome
13:43 timotimo jnthn: that would be fantastic
13:45 btyler joined #perl6
13:45 timotimo jnthn: i'll have to generate jvm bytecode for a bunch of ifs and then invokedynamic/invokestatic?
13:47 jnthn Sounds about right...I guess invokestatic or invokevirtual as you want to end up in the generated adaptor...
13:50 timotimo oh, yes
13:50 ajr joined #perl6
13:54 timotimo src/vm/jvm/runtime/org/perl6/nqp/runtime/BootJavaInterop.java:269: error: generic array creation List<String> matching_descriptors = descriptors_by_arity.values().toArray(new List<String>[0])[0];
13:54 timotimo hum
13:57 lizmat looking at lue's S15 proposal
13:58 lizmat I can't help but wonder whether we wouldn't need a "pragma" statement in the family of package/class/module
13:58 lizmat and then only allow "yes" and "no" to call pragma's
13:58 lizmat in order to avoid confusion between pragma's and "real" modules
13:59 lizmat so, for "no warnings" there wouldn't be a diff
13:59 lizmat and instead of "use warnings", one would say "yes warnings"
14:00 lizmat thereby separating the loading code functionality from tweaking compile time settings
14:00 lizmat and run time settings
14:01 lizmat core pragma's wouldn\'t need to be loaded, user defined pragmas would need a 'use' statement once in the outer scope where they're used
14:02 lizmat TimToady: would that make sense ?
14:02 lizmat initially, I thought "ok" instead of "yes", but that would wreak havoc on the test-suites
14:03 lizmat so: "ok warniings" if you want warnings enabled, "no warnings" if you don't
14:03 ajr_ joined #perl6
14:05 timotimo huh, isn't this supposed to be fixed? Unhandled exception: java.lang.NoSuchMethodError: org.perl6.nqp.runtime.Ops.printfh(Lorg/perl6/nqp/sixmodel/SixModelObject;Ljava/lang/String;Lorg/perl6/nqp/runtime/ThreadContext;)Ljava/lang/String;
14:06 FROGGS timotimo: now I've seen that twice in 24 hours on this channel...
14:08 lizmat commuting to Amsterdam.PM meeting&
14:08 moritz timotimo: I've send you an invitation to the calendar
14:08 timotimo an invitation?
14:09 jnthn timotimo: stage0 is still using it I guess...
14:09 moritz timotimo: an email with a link where you can get an account as editor
14:09 timotimo oh cool!
14:09 moritz timotimo: so that you can preview and write posts :-)
14:09 moritz anybody else want/need one?
14:09 timotimo thanks
14:10 timotimo oh, i already seem to have an account!
14:12 moritz with the same email address?
14:13 PacoAir joined #perl6
14:14 timotimo no, but it doesn't matter :)
14:15 rindolf joined #perl6
14:16 TimK1 left #perl6
14:17 tgt joined #perl6
14:21 timotimo so... how do i fix my jvmnqp?
14:21 jnthn I don't think you should be doing this in nqp at all really...
14:22 jnthn I'd been planning to put it into the Rakudo JVM interop class
14:23 jnthn Maybe by overriding something existing, or maybe by adding a method to add this stuff that can be overridden as part of the Rakudo JVM interop subclass.
14:24 timotimo OK, but that still leaves me with the problem that i don't have an nqp-jvm that i can use :)
14:25 jnthn huh?
14:25 timotimo nqp-jvm doesn't build. it complains about the lack of printfh in the ops
14:25 jnthn Without any changes of yorus?
14:25 jnthn That probably means it's trying to report an error.
14:26 timotimo that must be it :\
14:26 timotimo oh, yes, i had some dirt in my working copy!
14:31 kaleem joined #perl6
14:31 rurban1 joined #perl6
14:32 kaleem joined #perl6
14:33 timotimo that was it indeed.
14:35 lizmat joined #perl6
14:35 jnap joined #perl6
14:36 sergot joined #perl6
14:36 lizmat moritz: could you please also send me an invitation for the calendar?
14:37 lizmat it appears colomon++ already did Sets and Bags in the past though
14:37 colomon a lot has changed since then
14:37 lizmat (and yes, I'm not driving myself)
14:37 colomon lizmat++
14:40 moritz lizmat: sent.
14:40 lizmat thanks!
14:43 bluescreen10 joined #perl6
14:44 jnap thanks for the advent calender stuff, it does help
14:45 moritz \o/ and you're welcome
14:46 jnap I look forward to the day when I know Perl6 well enough to Port Catalyst ;)
14:46 ggoebel111 joined #perl6
14:48 timotimo what's the magic incantation to only rebuild the runtime jar thingie?
14:48 moritz make nqp-runtime.jar # ?
14:48 btyler joined #perl6
14:49 timotimo i'll try
14:51 btyler_ joined #perl6
14:55 PacoAir joined #perl6
15:02 timotimo https://gist.github.com/timo/cbdfdeab27c3af40c0a0 :)
15:05 jnthn nice :)
15:05 timotimo but it's all inside nqp for the moment
15:05 timotimo why exactly do you not want it to be in nqp?
15:06 timotimo because nqp doesn't have multiple dispatch for methods?
15:06 FROGGS it has
15:06 FROGGS otherwise as_mast would not work
15:06 timotimo er
15:06 timotimo of course :)
15:06 FROGGS :o)
15:06 timotimo but ... only with fixed arity, no?
15:06 FROGGS dunno
15:06 moritz no
15:07 timotimo hm, ok
15:07 FROGGS the dispatcher is implemented in nqp, no?
15:07 FROGGS so, there is nothing special in rakudo
15:07 timotimo well, i'll implement the code gen for the arity based dispatch now and after i get it to work, i'll move it over to rakudo if i can
15:07 moritz nqp: class A { proto method a(*@a) {*}; multi method a() { say 42 }; multi method a($x) { say 5 } }; A.a()
15:08 camelia nqp-parrot: OUTPUT«Unable to parse expression in blockoid; couldn't find final '}'  at line 2, near "say 42 }; "␤current instr.: 'panic' pc 16262 (gen/parrot/stage2/NQPHLL.pir:6020) (gen/parrot/stage2/NQPHLL.nqp:426)␤»
15:08 camelia ..nqp-jvm: OUTPUT«Unable to parse expression in blockoid; couldn't find final '}'  at line 2, near "say 42 }; "␤  in panic (gen/jvm/stage2/NQPHLL.nqp:379)␤  in FAILGOAL (gen/jvm/stage2/NQPHLL.nqp:386)␤  in blockoid (gen/jvm/stage2/NQP.nqp:983)␤  in method_def (gen/jvm/stage2/N…»
15:08 camelia ..nqp-moarvm: OUTPUT«Unable to parse expression in blockoid; couldn't find final '}'  at line 2, near "say 42 }; "␤panic␤»
15:08 moritz nqp: class A { proto method a(*@a) {*}; multi method a() { say(42) }; multi method a($x) { say(5) } }; A.a()
15:08 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«42␤»
15:08 moritz nqp: class A { proto method a(*@a) {*}; multi method a() { say(42) }; multi method a($x) { say(5) } }; A.a(6)
15:08 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«5␤»
15:08 timotimo mhm mhm
15:08 timotimo brrr, it's cold in here
15:08 timotimo i shouldn't have taken that lemonade from the fridge
15:09 FROGGS I have warm tea :o)
15:09 timotimo that's probably warmer than cold lemonade
15:11 FROGGS earl grey, hot
15:11 timotimo :)
15:12 timotimo jnthn: what must the type signature be for the java-level method i generate?
15:13 jnthn timotimo: Same as the other generated ones I guess...
15:13 timotimo yeah, okay, but where do i find them? :P
15:14 cooper joined #perl6
15:14 cooper joined #perl6
15:15 jnthn createAdaptorMethod should give some hints
15:15 timotimo OK
15:15 rurban1 joined #perl6
15:15 jnthn ah, it's in startCallout
15:16 timotimo ah, the void, CU, TC, CR, CSD, AOBJ part?
15:16 jnthn yeah
15:17 timotimo should i chop off the first part of startCallout into a separate method and re-use that?
15:17 * lizmat is lacking inspiration for an advent post
15:17 tadzik same here
15:17 timotimo lizmat: have you looked at the topic suggestions yet?
15:17 lizmat Sets/Bags have been done
15:17 lizmat ah, good point
15:18 moritz lizmat: you could look at your commits this year, and ask yourself "is this worth telling about"?
15:18 moritz like the deprecation trait. People can use that in their own programs, right?
15:19 jnthn lizmat: One on the :k/:kv/:pairs etc might work
15:19 lizmat adverbs on slices
15:19 lizmat hmmmm
15:20 btyler joined #perl6
15:20 lizmat I was also thinking "is default" and other variable traits
15:20 moritz +1
15:21 FROGGS or programming design patterns / perl6 best practices
15:21 FROGGS like skimming through rosettacode and explain how a how a problem might be solved in perl6
15:22 lizmat moritz: yes, you can *only* use "is DEPRECATED" in user programs, not in core
15:22 lizmat in core, you have to fake it
15:22 FROGGS I'd like to read something from masak or jnthn about general programming topics fwiw
15:23 lizmat maybe a post about changes in the past year in the spec, combined with "is DEPRECATED" ?
15:23 moritz +1
15:23 FROGGS +1
15:25 dalek mu: 7dacd1a | (Elizabeth Mattijsen)++ | misc/perl6advent-2013/schedule:
15:25 dalek mu: Claim day 5: Spec changes and operational fallout
15:25 dalek mu: review: https://github.com/perl6/mu/commit/7dacd1ad14
15:29 lizmat driver switch, will be back later&
15:29 timotimo jnthn: i'm not sure what op to use to find out more about the capture i got passed. nqp::takecapture or something?
15:30 timotimo oh, actually just captureposelems should be enough!
15:30 jnthn timotimo: Well, do the same arity check op sequence but use the rnage of allowable arities.
15:30 jnthn timotimo: And then that csd thing (a CallSiteDescriptor) has a numPositionals or so
15:30 masak lizmat: I for one would love to see a post about adverbs on slices.
15:30 jnthn Which should tell you just what you want.
15:31 timotimo great, that's what i needed to know
15:34 timotimo so i'll ALOAD the csd and visitFieldInsn(Opcodes.GETFIELD, TYPE_CSD.getInternalName, "S;")
15:34 timotimo no, just "S"
15:34 timotimo er, Ljava.lang.String;
15:35 timotimo also, "numPositionals"
15:35 timotimo er, why was i thinking of a string?
15:35 timotimo I is correct, of course
15:41 timotimo i'll have to i2l, then dup2 and then use lcmp and then compare the comparison result to lconst_0 using ifeq?
15:41 jnthn timotimo: Well, you don't have to l2i, you can also use an integer constant to compare it to...
15:41 jnthn uh, i2l I mean
15:42 timotimo oh. i guess.
15:42 timotimo and then i can use if_icmpeq?
15:42 jnthn iirc, yes
15:42 timotimo can i just pass a label there and it'll do the branchbyte thing for me?
15:44 jnthn Yeah, asm does the offset computation
15:45 timotimo excellent. i should be able to continue hacking for a bit now
15:45 timotimo at the end i'll have to figure out how to actually make the method i generated available to nqp; do i just have to pass the full name into some magic function that turns it into a CodeRef?
15:46 jnthn timotimo: No, it's done through the CodeRefAnnotation
15:47 timotimo oh, so after the visitAnnotation for that, the av.visit("name", ...) creates the coderef for me and i'll just have to look it up somewhere?
15:48 jnthn nqp: sub foo(&bar) { bar() }; foo({ say(1) })
15:48 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«1␤»
15:49 jnthn timotimo: No, it says that when the compilation unit is loaded the coderef should be created...
15:50 Suhosin joined #perl6
15:50 timotimo now i'm confused :)
15:50 jnthn timotimo: The code that did the existing shortname stuff is what takes the built code-refs and puts them into the methods table.
15:50 jnthn We don't create code-refs by hand any more. We just annotate that they should be created.
15:51 timotimo oh
15:51 timotimo so, er, what do i have to put into HashMap<String, CodeRef> names for my custom method to be invoked?
15:51 ajr joined #perl6
15:52 jnthn I think you've got the overall process mixed up
15:52 jnthn createAdaptor produces a Java class that subclasses CompilationUnit, with things in annotated with CodeRefAnnotation
15:53 jnthn That is then loaded, and it's the compilation unit loading that produces the CodeRefs for you
15:53 jnthn The building of the map comes after that, up in $indy_meth
15:53 jnthn oops
15:53 jnthn Up in computeInterop
15:54 timotimo oh, interesting
15:54 timotimo so at that point the coderefs have been created
15:55 timotimo er, that's bad, though. i've been writing the code to create the dispatcher methods into the computeInterop method
15:55 jnthn adaptorUnit.initializeCompilationUnit(tc); // this is the line that triggers it, iirc
15:55 jnthn Oh...but I said earlier they needed to go on adaptorUnit? :(
15:55 timotimo sorry, i guess it was too much new stuff at once :(
15:55 jnthn k
15:55 jnthn But yeah, they really have to go there.
15:56 timotimo i think i can move it easily
15:56 jnthn It makes sense...once you work out what the heck it's doing :)
15:56 * jnthn didn't write this lot so also had to figure it out in the past :)
15:56 timotimo hehe
15:57 timotimo you meant it has to go into createAdaptor?
15:58 jnthn yeah
15:58 jnthn for (Method m : target.getMethods()) createAdaptorMethod(cc, m);
15:58 jnthn That's the thing that makes all the long-name adaptor methods
15:58 timotimo mhm, yeah
15:58 jnthn I think you need to in that loop build your hash of things by short name/arity
15:58 timotimo i'll add createShorthandDispatchers beside it
15:58 timotimo that's where i do it, yes
15:58 jnthn And then use it for the decidign which things to crate
15:59 jnthn Yeah, in a createShorthandDispatchers or so.
15:59 jnthn Or make another pass over target.getMethods() if you want to keep things more isolated
16:00 timotimo that's my current approach
16:03 timotimo i'm still confused. how can i re-use the long-named method if i don't have to create a dispatcher?
16:03 timotimo maybe the logic for the no-dispatcher-needed stuff should stay where it has been before
16:05 jnthn Yeah, you do now have to distinguish shortname generated things from just installing one thing under a short name
16:05 jnthn But you know that a generated short-name thing will never have a / in it
16:06 jnthn May be a better way to factor it...
16:07 jnthn timotimo: Does NQP::Optimizer actually do anything?
16:07 timotimo it descends into regexes ;)
16:07 timotimo let me have a quick look.
16:07 timotimo i think it annotates ops that it knows to return integers with that
16:08 diakopter I played Descent
16:08 timotimo descent 1?
16:08 timotimo good choice.
16:08 jnthn Well, the thing that worries me is...it never walks QAST::Stmts and QAST::Stmt nodes...
16:08 jnthn oh, wait, it does...d'oh :)
16:08 jnthn mis-read :)
16:08 timotimo did i put an optimizer into the ... ah
16:10 jnthn yeah :)
16:10 jnthn Though, given 1 + 1 doesn't seem to trigger...
16:11 jnthn Do we ever actually build it?
16:11 jnthn ah, yes :)
16:12 jnthn But 1 + 1 remains an add_n...
16:13 timotimo that may explain why the winings were not so extreme :)
16:15 timotimo jnthn: i'm not sure i understand the "generated short-name thing will never have a / in it" piece
16:17 jnthn oh duh, it is working...
16:17 timotimo and what is the name supposed to be, ooc?
16:18 timotimo ah, were you using --target=ast? :))
16:18 jnthn yes :P
16:18 timotimo :D
16:18 timotimo i'm glad i'm not the only one who makes that mistake
16:18 timotimo cc.target.getName is the name of the class, aye?
16:19 timotimo and then it has a space and the descriptor that holds the parameter list?
16:19 timotimo i guess the descriptor actually starts with the name of the method
16:36 jnthn nqp: foo()
16:36 camelia nqp-moarvm: OUTPUT«No lexical found with name '&foo'␤frame_name_0␤»
16:36 camelia ..nqp-jvm: OUTPUT«java.lang.NullPointerException␤  in  (/tmp/EAaWB6qvC0:1)␤  in  (gen/jvm/stage2/NQPHLL.nqp:1100)␤  in eval (gen/jvm/stage2/NQPHLL.nqp:1086)␤  in evalfiles (gen/jvm/stage2/NQPHLL.nqp:1292)␤  in command_eval (gen/jvm/stage2/NQPHLL.nqp:1196)␤  in command_line…»
16:36 camelia ..nqp-parrot: OUTPUT«Could not find sub &foo␤current instr.: '' pc 45 ((file unknown):36899495) (/tmp/dxnVhdrWTz:1)␤»
16:37 thou joined #perl6
16:39 timotimo oh. now i don't have access to the right method object when i'm at this point :\
16:40 timotimo is there something like Tuple?
16:41 timotimo google says no :)
16:41 TimToady well, $(1,2,3) is close
16:42 TimToady or are we asking about Java?
16:42 timotimo java, yes
16:43 TimToady .oO("I am too soon oldt and too late schmart.")
16:44 * FROGGS .oO( #perl6 - where nothing is off topic unless we don't like you! )
16:44 timotimo i'm asking about java to make perl6 better :)
16:44 timotimo also, you like me
16:44 * TimToady is getting sleepy
16:44 FROGGS true true :o)
16:45 FROGGS TimToady: well, then hibernate like sheldon does :o)
16:51 kaleem joined #perl6
16:51 timotimo what kind of error should i throw if an ambiguous call is attempted?
16:51 TimToady "Was that a duck call?"
16:52 timotimo %)
16:54 * timotimo does some heavy, heavy cargo culting
16:55 timotimo the NullPointerException is the result
17:00 timotimo i wish invoking jdb wasn't so had >_>
17:01 timotimo well, there's a jdb server ...
17:02 TimToady does the Java wurst not provide enough information to simply generate a set of multis?
17:03 timotimo jnthn advised against going the multi route
17:04 TimToady "argument by authority is the weakest form of argument" --wp
17:04 timotimo :)
17:08 denis_boyun joined #perl6
17:09 zakharyas joined #perl6
17:10 timotimo it says Source file not found: BootJavaInterop.java even though i gave it ten different "use" lines
17:15 timotimo i can't kill the java process any more >_<
17:15 TimToady because it's already dead?
17:16 timotimo nope.
17:16 timotimo kill -9 helped, though
17:16 lizmat joined #perl6
17:18 TimToady speaking of which, I tried to write a signal handler using sun.misc.Signal and sun.misc.SignalHandler, but couldn't figure out what to pass to the second argument of .handle
17:20 timotimo yay, i can has code
17:22 diakopter TimToady: cool. what is .handle
17:23 TimToady a method in sun.misc.Signal to set a signal handler
17:24 timotimo Step completed: "thread=main", 63E3D8F0624DF5900C1DCFCE51700D18B761D257.qb_4851(), line=16,803 bci=649     ....... >_>
17:24 diakopter TimToady: http://docs.oracle.com/javase/7/docs/platform/jvmti/jvmti.html
17:24 timotimo that's where the NPE seems to fly
17:25 diakopter TimToady: rotfl especially at the utf8 section
17:26 timotimo not helpful :(
17:26 timotimo jnthn: can i drop my code onto you and ask you where the NPE comes from? >_<
17:26 TimToady yes, Java still heavily believes in null-terminated strings and 16-bit Unicode
17:29 rurban1 joined #perl6
17:29 TimToady well, their UTF-8 does, anyway
17:29 timotimo lue: how long until we can preview your advent blog post for tomorrow?
17:32 fhelmberger_ joined #perl6
17:33 darutoko- joined #perl6
17:38 kbenson joined #perl6
17:39 timotimo yay, i have running code!
17:40 timotimo ... what do i test it with? :\
17:40 kbenson An interesting article on java substrings and memory, which may be of interest to people who write interpreters: http://twistedoakstudios.com/blog/Post8147_referencing-substrings-faster-without-leaking-memory
17:41 jnthn timotimo: Find soemthing in the Java class library that just overloads by arity
17:42 timotimo i'm sprinkling stuff into the jakudo core setting now
17:43 dalek nqp/indy-args: d869316 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/IndyBootstrap.java:
17:43 dalek nqp/indy-args: Various indy refactors/cleanups.
17:43 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/d8693166a1
17:43 dalek nqp/indy-args: f3d8cf8 | jnthn++ | src/vm/jvm/ (2 files):
17:43 dalek nqp/indy-args: Preparations for callstatic support.
17:43 dalek nqp/indy-args:
17:43 dalek nqp/indy-args: Used when we know a code object lookup is not going to change its
17:43 dalek nqp/indy-args: target beneath us. For now, just useful info for JVM.
17:43 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/f3d8cf8aa1
17:43 dalek nqp/indy-args: 917927a | jnthn++ | src/NQP/Optimizer.nqp:
17:43 dalek nqp/indy-args: Tidy up NQP optimizer; do some call => callstatic.
17:43 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/917927aad3
17:43 dalek nqp/indy-args: 3151ce1 | jnthn++ | src/NQP/ (2 files):
17:43 dalek nqp/indy-args: Fix call => callstatic optimization.
17:43 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/3151ce1d8f
17:43 dalek nqp/indy-args: daeee99 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/IndyBootstrap.java:
17:43 dalek nqp/indy-args: Further indy optimizations for sub calls.
17:43 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/daeee99cc7
17:46 timotimo i'll do a spectest while i go out to eat
17:48 btyler jnthn++ #nice advent post! learned a few things I hadn't picked up lurking here
17:48 Rotwang joined #perl6
17:57 spider-mario joined #perl6
18:01 ssutch joined #perl6
18:07 moritz jnthn++ indeed; nice post, nice work
18:08 sergot joined #perl6
18:09 DarkWolf84 joined #perl6
18:09 DarkWolf84 hello
18:10 moritz hi DarkWolf84
18:11 DarkWolf84 left #perl6
18:11 DarkWolf84 joined #perl6
18:11 colomon joined #perl6
18:11 DarkWolf84 hello
18:12 * moritz has a deja-vu
18:13 DarkWolf84 I'm sorry bug in the client
18:13 DarkWolf84 left #perl6
18:14 * PerlJam wonders if the bug is that the client keeps joining #perl6 or keeps leaving #perl6
18:14 ajr joined #perl6
18:15 DarkWolf84 joined #perl6
18:15 DarkWolf84 much better
18:16 timotimo this food is not a minute too early
18:19 DarkWolf84 I'm not sure this is the right place to ask but who owns rosettacode
18:22 DarkWolf84 because I was inspired from saying from TimToady about dining philosophers problem
18:23 DarkWolf84 and wrote some in perl5, Coro and AnyEvent
18:24 dalek nqp/indy-args: a620659 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/IndyBootstrap.java:
18:24 dalek nqp/indy-args: Further indy optimization of method calls.
18:24 dalek nqp/indy-args:
18:24 dalek nqp/indy-args: Previous attempts to do this used the guardWithTest approach. However,
18:24 dalek nqp/indy-args: this made performance worse, not better. Now we go for a simpler
18:24 dalek nqp/indy-args: approach that assumes that despite method calls being polymorphic, in
18:24 dalek nqp/indy-args: reality the majority are monomorphic. So it optimizes for that case.
18:24 dalek nqp/indy-args: Thanks to other improvements, there's no loss if we're wrong and fall
18:24 dalek nqp/indy-args: back to the normal dynamic lookup.
18:24 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/a620659992
18:24 jnthn DarkWolf84: Not sure about who owns it, but iirc it's wiki-like, so if you have a solution to a problem for a language you can add it.
18:25 DarkWolf84 should I ask some permision?
18:25 PerlJam DarkWolf84: no.  forgiveness >>> permission  :)
18:26 DarkWolf84 ok
18:26 PerlJam IIRC, mikemol "owns" rosettacode.  You could ask him if you need some "authority"
18:26 kst` joined #perl6
18:34 rurban kbenson: I answered to the java substring problem at http://twistedoakstudios.com/blog/Post8147_referencing-substrings-faster-without-leaking-memory
18:34 timotimo jnthn, good speed improvements?
18:41 masak DarkWolf84! \o/
18:41 DarkWolf84 hi, masak
18:45 kbenson rurban: interesting.  In truth, I didn't look super close at the article.  I see stuff that looks interesting to VMs and think "hmm, I know some people working on that..."
18:50 masak * FROGGS .oO( #perl6 - where nothing is off topic unless we don't like you! )
18:50 masak to which the obvious retort is "FROGGS, please stay on topic"
18:50 masak :P
18:51 FROGGS :P
18:51 FROGGS I won't move!
18:51 lizmat joined #perl6
18:54 PZt joined #perl6
19:07 jnthn timotimo: In some micro-benchmarks for NQP, there's certainly some. I seem to have regressed some spectests.
19:12 btyler joined #perl6
19:13 timotimo 'some microbenchmarks' :/
19:14 timotimo sounds just likevthe stuff i keep doing :)
19:17 DarkWolf84 http://rosettacode.org/wiki/Dining_philosophers#One_solution_based_on_Coro_and_AnyEvent
19:18 DarkWolf84 I posted it
19:18 ajr_ DarkWolf84: Just don't abuse the abos. (When anybody's looking.)
19:20 DarkWolf84 sorry
19:30 masak ajr_: the... aborigines? o.O
19:30 ajr_ I think I have the quote correct.
19:30 jnthn Phew, looks like all my spectest regressions were down to a single thinko.
19:31 Alina-malina joined #perl6
19:32 kaare_ joined #perl6
19:36 masak ajr_: I have no idea what quote that might be.
19:36 ajr_ The "Three Bruces".
19:38 denis_boyun joined #perl6
19:38 dalek nqp/indy-args: 7805299 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/IndyBootstrap.java:
19:38 dalek nqp/indy-args: Fix excessive decontainerization bug.
19:38 dalek nqp/indy-args:
19:38 dalek nqp/indy-args: Fixes Rakudo spectest regressions resulting from indy work.
19:38 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/78052996ff
19:38 masak oh, ok.
19:45 jnthn A while back we discussed a bug involving some split/join thing taking gigabytes, but I can't find it now. :(
19:45 jnthn lizmat: Dunno if you remember ^^?
19:46 lizmat yes, I do vividly!
19:46 moritz iirc it was split that was very slow, not join
19:48 ajr joined #perl6
19:49 jnthn Well, I'm more looking at the insane memory use...does anybody have the code that triggered it?
19:49 lizmat (^10000).join(' ').split(' ') ??
19:51 lue hello world o/
19:51 moritz jnthn: say (^20_000).join(',').split(',')[*-1];
19:51 moritz java.lang.OutOfMemoryError: Java heap space
19:53 airdisa joined #perl6
19:53 lue lizmat: fwiw I've always wondered why pragmas were done with module calling syntax too.
19:53 lue timotimo: shouldn't be long now :)
20:00 spider-mario joined #perl6
20:01 dalek rakudo/nom: b227e62 | jnthn++ | src/core/ListIter.pm:
20:01 dalek rakudo/nom: Allocate more sensibly in ListIter.
20:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b227e6294b
20:01 jnthn moritz, lizmat: Now it completes :)
20:02 lue Is there supposed to be an error trying q:to/ END/ ?
20:03 moritz lue: I don't know if there's supposed to be an error, but it sounds like a dangerous thing to do
20:03 jnap joined #perl6
20:03 lue agreed :)
20:04 telex joined #perl6
20:06 bluescreen100 joined #perl6
20:09 Exodist joined #perl6
20:13 Util r: my @a = [ 1, 2 ], [ 5, 8 ];              for @a -> [  $OLD,  $NEW ] { say $NEW - $OLD }
20:13 camelia rakudo-parrot 874e35, rakudo-jvm 874e35: OUTPUT«1␤3␤»
20:13 Util r: my @a = {OLD=>1,NEW=>2},{OLD=>5,NEW=>8}; for @a -> { :$OLD, :$NEW } { say $NEW - $OLD }
20:13 camelia rakudo-jvm 874e35: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/OueXDh2A2V�Variable '$OLD' is not declared�at /tmp/OueXDh2A2V:1�------> [32mW=>2},{OLD=>5,NEW=>8}; for @a -> { :$OLD[33m�[31m, :$NEW } { say $NEW - $OLD }[0m�»
20:13 camelia ..rakudo-parrot 874e35: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/3ltssp8A1B�Variable '$OLD' is not declared�at /tmp/3ltssp8A1B:1�------> [32mW=>2},{OLD=>5,NEW=>8}; for @a -> { :$OLD[33m�[31m, :$NEW } { say $NEW - $OLD }[0m�»
20:13 timotimo watch out for flattening vs non-flattening
20:13 Util What syntax should I have used in the second attempt, to unpack hash values by keyname?
20:13 timotimo i think \(...)
20:13 jnthn Just parens
20:13 timotimo no, wait, that's wrong
20:13 timotimo yeah, just parens
20:13 ajr_ joined #perl6
20:14 masak yeah.
20:14 Util Doh!
20:15 masak curlies don't work, because they introduce the block.
20:15 Util Thanks, all!
20:17 timotimo jnthn: should i be creating a short-named method for the constructor?
20:17 dalek nqp/indy-args: 3d5a834 | jnthn++ | src/vm/ (2 files):
20:17 dalek nqp/indy-args: Make new callstatic op work on other backends.
20:17 dalek nqp/indy-args:
20:17 dalek nqp/indy-args: Just compiles into the same thing as 'call' for the time being.
20:17 dalek nqp/indy-args: review: https://github.com/perl6/nqp/commit/3d5a834035
20:17 timotimo and if so, should it be .new or &.()?
20:18 jnthn timotimo: Those today are generated as something that shortens to new if there is just one of them...
20:18 timotimo because new might already be taken
20:18 timotimo oh!
20:18 timotimo neato :)
20:18 jnthn timotimo: So yeah, we can apply the same approach.
20:18 timotimo so i should be able to get that to work with ... yeah
20:18 jnthn I don't think you can write a method call new in Java.
20:18 jnthn *called
20:18 timotimo first i want to make sure my stuff isn't actually wrong :)
20:18 jnthn 'cus it's a keyword
20:19 dmol joined #perl6
20:20 moritz aye, the join + split example now completes, though still takes 14s on my not-too-slow machine
20:21 moritz compared ot 0.088s on perl 5 :-)
20:21 moritz r: say 19 / 0.088
20:21 camelia rakudo-parrot 874e35, rakudo-jvm 874e35: OUTPUT«215.909091␤»
20:22 jnthn Yes, at least now it doesn't take infinitely longer. :)
20:25 timotimo jnthn: i think i've been creating the same "name" for the CodeRefAnnotations of the same class
20:25 timotimo that's bad, right? why doesn't it asplode violently?
20:28 jnthn If it's the name just used for backtraces, etc then it needn't be unique...
20:31 timotimo oh, interesting
20:31 timotimo i'm not actually sure how it even finds the right method, tbh :)
20:34 timotimo what bytecodes do i need to emit to throw an adhoc exception with a nice string message?
20:34 timotimo or rather, where do i have to look?
20:35 jnthn Hmm...you could just get tc and a string constant on the stack, then make the static call to ExceptionHandling.dieInternal I guess.
20:35 jnthn That's probably easiest way.
20:35 jnthn Just 3 instructions :)
20:35 timotimo thanks :)
20:36 timotimo er, i think i may have done it in the wrong order
20:36 timotimo first the tc, then the string, aye?
20:36 timotimo oh, do i need to visitInsn(Opcodes.ATHROW) after that?
20:37 timotimo oh, i know what i'm doing wrong
20:39 timotimo also, i think i'm not installing the methods anywhere where they can be found by nqp
20:39 rurban1 joined #perl6
20:40 jnthn timotimo: No, dieInternal throws, iirc
20:41 timotimo strange. if i don't ATHROW there, i get an error during the bytecode validation step of ASM
20:41 timotimo if i do, i don't
20:41 timotimo excuse me for being stupid, but how exactly do i tell nqp "this method i'm building here ... please use it to supply the nqp-level method 'foobar'!"?
20:41 jnthn Oh...yeah...it returns an exception too
20:42 jnthn You could also pop
20:42 jnthn Doesn't that just need making sure it has an entry made in the hash computeInterop builds?
20:43 timotimo let me have a look
20:43 jnthn I'm pretty sure that's where it needs to go.
20:43 jnthn And then that hash gets used as the method cache or some such.
20:44 timotimo ah, startCallout used to do that
20:45 timotimo it pushes "desc" to that hash, but creates a CodeRef named "callout $classname desc"
20:46 timotimo i removed the line that adds the desc to the descriptors because i don't really have a desc equivalent
20:47 timotimo ah, desc is really only a somewhat human readable name
20:47 timotimo now i get it
20:49 jnthn description, I guess...
20:54 timotimo i thought it had to be a special format to please the jvm :)
20:59 Exodist joined #perl6
21:00 lue the advent's publish-when clock runs on UTC I hope?
21:02 lue Here's the post to preview!  http://perl6advent.wordpress.com/2013/12/04/day-04-heredocs-theredocs-everywheredocs-docs/?preview=true&amp;preview_id=1904&amp;preview_nonce=9a653aee7c
21:02 lue timotimo: there it is ^^^ :)
21:03 webmind left #perl6
21:03 timotimo cool, i'll grab my password and read
21:04 * masak also
21:05 timotimo lue: on my browser and resolution, two of the code blocks scroll a tiny bit horizontally
21:05 timotimo the only thing you can see if you scroll right is whitespace, though
21:06 timotimo so it's just useless scrollbars
21:06 timotimo to be honest i prefer the look of the "code" blocks from the previous two posts
21:06 lue timotimo: yeah. I blame the code blocks being a pixel or two too short :)
21:06 timotimo where it doesn't have line numbers to the left
21:07 masak lue: s/thrid/third/
21:08 lue got it :)
21:08 masak twice.
21:08 lue got two of 'em
21:08 autumn joined #perl6
21:09 masak lue++ # the post
21:09 lue masak: do you think I should change the [code] blocks to <pre> blocks, like timotimo? Cross-post consistency or some other reason?
21:09 nwc10 jnthn: origin/indy-args + Rakudo works on "my" machine
21:09 masak lue: I don't have a vested opinion either way.
21:09 masak lue: I'm tickled pink that you did bring up the BEGIN+heredoc thing. that's really nice.
21:10 Exodist joined #perl6
21:10 lue I'll go in and make the change for output at least, that seems silly on second thought.
21:10 masak lue: you might want to spend a sentence or two on why it's not possible, though.
21:10 masak lue: (it's to do with one-pass parsing)
21:10 lue Yeah, I'll go and add a statement about one pass parsing and how BEGIN blocks mess that up for heredocs.
21:11 timotimo i'd appreciate a more thorough mention of "adverbs"
21:11 lizmat joined #perl6
21:11 jnthn nwc10: NQP, or you build Rakudo too?
21:11 jnthn nwc10: Should both be working, though...
21:12 masak timotimo: oh, I had that thought too. no explanation of :c, for example.
21:13 nwc10 Rakudo passes all of its tests when built using NQP on origin/indy...
21:13 timotimo jnthn: so did you notice a speedup in the compilation or something? :)
21:14 * lizmat suddenly realizes she has been responsible for the problem solved by https://github.com/rakudo/rakudo/commit/b227e6294b
21:14 lizmat again, it becomes clear, that premature optimization is evil
21:16 dalek rakudo-star-daily: 900fa28 | coke++ | log/ (5 files):
21:16 dalek rakudo-star-daily: today (automated commit)
21:16 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/900fa2857c
21:16 timotimo having to tap up before return to get jdb to do another step is *very* tiring
21:16 jnthn timotimo: Didn't do a huge amount of comparison yet, but numbers seem to be falling a bit :)
21:17 * nwc10 will try to time the setting compilation "without" and "with" tomorrow
21:17 nwc10 if suitable bits of time present themselves
21:19 timotimo blergh! successive calls to "list" will not reveal more and more code
21:21 lue Is it supposed to fail if I do  sub stuff { say q:to/END/ } \n <heredoc>  ? (i.e. s/BEGIN/sub stuff/ for the broken example)
21:22 masak lue: no.
21:22 lue That's what I thought.
21:23 masak r: sub stuff { say q:to/END/ }␤OH HAI␤   WORLD␤END
21:23 jnthn Yeah, that *should* work...
21:23 camelia rakudo-jvm b227e6: OUTPUT«(timeout)»
21:23 camelia ..rakudo-parrot b227e6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/i6PYMUYPnNâ�¤Confusedâ�¤at /tmp/i6PYMUYPnN:4â�¤------> [32mEND[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤        statement endâ�¤        statement modifierâ�¤        state…»
21:23 jnthn It's BEGIN that won't...
21:23 masak hmmm
21:23 masak p: sub stuff { say q:to/END/ }␤OH HAI␤   WORLD␤END␤stuff
21:23 camelia rakudo-parrot b227e6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/bSrjIFhoVFâ�¤Confusedâ�¤at /tmp/bSrjIFhoVF:5â�¤------> [32m<BOL>[33mâ��[31mstuff[0mâ�¤    expecting any of:â�¤        postfixâ�¤        statement endâ�¤        statement modifierâ�¤        sta…»
21:23 masak bleh.
21:24 jnthn std: sub stuff { say q:to/END/ }␤OH HAI␤   WORLD␤END␤stuff
21:24 camelia std 3b262af: OUTPUT«ok 00:01 124m␤»
21:24 * masak submits rakudobug
21:24 jnthn p: sub stuff { say q:to/END/ };␤OH HAI␤   WORLD␤END␤stuff
21:24 camelia rakudo-parrot b227e6: OUTPUT«OH HAI␤   WORLD␤␤»
21:24 jnthn Looks like some bad interaction between heredocs and the closing curly rule.
21:24 masak double bleh.
21:25 jnthn Well, not really. That golfs it to something smaller/more huntable.
21:26 * lue will assume it works for the sake of argument in his post :)
21:27 * lizmat decommutes&
21:28 masak p: sub x { say q:to/A/ }␤A␤x
21:28 camelia rakudo-parrot b227e6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/skxXrbOobvâ�¤Confusedâ�¤at /tmp/skxXrbOobv:3â�¤------> [32m<BOL>[33mâ��[31mx[0mâ�¤    expecting any of:â�¤        postfixâ�¤        statement endâ�¤        statement modifierâ�¤        stateme…»
21:28 masak p: sub x { say q:to/A/ };␤A␤x
21:28 camelia rakudo-parrot b227e6: OUTPUT«␤»
21:28 masak jnthn: indeed :)
21:30 lue Updated the post. Now mentions one-pass parsing and explains the :c adverb.
21:30 masak lue++
21:30 [Coke] still have one failur in Testing modules/perl6-lwp-simple...
21:30 lue (I don't think this post is the best place to explain adverbs in general though; I could be wrong however.)
21:31 masak lue: I like the distinction between code and output.
21:31 lue .oO(Hmmm... maybe I could explain adverbs on another advent day? ☺)
21:33 colomon joined #perl6
21:34 lue masak: depending on how you write your Day 9 post, Day 10 might be the perfect place to explain adverbs.
21:35 masak interesting development with the t4 reviews:
21:35 masak I just constructed 6 "hard cases" to try the four submissions on. three fail at least two.
21:35 masak the fourth one passes them all.
21:35 masak lue: I'll keep that in mind :)
21:35 lue Should I reserve day 10 for adverbs then?
21:35 masak might as well.
21:36 masak though I suspect they might have been topic'd before.
21:36 lue I covered DateTime a couple years ago, didn't seem to stop moritz :) /me checks the past anyway
21:39 lue Huh, I don't see an adverb post in any of the schedule files (I did see a Hash post in 2011 though ☺)
21:39 timotimo i'm getting "No such method 'insert' for invocant of type 'BOOTJavaObject'", but i'm putting a coderef into the names list with "insert" as the name :\
21:40 timotimo ah, the duplication check removes them again %)
21:41 masak lue: I might be wrong :)
21:42 dalek mu: 135dd29 | lue++ | misc/perl6advent-2013/schedule:
21:42 dalek mu: [advent-2013] Claim Day 10 for adverbs
21:42 dalek mu:
21:42 dalek mu: It'll flow nicely from Day 9 I suspect :) .
21:42 dalek mu: review: https://github.com/perl6/mu/commit/135dd29f15
21:44 lue .oO(I hope my working tile for Day 10 isn't too cryptic...)
21:47 masak lizmat++ moritz++ raydiak++ # filling The Gap since I last looked
21:47 masak I'll take slot 6 if no-one else does... but I'd prefer not to have to.
21:47 timotimo jnthn: my coderefs are turning up null :(
21:51 jnthn :(
21:52 timotimo would you like to look at my code?
21:52 timotimo it's not pretty :)
21:52 jnthn Well, given it's Java... :P
21:52 jnthn I cna glance at it and see if I spot anything.
21:52 timotimo well, it also needs a big refactoring before it can be merged
21:53 jnthn Sure; make it work, then make it nice.
21:53 dalek nqp/jvm_interop_dispatchers: a69295d | (Timo Paulssen)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/BootJavaInterop.java:
21:53 dalek nqp/jvm_interop_dispatchers: oh god the humanity!
21:53 dalek nqp/jvm_interop_dispatchers: review: https://github.com/perl6/nqp/commit/a69295d702
21:53 lue masak: I'm thinking of a post exploring things more generic than class, which are oft-forgotten (package, module). I'm just not totally confident I'll learn everything I need to know in time for Day 6 for that.
21:54 * lue must see timotimo's commit :)
21:54 timotimo my $interop := nqp::jvmbootinterop(); my \StrBuilder := $interop.typeForName('java.lang.StringBuilder'); my $b := StrBuilder.'constructor/new/()V'(); $b.insert(1, 2);
21:55 DarkWolf84 bbfn and happy hacking :)
21:56 masak lue: then please schedule it for a later slot ;)
21:56 timotimo what does bbfn mean?
21:56 lue Bye Bye For Now methinks
21:56 timotimo ah, that makes sense
21:57 masak lue: the question I'd like to see addressed is "why would anyone ever use the `package` keyword in Perl 6?" :P
21:57 lue me too :)
21:58 lue (In S11) Is =NAME, =AUTHOR, and =VERSION really how you're supposed to set the info in  use Foo::bar:auth<foo>:ver<2>  ?
21:59 lowpor03 joined #perl6
22:03 colomon_ joined #perl6
22:05 jnap1 joined #perl6
22:07 dalek rakudo/opts: afb0511 | jnthn++ | src/Perl6/Optimizer.nqp:
22:07 dalek rakudo/opts: Start trying to use callstatic where possible.
22:07 dalek rakudo/opts: review: https://github.com/rakudo/rakudo/commit/afb05111bf
22:07 dalek rakudo/opts: ceb7f13 | jnthn++ | src/Perl6/Optimizer.nqp:
22:07 dalek rakudo/opts: Avoid double-walking trees in sink context.
22:07 dalek rakudo/opts:
22:07 dalek rakudo/opts: Before, we'd walk the tree under the non-void and void branches of
22:07 dalek rakudo/opts: the QAST::Want. This prevents the double-work, cutting a good bit
22:07 dalek rakudo/opts: off the optimize phase.
22:07 dalek rakudo/opts: review: https://github.com/rakudo/rakudo/commit/ceb7f13b54
22:10 timotimo good catch :)
22:12 timotimo huh, is that decision with 'soft' really right?
22:12 timotimo looks weird to me
22:12 jnthn Think so
22:12 jnthn If we start failing wrap tests we'll know :)
22:12 timotimo either the scopes is 0, or it's 1 and calling .soft gives 0?
22:13 timotimo well, what do i know :)
22:13 jnthn Well, gives something false-y.
22:13 timotimo right
22:13 timotimo are you looking at my branch?
22:13 jnthn a soft routine is too mutable to reduce the call to a static...
22:13 timotimo thinking wether or not to go to bed now :)
22:19 jnthn timotimo: I dont' immediatley see the problem...
22:20 jnthn How does it fail?
22:20 timotimo the error is No such method 'insert' for invocant of type 'BOOTJavaObject', the cause is that SixModelObject cr = adaptorUnit.lookupCodeRef(i) returns null
22:22 timotimo i pasted a bit of code you can run to get the same error above
22:24 jnthn Don't suppose you're missing a call to c.mv.visitEnd(); or something?
22:24 timotimo i have a visitEnd directly after the "name" thing
22:25 timotimo and i end the whole thing with endCallout
22:26 jnthn av.visitEnd(); ?
22:26 jnthn I meant one on the mv you crate
22:26 jnthn MethodVisitor mv = mc.mv = ...
22:26 jnthn Do you certainly visitEnd at some point?
22:27 jnthn On the mv?
22:28 timotimo i think so
22:28 timotimo i give mc to the stopCallout
22:28 daniel-s_ joined #perl6
22:29 timotimo er endCallout
22:29 timotimo endCallout does c.mv.visitEnd
22:29 jnthn ok
22:34 timotimo i guess i'll have to ... *shudder* jdb that
22:40 lue timotimo: you could always use gcj and then gdb :)
22:40 kivutar joined #perl6
22:40 timotimo oh hell no
22:40 timotimo maybe i can attach an IDE to the jdb server, though
22:44 SevenWolf joined #perl6
22:45 Khisanth joined #perl6
22:45 timotimo well, i'll see what i can do tomorrow.
22:46 jnthn Yes, sleeping on it may well help :)
22:47 jnthn Looks like quite a bit of progress, even if it's not quite working yet.
22:47 jnthn timotimo++
22:47 timotimo i only got the easy parts done ;)
22:47 timotimo mostly by stealing from other places :D
22:49 mberends joined #perl6
22:51 lue I can't help but feel this line in S10 is a bit redundant by the time you get to S10: "Since there are no barewords in Perl 6, package names must be predeclared."
22:54 * lue gets the feeling it's been a while since someone looked at S10...
22:56 dalek rakudo/opts: 4af34c8 | jnthn++ | src/Perl6/Optimizer.nqp:
22:56 dalek rakudo/opts: On JVM, eliminate binder for zero-param code.
22:56 dalek rakudo/opts:
22:56 dalek rakudo/opts: This in turn means it'll be elligible for the indy optimization that
22:56 dalek rakudo/opts: relates to such calls.
22:56 dalek rakudo/opts: review: https://github.com/rakudo/rakudo/commit/4af34c8fb8
22:57 BenGoldberg joined #perl6
22:57 jnthn Teaching tomorrow, so I guess I'll have to stop there with hacking on stuff for today...
23:01 lue Is it just me, or does S10 go off on a tangent at one point that doesn't *really* fit with a spec about packages? Or is thinking S10 is about the C<package> keyword too narrow a view?
23:02 Exodist joined #perl6
23:12 * lue concludes that S10 is useless for learning about packages, due either to brevity or the... suboptimal way it's written.
23:15 lue I just realized: S10 not containing much useful information on how C<package> works is probably due to suffering from "If it's the same as Perl 5, don't mention it" syndrome.
23:17 jnthn 'night, #perl6
23:21 lue ♞ jnthn o/
23:36 fridim__ joined #perl6
23:40 Ben_Goldberg joined #perl6
23:45 xinming joined #perl6
23:48 lizmat joined #perl6
23:57 rurban1 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo