Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-08-17

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 whiteknight joined #perl6
00:15 orphu joined #perl6
00:19 takadonet1 joined #perl6
00:20 drbean joined #perl6
00:30 thowe joined #perl6
01:03 tokuhirom joined #perl6
01:24 rafl joined #perl6
01:26 hillu joined #perl6
01:52 cogno_ joined #perl6
02:26 [Coke] parrot 3.7.0 out.
02:27 [Coke] someone should bump the revs to get testing.
02:31 woosley joined #perl6
02:32 abercrombie good news
02:40 [Coke] hai?
02:46 takadonet1 hey all
02:51 _jaldhar_ joined #perl6
02:57 dalek roast: f351e47 | Coke++ | S03-operators/overflow.t:
02:57 dalek roast: nom fudge
02:57 dalek roast: review: https://github.com/perl6/roast/commit/f351e475ee
02:58 [Coke] there's another ~100 tests. thanks to whoever made that work
02:58 dalek rakudo/nom: 22d4296 | Coke++ | t/spectest.data:
02:58 dalek rakudo/nom: run this (fudged) spectest
02:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/22d429697c
03:15 slavik2 joined #perl6
03:19 cotto joined #perl6
03:21 * [Coke] wonders if you can perlbrew a perl with threads.
03:23 Su-Shee_ joined #perl6
03:24 sorear heh. I wouldn't be suprised if you couldn't
03:35 nbrown joined #perl6
03:36 uniejo_in_riga joined #perl6
03:48 Eevee left #perl6
03:54 birdwindupbird joined #perl6
04:01 wheelnotkiss joined #perl6
04:04 wheelnotkiss joined #perl6
04:06 daniel-s joined #perl6
04:09 odoacre joined #perl6
04:13 satyavvd joined #perl6
04:23 thou joined #perl6
04:27 pmichaud good morning, #perl6
04:27 thowe hi
04:31 sorear hi
04:36 moritz good morning
04:37 * thowe is building rakudo for the first time in about a year
04:37 moritz [Coke]: perlbrew install perl-5.14.0 -D usethreads § iirc
04:40 thowe hrm... "Parrot VM: PANIC: Out of mem!" ... guess I'm not.
04:44 sorear is it legitimately out of mem or bugging?
04:44 sorear sometimes it gets confused, tries to make a request for >1GB, and panics
04:44 thowe Failed allocation of 4096 bytes
04:46 thowe closed some programs and trying again...
04:46 thowe been on the same command a long time...
04:47 thowe bleh, died :(
04:50 thowe maybe I shouldn't be trying to compile latest git
04:51 thowe was doing "How to get Rakudo nom"
04:54 thowe I'll try the 2011.07
04:55 satyavvd joined #perl6
04:59 lue joined #perl6
05:05 Sarten-X joined #perl6
05:06 Tene joined #perl6
05:06 Tene joined #perl6
05:08 chadadavis joined #perl6
05:09 jaldhar joined #perl6
05:17 dalek nqp: 6fe5a07 | moritz++ | tools/build/PARROT_REVISION:
05:17 dalek nqp: bump PARROT_REVISION to 3.7.0
05:17 dalek nqp: review: https://github.com/perl6/nqp/commit/6fe5a07f79
05:18 dalek rakudo/nom: c75ed52 | moritz++ | src/core/Str.pm:
05:18 dalek rakudo/nom: respect sign in "-:16<AB>".Numeric
05:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c75ed52339
05:18 dalek rakudo/nom: f959eac | moritz++ | tools/build/NQP_REVISION:
05:18 dalek rakudo/nom: require an NQP that requires parrot 3.7
05:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f959eacc9d
05:28 envi joined #perl6
05:35 uniejo_in_riga joined #perl6
05:36 masak joined #perl6
05:37 masak yay! the Little Animal Farm lightning talk has been accepted! \o/
05:37 sorear \o/
05:37 masak delivery later today.
05:37 * sorear is never sure what to think when his fame stat incremements
05:39 SHODAN joined #perl6
05:41 masak just to be clear, we're going to mention that there is a Niecza implementation of LAF, written by Stefan O'Rear. that's about it.
05:42 masak maybe I'll mention that it's slightly shorter than the Rakudo version.
05:43 sorear well sure, but even that is a bit more than I'm used to
05:43 masak ;)
05:45 wheelnotkiss joined #perl6
05:45 masak wheelnotkiss: hi! welcome!
05:46 sorear hello wheelnotkiss!  (Am I supposed to know you?)
05:46 moritz \o
05:46 wheelnotkiss who moritz
05:46 masak moritz is a nice guy.
05:46 * moritz would like to hear a talk "Yieldings the Chain Saw: How To Solve Circularity Issues in Bootstrapping Compilers" or so
05:47 moritz ... except when I'm not :-)
05:47 masak moritz: you'll just have to give one! ;)
05:49 sorear it helps a lot if you design your compiler to compile stuff in a different namespace than the compiler itself uses
05:49 sorear on the other hand, it also hurts, as not having a common Mu type makes macros harder
06:00 masak sorear: you could wrap the compiler-side types in facade user-side types when the user needs to handle them.
06:02 sorear masak: yeah, that's what I'm planning to do
06:02 sorear the main blocker is figuring out serialization stuff.  my $x; BEGIN $x = 5; say $x might seriously violate POLS if I try to add BEGIN without serialization
06:07 masak why?
06:07 masak ah -- BEGIN *without* serialization. nvm.
06:08 masak well, Perl 6basically forces the language implementor into a thinking where the line between compile-time and run-time isn't very clear at all. that's part of the language.
06:08 masak but you know this already :)
06:08 TimToady always has it been thus :)
06:10 TimToady masak: you have any bright ideas for an expeditious way to turn RC entries into tests?
06:11 masak TimToady: no, just toil :/
06:11 masak I don't see it being a very automatable task.
06:11 TimToady if we automate it, it would need to be something the developer can do, but that the user doesn't have to
06:12 TimToady I do have a snap of RC code entries from about a month ago
06:12 masak pmichaud said he wouldn't mind whole entries going in. that makes it easier.
06:12 TimToady I can probably get a fresher snap from the same source, though maybe not today
06:12 masak one month sounds fine.
06:12 masak the age doesn't really matter for finding bugs.
06:12 TimToady the downside is that the entries have coded names
06:13 masak as long as they're not bugs in the RC code :P
06:13 TimToady so you have to look at it and decide which entry it came from :/
06:14 TimToady so maybe we want something more closely tied to the actual RC task name
06:14 TimToady the actual HTML is hard to scrape, alas
06:14 TimToady esp if syntax hilit
06:14 masak oh, you just want to throw everything in there?
06:14 masak maybe one could scrape the source somehow?
06:15 TimToady well, <lang perl6> tags are probably easy to find
06:15 TimToady but a bunch of hilighting tags are inside with a little bit of code
06:15 TimToady maybe they can be stripped
06:15 masak maybe.
06:15 TimToady (referring to the actual page, not the ones I have on disk)
06:16 TimToady anyway, I can show you them
06:16 TimToady I guess we'll start wandering down to the venue now
06:17 masak o/
06:17 Reaganomicon joined #perl6
06:18 sorear why scrape the HTML?  wouldn't it be easier to scrape wiki markup?  mikemol would, I am certain, be thrilled to provide #perl6 with database dumps
06:19 masak right, that's what I meant above.
06:20 moritz you can capture the output from rakudo/master for the RC entries, and write it to a file
06:20 moritz and then write a short test harness that executes the stuff, and compares the output to the stored output
06:21 uniejo_in_riga joined #perl6
06:25 cotto joined #perl6
06:33 Kivutarrr joined #perl6
06:36 cottoo joined #perl6
06:36 koban joined #perl6
06:41 uniejo_in_riga joined #perl6
06:44 * masak --> venue
06:48 saaki joined #perl6
06:55 chadadavis joined #perl6
06:56 kolyuchiy joined #perl6
07:10 clkao joined #perl6
07:15 masak joined #perl6
07:15 chadadavis1 joined #perl6
07:23 chadadavis joined #perl6
07:32 masak joined #perl6
07:36 pmichaud good morning, #perl6
07:37 moritz good am, pm
07:41 chadadavis1 joined #perl6
07:45 uniejo_in_riga joined #perl6
07:48 mj41 joined #perl6
07:52 moritz nom: sub f() { nqp::unbox_s('foo') }; say f
07:52 p6eval nom: OUTPUT«Method 'gist' not found for invocant of class 'String'␤  in sub say at src/gen/CORE.setting:4565␤  in mu <anon> at /tmp/9aU56lVZSf:1␤  in mu <anon> at /tmp/9aU56lVZSf:1␤␤»
08:03 chadadavis joined #perl6
08:07 moritz is there a good reason for having a p5chomp and p5chop, but not a p5substr, p5split etc.?
08:07 moritz (if my intention is not clear, I'd like to get rid of the p5chom?p
08:07 moritz )
08:13 dalek rakudo/nom: 6cac7f1 | moritz++ | / (2 files):
08:13 dalek rakudo/nom: implement p5chomp, p5chop (scalar case only)
08:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6cac7f1d1b
08:15 noganex left #perl6
08:16 noganex joined #perl6
08:20 uniejo_in_riga joined #perl6
08:21 agentzh joined #perl6
08:22 sorear +1 to killing p5chomp
08:24 noganex left #perl6
08:27 chadadavis joined #perl6
08:28 masak joined #perl6
08:34 M_o_C joined #perl6
08:38 wamba joined #perl6
08:40 araujo joined #perl6
08:40 araujo joined #perl6
08:41 fhelmberger joined #perl6
08:48 cottoo joined #perl6
08:51 Kivutarrr left #perl6
09:05 masak joined #perl6
09:06 uniejo_in_riga joined #perl6
09:20 im2ee joined #perl6
09:22 im2ee joined #perl6
09:30 MayDaniel joined #perl6
09:31 kolyuchiy joined #perl6
09:35 M_o_C joined #perl6
09:36 Gothmog_ joined #perl6
09:40 dalek roast: a2f2b73 | moritz++ | S32-str/ (3 files):
09:40 dalek roast: fudge split-simple.t and p5chom?p tests
09:40 dalek roast: review: https://github.com/perl6/roast/commit/a2f2b73592
09:43 masak joined #perl6
09:43 dalek rakudo/nom: 43f9e11 | moritz++ | / (3 files):
09:43 dalek rakudo/nom: fix split, run split-simple.t
09:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/43f9e11628
09:44 im2ee joined #perl6
09:44 moritz I'm now confident that nom's .split can do the same as rakudo/master's, modulo NYI regex features
09:47 chadadavis1 joined #perl6
09:47 cottoo joined #perl6
09:58 dalek rakudo/nom: 6246bdf | moritz++ | / (2 files):
09:58 dalek rakudo/nom: Cool.chr
09:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6246bdf613
09:59 [particle] joined #perl6
10:04 TimToady the RC sphere program has been running for most of an hour, and is up to about 6GB
10:05 TimToady I suspect it's leaking somehow
10:05 jnthn Sounds like.
10:07 TimToady (had to call MAIN by hand to get it to run)
10:07 moritz well, a simple ./perl6 -e 'while 1 {}' leaks about 8MB per 3s
10:07 jnthn ?
10:07 * jnthn thought we'd fixed that one long back :/
10:07 tadzik yay, a gc bug :)
10:07 moritz jnthn: in master, yes
10:07 moritz (before nom)
10:07 tadzik oh
10:07 jnthn Yeah but...no clue where nom would regress on that.
10:07 tadzik oh, that's fine
10:08 tadzik can it be connected with the write beerier thing I stumbled upon?
10:09 jnthn tadzik: It's a leak.
10:09 jnthn :P
10:09 jnthn Last time it was the lexpad memory leaking. Seems not that this time.
10:09 jnthn Or at least, it's marked auto_attrs
10:09 Trashlord joined #perl6
10:10 moritz tadzik: write barriers should only control when something is considered for GC, not if it is GCed at all
10:10 tadzik okay
10:11 jnthn My guess is that it's not so much a lack of GC as it is a C-level leak
10:11 jnthn Finding where is kinda tricky though.
10:11 jnthn valgrind is probably helpful.
10:11 tadzik yes
10:11 moritz it probably reports a leak in parrot_gc_alloc or so :/
10:12 jnthn yes, but with a stack trace, I guess?
10:12 moritz right, I just need to capture the stacktrace
10:13 moritz there are many of them
10:13 Su-Shee joined #perl6
10:15 jnthn k
10:15 * jnthn gets the leak too but doesn't see the obvious source of it
10:15 TimToady 6.7GB and only half done, 64minutes
10:15 moritz http://moritz.faui2k3.org/tmp/valgrind.log
10:15 TimToady lunch &
10:16 moritz I had to hit Ctrl+C to stop the process
10:17 moritz so there was no final GC run or anything like that
10:17 jnthn in use at exit: 830,168 bytes in 342 blocks
10:18 jnthn A lot of these leaks I'm seeing are startup allocations
10:19 moritz I'm working on a better example
10:19 jnthn e.g. not while the loop is going
10:20 moritz now looking at
10:20 moritz my int $i = 0; $i = nqp::add_i($i, 1) while $i < 1_000;
10:20 moritz which also leaks
10:21 jnthn hm
10:23 moritz http://moritz.faui2k3.org/tmp/valgrind2.log
10:35 Mowah_ joined #perl6
10:36 jnthn As another data point, nqp doesn't seem to leak.
10:38 uniejo_in_riga joined #perl6
10:40 cotto joined #perl6
10:40 cotto jnthn, where are you at?
10:41 cotto I've got a draft email to parrot-dev I'd like you to take a look at.
10:41 chadadavis joined #perl6
10:48 masak joined #perl6
10:51 [Coke] joined #perl6
11:09 chadadavis joined #perl6
11:12 mux joined #perl6
11:30 moritz nom: say "foo" ~~ /<['"]>/
11:30 p6eval nom: OUTPUT«␤»
11:34 * moritz hopes that jnthn++ will upload his slides soon
11:40 cotto joined #perl6
11:53 im2ee joined #perl6
11:56 nwc10 joined #perl6
11:56 nwc10 For those in the room at YAPC::Europe
11:56 nwc10 presumably Zefram's comment is valid in some cases - it would be a possible optimisation for a lazy map on a list to shortcut if it's sure that the block sa no side effects.
11:56 nwc10 (ie simple blocks)
11:57 nwc10 really simple blocks.
11:57 nwc10 not sure if it's worth it.
11:59 [Coke] joined #perl6
12:04 Trashlord joined #perl6
12:06 jferrero joined #perl6
12:32 dalek roast: bdb8845 | moritz++ | / (3 files):
12:32 dalek roast: fix two bogus tests, unfudge advent2009-day08.t for nom
12:32 dalek roast: review: https://github.com/perl6/roast/commit/bdb8845848
12:42 dalek book: 45f9225 | (Maik Hentsche)++ | src/basics.pod:
12:42 dalek book: "variable results" table matches example now
12:42 dalek book:
12:42 dalek book: The table "Contents of Variables" contained line "Ana vs Dave | 3:0"
12:42 dalek book: while the example only had "Ana Dave | 3:0". The table now matches
12:42 dalek book: the example.
12:42 dalek book: review: https://github.com/perl6/book/commit/45f9225100
12:47 moritz aloha: karma moritz
12:47 aloha moritz: moritz has karma of 1779.
12:47 moritz aloha: karma moritz_
12:47 aloha moritz: moritz_ has karma of 230.
12:48 * [Coke] grumbles as all the perl.org addresses time out.
12:49 [Coke] moritz++ # building now.
12:52 JimmyZ joined #perl6
12:57 bluescreen10 joined #perl6
13:01 Holy_Cow joined #perl6
13:02 Holy_Cow left #perl6
13:07 uniejo_in_riga joined #perl6
13:08 Sarten-X joined #perl6
13:08 rdesfo joined #perl6
13:11 masak joined #perl6
13:20 orafu joined #perl6
13:22 cognominal_ is there a way to get the parsetree for a perl6 program without executing it?
13:23 moritz cognominal_: viv in the perl6/std repo does that
13:23 moritz cognominal_: but there's no specced way to do that from within a Perl 6 program
13:25 cognominal_ but rakudo does parse programs so there is a way. I am just not skilled enough to find it
13:25 moritz a, from rakudo
13:25 moritz --target=parse
13:26 moritz ...except that that's broken in nom
13:26 uniejo_in_riga joined #perl6
13:28 chadadavis joined #perl6
13:29 cognominal_ I am using master
13:30 moritz ok
13:30 cognominal_ jnthn is your grammar debugger working in master?
13:30 cognominal_ thx, moritz
13:31 tokuhirom joined #perl6
13:46 abercrombie joined #perl6
13:46 envi joined #perl6
13:50 nwc10 left #perl6
14:05 envi joined #perl6
14:06 finanalyst_ joined #perl6
14:06 masak joined #perl6
14:07 dalek rakudo/nom: 63b54d1 | moritz++ | NOMMAP.markdown:
14:07 dalek rakudo/nom: add memory leak to NOMMAP punchlist
14:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/63b54d10d0
14:08 Kivutarrr joined #perl6
14:09 thowe joined #perl6
14:10 thowe http://scsys.co.uk:8002/133702
14:11 thowe Downloaded rakudo-star-2011.07.tar.gz, have run perl Configure.pl --gen-parrot a couple times but still getting this error.
14:11 thowe Have I done something else obviously wrong?
14:12 thowe parrot_config is in the parrot-3.6.0 dir under the dir I am in running that command.
14:13 moritz gmake: *** [compilers/opsc/gen/Ops/Compiler/Grammar.pir] Segmentation fault (core dumped)
14:13 moritz that's the actual error, and all the result just results from that
14:13 thowe I thought maybe
14:13 moritz dunno what's wrong here, that's an error from installing parrot
14:13 moritz maybe the folks in #parrot know better
14:13 moritz (on irc.perl.org, that is)
14:14 thowe OK
14:14 koban left #perl6
14:14 thowe I'll hit them up once I'm at work...
14:14 thowe bbiab..
14:15 dalek rakudo/nom: e0f9eee | Coke++ | t/spectest.data:
14:15 dalek rakudo/nom: track (non) failure mode.
14:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e0f9eeecf2
14:20 uniejo_in_riga joined #perl6
14:20 masak joined #perl6
14:24 frew_ joined #perl6
14:26 frew_ left #perl6
14:39 kaare_ joined #perl6
14:42 Trashlord joined #perl6
14:43 Lorn joined #perl6
14:48 uniejo_in_riga joined #perl6
14:49 nordicdyno joined #perl6
14:54 thou joined #perl6
14:58 uniejo_in_riga joined #perl6
15:06 [Coke] moritz: I have a threaded perl. I can now run autounfudge. I haz a confused. got a sec?
15:07 moritz [Coke]: yes
15:07 [Coke] so, I run:
15:07 [Coke] perl tools/autounfudge.pl --specfile t/spectest.data --unskip
15:07 [Coke] this then complains:
15:08 [Coke] File 't/spec/S02-builtin_data_types/anon_block.t' doesn't even pass in its current state
15:08 [Coke] but it's fudged, and it does pass fudged.
15:09 moritz hm, it doesn't complain here
15:09 moritz [Coke]: fwiw I usually just run it as  /usr/bin/perl tools/autounfudge.pl -a -j 3
15:09 [Coke] I'm at e0f9eee on nom, and bdb8845 on t/spec
15:10 * [Coke] tries that.
15:10 moritz the -a automatically picks up t/spectest.data
15:10 moritz and the -j 3 is just three jobs in parallel
15:10 moritz it does unskip by default too, iirc
15:10 [Coke] interesting that -j 3 seems to run 4 jobs. ;)
15:11 [Coke] yup, getting a ton of "doesn't even pass" errors.
15:11 moritz :-)
15:11 [Coke] :(
15:11 moritz that is..weird
15:12 [Coke] do I need to... install first or something?
15:13 moritz no
15:13 moritz do you get that line for all test files?
15:14 [Coke] pretty much.
15:14 [Coke] ah. is it checking the exit value?
15:14 [Coke] tools/perl6-limited.pl t/spec/S02-builtin_data_types/anon_block.rakudo
15:15 [Coke] runs, appears to DTRT, but echo $? shows 1
15:15 moritz huh
15:16 moritz if you look at autounfudge.pl line 198, it does launch fudge with --keep-exit-code
15:16 [Coke] So, at a wager, ths is related to the occasional swathes of "every passed your spectest, but we got lots of non-zero exit codes" issues.
15:17 moritz but then 'make spectest' should also report them, right?
15:17 [Coke] and keep-exit-code means to NOT append an exit(1) at the end of everything fudge,d aye?
15:18 moritz correct
15:18 [Coke] so I bet if I run 'make spectest 'now, I'll get lots of not-really-failures.
15:18 masak` joined #perl6
15:21 Trashlord joined #perl6
15:23 JimmyZ joined #perl6
15:35 j`ey joined #perl6
15:41 wolfman2000 joined #perl6
15:42 Kivutarrr left #perl6
15:58 mberends joined #perl6
16:01 Trashlord joined #perl6
16:08 rdesfo joined #perl6
16:15 mberends nom: say now;
16:15 p6eval nom: OUTPUT«Instant:1313597768.08085␤»
16:16 [Coke] moritz: aye.
16:16 [Coke] (failures in spectest on exit code)
16:30 diakopter nom: say now.perl
16:30 p6eval nom: OUTPUT«Instant.new(x => 533321050977/406)␤»
16:34 Vlavv joined #perl6
16:34 jevin joined #perl6
16:36 j`ey left #perl6
16:43 MayDaniel joined #perl6
16:47 Trashlord joined #perl6
16:56 fridim_ joined #perl6
16:57 dual joined #perl6
16:59 nordicdyno joined #perl6
17:03 cognominal_ is panda supposed to work on nom?
17:08 Moukeddar joined #perl6
17:17 nordicdy_ joined #perl6
17:21 janosik joined #perl6
17:39 benabik joined #perl6
17:40 Holy_Cow joined #perl6
17:41 moritz cognominal_: it does not, iirc
17:42 cognominal_ ok, thx
17:43 Holy_Cow left #perl6
17:48 colomon nom: say asin(0.785398163404734 + 2i)
17:48 p6eval nom: OUTPUT«0.341338918259482 + 1.49709293866352i␤»
17:50 moritz rakudo: asin(0.785398163404734 + 2i)
17:51 p6eval rakudo 922500:  ( no output )
17:51 moritz rakudo: say asin(0.785398163404734 + 2i)
17:51 p6eval rakudo 922500: OUTPUT«0.341338918259481 + 1.49709293866352i␤»
17:51 colomon moritz: It's niecza I'm worried about.
17:51 colomon someone I managed to code asin in such a fashion that exactly three of the dozen-odd Complex tests fail
17:56 [Coke] all in one quarter?
17:57 colomon [Coke]: good question
18:01 colomon rakudo: say (-0.707106781186548+2i).asin
18:01 p6eval rakudo 922500: OUTPUT«-0.308970651577122 + 1.48723059138151i␤»
18:02 colomon rakudo: say (0.707106781186548+2i).asin
18:02 p6eval rakudo 922500: OUTPUT«0.308970651577122 + 1.48723059138151i␤»
18:02 colomon [Coke]: good call
18:02 [Coke] \o/
18:03 [Coke] I just saw "3 out of dozen" and guessed. ;)
18:03 colomon (-0.707106781186548+2i).asin works, but  (0.707106781186548+2i).asin doesn't.  Sign of the real part looks like it's the problem.
18:06 colomon [Coke]: that was a very approximate number, mind you.  :)
18:20 sftp joined #perl6
18:26 birdwindupbird joined #perl6
18:28 Tene joined #perl6
18:28 Tene joined #perl6
18:28 mtk joined #perl6
18:29 djanatyn joined #perl6
18:33 colomon [Coke]: ooo, this officially just became an interesting problem.
18:34 colomon rakudo: (2.83262200201267-1.48723059138151i).polar
18:34 p6eval rakudo 922500:  ( no output )
18:34 colomon rakudo: say (2.83262200201267-1.48723059138151i).polar
18:34 p6eval rakudo 922500: OUTPUT«3.19931277592974-0.483475794339868␤»
18:34 colomon rakudo: say ~(2.83262200201267-1.48723059138151i).polar
18:34 p6eval rakudo 922500: OUTPUT«3.19931277592974 -0.483475794339868␤»
18:35 colomon rakudo: say ~(0.308970651577121+1.48723059138151i).polar
18:35 p6eval rakudo 922500: OUTPUT«1.51898574564641 1.36596104018484␤»
18:35 colomon rakudo: (0.308970651577121+1.48723059138151i).sin
18:35 p6eval rakudo 922500:  ( no output )
18:36 colomon rakudo: say(0.308970651577121+1.48723059138151i).sin
18:36 p6eval rakudo 922500: OUTPUT«0.308970651577121 + 1.48723059138151i␤»
18:36 colomon rakudo: say (0.308970651577121+1.48723059138151i).sin
18:36 p6eval rakudo 922500: OUTPUT«0.707106781186544 + 1.99999999999999i␤»
18:36 colomon rakudo: say (2.83262200201267-1.48723059138151i).sin
18:36 p6eval rakudo 922500: OUTPUT«0.707106781186549 + 1.99999999999999i␤»
18:37 Trashlord joined #perl6
18:37 itz joined #perl6
18:39 literal_ joined #perl6
18:40 Trashlord joined #perl6
18:45 cotto joined #perl6
18:47 colomon rakudo: my $x = 0.707106781186548+2i; -1i * (($x)i + sqrt(1 - $x * $x)).log
18:47 p6eval rakudo 922500:  ( no output )
18:47 colomon rakudo: my $x = 0.707106781186548+2i; say -1i * (($x)i + sqrt(1 - $x * $x)).log
18:47 p6eval rakudo 922500: OUTPUT«0.308970651577122 + 1.48723059138151i␤»
18:47 mtk joined #perl6
18:47 pmichaud good evening, #perl6
18:48 colomon o
18:48 * colomon appears to have lost an arm there
18:48 colomon \o
18:48 benabik colomon: Doing so much coding, it just fell right off?
18:49 colomon benabik: more like, so tired I forgot to bring it with me
18:49 colomon rakudo: my $x = 0.707106781186548+2i; say ($x)i + sqrt(1 - $x * $x)
18:49 p6eval rakudo 922500: OUTPUT«0.215296019312918 + 0.068720962747837i␤»
18:49 colomon niecza: my $x = 0.707106781186548+2i; say ($x)i + sqrt(1 - $x * $x)
18:49 p6eval niecza v8-52-g3afe236: OUTPUT«-4.21529601931292+1.34549259962526i␤»
18:50 [Coke] joined #perl6
18:50 colomon so the problem is the branch being chosen for the complex square root
18:52 moritz is that specced?
18:52 colomon I don't think so
18:52 colomon sqrt: "Returns the principal square root of the parameter."
18:52 colomon hmm
18:53 wolfman2000 joined #perl6
18:53 colomon http://mathworld.wolfram.com/PrincipalSquareRoot.html seems to suggest that doesn't help
18:55 domm joined #perl6
18:56 pernatiy joined #perl6
19:03 colomon well shoot, now I don't know if I should try to fix the "problem" by defining which branch to take in the spec, or fix the problem by never directly testing the results of the inverse functions.  :\
19:07 moritz you can use an any() test
19:09 colomon moritz: I believe that will only work to test sqrt, not asin, because the latter has an infinite number of possible solutions.
19:09 moritz oh.
19:09 colomon actually, I wonder if Util's recent research touched on these issues?
19:09 masak joined #perl6
19:10 mikemol joined #perl6
19:10 masak good evening, #perl6.
19:10 Acor joined #perl6
19:10 moritz oh hai masak
19:10 colomon o/
19:13 Acor left #perl6
19:13 masak this is embarrassing. I gave a talk about event sourcing on Monday. today after my lightning talk, pmichaud++ comes and tells me "your game AI player API. it should take not just the current state as a parameter, but also the history of events." I shoul've thought of that :)
19:13 masak by the way, the slides are here: http://masak.org/carl/yapc-eu-2011-little-animal-farm/talk.pdf
19:14 im2ee joined #perl6
19:15 * masak changes the API
19:18 * colomon is glad slide two clarified the Orwell issue.  ;)
19:18 masak so now, instead, the game will be passing along *both* the current state *and* the sequence of events so far in the game, even though from an ES perspective the latter is redundant.
19:18 masak the general opinion around the dinner table was that it's the kind thing to do.
19:18 PerlJam masak: A smart AI would have recorded them itself ;)
19:19 masak PerlJam: yeah, but the jumps may be too big to recreate the events from the states.
19:19 colomon it's the functional thing to do, for sure.
19:19 masak PerlJam: the player only gets "control" once a round. or possibly more, if it's the target of tradings.
19:20 masak but in the worst case, once.
19:20 masak no, in retrospect it's pretty obvious that the events should be passed along.
19:21 masak which brings me quite naturally to another issue.
19:22 masak when an array attribute or a hash attribute is marked 'is rw', does that mean that outside parties can change its contents?
19:22 masak perl6: class A { has @.x = 1, 2, 3 }; my $a = A.new; $a.x[1] = 42; say $a.x.perl
19:22 p6eval rakudo 922500: OUTPUT«[1, 42, 3]␤»
19:22 p6eval ..niecza v8-52-g3afe236: OUTPUT«[1, 42, 3].list␤»
19:22 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ","␤    expecting "_", fraction, exponent, term postfix, operator or "}"␤    at /tmp/gXec3BbSKC line 1, column 22␤»
19:22 masak seems pretty clear they can.
19:23 MayDaniel joined #perl6
19:23 masak that's fine; it just means that if you want *real* encapsulation with array/hash attributes, you can't use 'is rw' with the normal accessors.
19:23 mtk joined #perl6
19:23 masak oh, I mis-stated my question.
19:24 masak I meant readonly attributes.
19:24 masak which is accidentally what I tried with p6eval, so the conclusion still holds :)
19:24 colomon ah, that question makes more sense.  :)
19:24 masak ISTR sorear has mentioned this a couple of times.
19:25 masak saying that no-on has figgered out a sane way for arrays/hashes to lock their elements in this case.
19:25 colomon I recall pmichaud talking about it as well, but it's been quite a while.
19:25 masak yeah.
19:25 mtk joined #perl6
19:26 masak well, here's the thing. I definitely don't want this to happen to my master data structures in the game, because that would be tantamount to tampering with the game.
19:26 masak so I'll just have to deep-clone everything before I send it off.
19:26 masak that's no problem; it's just that from an "OO safety" perspective it's kind of a crappy default.
19:27 mtk0 joined #perl6
19:28 jevin joined #perl6
19:28 mtk joined #perl6
19:31 PerlJam masak: why a hash for players instead of an array?
19:33 PerlJam It looks like you do a lot of number -> player_number transformations in the code
19:33 Su-Shee_ joined #perl6
19:35 masak PerlJam: yeah. could've been factored diff'rently.
19:36 masak numbers, with the stock being number 0, would've worked too.
19:36 PerlJam so ... accident of creation?  :)
19:36 masak still mulling over it :)
19:37 masak I kinda like the self-documenting parts of having 'stock' and 'player_3' as strings.
19:37 masak I hadn't considered it a problem until now.
19:38 im2ee joined #perl6
19:39 moritz could anybody please proof-read http://piratepad.net/COm4Gkcv0I for grammar, spelling and sense?
19:41 moritz PerlJam++
19:41 moritz and two <unnamed>++ too :-)
19:41 PerlJam the colors are playing havoc with my eyes for some reason though
19:42 moritz sorry about that
19:42 moritz oh, and if there's some interest, I'll surely find a way to sneak in a Perl 6 hackathon
19:44 colomon seems like "Perl for beginners" doesn't need the three sub-points?  maybe?  that's pretty nit-picky
19:44 colomon (I mean, my pointing it out is nit-picky)
19:44 moritz colomon: probably, yes
19:45 moritz colomon: I just took the German template and translated it straight into English, without much thinking :-)
19:45 colomon also, entire thing appears to be twice on the pastebin?
19:45 PerlJam what colomon just said
19:45 masak moritz: 'humor'. you using US spelling deliberately?
19:46 masak nothing wrong with that, just asking.
19:46 moritz masak: no
19:46 * moritz deletes the second half
19:47 PerlJam so .... all talks will have 100-150 person capacity?
19:48 moritz PerlJam: the room has a capacity of about 200 persons, but usually just 100 to 150 attend
19:48 moritz (experience from previous GPWs)
19:48 PerlJam it seems weird to me that lightning talks, short talks and long talks will all be in same space.
19:49 moritz why?
19:49 moritz we have a small and a big room
19:49 PerlJam I don't know  :)
19:49 moritz so we chose the big room for everything except the tutorials
19:49 PerlJam How many talks and tutorials are you hoping to get?
19:50 * masak writes code that calls a method on self inside a sub inside a method
19:50 PerlJam (maybe put that in the CFP)
19:50 moritz PerlJam: I have no idea :-)
19:51 PerlJam Er .... what's the second date supposed to be?  2012-03-2012 can hardly be correct :)
19:51 moritz 05
19:51 moritz erm wait
19:51 moritz 05 to 07
19:51 PerlJam It's a one day event?
19:51 PerlJam oh.
19:52 PerlJam so, how many talks/tutorials can you fit in 2-3 days?
19:52 PerlJam That's a good upper bound on the number of each you can have.
19:54 moritz looking at the YAPC::EU schedule, maybe 8 to 11 a day
19:54 PerlJam maybe it's just some latent marketingness in me that I'd want to advertise the number of potential slots and then use that in future announcements.
19:54 PerlJam "Get your tutorial in today!  Only 3 slots left!"
19:55 moritz I kinda like the idea, just want to synchronize with the organizers first
19:57 im2ee joined #perl6
19:59 masak so... who will be the first one to write a Little Animal Farm player class?
20:00 masak I could do it, but that'd be less fun than someone else doing it.
20:00 mj41 joined #perl6
20:00 masak and then that person could help me put together the instructions for writing such a class :)
20:01 moritz maybe tomorrow
20:01 moritz trouble is, I've never played the game
20:01 moritz so it's hard for me write an AI
20:03 masak we need a naive AI first.
20:03 masak one that does the minimal amount of work to win.
20:03 PerlJam "to win"?  Are you sure you really meant "naive AI"?  :)
20:03 Moukeddar joined #perl6
20:04 masak PerlJam: well, the assumption is that there's no competition at all out there yet :)
20:04 masak PerlJam: we essentially want to build something that can get beaten :)
20:04 masak Gloria++ supplied the recipe for one: trade up to new animals when you can, and ignore buying dogs.
20:04 PerlJam So ... "minimal amount of work to play until the game ends"  ?
20:05 masak right. thing is, if you do nothing during trades, which would be the simplest thing possible, you can never win.
20:05 masak so you need to do the simplest/laziest thing possible that makes it possible for you to win.
20:06 PerlJam The "do nothing" AI has got to be easy to write ;)
20:07 masak anyone who's interested at giving it a shot: first, read the talk. http://masak.org/carl/yapc-eu-2011-little-animal-farm/talk.pdf
20:07 masak then read the rules at https://github.com/masak/farm
20:07 masak then read the nonexistent instructions for writing an AI player.
20:08 masak then implement it.
20:10 PerlJam is it playable with nom?
20:10 PerlJam s/playable/runnable/
20:11 masak PerlJam: dunno. please find out ;)
20:11 masak any failures would be really interesting to know about.
20:12 * masak realizes that he's really a master kind of guy
20:13 * PerlJam plays "Master of Puppets" in honor of masak
20:16 * jasonmay wonders if he'll have to re-work his IoC module for nom, etc
20:16 im2ee joined #perl6
20:16 PerlJam Method 'rxtype' not found for invocant of class 'PAST;Regex'
20:16 PerlJam (running farm.pl on nom)
20:17 masak I recognize that error.
20:17 masak don't remember where, though.
20:17 masak a search of the backlog might turn something up.
20:17 masak (hint, hint)
20:19 acor joined #perl6
20:19 im2ee joined #perl6
20:24 Kivutarrr joined #perl6
20:29 molaf joined #perl6
20:30 flussence masak: I was complaining about the same error yesterday :)
20:31 masak ah, there you go.
20:31 masak was that from running farm.pl as well?
20:31 flussence no, Text-Tabs-Wrap
20:32 masak ah.
20:32 masak I don't have any grammars in farm.pl. I may have a regex or two.
20:33 PerlJam it looks like niecza almost runs farm.pl   It only reported problems with the BUILD submethod on line 12
20:34 PerlJam (of course it may have just given up at that point, but I'm ever hopeful :)
20:34 masak ok.
20:39 im2ee joined #perl6
20:42 sorear good * #perl6
20:42 masak o/
20:45 PerlJam sorear: Think you can make niecza grok Perl 6 better so that it can run https://github.com/masak/farm/blob/master/farm.pl ?  :-)
20:45 LimitSupremum joined #perl6
20:45 PerlJam sorear: See https://gist.github.com/1152567 for what happened when I try
20:46 nbrown joined #perl6
20:48 PerlJam sorear: I guess it's because niecza doesn't yet quite grok $!vars  (at least according to http://perl6.org/compilers/features.html)
20:48 sorear that per se is fixable
20:48 sorear well, :$!vars
20:48 PerlJam aye.  their relationship
20:49 * masak likes :$!vars
20:49 masak I made sure we got that syntax.
20:49 masak uh, wait, no.
20:49 masak I'm thinking of the same syntax but on the caller side, as a named argument.
20:51 tadzik oh hello #perl6
20:51 masak tadzik! \o/
20:51 sorear niecza also needs MAIN for masak's farm to work
20:53 tadzik masak: apparently, there are some people who want to rewrite LAF to java, or webservice, or Perl 5 to work on the AI
20:53 tadzik „or maybe even do it in Perl 6 actually”
20:54 masak tadzik: huh!
20:54 masak well, I guess we can't *stop* people from porting the thing.
20:54 tadzik true
20:54 masak and I wouldn't want to spend my time trying, anyway ;)
20:54 tadzik oh, and some people, before I mentioned the implementation, thought „oh, I could totally write an AI for that”
20:55 tadzik so our ideas aren't unique ;)
20:55 masak nope :)
20:55 tadzik so where did you have dinner?
20:55 masak we were discussing the game and AIs over dinner tonight.
20:55 masak at the awesome sekkrit Indian nommery.
20:55 tadzik I didn't get a message back from you so I just got to that main place
20:55 tadzik oh
20:56 masak a message back from me?
20:56 tadzik did you get mine?
20:56 masak I texted you, never got a response...
20:56 tadzik shit
20:56 masak :/
20:56 tadzik I retexed you in like 2 minutes :/
20:56 masak huh.
20:56 * masak checks again
20:56 tadzik Latvia<gsm>--
20:57 masak nope, nothing.
20:57 tadzik weird
20:58 masak yeah. ah, too bad. would've been nice to have you there. we had an empty eigth chair for you, in fact.
20:58 tadzik oh, I saw people today laughing "look, I just got your text message from monday!"
20:58 masak eighth*
20:58 tadzik well, it happens
21:03 tadzik shame though. I'm glad you had a good time :)
21:03 masak tadzik: ooc, where did you disappear to? the only way I could think of reaching you was via texting.
21:04 tadzik masak: I was standing outside for like 10 minutes or so, then got with some folks to the usual place, where the first-day meeting was
21:05 tadzik or, the pre-conf meeting actually
21:05 masak ah, ok.
21:05 masak well, we were standing around just inside for about 10 minutes or so...
21:05 tadzik but I got your message like 5 minutes after we left. I sent you a msg that I'll go to my hotel for a sec and I'm ready to go
21:06 sftp joined #perl6
21:06 masak oh, ok.
21:06 saaki joined #perl6
21:06 masak I'd tell you a Latvia<gsm> joke, but you might now get it...
21:07 masak not*
21:07 tadzik heh
21:07 tadzik maybe they actually have a network called UDP
21:09 masak that would explain things.
21:09 masak I'll probably get the reply just after I fall asleep tonight.
21:10 tadzik yeah, probably
21:10 tadzik or really *too early* in the morning
21:11 wamba joined #perl6
21:11 wamba left #perl6
21:14 masak rakudo: my %foo = a => {}, b => {}; sub deepclone(%h) { return %h }; my %bar = deepclone(%foo); %bar<b><hi> = "hopp"; say %foo.perl
21:14 p6eval rakudo 922500: OUTPUT«{"a" => {}, "b" => {"hi" => "hopp"}}␤»
21:14 masak rakudo: my %foo = a => {}, b => {}; sub deepclone(%h) { return hash map -> $k, $v {; $_ => ($v ~~ Hash ?? deepclone($v) !! $v ) }, %h.kv }; my %bar = deepclone(%foo); %bar<b><hi> = "hopp"; say %foo.perl
21:14 p6eval rakudo 922500: OUTPUT«{"a" => {}, "b" => {}}␤»
21:14 masak \o/
21:15 wamba joined #perl6
21:16 tadzik what does BOF stand for? Not easily googlable
21:16 jnthn joined #perl6
21:17 masak tadzik: Benevolent Dictatory For [Life?]
21:17 masak Dictator*
21:17 tadzik no, B Oh F
21:17 flussence Bundle o'fish?
21:18 tadzik How do you rate the conference?
21:18 tadzik How would you rate your overall satisfaction of the following areas of the conference?
21:18 masak Bird Of Feather.
21:18 tadzik (BOFs)
21:18 tadzik I don't get it :)
21:18 Kivutarrr left #perl6
21:18 masak I didn't hear of any this time.
21:18 masak oh, it's a concept.
21:18 masak someone wants to start something cool.
21:18 masak so they just draw together other interested people.
21:18 bluescreen10 joined #perl6
21:18 masak and if it takes off, it's sort of... a bird from a single feather.
21:18 tadzik mhm
21:19 masak that's all.
21:19 tadzik I didn't see any of those really
21:19 tadzik maybe the Acmeism fun with ingy++ today
21:19 masak that was a talk though, wasn't it?
21:20 tadzik well, I hacked a Vala backend with ingy today
21:20 tadzik it was almost like copypasting a Java backend
21:20 tadzik still, fun
21:34 masak that seems to be an important part of acmeism.
21:45 Psyche^ joined #perl6
21:46 masak 'night, #perl6
21:46 athomason joined #perl6
21:49 Trashlord joined #perl6
21:54 ggoebel left #perl6
22:28 jevin joined #perl6
23:02 drbean joined #perl6
23:14 tokuhirom joined #perl6
23:21 whiteknight joined #perl6
23:24 ponbiki joined #perl6
23:35 [particle] joined #perl6
23:36 soh_cah_toa joined #perl6
23:40 sjn joined #perl6
23:57 molaf joined #perl6
23:59 abercrombie Is nom going to be the master branch tomorrow?

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

Perl 6 | Reference Documentation | Rakudo