»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:08 dayangkun joined 00:12 thou joined 00:14 spider-mario left 00:22 Grrrr joined 00:24 wk left 00:29 raiph__ left, raiph left, raiph_ left, raiph609 left 00:31 raiph joined 00:35 Grrrr left 00:39 Grrrr joined 00:42 Chillance left 00:58 anuby joined 01:04 lustlife joined
[Coke] phenny: tell alester to check out www.warrenellis.com/?p=14655 01:36
phenny [Coke]: I'll pass that on when alester is around.
01:43 labster joined 01:49 thou left 02:38 FROGGS_ joined 02:42 FROGGS left 03:00 census left 03:25 orafu left 03:27 orafu joined 03:28 census joined 03:29 jfried joined 03:39 aindilis joined 03:40 census left 03:41 jaldhar left, jaldhar joined 03:49 leprevost left 03:57 SamuraiJack joined 04:01 dayangkun left 04:06 lue left 04:13 SamuraiJack left 04:16 SamuraiJack joined, fgomez left 04:19 odoacre left, odoacre joined 04:27 xinming left 04:29 xinming joined 04:31 uvtc left 04:40 preflex_ joined 04:41 preflex left, preflex_ is now known as preflex 04:43 fgomez joined 04:45 rindolf joined 05:00 thou joined
quester rn: "abc" ~~ m/<[\w]-[\n]>/ 05:36
p6eval rakudo b205e6, niecza v24-24-gbdc3343: ( no output )
quester rn: say ( "abc" ~~ m/<[\w]-[\n]>/ ); 05:39
p6eval rakudo b205e6, niecza v24-24-gbdc3343: OUTPUT«「a」␤␤»
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 rosettacode.org/wiki/Munching_squares#Perl_6 with a simple "baby Perl 6" method.
05:42 mtk left 05:44 mtk joined
diakopter I dunno if prefixing was the right thing 05:47
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:51
quester resolves to keep local copy of Rakudo up to date. Again. 05:52
05:57 SamuraiJack left 06:22 lizmat left 06:34 TheVenetianMask left 06:40 TheVenetianMask joined 06:41 TheVenetianMask is now known as Guest81461 06:45 Guest81461 left
moritz fixed the 2013.01 link in the R* announcement on rakudo.org 06:46
can't fix it in the email though :-)
06:46 kaare_ joined
cotto email's great like that 06:47
07:00 djanatyn joined 07:03 lue joined 07:04 djanatyn left, djanatyn joined 07:06 thou left 07:08 TheVenet1anMask joined 07:09 FROGGS_ left 07:11 quester left 07:16 djanatyn left 07:17 djanatyn joined 07:22 TheVenet1anMask left 07:23 TheVenet1anMask joined 07:27 Chillance joined 07:37 rindolf left
GlitchMr github.com/Keith-S-Thompson/fizzbu...zzbuzz.pl6 07:37
This piece of code is interesting
07:38 rindolf joined 07:44 rindolf left 07:50 SamuraiJack joined
TimToady RC has FizzBuzz in 160 languages already 07:54
07:58 FROGGS joined 08:05 fhelmberger joined 08:16 sqirrel joined 08:38 census joined 08:58 cosimo left 09:05 daxim joined 09:07 cosimo joined
jnthn morning o/ 09:14
09:17 balajikb joined
FROGGS morning 09:20
09:29 balajikb left
jnthn sips coffee and tries to work on $dayjob_task 09:29
09:38 kresike joined
kresike hello all you happy perl6 people 09:38
09:39 domidumont joined 09:47 krunen left
FROGGS kresike! \o/ 10:00
kresike FROGGS, o/ 10:01
10:02 sepegp joined 10:11 anuby left 10:25 labster left 10:29 grondilu_ joined 10:30 ObseLeTe joined 10:32 grondilu left 10:35 kaare_ left 10:39 raiph left 10:43 spider-mario joined
moritz wonders what happened to sirrobert 10:52
10:53 cognominal joined 10:59 spider-mario_ joined, spider-mario_ left
Guest2304 For the fizzbuzz code (github.com/Keith-S-Thompson/fizzbu...buzz.pl6), I switched the guillemets to <<~>> and Rakudo said No such method 'postcircumfix:<( )>' for invocant of type 'Parcel' 11:00
11:00 Guest2304 is now known as Ovidius, Ovidius is now known as Ovid, Ovid is now known as curtispoe
curtispoe Bah. 11:01
phenny curtispoe: 18 Feb 00:48Z <[Coke]> ask curtispoe if github.com/Ovid/Config-Tiny is gone or moved.
curtispoe phenny: tell coke That he's probably looking at my old 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.
jnthn Need whitespace around the infix 11:05
curtispoe jnthn: thanks, that fixed it.
jnthn std: my %h; say %h«~»
p6eval std 52fe6d2: OUTPUT«ok 00:00 42m␤» 11:06
jnthn r: my %h; say %h«~»
p6eval rakudo b205e6: OUTPUT«===SORRY!===␤Bogus statement␤at /tmp/aZzl3T8CTb:1␤------> my %h; say %h«~»⏏<EOL>␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ prefix or term␤ prefix or meta-prefix␤»
jnthn hm...
curtispoe Also, is that leading [~] somewhat superfluous in that code?
jnthn The code should never have worked with the «~» form, it seems. Wonder how we missed that postcircumfix... 11:07
yes, that looks like a misunderstanding wrt the [~]
The method call binds tighter
It looks like it's doing the right thing anyway (print on a list seems to work the right way) 11:08
11:09 salv0 left, salv0 joined
curtispoe So would this be more correct? print ((1..100).map: { $_ %% 15 ?? "FizzBuzz" !! $_ %% 3 ?? "Fizz" !! $_ %% 5 ?? "Buzz" !! $_ }) <<~>> ("\n"); 11:10
Actually, I think a join would probably be better than the hyperoperator there. More clear?
jnthn yeah, but it feels like it's using a hyperop for no reason at all 11:11
I'd write it just as .say for ...
That would save the join too 11:12
arnsholt r: gist.github.com/5021528
p6eval rakudo b205e6: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/Xkaem2bkfY:1␤------> https⏏://gist.github.com/5021528␤ expecting any of:␤ argument list␤ postfix␤ infix or meta-infix␤ infix stopper␤ statement end␤ …
arnsholt Huh. Didn't p6eval know how to eval gists in the past? 11:13
jnthn I thought it got patched too...
Oh, I wonder if it ever got restarted
p6eval: restart
evalbot restart
tadzik evalbot control restart
11:13 p6eval left, p6eval joined, ChanServ sets mode: +v p6eval
jnthn hah, that one :) 11:13
r: gist.github.com/5021528 11:14
tadzik r: say 1
arnsholt Huh.
tadzik oh noes, I killed it :(
jnthn ...everything went worse than expected /o\
p6eval rakudo b205e6: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/oHDRxzZP00:1␤------> https⏏://gist.github.com/5021528␤ expecting any of:␤ argument list␤ postfix␤ infix or meta-infix␤ infix stopper␤ statement end␤ …
rakudo b205e6: OUTPUT«1␤»
arnsholt jnthn: Anyways, that gist has some multidispatch oddness. Looks like constants interact oddly with multidispatch. Is that a known issue? 11:15
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
jnthn And if we "fix" multi-dispatch to let you pass boxed things where native types are expected we get other nasty problems.
arnsholt Sure, sure 11:17
jnthn oh...
I wonder if we can handle it as a failover
Though "can I make it work by trying harder" solutions can be a bit too magical.
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:20
arnsholt Right, right 11:22
But a non-multi will silently unbox an Int to int, no?
jnthn Yeah. 11:23
That discrepancy does make me unhappy.
arnsholt Excellent. Then I think I can just remove the int type constraint (it's not useful to multidispatch anyways)
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
jnthn wonders if TimToady++ will have any insights when he backlogs over this :)
arnsholt Let's hope so =) 11:26
11:26 wk joined
jnthn
.oO( A dancing sheep would baa clog )
11:28
11:31 not_gerd joined, sepegp left
not_gerd o/ 11:31
jnthn: is there some repr/MOP magic that makes it possible to do type punning (in particular int64 -> num)? 11:32
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
You could potentially write a REPR that had a union underneath.
So that it'd support nqp::unbox_n(nqp::box_i(42, MyTypeWithMagicalREPR)) 11:36
But we don't provide one that does that. 11:37
not_gerd it's probably easier then to just use nativecall
not_gerd want to use half-precision floats
^want
^want*s*
jnthn num32? :) 11:38
not_gerd num16
num32 is single-precision
jnthn oh
oh, yeah
11:38 kivutar joined
jnthn Hm :) 11:38
Does C even have a name for those?
not_gerd jnthn: no, it doesn't
some graphics cards come with hardware implementations, but your CPU/FPU normally doesn't 11:40
I just want to use them as a serialization target, so that's not a problem
11:41 cibs left
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:41
11:43 cibs joined
jnthn I wonder if you can do it with a buf and pack/unpack 11:44
not_gerd doesn't look like (un)pack supports floating point yet 11:49
I could construct the values using arithmetic operations instead of bit fiddling 12:10
will be pretty inefficient, but well..
FROGGS .oO( damnit, now I always wanna write my $var := ... in php >.< ) 12:16
not_gerd FROGGS: simple solution - stop using PHP ;) 12:18
FROGGS not_gerd: hmmm, that's a bit like stop earning money then :/
12:19 kivutar left 12:20 SamuraiJack left
kresike FROGGS, I stopped using php a long time ago, and still getting paid ☺ 12:20
12:26 TheVenet1anMask is now known as TheVenetianMask 12:27 TheVenetianMask is now known as Guest7878 12:28 Guest7878 is now known as TheVenetianMask 12:40 AigleNoir joined
daxim p3rl.org/Perl6::Perldoc 12:41
nwc10 jnthn: All tests still successful? Czech!
(although that pun is probably too subtle, and now might be out of date. This hour in horsemeat)
12:50 SmokeMachine joined 13:01 skids left
jnthn
.oO( What does this hour and a European hamburger have in common? :P )
13:09
Ulti they both have horse in
somehow
or at a minimum horse dna 13:10
13:10 ObseLeTe left
jnthn Sharing horsemeat jokes: the neig-hborly thing to do. 13:12
*neigh-borly...d'oh :)
daxim $a_horse->ISA('Horse') # of course, of course 13:13
13:13 SmokeMachine left 13:14 cognominal left, SmokeMachine joined
jnthn two terms in a...oh :) 13:14
13:22 sqirrel left
Ulti you can take a burger to water.... 13:28
not_gerd I did implement the half-precision floating point decoder, btw: gist.github.com/gerdr/5029902 13:51
if anyone wants to implement the encoder, go ahead
otherwise, I'll do it when I need it
13:54 spider-mario left 13:55 spider-mario joined
sergot hi o/ 14:04
FROGGS hi sergot
14:07 uvtc joined
uvtc moritz: what format does rakudo.org (wordpress) want the release announcement in? 14:09
moritz: re. irclog.perlgeek.de/perl6/2013-02-24#i_6493127
PerlJam uvtc: wordpress groks HTML easily enough. 14:12
(I think that's even it's internal storage format)
moritz yes, HTML with some caveats 14:13
for example each paragraph should be a single line
otherwise wordpress "helpfully" inserts <br /> tags for you, even if you enter it in the "HTML" view
14:14 bluescreen10 joined
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:14
14:15 PacoAir joined
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
then github could also show the announcements directly
uvtc Well, github would need a .md filename extension in order to do that. 14:16
Is this in the rakudo/rakudo repo, or the rakudo/star repo, or both?
moritz both 14:17
PerlJam or write them in pod and use pod2html
:-)
uvtc Oh, I just realized I don't have a commit bit. I can give you a gist, if you like.
moritz and yes, we can slap on the .md extension to the new announcements in the repos
uvtc: that would be helpful, yes
uvtc ok, will do presently... 14:18
14:20 census left 14:25 Patterner left
hoelzro does NQP 2013.02 require Parrot > 4.8.0? 14:25
moritz yes, 4.10.0 14:26
14:27 Psyche^ joined, Psyche^ is now known as Patterner
hoelzro ok, good to know =) 14:27
14:32 skids joined 14:39 census joined 14:43 SunilJoshi joined, SunilJoshi left 14:46 SunilJoshi joined 14:48 Chillance left
uvtc moritz: template for rakudo/rakudo release announcement: gist.github.com/uvtc/5030169 14:51
moritz: template for rakudo/star release announcement: gist.github.com/uvtc/5030261
Reminder: name with ".md" to be automatically rendered by github.
14:52 not_gerd left
uvtc I used a non-breakable space in "Perl 6" throughout. Also, used "MM" to indicate month, and "NN" to indicate release number. 14:52
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`
y/w
14:58 SunilJoshi left, benabik left 15:02 benabik joined 15:13 stevan__ joined 15:16 stevan_ left 15:27 zby_home joined 15:35 hash_table joined 15:43 benabik left
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
So having that extra copy appears redundant.
15:44 SunilJoshi joined
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:50
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.
FROGGS but it is always sane to add the install folder to $PATH, ya
uvtc FROGGS: Oh, I very much like that Rakudo installs into its own local "install" directory.
FROGGS no, the one in install/bin is the copy :o)
put that's not the point of `make install`, at least not for me 15:52
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:54
sergot Where can I find a really really good article about Perl 6 Grammars? 15:55
15:57 lichtkind joined
FROGGS uvtc: so the top level binary might be better in a _build directory, is that what you propose? 15:57
15:57 SunilJoshi left
FROGGS sergot: I can't if it is really really good, but maybe this: perl6advent.wordpress.com/2009/12/2...d-actions/ 15:58
sergot: perl6advent.wordpress.com/2009/12/2...d-grammar/
sergot: and the book, chapter 10: cloud.github.com/downloads/perl6/bo....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".
FROGGS uvtc: it does, ya :/
sergot FROGGS++ thanks 16:01
FROGGS sergot: you're welcome
16:08 thou joined
uvtc `perl6` is so quiet. Would expect it to tell me version info when I start up the repl. 16:17
jnthn Wouldn't that get pretty old after a while? :) 16:18
16:19 domidumont left
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
uvtc "Please click 'I agree' to use this repl." 16:24
jnthn 300 pages is a lot to say about copyright :) 16:25
Well, I guess some lawyers would manage it...
kresike bye folks 16:26
16:26 kresike left
daxim IT SHOULD PRINT A HUGE BANNER 16:26
16:27 uvtc left
jnthn __________ __ .___ 16:27
\______ \_____ | | ____ __ __| _/____ | _/\__ \ | |/ / | \/ __ |/ _ \ | | \ / __ \| <| | / /_/ ( <_> )
|____|_ /(____ /__|_ \____/\____ |\____/
...eek :)
\/ \/ \/ \/
...well, it said Rakudo in ASCII art before my IRC client managled it :P 16:28
I think it was annoying enough to know DO NOT WANT :)
16:29 FROGGS left 16:30 uvtc joined
tadzik ░█▀▀ ░█▀█ ░█ ░█▀▀ ░░█▀▀ ░█▀█ ░█ ░█ ░░░ 16:30
░█▀▀ ░█▀▀ ░█ ░█ ░░░░█▀▀ ░█▀█ ░█ ░█ ░░░
░▀▀▀ ░▀ ░░░▀ ░▀▀▀ ░░▀ ░░░▀░▀ ░▀ ░▀▀▀ ░ 16:31
...sorry, couldn't resist :)
jnthn :P
nwc10 :-)
daxim I can read that from across the room, well done
tadzik I actually have written a weechat plugin for this
TimToady hopes it's written in Perl 6 16:32
tadzik almost
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 ?
TimToady: Or did you mean something else? 16:34
TimToady load a .so or .dll
uvtc holy moly. If that isn't shouting, I don't know what is. :)
jnthn Well, NativeCall loads those, looks up a symbol and gives you a way to call it.
16:35 daxim left
jnthn That's what DBIish does for its database drivers, for example 16:36
TimToady there isn't much pod in NativeCall.pm6... 16:37
jnthn README has a bunch of docs, though 16:38
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
p6eval star 2012.12: OUTPUT«(signal SEGV)»
jnthn hm :)
wonder what the sig of dlsym is meant to be. :)
TimToady: The module is called NativeCall. The repo is zavolaj for...historical reasons. 16:42
There may be an argument for pulling the module into core these days.
TimToady what's the name of the module called? :P
jnthn "A module name" :P 16:43
TimToady anyhoo, thanks
jnthn All the guts of it are actually provided at VM level 16:44
TimToady what's a NativeCall on JVM?
TimToady is quibbling with the term "native" here...
jnthn There's JNI (Java Native Interface).
TimToady so NativeCall really means C_Call or some such
jnthn JNI also means "Native" in the dll/so sense. 16:45
16:45 brrt joined
TimToady would be nice to be able to use the same API everywhere 16:45
uvtc natives are getting restless...
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.
TimToady can NativeCall wrap JNI?
jnthn That's the goal. :) 16:46
Just needs some of arnsholt++, myself or somebody else to have the tuits to attack it :)
TimToady not bugging you, just askin' 16:47
jnthn didn't feel bugged :)
TimToady I know you have a think or two else to do first :)
jnthn Yeah, but it's also one of those things that won't want to wait too long.
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
hoelzro NativeCall is (to me) one of the coolest things about Perl 6
(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.
I expect the exact way NativeCall is written to vary a bit. 16:50
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
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 :)
nwc10 so Vienna's marketing slogan is "Wien is anders" (Vienna is different)
TimToady ist?
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
TimToady: yes, sorry ist
I can't type. I blame my fingers
jnthn That ist a good question...
nwc10 in that there's the original and the best, and Jython, and IronPython
TimToady you mean, as opposed to having multiple implementations on different VMs? 16:55
nwc10 yes.
exactly that
as best I'm aware, all the others are "different VM implies different implementation codebase"
TimToady I'm sure some of the implementations would like to take over the world that way
I think PyPy had some pretentions of replacing CPython at one point 16:56
nwc10 did they stop? :-) 16:57
I've stumbled across some curious Python heresy recently.
TimToady I think a certain Guido put his foot down on that subject
nwc10 aha.
TimToady but that was several years ago
things coulda changed since then
nwc10 He didn't purge the thoughtcrime at the bottom of this page: mercurial.808500.n3.nabble.com/Merc...19707.html
(mercurial's ticket on "no, we're not really going to port to Python 3 any time soon) 16:58
there's similar thoughtcrime on Trac's equivalent ticket: trac.edgewall.org/ticket/10083
anyway, that's a digression
TimToady
.oO(no observable demand)
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
Rakudo isn't the only Perl 6 implementation, of course.
nwc10 jnthn: which, longer term, seems a more efficient approach.
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
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:00
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:01
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" ? :-)
TimToady well, any code that depends on unspecced behavior could be viewed as potentially producing flying butt monkeys
nwc10 (digression - I thought that JRuby managed to be pretty performant even on Java (1.)6?)
TimToady: are they more painful than nasal daemons?
jnthn nwc10: To get the best out of those two wants different things these days. 17:03
TimToady doesn't know
nwc10 is glad to hear this
given "where there's muck there's brass", I'll stick to the monkeys.
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
17:05 brrt left
uvtc But each impl meshes nicely with its host platform. 17:05
17:05 kst left
TimToady it's nice if there are gates labelled Here Be Dragons though 17:06
.oO(use POSIX;)
uvtc One tradeoff with that, though, is: "this module only works with $impl" 17:07
or "only tested with $impl".
TimToady use Win32;
but yeah, perl has never been a procrustean bed when it comes to portability; some things just don't work everywhere 17:08
but that's no reason not to provide the functionality on a system that can support it 17:09
sometimes Write Once, Run Everywhere reduces to Write Zero Times, Run Nowhere 17:10
star; use NativeCall; sub foo() is native('NoNeSuCh') {...}; foo() 17:12
star: use NativeCall; sub foo() is native('NoNeSuCh') {...}; foo()
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, SunilJoshi joined
TimToady er, in any? surely that does not guarantee ordering 17:13
(if it's really a junctional any...) 17:14
hmm, is there any way to trap that error? 17:15
17:16 p5eval joined, bluescreen10 left
diakopter star: use NativeCall; sub foo(int $a) is native('libc') {...}; exit(3); say 'alive' 17:18
p6eval star 2012.12: ( no output )
diakopter star: use NativeCall; sub foo(int2 $a) is native('libc') {...}; exit(3); say 'alive'
p6eval star 2012.12: ( no output )
TimToady use NativeCall; BEGIN try sub foo() is native('NoNeSuCh') {...}; &foo() if &foo.defined; 17:19
^^ coredumps here
star: use NativeCall; BEGIN try sub foo() is native('NoNeSuCh') {...}; &foo() if &foo.defined;
p6eval star 2012.12: OUTPUT«(timeout)»
TimToady took too long coredumping :) 17:20
diakopter ETOILETOVERFLOW
uvtc Is the content at doc.perl6.org the same as you get via `p6doc`?
jnthn It doesn't look the symbol up until the first call. 17:21
TimToady star: use NativeCall; BEGIN try sub foo() is native('NoNeSuCh') {...}; 17:22
uvtc Whoops. Sorry --- the perl6/doc readme explains.
p6eval star 2012.12: OUTPUT«(timeout)»
jnthn ...that's a weird timeout. 17:23
TimToady star: use NativeCall; BEGIN try BEGIN sub foo() is native('NoNeSuCh') {...};
p6eval star 2012.12: OUTPUT«(timeout)»
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␤␤»…
diakopter o_o_
TimToady the RC page in question wants to be able to recover from a missing shared library
jnthn diakopter: Try just "is native"...it'll be available in process
TimToady is trying to figger out how to do that 17:25
jnthn star: use NativeCall; sub malloc(int $a) is native { * }
p6eval star 2012.12: ( no output )
jnthn like that
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)
p6eval star 2012.12: OUTPUT«False␤»
jnthn star: use NativeCall; sub malloc(int $a) is native returns OpaquePointer { * }; say defined malloc(100)
p6eval star 2012.12: OUTPUT«True␤»
jnthn :)
TimToady more generally, how do we trap trait errors?
diakopter star: knowhow Bar is repr("CPointer") { }; use NativeCall; sub free(OpaquePointer $a) is native {...}; free(Bar); say 'alive'
p6eval star 2012.12: OUTPUT«alive␤»
jnthn TimToady: It doesn't fail until the first call
TimToady: So a "try" on the call will do it. 17:27
Don't know the answer on the general "how to we catch trait application errors" though :)
17:27 p5eval left
jnthn *do 17:27
TimToady star: use NativeCall; BEGIN try sub foo() is native('NoNeSuCh') {*}; try foo(); 17:28
p6eval star 2012.12: OUTPUT«(timeout)»
TimToady star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; try foo();
p6eval star 2012.12: ( no output )
TimToady star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; try { foo() } // say "alive";
p6eval star 2012.12: ( no output )
TimToady ? 17:29
17:29 p5eval joined
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␤␤»…
diakopter star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; try { foo() }; say "alive";
p6eval star 2012.12: OUTPUT«alive␤»
jnthn star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; say (try { foo() })
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␤␤»…
jnthn star: use NativeCall; sub foo() is native('NoNeSuCh') {*}; say (try { foo() }).perl
p6eval star 2012.12: OUTPUT«X::AdHoc.new(payload => "Cannot locate native library 'NoNeSuCh.so'")␤» 17:30
colomon nice
diakopter you're an AdHoc
jnthn Oh...how old is that star?
Old enough to be before we fixed try
(to give back Nil, not the exception)
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'")␤»
jnthn star: say try die 'oh noes'
p6eval star 2012.12: OUTPUT«oh noes␤ in block at /tmp/zFNkuAwcNM:1␤␤»
jnthn r: say try die 'oh noes'
p6eval rakudo b205e6: OUTPUT«Nil␤»
TimToady yes, 2013.1 produces Nil 17:32
jnthn star: say $*VERSION # hmm, or how is it spelt...
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␤␤»
TimToady though I'm still wondering about trapping trait failures... 17:33
jnthn star: say $*PERL # hmm, or how is it spelt...
p6eval star 2012.12: OUTPUT«("name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2012.12", "release-number" => "", "build-date" => "2012-12-27T20:05:32Z", "codename" => ""}).hash␤»
jnthn ah :)
TimToady jnthn: um, it says what it is right there already before the colon
jnthn oh!!
jnthn feels dumb now :)
TimToady quick do something that makes you feel smarter!
17:34 gcole_ joined
jnthn hurries to finish up the $dayjob slides :) 17:34
TimToady oops
jnthn (thankfully, not doing these for an urgently pressing need) :)
(in fact, tyring to avert them becoming one in a week or two's time...)
uvtc What are the different purposes of .WHAT vs. .perl vs. .gist? 17:35
TimToady r: BEGIN try 1/0; 17:36
(coredump)
p6eval rakudo b205e6: OUTPUT«(timeout)»
jnthn :/
TimToady uvtc: to confuse newcomers, obviously :)
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
r: say 42.WHAT.WHAT.WHAT
p6eval rakudo b205e6: OUTPUT«(Int)␤»
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.
TimToady r: say 42.WHAT
p6eval rakudo b205e6: OUTPUT«(Int)␤»
TimToady r: print 42.WHAT
p6eval rakudo b205e6: OUTPUT«use of uninitialized variable $v of type Int in string context in block at /tmp/d8BuLVmsvW:1␤␤»
uvtc r: say Int().WHAT
p6eval rakudo b205e6: OUTPUT«(Int)␤»
jnthn It actually stack overflows...
TimToady which is why it times out, yes 17:39
uvtc Does .gist give a "human readable" version of what .perl provides? 17:40
17:40 SamuraiJack joined
TimToady yes, and often shorter 17:40
where a human can interpret
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.
TimToady though in the case of a type object, we add parens 17:41
so they don't think it's just a string
uvtc Ok, thanks. 17:42
TimToady and say implies .gist, so you don't usually need that 17:43
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 17:47 fgomez left
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?
something like \w, or?
17:48 benabik joined
moritz nr: say "\c[0]a" ~~ /<.print>/ 17:49
p6eval niecza v24-24-gbdc3343: OUTPUT«「a」␤␤»
..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␤␤»
TimToady nr: say "\c[0]a" ~~ /<:print>/ 17:51
p6eval niecza v24-24-gbdc3343: OUTPUT«===SORRY!===␤␤PRINT does not exist as a UCD table at /tmp/mAoSQ7iVJO line 1:␤------> say "\c[0]a" ~~ /<:print⏏>/␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) ␤ …
..rakudo b205e6: OUTPUT«「a」␤␤»
jnthn moritz: We can implement a method print in Cursor to make that one work, I think...
Of course, it overrides a certain other print ;) 17:52
TimToady why not just use :print?
jnthn That also works :)
Should <.print> work?
Or should it fail with an error more like "no, that's not the protocol to use, you're meant to return a Cursor"...
dalek rl6-roast-data: 4fbcdd6 | coke++ | / (4 files):
today (automated commit)
[Coke] rn: say q“a” 17:56
17:56 wk left
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􏿽xE2􏿽x90 17:56
..niecza v24-24-gbdc3343: OUTPUT«a␤»
[Coke] rn: say q‘a’
TimToady hmm, currently specced as a predefined rule, and niecza is probably correct that it doesn't occur in UCD tables...
p6eval niecza v24-24-gbdc3343: OUTPUT«a␤»
..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
[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
or whether we just mix in the traditional Unix character classes
why do you guys keep asking interesting questions? 17:58
jnthn TimToady: Reward for rebooting :) 17:59
TimToady am I allowed to overflow my stack? :)
18:05 domidumont joined 18:09 cognominal left
sergot moritz++ thanks 18:11
TimToady++ thank you too
18:18 SmokeMachine left
TimToady nr: say "\c[0]a" ~~ /<+print>/ 18:18
p6eval niecza v24-24-gbdc3343: OUTPUT«「a」␤␤»
..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␤␤»
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
so niecza looks righter here
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:20
so probably <.print> ought to work as well, since <+print> is (I presume) implemented as a print method 18:21
18:21 domidumont left
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:21
and there's something to be said for hiding the normal .print method, as yousay 18:22
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
so yeah, <.print> should probably work instead of <:print> in rakudo
18:24 SmokeMachine joined
TimToady sp++ # assuming PDP-11 semantics 18:25
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:28
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
TimToady but if you say 'my $name := "uvtc"' then there is no container, and the name refers to it
r: my $num = 42; say ++$42; 18:31
p6eval rakudo b205e6: OUTPUT«1␤»
TimToady r: my $num = 42; say ++$num;
p6eval rakudo b205e6: OUTPUT«43␤»
TimToady r: my $num := 42; say ++$num;
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␤␤»
TimToady someone needs to change that error s/assign to/modify/ at least
since no assignment is happening in the mind of the programmer 18:32
and 'non-container' is also probably less accurate than 'immutable value' 18:33
18:33 quester joined
uvtc thanks! 18:34
18:36 SunilJoshi left
dalek kudo/nom: 4d9c34a | jnthn++ | src/core/Exception.pm:
Tweak an error message; TimToady++.
18:40
18:40 SamuraiJack_ joined
jnthn Guess I $dayjab enough today... 18:40
Dinner, then I'll have some time to hack on stuff :) 18:41
18:41 SamuraiJack left
nwc10 points a radar gun at the goalposts... 18:44
TimToady it reads 0, because it won't show negative oncoming velocity :) 18:45
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
uvtc "If this bumper sticker appears blue, please slow down." 18:52
nwc10 :-) 18:53
18:59 domidumont joined
TimToady "But Officer, the light looked green to me!" 19:01
<gets speeding ticket for large fraction of C>
dalek rl6-roast-data: 65b1279 | coke++ | / (4 files):
today (automated commit)
19:02
19:07 SamuraiJack_ left
TimToady rosettacode.org/wiki/Call_a_functio...ary#Perl_6 with a boost from jnthn++ 19:08
19:09 fgomez joined, cognominal joined
TimToady oh, also rosettacode.org/wiki/Include_a_file#Perl_6 though the last section is a bit of a lie 19:11
19:11 fhelmberger left 19:15 swarley| joined, cognominal__ joined 19:16 cognominal left 19:17 fgomez left 19:18 lichtkind_ joined 19:19 kst joined 19:20 fgomez joined, cognominal__ left 19:21 lichtkind left, cognominal__ joined
TimToady 8 more to go before we catch Mathematica :) 19:26
and 8 more after that to Ada
19:27 Liz joined 19:28 Liz is now known as Guest45541, Guest45541 is now known as lizmat
dalek kudo/nom: 0f97038 | moritz++ | docs/ (2 files):
[docs] release announcements in markdown

  * update release_guide
  * add a template for the announcement for next month, provided by uvtc++
the format we use is quite close to markdown already, and writing it in proper markdown makes them display nicely on github, and easier to translate to HTML
19:28
uvtc Does Perl 6 have knowledge of any other mathematical constants other than pi and e? 19:38
jnthn i 19:40
cognominal__ ...a short but complex answer
diakopter r: say e**(pi*i)
p6eval rakudo 4d9c34: OUTPUT«-1+1.22460635382238e-16i␤»
diakopter eh, pretty close
colomon cognominal__++ 19:41
uvtc oh, built-in support for complex numbers!
19:41 raiph joined
uvtc I also see sqrt, log (base e), sin, cos, tan, and exp. 19:42
jasonmay whoa 19:43
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:44
19:45 fgomez left
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:46
19:47 cognominal__ left
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: www.unexpected-vortices.com/perl-6/...mbers.html . 19:48
colomon uvtc: I think all the "official" ones are listed in S32. 19:49
uvtc: I've added a few others to niecza, but haven't gotten around to adding them to the standard yet. :)
raiph diakopter: the fuzzbot role was taken so i picked buzzbot. :)
colomon uvtc: perlcabal.org/syn/S32/Numeric.html specifically
uvtc colomon: thanks! 19:50
colomon nr: say sin(90 * Degrees)
19:50 cognominal__ joined
p6eval niecza v24-24-gbdc3343: OUTPUT«===SORRY!===␤␤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
..rakudo 4d9c34: OUTPUT«===SORRY!===␤Undeclared name:␤ Degrees used at line 1␤␤»
colomon wonders when that snuck into the spec 19:51
colomon does not wonder enough to be bothered to fire up blame
uvtc "I was converting 90 grad to degrees and everything went haywire!" 19:55
19:57 Chillance joined
TimToady n: say ∅ 19:58
p6eval niecza v24-24-gbdc3343: OUTPUT«set()␤»
TimToady there's a constant :)
raiph Test errors after installing latest R* gist.github.com/raiph/5032649 # ???
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
rn: sin(90.to-radians(Degrees));
p6eval niecza v24-24-gbdc3343: OUTPUT«===SORRY!===␤␤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…
..rakudo 4d9c34: OUTPUT«===SORRY!===␤Undeclared name:␤ Degrees used at line 1␤␤»
uvtc I would just do any conversions like that by-hand. 20:02
20:03 benabik_ joined
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:05
20:05 cognominal__ left 20:06 benabik left, benabik_ is now known as benabik 20:08 domidumont left 20:09 jlaire joined 20:10 fgomez joined 20:11 awwaiid left
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)
raiph moritz: thanks
20:17 benabik left, MkdY joined
raiph timotimo: "spec checkout"? i just downloaded the tar.gz, extracted, cd'd, perl Configure.pl --gen-parrot; make; make rakudo-test 20:18
timotimo: oops, also did more... 20:19
20:19 gcole left
moritz timotimo: we bundle t/spec/ in rakudo releases 20:19
raiph timotimo: sudo aptitude install build-essential libicu-dev
timotimo: sudo aptitude install build-essential libreadline-dev 20:20
timotimo: just noticed i didn't sudo the configure / make. would that be a problem?
moritz no 20:21
raiph moritz: thanks
moritz the default prefix is ./install, for which you usually don't need root privs
uvtc raiph: no, with R* everything happens right in your Rakudo distribution directory.
timotimo oh, right, they are bundled 20:24
that makes sense indeed
20:25 benabik joined 20:26 benabik_ joined 20:27 xenoterracide left
jnthn back from nom :) 20:27
dalek ar: 2284987 | moritz++ | / (2 files):
markdown template for release announcement, uvtc++

makes it easier to convert to HTML for the rakudo.org wordpress blog
20:28
uvtc {breathes in deeply} Mmm, fresh markdown, right out of the oven. 20:30
20:30 benabik left, benabik_ is now known as benabik
moritz github.com/rakudo/star/blob/master...2013.03.md that how it'll look on github :-) 20:31
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
dalek ar: 2dc87f6 | moritz++ | / (8 files):
misisng substitution in announcement
20:33
moritz uvtc++
uvtc wheeeee :)
Liked mst's recent blog post shadow.cat/blog/matt-s-trout/passion-anguish/ . IMO, maintaining a nice community is pretty high up there in importance. 20:39
raiph uvtc++
moritz could any of the windows folks please build an .msi of the R* release? 20:41
20:45 mattp_ joined 20:47 snearch joined 20:48 snearch left, snearch joined 20:49 MkdY left 20:52 xenoterracide left 20:54 fgomez left 20:58 xenoterracide joined 21:00 zby_home left 21:09 hash_table left 21:11 SmokeMachine left, wk joined
Ulti moritz: is there windows build instructions somewhere? 21:22
moritz Ulti: there's an 'msi' makefile target 21:24
Ulti orly 21:26
I will investigate on my windows box
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…
Ulti since its fairly beefy and I feel bad that its only used for games
moritz :(
21:29 snearch left
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 p6eval left
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:39
21:40 p6eval joined, ChanServ sets mode: +v p6eval
moritz star: say 42 21:40
21:40 benabik left
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:40
moritz oops, it tries to load SAFE setting 21:41
that's bad
it took me three tries until I actually read the error message properly :(
timotimo oh, SAFE was abolisehd, no? 21:42
21:42 p6eval left
dalek albot: 427c2e8 | moritz++ | evalbot.pl:
s/SAFE/RESTRICTED/
21:42
moritz just renamed to RESTRICTED
21:42 p6eval joined, ChanServ sets mode: +v p6eval
moritz star: say 42 21:42
in other news, I hope that p6eval now knows about star 2013.02 21:43
time for sleep
p6eval star 2013.02: OUTPUT«42␤»
jnthn moritz++
'night
timotimo because it really is not quite safe? 21:44
skids Nothing is. If it's smaller than a golf ball, it's a choking hazard; larger, and it's a tripping hazard. 21:47
timotimo oh those dangerous electrons! many people probably died by choking on them! 21:48
21:49 japhb_ joined 22:02 fgomez joined
uvtc Double-quotish strings are sometimes referred to as "soft strings", correct? (with single-quotish being "hard strings"). Right? 22:02
22:02 cognominal joined
uvtc Can't recall where I've heard those terms... 22:03
22:03 xenoterracide left 22:04 lustlife left 22:06 skids left
uvtc Bah. n/m. 22:06
PerlJam uvtc: those terms are new to me. 22:07
22:07 tipdbmp left
uvtc Good enough to just call them them single-quotish and double-quotish I suppose. 22:08
22:09 xenoterracide joined 22:16 bbkr joined
dalek p: 59eaf0a | jnthn++ | src/QAST/Operations.nqp:
Various nqp:: ops for I/O related things.
22:20
p: dc21f68 | jnthn++ | src/stage0/ (9 files):
Update bootstrap.
p: 613cdac | jnthn++ | src/HLL/Compiler.pm:
Use nqp:: ops for I/O stuff in HLL::Compiler.
p: ae065ac | jnthn++ | src/core/IO.pm:
Use nqp:: I/O ops for things in the setting.
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␤␤»
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?
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:31
22:33 PacoAir left
jnthn That. Also they will remove indentation for you in Perl 6 22:33
so you can indent them to the same level of your code
bbkr what is wrong with my round example above? I'm not sure how to use priming correctly 22:35
uvtc Thanks, jnthn
.
jnthn bbkr: Does round actually take a scale parameter? 22:36
bbkr jnthn: I've taken example from perlcabal.org/syn/S32/Numeric.html#Real 22:38
22:39 xenoterracide left
bbkr r: Num.^find_method("round").signature.say 22:42
p6eval rakudo 0f9703: OUTPUT«:(Num : $scale = { ... }, Mu *%_)␤»
jnthn Looks like it's normal parameter 22:43
bbkr r: my num32 $x = 1.111111; $x.round(1/100).say 22:44
p6eval rakudo 0f9703: OUTPUT«1.11␤»
22:44 uvtc left
bbkr spec bug, param is no longer named :) 22:44
bbkr creates GH issue
22:46 xenoterracide joined
bbkr I'm playing with NativeCall and GeoIP databases, CStruct return values work like a charm :) 22:48
jnthn nice :)
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:51
jnthn No, 'cus there's only really one memory location... 22:52
The union elements share the space.
FROGGS[mobile] jnthn: btw, I'm tracking down the /<[abc]-[\wa]>/ issue, a bit more is fixed locally but still some weird results left
jnthn That's...not very easy to deal with at the moment in NativeCall...
FROGGS[mobile] jnthn: would you be able to have a look at a diff tomorrow? 22:53
bbkr does the name $.x/$.y matter or is struct unpacked using member sizes and denied order? 22:54
defined*
jnthn bbkr: The names are unimportant.
FROGGS[mobile] sizes only
jnthn bbkr: It's all about memory layout.
22:54 xenoterracide left
FROGGS[mobile] ya, so sizes and order 22:54
jnthn FROGGS[mobile]: Probably...though that bit of the code is a bit hairy... 22:55
...and tomorrow will be a little distracted, at least in the day.
Anyway, pass me a gist or something and I'll look when I can.
Got Wed set aside for Perl 6 things if not.
bbkr jnthn: great, thanks. so far everything works so Perl6 will soon have GeoIP module for free and paid databases :) 22:56
22:56 bluescreen100 left
FROGGS[mobile] np, just wanna get your thougts within the next days 22:56
jnthn bbkr: \o/
23:00 xenoterracide joined 23:01 wk left
dalek p: 1c2690e | jnthn++ | src/HLL/Compiler.pm:
Start pulling out VM-specifics into HLL::Backend.

The backend-specific stages also want to move there, but holding off on that pending application of the --target=pbc support.
23:02
23:05 xenoterracide left 23:08 sweet_kid joined
diakopter jnthn++ abstractions++ 23:08
FROGGS[mobile] jnthn: I hope my last one doesnt sound rude 23:09
jnthn FROGGS[mobile]: I didn't read it as such :)
FROGGS[mobile] :o)
23:10 FROGGS joined 23:11 cognominal left 23:12 xenoterracide joined 23:16 cognominal joined 23:22 baest left
FROGGS nqp: say("[" ~ ("ab123c" ~~ /<[abc]-[a]>+/) ~ "]") 23:22
p6eval nqp: OUTPUT«[b]␤»
23:22 baest joined
FROGGS nqp: say("[" ~ ("ab123c" ~~ /<[\w]-[a]>+/) ~ "]") 23:22
p6eval nqp: OUTPUT«[b123c]␤»
23:26 tipdbmp joined 23:27 benabik joined 23:33 xenoterracide left 23:36 xenoterracide joined
FROGGS jnthn: here it is: gist.github.com/FROGGS/5034374 23:37
cant resist :P
gnight all 23:39
23:39 FROGGS[mobile] left
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:40
Or at least re-consider the overall structure of it. 23:42
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
er, s/printfs/says/
benabik Watchpoints?
Although I guess arg/return is normally done with breaks. 23:44
diakopter right, but automatic
jnthn Should be doable. 23:45
diakopter (inspired by that gist)
jnthn The debugger gets to diddle with the QAST tree and hook whatever it wishes.
I would point out that the more such things you add, the more noticably slower things get. 23:46
But after seeing how much tracepoints in visual studio can slow down program execution, I don't worry about that too much ;)
diakopter .add_watchpoint($yourmom) 23:47
23:48 skids joined
diakopter another option is to provide debug output statements that are conditionally compiled only by the debugger or something like that 23:49
(manually written)
(so the non-debugger compiler would no-op them)
or, dependent on a flag or dynamic variable or ENV or whatever, 'cept the flag is compile-time 23:50
TimToady welcome to #perl6
jnthn will have to have another round of debugger hacking at some point 23:52
There's loads more cool stuff to be done there :)
diakopter o wait, that last thing is just macros (...duh) 23:53
jnthn Well, time for some rest... 23:54
Hmm...it's $dayjob's birthday tomorrow. I think that means cake...
diakopter 'nite
jnthn 'night
colomon \o 23:55