Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-02-25

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:08 dayangkun joined #perl6
00:12 thou joined #perl6
00:22 Grrrr joined #perl6
00:31 raiph joined #perl6
00:39 Grrrr joined #perl6
00:58 anuby joined #perl6
01:04 lustlife joined #perl6
01:36 [Coke] phenny: tell alester to check out http://www.warrenellis.com/?p=14655
01:36 phenny [Coke]: I'll pass that on when alester is around.
01:43 labster joined #perl6
02:38 FROGGS_ joined #perl6
03:27 orafu joined #perl6
03:28 census joined #perl6
03:29 jfried joined #perl6
03:39 aindilis joined #perl6
03:41 jaldhar joined #perl6
03:57 SamuraiJack joined #perl6
04:16 SamuraiJack joined #perl6
04:19 odoacre joined #perl6
04:29 xinming joined #perl6
04:31 uvtc left #perl6
04:40 preflex_ joined #perl6
04:43 fgomez joined #perl6
04:45 rindolf joined #perl6
05:00 thou joined #perl6
05:36 quester rn: "abc" ~~ m/<[\w]-[\n]>/
05:36 p6eval rakudo b205e6, niecza v24-24-gbdc3343:  ( no output )
05:39 quester rn: say ( "abc" ~~ m/<[\w]-[\n]>/ );
05:39 p6eval rakudo b205e6, niecza v24-24-gbdc3343: OUTPUT«「a」␤␤»
05:42 TimToady except, of course, \w doesn't contain \n in the first place...
05:42 phenny TimToady: 24 Feb 19:14Z <uvtc> tell TimToady prefixed http://rosettacode.org/wiki/Munching_squares#Perl_6 with a simple "baby Perl 6" method.
05:44 mtk joined #perl6
05:47 diakopter I dunno if prefixing was the right thing
05:51 quester TimToady: sorry, never mind... that was just the test for a recently fixed bug, [perl #115802] Error while compiling block when "a" ~~ /<[a]-[\n]>/
05:52 * quester resolves to keep local copy of Rakudo up to date.  Again.
06:40 TheVenetianMask joined #perl6
06:46 moritz fixed the 2013.01 link in the R* announcement on rakudo.org
06:46 moritz can't fix it in the email though :-)
06:46 kaare_ joined #perl6
06:47 cotto email's great like that
07:00 djanatyn joined #perl6
07:03 lue joined #perl6
07:04 djanatyn joined #perl6
07:08 TheVenet1anMask joined #perl6
07:11 quester left #perl6
07:17 djanatyn joined #perl6
07:23 TheVenet1anMask joined #perl6
07:27 Chillance joined #perl6
07:37 GlitchMr https://github.com/Keith-S-Thompson/fizzbuzz-polyglot/blob/master/fizzbuzz.pl6
07:37 GlitchMr This piece of code is interesting
07:38 rindolf joined #perl6
07:50 SamuraiJack joined #perl6
07:54 TimToady RC has FizzBuzz in 160 languages already
07:57 FROGGS joined #perl6
08:05 fhelmberger joined #perl6
08:16 sqirrel joined #perl6
08:38 census joined #perl6
09:05 daxim joined #perl6
09:07 cosimo joined #perl6
09:14 jnthn morning o/
09:17 balajikb joined #perl6
09:20 FROGGS morning
09:29 * jnthn sips coffee and tries to work on $dayjob_task
09:38 kresike joined #perl6
09:38 kresike hello all you happy perl6 people
09:39 domidumont joined #perl6
10:00 FROGGS kresike! \o/
10:01 kresike FROGGS, o/
10:02 sepegp joined #perl6
10:25 labster left #perl6
10:29 grondilu_ joined #perl6
10:30 ObseLeTe joined #perl6
10:43 spider-mario joined #perl6
10:52 * moritz wonders what happened to sirrobert
10:53 cognominal joined #perl6
10:59 spider-mario_ joined #perl6
11:00 Guest2304 For the fizzbuzz code (https://github.com/Keith-S-Thompson/fizzbuzz-polyglot/blob/master/fizzbuzz.pl6), I switched the guillemets to <<~>> and Rakudo said No such method 'postcircumfix:<( )>' for invocant of type 'Parcel'
11:01 curtispoe Bah.
11:01 phenny curtispoe: 18 Feb 00:48Z <[Coke]> ask curtispoe if https://github.com/Ovid/Config-Tiny is gone or moved.
11:02 curtispoe phenny: tell coke That he's probably looking at my old https://github.com/Ovid/Config-INI work? It's really sloppy and out-of-date.
11:02 phenny curtispoe: I'll pass that on when coke is around.
11:05 jnthn Need whitespace around the infix
11:05 curtispoe jnthn: thanks, that fixed it.
11:05 jnthn std: my %h; say %h«~»
11:06 p6eval std 52fe6d2: OUTPUT«ok 00:00 42m␤»
11:06 jnthn r: my %h; say %h«~»
11:06 p6eval rakudo b205e6: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Bogus statementâ�¤at /tmp/aZzl3T8CTb:1â�¤------> [32mmy %h; say %h«~»[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        infix or meta-infixâ�¤        infix stopperâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤Â»
11:06 jnthn hm...
11:06 curtispoe Also, is that leading [~] somewhat superfluous in that code?
11:07 jnthn The code should never have worked with the «~» form, it seems. Wonder how we missed that postcircumfix...
11:07 jnthn yes, that looks like a misunderstanding wrt the [~]
11:07 jnthn The method call binds tighter
11:08 jnthn It looks like it's doing the right thing anyway (print on a list seems to work the right way)
11:09 salv0 joined #perl6
11:10 curtispoe So would this be more correct? print ((1..100).map: { $_ %% 15 ?? "FizzBuzz" !! $_ %% 3 ?? "Fizz" !! $_ %% 5 ?? "Buzz" !! $_ }) <<~>> ("\n");
11:10 curtispoe Actually, I think a join would probably be better than the hyperoperator there. More clear?
11:11 jnthn yeah, but it feels like it's using a hyperop for no reason at all
11:11 jnthn I'd write it just as .say for ...
11:12 jnthn That would save the join too
11:12 arnsholt r: https://gist.github.com/5021528
11:12 p6eval rakudo b205e6: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/Xkaem2bkfY:1â�¤------> [32mhttps[33mâ��[31m://gist.github.com/5021528[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤  â€¦
11:13 arnsholt Huh. Didn't p6eval know how to eval gists in the past?
11:13 jnthn I thought it got patched too...
11:13 jnthn Oh, I wonder if it ever got restarted
11:13 jnthn p6eval: restart
11:13 jnthn evalbot restart
11:13 tadzik evalbot control restart
11:13 p6eval joined #perl6
11:13 jnthn hah, that one :)
11:14 jnthn r: https://gist.github.com/5021528
11:14 tadzik r: say 1
11:14 arnsholt Huh.
11:14 tadzik oh noes, I killed it :(
11:14 jnthn ...everything went worse than expected /o\
11:14 p6eval rakudo b205e6: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/oHDRxzZP00:1â�¤------> [32mhttps[33mâ��[31m://gist.github.com/5021528[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤  â€¦
11:14 p6eval rakudo b205e6: OUTPUT«1␤»
11:15 arnsholt jnthn: Anyways, that gist has some multidispatch oddness. Looks like constants interact oddly with multidispatch. Is that a known issue?
11:16 jnthn I guess constants are packaged scoped, and packages don't really do native types given it's just a hash
11:16 arnsholt Ah, right. That'll explain it, probably
11:16 jnthn And if we "fix" multi-dispatch to let you pass boxed things where native types are expected we get other nasty problems.
11:17 arnsholt Sure, sure
11:17 jnthn oh...
11:17 jnthn I wonder if we can handle it as a failover
11:17 jnthn Though "can I make it work by trying harder" solutions can be a bit too magical.
11:20 jnthn The problem is basically that if we have an int candidate and an Int candidate, we'd like the Int one to win on a boxed object. However, native types always sort more narrow. This means that the native candidate needs to reject being passed a boxed object, otherwise it'd always hide the Int one.
11:22 arnsholt Right, right
11:22 arnsholt But a non-multi will silently unbox an Int to int, no?
11:23 jnthn Yeah.
11:23 jnthn That discrepancy does make me unhappy.
11:23 arnsholt Excellent. Then I think I can just remove the int type constraint (it's not useful to multidispatch anyways)
11:24 jnthn The reason it can Just Work (for some definition...) is that there's no ambiguity over what to call.
11:24 arnsholt Yeah, it makes sense
11:24 * jnthn wonders if TimToady++ will have any insights when he backlogs over this :)
11:26 arnsholt Let's hope so =)
11:26 wk joined #perl6
11:27 jnthn .oO( A dancing sheep would baa clog )
11:31 not_gerd joined #perl6
11:31 not_gerd o/
11:32 not_gerd jnthn: is there some repr/MOP magic that makes it possible to do type punning (in particular int64 -> num)?
11:35 jnthn not_gerd: Don't think there's anywhere that happens. It's...kinda evil to do, since I guess it's rather platform specific what happens.
11:35 jnthn You could potentially write a REPR that had a union underneath.
11:36 jnthn So that it'd support nqp::unbox_n(nqp::box_i(42, MyTypeWithMagicalREPR))
11:37 jnthn But we don't provide one that does that.
11:37 not_gerd it's probably easier then to just use nativecall
11:37 * not_gerd want to use half-precision floats
11:37 not_gerd ^want
11:37 not_gerd ^want*s*
11:38 jnthn num32? :)
11:38 not_gerd num16
11:38 not_gerd num32 is single-precision
11:38 jnthn oh
11:38 jnthn oh, yeah
11:38 kivutar joined #perl6
11:38 jnthn Hm :)
11:38 jnthn Does C even have a name for those?
11:38 not_gerd jnthn: no, it doesn't
11:40 not_gerd some graphics cards come with hardware implementations, but your CPU/FPU normally doesn't
11:40 not_gerd I just want to use them as a serialization target, so that's not a problem
11:41 not_gerd I just need to construct a double from a uint16, and for that I need to fiddle with a uint64 that needs to get punned to said double
11:43 cibs joined #perl6
11:44 jnthn I wonder if you can do it with a buf and pack/unpack
11:49 not_gerd doesn't look like (un)pack supports floating point yet
12:10 not_gerd I could construct the values using arithmetic operations instead of bit fiddling
12:10 not_gerd will be pretty inefficient, but well..
12:16 * FROGGS .oO( damnit, now I always wanna write my $var := ... in php >.< )
12:18 not_gerd FROGGS: simple solution - stop using PHP ;)
12:18 FROGGS not_gerd: hmmm, that's a bit like stop earning money then :/
12:20 kresike FROGGS, I stopped using php a long time ago, and still getting paid ☺
12:40 AigleNoir joined #perl6
12:41 daxim http://p3rl.org/Perl6::Perldoc
12:41 nwc10 jnthn: All tests still successful? Czech!
12:41 nwc10 (although that pun is probably too subtle, and now might be out of date. This hour in horsemeat)
12:50 SmokeMachine joined #perl6
13:09 jnthn .oO( What does this hour and a European hamburger have in common? :P )
13:09 Ulti they both have horse in
13:09 Ulti somehow
13:10 Ulti or at a minimum horse dna
13:12 jnthn Sharing horsemeat jokes: the neig-hborly thing to do.
13:12 jnthn *neigh-borly...d'oh :)
13:13 daxim $a_horse->ISA('Horse') # of course, of course
13:14 SmokeMachine joined #perl6
13:14 jnthn two terms in a...oh :)
13:28 Ulti you can take a burger to water....
13:51 not_gerd I did implement the half-precision floating point decoder, btw: https://gist.github.com/gerdr/5029902
13:51 not_gerd if anyone wants to implement the encoder, go ahead
13:51 not_gerd otherwise, I'll do it when I need it
13:55 spider-mario joined #perl6
14:04 sergot hi o/
14:04 FROGGS hi sergot
14:07 uvtc joined #perl6
14:09 uvtc moritz: what format does rakudo.org (wordpress) want the release announcement in?
14:09 uvtc moritz: re. http://irclog.perlgeek.de/perl6/2013-02-24#i_6493127
14:12 PerlJam uvtc: wordpress groks HTML easily enough.
14:12 PerlJam (I think that's even it's internal storage format)
14:13 moritz yes, HTML with some caveats
14:13 moritz for example each paragraph should be a single line
14:13 moritz otherwise wordpress "helpfully" inserts <br /> tags for you, even if you enter it in the "HTML" view
14:14 bluescreen10 joined #perl6
14:14 uvtc moritz: An easy way to deal with the announcements is to write them in markdown, then use `pandoc` to convert to html for copy/paste into the blog.
14:15 PacoAir joined #perl6
14:15 uvtc moritz: I can make a 2013.03 (or a template) from the 2013.02 and tweak it to be markdown-formatted, if you like.
14:15 moritz uvtc: that would be nice, yes
14:15 moritz then github could also show the announcements directly
14:16 uvtc Well, github would need a .md filename extension in order to do that.
14:16 uvtc Is this in the rakudo/rakudo repo, or the rakudo/star repo, or both?
14:17 moritz both
14:17 PerlJam or write them in pod and use pod2html
14:17 PerlJam :-)
14:17 uvtc Oh, I just realized I don't have a commit bit. I can give you a gist, if you like.
14:17 moritz and yes, we can slap on the .md extension to the new announcements in the repos
14:17 moritz uvtc: that would be helpful, yes
14:18 uvtc ok, will do presently...
14:25 hoelzro does NQP 2013.02 require Parrot > 4.8.0?
14:26 moritz yes, 4.10.0
14:27 Psyche^ joined #perl6
14:27 hoelzro ok, good to know =)
14:32 skids joined #perl6
14:39 census joined #perl6
14:43 SunilJoshi joined #perl6
14:46 SunilJoshi joined #perl6
14:51 uvtc moritz: template for rakudo/rakudo release announcement: https://gist.github.com/uvtc/5030169
14:51 uvtc moritz: template for rakudo/star release announcement: https://gist.github.com/uvtc/5030261
14:51 uvtc Reminder: name with ".md" to be automatically rendered by github.
14:52 not_gerd left #perl6
14:52 uvtc I used a non-breakable space in "Perl 6" throughout. Also, used "MM" to indicate month, and "NN" to indicate release number.
14:56 moritz uvtc: thanks. I'll have to see the doctor quite soonish, will incorporate later
14:56 uvtc Of course, if you want to generate html from them for rakudo.org: `pandoc -S -o release-ann.html release-ann.txt`
14:56 uvtc y/w
15:02 benabik joined #perl6
15:13 stevan__ joined #perl6
15:27 zby_home joined #perl6
15:35 hash_table joined #perl6
15:44 uvtc When I build R*, why does it put a copy of the `install/bin/perl6` binary right there in the top-level rakudo-star directory? Users are going to be adding the install/bin to their PATH anyway (if they wish to use `panda`)...
15:44 uvtc So having that extra copy appears redundant.
15:44 SunilJoshi joined #perl6
15:50 FROGGS uvtc: the one in the top level is created when doing `make`, after that `make install` copies all the files to the install location, which is right now a subfolder within the repository
15:51 FROGGS this might change so it will install to /usr/local or to to /opt in future
15:51 uvtc FROGGS: Thanks. Yes, I see that it's a copy of the one in install/bin.
15:51 FROGGS but it is always sane to add the install folder to $PATH, ya
15:51 uvtc FROGGS: Oh, I very much like that Rakudo installs into its own local "install" directory.
15:51 FROGGS no, the one in install/bin is the copy :o)
15:52 FROGGS put that's not the point of `make install`, at least not for me
15:54 uvtc FROGGS: the reason I ask is: users are going to put "path/to/rakudo-star/install/bin" on their path anyway (to access panda and p6doc, at least). So the existence of that top-level `perl6` binary seemed redundant.
15:55 sergot Where can I find a really really good article about Perl 6 Grammars?
15:57 lichtkind joined #perl6
15:57 FROGGS uvtc: so the top level binary might be better in a _build directory, is that what you propose?
15:58 FROGGS sergot: I can't if it is really really good, but maybe this: http://perl6advent.wordpress.com/2009/12/21/day-21-grammars-and-actions/
15:58 FROGGS sergot: http://perl6advent.wordpress.com/2009/12/24/day-24-the-perl-6-standard-grammar/
15:59 FROGGS sergot: and the book, chapter 10: http://cloud.github.com/downloads/perl6/book/2012.05.23.a4.pdf
15:59 uvtc FROGGS: having it at the top-level suggests to users to but "path/to/rakudo-star" on their path, rather than "path/to/rakudo-star/install/bin".
15:59 FROGGS uvtc: it does, ya :/
16:01 sergot FROGGS++ thanks
16:01 FROGGS sergot: you're welcome
16:08 thou joined #perl6
16:17 uvtc `perl6` is so quiet. Would expect it to tell me version info when I start up the repl.
16:18 jnthn Wouldn't that get pretty old after a while? :)
16:23 uvtc Maybe. I suppose `perl6` does the Perlish thing of doing what you asked for. :)
16:23 TimToady maybe it should print a 300 page copyright notice instead
16:24 uvtc "Please click 'I agree' to use this repl."
16:25 jnthn 300 pages is a lot to say about copyright :)
16:25 jnthn Well, I guess some lawyers would manage it...
16:26 kresike bye folks
16:26 daxim IT SHOULD PRINT A HUGE BANNER
16:27 uvtc left #perl6
16:27 jnthn __________         __             .___
16:27 jnthn \______   \_____  |  | ____ __  __| _/____   |       _/\__  \ |  |/ /  |  \/ __ |/  _ \  |    |   \ / __ \|    <|  |  / /_/ (  <_> )
16:27 jnthn |____|_  /(____  /__|_ \____/\____ |\____/
16:27 jnthn ...eek :)
16:27 jnthn \/      \/     \/          \/
16:28 jnthn ...well, it said Rakudo in ASCII art before my IRC client managled it :P
16:28 jnthn I think it was annoying enough to know DO NOT WANT :)
16:30 uvtc joined #perl6
16:30 tadzik ░█▀▀ ░█▀█ ░█ ░█▀▀ ░░█▀▀ ░█▀█ ░█ ░█ ░░░
16:30 tadzik ░█▀▀ ░█▀▀ ░█ ░█ ░░░░█▀▀ ░█▀█ ░█ ░█ ░░░
16:31 tadzik ░▀▀▀ ░▀ ░░░▀ ░▀▀▀ ░░▀ ░░░▀░▀ ░▀ ░▀▀▀ ░
16:31 tadzik ...sorry, couldn't resist :)
16:31 jnthn :P
16:31 nwc10 :-)
16:31 daxim I can read that from across the room, well done
16:31 tadzik I actually have written a weechat plugin for this
16:32 * TimToady hopes it's written in Perl 6
16:32 tadzik almost
16:33 TimToady is there any way to load a dynamic library from the rakudo level yet?  it's not obvious to me that there is...
16:33 jnthn TimToady: use NativeCall ?
16:34 jnthn TimToady: Or did you mean something else?
16:34 TimToady load a .so or .dll
16:34 uvtc holy moly. If that isn't shouting, I don't know what is. :)
16:34 jnthn Well, NativeCall loads those, looks up a symbol and gives you a way to call it.
16:36 jnthn That's what DBIish does for its database drivers, for example
16:37 TimToady there isn't much pod in NativeCall.pm6...
16:38 jnthn README has a bunch of docs, though
16:41 TimToady oh, zavolaj, not NativeCall
16:41 jnthn star: use NativeCall; sub dlsym(Str $lib, int $flags) returns OpaquePointer is native { * }; my $x = dlsym('libreadline', 0); say $x
16:41 p6eval star 2012.12: OUTPUT«(signal SEGV)»
16:41 jnthn hm :)
16:41 jnthn wonder what the sig of dlsym is meant to be. :)
16:42 jnthn TimToady: The module is called NativeCall. The repo is zavolaj for...historical reasons.
16:42 jnthn There may be an argument for pulling the module into core these days.
16:42 TimToady what's the name of the module called?  :P
16:43 jnthn "A module name" :P
16:43 TimToady anyhoo, thanks
16:44 jnthn All the guts of it are actually provided at VM level
16:44 TimToady what's a NativeCall on JVM?
16:44 * TimToady is quibbling with the term "native" here...
16:44 jnthn There's JNI (Java Native Interface).
16:44 TimToady so NativeCall really means C_Call or some such
16:45 jnthn JNI also means "Native" in the dll/so sense.
16:45 brrt joined #perl6
16:45 TimToady would be nice to be able to use the same API everywhere
16:45 uvtc natives are getting restless...
16:45 jnthn Provided the appropriate REPRs and ops can be implemented in terms of JNI, I think we should be able to have NativeCall work the same way.
16:45 TimToady can NativeCall wrap JNI?
16:46 jnthn That's the goal. :)
16:46 jnthn Just needs some of arnsholt++, myself or somebody else to have the tuits to attack it :)
16:47 TimToady not bugging you, just askin'
16:47 * jnthn didn't feel bugged :)
16:47 TimToady I know you have a think or two else to do first :)
16:47 jnthn Yeah, but it's also one of those things that won't want to wait too long.
16:48 jnthn I really don't want the JVM port to get a label of "doesn't let you use a load of the ecosystem due to no NativeCall support"
16:48 TimToady agree that NativeCall should be a battery included
16:48 hoelzro NativeCall is (to me) one of the coolest things about Perl 6
16:49 hoelzro (even though it's currently specific to Rakudo)
16:49 jnthn I'd hope its API is possible to provide by other impls, though. Provided they have *a* NativeCall that matches the API, libraries that depend on it should be usable.
16:50 jnthn I expect the exact way NativeCall is written to vary a bit.
16:51 jnthn But it's a much better story than dozens of modules doing implementation-specific things to do native calls.
16:51 TimToady just need to watch out for gratuitous differences, I suppose
16:53 nwc10 apologies for the ASCIIfied nature of the following
16:53 TimToady but happily, if we don't get it quite right, someone will just slap an abstraction layer over it all :)
16:53 nwc10 so Vienna's marketing slogan is "Wien is anders" (Vienna is different)
16:53 TimToady ist?
16:54 nwc10 is Perl 6 different? Or at least, is Rakudo different? In that, of all the dynamic languages I can think of, is Rakudo the only implementation that intends to target multiple backends?
16:54 nwc10 TimToady: yes, sorry ist
16:54 nwc10 I can't type. I blame my fingers
16:54 jnthn That ist a good question...
16:54 nwc10 in that there's the original and the best, and Jython, and IronPython
16:55 TimToady you mean, as opposed to having multiple implementations on different VMs?
16:55 nwc10 yes.
16:55 nwc10 exactly that
16:55 nwc10 as best I'm aware, all the others are "different VM implies different implementation codebase"
16:55 TimToady I'm sure some of the implementations would like to take over the world that way
16:56 TimToady I think PyPy had some pretentions of replacing CPython at one point
16:57 nwc10 did they stop? :-)
16:57 nwc10 I've stumbled across some curious Python heresy recently.
16:57 TimToady I think a certain Guido put his foot down on that subject
16:57 nwc10 aha.
16:57 TimToady but that was several years ago
16:57 TimToady things coulda changed since then
16:57 nwc10 He didn't purge the thoughtcrime at the bottom of this page: http://mercurial.808500.n3.nabble.com/Mercurial-for-Python3-td2919707.html
16:58 nwc10 (mercurial's ticket on "no, we're not really going to port to Python 3 any time soon)
16:58 nwc10 there's similar thoughtcrime on Trac's equivalent ticket: http://trac.edgewall.org/ticket/10083
16:58 nwc10 anyway, that's a digression
16:58 TimToady .oO(no observable demand)
16:59 jnthn nwc10: I think Rakudo's approach is different in the sense that we're saying "well, Perl 6 wants to be on many VMs anyway so let's just build an implementation that can go there" rather than "let's built for one VM and folks can start over for others"
16:59 jnthn Rakudo isn't the only Perl 6 implementation, of course.
16:59 nwc10 jnthn: which, longer term, seems a more efficient approach.
17:00 TimToady and we're still in a state that we can bend the original definition of the language to make cross-platform stuff work better
17:00 jnthn nwc10: Yes, with the caveat that you have to design smart enough to let the ports be efficient.
17:00 gcole joined #perl6
17:00 nwc10 yes, and I'm aware of some of the history of Perl 6 implementations. But right now, it's looking like the only one that's going to be mostly feature complete when the spec and the testsuite "hit" 6.0.0
17:01 nwc10 so there's sort of this risk of "the implementation is the spec". But not *terrible*, as being on multiple VMs already avoids a lot of the pain of Perl 5
17:02 jnthn For example, if there was no way for the JVM port to store stuff using normal JVM objects (which it does) or to use invokedynamic (which I mostly know how to do for a bunch of places), it'd be in a tough place.
17:02 nwc10 jnthn: efficient - to avoid the "We run on both VMs - .NET and JVM" ? :-)
17:02 TimToady well, any code that depends on unspecced behavior could be viewed as potentially producing flying butt monkeys
17:02 nwc10 (digression - I thought that JRuby managed to be pretty performant even on Java (1.)6?)
17:02 nwc10 TimToady: are they more painful than nasal daemons?
17:03 jnthn nwc10: To get the best out of those two wants different things these days.
17:03 * TimToady doesn't know
17:03 * nwc10 is glad to hear this
17:03 nwc10 given "where there's muck there's brass", I'll stick to the monkeys.
17:05 uvtc Possibly interesting datapoint: Clojure takes the approach of "implementations are symbiotic with the host platform". Meaning, Clojure-JVM may behave slightly different that Clojurescript, but they're the same language at heart.
17:05 uvtc But each impl meshes nicely with its host platform.
17:06 TimToady it's nice if there are gates labelled Here Be Dragons though
17:06 TimToady .oO(use POSIX;)
17:07 uvtc One tradeoff with that, though, is: "this module only works with $impl"
17:07 uvtc or "only tested with $impl".
17:07 TimToady use Win32;
17:08 TimToady but yeah, perl has never been a procrustean bed when it comes to portability; some things just don't work everywhere
17:09 TimToady but that's no reason not to provide the functionality on a system that can support it
17:10 TimToady sometimes Write Once, Run Everywhere reduces to Write Zero Times, Run Nowhere
17:12 TimToady star; use NativeCall; sub foo() is native('NoNeSuCh') {...}; foo()
17:12 TimToady star: use NativeCall; sub foo() is native('NoNeSuCh') {...}; foo()
17:12 p6eval star 2012.12: OUTPUT«Cannot locate native library 'NoNeSuCh.so'␤  in method postcircumfix:<( )> at /home/p6eval/star/lib/parrot/4.10.0/languages/perl6/lib/NativeCall.pm6:122␤  in  at src/gen/BOOTSTRAP.pm:852␤  in any  at src/gen/BOOTSTRAP.pm:836␤  in block  at /tmp/SWLqb21tYB:1␤␤»…
17:13 bluescreen100 joined #perl6
17:13 SunilJoshi joined #perl6
17:13 TimToady er, in any?  surely that does not guarantee ordering
17:14 TimToady (if it's really a junctional any...)
17:15 TimToady hmm, is there any way to trap that error?
17:16 p5eval joined #perl6
17:18 diakopter star: use NativeCall; sub foo(int $a) is native('libc') {...}; exit(3); say 'alive'
17:18 p6eval star 2012.12:  ( no output )
17:18 diakopter star: use NativeCall; sub foo(int2 $a) is native('libc') {...}; exit(3); say 'alive'
17:18 p6eval star 2012.12:  ( no output )
17:19 TimToady use NativeCall; BEGIN try sub foo() is native('NoNeSuCh') {...}; &foo() if &foo.defined;
17:19 TimToady ^^ coredumps here
17:19 TimToady star: use NativeCall; BEGIN try sub foo() is native('NoNeSuCh') {...}; &foo() if &foo.defined;
17:19 p6eval star 2012.12: OUTPUT«(timeout)»
17:20 TimToady took too long coredumping :)
17:20 diakopter ETOILETOVERFLOW
17:20 uvtc Is the content at doc.perl6.org the same as you get via `p6doc`?
17:21 jnthn It doesn't look the symbol up until the first call.
17:22 TimToady star: use NativeCall; BEGIN try sub foo() is native('NoNeSuCh') {...};
17:22 uvtc Whoops. Sorry --- the perl6/doc readme explains.
17:22 p6eval star 2012.12: OUTPUT«(timeout)»
17:23 jnthn ...that's a weird timeout.
17:23 TimToady star: use NativeCall; BEGIN try BEGIN sub foo() is native('NoNeSuCh') {...};
17:23 p6eval star 2012.12: OUTPUT«(timeout)»
17:24 diakopter star: use NativeCall; sub malloc(int $a) is native('libc') {...}; malloc(100000000000); say 'alive'
17:24 p6eval star 2012.12: OUTPUT«Cannot locate native library 'libc.so'␤  in method postcircumfix:<( )> at /home/p6eval/star/lib/parrot/4.10.0/languages/perl6/lib/NativeCall.pm6:122␤  in  at src/gen/BOOTSTRAP.pm:852␤  in any  at src/gen/BOOTSTRAP.pm:836␤  in block  at /tmp/D20B_CQhxS:1␤␤»…
17:24 diakopter o_o_
17:24 TimToady the RC page in question wants to be able to recover from a missing shared library
17:24 jnthn diakopter: Try just "is native"...it'll be available in process
17:25 * TimToady is trying to figger out how to do that
17:25 jnthn star: use NativeCall; sub malloc(int $a) is native { * }
17:25 p6eval star 2012.12:  ( no output )
17:25 jnthn like that
17:26 TimToady I presume you're answering diakopter++ there, not me
17:26 jnthn star: use NativeCall; sub malloc(int $a) is native returns OpaquePointer { * }; say defined malloc(100000000000)
17:26 p6eval star 2012.12: OUTPUT«False␤»
17:26 jnthn star: use NativeCall; sub malloc(int $a) is native returns OpaquePointer { * }; say defined malloc(100)
17:26 p6eval star 2012.12: OUTPUT«True␤»
17:26 jnthn :)
17:26 TimToady more generally, how do we trap trait errors?
17:26 diakopter star: knowhow Bar is repr("CPointer") { }; use NativeCall; sub free(OpaquePointer $a) is native {...}; free(Bar); say 'alive'
17:26 p6eval star 2012.12: OUTPUT«alive␤»
17:26 jnthn TimToady: It doesn't fail until the first call
17:27 jnthn TimToady: So a "try" on the call will do it.
17:27 jnthn Don't know the answer on the general "how to we catch trait application errors" though :)
17:27 jnthn *do
17:28 TimToady star: use NativeCall; BEGIN try sub foo() is native('NoNeSuCh') {*}; try foo();
17:28 p6eval star 2012.12: OUTPUT«(timeout)»
17:28 TimToady star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; try foo();
17:28 p6eval star 2012.12:  ( no output )
17:28 TimToady star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; try { foo() } // say "alive";
17:28 p6eval star 2012.12:  ( no output )
17:29 TimToady ?
17:29 p5eval joined #perl6
17:29 jnthn star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; say try { foo() }
17:29 p6eval star 2012.12: OUTPUT«Cannot locate native library 'NoNeSuCh.so'␤  in method postcircumfix:<( )> at /home/p6eval/star/lib/parrot/4.10.0/languages/perl6/lib/NativeCall.pm6:122␤  in  at src/gen/BOOTSTRAP.pm:852␤  in any  at src/gen/BOOTSTRAP.pm:836␤  in block  at /tmp/pRemypR7YI:1␤␤»…
17:29 diakopter star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; try { foo() }; say "alive";
17:29 p6eval star 2012.12: OUTPUT«alive␤»
17:29 jnthn star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; say (try { foo() })
17:29 p6eval star 2012.12: OUTPUT«Cannot locate native library 'NoNeSuCh.so'␤  in method postcircumfix:<( )> at /home/p6eval/star/lib/parrot/4.10.0/languages/perl6/lib/NativeCall.pm6:122␤  in  at src/gen/BOOTSTRAP.pm:852␤  in any  at src/gen/BOOTSTRAP.pm:836␤  in block  at /tmp/WBfcmieZ0F:1␤␤»…
17:29 jnthn star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; say (try { foo() }).perl
17:30 p6eval star 2012.12: OUTPUT«X::AdHoc.new(payload => "Cannot locate native library 'NoNeSuCh.so'")␤»
17:30 colomon nice
17:30 diakopter you're an AdHoc
17:30 jnthn Oh...how old is that star?
17:30 jnthn Old enough to be before we fixed try
17:30 jnthn (to give back Nil, not the exception)
17:31 diakopter star: use NativeCall; sub foo() is native('') {*}; say (try { foo() }).perl
17:31 p6eval star 2012.12: OUTPUT«X::AdHoc.new(payload => "Cannot locate native library '.so'")␤»
17:31 jnthn star: say try die 'oh noes'
17:31 p6eval star 2012.12: OUTPUT«oh noes␤  in block  at /tmp/zFNkuAwcNM:1␤␤»
17:31 jnthn r: say try die 'oh noes'
17:31 p6eval rakudo b205e6: OUTPUT«Nil␤»
17:32 TimToady yes, 2013.1 produces Nil
17:32 jnthn star: say $*VERSION # hmm, or how is it spelt...
17:32 p6eval star 2012.12: OUTPUT«Dynamic variable $*VERSION not found␤  in method gist at src/gen/CORE.setting:10302␤  in sub say at src/gen/CORE.setting:7488␤  in block  at /tmp/p_s5n7fX1r:1␤␤»
17:33 TimToady though I'm still wondering about trapping trait failures...
17:33 jnthn star: say $*PERL # hmm, or how is it spelt...
17:33 p6eval star 2012.12: OUTPUT«("name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2012.12", "release-number" => "", "build-date" => "2012-12-27T20:05:32Z", "codename" => ""}).hash␤»
17:33 jnthn ah :)
17:33 TimToady jnthn: um, it says what it is right there already before the colon
17:33 jnthn oh!!
17:33 * jnthn feels dumb now :)
17:33 TimToady quick do something that makes you feel smarter!
17:34 gcole_ joined #perl6
17:34 * jnthn hurries to finish up the $dayjob slides :)
17:34 TimToady oops
17:34 jnthn (thankfully, not doing these for an urgently pressing need) :)
17:34 jnthn (in fact, tyring to avert them becoming one in a week or two's time...)
17:35 uvtc What are the different purposes of .WHAT vs. .perl vs. .gist?
17:36 TimToady r: BEGIN try 1/0;
17:36 TimToady (coredump)
17:36 p6eval rakudo b205e6: OUTPUT«(timeout)»
17:36 jnthn :/
17:36 TimToady uvtc: to confuse newcomers, obviously :)
17:37 uvtc Actually, I see that .WHAT tells me the type. Though the other two seem quite similiar.
17:37 TimToady WHAT does not return a string
17:37 TimToady r: say 42.WHAT.WHAT.WHAT
17:37 p6eval rakudo b205e6: OUTPUT«(Int)␤»
17:38 uvtc Ok. Looks like .WHAT returns a type that gets printed as a string for me in the repl.
17:38 jnthn TimToady: got it to SEGV under the debugger. Will investigate later.
17:38 TimToady r: say 42.WHAT
17:38 p6eval rakudo b205e6: OUTPUT«(Int)␤»
17:38 TimToady r: print 42.WHAT
17:38 p6eval rakudo b205e6: OUTPUT«use of uninitialized variable $v of type Int in string context  in block  at /tmp/d8BuLVmsvW:1␤␤»
17:38 uvtc r: say Int().WHAT
17:38 p6eval rakudo b205e6: OUTPUT«(Int)␤»
17:38 jnthn It actually stack overflows...
17:39 TimToady which is why it times out, yes
17:40 uvtc Does .gist give a "human readable" version of what .perl provides?
17:40 SamuraiJack joined #perl6
17:40 TimToady yes, and often shorter
17:40 TimToady where a human can interpret
17:40 uvtc It seems to me so far that .WHAT, .gist, and .perl are the three amigos wrt figuring out what things are doing in the repl.
17:41 TimToady though in the case of a type object, we add parens
17:41 TimToady so they don't think it's just a string
17:42 uvtc Ok, thanks.
17:43 TimToady and say implies .gist, so you don't usually need that
17:44 uvtc Ah, makes sense.
17:44 TimToady (and print doesn't imply .gist, because you're printing it to a printer, not saying it to a sayer.)
17:44 cognominal joined #perl6
17:48 * rjbs files an RFE to make .gist paste the invocant to github
17:48 sergot In p6's regexes: how are signed all "printable" characters?
17:48 sergot something like \w, or?
17:48 benabik joined #perl6
17:49 moritz nr: say "\c[0]a" ~~ /<.print>/
17:49 p6eval niecza v24-24-gbdc3343: OUTPUT«「a」␤␤»
17:49 p6eval ..rakudo b205e6: OUTPUT«Cursor<-38368199>Can not get attribute '$!pos' declared in class 'Cursor' with this object␤  in regex  at /tmp/175SNNjiLs:1␤  in method ACCEPTS at src/gen/CORE.setting:10804␤  in block  at /tmp/175SNNjiLs:1␤␤»
17:50 TimToady nr: say "\c[0]a" ~~ /<:print>/
17:51 p6eval niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤PRINT does not exist as a UCD table at /tmp/mAoSQ7iVJO line 1:â�¤------> [32msay "\c[0]a" ~~ /<:print[33mâ��[31m>/[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) â�¤  â€¦
17:51 p6eval ..rakudo b205e6: OUTPUT«「a」␤␤»
17:51 jnthn moritz: We can implement a method print in Cursor to make that one work, I think...
17:52 jnthn Of course, it overrides a certain other print ;)
17:52 TimToady why not just use :print?
17:52 jnthn That also works :)
17:52 jnthn Should <.print> work?
17:52 jnthn Or should it fail with an error more like "no, that's not the protocol to use, you're meant to return a Cursor"...
17:52 dalek perl6-roast-data: 4fbcdd6 | coke++ | / (4 files):
17:52 dalek perl6-roast-data: today (automated commit)
17:52 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/4fbcdd6f20
17:56 [Coke] rn: say q“a”
17:56 p6eval rakudo b205e6: OUTPUT«â�€â�€â�€[â�€â�€â�€3â�€â�€â�€1â�€â�€â�€mâ�€â�€â�€=â�€â�€â�€=â�€â�€â�€=â�€â�€â�€â�€â�€â�€[â�€â�€â�€0â�€â�€â�€mâ�€â�€â�€Sâ�€â�€â�€Oâ�€â�€â�€Râ�€â�€â�€Râ�€â�€â�€Yâ�€â�€â�€!â�€â�€â�€â�€â�€â�€[â�€â�€â�€3â�€â�€â�€1â�€â�€â�€mâ�€â�€â�€=â�€â�€â�€=â�€â�€â�€=â�€â�€â�€â�€â�€â�€[â�€â�€â�€0â�€â�€â�€mâ�€â�€â�€â�¤â�€â�€â�€Câ�€â�€â�€oâ�€â�€â�€uâ�€â�€â�€lâ�€â�€â�€dâ�€â�€â�€nâ�€â�€â�€'â�€â�€â�€tâ�€â�€â�€ â�€â�€â�€fâ�
17:56 p6eval ..niecza v24-24-gbdc3343: OUTPUT«a␤»
17:56 [Coke] rn: say q‘a’
17:56 TimToady hmm, currently specced as a predefined rule, and niecza is probably correct that it doesn't occur in UCD tables...
17:56 p6eval niecza v24-24-gbdc3343: OUTPUT«a␤»
17:56 p6eval ..rakudo b205e6: OUTPUT«���[���3���1���m���=���=���=������[���0���m���S���O���R���R���Y���!������[���3���1���m���=���=���=������[���0���m�������C���o���u���l���d���n���'���t��� ���f
17:57 * [Coke] asks masak if we have that one already.
17:57 TimToady the question is whether the <:foo> syntax is reserved only for UCD tables, I guess
17:57 TimToady or whether we just mix in the traditional Unix character classes
17:58 TimToady why do you guys keep asking interesting questions?
17:59 jnthn TimToady: Reward for rebooting :)
17:59 TimToady am I allowed to overflow my stack? :)
18:05 domidumont joined #perl6
18:11 sergot moritz++ thanks
18:11 sergot TimToady++ thank you too
18:18 TimToady nr: say "\c[0]a" ~~ /<+print>/
18:18 p6eval niecza v24-24-gbdc3343: OUTPUT«「a」␤␤»
18:18 p6eval ..rakudo b205e6: OUTPUT«Cursor<2069967580>Can not get attribute '$!pos' declared in class 'Cursor' with this object␤  in regex  at /tmp/BMoya5dSP6:1␤  in method ACCEPTS at src/gen/CORE.setting:10804␤  in block  at /tmp/BMoya5dSP6:1␤␤»
18:19 TimToady according to how S05 is currently written, <:foo> is only for Unicode properties, and the old Unix-ish character classes are written <+print> and such
18:19 TimToady so niecza looks righter here
18:20 TimToady I'm kinda inclined to leave it that way, since we have control over the method namespace, but we don't have control over the UCD namespace
18:21 TimToady so probably <.print> ought to work as well, since <+print> is (I presume) implemented as a print method
18:21 TimToady the other way would be to name mangle the <+print> into <.cclass-print> or some such, but not sure that buys us much
18:22 TimToady and there's something to be said for hiding the normal .print method, as yousay
18:23 TimToady and anyway, we've already kinda decided that any matcher can be used as a character class as long as it behaves well enough
18:23 TimToady so yeah, <.print> should probably work instead of <:print> in rakudo
18:24 SmokeMachine joined #perl6
18:25 TimToady sp++  # assuming PDP-11 semantics
18:28 uvtc Given `my $name = "uvtc";`, do we say that "the variable $name contains the string "uvtc"", or that $name "refers" to the string "uvtc"?
18:30 TimToady in this case the variable contains it because there's an implicit container in between
18:30 tadzik $name is a scalar container with a string inside, I think
18:30 TimToady but if you say 'my $name := "uvtc"' then there is no container, and the name refers to it
18:31 TimToady r: my $num = 42; say ++$42;
18:31 p6eval rakudo b205e6: OUTPUT«1␤»
18:31 TimToady r: my $num = 42; say ++$num;
18:31 p6eval rakudo b205e6: OUTPUT«43␤»
18:31 TimToady r: my $num := 42; say ++$num;
18:31 p6eval rakudo b205e6: OUTPUT«Cannot assign to a non-container␤  in sub prefix:<++> at src/gen/CORE.setting:3150␤  in block  at /tmp/_18ZxAk2AO:1␤␤»
18:31 TimToady someone needs to change that error s/assign to/modify/ at least
18:32 TimToady since no assignment is happening in the mind of the programmer
18:33 TimToady and 'non-container' is also probably less accurate than 'immutable value'
18:33 quester joined #perl6
18:34 uvtc thanks!
18:40 dalek rakudo/nom: 4d9c34a | jnthn++ | src/core/Exception.pm:
18:40 dalek rakudo/nom: Tweak an error message; TimToady++.
18:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4d9c34a305
18:40 SamuraiJack_ joined #perl6
18:40 jnthn Guess I $dayjab enough today...
18:41 jnthn Dinner, then I'll have some time to hack on stuff :)
18:44 * nwc10 points a radar gun at the goalposts...
18:45 TimToady it reads 0, because it won't show negative oncoming velocity :)
18:46 nwc10 maybe I need a lasso instead.
18:46 TimToady (you don't usually want to know how fast the cars on the other side of the road are going away)
18:46 FROGGS[mobile] joined #perl6
18:52 uvtc "If this bumper sticker appears blue, please slow down."
18:53 nwc10 :-)
18:58 domidumont joined #perl6
19:01 TimToady "But Officer, the light looked green to me!"
19:01 TimToady <gets speeding ticket for large fraction of C>
19:02 dalek perl6-roast-data: 65b1279 | coke++ | / (4 files):
19:02 dalek perl6-roast-data: today (automated commit)
19:02 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/65b1279021
19:08 TimToady http://rosettacode.org/wiki/Call_a_function_in_a_shared_library#Perl_6 with a boost from jnthn++
19:09 fgomez joined #perl6
19:09 cognominal joined #perl6
19:11 TimToady oh, also http://rosettacode.org/wiki/Include_a_file#Perl_6 though the last section is a bit of a lie
19:15 swarley| joined #perl6
19:15 cognominal__ joined #perl6
19:18 lichtkind_ joined #perl6
19:19 kst joined #perl6
19:20 fgomez joined #perl6
19:21 cognominal__ joined #perl6
19:26 TimToady 8 more to go before we catch Mathematica :)
19:26 TimToady and 8 more after that to Ada
19:27 Liz joined #perl6
19:28 dalek rakudo/nom: 0f97038 | moritz++ | docs/ (2 files):
19:28 dalek rakudo/nom: [docs] release announcements in markdown
19:28 dalek rakudo/nom:
19:28 dalek rakudo/nom: * update release_guide
19:28 dalek rakudo/nom: * add a template for the announcement for next month, provided by uvtc++
19:28 dalek rakudo/nom:
19:28 dalek rakudo/nom: the format we use is quite close to markdown already, and writing it
19:28 dalek rakudo/nom: in proper markdown makes them display nicely on github, and easier to
19:28 dalek rakudo/nom: translate to HTML
19:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0f970384a7
19:38 uvtc Does Perl 6 have knowledge of any other mathematical constants other than pi and e?
19:40 jnthn i
19:40 cognominal__ ...a short but complex answer
19:40 diakopter r: say e**(pi*i)
19:40 p6eval rakudo 4d9c34: OUTPUT«-1+1.22460635382238e-16i␤»
19:40 diakopter eh, pretty close
19:41 colomon cognominal__++
19:41 uvtc oh, built-in support for complex numbers!
19:41 raiph joined #perl6
19:42 uvtc I also see sqrt, log (base e), sin, cos, tan, and exp.
19:43 jasonmay whoa
19:44 diakopter raiph: I just wanted to express appreciation and admiration for your heroic efforts at defending Perl 6 [all aspects] on reddit, commentary on blogs/articles, etc. I dub thee chief apologist
19:46 colomon uvtc: I'm not quite sure what you're getting at there?  p6 has a pretty full suite of math functions (including those you list but quite a few others), but those aren't mathematical constants....
19:48 uvtc colomon: Sorry. I meant to finish that thought with, "could anyone please direct me to where I can find more listed?" but got sidetracked. The reason I ask is b/c I've been writing some notes up: http://www.unexpected-vortices.com/perl-6/compact-perl6-tut/numbers.html .
19:49 colomon uvtc: I think all the "official" ones are listed in S32.
19:49 colomon uvtc: I've added a few others to niecza, but haven't gotten around to adding them to the standard yet.  :)
19:49 raiph diakopter: the fuzzbot role was taken so i picked buzzbot. :)
19:49 colomon uvtc: http://perlcabal.org/syn/S32/Numeric.html specifically
19:50 uvtc colomon: thanks!
19:50 colomon nr: say sin(90 * Degrees)
19:50 cognominal__ joined #perl6
19:50 p6eval niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤        'Degrees' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /hom…
19:50 p6eval ..rakudo 4d9c34: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    Degrees used at line 1â�¤â�¤Â»
19:51 * colomon wonders when that snuck into the spec
19:51 * colomon does not wonder enough to be bothered to fire up blame
19:55 uvtc "I was converting 90 grad to degrees and everything went haywire!"
19:57 Chillance joined #perl6
19:58 TimToady n: say ∅
19:58 p6eval niecza v24-24-gbdc3343: OUTPUT«set()␤»
19:58 TimToady there's a constant :)
19:58 raiph Test errors after installing latest R* https://gist.github.com/raiph/5032649 # ???
20:00 colomon uvtc: for what it's worth, as nearly as I can tell the word "degree" does not appear in either Niecza or Rakudo at the moment.
20:00 colomon rn: sin(90.to-radians(Degrees));
20:00 p6eval niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤        'Degrees' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /hom…
20:00 p6eval ..rakudo 4d9c34: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    Degrees used at line 1â�¤â�¤Â»
20:02 uvtc I would just do any conversions like that by-hand.
20:03 benabik_ joined #perl6
20:05 raiph Anyone know if it's OK that I got test errors (see above gist) after installing the feb 24th R* on stock Ubuntu 12.10? Does it make sense to proceed to "make install"?
20:09 jlaire joined #perl6
20:10 fgomez joined #perl6
20:16 moritz raiph: yes, still makes sense to proceed
20:16 timotimo raiph: weird results. was your spec checkout from the right date? (but go ahead with make insatll anyway)
20:16 raiph moritz: thanks
20:17 MkdY joined #perl6
20:18 raiph timotimo: "spec checkout"? i just downloaded the tar.gz, extracted, cd'd, perl Configure.pl --gen-parrot; make; make rakudo-test
20:19 raiph timotimo: oops, also did more...
20:19 moritz timotimo: we bundle t/spec/ in rakudo releases
20:19 raiph timotimo: sudo aptitude install build-essential libicu-dev
20:20 raiph timotimo: sudo aptitude install build-essential libreadline-dev
20:20 raiph timotimo: just noticed i didn't sudo the configure / make. would that be a problem?
20:21 moritz no
20:21 raiph moritz: thanks
20:21 moritz the default prefix is ./install, for which you usually don't need root privs
20:21 uvtc raiph: no, with R* everything happens right in your Rakudo distribution directory.
20:24 timotimo oh, right, they are bundled
20:24 timotimo that makes sense indeed
20:25 benabik joined #perl6
20:26 benabik_ joined #perl6
20:27 * jnthn back from nom :)
20:28 dalek star: 2284987 | moritz++ | / (2 files):
20:28 dalek star: markdown template for release announcement, uvtc++
20:28 dalek star:
20:28 dalek star: makes it easier to convert to HTML for the rakudo.org wordpress blog
20:28 dalek star: review: https://github.com/rakudo/star/commit/2284987cd1
20:30 uvtc {breathes in deeply} Mmm, fresh markdown, right out of the oven.
20:31 moritz https://github.com/rakudo/star/blob/master/docs/announce/2013.03.md that how it'll look on github :-)
20:32 uvtc moritz: s/MONTH/March/
20:32 raiph make install done. ./perl6 works but ./perl6-debug says "No such file or directory"
20:32 xenoterracide joined #perl6
20:33 dalek star: 2dc87f6 | moritz++ | / (8 files):
20:33 dalek star: misisng substitution in announcement
20:33 dalek star: review: https://github.com/rakudo/star/commit/2dc87f6f41
20:33 moritz uvtc++
20:33 uvtc wheeeee :)
20:39 uvtc Liked mst's recent blog post http://shadow.cat/blog/matt-s-trout/passion-anguish/ . IMO, maintaining a nice community is pretty high up there in importance.
20:39 raiph uvtc++
20:41 moritz could any of the windows folks please build an .msi of the R* release?
20:45 mattp_ joined #perl6
20:47 snearch joined #perl6
20:48 snearch joined #perl6
20:49 MkdY left #perl6
20:58 xenoterracide joined #perl6
21:11 wk joined #perl6
21:22 Ulti moritz: is there windows build instructions somewhere?
21:24 moritz Ulti: there's an 'msi' makefile target
21:26 Ulti orly
21:26 Ulti I will investigate on my windows box
21:27 moritz star: say 42
21:27 p6eval star 2013.02: OUTPUT«"load_bytecode" couldn't find file 'SAFE.setting.pbc'␤current instr.: '' pc 5179 (src/gen/perl6-moduleloader.pir:2207) (src/Perl6/ModuleLoader.pm:261)␤called from Sub 'load_setting' pc 4935 (src/gen/perl6-moduleloader.pir:2101) (src/Perl6/ModuleLoader.pm:256)␤called…
21:27 Ulti since its fairly beefy and I feel bad that its only used for games
21:27 moritz :(
21:38 moritz star: say 42
21:38 p6eval star 2013.02: OUTPUT«"load_bytecode" couldn't find file 'SAFE.setting.pbc'␤current instr.: '' pc 5179 (src/gen/perl6-moduleloader.pir:2207) (src/Perl6/ModuleLoader.pm:261)␤called from Sub 'load_setting' pc 4935 (src/gen/perl6-moduleloader.pir:2101) (src/Perl6/ModuleLoader.pm:256)␤called…
21:39 skids Other than the "use an attribute in an object" trick, are there any syntactical tricks to utilize the new(ish) sized integer behavior?
21:40 p6eval joined #perl6
21:40 moritz star: say 42
21:40 p6eval star 2013.02: OUTPUT«"load_bytecode" couldn't find file 'SAFE.setting.pbc'␤current instr.: '' pc 5179 (src/gen/perl6-moduleloader.pir:2207) (src/Perl6/ModuleLoader.pm:261)␤called from Sub 'load_setting' pc 4935 (src/gen/perl6-moduleloader.pir:2101) (src/Perl6/ModuleLoader.pm:256)␤called…
21:41 moritz oops, it tries to load SAFE setting
21:41 moritz that's bad
21:41 moritz it took me three tries until I actually read the error message properly :(
21:42 timotimo oh, SAFE was abolisehd, no?
21:42 dalek evalbot: 427c2e8 | moritz++ | evalbot.pl:
21:42 dalek evalbot: s/SAFE/RESTRICTED/
21:42 dalek evalbot: review: https://github.com/perl6/evalbot/commit/427c2e858e
21:42 moritz just renamed to RESTRICTED
21:42 p6eval joined #perl6
21:42 moritz star: say 42
21:43 moritz in other news, I hope that p6eval now knows about star 2013.02
21:43 moritz time for sleep
21:43 p6eval star 2013.02: OUTPUT«42␤»
21:43 jnthn moritz++
21:43 jnthn 'night
21:44 timotimo because it really is not quite safe?
21:47 skids Nothing is.  If it's smaller than a golf ball, it's a choking hazard; larger, and it's a tripping hazard.
21:48 timotimo oh those dangerous electrons! many people probably died by choking on them!
21:49 japhb_ joined #perl6
22:02 fgomez joined #perl6
22:02 uvtc Double-quotish strings are sometimes referred to as "soft strings", correct? (with single-quotish being "hard strings"). Right?
22:02 cognominal joined #perl6
22:03 uvtc Can't recall where I've heard those terms...
22:06 uvtc Bah. n/m.
22:07 PerlJam uvtc: those terms are new to me.
22:08 uvtc Good enough to just call them them single-quotish and double-quotish I suppose.
22:09 xenoterracide joined #perl6
22:16 bbkr joined #perl6
22:20 dalek nqp: 59eaf0a | jnthn++ | src/QAST/Operations.nqp:
22:20 dalek nqp: Various nqp:: ops for I/O related things.
22:20 dalek nqp: review: https://github.com/perl6/nqp/commit/59eaf0a6e2
22:20 dalek nqp: dc21f68 | jnthn++ | src/stage0/ (9 files):
22:20 dalek nqp: Update bootstrap.
22:20 dalek nqp: review: https://github.com/perl6/nqp/commit/dc21f68c04
22:20 dalek nqp: 613cdac | jnthn++ | src/HLL/Compiler.pm:
22:20 dalek nqp: Use nqp:: ops for I/O stuff in HLL::Compiler.
22:20 dalek nqp: review: https://github.com/perl6/nqp/commit/613cdac6c9
22:20 dalek nqp: ae065ac | jnthn++ | src/core/IO.pm:
22:20 dalek nqp: Use nqp:: I/O ops for things in the setting.
22:20 dalek nqp: review: https://github.com/perl6/nqp/commit/ae065ac4d2
22:29 bbkr r: constant &roundcents ::= &round.assuming(:scale(1/100)); my num32 $x = 1.111111; roundcents($x).say
22:29 p6eval rakudo 0f9703: OUTPUT«Unexpected named parameter 'scale' passed␤  in sub round at src/gen/CORE.setting:2831␤  in sub CURRIED at src/gen/CORE.setting:1962␤  in block  at /tmp/oR2gpnVkK3:1␤␤»
22:29 uvtc Is there any reason to prefer heredocs for multi-line strings, rather than just writing them out (including returns) with quote marks around them?
22:31 uvtc Oh, I remember one benefit (actually, I think TimToady told has mentioned it here): heredocs allow you to close up your function call or whatever syntax, while letting the multi-line string itself not visually clog up the parts that matter.
22:32 jnthn That. Also they will remove indentation for you in Perl 6
22:32 jnthn so you can indent them to the same level of your code
22:35 bbkr what is wrong with my round example above? I'm not sure how to use priming correctly
22:35 uvtc Thanks, jnthn
22:35 uvtc .
22:36 jnthn bbkr: Does round actually take a scale parameter?
22:38 bbkr jnthn: I've taken example from http://perlcabal.org/syn/S32/Numeric.html#Real
22:42 bbkr r: Num.^find_method("round").signature.say
22:42 p6eval rakudo 0f9703: OUTPUT«:(Num : $scale = { ... }, Mu *%_)␤»
22:43 jnthn Looks like it's normal parameter
22:44 bbkr r: my num32 $x = 1.111111; $x.round(1/100).say
22:44 p6eval rakudo 0f9703: OUTPUT«1.11␤»
22:44 uvtc left #perl6
22:44 bbkr spec bug, param is no longer named :)
22:44 * bbkr creates GH issue
22:46 xenoterracide joined #perl6
22:48 bbkr I'm playing with NativeCall and GeoIP databases, CStruct return values work like a charm :)
22:48 jnthn nice :)
22:51 bbkr I'm not sure how to write union in struct (my C skills are rusty). if I have struct { union { int x; int y;} } should I declare both has $.x and $.y ?
22:52 jnthn No, 'cus there's only really one memory location...
22:52 jnthn The union elements share the space.
22:52 FROGGS[mobile] jnthn: btw, I'm tracking down the /<[abc]-[\wa]>/ issue, a bit more is fixed locally but still some weird results left
22:52 jnthn That's...not very easy to deal with at the moment in NativeCall...
22:53 FROGGS[mobile] jnthn: would you be able to have a look at a diff tomorrow?
22:54 bbkr does the name $.x/$.y matter or is struct unpacked using member sizes and denied order?
22:54 bbkr defined*
22:54 jnthn bbkr: The names are unimportant.
22:54 FROGGS[mobile] sizes only
22:54 jnthn bbkr: It's all about memory layout.
22:54 FROGGS[mobile] ya, so sizes and order
22:55 jnthn FROGGS[mobile]: Probably...though that bit of the code is a bit hairy...
22:55 jnthn ...and tomorrow will be a little distracted, at least in the day.
22:55 jnthn Anyway, pass me a gist or something and I'll look when I can.
22:55 jnthn Got Wed set aside for Perl 6 things if not.
22:56 bbkr jnthn: great, thanks. so far everything works so Perl6 will soon have GeoIP module for free and paid databases :)
22:56 FROGGS[mobile] np, just wanna get your thougts within the next days
22:56 jnthn bbkr: \o/
23:00 xenoterracide joined #perl6
23:02 dalek nqp: 1c2690e | jnthn++ | src/HLL/Compiler.pm:
23:02 dalek nqp: Start pulling out VM-specifics into HLL::Backend.
23:02 dalek nqp:
23:02 dalek nqp: The backend-specific stages also want to move there, but holding off
23:02 dalek nqp: on that pending application of the --target=pbc support.
23:02 dalek nqp: review: https://github.com/perl6/nqp/commit/1c2690e721
23:08 sweet_kid joined #perl6
23:08 diakopter jnthn++ abstractions++
23:09 FROGGS[mobile] jnthn: I hope my last one doesnt sound rude
23:09 jnthn FROGGS[mobile]: I didn't read it as such :)
23:09 FROGGS[mobile] :o)
23:10 FROGGS joined #perl6
23:12 xenoterracide joined #perl6
23:16 cognominal joined #perl6
23:22 FROGGS nqp: say("[" ~ ("ab123c" ~~ /<[abc]-[a]>+/) ~ "]")
23:22 p6eval nqp: OUTPUT«[b]␤»
23:22 baest joined #perl6
23:22 FROGGS nqp: say("[" ~ ("ab123c" ~~ /<[\w]-[a]>+/) ~ "]")
23:22 p6eval nqp: OUTPUT«[b123c]␤»
23:26 tipdbmp joined #perl6
23:27 benabik joined #perl6
23:36 xenoterracide joined #perl6
23:37 FROGGS jnthn: here it is: https://gist.github.com/FROGGS/5034374
23:37 FROGGS cant resist :P
23:39 FROGGS gnight all
23:40 * jnthn can't help but think that right now the best bet would be to take a step back, look at the problem afresh and then try a clean implementation of that chunk of the code...
23:42 jnthn Or at least re-consider the overall structure of it.
23:43 diakopter ya-know. An incredibly interesting feature could be for a special mode of the debugger to be that it inserts printfs all over the place *for you* automatically, perhaps filtered by type of activity "result of store/fetch" "return result of call", "arg value", etc.
23:43 diakopter er, s/printfs/says/
23:43 benabik Watchpoints?
23:44 benabik Although I guess arg/return is normally done with breaks.
23:44 diakopter right, but automatic
23:45 jnthn Should be doable.
23:45 diakopter (inspired by that gist)
23:45 jnthn The debugger gets to diddle with the QAST tree and hook whatever it wishes.
23:46 jnthn I would point out that the more such things you add, the more noticably slower things get.
23:46 jnthn But after seeing how much tracepoints in visual studio can slow down program execution, I don't worry about that too much ;)
23:47 diakopter .add_watchpoint($yourmom)
23:48 skids joined #perl6
23:49 diakopter another option is to provide debug output statements that are conditionally compiled only by the debugger or something like that
23:49 diakopter (manually written)
23:49 diakopter (so the non-debugger compiler would no-op them)
23:50 diakopter or, dependent on a flag or dynamic variable or ENV or whatever, 'cept the flag is compile-time
23:50 TimToady welcome to #perl6
23:52 * jnthn will have to have another round of debugger hacking at some point
23:52 jnthn There's loads more cool stuff to be done there :)
23:53 diakopter o wait, that last thing is just macros (...duh)
23:54 jnthn Well, time for some rest...
23:54 jnthn Hmm...it's $dayjob's birthday tomorrow. I think that means cake...
23:54 diakopter 'nite
23:54 jnthn 'night
23:55 colomon \o

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

Perl 6 | Reference Documentation | Rakudo