Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-07-02

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:02 jnthn hmm
00:02 jnthn nom: say Cool.^parents.WHAT
00:02 p6eval nom: OUTPUT«Array()␤»
00:02 jnthn nom: say Cool.^parents.[0..2]
00:02 p6eval nom: OUTPUT«Any() Mu() Any()␤»
00:02 pmichaud oh
00:02 pmichaud you're using arrays
00:02 jnthn uh.
00:02 jnthn nom: say Cool.^parents
00:02 p6eval nom: OUTPUT« ␤»
00:03 pmichaud I think it should be a List.
00:03 pmichaud anyway, I can fix it, if that's what it is.
00:03 jnthn pmichaud: types.c
00:03 jnthn :)
00:03 jnthn I think you pondered Parcel earlier.
00:03 jnthn Whatever you think works best is fine for me, anyway.
00:03 pmichaud oh!  it's the auto-conversion!
00:04 pmichaud yes, I'll fix it.
00:04 pmichaud I understand now.
00:04 jnthn I'm not sure why it fails here though.
00:04 jnthn ooc...
00:04 jnthn nom: say [Cool, Any, Mu]
00:04 p6eval nom: OUTPUT«  ␤»
00:04 jnthn nom: say [Cool, Any, Mu].[0..2]
00:04 p6eval nom: OUTPUT«Cool() Any() Mu()␤»
00:04 pmichaud types stringify to ''
00:05 jnthn nom: say Cool
00:05 p6eval nom: OUTPUT«Cool()␤»
00:05 pmichaud that's not stringification, that's .gist :)
00:05 jnthn oh, that's .gist
00:05 jnthn yeah
00:05 jnthn hmm
00:05 pmichaud nom:  say Cool.Str
00:05 p6eval nom: OUTPUT«␤»
00:05 jnthn People are gonna get bothered shat they can't say %obj.^parents, I fear.
00:05 jnthn *that
00:05 pmichaud so, fixing .^methods to return a Parcel will fix that
00:05 jnthn oh
00:05 pmichaud nom:  say (Cool, Any, Mu)
00:05 jnthn :)
00:05 p6eval nom: OUTPUT«Cool() Any() Mu()␤»
00:06 jnthn excellent.
00:06 pmichaud because Lists .gist differently than Parcels
00:06 pmichaud I *totally* understand what's happening now :-)
00:07 jnthn When doing hypers, it's nice if $obj>>.foo talls out of it nicely too
00:07 pmichaud I plan to do that as well, yes.
00:07 pmichaud even if it doesn't fall out nicely
00:07 jnthn Great.
00:07 pmichaud but given how cleanly the others worked, I'm guessing it may fall out nicely.
00:10 jnthn What's your rough roadmap beyond meta-ops? Start to look at regexes?
00:15 pmichaud regexes, yes.  and numerics.
00:15 pmichaud (i.e., Str.Numeric)
00:15 pmichaud afk, fetching dinner
00:16 thou left #perl6
00:17 twinshadow joined #perl6
00:21 [Coke] left #perl6
00:23 [Coke] joined #perl6
00:31 pernatiy joined #perl6
00:32 [Coke] left #perl6
00:33 [Coke] joined #perl6
00:42 drbean joined #perl6
00:47 * [Coke] yawns.
00:47 * jnthn -> venue
01:05 cooper left #perl6
01:08 zby_home_ left #perl6
01:09 cognominal left #perl6
01:10 cognominal joined #perl6
01:21 thundergnat left #perl6
01:24 araujo left #perl6
01:25 araujo joined #perl6
01:27 zorgnax joined #perl6
01:28 pmichaud awww, livestreaming of beijing perl workshop doesn't seem to be working :(
01:29 pmichaud oh, I'm an hour too soon
01:29 jrockway left #perl6
01:29 jrockway joined #perl6
01:37 JimmyZ joined #perl6
01:38 JimmyZ pmichaud: It's 9:30 here, that livestream will be online at 10:00
01:39 zorgnax left #perl6
01:48 s1n left #perl6
01:50 s1n joined #perl6
01:55 dalek Module-Starter/create_stub_module: 391eceb | dukeleto++ | bin/module-starter:
01:55 dalek Module-Starter/create_stub_module: Start attempting to actually create a module stub
01:55 dalek Module-Starter/create_stub_module: review: https://github.com/tadzik/Module-Starter/commit/391eceb4e6
02:01 benabik joined #perl6
02:06 JimmyZ pmichaud: http://player.ku6cdn.com/default/live/webliveV3.2.86.swf?p=613 and http://player.ku6cdn.com/default/live/webliveV3.2.86.swf?p=742
02:24 whiteknight left #perl6
02:28 Chat7788 joined #perl6
02:30 [Coke] left #perl6
02:32 [Coke] joined #perl6
02:34 Chat7788 left #perl6
02:52 donri left #perl6
03:00 JimmyZ left #perl6
03:06 pmichaud don't seem to be able to view the video :-/
03:13 JimmyZ joined #perl6
03:14 JimmyZ \o jnthn is talking Perl 6, here is live video http://conference.perlchina.org/bjpw2011/live_huangshan.html
03:19 jaldhar joined #perl6
03:23 Su-Shee_ joined #perl6
03:24 kst left #perl6
03:25 kst joined #perl6
03:25 Su-Shee left #perl6
03:31 bkolera joined #perl6
03:36 pmichaud I'm not able to see the video :(
03:37 pmichaud I'm guessing it must be blocked/filtered somewhere.
03:43 Bzek joined #perl6
03:46 * Tene also
03:49 JimmyZ well, it's over now
03:50 kaare_ joined #perl6
03:54 thou joined #perl6
04:16 perlhack joined #perl6
04:16 perlhack hi all
04:16 perlhack i again come to here
04:16 dalek roast: a14ba49 | pmichaud++ | S (5 files):
04:16 dalek roast: Fudge and fix tests for rakudo master (ng branch).  That branch will
04:16 dalek roast: be permanently set to this commit of the spectests, at least for
04:16 dalek roast: a while.
04:16 dalek roast: review: https://github.com/perl6/roast/commit/a14ba49f46
04:17 perlhack The China workshop is startting
04:21 JimmyZ are you there?
04:22 perlhack no
04:22 perlhack I am in home
04:22 JimmyZ Did you see video?
04:23 perlhack video bad
04:24 JimmyZ 还好吧
04:25 perlhack I here do not support the Chinese
04:27 * JimmyZ doesn't know what perlhack want to express
04:30 perlhack hah .This is client IRC not support the Chinese
04:33 JimmyZ then try chatzilla
04:34 perlhack have client ?
04:36 JimmyZ yep
04:36 dalek rakudo: 72d158a | pmichaud++ | build/Makefile.in:
04:36 dalek rakudo: Peg spectest to a specific revision, since they're starting to target the nom branch.
04:36 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/72d158a8ca
04:37 perlhack 3q
04:39 dalek roast: a643435 | pmichaud++ | S (2 files):
04:39 dalek roast: Undo rakudo temporary fudges for master.
04:39 dalek roast: review: https://github.com/perl6/roast/commit/a64343524e
04:48 perlhack i want to know you
05:07 Mowah joined #perl6
05:35 thou hello, #perl6
05:37 drbean left #perl6
05:50 perlhack hello thou
05:50 perlhack nice to meet you
05:51 thou hi, perlhack
05:51 daniel-s joined #perl6
05:51 thou perlhack: are you at the perl conference in beijing?
05:53 perlhack yes! but I didn't go to perl conference.
05:55 thou oh. did you go yesterday?
05:55 thou i thought i saw you say that you were there
05:57 perlhack left #perl6
05:57 thou hmmm, maybe that sentence was too hard to parse. :-)
05:59 perlhack joined #perl6
05:59 perlhack hi thou
05:59 perlhack i did not here
05:59 thou :-)
05:59 thou ok, so you are at hime
06:00 thou *home
06:00 perlhack yes i was at home
06:00 perlhack i have no money to go by car.
06:00 perlhack so.i was at home
06:01 thou is public transportation (bus, train, etc.) an option where you live?
06:02 thou i live in the country, and we do not have any public transportation.
06:02 thou that is one bad thing about where I live.
06:02 thou i like to ride the bus and the train.
06:02 perlhack all have .but i have no a little money
06:03 thou ah
06:03 thou are you in school (university)?
06:03 thou or are you looking for work?
06:04 thou i hope i am not being rude
06:04 thou just curious.
06:04 perlhack i have worked
06:06 perlhack i have money to train the
06:06 perlhack so i do not have
06:09 perlhack i want all the money left training Perl
06:10 perlhack Perl training in
06:10 perlhack Perl training in China is very expensive
06:11 perlhack >:O
06:11 envi joined #perl6
06:12 JimmyZ bjpw is a free training
06:12 perlhack what mean "bjpw"
06:13 JimmyZ perl conference in beijing
06:13 JimmyZ that is, today
06:13 perlhack yes .i.e.
06:14 perlhack jnthn alreay there
06:14 perlhack already
06:16 bkolera left #perl6
06:16 thou perlhack: well, i can tell that you want to study and learn, so i'm sure you will get there.
06:19 JimmyZ \o jnthn is talking now. http://conference.perlchina.org/bjpw2011/live_perlchina.html
06:22 moritz the stream doesn't show up here :(
06:22 JimmyZ that's bad
06:22 thou not here either
06:24 thou JimmyZ: what does the text say in this picture? it is a screenshot of the feed viewer:  http://postimage.org/image/al58c1us/
06:24 perlhack thanks for all
06:24 jaldhar left #perl6
06:24 perlhack Are you expecting me ?
06:26 perlhack stream equal to "rivers" ?
06:26 beekor heehee stream equal to pushing and getting video/audio
06:27 beekor the signal flows like a river does.
06:27 perlhack oh! i understand now
06:27 perlhack thanks
06:27 JimmyZ I asked them, why you guys can't see it
06:27 perlhack beekor,
06:28 thou JimmyZ: ok, thanks
06:28 moritz nom leaks memory like a leaky cauldron
06:28 thou although i need to go to bed
06:29 thou so i will say good night to you all
06:29 thou good *, #perl6
06:29 perlhack dream Well for thou
06:29 thou thank ou, perlhack!
06:29 thou left #perl6
06:29 perlhack Hey Hey
06:31 perlhack i know a joke
06:32 jaldhar joined #perl6
06:34 Mowah left #perl6
06:34 araujo left #perl6
06:34 pmichaud (memory leak) ... yes, I wonder if the return continuations might cause that.
06:35 pmichaud but it could be a number of things, I suspect.
06:39 moritz times for 201x201 mandelbrot: nom: 3 minutes; master: 16 minutes 14 seconds
06:43 pmichaud \o/
06:44 * moritz writes a blog post
06:45 pmichaud and we still have more optimizations to go :)
06:46 moritz rakudo: say (16 + 14/60) / 3
06:46 p6eval rakudo 72d158: OUTPUT«5.41111111111111␤»
06:52 dolmen joined #perl6
06:53 dolmen in which source file are ranges implemented in Rakudo?
06:54 zby_home joined #perl6
06:54 * Util is back home from YAPC::NA, but will wait until morning to backscroll.
06:55 pmichaud dolmen: src/core/Range.pm
06:55 pmichaud dolmen: which branch, master or nom?
06:58 dolmen I just wanted to see how it changed since I hacked it in june 2008
06:58 pmichaud be sure to look at the nom branch version, then.  it's the most recent/up-to-date
06:58 pmichaud https://github.com/rakudo/rakudo/blob/nom/src/core/Range.pm
06:59 pmichaud it still needs some methods (e.g., for WhateverCode and similar arguments)
07:05 dalek rakudo/nom: 4434d03 | pmichaud++ | src/binder/types.c:
07:05 dalek rakudo/nom: Change types.c so that RPAs come back as Parcel instead of Array.
07:05 dalek rakudo/nom: This also makes "say $foo.^parents" do what is normally expected.
07:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4434d03385
07:07 envi left #perl6
07:19 Su-Shee_ is now known as Su-Shee
07:24 firefoxchic left #perl6
07:29 tylercurtis left #perl6
07:29 tylercurtis joined #perl6
07:31 bkolera joined #perl6
07:37 lue joined #perl6
07:57 molaf__ left #perl6
07:57 moritz https://github.com/moritz/perlgeek.de/blob/master/source/blog-source-en/perl-6/how-fast-is-nom.txt # blog post preview
07:58 moritz comments welcome
07:58 bkolera1 joined #perl6
07:58 bkolera left #perl6
07:58 tadzik good morning #perl6
07:59 perlhack good morning
07:59 perlhack tadzik,
08:00 perlhack i was here all the afternoon
08:00 moritz \o tadzik
08:00 perlhack \o
08:01 * moritz off to take a shower. Will publish the blog post when I come back unless soembody has suggestions to improve it :-)
08:02 perlhack tadzik:what nationnality
08:03 lue moritz: good post [what are 00 primitives though?]
08:04 lue goodnight all o/ [I really need to stop being awake until 1 in the morning... it's so much fun though.]
08:04 tadzik perlhack: I'm Polish, it's barely 10 AM here
08:06 perlhack haha   Polish is very nice place
08:06 perlhack tadzik:
08:06 perlhack I like Polish
08:06 tadzik I assume you mean Poland :) It's quite nice, yes
08:07 rokoteko left #perl6
08:07 tadzik and if you like Polish, you may like to speak words like chrząszczyrzewoszyce :)
08:08 perlhack tadzik:Poland it's quite nice
08:09 perlhack Oh! haha  i just say it
08:09 perlhack what do you leaning English?
08:10 Aridai joined #perl6
08:11 perlhack tadzik
08:11 perlhack I think your English is very good.
08:17 pamera left #perl6
08:20 perlhack =-O
08:24 tadzik perlhack: how did I learn English? Well, I just used it a lot :)
08:30 mj41 joined #perl6
08:30 araujo joined #perl6
08:30 perlhack i learn form you
08:30 perlhack tadzik,
08:33 JimmyZ moritz++, great post
08:37 Trashlord joined #perl6
08:38 jnthn hi from bjpw :)
08:39 tadzik hello jnthn!
08:39 * jnthn has given his two talks...then just thrown together a lightning talk :)
08:39 jnthn ...which I give soon :)
08:39 tadzik oh, I overslept :P
08:39 jnthn :P
08:41 moritz http://perlgeek.de/blog-en/perl-6/how-fast-is-nom.html # now published
08:41 * jnthn reads
08:42 perlhack give someone a big hand for jnthn
08:42 JimmyZ jnthn++, I saw your talks online
08:42 tadzik how faster is JSON? :)
08:44 moritz nom: say 'a' ~~ /a/
08:44 p6eval nom: OUTPUT«too many positional arguments: 3 passed, 1 expected␤current instr.: 'nqp;Perl6;Actions;block_closure' pc 21687 (src/gen/perl6-actions.pir:7040)␤»
08:44 jnthn moritz: Thanks for testing. That is encouraging.
08:44 moritz jnthn: indeed
08:44 jnthn moritz: That is one of the cases that will hugely benefit from inlining, I suspect.
08:44 jnthn JimmyZ: Hope they were interesting. :)
08:45 moritz jnthn: I must admit that I thought of that benchmark when I chose which Complex ops I wanted to optimize first :-)
08:45 jnthn :-)
08:47 envi joined #perl6
08:47 moritz I'll now benchmark nom but without those optimized ops
08:48 JimmyZ jnthn: It's very interesting
08:48 moritz I'm curious if there's a significant difference
08:48 jnthn Me too
08:50 JimmyZ jnthn: how many  people in the room ?
08:50 jnthn Hmm...earlier today was quite full
08:50 JimmyZ Hehe
08:50 jnthn Between 50 and 100
08:50 jnthn Probably closer to 100.
08:51 JimmyZ they said about 90
08:51 jnthn Yeah, I think there were this morning
08:51 jnthn Seems some have gone home before lightning talks
08:52 JimmyZ jnthn: many people is looking live video online
08:52 jnthn cool :)
08:53 JimmyZ hehe
08:53 Aridai left #perl6
08:53 JimmyZ s/looking/watching/
08:53 * jnthn is 2 slots away in the lightning talks :)
08:54 perlhack left #perl6
08:54 JimmyZ what your lightning talk talks about?
08:54 JimmyZ I didn't watch it
08:54 jnthn JimmyZ: Will be about operators
08:54 jnthn JimmyZ: Will happen in 5-10 mins :)
08:55 jnthn It's not too late to watch ;)
08:56 JimmyZ oh
08:56 drbean joined #perl6
08:57 * JimmyZ doesn't have headset now
08:58 jnthn ah
08:59 jnthn ooh, I'm next :)
08:59 * jnthn hopes he can do this in 5 mins
08:59 jnthn They actually have a gong :)
09:00 jnthn 25 slides. 5 mins. What could possibly go wrong?
09:00 tadzik fingerache
09:00 jnthn :P
09:01 tadzik remember: 12 seconds, click, 12 seconds, click
09:01 JimmyZ yes, they have one
09:14 perlhack joined #perl6
09:15 JimmyZ jnthn++ ,  awesome lightning talk about awesome operators
09:15 moritz how long did he take?
09:16 JimmyZ about 5 mins ?
09:16 JimmyZ yes, 5 mins
09:17 Kivutarrr joined #perl6
09:21 jnthn yes, did it in 5 :)
09:21 jnthn just
09:21 jnthn :)
09:22 jnthn moritz: Do we have any of the transcendentals back yet?
09:22 * jnthn guesses the spectests for those will run some times faster on nom ;)
09:23 moritz nom: say 3.14e0.sin
09:23 p6eval nom: OUTPUT«0.00159265291648683␤»
09:23 jnthn ah, nice
09:23 jnthn Didn't notice any spectests running for those.../
09:24 moritz right, they don't run yet
09:24 moritz though I haven't investigated why
09:24 moritz might get to that later today
09:24 jnthn k
09:25 JimmyZ left #perl6
09:25 moritz $ /perl6 t/spec/S32-trig/sin.t
09:25 moritz Could not find sub &DYNAMIC
09:25 jnthn phenny: tell pmichaud can "* array parameters bind as containers" diesappear in spectests now?
09:25 phenny jnthn: I'll pass that on when pmichaud is around.
09:25 JimmyZ joined #perl6
09:26 jnthn phenny: tell pmichaud can "* array parameters bind as containers" diesappear in *nommap* now? D'oh...
09:26 phenny jnthn: I'll pass that on when pmichaud is around.
09:26 tadzik jnthn: ready for some SymbolTable guidance?
09:26 jnthn tadzik: It's about end up day here, so may have to vanish soon
09:26 jnthn But can try :)
09:26 tadzik oh, I see
09:27 jnthn moritz: ouch
09:27 perlhack ouch
09:27 perlhack HeyHey
09:27 moritz btw the non-boxing complex op do speed up the mandelbrot thing significantly
09:27 moritz without them: 4.5 minutes. With: 3 minutes
09:28 jnthn nice
09:28 jnthn but even without them it's still significant
09:28 moritz so, it's quite a worthwhile experience
09:28 moritz aye
09:28 tadzik so, my plan for today is: push the pod blocks into an array one after another, then at END time of Actions.pm or somewhere push this array to the SymbolTable. Would that last thing be anything more fancy than $*ST.install_package_symbol()?
09:28 moritz 16 -> 4.5
09:28 perlhack i also aye
09:29 moritz tadzik: will be less trivial than that
09:29 jnthn tadzik: Bit trickier :)
09:29 tadzik I'm astonished
09:29 tadzik I'm confused
09:29 jnthn What do you cactually need to install?
09:29 jnthn Also, why package?
09:30 jnthn *actually
09:30 tadzik well, it should be per-file actually
09:30 jnthn So, lexical in UNIT, I suspect.
09:30 tadzik and I cactually need to install an array holding a bunch of Pod::Blocks
09:30 jnthn OK
09:30 moritz tadzik: so far the serialization can handle two cases: 1) primitives and 2) objects that can be constructed as TypObject.new(<supported things>)
09:30 jnthn 3) anyuthing else you teach it :)
09:30 tadzik oh, less trivial
09:31 tadzik now I see
09:31 jnthn It's not really serialization per se
09:31 jnthn It's kinda cheating :)
09:31 tadzik oh, ok
09:31 tadzik so I'll need to implement that?
09:31 jnthn But anyway, yes, you can do what you're after.
09:31 jnthn Will just need a little more effort  :)
09:31 jnthn Each block you construct needs to go into the SC
09:32 jnthn Then the array canbe done with the typeobject.new case.
09:33 tadzik SC?
09:33 jnthn serialization context
09:33 tadzik . o O ( SymbolCable )
09:33 tadzik ok
09:33 jnthn Like a signautre has a bunch of parameters
09:33 jnthn We add each Parameter object to the SC, then make the Signature out of them.
09:34 jnthn Sounds like you want to do similarish.
09:34 tadzik so I get a signature full of Pod::Blocks, right?
09:35 jnthn array
09:35 jnthn But it's similar approach I menat
09:35 jnthn Not similar code.
09:35 tadzik mhm
09:36 jnthn I suggest you keep an (NQP) array of all the pod blocks you construct
09:36 tadzik Yes, I'll need that. That's the thing I'll expose
09:36 jnthn Then you can use the type object case with Array and pass the (flattend) list of pod blocks.
09:36 jnthn No
09:36 jnthn You expose a Perl 6 array.
09:36 tadzik ah, ok
09:37 jnthn You can install_lexical_symbol it into UNIT
09:37 jnthn ($*UNIT)
09:37 tadzik ok. So I pass an existing NQP array to an Array constructor and install_lexical_symbol that?
09:38 tadzik I still don't see much difference than from the first idea
09:38 perlhack ..
09:39 jnthn tadzik: Yeah, but you'd have added all the POD block objects through the SC also
09:39 jnthn Every object you make needs to be created via a $*ST.something call
09:39 tadzik so I carefully create a signature for the SC, and then, wham! I feed it to an Array
09:40 jnthn no
09:40 jnthn Signatures are one type of object we construct
09:40 jnthn You're constructing POD block objects
09:40 tadzik yes
09:40 tadzik when you mean "every object", you mean every single one, recursively?
09:40 jnthn Yes
09:41 jnthn Code objects ahve their signatures added, which in turn have their parameters added, which in turn refer to type objects added to this or a previous SC
09:41 jnthn So it's same pattern
09:42 jnthn But with POD AST nodes
09:42 jnthn I suspect once you get the first few to work, the rest will go easily :)
09:42 tadzik yeah, I need to wrap my head around it first :)
09:43 tadzik Code object signatures, that's the blocker part so far. What is the code object here?
09:43 tadzik oh, wait, I think I see
09:43 tadzik that's just an example, right?
09:43 jnthn &foo
09:43 jnthn fYes!!!!
09:43 jnthn That's what I've been trying to tell you for the last 10 minutes ;)
09:44 tadzik so I have Pod Object, which have their @content added, which in turn refer to Pod objects I put there previously
09:44 jnthn Right :)
09:44 tadzik yeah :)
09:44 tadzik Now I need to learn the primitives around that
09:45 jnthn :)
09:45 jnthn OK, I think I gotta get outta here ;)
09:45 jnthn bbiab
09:45 tadzik o/, thanks!
09:45 jnthn :)
09:49 tadzik is there any example of the SC usage in the nom tree?
09:49 tadzik or nqp tree
09:53 perlhack Excuse me.what mean "outta"?
09:53 tadzik out of
09:54 tadzik that's a short, I d
09:54 tadzik on't think it's a formal word :)
09:54 perlhack it is the same the "gotta" -> "have got to "?
09:54 perlhack oh!thanks
09:58 Mowah joined #perl6
10:00 george_z0rwell joined #perl6
10:02 wamba joined #perl6
10:03 Reaganomicon left #perl6
10:05 mj41 left #perl6
10:07 Chillance left #perl6
10:14 awoodland joined #perl6
10:14 MayDaniel joined #perl6
10:16 JimmyZ left #perl6
10:19 Mowah left #perl6
10:20 tokuhirom left #perl6
10:42 whiteknight joined #perl6
10:47 am0c left #perl6
10:52 Trashlord left #perl6
10:58 Trashlord joined #perl6
11:05 am0c joined #perl6
11:21 JimmyZ joined #perl6
11:26 MayDaniel left #perl6
11:33 risou is now known as risou_awy
11:36 risou_awy is now known as risou
11:37 masak joined #perl6
11:37 masak yaaay! #perl6 + weekend!
11:44 perlhack left #perl6
11:46 Kivutarrr :)
11:47 masak it's nice that https://github.com/rakudo/rakudo/commit/437675e330460d0cf801d48a635c413d532e062f is making Complex math faster -- but will it ever be possible to write things in the original (clearer) way, and then have the decontainerizations and boxings done by the optimizer?
11:47 masak hm, I guess that's what op inlining will do for us...
11:47 Kivutarrr left #perl6
11:48 Kivutarrr joined #perl6
11:48 Kivutarrr left #perl6
11:56 mj41 joined #perl6
12:00 awoodland left #perl6
12:08 mj41 left #perl6
12:10 am0c left #perl6
12:22 zby_home left #perl6
12:27 am0c joined #perl6
12:34 donri joined #perl6
12:35 Mowah joined #perl6
12:40 masak left #perl6
12:42 moritz except that it might not be so easy to inline the $thing.re calls
12:42 moritz because those are virtual methods, and can be overridden in subclasses
12:48 lichtkind joined #perl6
12:48 tokuhirom joined #perl6
12:51 donri left #perl6
12:54 moritz rakudo: say i
12:54 p6eval rakudo 72d158: OUTPUT«0 + 1i␤»
12:54 moritz rakudo: say i()
12:54 p6eval rakudo 72d158: OUTPUT«Could not find sub &i␤  in main program body at line 22:/tmp/Uf9ewmtZKX␤»
12:58 Trashlord left #perl6
12:58 pernatiy left #perl6
13:00 moritz std: i
13:00 p6eval std 37a0cdd: OUTPUT«ok 00:01 118m␤»
13:01 moritz how should i work? as term:sym<i>? or sub i() ?
13:01 moritz std: i ~~ i
13:01 p6eval std 37a0cdd: OUTPUT«ok 00:01 119m␤»
13:02 colomon I thought i was a constant?
13:02 moritz std: sub i() { }; i ~~ i
13:02 p6eval std 37a0cdd: OUTPUT«ok 00:01 121m␤»
13:02 moritz std: sub j() { }; j ~~ j
13:02 p6eval std 37a0cdd: OUTPUT«[31m===[0mSORRY![31m===[0m␤Expecting a term, but found either infix ~~ or redundant prefix ~␤  (to suppress this message, please use space between ~ ~) at /tmp/gBUbwyQNJL line 1:␤------> [32msub j() { }; j ~~[33m⏏[31m j[0m␤Parse failed␤FAILED 00:01 122m␤»…
13:03 moritz colomon: do you know where it is in master?
13:03 colomon not off the top of my head
13:03 * moritz can't find it
13:04 kfo_ joined #perl6
13:04 colomon huh.
13:04 colomon the comments seem to think it's in cheats/constants.pir, but it's not
13:05 moritz nom: use Test; is_approx 1, 1+0i, 'works'
13:05 p6eval nom: OUTPUT«not ok 1 - works␤# got:      1␤# expected: 1 + 0i␤»
13:05 colomon :\
13:05 moritz nom: say (1 - (1+0i))
13:05 p6eval nom: OUTPUT«2 + 0i␤»
13:05 moritz oh, I f*cked it up somewhere
13:06 moritz nom: say (1 - (-1+0i))
13:06 p6eval nom: OUTPUT«0 + 0i␤»
13:07 kfo left #perl6
13:07 benabik 1 - -1 == 0?
13:08 colomon no worse than 1  - 1 == 2
13:08 moritz I think I found the bug
13:08 colomon moritz: i is defined in core/Cool-num.pm.
13:09 am0c left #perl6
13:10 moritz colomon: ah, thanks
13:11 moritz I don't think we can (or should) use the same cheat in nom
13:12 moritz I fixed subtraction, and messued up division by the way :/
13:12 moritz good that complex.t catches it all :-)
13:15 benabik testing++
13:17 moritz indeed
13:18 Trashlord joined #perl6
13:29 JimmyZ \o
13:30 lichtkind hai
13:30 envi left #perl6
13:31 lichtkind left #perl6
13:37 benabik left #perl6
13:41 envi joined #perl6
13:45 Moukeddar joined #perl6
13:46 Moukeddar left #perl6
13:46 bluescreen10 joined #perl6
13:54 nebuchadnezzar left #perl6
13:55 envi left #perl6
13:56 nebuchadnezzar joined #perl6
13:58 am0c joined #perl6
14:03 drbean left #perl6
14:04 moritz nom: say (3.14159e0 - 3)
14:04 p6eval nom: OUTPUT«6.14159␤»
14:04 moritz nom: say (3.14159e0 - 3).WHAT
14:04 p6eval nom: OUTPUT«Num()␤»
14:06 Mowah left #perl6
14:08 * moritz finds glaring bugs in noms numeric operators
14:09 dalek rakudo/nom-complex-insanity: a5bfdd0 | moritz++ | src/core/Complex.pm:
14:09 dalek rakudo/nom-complex-insanity: optimize and fix a few ops. Not correct yet, but compiles
14:09 dalek rakudo/nom-complex-insanity: review: https://github.com/rakudo/rakudo/commit/a5bfdd063e
14:09 dalek rakudo/nom-complex-insanity: 6fe7e6f | moritz++ | src/core/Complex.pm:
14:09 dalek rakudo/nom-complex-insanity: fix infix -
14:09 dalek rakudo/nom-complex-insanity: review: https://github.com/rakudo/rakudo/commit/6fe7e6f70d
14:09 dalek rakudo/nom-complex-insanity: 316fcb9 | moritz++ | src/core/ (3 files):
14:09 dalek rakudo/nom-complex-insanity: more work to get complex.t passing
14:09 dalek rakudo/nom-complex-insanity:
14:09 dalek rakudo/nom-complex-insanity: includes Complex to Num, Int, Rat coercion, Num -> Rat and some bridge methods in Real
14:09 dalek rakudo/nom-complex-insanity: review: https://github.com/rakudo/rakudo/commit/316fcb96f4
14:09 dalek rakudo/nom-complex-insanity: 1e80b76 | moritz++ | src/core/Numeric.pm:
14:09 dalek rakudo/nom-complex-insanity: - should subtract, not add :-)
14:09 dalek rakudo/nom-complex-insanity: review: https://github.com/rakudo/rakudo/commit/1e80b76740
14:10 Mowah joined #perl6
14:10 donri joined #perl6
14:12 moritz nom: say 1e0 + 1
14:12 p6eval nom: OUTPUT«2␤»
14:13 moritz nom: say 1e0 -  1
14:13 p6eval nom: OUTPUT«2␤»
14:21 masak joined #perl6
14:23 dalek rakudo/nom-complex-insanity: a425e09 | moritz++ | src/core/Real.pm:
14:23 dalek rakudo/nom-complex-insanity: get infix:<-> with two different Real types working
14:23 dalek rakudo/nom-complex-insanity: review: https://github.com/rakudo/rakudo/commit/a425e09714
14:23 pmichaud good morning, #perl6
14:23 phenny pmichaud: 09:25Z <jnthn> tell pmichaud can "* array parameters bind as containers" diesappear in spectests now?
14:23 phenny pmichaud: 09:26Z <jnthn> tell pmichaud can "* array parameters bind as containers" diesappear in *nommap* now? D'oh...
14:24 pmichaud yes, it can disappear.
14:25 masak morning, pm.
14:27 wamba left #perl6
14:30 Trashlord hey
14:31 Kivutarrr joined #perl6
14:34 masak ahoj Trashlord
14:34 Trashlord how's it going?
14:34 dalek rakudo/nom-complex-insanity: 2c0fd1c | moritz++ | src/core/Num.pm:
14:34 dalek rakudo/nom-complex-insanity: fix Num.Rat
14:34 dalek rakudo/nom-complex-insanity: review: https://github.com/rakudo/rakudo/commit/2c0fd1ca89
14:36 envi joined #perl6
14:39 PacoLinux_ joined #perl6
14:40 wamba joined #perl6
14:40 PacoLinux left #perl6
14:41 Kivutarrr left #perl6
14:41 dalek rakudo/nom: a5bfdd0 | moritz++ | src/core/Complex.pm:
14:41 dalek rakudo/nom: optimize and fix a few ops. Not correct yet, but compiles
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a5bfdd063e
14:41 dalek rakudo/nom: 6fe7e6f | moritz++ | src/core/Complex.pm:
14:41 dalek rakudo/nom: fix infix -
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6fe7e6f70d
14:41 dalek rakudo/nom: 316fcb9 | moritz++ | src/core/ (3 files):
14:41 dalek rakudo/nom: more work to get complex.t passing
14:41 dalek rakudo/nom:
14:41 dalek rakudo/nom: includes Complex to Num, Int, Rat coercion, Num -> Rat and some bridge methods in Real
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/316fcb96f4
14:41 dalek rakudo/nom: 1e80b76 | moritz++ | src/core/Numeric.pm:
14:41 dalek rakudo/nom: - should subtract, not add :-)
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1e80b76740
14:41 dalek rakudo/nom: a425e09 | moritz++ | src/core/Real.pm:
14:41 dalek rakudo/nom: get infix:<-> with two different Real types working
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a425e09714
14:41 dalek rakudo/nom: 2c0fd1c | moritz++ | src/core/Num.pm:
14:41 dalek rakudo/nom: fix Num.Rat
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2c0fd1ca89
14:41 dalek rakudo/nom: e51937b | moritz++ | src/core/ (4 files):
14:41 dalek rakudo/nom: Merge branch 'nom-complex-insanity' into nom
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e51937b72f
14:41 dalek rakudo/nom: 6518be4 | moritz++ | t/spectest.data:
14:41 dalek rakudo/nom: another passing test file
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6518be4e95
14:42 masak Trashlord: it's nice that it's the weekend. :) I find I need weekends lots more since I started working full-time.
14:42 masak Trashlord: how're you?
14:42 Trashlord kinda bored around here, think I'm gonna move to Finland soon
14:43 masak Trashlord: where are you currently?
14:44 masak also, what does "bored" mean? :)
14:44 Trashlord currently I reside in Israel
14:44 Trashlord and bored means that I don't feel like I can really develop any further here
14:44 Trashlord and that I have become almost comfortably numb
14:44 envi left #perl6
14:44 masak oh!
14:44 Trashlord I must break out of this
14:45 masak well, moving sounds reasonable then.
14:45 Trashlord yes
14:45 masak Trashlord: if you move to Finland, we can visit each other and have hackathons :)
14:45 Trashlord haha, yeah
14:45 Trashlord I'd be like 30 minutes away from you by plane
14:46 masak is that under the assumption that I'm still in the middle of Sweden? because nowadays I'm in the south.
14:46 masak working in the same startup as jnthn. (we're hiring.)
14:47 Trashlord well, I wish to move to northern Finland, actually
14:47 Trashlord or at least somewhere down the middle, like Oulu
14:47 Trashlord I heard Oulu has a great university, with a good Computer Science department
14:48 masak Finland seems nice overall. and yes, I keep hearing good things about the school system. (though probably more about grade school.)
14:49 Trashlord I don't have a high school diploma, though
14:54 Kivutarrr joined #perl6
14:56 perlhack joined #perl6
15:00 perlhack left #perl6
15:03 jnthn evenin'
15:04 Su-Shee masak: germany makes pilgrimages to the finnish school system since they invented this european comparison thing..
15:04 JimmyZ \o jnthn, you had another program today night?
15:05 jnthn JimmyZ: Yeah, went for dinner with some of the bjpw folks :)
15:05 JimmyZ \o/
15:06 JimmyZ some guy went to bjpw only for your talks ;)
15:07 jnthn Wow :)
15:07 wamba left #perl6
15:07 jnthn I hope he enjoyed them! :)
15:07 wamba joined #perl6
15:08 JimmyZ yes, he replied
15:08 jnthn :)
15:09 JimmyZ very professional, he said ;)
15:09 masak jnthn++
15:10 jnthn masak!
15:10 JimmyZ JimmyZ: flw, jnthn 的演讲你感觉怎么样? flw:  挺好 ,很专业
15:10 JimmyZ
15:10 JimmyZ 呵呵
15:12 jnthn :)
15:15 * jnthn sees moritz++ has been patching :)
15:21 Trashlord left #perl6
15:23 Trashlord joined #perl6
15:25 envi joined #perl6
15:31 spetrea pfff
15:32 spetrea Bucharest is extremely boring overall
15:34 cooper joined #perl6
15:36 wamba left #perl6
15:38 envi left #perl6
15:40 Kivutarrr left #perl6
15:49 perlhack joined #perl6
15:49 envi joined #perl6
15:50 perlhack hi all
15:50 masak hi, perlhack.
15:50 perlhack i quietly to the.
15:50 masak sorry?
15:51 perlhack hola masak
15:51 masak ("i quietly to the." that was not a full sentence)
15:51 masak you can't end a sentence with "the".
15:51 perlhack Needless to say "I apply" in a poem
15:52 perlhack ouch!
15:52 perlhack thanks
15:52 perlhack masak
15:52 perlhack masak:thanks,i understand now
15:52 perlhack i quietly to the here...
15:52 perlhack hm....
15:53 masak "I came back, quietly", perhaps?
15:53 masak instead of "I again come to here" (which is wrong), you can use either of "I'm back", "I'm here again", "I came back", or "Hello again".
15:54 JimmyZ or just say 'o'
15:54 perlhack wasai
15:55 perlhack very very very very thanks
15:55 perlhack masak
15:55 perlhack you are my teacher.
15:55 masak phenny: "有很多方法可以用英语打招呼。"?
15:55 phenny masak: "There are many ways to say hello in English." (zh-CN to en, translate.google.com)
15:56 jnthn "< masak> you can't end a sentence with "the"" - oh the irony!
15:56 masak jnthn: use/mention dichotomy. :P
16:00 JimmyZ jnthn: where is your ppt?
16:00 masak yeah! the people demand slides!
16:00 jnthn JimmyZ: ah, thanks for reminder...I upload :)
16:01 masak JimmyZ++
16:01 JimmyZ yes, some people demand that
16:02 masak virtually everyone, I'd say. like, 93% or so.
16:03 masak the thing about making up statistics on the spot: it's so easy! it takes, like, 5% of the work of actually taking the trouble to check something.
16:09 masak cpanm++ # all I ever wanted in a CPAN client
16:11 perlhack left #perl6
16:13 JimmyZ the videos can be downloaded on Monday
16:13 pmichaud \o/ videos++
16:13 masak it will be a good Monday.
16:14 pmichaud afk, lunch.  then nom regexes.
16:15 * masak .oO( what, like, for dessert? )
16:15 pmichaud regexes can be very tasty.
16:15 * JimmyZ .oO( LTM ?)
16:15 pmichaud I've probably cooked up more regexes than I care to count.
16:15 pmichaud LTM, not yet, but preparing the way for it.
16:16 pmichaud right now it's more important that we have regexes in nom than that they run LTM.
16:16 pmichaud but LTM is high on my list, yes.
16:20 galf joined #perl6
16:20 masak galf: o\
16:20 masak er, o/
16:20 masak greeting hand position fail.
16:20 galf masak: :)
16:21 masak clearly I shouldn't write code today. :)
16:21 JimmyZ galf is the videos provider
16:21 * masak hugs galf!
16:22 masak galf: 谢谢你!
16:22 JimmyZ if you can't visit live video, blame him :)
16:22 masak JimmyZ: I was asleep... :)
16:22 JimmyZ hehe
16:23 jnthn Not sure it's fair to blame galf for that :)
16:23 masak JimmyZ said I could... :)
16:23 * jnthn watches his slides slowly upload on glacial FTP connection :)
16:24 JimmyZ well, they said, it can be only visited  in china
16:24 masak I'm not sure that's galf's fault either...
16:24 pmichaud galf++ #videos
16:27 galf next monday, i will upload this video to youtube or another online video provider
16:28 galf thanks everybody for supporting us
16:29 * JimmyZ can't visit youtube, due to GFW :(
16:30 galf GFW is great project :)
16:30 masak Youtube is very petty-borgeoise and must be censored!
16:31 daniel-s left #perl6
16:31 Krunch (it's spelled "petit bourgeois")
16:32 masak Krunch: thank you.
16:32 nebuchadnezzar left #perl6
16:32 galf maybe have another good choice
16:32 masak I should know how to spell "bourgeois" at this point. I've seen "petty-" in English literature, but I know it comes from "petit".
16:33 * jnthn again wonders how you actually pronounce "bourgeois"
16:33 jnthn if it's French, then nothing at all like it's written :)
16:34 Krunch i wasn't previously aware of the use of "petty" in this context but i find it appropriate
16:34 Krunch jnthn: au contraire, if you are a native french speaker the pronounciation almost makes sense for that word :op
16:34 masak Krunch: well, I guess "petty" as a word also comes from "petit".
16:35 JimmyZ 'night
16:35 JimmyZ left #perl6
16:35 jnthn night, JimmyZ o//
16:35 galf gn!
16:35 Krunch i can't really think of a way to explain how it's pronounced over irc though
16:35 jnthn envi: As a native English speaker, I guess I've got really no standing to complain about other language's spelling systems :)
16:35 Krunch wikipedia says buʁʒwa
16:35 jnthn cah
16:35 jnthn I meant Krunch, not envi :)
16:36 nebuchadnezzar joined #perl6
16:36 jnthn ...those keys aren't even near each other :)
16:36 masak heh, my guess was buʁʃu:ɑ
16:36 Krunch masak: wikitionary agrees http://en.wiktionary.org/wiki/petty#Etymology
16:36 wamba joined #perl6
16:36 masak Krunch: well... it was a guess, but a fairly safe one :)
16:38 masak "petty" means "small-minded", so the jump from "petit" is... small :)
16:38 Krunch yeah it makes sense, i just never though about it before
16:39 Krunch and you sometimes actually use just "petit" in French as you would use "petty" in English
16:39 masak oh!
16:39 Krunch « C'est petit. » like "It's petty."
16:39 masak Europe is shock-full of these coincidences. by the pidgeon-hole principles, with all those words in all those languages, and only a limited number of meanings, there's bound to be overlap :P
16:39 masak principle*
16:39 Krunch although it sounds kind of old style
16:40 masak well, so does "small-minded", I think.
16:40 Krunch in french you would rather say a "narrow mind"
16:41 Krunch also, don't take french lessons from me, i am from Belgium, our French is slightly different in ways :)
16:41 thou joined #perl6
16:46 jnthn gah, what was that $_ bug we had the other day...
16:47 jnthn nom: $_ = 42; my $x = { say $_ }; $x()
16:47 p6eval nom: OUTPUT«Mu()␤»
16:47 jnthn that'll do.
16:48 Kivutarrr joined #perl6
16:50 dolmen left #perl6
16:52 zby_home joined #perl6
16:52 moritz nom: say $_
16:52 p6eval nom: OUTPUT«Any()␤»
16:54 xhacktly joined #perl6
17:00 masak nom: $_ = 42; { say $_ }()
17:00 p6eval nom: OUTPUT«Mu()␤»
17:05 thou left #perl6
17:06 xhacktly left #perl6
17:08 dalek rakudo/nom: 67fe2fd | jonathan++ | src/Perl6/SymbolTable.pm:
17:08 dalek rakudo/nom: Fix $_ bug.
17:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/67fe2fd03a
17:09 xhacktly joined #perl6
17:10 noganex_ joined #perl6
17:11 xhacktly hey guy.. i try to run a litte perl script in rakudo, but i het this;  ===SORRY!=== Maformed UTF-8 string.  so what does i do wrong or what did i forgot?
17:11 noganex left #perl6
17:11 xhacktly guys*
17:11 masak xhacktly: probably you used a non-ASCII character in there.
17:11 masak and it was not encoded right.
17:12 moritz rakudo expects is source files to be in UTF-8
17:12 moritz and if it's not, it whines loudly
17:12 jnthn that and/or the UTF-8 file contains a BOM.
17:12 masak could be something like a » but in Latin-1 instead of UTF-8.
17:12 masak jnthn: somebody set us up it!
17:12 jnthn masak: I knew that was coming :P
17:13 masak figured someone had to drop that one :P
17:14 jnthn talking of coming...
17:14 * jnthn waits for nearly done upload
17:14 jnthn There!
17:14 masak url?
17:14 jnthn http://jnthn.net/articles.shtml has BJPW slides
17:14 masak \o/
17:15 pmichaud back from nom
17:16 masak haha, insert in middle is 中
17:16 moritz jnthn++ # t/spec/S04-declarations/implicit-parameter.t now passes
17:16 pmichaud nom:  { $_ = 42 };  say $_;   # the other $_ bug
17:17 p6eval nom: OUTPUT«Cannot assign to a non-container␤current instr.: '_block1010' pc 304 ((file unknown):227) (:1)␤»
17:17 pmichaud maybe needs a rebuild.
17:18 masak "Hey, more beer!" :P
17:19 moritz evalbot rebuild nom
17:19 p6eval OK (started asyncronously)
17:20 moritz nom: say '?'
17:20 p6eval nom: OUTPUT«Rebuild in progress␤»
17:20 masak jnthn: oh, it was from your material the lots-of-features-in-faded-pastel-colors slide came from!
17:20 masak jnthn: I recreated it for my "Perl 6 excited" talk at FPW.
17:21 lichtkind joined #perl6
17:22 pmichaud jnthn: btw, I figured out how/where metaops should be generated.
17:23 pmichaud (haven't implemented it yet -- will do that later)
17:23 kthakore who is perlgeek.de (masak or moritz)
17:23 arnsholt That's moritz
17:23 arnsholt masak is strangelyconsistent
17:23 kthakore haha
17:24 kthakore moritz: please tell me there is a 'om' layer in rakudo too! So it can go om nom nom nom nom :P
17:24 * kthakore did the jokes ... and now runs away
17:25 pmichaud we could rename "ng" to "om"
17:25 masak
17:25 pmichaud so then it's   "alpha om nom nom nom nom ..."
17:25 masak with out luck, it'll be renamed "OMG"
17:26 masak our*
17:26 jnthn masak: oh, when I saw the features thing in your slides I thought you'd just copied mine!
17:26 * moritz wonders if he should submit his last blog post to r/programming/
17:27 jnthn pmichaud: Nice
17:27 jnthn pmichaud: where, ooc?
17:27 pmichaud I'm about to write a nom update post on pmthium
17:27 pmichaud jnthn: here's the steps
17:27 pmichaud given a request for a metaoperator like   R+=
17:27 masak jnthn: conceptually, yes. but I didn't have access to your slide when I did it :)
17:28 pmichaud first, look for &infix:<R+=> in the current set of lexical scopes.  If found, we use that.
17:28 dalek rakudo/nom: fa88a07 | (Solomon Foster)++ | t/spectest.data:
17:28 dalek rakudo/nom: Turn on S32-str/lcfirst.t now that the { $_ = whatever } bug has been fixed.
17:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fa88a07355
17:28 masak moritz: I think so.
17:28 jnthn masak: Hopefully 中 was vaguely suitable for what I used it for :)
17:28 pernatiy joined #perl6
17:28 pmichaud If &infix:<R+=> isn't found, then we'll install it into the same lexical scope that defines &infix<+=>
17:29 masak jnthn: well, I've never seen it used as a verb... but at least it's related :)
17:29 pmichaud (this could be UNIT-level scope if the module hasn't defined its own &infix:<+=>
17:29 moritz colomon: it fixed way more tests... I'll commit after my run finished :-)
17:31 pmichaud so basically it's just "search outer lexical scopes for the one that holds the current definition of the base operator, install the metaoperator in that scope)
17:31 pmichaud s/)/"
17:31 masak sounds sane.
17:31 pmichaud and we don't go beyond UNIT-level scope (since we can't affect the outer lexical scope of something that has already been compiled)
17:31 masak could this be done at parse time?
17:32 pmichaud I'm thinking it could be done at compile time, but you have to be sure you get the right lexical operator then.
17:32 colomon moritz: glad to hear it.  I just checked the ones I knew had that bug.
17:32 masak pmichaud: sure.
17:32 * moritz can't wait for nom to have as many features as master
17:32 pmichaud for the next version I'll likely have it happen at block-entry time.
17:33 moritz which is why I hack on it :-)
17:33 pmichaud and deal with compile-time generation a version after that.
17:33 moritz LHF: unpolar, cis
17:33 pmichaud I should be able to at least refactor metaop generation into a single subroutine in Actions.pm
17:35 envi left #perl6
17:36 pmichaud in case people missed it in the commit logs, rakudo master is now pegged to a specific spectest revision, so we can hack on spectests without having it affect master.
17:36 Chillance joined #perl6
17:37 jnthn pmichaud: sounds sane overall
17:37 xhacktly left #perl6
17:38 pmichaud I'm getting a spectest fail in t/spec/S02-literals/numeric.t
17:38 tokuhirom left #perl6
17:38 pmichaud nom:  { $_ = 42 };  say $_;   # the other $_ bug
17:38 p6eval nom: OUTPUT«42␤»
17:38 pmichaud \o/  jnthn++
17:38 dalek roast: b73e532 | moritz++ | S02-builtin_data_types/ (2 files):
17:38 dalek roast: unfudge passing rakudo tests
17:38 dalek roast: review: https://github.com/perl6/roast/commit/b73e532ac5
17:38 jnthn pmichaud: I get Parse errors: No plan found in TAP output
17:39 jnthn (for numeric.t)
17:39 moritz works here
17:39 pmichaud same here.
17:39 moritz what's the verbose output?
17:39 pmichaud (Parse errors: No plan found in TAP output)
17:39 jnthn oh
17:39 moritz no, if you run it directly
17:39 jnthn no bigint lib loaded
17:39 pmichaud no bigint lib loaded
17:39 moritz huh?
17:40 dalek rakudo/nom: 16ccf25 | moritz++ | t/spectest.data:
17:40 dalek rakudo/nom: four more passing test files
17:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/16ccf25d96
17:40 moritz I didn't know we used any bigint libraries...
17:40 jnthn in, er, HLL;Actions;string_to_int!
17:40 moritz are you on 32bit?
17:40 pmichaud 64bit here
17:40 jnthn yes
17:41 moritz btw t/spec/S03-metaops/not.t segfaults here
17:41 pmichaud aha
17:41 pmichaud it's because string_to_int was converted from PIR to NQP
17:41 pmichaud which means it's using Integer PMCs instead of an int register
17:41 * moritz wonders why it works for him, but fails for jnthn++ and pmichaud++
17:41 jnthn ah
17:41 pmichaud and the Integer PMC tries to promote to bigint
17:41 jnthn OK, sleep time here
17:41 jnthn 'night o/
17:42 pmichaud perhaps change
17:42 pmichaud well.... hmm
17:44 masak night, jnthn
17:45 dalek roast: 35f40bd | moritz++ | S29-any/isa.t:
17:45 dalek roast: refudge isa.t for rakudo
17:45 dalek roast: review: https://github.com/perl6/roast/commit/35f40bdec3
17:45 pmichaud mul $P112, $P110, $P111
17:45 pmichaud aiiiie
17:45 pmichaud that's.... a big change.  :(
17:46 masak today's autopun: http://twitter.com/MooseAllain/status/87081626835763200
17:47 moritz :-)
17:47 pmichaud oh, I guess it isn't.
17:47 pmichaud I thought that nqp (and nqp-rx) always did multiplication in N regs.  Guess not.
17:47 moritz masak: don't you want to register autopun.org and collect the best ones there? :-)
17:48 masak :)
17:48 masak no, but now I want to register autopun.org... :)
17:50 masak the strange thing about autopuns... they're all pretty much alike. and yet people seem to have an inexhaustible liking for them.
17:51 pmichaud in src/HLL/Actions.pm, change
17:51 pmichaud $result := $base * $result + $digitval,
17:51 pmichaud to
17:52 pmichaud $result := nqp::add_n(nqp::mul_n($base, $result), $digitval);
17:52 pmichaud that will force it to use N registers for the multiplication
17:52 pmichaud or, perhaps change
17:52 pmichaud my $result := 0;
17:52 pmichaud to
17:52 pmichaud my $result := 0.0;
17:52 masak O.O
17:52 pmichaud might have the same effect by putting $result into Float space to begin with.
17:53 pmichaud (or could use 0e0)
17:53 pmichaud I'll end up fixing all of this when I fix string-to-numeric conversion anyway
17:53 pmichaud so could also fudge the test or remove it from spectest.data until that happens
17:53 moritz pmichaud: I'd love to, but since I can't reproduce the error on my machines, it's a bit pointless if I try
17:54 pmichaud well, I'm writing the above for anyone who wants to tackle it.  I'm kind of preoccupied at the moment.
17:55 moritz ok
17:55 pmichaud also could use --parrot-config="--without-gmp"  so that the bigint library doesn't get linked.
17:55 pmichaud er
17:56 pmichaud --parrot-option="--without-gmp"
18:02 thou joined #perl6
18:04 mj41 joined #perl6
18:09 bluescreen100 joined #perl6
18:11 lichtkind jeeeeeeh , its done :)
18:19 icwiener joined #perl6
18:19 icwiener left #perl6
18:19 icwiener joined #perl6
18:22 masak it is?
18:22 masak is that good?
18:23 lichtkind masak: i hope so, :)
18:23 masak then I hope so too :)
18:23 lichtkind i just released 4 article no 2..6 in this 10 days it really  made me scream
18:23 masak oh! good job!
18:23 lichtkind also the one about perl6 just went too final proof 20 min ago
18:25 lichtkind masak: the wx was really hard, in the process i files some 5-6 bugs, had to test any line of code on 2 OS
18:25 lichtkind wasnt fun anymore
18:26 lichtkind masak: was it you or mberens who tries to build ncurses for parrot?
18:26 lichtkind i was thinking about gui on perl 6 lately again
18:27 lichtkind FreeTUIT is also a source to take ideas from
18:27 lichtkind we need a single DBI for all GUI frameworks
18:27 lichtkind i mean interface like DBI
18:28 lichtkind and Prima is also source of inspiration
18:29 Kivutarrr left #perl6
18:30 lichtkind we have to use the right defaults like Rebol does, but with more perlish API like freeTUIT and a an own TK as option like Prima that is really fast
18:31 lichtkind like Tk only beautiful and easier API
18:32 masak lichtkind: yes, I tried to get the ncurses example under Parrot working the other week.
18:32 lichtkind masak: you think its gonne work?
18:33 whiteknight left #perl6
18:33 lichtkind i like the idea but the amount of work scares me totally away, i think i have to figure out how to achieve it in reusable steps
18:34 masak lichtkind: it used to work. I reported a problem I was having (due to bitrot), and last I heard, Parrot people are working on fixing it.
18:34 masak maybe they've even fixed it already, I haven't checked back.
18:46 masak a teacher from France sent me an email with benchmarkings for the Ackermann function in Perl 5 vs Rakudo. I'm compiling up nom currently to send him benchmarkings for that.
18:46 masak if it's of interest to anyone, I can gist the p5/p6 versions of testing the Ackermann function that he sent along.
18:53 tadzik jnthn: are you arond?
18:53 tadzik or even around?
18:54 tadzik oh, sleep time
18:54 tadzik Anyone fluent with SerializationContext?
18:57 Kivutarrr joined #perl6
18:58 masak for programs that print a lot of things, there seems to be fewer visible GC hiccups with nom that with master.
18:58 pmichaud loliblogged: http://pmthium.com/2011/07/02/more-nom-features-and-spectests-still-5x-faster-than-master/
18:58 masak pmichaud++
18:59 tadzik pmichaud: could you give me a hand with SymbolTable and SerializationContext?
19:00 masak with the Ackermann function, I'm seeing a ~50% speedup in nom. \o/
19:01 * masak writes that to the French teacher
19:02 pmichaud tadzik: I don't know much about those, sorry.  jnthn++ is your guy.
19:02 pmichaud (also I have a phone call to make for a while)
19:04 tadzik ENOJNTHN :)
19:04 tadzik I guess I'll have to wait for him to get back to my TZ
19:04 lue hello universe! o/
19:06 Bzek left #perl6
19:08 lue I almost feel like I should be making an Obligatory nom Post™ too :) .
19:10 masak hellue!
19:10 masak hm, inlining won't help us speed up Ackermann much at all. :/
19:11 masak by the way, so far the biggest slowness I found in that script was a 'say' (for debugging purposes) in the hot path. it ate 80% of the time in the script. (but the same in Perl 5 only ate 15%)
19:16 pmichaud url?
19:16 pmichaud also note that 'say' is a bit more complex now than before :)
19:17 masak I'll take that as a "yes" to the "if it's of interest to anyone" above :)
19:17 masak hold on, I'll just send the email, then I'll make a gist of it.
19:17 pmichaud I didn't see that :)
19:19 pmichaud ah, there it is.  Yes, I'm interested.
19:19 masak messages not getting across properly seem to be the theme of that whole email thread. his complaint, now that I understand it, is "it's slow!"
19:19 masak that's from a guy sitting in the audience of a talk I gave with the message "it's slow, but it's getting faster".
19:19 pmichaud There's also:  http://rosettacode.org/wiki/Ackermann_function#Perl_6
19:20 masak seems to be separately developed code.
19:20 pmichaud the RC example looks to me like it might benefit from inlining
19:21 pmichaud especially the operators
19:21 frettled masak: Yes, but, you know it goes to 11
19:21 frettled 11, man!
19:22 frettled pmichaud++ - nice blog entry, good to see the progress summary for nom!
19:22 pmichaud frettled: thanks
19:22 pmichaud I'm trying to (finally) get myself into the habit of regular blog postings.  If that means summaries, so be it.  :)
19:23 pmichaud I'll probably need a blog post soon about Parcel, List, and LoL
19:23 lichtkind thou: haii
19:23 kaare_ left #perl6
19:23 lue I just realized using <?{Perl6::Grammar.parse($0, :rule<fatarrow>)}> when it's capturing (\H+) doesn't work (e.g. "a => b"), so I tried this:
19:24 lue rakudo: say "a => b" ~~ /(\N+) <?{Perl6::Grammar.parse($0, :rule<fatarrow>)}>/
19:24 p6eval rakudo 72d158: OUTPUT«Contextual $*QSIGIL not found␤  in <anon> at line 1586:src/Perl6/Grammar.pm␤  in 'Cool::match' at line 2684:src/gen/core.pm␤  in 'Regex::ACCEPTS' at line 6418:src/gen/core.pm␤  in main program body at line 22:/tmp/mu8wNVnf8F␤»
19:24 lue Is it my fault, or is that a bug?
19:27 pmichaud well, it's going to parse it as if the b is a subroutine call
19:27 pmichaud which means it wants to find a lot more context than exists there.
19:27 pmichaud (which is where the request for $*QSIGIL is likely coming from)
19:29 lue so maybe fatarrow isn't the right rule (trying "'a' => 'b'" didn't work either)
19:30 masak email conversation about Ackermann: https://gist.github.com/1061562
19:30 pmichaud that's not a fat arrow, it's an &infix:<=>>
19:30 pmichaud try   a => 'b', maybe
19:30 lue that didn't work either
19:32 lue I'm trying to match Pod configuration options in the form a => b (see https://github.com/lue/SUPERNOVA/blob/4ce4bbfba9894de5ffb1eb0d1bf66ae52b83bb5b/t/grammar/config.t)
19:32 pmichaud masak++   that response is awesome
19:32 pmichaud I'd love for it to make it into a public post somewhere
19:33 masak I could blog about it.
19:33 pmichaud the apples-to-oranges point is very well made.
19:33 masak thanks.
19:34 pmichaud and, tbh, I'm extremely surprised and pleased that we're only 3x perl 5
19:34 pmichaud I would have never guessed that.
19:34 masak not sure how well that holds up for larger $m and $n.
19:34 masak people are encouraged to investigate :)
19:35 pmichaud it might also be useful to benchmark against the RC version, which (I think) avoids the return statements.
19:36 masak also, I didn't want to write it, but I didn't get a factor of 16 between Rakudo and Perl 5.
19:36 masak (from his numbers, that is)
19:36 pmichaud (return is much faster in nom than in master, but so far it's still more costly than simply falling off the bottom)
19:36 masak I got 674.
19:37 pmichaud 16 seems small to me, too
19:37 pmichaud I would've expected much higher.
19:37 masak and he couldn't have meant "16!", either :P
19:37 pmichaud I'll be happy to write up a blog post if we can get permission from the prof
19:37 masak I'll write and ask him.
19:38 pmichaud I could also write up the post as being an anonymous contribution :)
19:38 pmichaud (as you've made it here)
19:38 masak that might be better in any case.
19:39 masak anyway, from 674 to 3... I like that :)
19:40 masak jnth++ pmichaud++
19:40 pmichaud also, I think his calculation of "16x" is wrong -- his numbers show 674 also.
19:40 pmichaud (maybe that's what you're referring to)
19:40 masak that's what I meant.
19:41 masak my numbers give 1289.
19:41 pmichaud what version of rakudo, ooc?
19:41 * masak looks
19:41 pmichaud Rskudo Star 2011.04 is still running with the slower gc
19:41 pmichaud so there's a cost there, as well.
19:41 masak 2011.05-21-g7175e54 built on parrot 3.5.0 RELEASE_3_5_0-13-g19bbdee
19:41 am0c left #perl6
19:42 masak that's my version. I don't know his.
19:42 masak could well be R*.
19:43 pmichaud but yes, from 674 to 3 is excellent.
19:43 pmichaud I'd love to go back and reply to the post last year that said "You'll never get a 95% speed improvement EVER"
19:46 masak :D
19:47 rgrau joined #perl6
19:47 masak it's easier to get a good speed improvement if you start out *really* slow!
19:55 masak pmichaud: hey! it's fine to fix RT-reported bugs in the nom branch, but they can't really be closed until nom merges into master. fair is fair :)
19:56 lue time    is guaranteed to give a UTC epoch, correct?
19:56 masak lue: no, POSIX time as an Int.
19:57 masak lue: did you check S32 before asking? I did before replying.
19:58 pernatiy left #perl6
19:58 masak lue: hm, maybe "no" should actually be "yes"... :)
19:59 masak lue: at least if "UTC epoch" and "POSIX time" are the same, which they seem to be.
20:00 lue I know at least on the server I use it returns the "UTC epoch", I was just wondering if it could change if the timezone had a say in it.
20:02 masak it's the "UTC" there that worries me. that's timezone-related.
20:02 masak but it's been a while since I dabbled in Temporal, so my knowledge is a bit bitrotted.
20:03 moritz speaking of which, I guess we have enough features now that porting Temporal to nom should be a LHF-ish task
20:05 lue I'm just worried that the epoch could be measuring a different 1 Jan 1970 00:00:00 than the UTC's
20:06 lue [timekeeping systems seem sometimes more complex than Time itself :P]
20:07 dalek roast: c1ba1c5 | moritz++ | S32-num/complex.t:
20:07 dalek roast: start fudging complex.t for nom
20:07 dalek roast: review: https://github.com/perl6/roast/commit/c1ba1c5607
20:08 Chillance left #perl6
20:09 pmichaud I don't follow the term "UTC epoch", fwiw.
20:09 lue Now I feel like trying to implement S32::Temporal in nom.
20:09 pmichaud I know about "UTC" and "Unix epoch", but not "UTC epoch"
20:09 masak lue: no need to implement it, just copy/paste it :)
20:09 lue I mean that as: the number of seconds since 1 Jan 1970 00:00:00Z
20:10 pmichaud That's the Unix epoch.
20:10 masak ...what S32/Temporal calls the POSIX epoch.
20:10 pmichaud POSIX epoch also makes sense there, I think.
20:11 Holy_Cow joined #perl6
20:13 masak rakudo: class Cow { method low { "moo!" } }; role Holy { method low { "holy " ~ callsame } }; my $holy_cow = Cow.new but Holy; $holy_cow.low
20:13 p6eval rakudo 72d158:  ( no output )
20:13 masak rakudo: class Cow { method low { "moo!" } }; role Holy { method low { "holy " ~ callsame } }; my $holy_cow = Cow.new but Holy; say $holy_cow.low
20:13 p6eval rakudo 72d158: OUTPUT«holy moo!␤»
20:13 masak \o/
20:15 masak by the way, my tweet http://twitter.com/carlmasak/status/86905297368649729 seemed to intrigue people, and it's my most RT'd one ever.
20:16 masak people do respond well to sensationalism ;)
20:16 pmichaud masak: ummm, in your reply, nom is 30x perl 5, I think.
20:17 pmichaud 2.420s versus 0.080 s
20:17 pmichaud (or are you using different numbers for comparison?)
20:18 masak oh um.
20:18 masak no :/
20:18 * masak writes a correction to the French prof
20:18 pmichaud still, 30x isn't too bad :)
20:18 pmichaud the timings are a bit off there because of the cost of compilation and initialization being included as well
20:19 pmichaud Rakudo's parser (both nom and master) being a lot slower than p5's parser
20:19 masak well, yes.
20:20 moritz I need a few forward references to Complex in Real
20:20 masak pmichaud: but that's a cost people will get when they run stuff.
20:20 moritz does that mean I have to move Complex to BOOTSTRAP.pm?
20:20 pmichaud moritz: no.
20:20 pmichaud first, what's the forward reference you need?
20:20 masak moritz: forward references from Real to Complex feel wrong on a philosophical level. :)
20:20 moritz pmichaud:     method unpolar(Real $mag: Real $angle) {
20:20 moritz Complex.new($mag * $angle.cos(Radians),
20:20 moritz
20:21 moritz $mag * $angle.sin(Radians));
20:21 moritz }
20:21 pmichaud at the top of Real.pm, put
20:21 pmichaud class Complex { ... }
20:21 pmichaud that's all you need.
20:21 * moritz tries
20:21 masak that's the standard solution to circular refs in Perl 6, IIUC.
20:21 pmichaud correct.
20:22 pmichaud our goal is to move stuff out of BOOTSTRAP.pm, not put more in :)
20:22 masak I once had a rant on p6l where the conclusion basically was to use 'class B { ... }'
20:23 pmichaud BOOTSTRAP.pm needs to be as small as possible.  Even smaller than that would be better.  :)
20:25 pmichaud 20:20 <masak> moritz: forward references from Real to Complex feel wrong on a philosophical level. :)
20:25 pmichaud I'm surprised you said that after the link you posted yesterday.  :-)
20:25 pmichaud (which I very much enjoyed, btw)
20:27 pmichaud (mathematically,  Real isa Complex, not vice-versa.  :-)
20:27 masak Complex are still (isomorphic to) a superset of Real. Real are simpler, and if there should be references between them, it should be inwards, from Complex to Real.
20:27 pmichaud okay, I might buy that.  :)
20:28 lue what *are* forward references from Real to Complex anyhow? [everytime compiler-talk goes on I feel like I don't know anything :)]
20:28 masak lue: oh, nothing complicated :)
20:28 pmichaud lue: there are methods in Real that need to use methods in Complex.
20:28 masak lue: it's just references to the Complex type before it has been defined.
20:28 pmichaud in this case, the Real.unpolar method has to use Complex.new in order to create its result.
20:28 masak lue: ("forward" in the code, that is)
20:29 pmichaud but since Complex is defined *after* real, we have a forward reference.
20:29 masak lue: it all comes down to Perl 6 having a one-pass compiler. (as opposed to, say, Java)
20:29 masak lue: which means if the Perl 6 parser hasn't seen a type, even if that type is defined further down in the program, it doesn't know what to do.
20:30 masak s/seen a type/seen the definition of a type/
20:30 lue ah.
20:31 masak rakudo: class A is B {}; class B {}
20:31 p6eval rakudo 72d158: OUTPUT«===SORRY!===␤No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Mu $child, Role $r)␤:(Routine $r, Any :default($default)!)␤:(Routine $r, Any :rw($rw)!)␤:(Code $block, Any $arg?, Any :export($export)!)␤:(Mu $child, Mu $pa…
20:31 lue [right now I'm compiling nom with Temporal.pm from master in nom's src/core, let's see how that goes]
20:32 masak rakudo: sub foo { say ++$i }; my $i = 0; foo; foo; foo; # this unfortunately works, though. shouldn't.
20:32 p6eval rakudo 72d158: OUTPUT«1␤2␤3␤»
20:32 masak nom: sub foo { say ++$i }; my $i = 0; foo; foo; foo
20:32 p6eval nom: OUTPUT«1␤2␤3␤»
20:32 masak :(
20:32 pmichaud some lexicals get used before they're declared, some don't.
20:32 pmichaud (yes, we need to fix it in the case of scalars.)
20:33 masak come again?
20:33 lue is foo not allowed to see $i in that case? or is that an example of forward references? [one that's buggy, apparently]
20:33 masak you're saying it's legal for some variables?
20:33 pmichaud nom:  foo;  sub foo { say 42 };   # &foo is used before declared.
20:33 p6eval nom: OUTPUT«42␤»
20:33 masak lue: no, and yes.
20:33 masak pmichaud: oh, oh!
20:33 masak sure.
20:34 masak I didn't conflate "subs" with "lexicals", but of course I should've.
20:34 lue nom: say time;
20:35 p6eval nom: OUTPUT«1309638899␤»
20:35 masak rakudo: say time.fmt("%x")
20:35 p6eval rakudo 72d158: OUTPUT«4e0f8109␤»
20:35 masak :)
20:35 pmichaud rakudo:  say time.fmt('%b')
20:35 p6eval rakudo 72d158: OUTPUT«1001110000011111000000100011111␤»
20:36 masak imagine a wrist watch showing that.
20:36 masak "what time is it?" -- "um..."
20:37 djo_ joined #perl6
20:37 lue For some reason adding Temporal.pm didn't do anything [I'm missing a step, I feel]
20:38 djo_ hello every body !!
20:38 masak djo_: \o
20:38 pmichaud probably needs to be added to the Makefile
20:38 pmichaud but for testing, it's far easier to use it as a standalone file
20:38 pmichaud than to have to recompile the core for each minor change
20:38 lue just  use Temporal  then?
20:39 masak djo_: how are you today, sir?
20:39 masak (or madam)
20:39 pmichaud I just add my test code to the bottom of Temporal.pm, and run it directly.
20:39 pmichaud although "use Temporal" should probably also work (not sure how well export plays with it)
20:39 masak lue: what pmichaud said. it's far easier to develop outside of Rakudo before you're ready to integrate what you've written.
20:39 mj41 left #perl6
20:40 pmichaud also, Temporal.pm is one of those I want to re-review a bit before accepting it into the core
20:40 moritz btw you can also use lexicals before you declare them, as long as they are later declared in the same block
20:40 djo_ can you help me for find good ide for perl with autocmplition  code ?
20:40 moritz it's just that the parser is supposed to complain
20:40 masak djo_: have you checked out Padre?
20:40 moritz djo_: vim
20:41 moritz well, nearly an IDE :-)
20:41 djo_ no .
20:41 moritz rakudo: sub f { eval 'say $x' }; my $x = 5; f
20:41 p6eval rakudo 72d158: OUTPUT«5␤»
20:41 masak I use vim too, with autocomplete.
20:41 moritz perfectly legal Perl 6 code that uses a variable ($x) before it was declared
20:41 masak moritz: I don't consider that a forward reference, though.
20:42 lue well, right now I can't do  $ perl6  from any directory except rakudo/ , so I'll take care of that problem first :)
20:42 masak moritz: since the string isn't code at parse time.
20:42 pmichaud $x there is a string con.... masak++
20:42 Holy_Cow left #perl6
20:42 pmichaud it's not a variable reference until it's compiled at runtime by eval()
20:42 moritz ::('$x') or whatever it's spelled would also work
20:43 masak same thing there.
20:43 moritz I guess it depeends on what you mean with "before"
20:43 masak you're delaying execution, so it's not forwards anymore.
20:43 pmichaud or "variable"
20:43 masak or "reference" :)
20:43 moritz masak: execution is not delayed
20:43 pmichaud my $x = 'class Foo { ... }';    # there's no class declared here.
20:43 moritz masak: just compilation
20:43 masak moritz: oh, troo.
20:43 masak I meant that.
20:44 moritz thought so :-)
20:44 pmichaud my $x = '@a';    # there's no array being used here.
20:44 masak rakudo: my $x = 'eval $x'; say eval $x
20:45 p6eval rakudo 72d158: OUTPUT«(timeout)»
20:45 pmichaud more interesting is something like:
20:45 masak rakudo: my $x = 'say "OH HAI"; eval $x'; eval $x
20:45 pmichaud rakudo:  sub f { eval 'say $x'; };   f();  my $x = 5;
20:45 p6eval rakudo 72d158: OUTPUT«(timeout)OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH H…
20:45 p6eval rakudo 72d158: OUTPUT«Any()␤»
20:45 moritz pmichaud: but that's wrong, no?
20:45 djo_ vim is for linux ,i what about windows ?
20:45 masak moritz: why should it be?
20:45 pmichaud is it?  why?
20:46 masak I see nothing wrong with it.
20:46 moritz wait, I'm confusing stuff
20:46 masak $x is visible in the scope of f, and hence the eval.
20:46 moritz djo_: I use gvim on windows too
20:46 masak djo_: I use Linux in a VM on Windows. makes it bearable :)
20:46 masak (but only just)
20:46 moritz some variable initializations should be run at INIT time, but I thing it was 'our', not 'my'
20:46 moritz *think
20:47 moritz pmichaud: just wanted to tell you that I'm very happy to have you back hacking on rakudo
20:47 moritz and discussing
20:47 djo_ moritz ,gvim  where can i find it ?
20:47 pmichaud thanks, I'm glad to be back.  I'm having more fun with rakudo/nom than I've had in a loooooong time
20:47 masak I wouldn't feel too much sympathy for the programmer who wrote the above and found that the compiler had inlined the variable assignment into INIT or earlier.
20:48 masak pmichaud: what moritz said. nice to have you back.
20:48 masak djo_: on Google.
20:48 masak djo_: (and a lot of other stuff is on Google as well)
20:49 djo_ than masak.
20:49 masak http://lmgtfy.com/?q=gvim
20:49 djo_ thank
21:01 masak djo_: autocomplete is made with ^P (if the term is earlier in the file) or ^N (if the term is later in the file)
21:03 moritz or ^Xf for file names
21:03 masak ooh
21:03 moritz don't tell me you didn't know that :-)
21:04 masak I didn't know that.
21:04 * lue makes no comment about his preferred editor emacs...
21:04 bakedb joined #perl6
21:04 masak lue: I use Emacs too. my preferred IRC client is Emacs-based.
21:04 masak lue: I blog in Emacs. but I write most of my code in vim.
21:05 masak I think all vim-Emacs flamewars are silly. both are great tools.
21:07 moritz we now pass the first 466 tests in complex.t
21:07 dalek rakudo/nom: 14ef250 | moritz++ | src/core/Real.pm:
21:07 dalek rakudo/nom: cis, unpolar
21:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/14ef25009d
21:07 masak \o/ moritz++
21:07 lue I haven't bothered with vim much because I like emacs, but I certainly see why some people would fight for it.
21:08 masak I don't :)
21:09 moritz porting the rest from master to nom is really LHF
21:10 lue [the psychotherapist is fun to mess with though]
21:10 masak lue: have you seen http://www.compapp.dcu.ie/~humphrys/eliza.html ?
21:11 lue Is anyone else having trouble running perl6 from a directory other than rakudo/ [nom branch]? I ran make and make install, but it throws: "load_bytecode" couldn't find file 'Perl6/Grammar.pbc'
21:11 moritz 'make install' is know to not work yet
21:12 lue that explains it :)
21:12 pmichaud nom: say 3.sin
21:12 p6eval nom: OUTPUT«0.141120008059867␤»
21:12 masak who starts in Connect 4? X or O?
21:12 soh_cah_toa joined #perl6
21:12 moritz X typically
21:12 masak thanks.
21:12 masak (writing an edublog post)
21:12 moritz Connect 4 is boring. It's solved :-)
21:13 masak well, so is the fourth problem of my contest, and it wasn't boring :P
21:13 moritz :-)
21:14 lue masak: I have not seen that page (although I have visited rinkworks.com extensively, which that page links to for the dialect translators)
21:14 moritz rakudo: say (3 + 4i).log
21:14 p6eval rakudo 72d158: OUTPUT«1.6094379124341 + 0.927295218001612i␤»
21:15 masak for every edublog post I make, it feels like I could write a "what did I not tell you (but wanted to)" section.
21:15 masak maybe I'll do that for the PDF version.
21:16 moritz oh, master uses the parrot Complex PMC to calculate the log of a complex number
21:16 moritz that is... somewhat disappointing :-)
21:16 masak why?
21:16 masak did you want to whip out the Taylor series? :)
21:16 moritz nope :-)
21:16 pmichaud my Mu $complex := pir::new__Ps('Complex');   # should work
21:17 moritz but you can awrite it as A * exp(i phi), and log(A * exp(i phi)) = log(A) + log( exp(i phi)) = log(a) + i phi
21:17 pmichaud not a long-term solution, but works for now :)
21:17 pmichaud (the Complex PMC)
21:18 pmichaud you're welcome to write it with a formula or other solution, too :)
21:18 lue nom time, afk
21:24 lichtkind left #perl6
21:24 masak the bigger the example games, the more features I find I have to go back and retroactively explain in older posts.
21:27 pothos left #perl6
21:27 y3llow left #perl6
21:29 y3llow joined #perl6
21:29 pothos_ joined #perl6
21:30 pothos_ is now known as pothos
21:36 djo_ left #perl6
21:42 Psyche^ joined #perl6
21:43 bakedb left #perl6
21:45 dual left #perl6
21:46 Patterner left #perl6
21:46 Psyche^ is now known as Patterner
21:47 dual joined #perl6
21:47 masak somewhat surprisingly, the only really complicated code in Connect 4 is checking for a winning move.
21:47 masak I'd love it if someone came up with a simpler way to do this after I publish the post.
21:48 masak I've currently exceeded 100 lines of game code (including blank lines), which is more than I expected.
21:50 Holy_Cow joined #perl6
21:55 pernatiy joined #perl6
22:01 rgrau` joined #perl6
22:01 masak oh right, Perl 6 is the language where a comma follows the block in a map :P
22:02 rgrau left #perl6
22:07 Chillance joined #perl6
22:12 jlaire ooooh, Connect4
22:12 jlaire it's a great game
22:13 masak glad you like it :)
22:13 jlaire :)
22:13 jlaire using an efficient bitboard rep and checking for straights with bitops in C was lots of fun
22:14 masak ooh
22:14 masak not going to do that here, but that does sound like lots of fun.
22:14 masak I'm trying to make good use of junctions, though.
22:15 jlaire of course it has the downside that I can't understand the code any more ;)
22:15 masak they're what syntactically took the place of bitops in Perl 6 :)
22:15 masak I'm aiming for some degree of understandability, too.
22:16 jlaire there are some interesting variations that are not solved yet, for example: you need a straight-of-5 to win, and put *two* disks on your turn (except the very first)
22:16 mathw I like understandability
22:16 lue unnom time. hello Mu o/
22:16 jlaire understandability is good
22:16 masak I like it too. I like putting good names on things.
22:16 jlaire I guess masak's blog post is not about solving connect4 :)
22:17 masak no, it's about playing it :)
22:17 jlaire writing some low level hacks cleanly is challenging
22:17 masak yes.
22:17 masak I find that's when I really prefer one-letter or two-letter variable names.
22:17 masak because longer names just get in the way.
22:18 lue trying to  use Temporal  (the Temporal.pm file from master) in nom gives me this: arglist case of use not yet implemented at line 2, near ""
22:19 masak lue: try to remove 'use v6' at the top.
22:19 masak lue: or do you think it's line 2 of your script?
22:20 Kivutarrr left #perl6
22:25 lue well, I just copied Temporal.pm (not too surprised it didn't work), and line 2 is a blank line
22:26 lue line 3 has the beginning of the Dateish role, line 1 has use v6;
22:27 masak it sounds from the error message that a 'use' statement is involved.
22:29 masak yep. src/Perl6/Grammar.pm:466 says that this error occurs if you do 'use Module something_more_here'.
22:29 lue I open up the perl6 REPL and type   use Temporal   (commenting out use v6; didn't help)
22:30 masak urgh; don't use the REPL for this :/
22:30 masak that's just asking for trouble.
22:32 pernatiy left #perl6
22:33 lue sorry. Running use Temporal; from perl6 -e and from a file gets me this error: "load_bytecode" couldn't find file 'Temporal.pbc' [and then a backtrace]
22:35 masak that indicates that you'd need to compile Temporal.pm to a .pbc file.
22:35 masak I haven't used modules in nom enough to understand if and why that's really necessary.
22:35 masak suggest waiting for pmichaud or equiv for advice.
22:36 lue OK. It's not critical for me right now anyhow.
22:36 masak thanks for investigating this far.
22:40 perlhack joined #perl6
22:40 perlhack hi all
22:40 perlhack good morning.
22:40 masak good morning, perlhack.
22:41 perlhack masak haha
22:42 lue All the excitement of nom reminds me of ng :) [which I joined #perl6 during the tail end of] I feel like I should start getting involved in nom before Rakudo becomes to complex to get involved in again :)
22:42 masak perlhack: yes, I come here often :)
22:43 masak lue: I feel almost the same. it looks like a lot of the really fun development will take place after nom has landed -- constant folers and optimizers and whatnot -- and I want to dive in before that happens, so I'm not completely bewildered when it does.
22:45 perlhack Hey Hey ,i came back more ofen
22:45 perlhack often
22:45 perlhack masak
22:45 masak perlhack: yes, you do :)
22:46 masak my connect-4 game now works.
22:46 masak I'll throw it up as a gist while I blog, so that people can comment on it if they want.
22:46 masak Connect 4 the game: https://gist.github.com/1061743
22:47 perlhack masak  my Egnlish is right?
22:48 perlhack english
22:48 masak perlhack: looks OK.
22:48 masak perlhack: "I cOme back more often" (not cAme) is probably what you want, but that's details :)
22:49 masak perlhack: "come" is in the present, "came" is in the past
22:50 perlhack Oh !thanks *JOKINGLY*
22:51 masak you're welcome.
22:51 masak and leave off the "*JOKINGLY*" when you're saying thanks. people might think you're being sarcastic :)
22:51 perlhack I learn English every day for better learning English
22:52 masak it's better to do a ":)" or a ":-)" or a ":-P"
22:52 masak or like this ^^
22:52 masak if you want to show you're Asian :)
22:54 jlaire (I sometimes do this to avoid ambiguous close-parens: ^^)
22:55 perlhack masak, i didn't mean
22:56 masak perlhack: I know you didn't. :)
22:56 perlhack very thanks
22:56 perlhack masak
22:56 masak perlhack: just warning you that it can be misunderstood.
22:56 masak jlaire: convenient!
22:58 perlhack I understand now :-)
22:58 perlhack Simile
22:59 masak well, "smiley", but yes :)
22:59 perlhack Smiley  ,yes yes
22:59 masak a "simile" is a kind of comparison, using works like "like" or "as" or "than".
23:00 TimToady .oO(a smiley is like a simile)
23:00 jon_______ joined #perl6
23:00 jlaire rakudo: $_ = 42; say
23:00 p6eval rakudo 72d158: OUTPUT«␤»
23:00 sjn left #perl6
23:00 masak the way to remember the difference between simile and metaphor: simile -- "men are like pigs". metaphor -- "men are pigs".
23:00 masak jlaire: two things:
23:01 masak jlaire: Perl 6 no longer defaults to $_ in many places. including 'say'.
23:01 TimToady std: say
23:01 p6eval std 37a0cdd: OUTPUT«Potential difficulties:␤  Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/r3BStr0_na line 1:␤------> [32msay[33m⏏[31m<EOL>[0m␤ok 00:01 117m␤»
23:01 masak jlaire: using a bare 'say' without any arguments is illegal in Perl 6 (as TimToady just showed)
23:01 masak but Rakudo has regressed in recognizing it.
23:01 masak alpha: say
23:01 jlaire oh, thanks
23:01 p6eval alpha : OUTPUT«say requires an argument at line 10, near ""␤in Main (file src/gen_setting.pm, line 2593)␤»
23:02 perlhack you are very good person
23:02 jlaire masak: I was just wondering about your usage of 'say ""'
23:02 perlhack masak
23:02 jlaire but I see it's correct now
23:02 masak I personally think it should be allowed and that it should mean 'say ""'
23:02 masak but TimToady cares about the poor Perl 5 developers, I guess :)
23:02 TimToady maybe someday
23:02 drbean joined #perl6
23:02 masak yes, there's a point to being conservative.
23:03 TimToady about the same time we relax the need for \- in a character class, in about 20 years or so
23:03 masak aye.
23:03 jlaire I always just make '-' the first or last character
23:04 TimToady that one's a bit harder actually, since we have to retrain everyone, not just Perl 5 programmers
23:04 perlhack We play happy,i need to eat
23:04 TimToady std: /<[-abc]>/
23:04 p6eval std 37a0cdd: OUTPUT«ok 00:01 120m␤»
23:04 TimToady that works too
23:04 TimToady std: /<[a-c]>/
23:04 p6eval std 37a0cdd: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of - as character range; in Perl 6 please use .. at /tmp/XOvTQHkg4o line 1:␤------> [32m/<[a-c[33m⏏[31m]>/[0m␤Parse failed␤FAILED 00:01 120m␤»
23:04 jlaire rakudo: repeat until my $x { ++$x } say $x
23:05 p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Confused at line 22, near "repeat unt"␤»
23:05 jlaire rakudo: repeat until defined my $x { $x = 1 } say $x
23:05 p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Confused at line 22, near "repeat unt"␤»
23:05 masak jlaire: semicolon.
23:05 jlaire rakudo: repeat until defined my $x { $x = 1 }; say $x
23:05 p6eval rakudo 72d158: OUTPUT«1␤»
23:05 jlaire ty
23:05 masak jlaire: optional in Perl 5, required in Perl 6.
23:05 masak yw
23:05 TimToady well, required there
23:05 jlaire that 'my' is a bit disturbing, my first guess was it's loca to the block
23:05 TimToady nope
23:05 jlaire local
23:05 masak that's also Perl 5 think :P
23:06 TimToady my only every scopes to a real block (or file, or eval string)
23:06 TimToady the only thing that can leak out is a formal parameter name
23:06 TimToady s/every/ever/
23:06 jlaire okay
23:07 masak in pointies?
23:07 masak or did you mean something else?
23:07 TimToady well, any sig
23:07 masak leak out, how?
23:07 TimToady leak out to the sig, not to anywhere else
23:07 Holy_Cow left #perl6
23:08 masak ah, right.
23:08 jlaire masak: it's a standard convention to use A..G for the columns, but that's not important
23:08 jlaire so you can denote squares with D2 etc.
23:08 masak ah, good point.
23:08 masak I think that should be a smallish change.
23:08 masak hm, better not. :)
23:09 masak can always change it later.
23:09 f00li5h left #perl6
23:09 jlaire :)
23:09 masak releasing the blog post takes priority now.
23:13 jlaire masak: in was_vertical_win(), in the outer 0..$N-1, it'd be more semantically correct to use 0..$HEIGHT-$N
23:13 jlaire (similarly for others)
23:13 masak jlaire: because of positions outside the board?
23:14 jlaire if $HEIGHT is larger, $N-1 doesn't work
23:14 jlaire (if $N denotes the length of the required straight)
23:14 masak it does.
23:14 jlaire hm
23:15 masak but I've basically delegated all my outside-of-bounds handling to all_same.
23:15 jlaire the straight might be at $offset 24
23:15 masak (now called "uniform" in my code)
23:15 jlaire with $HEIGHT 50 and $N 4
23:16 masak $offset is never 24, it's only 0..$N-1
23:16 jlaire $N-1 includes a tacit assumption that $HEIGHT-$N <= $N-1
23:16 masak unless I'm much mistaken, I think you're wrong.
23:16 jlaire let me raed it again
23:16 jlaire read, even
23:16 masak I started out writing a lot of bounds checking, like I usually do.
23:17 masak then I went "this sucks", and now I only rely on all out-of-bounds indexings returning Any().
23:17 jlaire oh, I thought that sub was searching the whole board for straights
23:17 jlaire now I see it takes parameters :)
23:17 masak no, it's basically taking the last move and iterating all possibilities around that.
23:18 jlaire makes sense now
23:18 jlaire sorry for the noise :)
23:18 masak all feedback is welcome :)
23:20 jlaire the haskellist in me wants to abstract those loops to a general function; the only difference is how they map ($offset,$i) to ($x,$y)
23:21 masak yeah.
23:21 masak that might actually be a good idea.
23:21 jlaire the loops might better for the audience of the blog post, though
23:21 masak was_win is too repetitive.
23:22 masak I had to write it and re-write it a few times.
23:22 masak first I thought I could get away with only junctions. but that was tricky and unmaintainable.
23:22 masak then I did only maps.
23:22 masak in the end I chose the current style.
23:25 Mowah left #perl6
23:25 perlhack left #perl6
23:28 sjn joined #perl6
23:28 orafu left #perl6
23:28 orafu joined #perl6
23:34 Moukeddar joined #perl6
23:34 Moukeddar left #perl6
23:35 Moukeddar joined #perl6
23:35 Moukeddar Hello Perlers o/
23:35 masak hi Moukeddar \o
23:35 Moukeddar how are you Sir?
23:36 masak contented. good dinner, good beer. :)
23:36 masak blogging right now.
23:36 masak Moukeddar: how are you?
23:36 Moukeddar got involved in things beyond my ability
23:36 Moukeddar other than that : Fantastic
23:37 masak :)
23:37 Moukeddar Design patterns are fun :)
23:37 Moukeddar i'm learning Minimum 3/day
23:38 Moukeddar good rate i guess :)
23:38 masak you really need to code those, too.
23:38 masak I can't stress that heavily enough.
23:38 Moukeddar what do you mean?
23:39 masak implementing the patterns in actual code.
23:39 masak feeling how they work in your fingers.
23:39 jlaire reading about them isn't enough
23:39 masak it's really not enough. it's like reading about eating.
23:40 lue Blag toast!:    https://rdstar.wordpress.com/2011/07/02/perl-6-and-interactive-fiction-the-prologue/
23:40 masak ooh
23:41 Moukeddar ehm. i'm doing the examples and the exercices
23:41 Moukeddar too
23:41 jlaire that's good
23:41 jlaire but 3/day sounds like a lot
23:41 Moukeddar well
23:41 Moukeddar some like decorator/proxy are like a variance of the bridge one
23:41 Moukeddar so it doesn't seem to be a lot
23:42 masak lue: intriguing.
23:43 masak Moukeddar: it's definitely good to know all of them by name.
23:43 masak Moukeddar: I wish I knew more of them by name :)
23:43 Moukeddar and i wish i know more algorithms and weird data structures :p
23:44 masak yeah. there's so much to learn.
23:45 Moukeddar it's an ocean
23:45 Moukeddar and i'm sailing :)
23:45 jlaire if you're able to enjoy design patterns, you'll probably *love* algorithms
23:45 Moukeddar i do enjoy them, and i love the idea behind them
23:45 lue I've got two .org files to prove I've been thinking about and planning it. Actually figuring out exactly what to put where in the ZCode file is the last thing I need to do before the pre-planning is over with.
23:46 Moukeddar and the golden rule is : DO NOT THINK IN DESIGN PATTERNS.
23:46 Moukeddar lue, i don't seem to get the concept of interactive fiction
23:48 lue Interactive fiction is also known as text adventures. They're games you play by typing in commands and reading the result.
23:48 lue Nowadays, a lot of them come with graphics and sound, but text is the focal point of the game.
23:49 jlaire masak: my stab at the functional approach: http://laire.fi/t/connect-4.txt
23:49 * masak looks
23:50 masak jlaire: you rascal, you define a was_win inside of was_win :P
23:50 jlaire oh!
23:50 jlaire didn't notice :D
23:51 Moukeddar ah, like old Text-based RPGs ?
23:51 Moukeddar a was_win inside of was_win is a bad practice?
23:51 masak aye.
23:52 jlaire shadowing variable names in general
23:52 jlaire I don't think it's even allowed in java
23:52 masak it is, AFAIK.
23:52 Moukeddar i did that a few times
23:52 Moukeddar oopsie
23:52 masak let's just call it a "code smell" :)
23:53 Moukeddar then me stinks
23:53 lue a bit. Only it's just words. e.g. "You are in the foyer of the home. There is a large archway to the north, and a staircase to the second floor." You could then type 'north' to go, well, north, or 'up' to go to the second floor, and so on.
23:53 lue [not for somebody who can't stand reading :)]
23:53 jlaire a specific kind of shadowing is quite common in haskell, but usually it's confusing
23:54 jlaire yeah I'm confusing java with some other straight-jacket language
23:55 Moukeddar straight-jacket?
23:55 lue this may be a better explanation of IF than I could offer: http://www.ifwiki.org/index.php/FAQ
23:56 jlaire Moukeddar: lots of limitations compared to more expressive languages
23:56 Moukeddar like?
23:56 masak forbidding operator overloading.
23:57 masak or macros :)
23:57 jlaire defining callback functions is possible, but painful
23:57 jlaire it's a bit personal too
23:57 Moukeddar i get it now
23:58 Moukeddar i get operator overloading
23:58 Moukeddar but i'm not sure what's the equivalent of macros in .NET

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

Perl 6 | Reference Documentation | Rakudo