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