»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by Juerd on 28 August 2009. |
|||
00:00
synth left
|
|||
TimToady | transit gloria [sic] & | 00:01 | |
00:02
nihiliad joined
|
|||
quietfanatic | Is there a way to concatenate two functions, like Haskell's >> operator? | 00:13 | |
diakopter | wrap ? | ||
quietfanatic | I know sub {&sub1; &sub2} works, but if you do that a lot of times, you get a lot of depth. | 00:14 | |
Wrap? Maybe, depending on how it's implemented. But I don't think that's what I'm looking for. | 00:15 | ||
For one thing, wrap modifies in place | |||
diakopter | o | ||
Tene | rakudo: sub foo { say 'hi' }; my @a; @a.push(&foo); say 'omg'; .() for @a; | 00:16 | |
p6eval | rakudo 6c4bab: OUTPUT«omghi» | ||
Tene | you could do that. | ||
quietfanatic: can you give an example? | |||
quietfanatic | Like, I'm writing an event system for my game engine, | 00:17 | |
and I want certain events (like collisions) to have a parameter | |||
but of course I can't check every object for every possible collision, so | 00:18 | ||
diakopter | create a global register!! :) | ||
quietfanatic | I'd have the object keep a "collision method" and append the new collision code when I register a new collision event. | ||
If I explained that sensically enough. :) | 00:19 | ||
diakopter | sounds like you create a list property on each object that stores its collision events, and the collision method iterates them like Tene said | ||
quietfanatic | Yes, I could just have a list of subs. And overload postfix:<( )> on the list. | 00:20 | |
Yeah. | |||
diakopter | with the argument, if .. | ||
quietfanatic | Tene's idea will work fine. | 00:21 | |
diakopter | .Net has an entire member system for events, though I heard someone say they regretted designating them at that level; they shoulda been just normal members whose slot types are treated as events when they're registered as such. | 00:22 | |
quietfanatic | I gotta read up more on event implementation anyway. | 00:23 | |
diakopter | there are scads of techniques of queuing up events on DOM objects | ||
quietfanatic | The thing is, I need a really robust system, including parametric events. | 00:24 | |
diakopter | so make your event method iterator pass in the events as arguments | ||
I mean, pass in the event args as args to the subs | |||
quietfanatic | That's not what I mean. | 00:25 | |
I mean, the parameter determines when the event gets called. | |||
diakopter | you could use the multiple dispatch system for that, or | ||
quietfanatic | If I say the ball object has a collision(Brick) routine, it needs to be called when it collides with a Brick and not when it collides with a Paddle. | ||
That's also why I wanted to introspect signatures, by the way. | 00:26 | ||
diakopter | sounds like Collision is a parametric type | ||
on two objects | 00:27 | ||
I mean, are there 3-body collisions? | |||
quietfanatic | They happen, though coding them would be a pain. | 00:28 | |
What I'm doing for now is I don't have collisions as events, but as normal checking in other events. | 00:29 | ||
diakopter | do you have a Movement event? | ||
quietfanatic | Yes, it's called move. | ||
diakopter | is it a sub or a 'data' object | 00:30 | |
quietfanatic | The collisions would be checked after that event. | ||
It's a data object, that calls the object's move method. | |||
Actually, it's onbly kind of a data object. | |||
00:30
rhr left
|
|||
quietfanatic | What happens is, when registering the event, I put the object class into the event's queue, rather than putting the event on the object somewhere. | 00:31 | |
00:32
rhr joined
|
|||
diakopter | do your objects use a discrete 2D grid when detecting collisions and calculating movement, or some kind of relative proximity checking to other objects | 00:32 | |
quietfanatic | They're effectively rectangles, so it's easy to check their positions against eachother even though the grid is not discrete. | 00:33 | |
Doing collisions based on a bitmask will be fun and tricky. (and slow) | |||
diakopter | I don't know.. assuming there's no superposition of objects' "centers", seems to me it'd be faster | 00:34 | |
quietfanatic | No, I mean checking each pixel of the object's image (or mask or something) to see if they overlap. | ||
diakopter | oh, rather I'd think each object would register its boundaries into an array of arrays that represents the pixel grid | 00:35 | |
quietfanatic | Oh. If I used integer positions, that'd be possible. | 00:36 | |
diakopter | and each movement would check whether the movement would cause an overlap.. | ||
right, integer aka discrete | 00:37 | ||
quietfanatic | In fact, it would even be easier if I was writing my own graphics library. | ||
Yeah, integer = discrete, but I'm using Nums. | |||
diakopter runs. at least they're not bigints or smth :) | 00:38 | ||
quietfanatic | The only thing that bothers me about Nums here is that they have higher accuracy toward the top-right of the screen :) | ||
I mean top-left | |||
diakopter | where's the origin | 00:39 | |
quietfanatic | If somebody inplements a fast fixed-point data type, I'll use it. | ||
The origin is in the top-left. | |||
diakopter | k | ||
so each objects' movement is turn-based | |||
quietfanatic | Yes-ish. | 00:40 | |
diakopter | so with 50 moving objects, each contributes toward computing the state that will determine how to draw the next frame? | ||
quietfanatic | I'm thinking that unless a specific turn order is specified, the objects will be moved in parallel. | ||
Um, yes, I think? | 00:41 | ||
diakopter | I think that's what you mean by in parallel | ||
each object's individual movement doesn't get its own frame redraw | |||
quietfanatic | No. | ||
All objects move, then all objects are drawn. | 00:42 | ||
diakopter | that's what I was saying | ||
quietfanatic | (skipping over after_move events and such) | ||
Well, I've got to get to class now. Be back this evening. | 00:44 | ||
00:46
quietfanatic left
00:54
jaldhar joined
|
|||
diakopter | std: my $a = 0; say $a while (++$a < 10) if ($a < 3) | 01:04 | |
p6eval | std 28539: OUTPUT«===SORRY!===Missing block (apparently gobbled by undeclared routine?) at /tmp/grRhPqfkh7 line 1 (EOF):------> 0; say $a while (++$a < 10) if ($a < 3)⏏<EOL> expecting any of: parameterized block standard stopper terminator | ||
.. whitespaceF… | |||
diakopter | rakudo: my $a = 0; say $a while (++$a < 10) if ($a < 3) | ||
p6eval | rakudo 6c4bab: OUTPUT«123456789Could not find non-existent sub if» | ||
01:11
justatheory left
01:12
nErVe joined
01:16
orafu left,
orafu joined
01:17
payload left
01:18
kst` is now known as kst,
cdarroch left
01:19
nErVe left
01:21
patspam1 joined,
patspam1 left
|
|||
colomon | moritz_: Think I've figured out the sin glitch. I took the "is export" off of Num.sin, erased the sin(Complex) functions, and now things seem to work. More soon. | 01:24 | |
dukeleto | "rakudo on rockets" web framework has a nice ring to it. just sayin' | 01:29 | |
01:40
hercynium left
|
|||
diakopter | rakudo: my $a=0;for (;++$a < 1e380;) {} | 01:41 | |
p6eval | rakudo 6c4bab: OUTPUT«undefined identifier 'Inf'» | ||
diakopter | rakudo: my $a=0;for (;++$a < 1e280;) {} | ||
p6eval | rakudo 6c4bab: ( no output ) | 01:42 | |
diakopter | that's fast | ||
the bug is that it doesnt' complain about not finding for() sub | 01:44 | ||
01:45
payload joined
01:58
htns joined
|
|||
htns | Hi. Never used IRC before. Hope this works... | 01:59 | |
Just built Parrot and then Rakudo. | 02:00 | ||
Ran a simple script (say "hi", count to 10), and `time` tells me it took just under 5 seconds. | |||
Is that about right right now for Rakudo on Parrot? | 02:01 | ||
02:01
htns left
02:06
htns_ joined
|
|||
pugs_svn | r28540 | diakopter++ | [sprixel] implement trailing if/while (actually I'd already done if) | 02:08 | |
diakopter | htns_: what does your script look like | ||
rakudo: say 'hi'; my $a=0; say $a while ++$a < 10 | |||
p6eval | rakudo 6c4bab: OUTPUT«hi123456789» | ||
htns_ | use v6; | ||
say "hi"; | |||
for 1 .. 10 { | |||
say ">>>$_<<<"; | |||
} | |||
That's in a file named `foo.pl`. | 02:09 | ||
In comparison, a similar file for Perl 6 runs in some crazy small amount of time (0.04 s). | 02:10 | ||
02:10
stephenlb left
|
|||
diakopter | htns_: you mean Perl 5? | 02:10 | |
diakopter@d5dev01:~/src/pugs/src/perl6$ time rakudo -e 'my $a=0; 1 while ++$a <= 10' | |||
real 0m1.052s | |||
user 0m0.732s | |||
sys 0m0.280s | |||
htns_ | [sigh] Yes. Sorry. | ||
diakopter | around 1 second here | 02:11 | |
02:11
rfordinal joined
|
|||
htns_ | Wow. Hm. | 02:12 | |
Well, I built Parrot from source from svn. | |||
diakopter | diakopter@d5dev01:~/src/pugs/src/perl6$ time perl sprixel.pl -e 'my $a=0; 1 while ++$a <= 10' | ||
real 0m1.682s | |||
htns_ | Did a `perl Configure.pl --prefix=/home/john/opt/parrot`. | ||
diakopter | user 0m1.508s | ||
sys 0m0.176s | |||
there's an --build-optimized or something switch | |||
htns_ | Then got Rakudo from svn. | ||
`perl Configure.pl --parrot-config=/home/john/opt/parrot/bin/parrot_config` | 02:13 | ||
Built and installed fine. | |||
Didn't want to have Rakudo get Parrot. Wanted to do my own Parrot installed and all set, *then* get Rakudo. | |||
diakopter | sprixel: my $a=0; say $a if ($a < 20) while ++$a < 100 | ||
p6eval | sprixel 28539: OUTPUT«12345678910111213141516171819» | 02:14 | |
diakopter | sprixel: my $a=0; say $a if ($a < 20) while ++$a < 100; say $a | ||
p6eval | sprixel 28539: OUTPUT«12345678910111213141516171819100» | ||
htns_ | Did not use any `--build-optimized` options to anything. | ||
diakopter | htns_: ok... my 1s time is in linux in a vmware VM on windows vista | ||
htns_ | Sorry, forgot to mention, this is on Ubuntu 9.04. | 02:15 | |
(No idea what sprixel is, though maybe you're talking to me... :) ) | 02:16 | ||
diakopter | sry, I'm testing it | ||
it's this Perl 6 interpreter I'm writing in JavaScript | |||
pugs_svn | r28541 | colomon++ | [t/spec] Change generate-tests.pl to generate a test file for each forward trig function. Works at the moment, but is duplicating the atan2 tests in every file. | ||
htns_ | Ah. | ||
diakopter | it uses TimToady's standard grammar/parser | ||
htns_ | s/talking/not talking/ . Wow, having trouble with the english language tonight. :) | 02:18 | |
Can you please tell me: what's the `use v6;` for? | 02:19 | ||
It doesn't seem like I need it (the script behaves the same with or without it). | 02:20 | ||
diakopter | sprixel: my $a=7; ($a = $a*$a) while $a < 1e21; say $a; | 02:21 | |
p6eval | sprixel 28541: OUTPUT«33232930569601» | ||
02:21
TiMBuS joined
|
|||
diakopter | htns_: that's b/c "Perl 5 by default" is not yet implemented in Rakudo | 02:22 | |
02:22
msmatsko joined
|
|||
htns_ | Rakudo on Parrot will, by default, assume code in .pl files is Perl 5? | 02:22 | |
diakopter | if someone implements that, yes.. :) which I assume is the plan since that's part of the Perl 6 spec. maybe not by Rakudo Star though? | 02:23 | |
colomon | I don't recall hearing any mention of that at all this year. | 02:24 | |
02:24
rhr_ joined
|
|||
diakopter | mention of what | 02:24 | |
colomon | I had been figuring "use v6;" was so Perl 5 knew not to try to run the file. | ||
Perl 5 being on by default for Rakudo. | 02:25 | ||
htns_ | I'd assumed something like that as well. | ||
diakopter | yeah, but Perl5-mode-by-default is still part of the speculatifications | ||
htns_ | S01 says "Migration is important. The perl interpreter will assume that it is being fed Perl 5 code unless the code starts with a "class" or "module" keyword, or you specifically tell it you're running Perl 6 code in some other way, such as" | 02:26 | |
diakopter | yeah | ||
colomon | diakopter: not saying you're wrong about that, just that I haven't heard any recent mention of making things work like that. | ||
htns_ | s/perl interpreter/perl 6 interpreter/ ? | ||
diakopter | well, perl, since it's both 5 & 6 | 02:27 | |
so *presumably*, a fully to-spec implementation would be a drop-in replacement | |||
I'm not presuming that part of the spec won't get de-idealized :) | 02:28 | ||
htns_ | Oh, I see. I didn't realize that Rakudo + Parrot was intended to be able to be used as a drop-in replacement for my Perl 5. | ||
colomon | it's really kind of insane, isn't it? I mean, implementing Perl 6 is already hard enough. Asking every implementor to add the entirety of Perl 5 as well seems over the top. | 02:29 | |
diakopter | well, pmichaud (but it applies to every implementor too) was writing somewhere recently that [extremely paraphrased] rakudo (substitute: each implementation)'s spec coverage progress would continue, and if it reached the totality by eternity, then so be it | 02:30 | |
and he was also willing to draw a box around a particular set of features and give it names/labels/version numbers | 02:31 | ||
and even eventually call it "stable", if not "finished" or "fully to spec" | 02:32 | ||
colomon: well, by doing interop/bindings/linking/hosting with Perl 5, pugs was able to achieve *quite* *a* *lot* toward that goal | 02:33 | ||
but then again, messiahs advent only a few times per eon. er something | |||
htns_ | I'm still trying to fathom totality by eternity. :) | 02:34 | |
diakopter | oh, the unfathomable depths... | ||
02:35
rhr left
|
|||
Tene | Jonathan and a couple of others are working on integrating the Perl 5 interpreter as a language on Parrot. | 02:38 | |
The project is called Blizkost. | |||
htns_ | I remember reading about it when Rakudo was removed from Parrot proper. Have all the parrot languages been removed? | 02:39 | |
Tene | Yes. | ||
diakopter | colomon: but yeah, it's daunting. :) | 02:41 | |
htns_ | Ah. I see. All the languages listed on the parrot site now link to wherever they are now hosted. | ||
The Parrot certainly lost a lot of weight there. ;) | 02:42 | ||
Tene | Yes. | ||
colomon | moritz_: I haven't actually tested it yet, but I think the current changes ought to make the named argument trig tests which are currently skipped work... Errr... but I haven't pushed the changes yet, still running spec test to make sure they don't break anything. If I'm up in the middle of the night I'll push them. | 02:43 | |
moritz_: Hmmm... actually looks like named argument sin still doesn't work. Puzzling. | 02:57 | ||
diakopter | TimToady: I got an Use of uninitialized value in concatenation (.) or string at STD.pm line 11515. mebbe I should svn up; rebuild | 02:58 | |
colomon | rakudo: sub f($x, $y = 1) { say $x + $y; }; f(:x(3/2)); | 03:02 | |
p6eval | rakudo 6c4bab: OUTPUT«too many named arguments - 'x' not expectedin sub f (/tmp/N929ueuN2f:1)called from Main (/tmp/N929ueuN2f:0)» | ||
diakopter | TimToady: did you commit everything? make clean ; make # lots of warnings | ||
03:04
htns_ left
|
|||
dalek | kudo: f52e459 | (Solomon Foster)++ | src/setting/ (3 files): Make Complex sin and asin work correctly. |
03:09 | |
03:10
TiMBuS left,
nihiliad left,
silug left,
Helios- left,
kolibrie left,
rjh left,
avuserow left,
ezra left,
pugs_svn left,
christine left,
sjohnson left,
zerhash left,
pmichaud left,
omega left,
yves left,
PacoLinux left,
allbery_b left,
phenny left,
gbacon left,
lambdabot left,
rhr_ left,
Rint left,
araujo left,
orafu left,
mikehh left,
Intensity left,
colomon left,
fredrecsky left,
hudnix left,
blaze-x left,
garron left,
Infinoid left,
sri_ left,
broquaint left,
clkao left,
buu left,
ewilhelm_ left,
dmpk2k left,
integral left
03:12
pmichaud joined,
rhr_ joined,
TiMBuS joined,
orafu joined,
nihiliad joined,
mikehh joined,
Intensity joined,
colomon joined,
silug joined,
Rint joined,
Helios- joined,
kolibrie joined,
avuserow joined,
ezra joined,
pugs_svn joined,
phenny joined,
yves joined,
christine joined,
allbery_b joined,
sjohnson joined,
irc.freenode.net sets mode: +ovvo pmichaud pugs_svn phenny sjohnson,
zerhash joined,
PacoLinux joined,
omega joined,
gbacon joined,
lambdabot joined,
araujo joined,
rjh joined,
fredrecsky joined,
hudnix joined,
broquaint joined,
sri_ joined,
dmpk2k joined,
Infinoid joined,
buu joined,
garron joined,
blaze-x joined,
integral joined,
clkao joined,
ewilhelm_ joined,
kent\n left
03:26
Guest13417 left,
bigpresh_ joined
03:32
bigpresh_ left,
bigpresh_ joined
|
|||
TimToady | I only get one warning on failure to remove *.syml.store | 03:35 | |
and that's benign | |||
and there's no files I haven't checked in | 03:36 | ||
03:38
msmatsko left
|
|||
pugs_svn | r28542 | lwall++ | [generate-tests.pl] suppress STD error on \# in regex | 03:40 | |
diakopter | hum | 03:49 | |
I think my svn checkout was broken by switching between versions of svn client tools... also switching linux->windows via samba. hrm. :/ | 03:50 | ||
04:00
mberends joined
|
|||
mberends | \o impressive backlog :) | 04:00 | |
diakopter | hi | 04:01 | |
sprixel: my $a=0; say $a if ($a < 50) while ($a = ++$a*2) < 1000; say $a | 04:02 | ||
p6eval | sprixel 28542: OUTPUT«2614301022» | ||
mberends | funky! nice progress diakopter. today more harness building, and then expanding the test suite. | 04:03 | |
04:05
tak11 left
|
|||
mberends | first putting in a few more test scripts manually, then try adding something like rakudo/tools/autounfudge.pl | 04:08 | |
diakopter: why not spend a moment to toot your trumpet on blogspot? | 04:11 | ||
diakopter | mberends: eh.. well, there's not much to write home about... it's 10,000x slower than Perl 5 and 100,000x slower than JS/V8 for a minimal preincrement/while microbenchmark | 04:16 | |
once I got loop (;;) {} working, I just had to try some microbenchmarking. | |||
mberends | srsly!? did you remember to subtract the startup time? | 04:17 | |
diakopter | yeah; this was a pretty big N | ||
rakudo was around 2,000-3,000x slower than Perl 5, which .. isn't ultra encouraging, since (barring analysis/optimization) sprixel will only get slower... | 04:19 | ||
04:20
[particle] joined
|
|||
mberends | I added some simple relative benchmarking to Rakudo's test suite, planning to extend that incrementally as it settles in. I'll also think of that in sprixel's harness, which will be pretty portable anyway. | 04:22 | |
diakopter | cool | ||
pugs_svn | r28543 | lwall++ | [STD] improve errors regarding loops for diakopter++ | ||
04:23
[particle]1 left
|
|||
colomon | rakudo: sub f($x) { say $x + 1; }; f(:x(3/2)) | 04:23 | |
p6eval | rakudo f52e45: OUTPUT«too many named arguments - 'x' not expectedin sub f (/tmp/DuWWxsEjtR:1)called from Main (/tmp/DuWWxsEjtR:0)» | 04:24 | |
mberends | rakudo: sub f(:$x) { say $x + 1; }; f(:x(3/2)) # saw that once somewhere | 04:25 | |
p6eval | rakudo f52e45: OUTPUT«2.5» | ||
colomon | moritz_: Hmmm.... also, my Complex.asin implementation is plainly broken, but my tests don't seem to detect that. Clearly more / smarter tests are needed. | 04:27 | |
diakopter | sprixel: my $a=0; 1 while ++$a <= 10000; # 151 JS function calls for each iteration of the 2nd statement. | 04:33 | |
p6eval | sprixel 28542: ( no output ) | ||
diakopter | that's a few too many | 04:34 | |
mberends | on a weeny Intel Atom that took "real 0m17.026s user 0m16.765s sys 0m0.164s" | 04:37 | |
diakopter | ick. | 04:39 | |
mberends | shower && commute & | ||
04:46
kidd left
05:00
redicaps joined
05:05
mberends left
05:10
quietfanatic joined
05:21
[particle]1 joined
05:23
snearch joined
05:34
synth^2 left
05:39
[particle] left
05:40
snearch left
06:05
meppl joined
06:06
NorwayGeek joined
06:08
nihiliad left
06:09
NorwayGeek left
|
|||
moritz_ | \o/ | 06:32 | |
06:34
mberends joined
|
|||
diakopter | \/o\ | 06:34 | |
mberends | ..must..have..coffee.. | ||
diakopter | /o\ | ||
pugs_svn | r28544 | lwall++ | [Cursor.pmc] handle stringish enums a bit better | 06:36 | |
diakopter | eegslursh | ||
mberends: largish refactor committing | |||
mberends | whee! | 06:37 | |
pugs_svn | r28545 | diakopter++ | [sprixel] refactored CPS technique (no longer returns an array each call) | 06:39 | |
r28545 | made AutoIncrement a bit more "native" by having bigint modify in place when it's a *variable* that's being incremented/decremented.. | |||
r28545 | added in place increment/decrement methods to the bigint lib | |||
diakopter | 0.30 speedup, ish | ||
or so I imagine | |||
mberends | diakopter++: cool. And just when you decided to explain it to me, you also decided to Change Everything ;) | 06:41 | |
moritz_ | colomon: most tests so far just check that sin/cos/tan etc are consistent with each other... that's not enough | ||
colomon: we should just take some lists of values, run them through other program we're confident with, compare the results | 06:42 | ||
quietfanatic | Oops, I've challenged myself to make an automated C library importer for Rakudo. | 06:43 | |
moritz_ | quietfanatic++ | 06:44 | |
mberends | quietfanatic++: I had been (day)dreaming about such a tool. make it come true! | ||
quietfanatic | Except for parsing the header file, I more or less know how to do it. | ||
I mean, it'll take some grizly Q:PIR-ing, but yeah. | 06:45 | ||
moritz_ | in the parrot repo there's a tool called cgigen that parses the header-files | ||
quietfanatic | Oh really? | ||
moritz_ | it might be a bit out of date | 06:46 | |
but it basically contains a C parser in PGE | |||
mberends | quietfanatic: could it look like Q:C{ ... } eventually? | ||
quietfanatic | mberends: Then I'd have to include a c compiler, like Inline::C, and I don't want to do that. | 06:47 | |
mberends | oh, ok | 06:48 | |
quietfanatic | But it's possible, yeah. | ||
Especially if someone writes a C compiler in Perl 6. :) | |||
mberends | :) I'll lend you a copy of my GCC | 06:49 | |
quietfanatic | Let's start with precompiled libraries, shall we? | ||
06:49
nicomen left
06:50
rfordinal left
|
|||
quietfanatic | moritz_: Oh, you mean ncigen? | 06:54 | |
moritz_ | yes | 06:55 | |
07:03
patspam1 joined,
patspam1 left
07:09
cognominal left
|
|||
sjohnson | o/ | 07:15 | |
07:21
rfordinal joined
07:25
payload left
07:29
pmichaud left,
pmichaud joined
07:30
avuserow_ joined,
avuserow left
07:40
c9s_ is now known as c9s
|
|||
mikehh | rakudo (f52e459) builds on parrot r41610 - make test / make spectest_smolder (up to r28545 -> #28453) PASS - Ubuntu 9.04 amd64 | 07:45 | |
07:48
rfordinal left
07:52
NorwayGeek joined
07:53
NorwayGeek left,
NorwayGeek joined
08:03
TiMBuS left
08:05
mspauldi1g joined,
TiMBuS joined
08:16
mspaulding left
08:23
iblechbot joined
08:36
rgrau joined
08:46
dakkar joined
09:44
riffraff joined,
[particle]1 left
09:46
Ctrl-ZZZ left
10:12
riffraff left
10:16
Whiteknight left
10:21
payload joined
10:23
araujo left
10:44
masak joined
|
|||
masak | oh hai, fellow pioneers. | 10:44 | |
10:45
am0c joined
|
|||
Matt-W | o/ mighty bug-finder | 10:45 | |
colomon | moritz_: actually, the sin tests are against a list of known values for sine. the asin tests (this is from running S32=trig.generate-tests.pl and looking in sin.t) are just to see if it consistent with sin. | 10:46 | |
masak | nah, I just like to destroy things. :) | ||
colomon | (sorry, half awake one-handed typing not so good this moening.) | 10:48 | |
masak abstains from obvious jokes | 10:49 | ||
oh wait, this isn't Slashdot. never mind. | 10:52 | ||
10:54
NorwayGeek left
|
|||
colomon | Danke. | 10:54 | |
masak | speaking of faux pas, this page seems topical and sensical: geekfeminism.wikia.com/wiki/So_you_..._a_mistake | 10:57 | |
colomon | moritz_: figured out the asin mystery. I was still declaring a version of it in the test file, and wierdly enough, that version + my new version generated correct answers. | 10:59 | |
11:10
patspam1 joined
|
|||
masak | diakopter: so, how long before I can run Druid in sprixel? :> | 11:20 | |
mberends | masak: greetings! After carefully thinking about Date, Time and DateTime, I am sure it's not the effect of having recently written some code that way. They are the data types of the real world, and appear in many computer languages. My MS Basic from 1978 had date() and time() functions. Microsoft has just unbundled DateTime into Date and Time in Transact-SQL 2008. So that's my vote | 11:32 | |
masak | thank you for this soul-searching answer. I appreciate it. | ||
11:35
lichtkind joined
11:38
NorwayGeek joined
|
|||
masak | I'm currently pondering if some extra measure needs to be taken to get ranges of DateTime objects to work. | 11:38 | |
maybe they'll work out-of-the-box because DateTime does Real or something. | 11:39 | ||
11:39
lichtkind left
|
|||
masak | I won't add anything to the spec until I know. | 11:39 | |
11:39
lichtkind joined
11:48
am0c left
11:49
payload left
11:52
ssm left
12:09
takadonet joined
|
|||
takadonet | morning all | 12:09 | |
12:13
jogla joined
|
|||
colomon | morning! | 12:14 | |
jogla | Moin | 12:15 | |
moritz_ | \o/ | 12:16 | |
jogla | Hi moritz_ | 12:19 | |
moritz_ | long time no see jogla :-) | ||
jogla | Yeah | 12:20 | |
masak | jogla++ # returning customer | 12:27 | |
jogla | :) | 12:28 | |
pugs_svn | r28546 | colomon++ | [spec/t] Update trig test generation code -- remove all the faked Complex functions previously included with the test code, and add Complex.asin tests (for all inverted functions). | 12:32 | |
takadonet | Still working on those lovely math function Colomon? :) | 12:33 | |
12:38
nErVe joined
|
|||
pmichaud | good morning, #perl6 | 12:44 | |
takadonet | morning sir | ||
masak | morning, pmichaud. | 12:46 | |
pmichaud: those Cursors look very useful! | |||
pmichaud | yes, they do seem to be useful. | ||
I'm very happy I have a working implementation of protoregexes. | 12:47 | ||
Today's focus is on a p6 regex parser | |||
takadonet | !! | ||
masak | \o/ | ||
12:47
moritz_ sets mode: +o pmichaud
|
|||
pmichaud | (to follow the STD.pm definition of regexes) | 12:47 | |
masak | looking forward to that. | ||
pmichaud | same here | ||
I had lots of non-coding things I had to do yesterday, so not so much progress there. But I think nearly all of the core pieces are in place | 12:48 | ||
afk for a bit, kids to school | 12:50 | ||
Matt-W | \o/ | 12:54 | |
Matt-W likes to hear about progress | 12:55 | ||
12:55
iblechbot left,
redicaps left
|
|||
colomon | takadonet: Yup, slowly grinding away at the math. Though I expect that now I have working Complex versions of sin and asin, the end of the trig function work is in sight. All I need to do is clone the framework of those two for all the other trig functions. | 13:04 | |
13:04
rgrau left
|
|||
takadonet | colomon: Sweet | 13:05 | |
13:05
synth^2 joined
13:11
[particle] joined
13:13
huf left
13:14
patspam1 left
13:28
Camenix joined
13:29
SmokeMachine joined,
Camenix left
|
|||
dalek | kudo: c4dbb59 | (Solomon Foster)++ | src/setting/ (3 files): Fix the previous asin checkin so it actually works. |
13:32 | |
masak | what's the recommended way to run Rakudo on feather nowadays when Parrot and Rakudo should be installed? | 13:33 | |
I just tried 'perl6' but got the 'shared libraries' error one gets when things aren't installed all the way. | 13:34 | ||
moritz_ | masak: build & install one yourself | ||
masak | and the incantations for installing non-globally...? | ||
moritz_ | perl Configure.pl --gen-parrot | 13:35 | |
make install | |||
masak | hokay. | ||
13:40
KyleHa joined
13:43
_Jedai_ joined
13:45
|Jedai| left
|
|||
mberends | masak, what kind of ranges of datetime objects do you ponder? discrete or continuous? something like "18:30 every Tuesday between t1 and t2", or "any time between t1 and t2"? | 13:48 | |
masak | the latter. that is, infix:<..> | ||
the former should fall out automatically from dt/duration addition and infix:<...>. | |||
mberends ponders a TimeSpan object that could smartmatch a DateTime | 13:51 | ||
masak | .oO( DateTimeSpan ) |
13:55 | |
PerlJam wishes google calendar had a way to say "the thursday after the 3rd tuesday of every month" | |||
masak | mberends: what advantage would such an object confer over just $dt1..$dt2 ? | 13:56 | |
13:59
jaldhar left
14:00
huf joined
14:04
icwiener joined
|
|||
mberends | masak: not sure, it was a suggestion to possibly help your "ranges of DateTime objects". It's non essential. Just ignore it :) | 14:04 | |
masak | I think I'm heavily biased by generic solutions nowadays, to the point where I prefer existing A[B] solutions to a new AB solution almost all the time. :) | 14:05 | |
mberends | masak: $t1..$t2 it is then, worksforme :) | 14:09 | |
14:12
snearch joined
|
|||
mberends | sprixel: use Test; plan 2; is(1,1,"one");is(2,2,"two"); | 14:13 | |
p6eval | sprixel 28546: OUTPUT«1..2ok 1 - oneok 2 - two» | ||
14:13
Guest86057 left
14:14
Ctrl-ZZZ joined
14:15
justatheory joined
14:21
Chillance joined
|
|||
masak | sprixel: use Test; plan 2; is 1, 1, "one"; is 2, 2, "two"; | 14:22 | |
p6eval | sprixel 28546: OUTPUT«1..2ok 1 - oneok 2 - two» | ||
masak | \o/ | ||
moritz_ | sprixel: use Test; plan 2; is 1, "1", "one"; is "2", 2, "two"; | ||
p6eval | sprixel 28546: OUTPUT«1..2ok 1 - oneok 2 - two» | ||
moritz_ | sprixel: use Test; is 1.0, 1, 'a' | 14:23 | |
p6eval | sprixel 28546: OUTPUT«ok NaN - a» | ||
moritz_ | you could still start counting at 1, even without a plan | ||
sprixel: use Test; is '01', 1, 2; | |||
p6eval | sprixel 28546: OUTPUT«not ok NaN - 2» | 14:24 | |
mberends | moritz_, istr the Test.pm.js script uses the plan() call to initialize the test number to 1 | 14:25 | |
"feature" ;) | |||
masak | not for us done_testing fans. | 14:26 | |
moritz_ | those call plan *; at the start | 14:28 | |
masak | we do? | ||
I don't. | |||
pmichaud | if "plan *;" is required, then that means that * (as a term) needs to be in the 01-sanity suite | 14:29 | |
*probably needs | |||
moritz_ | pmichaud: plan *; is an option, not a requirement | ||
pmichaud | sure, but 01-sanity is intended to be "the minimal features needed to parse most of the tests" | ||
moritz_ | pmichaud: and for the 01-sanity suite I'd continue using planned tests | 14:30 | |
pmichaud | that's not what 01-sanity does | ||
moritz_ | uhm, it's not been that for ages :/ | ||
pmichaud | 01-sanity is the tests needed to say "okay, you have enough features to run Test.pm" | ||
01-sanity doesn't itself use Test.pm | |||
14:30
Psyche^ joined
|
|||
pmichaud | s/"parse most of the tests"/"run Test.pm" | 14:31 | |
moritz_ | well, that's what you thought in the initial stages of building rakudo - if my memory serves right then it didn't work that way in reality | ||
pmichaud | right, because nobody kept 01-sanity up to date with Test.pm :) | ||
moritz_ | and also there's not one Test.pm | ||
pmichaud | but when we re-implemented Test.pm, I at least made an effort to not use features in Test.pm that weren't tested in 01-sanity | ||
or to add things to 01-sanity that were needed for Test.pm | 14:32 | ||
mberends | thanks for this explanation pmichaud, it helps the work on sprixel testing while dis-commuting :) | 14:34 | |
14:34
ruoso joined
|
|||
masak | is dis-commuting a more chaotic process than de-commuting? :) | 14:38 | |
14:40
ejs joined
14:42
Patterner left,
Psyche^ is now known as Patterner
|
|||
mberends | masak: yes, it seems to take far longer ;) | 14:43 | |
masak | :) | 14:44 | |
14:48
SmokeMachine left
14:52
SmokeMachine joined
14:53
nihiliad joined
15:02
mberends left
|
|||
masak | eew, November symlinks in Test.pm from the Rakudo directory. it's better than almost all other approaches, but it's still pretty icky. | 15:03 | |
masak looks forward to the Central Solution | |||
moritz_ | make rakudo's 'make install' copy Test.pm to $prefix/lib/perl5/ | 15:04 | |
masak | perl5? :) | 15:05 | |
moritz_ | erm | 15:06 | |
s/5/6/ | |||
masak | as long as Rakudo finds it in its path _by default_, I'm happy. | ||
moritz_ | rakudo: say @*INC.perl | ||
masak | that'll be the nice part of the Central Solution: less fiddling with PERL6LIB. | ||
p6eval | rakudo c4dbb5: OUTPUT«["/home/p6eval/.perl6/lib", "/home/p6eval//p1/lib/parrot/1.6.0-devel/languages/perl6/lib", "lib", "."]» | ||
moritz_ | ok, it's $prefix/languages/perl6/lib | 15:07 | |
masak | wfm | ||
15:10
kidd_ joined
|
|||
masak | Tweets: ""Ruby 2.0 will be production stable in 10 years" — Matz" -- "Hmm, sounds like they'll beat Perl 6 by a hefty margin then." | 15:12 | |
I find it difficult sometimes to predict whether intervening would be a net win. | |||
colomon | I think if you just submitted a rakudobug every time you were tempted to respond to a tweet like that, it might have better results on the whole. :) | 15:13 | |
huf | i guess this is like the french not bathing. 10 milennia from now ignorant people will still claim the french dont bathe and perl is unreadable and perl6 will never be finished... | 15:14 | |
masak | (1) rakudobugs don't appear spontaneously. :) (2) I sincerely believe that responding to some tweets have good results. maybe not this one, though. | ||
15:14
jan__ joined
|
|||
pmichaud | sometimes it's best to simply embrace the insanity :) | 15:14 | |
colomon | masak: I bet if you gave yourself ten minutes to find a rakudobug, you could do it every time. | 15:15 | |
moritz_ | or ignore it ;-) | ||
colomon | It just seems to me that, if we do our jobs well, these guys will be forced to eat crow in about eight months. | 15:16 | |
masak | Twitter is a great place to actually spread the word about Perl 6. providing factual, sometimes tongue-in-cheek answer to a selection of taunts or false rumors can, I believe, have results. | ||
Matt-W | Mmm | 15:18 | |
It is a good strategy - if you can come up with a reply of the right kind of tone | |||
you don't want people to think you're flaming | |||
masak | exactly. | ||
colomon | I guess I'm thinking about a conversation I had a couple of weeks ago at a bachelor party. | ||
masak | you were discussing Perl 6 at a bachelor party? :) | ||
colomon | The groom mentioned that one of my Facebook statuses had been about working on Rakudo. | 15:19 | |
Matt-W | :) | ||
colomon | And one of the other guys, it turns out, used to be Perl programmer, but has fallen into (I think) PHP. | ||
Matt-W adds to the list of ideal items for the perfect fantasy wedding: camels and onions and butterflies | |||
colomon | And he reflexively made a crack about Perl 6 taking forever to come out. | 15:20 | |
Matt-W | I always find it amusing when PHP programmers mock Perl 6 | ||
And also quite saddening | |||
The poor people | |||
colomon | My response was about how well Rakudo is coming along. | ||
But if we're honest about it, right now it still isn't production-ready. | |||
Matt-W | of course not | 15:21 | |
colomon | It's getting really close, but it's not there yet. | ||
Matt-W | But we're going to be | ||
quite possibly in 2010 | |||
masak | just going to close those bugs first... | ||
colomon | That's what I'm saying. If Rakudo * does its job, Perl 6 will have a reasonably production ready platform. | ||
It might not be "done", but it will be very useable, I think. | |||
At that point, responding to the naysayers will be almost effortless, I think. | 15:22 | ||
and a lot more convincing. | |||
That's my theory, anyway. I'm not saying we shouldn't try to tell people what is going on now -- but we should be putting our money where our mouths are and making it actually happen. | 15:24 | ||
justatheory hugs colomon | |||
colomon | Of course, masak is a champ at the latter! | ||
masak | for better or worse, I care. | 15:25 | |
Matt-W | I care too | ||
masak | but I also do it because I want to see cool things happen, and the easiest way to do that seems to be to write code, write blog posts and file bugs. | ||
Matt-W | I just don't have many tuits | ||
hugme: hug colomon | |||
hugme hugs colomon and blushes | |||
15:26
nErVe left,
rfordinal joined
|
|||
masak | I have made a tuit-money trade-off. I'm poor but happy. :) | 15:26 | |
actually, it's not even that bad. | |||
Matt-W | Unfortunately my day job sucks up a lot of tuits | ||
masak | but I am working half-time because I want to spend large parts of the other half on Perl 6. | ||
Matt-W | and my other hobbies suck up even more - but if I didn't do hobbies that weren't programming, I'd go mad | 15:27 | |
moritz_ | aye, it's important to do something else | ||
3x table tennis next week ;-) | |||
Matt-W | programming for a living can be soul destroying | ||
yay table tennis | |||
masak goes swimming | 15:28 | ||
Matt-W | I do aikido | ||
masak | and every time I do, I look at the tiles at the bottom of the pool and think about Druid. :) | ||
Matt-W | And play the recorder, viola de gamba, lute and sing | ||
hahaha | |||
moritz_ | the problem with table tennis is that it requires a lot of concentration | 15:29 | |
Matt-W | yes but it's a different kind of concentration | ||
moritz_ | so it's not such a good way to switch off your brain and let your body work | ||
Matt-W | no | ||
swimming's better for that | |||
you can just swim up and down and up and down | |||
I used to go swimming and think about writing | |||
masak | I used to do swing dancing. I still run occasionally. I have a secret urge to do bicycle spinning. | 15:30 | |
Matt-W | these days I tend to do that while I'm walking, or I think about composing music - the trouble with the latter being that I tend to forget the tune I was thinking about by the time I get home and can write it down | ||
bicycle spinning? | |||
masak | Matt-W: I don't know if that's the term. | ||
Matt-W: we call it 'spinning' in Sweden. it's a form of exercise. | 15:31 | ||
Matt-W: for tunes, I have a music player around my neck at all times with a recording ability. | |||
Matt-W: but unfortunately, I never sit down and compose from those recordings... :/ | |||
hm, "Indoor cycling" seems to be the term. "Spinning" is a trademark. | 15:32 | ||
Matt-W | hmm | 15:36 | |
my phone now has a sound recorder on it | |||
but last time I really had a tune I really wanted to record, I was on a very windy hillside | 15:37 | ||
never did get that one back :( | |||
masak: heh, good tweet | |||
masak | directed to everyone and no-one. | ||
15:40
snearch left
|
|||
colomon | I've always figured that if I can't remember a tune by the time I get back home, it probably wasn't worth remembering. :) | 15:40 | |
Matt-W | I'm not so sure about that | 15:41 | |
masak | I've sometimes carried tunes all the way home by humming them over and over. | ||
Matt-W | I get distracted a lot | ||
colomon | (But then, once I get back home I try to record it pretty quickly, so maybe that's just an excuse not to get a digital recorder I can always have with me.) | ||
Matt-W | and I usually do a lot of revision over the base concept anyway | ||
what usually comes to me when I'm at an inconvenient moment to do anything about it is the first phrase | |||
so then I have to do any subsequent parts the hard ware | |||
way* | |||
but it gets me moving in the right direction | |||
Matt-W -> out of the office, anywhere but here | 15:43 | ||
colomon | Ah, the advantage with Irish Traditional Music is that tunes are so simple that not a lot of revision is called for. ;) | ||
Getting back on subject, I'm finding that working on Rakudo is a powerful reminder that I used to program for fun. | 15:45 | ||
masak | +1 | 15:48 | |
moritz_ | working on rakudo, and working within the Perl 6 community (IMHO) | 15:49 | |
(on and with ;-) | |||
colomon | that too! | 15:50 | |
masak | using Rakudo. beating on Rakudo. :) | ||
moritz_ goes offline for the weekend | 15:51 | ||
have the appropriate amount of fun! | |||
masak | likewise, sinjoro! | ||
I think I've picked out my favorite rakudobug so far: | |||
rakudo: sub foo( &foo = &foo ) {} | |||
p6eval | rakudo c4dbb5: ( no output ) | ||
masak | rakudo: sub foo( &foo = &foo ) {}; foo | ||
p6eval | rakudo c4dbb5: OUTPUT«Null PMC access in isa()in sub foo (/tmp/vj9uXI2yhZ:1)called from Main (/tmp/vj9uXI2yhZ:0)» | 15:52 | |
masak | really don't know how I arrived at that one. | ||
diakopter | masak: heh | ||
masak | rakudo: sub bar( &foo = &foo ) {}; bar | ||
p6eval | rakudo c4dbb5: OUTPUT«Null PMC access in isa()in sub bar (/tmp/3W6nYeH2c3:1)called from Main (/tmp/3W6nYeH2c3:0)» | ||
colomon | masak: Did it take you more than ten minutes to come up with that one? ;) | ||
diakopter | sprixel: sub foo( &foo = &foo ) {}; foo | ||
p6eval | sprixel 28546: ( no output ) | 15:53 | |
masak | colomon: no, but it's still not as simple as just sitting down and making rakudobugs happen. at least not most of the time. | ||
diakopter | sprixel: sub foo( &foo = &foo ) { say 4 }; foo | ||
p6eval | sprixel 28546: ( no output ) | ||
diakopter | heh | ||
masak | colomon: they appear as a by-product of actual coding, most of the time. | ||
colomon | masak: I know, I know. Though it sometimes feels like ten minutes of uninhibited Perl 6 programming will produce a Rakudobug for sure... | 15:54 | |
masak | not so sure about that. | ||
it was definitely true by the end of 2008. | 15:55 | ||
diakopter | rakudo: sub foo( &foo = 1 ) {}; foo | ||
masak | I wrote a blog post around New Year about that. | ||
p6eval | rakudo c4dbb5: OUTPUT«Parameter type check failed; expected Callable, but got Int for foo in call to fooin sub foo (/tmp/IRDOGX8h44:1)called from Main (/tmp/IRDOGX8h44:0)» | ||
15:55
mariuz left
|
|||
masak | but today, you'd have to be uninhibited in fairly specific ways for that to happen. | 15:55 | |
long bike ride & | 15:57 | ||
colomon | Errr... anyone out there know what is supposed to happen with a "fail"? | 15:58 | |
Complex.Num calls fall if the imaginary part of the number is not zero -- but it seems to effectively be returning 0 as well. | 15:59 | ||
I get the fail message if I call it from the REPL, but just get a normal value isn't correct error in the test file. | 16:00 | ||
Seems like that could have very bad effects in practice. | |||
(That is to say, I'd much rather get NaN.) | |||
16:04
cdarroch joined
|
|||
diakopter | rakudo: say NaN | 16:04 | |
p6eval | rakudo c4dbb5: OUTPUT«NaN» | ||
TimToady | rakudo: say NaN + 1 | ||
p6eval | rakudo c4dbb5: OUTPUT«NaN» | ||
colomon | rakudo: say tan(1i); | ||
p6eval | rakudo c4dbb5: OUTPUT«You can only coerce a Complex to Num if the imaginary part is zero0» | 16:05 | |
diakopter | move 'only' to between 'Num' and 'if' | ||
colomon | Hmmm... I think it reads better as it is. | 16:06 | |
colomon missed hearing the timer go off on the oven, but the bread hasn't burned yet. | 16:07 | ||
16:08
iblechbot joined
16:14
stephenlb joined
16:21
lanny joined
16:23
Lorn left,
araujo joined,
Lorn joined
|
|||
lanny | Shouldn't infix:<+,-,*> for (Int, Int) produce an Int? They are infinite precision to begin with. | 16:24 | |
colomon | lanny: in what context? | ||
(I mean, Rakudo doesn't support infinite precision at the moment, for instance...) | |||
lanny | aha. :) The conversion to Num had fooled me. | 16:25 | |
I thought Rakudo was already using GMP for Ints | |||
colomon | alas, no. | ||
lanny | Ok. Well that makes clear a whole class of fuzziness I've been hitting. | 16:26 | |
16:28
drbean_ joined,
lumi joined
16:31
dakkar left
16:32
rfordinal left
16:36
ispy_ joined
16:37
keeth joined
16:41
drbean left
16:48
nihiliad left
16:51
nihiliad joined
|
|||
dukeleto | 'ello | 16:52 | |
pugs_svn | r28547 | lwall++ | [Cursor] start to setup for moving modules to lib | 17:12 | |
17:16
ewilhelm_ is now known as ewilhelm
17:26
TiMBuS left
|
|||
pugs_svn | r28548 | diakopter++ | [sprixel] implement Conditional Protasis ?? Apodosis !! ElseExpr | 17:28 | |
diakopter | sprixel: say 0 ?? 5 !! 7 | ||
p6eval | sprixel 28547: OUTPUT«7» | ||
diakopter | sprixel: say (say 4)??(say 5)!!(say 6) | 17:29 | |
p6eval | sprixel 28547: OUTPUT«451» | ||
17:38
discHead joined
|
|||
diakopter | my CPS refactor wasn't complete... | 17:43 | |
pugs_svn | r28549 | diakopter++ | [sprixel] finish a bit more of the last CPS refactor.. | 17:45 | |
17:47
ejs left
|
|||
masak | diakopter: what's this V8.pm required by sprixel.pl? where do I buy it? | 17:47 | |
colomon | masak: www.v8juice.com | ||
masak | gracias. | 17:48 | |
sjohnson | heh | ||
masak | er. | ||
sjohnson | "Healthy programming starts with V8" | ||
colomon | sorry, couldn't resist. | ||
masak | :) | 17:49 | |
sjohnson | a healthy masak, is a happy masak | 17:50 | |
and productive | |||
masak | if I run 'make' in src/perl6, and then try to run sprixel on some example program, then it finds no V8 juice for me. | ||
17:55
coldboot joined
|
|||
masak | ah! github.com/fictorial/perl-v8 | 17:56 | |
17:58
quietfanatic left
17:59
crythias1 joined
18:02
masak left
18:03
Chillance_ joined
18:05
Chillance_ left
|
|||
pugs_svn | r28550 | diakopter++ | [sprixel] fix topic assignment in map block | 18:07 | |
18:08
Chillance left
18:13
alanhaggai joined
18:15
alanhaggai left
|
|||
diakopter | phenny: tell masak there's a file in perl6/sprixel/ that starts with RE and ends with ADME :) | 18:16 | |
phenny | diakopter: I'll pass that on when masak is around. | ||
18:24
ispy_ left
|
|||
pugs_svn | r28551 | lwall++ | [STD,viv] raise middle args of ternaries | 18:37 | |
18:39
pmurias joined
|
|||
pugs_svn | r28552 | diakopter++ | [sprixel] align Conditional to use new args from viv/STD. Begin an analysis phase to compute implied signatures for blocks with $^a and such. | 18:42 | |
diakopter | TimToady: in a block with $^a and $^b, is $_ an alias to $a? | 18:43 | |
rakudo: $_ = 4; map { $^a + $^b; say $_ }, 1, 2 | 18:45 | ||
p6eval | rakudo c4dbb5: OUTPUT«4» | ||
TimToady | diakopter: no | 18:48 | |
diakopter | k | ||
TimToady | not since 7 or 8 years ago anyway :) | ||
lanny | Would a Rat.new(Num $num, Num $eps?) be of any use? | 18:49 | |
diakopter | rakudo: $_ = 4; map { say $^a + $^b; say $_ }, 1, 2, 3, | ||
p6eval | rakudo c4dbb5: OUTPUT«No result objectin Main (src/gen_setting.pm:2813)» | ||
diakopter | rakudo: $_ = 4; map { say $^a + $^b; say $_ }, 1, 2, 3 | 18:50 | |
p6eval | rakudo c4dbb5: OUTPUT«34» | ||
colomon | lanny: taking two floating point numbers? Why? | 18:51 | |
Or is $eps some sort of precision thing? | |||
lanny | Well a rational approximation to a real number usually has an epsilon associated. | ||
Yes. | |||
colomon | ah. | ||
I certainly think it would be cool to have smart code to convert a Num to a Rat. | 18:52 | ||
diakopter | rakudo: map { say $^a + $^b + $^c }, 1, 2; say 8 # TimToady: if there aren't enough to fill the requested slots, it doesn't run? | ||
p6eval | rakudo c4dbb5: OUTPUT«8» | ||
lanny | Ok. I'll write some tests too. | 18:53 | |
colomon | Might fit in the system more logically as Num.Rat | ||
18:54
meppl left
|
|||
TimToady | diakopter: yes, because we have lots of ways to extend the end of the list | 18:55 | |
diakopter | rakudo: say map { say $^a; if 1 { $^a } else { $^b } }, 1, 2 # something's not right here | ||
p6eval | rakudo c4dbb5: OUTPUT«1211» | ||
lanny | colomon: It's all the same to me. Is there any guidance on making cast subs vs .new of a given argument type? | 18:56 | |
TimToady | placeholders are always scoped to inner {} | ||
diakopter | rakudo: say map { say $^a; if 0 { $^a } else { $^b } }, 1, 2 # something's not right here | ||
p6eval | rakudo c4dbb5: OUTPUT«1200» | ||
TimToady | that's if 0 -> $a { $a } else -> $b { $b } | ||
lanny | colomon: It will change where I put the tests and was thinking associating that behavior with Rat would make more sense than introducing Rat tests into Num | ||
diakopter | shouldn't $b be an undefined error | 18:57 | |
oh, nm | |||
colomon | lanny: Not that I know of. I'm just going on my instincts. It seems like generally we have avoiding forcing people to call explicit new on numeric types. | ||
TimToady | std: say map { say $^a; if 0 { $^a } else { $^b } }, 1, 2 # something's not right here | ||
p6eval | std 28552: OUTPUT«ok 00:02 104m» | ||
lanny | colomon: ah. Then I'm behind the spec on auto-conversion. I'll put it in Num | 18:58 | |
diakopter | a runtime error I meant. but I was non-understanding | ||
colomon | lanny: so for instance, if you look at Rat, there is no constructor that takes a single Int. | ||
lanny: But Int has a Rat function to create a Rat from it. | |||
lanny | colomon: ok. | 18:59 | |
colomon | lanny: As far as I know, the spec doesn't really cover this very thoroughly. I believe the intention is to write the spec based on how the code works. :) | ||
pmurias | ruoso: i'm trying out how the smop model of doing things would map out onto the js runtime, what are the benefits of passing the interpreter around instead of having it in a global? | 19:00 | |
TimToady | you can have more than one? | 19:01 | |
diakopter | std: { say $^a } # TimToady: infinite loop if you exclude this comment. | ||
p6eval | std 28552: ( no output ) | 19:02 | |
diakopter | there went half my battery :) | ||
pmurias | TimToady: you could what i'm unsure is why would you need more than one as the interpreter does very little | 19:03 | |
in smop that is | 19:04 | ||
lanny | rakudo: (1/0).WHAT.say | 19:13 | |
p6eval | rakudo c4dbb5: OUTPUT«Rat()» | ||
19:18
cdarroch left,
jogla left,
nihiliad left,
lanny left,
jan__ left,
rjh left,
kolibrie left,
Helios- left,
silug left,
omega left,
PacoLinux left,
zerhash left,
sjohnson left,
christine left,
pugs_svn left,
ezra left,
phenny left,
yves left,
gbacon left,
lambdabot left,
allbery_b left,
pmurias left,
araujo left,
_Jedai_ left,
rhr_ left,
Rint left,
discHead left,
Patterner left,
KyleHa left,
hudnix left,
colomon left,
mikehh left,
orafu left,
fredrecsky left,
Intensity left,
blaze-x left,
garron left,
Infinoid left,
sri_ left,
broquaint left,
clkao left,
buu left,
ewilhelm left,
dmpk2k left,
integral left,
sjohnson joined,
pmurias joined,
discHead joined,
nihiliad joined,
araujo joined,
lanny joined,
cdarroch joined,
jan__ joined,
Patterner joined,
_Jedai_ joined,
KyleHa joined,
jogla joined,
rhr_ joined,
orafu joined,
mikehh joined,
Intensity joined,
colomon joined,
silug joined,
Rint joined,
Helios- joined,
kolibrie joined,
ezra joined,
pugs_svn joined,
phenny joined,
yves joined,
christine joined,
allbery_b joined,
zerhash joined,
PacoLinux joined,
omega joined,
gbacon joined,
lambdabot joined,
rjh joined,
fredrecsky joined,
hudnix joined,
broquaint joined,
sri_ joined,
dmpk2k joined,
Infinoid joined,
buu joined,
garron joined,
blaze-x joined,
integral joined,
clkao joined,
ewilhelm joined,
irc.freenode.net sets mode: +ovv sjohnson pugs_svn phenny
|
|||
lanny | I think it's trying to reply 'Inf' | 19:19 | |
19:19
cookys left,
Ryan52 left
|
|||
lanny | or maybe 'divide by 0' | 19:19 | |
19:21
cookys joined
|
|||
colomon | I think it is divide by zero, actually; we don't trap for that if I recall correctly. | 19:22 | |
We can do "math" on the Rat 0/1, but it is unprintable. | 19:23 | ||
ruoso | pmurias, "interpreter" really means "thread" there | ||
19:23
keeth left
|
|||
ruoso | pmurias, we're going to have one "interpreter" object for each thread of execution (being it os thread or not) | 19:23 | |
lanny | 1/0 you mean? I hope we can do math on 0/1 | ||
19:24
keeth joined
|
|||
colomon | lanny: 1/0, yes. | 19:24 | |
lanny: the math on the 1/0 is reasonably sensible, I just balk a bit because it allows you to do terrible things. | 19:25 | ||
lanny | colomon: most programming languages live in the real world though where 1/0 is an error to avoid small problems become big ones down the line | 19:26 | |
colomon | lanny: but it's not a problem that goes away. 1/0 is tracked more or less the same way setting Inf or NaN would be. | 19:27 | |
pmurias | ruoso: thanks | 19:28 | |
colomon | though... hmmm... | ||
lanny | colomon: then numerator and denominator should probably be set to Inf | ||
colomon | rakudo: say 1 / (1 / 0); | ||
p6eval | rakudo c4dbb5: OUTPUT«0» | ||
colomon | rakudo: say Inf / Inf | 19:29 | |
p6eval | rakudo c4dbb5: OUTPUT«NaN» | ||
lanny | ah. well then Inf / 1 | ||
colomon | rakudo: say 1 (Inf / 1); | ||
p6eval | rakudo c4dbb5: OUTPUT«Confused at line 2, near "(Inf / 1);"in Main (src/gen_setting.pm:3468)» | 19:30 | |
colomon | rakudo: say 1 / (Inf / 1); | ||
p6eval | rakudo c4dbb5: OUTPUT«0» | ||
lanny | colomon: or even just fail 'zero denominator' | ||
ick | 19:31 | ||
Ok. How do you get the number that a Class Num is from inside a method? self and +self aren't doing what I expect. | 19:32 | ||
19:33
DeathAnchor joined
|
|||
lanny | Which could just be me but the code worked when in Rat | 19:33 | |
DeathAnchor | Question, what do you use for SVN client on a Win32 system? | ||
lanny | Ah. Q:PIR | 19:35 | |
19:35
keeth left
19:36
keeth joined,
crythias1 left
|
|||
colomon | lanny: self should work just fine. | 19:36 | |
lanny | DeathAnchor: I've heard TortoiseSVN mentioned before. | ||
colomon: is probably me then. | |||
DeathAnchor | gah, I hate tortoise. The gui is junk. I guess i could just use the commandline for it. | 19:37 | |
19:37
takadonet left
|
|||
colomon | lanny: you definitely shouldn't have to go into Q:PIR unless your code is actually in PIR. | 19:37 | |
DeathAnchor was hoping for something better, but alas is disappointed. | |||
lanny | colomon: I'm tempted. One sec while I nopaste it and maybe you can see where I've gone wrong. | 19:38 | |
lisppaste3 | lanny pasted "$num.Rat()" at paste.lisp.org/display/88078 | 19:40 | |
19:42
KyleHa left
|
|||
colomon | rakduo: class Num is also { multi method Rat(Num $epsilon = 1.0e-6) { say self; }; }; 1.0.Rat; | 19:42 | |
lanny | typo on 'rakudo' | 19:43 | |
colomon | I wonder about self versus +self, but it sounds like you tried both? | ||
lanny | I did. | ||
colomon | rakudo: class Num is also { multi method Rat(Num $epsilon = 1.0e-6) { say self; }; }; 1.0.Rat; | ||
p6eval | rakudo c4dbb5: OUTPUT«1» | ||
lanny | Tried 'self' first and then noticed method Str { ~self } so figured to try + | ||
colomon | lanny: unfortunately I've got spectest running, so I can't just pry open Num.pm and insert your code. | 19:44 | |
lanny | How very odd. What I'm seeing after compiling is (exp(1)).Rat.perl.say gives no output | ||
colomon: no worries. | 19:45 | ||
colomon | but I don't see any obvious problems with the $num = +self line. | ||
insert some say statements in there and see where the code gets to? | |||
diakopter | pmurias: V8's runtime can thread across cores, but you can't access it from JS with the default build. In the browser, Chrome can thread across cores, but all interthread communication has to be explicit across DOM frames (tabs) :) | 19:46 | |
(fyi) | |||
lanny | rakudo: class Num is also { multi method Rat(Num $eps = 4) { my $num = +self; say $num }; }; 3.14.Rat; | ||
p6eval | rakudo c4dbb5: OUTPUT«3.14» | ||
lanny | colomon: aye | ||
sjohnson | afternoon friends and perl 6 enthusiasts | 19:47 | |
lanny | rakudo: say 1 / Inf | 19:48 | |
p6eval | rakudo c4dbb5: OUTPUT«0» | ||
lanny | rakudo: say Inf / 1 | 19:49 | |
p6eval | rakudo c4dbb5: OUTPUT«Inf» | 19:50 | |
lanny | rakudo: 1 / ( 0 / 1 ) | 19:51 | |
p6eval | rakudo c4dbb5: ( no output ) | ||
lanny | rakudo: say 1 / ( 0 / 1 ) | ||
p6eval | rakudo c4dbb5: ( no output ) | ||
colomon | rakudo: say (1 / ( 0 / 1 )).perl | 19:52 | |
p6eval | rakudo c4dbb5: OUTPUT«1/0» | ||
lanny | Ok. it's because infix:</>( a, b/c ) is implemented as ( a * c / b ) | ||
19:52
Ryan52 joined
|
|||
lanny | Rather than a becoming a / 1 and doing the cross multiplication | 19:52 | |
colomon | BTW, spectest finished, and I'm compiling your code as we speak. | 19:53 | |
lanny | colomon: duh. Rat.new(Int, Int) doesn't take named args. | 19:54 | |
dalek | kudo: a7d2a98 | (Solomon Foster)++ | src/setting/ (3 files): Full support for Complex cos and acos. |
19:55 | |
kudo: 1354976 | (Solomon Foster)++ | src/setting/ (3 files): Full support for Complex tan and atan. |
|||
kudo: be44f6a | (Solomon Foster)++ | src/setting/ (5 files): Full support for Complex sec and asec. |
|||
colomon | lanny: as far as I know, named args don't work at all at the moment. at least, I've had several fails with them in the last 24 hours. | ||
I should have noticed, but it seemed like the Rat.new was the safe part of your code. :) | 19:57 | ||
lanny | Yeah. :) | ||
pugs_svn | r28553 | fglock++ | [mp6] Javascript fixes, grammar fix | 20:00 | |
20:00
meppl joined
20:01
Ryan52 left
|
|||
colomon | oooo... when I do pi.Rat.perl, I get 355/113. Shiny! lanny++ | 20:02 | |
lanny | Yeah. Debating if I want to go the distance for the first best-rat-approx within $epsilon but it's more code so thinking this is good enough | 20:03 | |
colomon | seems like a heck of a good start, at any rate. | 20:04 | |
lanny | Well it's using the continued fraction expansion. At some point on my plate is to write a CE class. Got most of the way in haskell and then life got busy. | 20:05 | |
colomon | A pity I didn't have this when I was working on the Rat trig tests, it would have come in handy to get a highly accurate rational approx of pi. | ||
lanny | The CE expansion is guaranteed to be a best-rat-approx. Just not necessarily the first closest. | ||
20:10
kidd_ is now known as rgrau,
quietfanatic joined
20:14
zloyrusskiy joined
20:18
mberends joined
20:29
tylerni7 joined,
Chillance joined
20:31
quietfanatic left,
zloyrusskiy left
20:33
payload joined
20:36
Ryan52 joined
20:38
jogla left
20:42
Ryan52 left
|
|||
pugs_svn | r28554 | mberends++ | [sprixel/Test.pm.js] always initialize test counter to 1 for planless testing, moritz++ for noticing | 20:43 | |
20:44
ruoso left
|
|||
mberends | sprixel: use Test; is 1,"1","one"; | 20:45 | |
p6eval | sprixel 28553: OUTPUT«ok NaN - one» | ||
diakopter | sec | ||
k now try | 20:46 | ||
mberends | sprixel: use Test; is 1,"1","one"; | ||
p6eval | sprixel 28553: OUTPUT«ok 1 - one» | ||
mberends | done_testing should also be easy, will try it now | 20:47 | |
pugs_svn | r28555 | mberends++ | [sprixel/Test.pm.js] done_testing function for planless testing | 20:59 | |
20:59
Ryan52 joined
21:01
Whiteknight joined,
fredrecsky left
21:09
DeathAnchor left
21:17
mikehh left
21:19
tak11 joined
|
|||
mberends | perl6: say 2 == 2 ?? "equal" !! "unequal" | 21:20 | |
p6eval | pugs, rakudo be44f6, sprixel 28555: OUTPUT«equal» | ||
..elf 28555: OUTPUT«Unknown rule: infix:conditionalIt needs to be added to ast_handlers. at ./elf_h line 2850» | |||
mberends | perl6: say "2" eq "2" ?? "equal" !! "unequal" | 21:21 | |
p6eval | pugs, rakudo be44f6, sprixel 28555: OUTPUT«equal» | ||
..elf 28555: OUTPUT«Unknown rule: infix:conditionalIt needs to be added to ast_handlers. at ./elf_h line 2850» | |||
mberends | perl6: say "2" == "2" ?? "equal" !! "unequal" # from t/01-sanity/03-equal.t | 21:22 | |
p6eval | pugs, rakudo be44f6: OUTPUT«equal» | ||
..elf 28555: OUTPUT«Unknown rule: infix:conditionalIt needs to be added to ast_handlers. at ./elf_h line 2850» | |||
..sprixel 28555: OUTPUT«execute(): execute error: comparison_op infix__S_EqualEqual not yet implemented; srsly!!?!?? at sprixel.pl line 89.» | |||
mberends | can probably fix sprixel there :) | 21:23 | |
21:25
tak11 left,
mikehh joined,
arnsholt_ joined,
leedo_ joined,
mberends left,
cdarroch left,
payload left,
Chillance left,
rjh left,
kolibrie left,
Helios- left,
lanny left,
nihiliad left,
jan__ left
21:26
silug left,
PacoLinux left,
zerhash left,
sjohnson left,
christine left,
pugs_svn left,
ezra left,
phenny left,
yves left,
gbacon left,
lambdabot left,
allbery_b left,
omega left,
rhr_ left,
_Jedai_ left,
pmurias left,
Rint left,
araujo left,
discHead left,
mikehh left,
tylerni7 left,
hudnix left,
colomon left,
Patterner left,
orafu left,
Intensity left,
blaze-x left,
garron left,
Infinoid left,
sri_ left,
broquaint left,
clkao left,
buu left,
ewilhelm left,
dmpk2k left,
integral left,
cxreg left,
jjore left,
arnsholt left,
cj left,
sparc left,
sbp left,
leedo left,
mtve left,
diakopter left,
nothingmuch left,
jql left,
mtve joined,
sjohnson joined,
cxreg2 joined,
nothingmuch_ joined,
diakopte1 joined,
mikehh joined,
payload joined,
Chillance joined,
tylerni7 joined,
mberends joined,
pmurias joined,
discHead joined,
nihiliad joined,
araujo joined,
lanny joined,
cdarroch joined,
jan__ joined,
Patterner joined,
_Jedai_ joined,
rhr_ joined,
orafu joined,
Intensity joined,
colomon joined,
silug joined,
Rint joined,
Helios- joined,
kolibrie joined,
ezra joined,
pugs_svn joined,
phenny joined,
yves joined,
christine joined,
allbery_b joined,
zerhash joined,
PacoLinux joined,
omega joined,
gbacon joined,
lambdabot joined,
rjh joined,
hudnix joined,
broquaint joined,
sri_ joined,
dmpk2k joined,
Infinoid joined,
buu joined,
garron joined,
blaze-x joined,
integral joined,
clkao joined,
irc.freenode.net sets mode: +ovv sjohnson pugs_svn phenny,
ewilhelm joined,
nothingmuch_ is now known as nothingmuch,
jjore_ joined
21:27
sbp joined
21:30
cj joined
21:31
arnsholt_ is now known as arnsholt
21:32
cj left,
cj joined
|
|||
pugs_svn | r28556 | mberends++ | [sprixel] do "2" == "2", 'make -f sprixel.mk test' passes t/01-sanity/03-equal.t | 21:45 | |
21:47
wknight8111 joined
|
|||
pugs_svn | r28557 | lwall++ | [STD] more lib movement | 21:51 | |
r28557 | [STD] don't add @_ or %_ until seen | |||
r28557 | [STD] fix id collision between file scope and {} at pos 0 (diakopter++) | |||
diakopte1 | mberends: cool.. :D | 21:53 | |
moritz_: you around? | 21:55 | ||
21:55
diakopte1 is now known as diakopter
21:56
lichtkind left
21:58
Whiteknight left
22:02
iblechbot left
22:14
kst left,
pmurias left
|
|||
mberends | diakopter++: sprixel passes 7/16 tests in t/spec/S03-operators/ternary.t | 22:17 | |
diakopter | oh cool | 22:18 | |
diakopter tries it | |||
coldboot | Wow, that's pretty cool. I can see Larry Wall working away at Perl6 right now. | 22:19 | |
diakopter | eh | ||
mberends | gotta get this fudging harness more complete... | ||
diakopter | coldboot: he's standing in a crowd... :) | ||
oh, perhaps you mean on the irc channel | 22:20 | ||
coldboot | Yeah I can see the pugs_svn bot. | ||
What do you mean he's standing in a crowd? | |||
diakopter | I thought you meant you're one of the people here at this conf who can see him standing in a crowd at the front of the auditorium.. | 22:21 | |
22:21
keeth_ joined
|
|||
coldboot | There's a conference going on right now? | 22:22 | |
diakopter | 4 Infinite Loop | ||
Cupertino | |||
mberends | perhaps coldboot is referring to commit r28557 | ||
diakopter | coldboot: LLVM 2009 at Apple | ||
22:23
kst joined
|
|||
TimToady | obviously Larry Wall could not be standing around at a conference *and* checking in code at the same time | 22:23 | |
mberends | TimToady, have you seen Larry Wall today? | ||
TimToady | um, hmm, now that you mention it, I'm at the same conference, so yes | 22:24 | |
mberends | maybe you saw someone else who saw him | ||
diakopter | I met a guy named Matt who saw him | ||
sjohnson | this is one of TimToady's cute children who learned how to type | 22:25 | |
and help us with basic perl questions | |||
mberends | are TimToady's children bots? or butterflies? | ||
sjohnson | they're cute kids who crawl around on the floor and speak a bit of babytalk and english | 22:26 | |
diakopter | phenny: tell quietfanatic welcome back from your chrysalis | ||
phenny | diakopter: I'll pass that on when quietfanatic is around. | ||
diakopter | mberends: ok | 22:27 | |
name a node in STD (or a symbol combo - with __S_ in the name) and I'll try to implement it next. | 22:28 | ||
mberends | from ternary.t: circumfix__S_Bra_Ket | ||
diakopter | oh, the -t doesn't work with TimToady's last commit | 22:29 | |
it can't find Test.pm | |||
coldboot | Is Duke Nukem Forever being written in Perl 6? | ||
mberends | sprixel testing works here without -t now | 22:30 | |
diakopter | Duke Nukem Forever's hero's task is to implement Perl 6 | ||
the enemies are the spectests. | 22:31 | ||
Duke Nukem Forever will be finished when all the enemies are encoded into the game as adversaries | |||
then someone will actually have to try and beat the game. | 22:32 | ||
but fortunately you can play the game before the game is finisehd | |||
coldboot | haha | ||
TimToady | are you using PERL6LIB envvar? | ||
diakopter | oo | ||
TimToady | you might need to add ./lib | ||
diakopter | oh I know | 22:33 | |
sprixel.pl is trying to read Test.pm locally and hack together the syml | |||
s/hack/fake/ | |||
22:34
icwiener left
|
|||
diakopter | coldboot: but obviously you can't beat the game until the game is finished also. | 22:34 | |
"on which Perl 6 does your company standardize?" "spectest_pugscode_svn_r4427293755732" | 22:36 | ||
mberends | :) | 22:37 | |
22:38
keeth left,
keeth_ is now known as keeth
|
|||
coldboot | Why are there multiple implementations of Perl6, by the way? | 22:38 | |
22:38
quietfanatic joined
|
|||
mberends | Darwinian competition | 22:39 | |
quietfanatic | Hi phenny. | ||
phenny | Hi quietfanatic | ||
quietfanatic: 22:26Z <diakopter> tell quietfanatic welcome back from your chrysalis | |||
mberends | coldboot: we can't agree on the best way to implement Perl 6, so we let the computers fight it out | 22:40 | |
diakopter | mberends: more like, we can't agree on the slowest way to implement.... | ||
quietfanatic | diakopter: That bus is beginning to feel like that yeah. | ||
mberends | Perl 6 on INTERCAL would win hands down | 22:41 | |
diakopter | that bus's bus number needs to stay above 0 | ||
22:47
tak11 joined
22:50
payload left
|
|||
diakopter | mberends: do you want to make test 4 in ternary.t work by implementing operator div? | 22:51 | |
(while I look at test 9) | |||
mberends | ok, lemme take a hack at that | 22:52 | |
22:54
hercynium joined
|
|||
pugs_svn | r28558 | diakopter++ | [sprixel] non-implement circumfix__S_Bra_Ket and make sprixel.pl work with r-1 | 22:55 | |
22:55
meppl left
|
|||
diakopter | sprixel: say [1,2,3]; | 22:57 | |
p6eval | sprixel 28557: OUTPUT«» | ||
diakopter | heh | ||
there's your non-Array | |||
mberends | useful for magicians who need to make things disappear | 22:58 | |
23:00
quietfanatic left
|
|||
mberends | S03-operators/equality.t blows up on Symbolic_unary prefix__S_Bang NYI, looks like low hanging fruit. let's try just a little bite... | 23:03 | |
23:07
nihiliad left
23:11
ruoso joined
23:12
payload joined
|
|||
pugs_svn | r28559 | mberends++ | [sprixel/interp.js] add Symbolic_unary prefix__S_Bang (the logical ! operator) and pass 4/15 in S03-operators/equality.t | 23:18 | |
mberends | diakopter: svn up your interp.js :) | 23:20 | |
23:24
lanny left
23:26
crythias joined
|
|||
mberends | with better fudging, sprixel passes 8/15 of S03-operators/equality.t | 23:31 | |
pugs_svn | r28560 | mberends++ | [sprixel] perform the integer div operator in interp.js and builtins.js | 23:50 | |
23:52
quietfanatic joined
|
|||
mberends | S03-operators/ternary.t passes 12/16 | 23:53 | |
23:54
keeth left
|