Time |
Nick |
Message |
00:00 |
|
masak left #perl6 |
00:01 |
|
s1n joined #perl6 |
00:03 |
|
stkowski left #perl6 |
00:04 |
|
ymasory left #perl6 |
00:06 |
|
VXZ left #perl6 |
00:08 |
|
rgrau left #perl6 |
00:15 |
|
plobsing joined #perl6 |
00:30 |
|
coldhead left #perl6 |
00:35 |
|
coldhead joined #perl6 |
00:37 |
|
impious joined #perl6 |
00:39 |
|
whiteknight joined #perl6 |
00:44 |
|
shi left #perl6 |
00:54 |
|
wiseguyxp joined #perl6 |
01:03 |
|
felliott left #perl6 |
02:03 |
|
wiseguyxp left #perl6 |
02:03 |
|
noganex left #perl6 |
02:05 |
|
noganex joined #perl6 |
02:12 |
|
impious left #perl6 |
02:18 |
|
am0c joined #perl6 |
02:21 |
|
eternaleye left #perl6 |
02:21 |
|
eternaleye joined #perl6 |
02:30 |
|
leprevost left #perl6 |
02:41 |
|
wiseguyxp joined #perl6 |
02:46 |
|
wiseguyxp left #perl6 |
02:49 |
sorear |
good * #perl6 |
02:50 |
TimToady |
chow |
02:53 |
coldhead |
LAKSA! |
02:56 |
sorear |
TimToady: Why isn't <|s> spelled <?boundS> ? |
02:57 |
sorear |
phenny: tell masak I support ".coordinates". C is a vector space over R. |
02:57 |
phenny |
sorear: I'll pass that on when masak is around. |
03:00 |
TimToady |
sorear: too long |
03:02 |
|
whiteknight left #perl6 |
03:04 |
|
felliott joined #perl6 |
03:17 |
|
felliott left #perl6 |
03:19 |
|
ryan_ left #perl6 |
03:28 |
colomon |
sorear: what is the context on .coordinates? (Agree completely about C over R, of course.) |
03:35 |
TimToady |
http://irclog.perlgeek.de/perl6/2011-02-09#i_3269388 |
03:35 |
sorear |
colomon: Complex.reals name replacement bikeshedding |
03:35 |
colomon |
ah. |
03:36 |
colomon |
the discussion seems to completely miss the fact that Complex.reals is the Complex implementation of Numeric.reals. |
03:37 |
TimToady |
and down at http://irclog.perlgeek.de/perl6/2011-02-09#i_3272929 |
03:37 |
colomon |
which is not to say that it can't use a better name, but .reim or .coordinates is completely missing the point. |
03:38 |
TimToady |
why is Numeric.reals called .reals? |
03:38 |
colomon |
moritz_++ understands. |
03:39 |
colomon |
because it expresses the Numeric object as a series of Reals. |
03:39 |
colomon |
a better name would be great. |
03:40 |
colomon |
.values seems like it's on the right track. |
03:42 |
|
dukeleto left #perl6 |
03:42 |
|
dukeleto joined #perl6 |
03:50 |
TimToady |
sorear: I tried rebooting viv, but it didn't quite work for me. maybe you'd have better luck... |
03:51 |
colomon |
hmmm.... though I suppose .coordinates is a sort of valid interpretation, depending on dimension. :) |
03:52 |
TimToady |
it's pretty good huffman coding too :) |
03:54 |
sorear |
TimToady: I'll take a look later; how did it fail? |
03:56 |
TimToady |
https://gist.github.com/819913 |
03:56 |
sorear |
TimToady: you seemed supportive of $<foo> = {EXPR} earlier. Would it be reasonable for me to add it to S05 and viv and remove compatibly removable uses of the $<> assignment cheat? |
03:56 |
|
cdarroch left #perl6 |
03:56 |
TimToady |
yes, go fer it |
03:57 |
|
satyavvd joined #perl6 |
03:58 |
sorear |
TimToady: what was your position on the proper place of EXPR again? |
03:59 |
colomon |
afk # bed, but hey, I'd go for .coordinates |
03:59 |
TimToady |
sorear: I've lost the context of the question |
04:00 |
sorear |
TimToady: does method EXPR { ... } belong in the setting? |
04:01 |
TimToady |
well, a lot of what is in STD really belongs in the setting eventually, like most of the operator defs |
04:01 |
TimToady |
but I'm not sure about EXPR; it seems more central to how STD grammars work |
04:06 |
sorear |
Now that niecza supports loop labels I can probably bring its EXPR a lot closer to the official version |
04:06 |
sorear |
(it's implemented as a state machine now, in a "if and while are universal" sort of way) |
04:12 |
|
nrr left #perl6 |
04:13 |
|
nrr joined #perl6 |
04:23 |
|
Su-Shee_ joined #perl6 |
04:27 |
|
Su-Shee left #perl6 |
04:40 |
|
mtk left #perl6 |
04:52 |
|
mtk joined #perl6 |
04:59 |
|
wiseguyxp joined #perl6 |
05:19 |
|
envi joined #perl6 |
05:20 |
|
meteorjay joined #perl6 |
06:09 |
|
lopaway left #perl6 |
06:13 |
|
lopaway joined #perl6 |
06:14 |
|
agentzh joined #perl6 |
06:17 |
|
eternaleye left #perl6 |
06:17 |
|
eternaleye joined #perl6 |
06:31 |
|
kjeldahl left #perl6 |
06:36 |
|
brill left #perl6 |
06:39 |
|
justatheory left #perl6 |
06:40 |
|
Mowah joined #perl6 |
06:44 |
|
kaare_ joined #perl6 |
06:48 |
|
brill joined #perl6 |
06:49 |
|
eternaleye left #perl6 |
06:49 |
|
eternaleye joined #perl6 |
07:06 |
|
dukeleto left #perl6 |
07:07 |
|
dukeleto joined #perl6 |
07:14 |
|
wtw joined #perl6 |
07:20 |
* sorear |
out |
07:23 |
|
wiseguyxp left #perl6 |
07:24 |
|
kfo joined #perl6 |
07:28 |
|
kfo_ left #perl6 |
07:49 |
|
bacek joined #perl6 |
07:49 |
|
vutekija joined #perl6 |
07:53 |
|
Su-Shee_ is now known as Su-Shee |
07:53 |
|
bacek left #perl6 |
07:54 |
|
vutekija left #perl6 |
07:54 |
|
kjeldahlw joined #perl6 |
07:54 |
|
cosimo left #perl6 |
07:55 |
dukeleto |
o/ |
08:00 |
|
rupert joined #perl6 |
08:09 |
moritz_ |
\o |
08:09 |
|
bacek joined #perl6 |
08:14 |
|
shi joined #perl6 |
08:18 |
|
nadim_ left #perl6 |
08:19 |
|
nadim joined #perl6 |
08:22 |
|
bacek left #perl6 |
08:30 |
|
rupert left #perl6 |
08:34 |
|
bacek joined #perl6 |
08:36 |
|
eternaleye left #perl6 |
08:43 |
|
eternaleye joined #perl6 |
08:44 |
|
eternaleye left #perl6 |
08:44 |
|
eternaleye joined #perl6 |
08:49 |
apejens |
moritz_: is the code for the irc log bot available? |
08:50 |
sjohnson |
oh shit yeah |
08:50 |
sjohnson |
https://github.com/moritz/hugme/blob/master/hugme.pl |
08:51 |
sjohnson |
oh.. log bot. oops |
08:52 |
apejens |
it seems ilbot might be it :) |
08:52 |
apejens |
thanks |
08:53 |
sjohnson |
:3 |
08:55 |
moritz_ |
apejens: it is |
08:56 |
sjohnson |
thats the first thing i've done right for #perl6 |
08:57 |
|
kjeldahlw left #perl6 |
09:02 |
|
sji joined #perl6 |
09:04 |
|
shi left #perl6 |
09:05 |
|
shi joined #perl6 |
09:07 |
|
sji left #perl6 |
09:14 |
|
woosley joined #perl6 |
09:19 |
|
am0c left #perl6 |
09:31 |
|
dakkar joined #perl6 |
09:33 |
|
am0c joined #perl6 |
09:34 |
|
daxim joined #perl6 |
10:07 |
|
am0c left #perl6 |
10:33 |
|
mtk left #perl6 |
10:49 |
flussence |
*sigh*... $dayjob took me off that horrible CGI.pm project. And then put me on updating some PHP site. I wonder if this is all some huge buildup to an april fools' joke where they have me writing intercal... |
10:50 |
moritz_ |
with COMEFROM? :-) |
10:50 |
moritz_ |
anyway, my condolences |
10:50 |
flussence |
COMEFROM fryingpan |
10:51 |
* moritz_ |
sits over a set of coupled differential equations |
11:04 |
|
masak joined #perl6 |
11:04 |
masak |
lol hai zebras |
11:04 |
phenny |
masak: 02:57Z <sorear> tell masak I support ".coordinates". C is a vector space over R. |
11:04 |
masak |
I can live with that. very Descartes. |
11:05 |
masak |
as long as we don'e spell it .coördinates :P |
11:06 |
|
woosley left #perl6 |
11:10 |
|
fIorz is now known as florz |
11:14 |
masak |
one one hand, .values is more neutral because it doesn't force the vector space perspective on the user. on the other hand, regardless of the name, we *are* requesting the (rectangular) coordinates of the complex number. |
11:15 |
moritz_ |
.values is SOOO BAD |
11:15 |
moritz_ |
it makes a single-item list behave differently from the item |
11:17 |
masak |
well, we have that in other corners of the model as well. |
11:17 |
masak |
.say works totally different for an IO than for anything else. |
11:18 |
flussence |
.oO( it'd be nice if there was a shorthand for calling multiple methods on a single item, like there is for calling a scalar method on a list ) |
11:18 |
masak |
but I'm not dead set on adopting .values as the name. just not .reals, please. |
11:19 |
flussence |
(1+2i).«<re im> |
11:20 |
moritz_ |
just not .values please :-) |
11:20 |
moritz_ |
masak: note that .say breaks a different assumption than .values |
11:20 |
moritz_ |
and so far we have been very careful not to break the assumption behind single-item lists |
11:22 |
masak |
granted. |
11:22 |
masak |
yes, I see the risk with using .values |
11:23 |
masak |
.coords, p'haps. |
11:23 |
moritz_ |
wfm |
11:23 |
|
jedai left #perl6 |
11:25 |
|
jedai joined #perl6 |
11:41 |
|
satyavvd left #perl6 |
11:45 |
|
redicaps joined #perl6 |
11:46 |
|
maja joined #perl6 |
11:46 |
|
maja left #perl6 |
11:47 |
|
maja joined #perl6 |
12:11 |
|
eternaleye left #perl6 |
12:20 |
|
Trashlord left #perl6 |
12:20 |
|
Trashlord joined #perl6 |
12:36 |
|
awoodland left #perl6 |
12:42 |
|
bluescreen joined #perl6 |
12:58 |
|
redicaps left #perl6 |
13:02 |
takadonet |
morning all |
13:04 |
|
MayDaniel joined #perl6 |
13:05 |
|
agentzh left #perl6 |
13:07 |
dalek |
rakudo: 86bf4cc | bacek++ | / (4 files): |
13:07 |
dalek |
rakudo: Add write barriers to work on generational_gc parrot branch |
13:07 |
dalek |
rakudo: |
13:07 |
dalek |
rakudo: Since master now has a noop write barrier macro too, this does not disrupt |
13:07 |
dalek |
rakudo: operation on parrot/master |
13:07 |
dalek |
rakudo: |
13:07 |
dalek |
rakudo: Also bumps PARROT_REVISION to ensure safe operation on parrot/master |
13:07 |
dalek |
rakudo: |
13:07 |
dalek |
rakudo: Signed-off-by: Moritz Lenz <moritz faui2k3.org> |
13:07 |
dalek |
rakudo: review: https://github.com/rakudo/rakudo/commit/86bf4cca07 |
13:12 |
tadzik |
1) building parrot on gen_gc with prefix=/path/to/rakudo/parrot_install and then make'ing rakudo will give me rakudo on gen_gc, right? |
13:12 |
moritz_ |
right |
13:15 |
[Coke] |
bacek++ |
13:15 |
|
felliott joined #perl6 |
13:16 |
moritz_ |
indeed bacek++ |
13:18 |
|
wolfram_ joined #perl6 |
13:20 |
masak |
morning, takadonet. |
13:20 |
takadonet |
masak: how are u? |
13:21 |
masak |
takadonet: liking my new $dayjob. busy but satisfied. and u? |
13:22 |
takadonet |
busy as freaking hell and freezing |
13:23 |
wolfram_ |
moritz_: looks like .roots is not so ideal for FFT. Points are spaced along a half (not full) circle, so I would throw away half the results of .roots |
13:23 |
moritz_ |
huh? |
13:23 |
moritz_ |
wolfram_: if it's indeed only half a circle, it's a bug (or I thoroughly misunderstand complex math) |
13:24 |
moritz_ |
rakudo: say 1.roots(8).perl |
13:24 |
p6eval |
rakudo 03380c: OUTPUT«(Complex.new(1, 0), Complex.new(0.707106781186548, 0.707106781186547), Complex.new(6.12323399573677e-17, 1), Complex.new(-0.707106781186547, 0.707106781186548), Complex.new(-1, 1.22464679914735e-16), Complex.new(-0.707106781186548, -0.707106781186547), |
13:24 |
p6eval |
..Complex.new(-1.83697019872103… |
13:24 |
flussence |
those seem to form a whole circle to me... |
13:25 |
wolfram_ |
moritz_: .roots are on a full circle. FFT needs only half circle |
13:25 |
moritz_ |
wolfram_: ah, then I misunderstood what you wrote |
13:25 |
flussence |
.grep(*.im >= 0) ? |
13:25 |
moritz_ |
flussence: that's still throwing away half of the calculated values |
13:25 |
flussence |
hm, yeah. |
13:26 |
tadzik |
rakudo: 4/6 == 2/3 |
13:26 |
p6eval |
rakudo 03380c: ( no output ) |
13:26 |
tadzik |
rakudo: say 4/6 == 2/3 |
13:26 |
p6eval |
rakudo 03380c: OUTPUT«Bool::True» |
13:27 |
wolfram_ |
I do like .cis for being more specific to the problem, but then it's bad because everyone knows .exp but very few know .cis |
13:27 |
moritz_ |
agreed |
13:28 |
wolfram_ |
But a comment might mend this: (^@odd »*» (2 * pi / @_))».cis; # cis = cos + i sin |
13:30 |
|
jimbob joined #perl6 |
13:30 |
wolfram_ |
Oh and masak++. Took me like 20+ hours until i suddenly realized *why* I got karma for mentioning butterfly graphs on #perl6 |
13:30 |
moritz_ |
:-) |
13:31 |
masak |
not only for that reason :) |
13:31 |
masak |
I like the FFT theory because of the pretty graphs. |
13:32 |
moritz_ |
have you ever seen a fourier transformed cat? :-) |
13:32 |
masak |
once. a horrible sight. |
13:32 |
wolfram_ |
?? |
13:32 |
masak |
wolfram_: http://xkcd.com/26/ |
13:33 |
masak |
a fine bit of Vintage xkcd. |
13:33 |
wolfram_ |
masak: has to wait till I'm home. proxy: "Your request was denied because of its content categorization: "Humor/Jokes"" |
13:34 |
masak |
well, can't have fun at work -- what would people say? |
13:34 |
moritz_ |
"Some people call them 'cars' or 'trucks'; I call them 'dimensional transmogrifiers' because they change three-dimensional cats into two-dimensional ones." -- source unknown, was in a fortune file once |
13:35 |
masak |
aww :/ |
13:37 |
tadzik |
/bin/sh: line 1: 17754 Segmentation fault /home/tadzik/src/rakudo/parrot_install/bin/parrot src/gen/perl6.pbc --target=pir src/gen/core.pm > src/gen/core.pir |
13:37 |
tadzik |
...crap |
13:37 |
moritz_ |
tadzik: is that on a fresh version of the branch? |
13:38 |
moritz_ |
yesterday it segfaulted for me too |
13:38 |
tadzik |
moritz_: nah, like 3 commits ago |
13:38 |
tadzik |
or 6? I can't pull from git on my uni |
13:38 |
|
MayDaniel left #perl6 |
13:38 |
tadzik |
well, I can httppull |
13:38 |
moritz_ |
urks |
13:38 |
moritz_ |
the only thing that's blocked here is SMTP |
13:39 |
moritz_ |
I can live with that |
13:39 |
|
drbean left #perl6 |
13:40 |
tadzik |
well, the only things that are not blocked here is ssh, http and email-related things |
13:41 |
moritz_ |
if ssh is open, nearly everything is open :-) |
13:41 |
moritz_ |
by the power of tunneling |
13:41 |
tadzik |
yeha |
13:42 |
tadzik |
I'd prefer the admins to stop being silly about this networks. If people want to waste time, they'll waste it on youtube, and waste more bandwidth than me on xmpp |
13:44 |
|
satyavvd joined #perl6 |
13:53 |
zenog |
Hi guys, another stupid beginner's question: What is wrong with the following code? http://nopaste.info/4a3ac4887a.html |
13:54 |
zenog |
I get "Invalid namespace key of type 'P6opaque' in get_pointer_keyed" |
13:54 |
zenog |
... which does not tell me too much. |
13:55 |
moritz_ |
I think you need to call self!private($a, 'hello') |
13:55 |
moritz_ |
and it could be that class Class already exists, and gives you a weird error |
13:55 |
moritz_ |
rakudo: class Class { } |
13:55 |
p6eval |
rakudo 03380c: ( no output ) |
13:55 |
moritz_ |
hm |
13:56 |
zenog |
Ah I thought that self.!private was needed, got another weird message for that ... |
13:56 |
zenog |
moritz_: Thank you. |
13:56 |
moritz_ |
rakudo: class Class { method public($a) {self!private($a, 'hello') }; method !private($a, $b) { say "$a says $b" } }; Class.new.public('Zeno') |
13:56 |
p6eval |
rakudo 03380c: OUTPUT«Invalid namespace key of type 'P6opaque' in get_pointer_keyed in main program body at line 22:/tmp/RmHUBlYRGq» |
13:56 |
moritz_ |
huh. |
13:57 |
zenog |
moritz_: bug? |
13:57 |
moritz_ |
zenog: bug! |
13:57 |
zenog |
moritz_: rename to "MyClass" does the job. |
13:58 |
zenog |
but of course it would be nice if rakudo reported that the class already exists ;-) |
13:58 |
* masak |
submits rakudobug |
13:58 |
moritz_ |
rakudo: say Class |
13:58 |
p6eval |
rakudo 03380c: OUTPUT«Could not find sub &Class in main program body at line 22:/tmp/sLFryh8fGF» |
13:58 |
masak |
dåligt. |
13:58 |
zenog |
masak: great, thank you! |
13:58 |
moritz_ |
rakudo: class Class { }; say Class.new |
13:58 |
p6eval |
rakudo 03380c: OUTPUT«Invalid namespace key of type 'P6opaque' in get_pointer_keyed in main program body at line 22:/tmp/kRxQkfD1oU» |
13:59 |
moritz_ |
maybe a parrot PMC leaking |
13:59 |
moritz_ |
rakudo: say pir::new('Class') |
13:59 |
masak |
supposedly. |
13:59 |
p6eval |
rakudo 03380c: OUTPUT«» |
13:59 |
masak |
moritz_++ |
13:59 |
moritz_ |
rakudo: say pir::new('Class').PARROT |
13:59 |
p6eval |
rakudo 03380c: OUTPUT«Method 'PARROT' not found for invocant of class 'Class' in main program body at line 22:/tmp/FYrmXOgzIq» |
13:59 |
moritz_ |
rakudo: say pir::typeof(pir::new('Class')) |
13:59 |
p6eval |
rakudo 03380c: OUTPUT«Class» |
14:00 |
moritz_ |
rakudo: class ResizablePMCArray { }; say ResizablePMCArray.new |
14:00 |
p6eval |
rakudo 03380c: ( no output ) |
14:02 |
masak |
zenog++ # finding a new kind of bug |
14:04 |
wolfram_ |
Just looked at some .^methods. Saw the unique vs. uniq yesterday. Also like .coords above better than .coordinates (and generally think it's a good idea) |
14:04 |
wolfram_ |
So i was a little surprised by .ceiling. I'm so used to ceil from both C and p5 POSIX that it really seemed strange to me. |
14:04 |
|
jimbob left #perl6 |
14:06 |
zenog |
Another question: I do not really need multiple dispatch, but I want a thing like "method overloading" in Java, so methods with the same name, but different signatures. I do not care whether the dispatch is at runtime or at compile-time (even though I'd prefer compile-time). |
14:06 |
zenog |
How would I express that in Perl 6? |
14:07 |
|
colomon left #perl6 |
14:07 |
moritz_ |
with multi methods |
14:07 |
masak |
wolfram_: I'm inclined to agree. .ceil has a sufficiently strong tradition that changing it to .ceiling seems almost a bit arrogant. on the other side, Perl 6 has a tradition of being "daring" in exactly that way, so I'm not too surprised. |
14:07 |
|
colomon joined #perl6 |
14:07 |
masak |
zenog: see S12 for lots of details. |
14:07 |
moritz_ |
and S06 for the signatures etc. |
14:08 |
|
colomon left #perl6 |
14:08 |
masak |
zenog: the dispatch will be run-time in Rakudo currently, but people like jnthn are working on improving the state of the art. |
14:08 |
zenog |
masak, moritz_: "multi method ($a) { ..." etc.? |
14:08 |
zenog |
masak: cool |
14:08 |
masak |
zenog: exactly. |
14:08 |
|
colomon joined #perl6 |
14:08 |
masak |
zenog: you'll want to get a handle on how the multiple dispatch works and when it will fail. |
14:08 |
masak |
zenog: one of jnthn++'s talks might be a good way to learn this. |
14:09 |
zenog |
masak: OK, I will read the stuff before asking the next questions ;-) |
14:09 |
moritz_ |
in the end the runtime always has the final say, doing things as compile time is "just" an optimization |
14:09 |
masak |
http://jnthn.net/articles.shtml |
14:09 |
flussence |
I think that naming thing really needs more attention. Abbreviating things to (2*n) chars looks nice, but it'd be good to have some one-line explanation to point to when someone asks wtf is going on |
14:09 |
moritz_ |
the "signatures, the full story" is a very good talk |
14:09 |
masak |
moritz_: 'runtime at the latest, compile-time when you can' |
14:09 |
masak |
or s/at the latest/when you must/ for increased symmetry :) |
14:10 |
moritz_ |
masak: my point is that the behaviour is basically specced to work as if everything in dispatch land was done at runtime |
14:10 |
moritz_ |
so for understanding, that approach is better |
14:10 |
|
plobsing left #perl6 |
14:10 |
moritz_ |
doing parts of the work at compile time really is an optimization |
14:10 |
masak |
flussence: two more increasingly wide aspects are also important: naming of the named paramters, and documentation. lots needs to be done there. |
14:11 |
moritz_ |
about which a user needs to know nothing |
14:11 |
masak |
moritz_: agreed on all counts. |
14:11 |
masak |
moritz_: but zenog was requesting compile-time if possible. |
14:11 |
wolfram_ |
rakudo: say 180.to-radians |
14:11 |
p6eval |
rakudo 03380c: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in 'to-radians' at line 3246:CORE.setting in main program body at line 22:/tmp/eHRNmwz9xl» |
14:11 |
moritz_ |
rakudo: class Role { }; say Role.new |
14:11 |
wolfram_ |
How's that supposed to work? |
14:11 |
p6eval |
rakudo 03380c: OUTPUT«===SORRY!===Illegal redeclaration of symbol 'Role'» |
14:12 |
colomon |
rakudo: say 180.to-radians(Degrees) |
14:12 |
p6eval |
rakudo 03380c: OUTPUT«3.14159265358979» |
14:12 |
colomon |
rakudo: say 180.to-radians(Gradians) |
14:12 |
p6eval |
rakudo 03380c: OUTPUT«2.82743338823081» |
14:12 |
masak |
I wouldn't mind if Degreed was assumed there. |
14:13 |
masak |
*Degrees |
14:13 |
moritz_ |
and .to-degrees defaulting to Radians? |
14:13 |
masak |
yeah. |
14:13 |
masak |
those are by far the most frequent two, IMO. |
14:13 |
moritz_ |
agreed |
14:14 |
zenog |
Basically, there should be warning/error if one defines within one class two non-multi methods with the same name, right? |
14:14 |
masak |
secondly, feels to me the parameter could/should be named. |
14:14 |
masak |
zenog: right. |
14:14 |
masak |
rakudo: class A { method foo {}; method foo {} } |
14:14 |
p6eval |
rakudo 03380c: ( no output ) |
14:14 |
masak |
:/ |
14:14 |
masak |
std: class A { method foo {}; method foo {} } |
14:14 |
p6eval |
std 625303c: OUTPUT«ok 00:01 118m» |
14:14 |
masak |
o.O |
14:14 |
masak |
TimToady: ^^ |
14:15 |
|
satyavvd left #perl6 |
14:15 |
moritz_ |
it's fine for STD not to complain |
14:15 |
moritz_ |
that's a check that the MOP should do for you |
14:15 |
wolfram_ |
My first idea was there should be *no* to/from-radians. Radians being the default. There should be to/from-degrees and maybe to/form-grad (or gon) with no additional argument |
14:15 |
masak |
moritz_: fair enough. |
14:15 |
zenog |
masak: Currently, there is a runtime error, but no compile-time error. |
14:16 |
masak |
wolfram_: that's a fair point as well, but it's a very math-y perspective, not a user perspective... |
14:16 |
flussence |
can't you just assume radians for an unspecific Int then do pi.Degrees? |
14:16 |
masak |
zenog: since the MOP composes the class at compile time, it should be possible to make that a compile-time error. |
14:16 |
flussence |
more descriptive than a .to-whatever |
14:17 |
PerlJam |
good now #perl6 |
14:17 |
masak |
PerlJam: \o |
14:17 |
|
fhelmberger joined #perl6 |
14:17 |
masak |
flussence: hm. yes, maybe... |
14:17 |
wolfram_ |
masak: in everyday life degrees may be the default. But as soon as you use sin, cos etc. your default is radians |
14:18 |
PerlJam |
assuming ints are radians sounds completely wrong to me. |
14:18 |
PerlJam |
And for exactly the reason that wolfram_ just said |
14:18 |
colomon |
PerlJam: indeed |
14:18 |
PerlJam |
(even though that wasn't his intent :) |
14:18 |
|
stifynsemons joined #perl6 |
14:18 |
PerlJam |
also, IMHE, radians aren't usually integer :) |
14:19 |
wolfram_ |
Compex exp, .polar etc. are all in radians |
14:19 |
flussence |
PerlJam: I had to make at least one stupid mistake today :) |
14:19 |
moritz_ |
making the default dependent on the exact type would be so very wrong |
14:19 |
wolfram_ |
So on a comuter I would always assume to-degree to imply from radians |
14:20 |
PerlJam |
flussence: it wasn't a mistake, you were vetting an idea that brought other ideas into relief :) |
14:21 |
PerlJam |
wolfram_: that doesn't sound right either |
14:21 |
* moritz_ |
can very easily understand that POV |
14:22 |
PerlJam |
in a world where there are only 2 units of measure for a particular value, that might work. Unfortunately, we don't live in such a world. |
14:22 |
pmichaud |
good morning, #perl6 |
14:22 |
wolfram_ |
colomon: tried to leave a comment about that on your blog months ago. Never appeared. do you censor? :-) |
14:22 |
masak |
good morning, pm |
14:22 |
moritz_ |
good am, pm |
14:23 |
colomon |
wolfram_: I don't censor, but I don't always approve things that get flagged as potential spam, either. |
14:23 |
colomon |
If you commented in the midst of the great spam comment attack of '10, it's entirely possible I missed approving it. |
14:24 |
colomon |
pm! |
14:24 |
flussence |
(I've had an idea for a while now for a measurement unit DWIM module, for things like 23.convert('rad' => 'deg'); ) |
14:25 |
|
stifynsemons left #perl6 |
14:25 |
colomon |
flussence: that one's trivial, if spelled properly. :) |
14:25 |
wolfram_ |
colomon: Your blog post is from April 2010. Comment came briefly aferwards. |
14:27 |
colomon |
rakudo: sub convert(Real $angle, Pair $direction) { $angle.to-radians($direction.key).from-radians($direction.value); }; say convert(180, Degrees => Radians) |
14:27 |
p6eval |
rakudo 03380c: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in 'convert' at line 1:/tmp/XvfipvSOrx in main program body at line 22:/tmp/XvfipvSOrx» |
14:27 |
wolfram_ |
But technical problems with company environment or browser or... are equally possible |
14:28 |
pmichaud |
note that Degrees => Radians would be a named argument |
14:28 |
moritz_ |
colomon: that Pair is a named argu... what pm said |
14:28 |
pmichaud |
might want parens |
14:28 |
colomon |
yes, I worked that out |
14:28 |
colomon |
Is there an easy way to work around that? |
14:28 |
pmichaud |
work around what? |
14:28 |
moritz_ |
(Degrees) => Radians I guess |
14:29 |
pmichaud |
I think parens are the easy way. :-) |
14:29 |
colomon |
rakudo: sub convert(Real $angle, Pair $direction) { $angle.to-radians($direction.key).from-radians($direction.value); }; say convert(180, (Degrees) => Radians) |
14:29 |
p6eval |
rakudo 03380c: OUTPUT«3.14159265358979» |
14:29 |
colomon |
parens sort of uglify the sub, though |
14:30 |
|
pmurias joined #perl6 |
14:30 |
|
felliott left #perl6 |
14:31 |
colomon |
oh, wacky. there appear to be all sorts of interesting comments caught in my spam filter. :( |
14:31 |
|
plobsing joined #perl6 |
14:33 |
|
kaare_ left #perl6 |
14:33 |
|
felliott joined #perl6 |
14:38 |
colomon |
though I don't see anything as far back as April. Sorry, wolfram_ |
14:44 |
|
felliott left #perl6 |
14:47 |
wolfram_ |
colomon: Never mind. It was about the same things i just said here. |
14:49 |
wolfram_ |
Ans now that you are aware of the problem, i might have better chances with future comments ;-) |
14:52 |
wolfram_ |
And what I should have said long ago: colomon++ # I did try to use Complex in rakudo before you arrived -- was no fun, but you know that |
14:52 |
colomon |
aw, shucks. |
14:53 |
moritz_ |
yep, the number system in general was completely unusable before colomon++ came along and fixed it :-) |
14:54 |
|
awoodland joined #perl6 |
14:56 |
|
mkramer left #perl6 |
14:59 |
|
mtk joined #perl6 |
15:01 |
sorear |
good * #perl6 |
15:02 |
takadonet |
sorear: hey |
15:04 |
sorear |
zenog: hi |
15:04 |
|
shi left #perl6 |
15:04 |
|
Trashlord left #perl6 |
15:05 |
|
wtw left #perl6 |
15:05 |
zenog |
sorear: hi. did not have time to work on the decimal stuff, sorry. |
15:06 |
|
kaare_ joined #perl6 |
15:10 |
sorear |
zenog: do you still want to do it? |
15:10 |
|
mtk left #perl6 |
15:10 |
|
masak left #perl6 |
15:11 |
|
kaare_ left #perl6 |
15:13 |
zenog |
sorear: I do not want to block anyone else from doing; from my side, there is interest, but currently not so much time. |
15:15 |
|
mtk joined #perl6 |
15:17 |
|
benabik joined #perl6 |
15:18 |
|
benabik left #perl6 |
15:18 |
|
benabik joined #perl6 |
15:19 |
|
kaare_ joined #perl6 |
15:22 |
wolfram_ |
One more thing about method names: Had to search .^methods to find acotanh as it is totally unfamiliar to me (as opposed to acoth). |
15:22 |
sorear |
zenog: it's quite far down my todo list... you have weeks at least |
15:23 |
wolfram_ |
acoth vs. acotanh: 54,400 to 1,130 results on google and 129,000 to 160 results on google codesearch |
15:24 |
moritz_ |
Mathematica uses ArcCoth |
15:24 |
zenog |
sorear: OK, great ;-) |
15:24 |
* moritz_ |
tries to recall if he ever actually used that function... |
15:24 |
wolfram_ |
And of course there is 'arcoth' -- just found out that's what Bronstein-Semendjajew uses ;-) |
15:25 |
|
mkramer joined #perl6 |
15:25 |
moritz_ |
isn't there a difference between the 'a' and 'ar' variants? |
15:26 |
wolfram_ |
moritz_: I'm not sure I ever used it. I just try to stress some Complex trig identities. |
15:27 |
moritz_ |
wolfram_: feel free to add them as test cases to the roast repo |
15:27 |
moritz_ |
wolfram_: do you already have commit access? |
15:29 |
wolfram_ |
moritz_: no, and maybe I should not have. I don't know git and I spend too much time on this already. |
15:30 |
moritz_ |
wolfram_: your choice |
15:30 |
|
plobsing left #perl6 |
15:31 |
|
plobsing joined #perl6 |
15:32 |
wolfram_ |
I'll ask here if I feel like doing something like that. |
15:34 |
sorear |
Should X[] and Z[] contain controllable loops? |
15:35 |
moritz_ |
sorear: you mean controllable by next() etc? |
15:36 |
moritz_ |
I'm inclined to say "no", but it's just a gut feeling |
15:37 |
tadzik |
/o\ |
15:37 |
* tadzik |
has 49.5 points from electronics, 50 passes |
15:38 |
moritz_ |
ouch |
15:38 |
arnsholt |
I'd say making the X and Z metaops is a bad idea |
15:38 |
arnsholt |
Too much potential for magic code |
15:38 |
|
masak joined #perl6 |
15:45 |
|
plobsing left #perl6 |
15:45 |
|
wolfram_ left #perl6 |
15:47 |
|
aesop left #perl6 |
15:48 |
sorear |
arnsholt: too late, they already are |
15:49 |
arnsholt |
Oh well =) |
15:51 |
|
felliott joined #perl6 |
15:52 |
|
wiseguyxp joined #perl6 |
15:57 |
|
bluescreen left #perl6 |
16:01 |
|
justatheory joined #perl6 |
16:10 |
|
envi left #perl6 |
16:11 |
|
plobsing joined #perl6 |
16:11 |
|
alester joined #perl6 |
16:12 |
|
ashleydev left #perl6 |
16:14 |
|
Patterner left #perl6 |
16:16 |
|
ymasory joined #perl6 |
16:16 |
flussence |
can a module :auth<> have multiple values? |
16:17 |
|
Psyche^ joined #perl6 |
16:17 |
|
Psyche^ is now known as Patterner |
16:18 |
|
wiseguyxp left #perl6 |
16:19 |
|
aesop joined #perl6 |
16:20 |
|
ashleydev joined #perl6 |
16:20 |
|
risou joined #perl6 |
16:21 |
masak |
flussence: it can, at least in theory. don't know what that would signify, though. |
16:22 |
|
Alias_ left #perl6 |
16:22 |
flussence |
dunno, I'm just wondering what the right way is to handle a thing like github where you can have several people with commit access to one module. |
16:23 |
moritz_ |
:auth<http://github.com/rakudo/> ? |
16:23 |
moritz_ |
or even rakudo/rakudo |
16:23 |
flussence |
yeah, I guess that works |
16:31 |
TimToady |
morning, Xebras and Zebras |
16:31 |
zenog |
Shouldn't be http://try.rakudo.org/ be linked from the main page of http://perl6.org? |
16:32 |
zenog |
Maybe below the download button? There isn't a better prove of the actual availability of Perl 6 ... |
16:33 |
masak |
+1 |
16:34 |
TimToady |
but please design for multiple implementations too |
16:34 |
flussence |
sounds like a good idea, provided I can figure out how to get the backend to survive reboots... |
16:35 |
flussence |
might be fixed now, actually... |
16:36 |
benabik |
Hm. The tutorial on try.rakudo.org has some funny formatting: "Example: (,10,\-,2,),\*,4" |
16:37 |
|
Sarten-X left #perl6 |
16:38 |
flussence |
oof. not sure how that happened... |
16:39 |
flussence |
oh, some idiot wrote "example" twice instead of "match" in the json file... :) |
16:40 |
moritz_ |
flussence: re surviving reboots, would @reboot cron jobs help? |
16:40 |
flussence |
I've tried that, it failed once so I tweaked it slightly. Not sure how well it'll go next time yet... |
16:44 |
flussence |
ok, tutorial should show up correct now. |
16:44 |
flussence |
(still needs more content, mind you) |
16:45 |
|
Sarten-X joined #perl6 |
16:46 |
flussence |
(if it's still broken, force-refresh http://try.rakudo.org/js/chapters/1.js in the browser) |
16:47 |
benabik |
flussence: WORKSFORME |
16:48 |
flussence |
I need to get a non-ancient version of rakudo onto there some time too... :/ |
16:52 |
flussence |
parrot is the only part that needs to be built on the host itself, right? (i.e. I can just scp perl6.pbc over) |
16:53 |
moritz_ |
you can also scp a built parrot, if you preserve paths and the platform is the same |
16:54 |
TimToady |
I have not strong prefs between ceiling and ceil |
16:54 |
|
molaf joined #perl6 |
16:54 |
TimToady |
other than that, if floor is used slightly more often, why is it longer? :) |
16:54 |
flussence |
I'd prefer the path of least resistance... or the resistance of least paths |
16:55 |
TimToady |
maybe we should shorten floor to floo, or flo |
16:56 |
moritz_ |
rakudo: say 0.6.Int |
16:56 |
p6eval |
rakudo 86bf4c: OUTPUT«0» |
16:56 |
moritz_ |
.Int is shorter than .ceil after all :-) |
16:56 |
TimToady |
point |
16:56 |
TimToady |
same keystrokes |
16:56 |
flussence |
that's why we need native types :) |
16:57 |
moritz_ |
hey, our strings need .keystrokes methods :-) |
16:57 |
TimToady |
and .pixelwidth |
16:57 |
flussence |
(argh!) |
16:57 |
masak |
.floor and .Int are only the same for non-negative numbers. |
16:57 |
moritz_ |
rakudo: say (-0.6).Int |
16:57 |
p6eval |
rakudo 86bf4c: OUTPUT«0» |
16:58 |
moritz_ |
correct |
16:58 |
masak |
i.e. don't use .Int instead of .floor unless your domain only contains non-negative numbers. |
16:59 |
moritz_ |
rakudo: say (3+4i).Int |
16:59 |
p6eval |
rakudo 86bf4c: OUTPUT«You can only coerce a Complex to Real if the imaginary part is zero in 'Int' at line 1 in main program body at line 22:/tmp/m90925ZPNJ» |
16:59 |
moritz_ |
rakudo: say (3+4i).floor |
16:59 |
p6eval |
rakudo 86bf4c: OUTPUT«floor is only defined for Reals, you have a Complex()» |
16:59 |
moritz_ |
rakudo: say (3+4i).round |
16:59 |
p6eval |
rakudo 86bf4c: OUTPUT«round is only defined for Reals, you have a Complex()» |
16:59 |
moritz_ |
rakudo: say (3+4i).squared |
16:59 |
p6eval |
rakudo 86bf4c: OUTPUT«Method 'squared' not found for invocant of class 'Complex' in main program body at line 22:/tmp/_UxDCsBefr» |
17:00 |
masak |
.squared? :) |
17:00 |
moritz_ |
my bad, should be .square |
17:00 |
moritz_ |
in correspondence to .round |
17:00 |
moritz_ |
or maybe .angled |
17:01 |
masak |
.pointy |
17:02 |
moritz_ |
-haired-boss |
17:04 |
|
cotto_work left #perl6 |
17:04 |
|
ymasory left #perl6 |
17:05 |
|
cotto_work joined #perl6 |
17:05 |
|
orafu left #perl6 |
17:05 |
|
cotto_work left #perl6 |
17:07 |
|
cotto_work joined #perl6 |
17:07 |
|
cotto_work left #perl6 |
17:07 |
|
cotto_work joined #perl6 |
17:07 |
masak |
rakudo: sub pointy-haired-boss { .chr for 39, 111, 39 }; say pointy-haired-boss |
17:08 |
p6eval |
rakudo 86bf4c: OUTPUT«'o'» |
17:08 |
|
cotto_work left #perl6 |
17:08 |
|
spq joined #perl6 |
17:08 |
|
cotto_work joined #perl6 |
17:09 |
moritz_ |
pointy-haired boss with list comprehension! \o/ |
17:09 |
|
cotto_work left #perl6 |
17:15 |
|
dual left #perl6 |
17:15 |
TimToady |
I suspect X and Z (and hypers) have to assume idempotence to be parallelizable, and loop controls tend to work against that |
17:15 |
tadzik |
\o/ |
17:16 |
moritz_ |
parallelizable, even though they are lazy? |
17:16 |
TimToady |
lazy is only mostly lazy, batches are still allowed |
17:16 |
moritz_ |
right |
17:16 |
|
cotto_work joined #perl6 |
17:17 |
TimToady |
we do need to come up with a way to recognize those constructs that require strict laziness to work, however |
17:17 |
|
cotto_work left #perl6 |
17:17 |
TimToady |
self-referential lazy lists tend to be that way |
17:17 |
|
cotto_work joined #perl6 |
17:17 |
|
cotto_work left #perl6 |
17:17 |
TimToady |
maybe data-flow can force that though |
17:19 |
|
colomon left #perl6 |
17:19 |
|
mj41 left #perl6 |
17:24 |
|
MayDaniel joined #perl6 |
17:26 |
moritz_ |
.u Ωη |
17:26 |
phenny |
U+2126 OHM SIGN (Ω) |
17:26 |
phenny |
U+03B7 GREEK SMALL LETTER ETA (η) |
17:27 |
arnsholt |
There's a separate ohm sign? *sight* |
17:27 |
arnsholt |
-t |
17:27 |
moritz_ |
"of course" |
17:28 |
arnsholt |
It's Unicode, after all. Shoulda guessed =) |
17:28 |
moritz_ |
they even have http://www.fileformat.info/info/unicode/char/1f47e/index.htm |
17:28 |
|
ymasory joined #perl6 |
17:28 |
tadzik |
omg |
17:28 |
tadzik |
Unicode is kind of silly with all this characters |
17:29 |
|
ymasory left #perl6 |
17:29 |
tadzik |
I know they have plenty of space, but still |
17:29 |
masak |
arnsholt: if you're surprised at there being a separate ohm sign, you need to change your expectations on Unicode :) |
17:29 |
|
ymasory joined #perl6 |
17:29 |
arnsholt |
Yeah, I keep expecting it to conform to my ideas of reasonable =) |
17:29 |
masak |
arnsholt: Unicode bases its characters around different *meanings*, not around different aspects. |
17:29 |
|
rgrau joined #perl6 |
17:29 |
arnsholt |
Yeah, it does make sense, on some level |
17:30 |
tadzik |
If there ever will be a font having all the unicode characters, I'm going to dance in bunny slippers in the city centre, holding ananases in my hands |
17:30 |
arnsholt |
But is there a separate ampere codepoint, for example? |
17:30 |
tadzik |
or maybe I shouldn't say that |
17:30 |
arnsholt |
It's a bit handwavy at times |
17:30 |
pmichaud |
.u 蝶 |
17:30 |
masak |
.u ampere |
17:30 |
phenny |
U+8776 CJK UNIFIED IDEOGRAPH-8776 (蝶) |
17:30 |
phenny |
masak: Sorry, no results for 'ampere'. |
17:31 |
pmurias |
sorear: do you plan do focus on spec tests in the near future? |
17:31 |
|
cotto_work joined #perl6 |
17:31 |
tadzik |
.u tadzik |
17:31 |
phenny |
tadzik: Sorry, no results for 'tadzik'. |
17:31 |
|
cotto_work left #perl6 |
17:35 |
[Coke] |
.u coke |
17:35 |
phenny |
[Coke]: Sorry, no results for 'coke'. |
17:35 |
pmurias |
sorear: i'm working on getting SAFE.setting to compile under the common lisp backend right now, then i'll make Test.pm6 run and then i'll start working on test.pl |
17:35 |
[Coke] |
WOT!? |
17:35 |
|
cotto_work joined #perl6 |
17:35 |
|
cotto_work left #perl6 |
17:36 |
tadzik |
.u meth |
17:36 |
phenny |
tadzik: Sorry, no results for 'meth'. |
17:37 |
TimToady |
also, lazy lists can often be pipelined |
17:38 |
|
daxim left #perl6 |
17:43 |
|
mj41 joined #perl6 |
17:45 |
|
MayDaniel left #perl6 |
17:45 |
|
slavik1 left #perl6 |
17:48 |
|
cotto_work joined #perl6 |
17:48 |
|
cotto_work left #perl6 |
17:52 |
|
cotto_work joined #perl6 |
17:52 |
|
slavik1 joined #perl6 |
17:52 |
|
cotto_work left #perl6 |
17:52 |
|
gbacon left #perl6 |
17:54 |
|
gbacon joined #perl6 |
17:56 |
|
cdarroch joined #perl6 |
17:56 |
|
cdarroch left #perl6 |
17:56 |
|
cdarroch joined #perl6 |
17:56 |
[Coke] |
12:52 <@cotto_work> Could someone in #perl6 see if they mind taking the funny characters out of the topic? I suspect they may not be xchat's friend. |
17:56 |
[Coke] |
I assume he means mini-cami. |
17:57 |
[Coke] |
12:57 <@cotto_work> I'd be surprised if that were the problem, but I can connect to other channels just fine. |
17:58 |
|
cotto_work joined #perl6 |
17:58 |
|
cotto_work left #perl6 |
17:59 |
flussence |
huh. |
17:59 |
[Coke] |
nevermind. he can connect to #parrot with camelia in the topic. |
18:00 |
|
cotto_work joined #perl6 |
18:00 |
|
cotto_work left #perl6 |
18:01 |
|
cotto_work joined #perl6 |
18:01 |
|
cotto_work left #perl6 |
18:01 |
|
colomon joined #perl6 |
18:02 |
|
risou left #perl6 |
18:02 |
|
cotto_work joined #perl6 |
18:02 |
|
cotto_work left #perl6 |
18:02 |
|
cotto_work joined #perl6 |
18:02 |
|
cotto_work left #perl6 |
18:04 |
|
flussence_ joined #perl6 |
18:04 |
flussence_ |
well, xchat works here... |
18:04 |
|
flussence_ left #perl6 |
18:05 |
flussence |
I've had some less-than-fun character encoding crashes from it before though |
18:06 |
Tene |
iirc x-chat can have different encoding settings per-network |
18:06 |
|
dakkar left #perl6 |
18:07 |
bbkr |
rakudo: (Q:PIR { %r = root_new ["parrot";"Socket"]}).getaddrinfo("rakudo.org", 80, 6, 0, False).say # looks bad :( |
18:07 |
p6eval |
rakudo 86bf4c: OUTPUT«getaddrinfo failed: rakudo.org: Success in main program body at line 22:/tmp/v2hHYm9PqK» |
18:08 |
zenog |
colomon: I have continued fixing the perl 6 from two days ago: http://nopaste.info/8bf9b0fced.html It runs now without error message, but still contains numerical bugs that I am currently hunting ... |
18:09 |
|
cotto_work joined #perl6 |
18:09 |
colomon |
zenog: I'll take a look when I get a chance here. |
18:09 |
|
cotto_work left #perl6 |
18:18 |
|
impious joined #perl6 |
18:18 |
|
impious left #perl6 |
18:21 |
zenog |
colomon: no hurry ;-) |
18:21 |
|
dukeleto left #perl6 |
18:22 |
|
dukeleto joined #perl6 |
18:22 |
|
ymasory left #perl6 |
18:23 |
|
molaf left #perl6 |
18:28 |
|
shi joined #perl6 |
18:28 |
|
ymasory joined #perl6 |
18:31 |
|
cafesofie left #perl6 |
18:32 |
|
awoodland left #perl6 |
18:36 |
|
M_o_C joined #perl6 |
18:36 |
bbkr |
i think i've found what's causing socket bug: http://rt.perl.org/rt3/Ticket/Display.html?id=83866 , probably also http://rt.perl.org/rt3/Ticket/Display.html?id=79130 . /IO/Socket/INET.pm getaddrinfo method defaults $family to 0, while Parrot expects PIO_PF_INET (whch is 2) or PIO_PF_INET6 (which is 3) |
18:37 |
bbkr |
rakudo: say (Q:PIR { %r = root_new ["parrot";"Socket"]}).getaddrinfo("rakudo.org", 80, 6, 2, False) |
18:37 |
p6eval |
rakudo 86bf4c: OUTPUT«72.14.176.61:80» |
18:37 |
bbkr |
now works :) |
18:39 |
|
M_o_C left #perl6 |
18:41 |
|
stkowski joined #perl6 |
18:42 |
|
cafesofie joined #perl6 |
18:45 |
|
icwiener joined #perl6 |
18:47 |
|
mtk left #perl6 |
18:48 |
|
mtk joined #perl6 |
18:50 |
|
pmurias left #perl6 |
19:04 |
|
Trashlord joined #perl6 |
19:05 |
|
colomon left #perl6 |
19:05 |
PerlJam |
bbkr++ |
19:09 |
|
ymasory left #perl6 |
19:13 |
|
[particle] left #perl6 |
19:15 |
|
[particle] joined #perl6 |
19:16 |
PerlJam |
bbkr: were you going to submit a patch to change the default for $family? |
19:22 |
|
mkramer left #perl6 |
19:22 |
|
ymasory joined #perl6 |
19:30 |
|
_jaldhar left #perl6 |
19:32 |
|
cotto_work joined #perl6 |
19:32 |
|
cotto_work left #perl6 |
19:32 |
|
ymasory left #perl6 |
19:40 |
|
_jaldhar joined #perl6 |
19:43 |
|
colomon joined #perl6 |
19:45 |
|
ymasory joined #perl6 |
19:49 |
* masak |
reads http://doc.utwente.nl/56289/1/meijer91functional.pdf with interest, and then finds to his not-too-big surprise that it's listed in Pugs's READTOO |
19:49 |
masak |
as the first in a series of four, no less. |
19:52 |
|
mkramer joined #perl6 |
20:03 |
|
Sarten-X left #perl6 |
20:11 |
|
Sarten-X joined #perl6 |
20:17 |
|
fhelmberger left #perl6 |
20:21 |
|
MayDaniel joined #perl6 |
20:26 |
|
mikehh joined #perl6 |
20:29 |
|
Sarten-X left #perl6 |
20:37 |
|
Sarten-X joined #perl6 |
20:37 |
|
dual joined #perl6 |
20:40 |
|
awwaiid joined #perl6 |
20:47 |
|
jevin joined #perl6 |
20:54 |
|
MayDaniel left #perl6 |
21:19 |
|
plobsing left #perl6 |
21:23 |
|
benabik left #perl6 |
21:34 |
|
Mowah left #perl6 |
21:46 |
sjn |
masak: http://www.goopen.no/program/ |
21:49 |
* masak |
looks |
21:50 |
masak |
looks good \o/ |
21:50 |
arnsholt |
Oooh. I should try to attend that |
21:50 |
masak |
arnsholt: it'd be very nice to meet again. |
21:51 |
arnsholt |
Whoa. 'Cept I can't afford the attendance fee |
21:51 |
arnsholt |
4 kilo-NOK is a bit outside my budget |
21:52 |
masak |
that does seem a bit steep, yes. |
21:52 |
diakopter |
USD? |
21:53 |
masak |
phenny: 4000 NOK to USD? |
21:53 |
masak |
guess not. |
21:53 |
diakopter |
phenny: .g 4000 NOK to USD |
21:53 |
diakopter |
heh |
21:53 |
|
VanDamas joined #perl6 |
21:54 |
masak |
VanDamas: hello! Lithuania? |
21:56 |
* masak |
, newbie accoster |
21:56 |
|
VanDamas left #perl6 |
21:56 |
diakopter |
hrm |
21:56 |
flussence |
meep. |
21:56 |
masak |
some newbies don't respond well to accosting. |
21:57 |
tadzik |
hugme: hug freenode |
21:57 |
* hugme |
hugs freenode |
21:57 |
flussence |
it's aliiiiiiiive |
21:58 |
sbp |
.c 4000 NOK in USD |
21:58 |
phenny |
685.94 U.S. dollars |
21:58 |
sbp |
the .c command is the Google Calculator |
21:58 |
sbp |
and that's the currency conversion syntax |
21:58 |
masak |
sbp++ |
22:03 |
|
Lorn left #perl6 |
22:03 |
flussence |
So after $dayjob gave me a CGI.pm thing and then a PHP thing I come home to find my desktop's video card is broken and all my spares are dead. Happy Fun Time Week! |
22:05 |
slavik1 |
sounds fun |
22:07 |
masak |
hugme: hug flussence |
22:07 |
* hugme |
hugs flussence |
22:08 |
flussence |
oh well, my netbook's doing a fair job of pretending to be a desktop... just slower. |
22:14 |
|
plobsing joined #perl6 |
22:24 |
|
Sarten-X left #perl6 |
22:25 |
masak |
std: class A { method foo { method bar {} } } |
22:25 |
p6eval |
std 625303c: OUTPUT«ok 00:01 118m» |
22:26 |
masak |
rakudo: class A { method foo { method bar { say "OH HAI" }; self.bar } }; A.new.foo |
22:26 |
p6eval |
rakudo 86bf4c: OUTPUT«OH HAI» |
22:27 |
* masak |
tries to think of a situation where he would actually want to nest named methods... |
22:31 |
colomon |
it doesn't seem that far-fetched. |
22:32 |
masak |
it's certainly consistent that it works. |
22:32 |
flussence |
the few times I've needed named code inside another thing, the name's usually a hash key... |
22:32 |
masak |
I do named subs in bigger routines all the time nowadays. |
22:32 |
masak |
it's so convenient. |
22:32 |
colomon |
errr.... though can a sub inside a method see everything the method can anyway? |
22:32 |
|
Sarten-X joined #perl6 |
22:33 |
flussence |
that's how closures work, isn't it? |
22:33 |
masak |
yes. |
22:33 |
masak |
colomon: hm... the lexical nesting might actually be a reason for nesting the methods... :) |
22:34 |
masak |
rakudo: class A { method foo { my $a = 42; method bar { say $a } } }; given A.new { .foo; .bar } |
22:34 |
p6eval |
rakudo 86bf4c: OUTPUT«42» |
22:34 |
masak |
rakudo: class A { method foo { my $a = 42; method bar { say $a } } }; given A.new { .bar } |
22:34 |
p6eval |
rakudo 86bf4c: OUTPUT«Null PMC access in type() in 'A::bar' at line 22:/tmp/QR10wJb6_o in main program body at line 22:/tmp/QR10wJb6_o» |
22:34 |
* masak |
submits rakudobug |
22:34 |
masak |
I suspected that might happen :P |
22:35 |
colomon |
oh, now that's an interesting question. should the top scope even be able to see .bar? |
22:35 |
colomon |
I would have thought no. |
22:36 |
masak |
oh, the top scope sees .bar |
22:36 |
masak |
it's just that at the point .bar is called, if .foo hasn't been called, $a contains a Null PMC. |
22:36 |
colomon |
because it's a method, not a sub? |
22:37 |
masak |
because the lexpad in .foo has never been visited, and thus is not active. |
22:37 |
masak |
this'll all be fixed when we have static lexpads. |
22:37 |
colomon |
no, my question / answer was about visibility. |
22:37 |
masak |
the visibility of .foo and .bar is the same. |
22:37 |
masak |
because they are methods. |
22:38 |
masak |
they both register with the class. |
22:38 |
colomon |
to me, that argues that nested methods should be illegal |
22:38 |
masak |
it doesn't to me, but go ahead. |
22:39 |
colomon |
in my understanding, the entire point of doing nested subs is to have a useful function which is not visible to the outside world. |
22:41 |
colomon |
I find it hard to understand why p6 should ever do what you asked it to do back there -- having a function which uses a context which has never been initialized. |
22:41 |
* colomon |
suddenly expects you can do crazy things like export nested subs in p6.... |
22:42 |
masak |
sure, if you declare them as 'is export'. |
22:42 |
masak |
I'm sorry, but I don't really see the problem. |
22:43 |
|
ymasory left #perl6 |
22:43 |
colomon |
Trying to restate it, I understand two reasons for nested subs: |
22:43 |
colomon |
1) Interior sub is a handy utility for the exterior sub, but shouldn't be visible to the outside world. |
22:43 |
masak |
s/shouldn't/needn't/, but yes. |
22:44 |
colomon |
2) Interior sub needs the context of the exterior sub. |
22:44 |
masak |
right. |
22:44 |
masak |
(2) is more by need, while (1) is more out of convenience. |
22:45 |
masak |
and (1) doesn't hold for methods, since they'll be visible anyway. |
22:45 |
colomon |
What you're doing is asking for exterior visibility AND no context. |
22:45 |
masak |
but (2) might well hold. |
22:45 |
masak |
and the thing I just rakudobug-submitted will go away, and one'll just get an uninitialized variable. |
22:45 |
masak |
it could be a way to pass state between methods :) |
22:46 |
masak |
(not saying it'd be advisable, just that it'd fall out naturally as a possibility) |
22:46 |
masak |
man, at some point I'd like to give a talk just about all the weird things that fall out of lexical scopes... :) |
22:48 |
arnsholt |
It can be summed up in a single word, can't it? |
22:48 |
arnsholt |
"Awesome" =) |
22:48 |
masak |
:) |
22:49 |
masak |
well, it's such a simple idea, and yet it just keeps producing new crazy uses. |
22:49 |
masak |
closures? just a consequence of well-implemented lexical scoping. |
22:50 |
masak |
attributes hanging off the class? the class is a module, which is a lexical scope. |
22:51 |
colomon |
what happens if you define an interior method which overrides an exterior method? (other than my brain exploding.) |
22:51 |
masak |
overrides? as in 'multi'? |
22:51 |
masak |
if they're not multi, it's a class composition error. |
22:52 |
masak |
if they're multi, it should be fine and they should dispatch as normal multi methods do. |
22:52 |
|
drbean joined #perl6 |
22:52 |
masak |
in other words, nesting methods has no effect beyond the lexical scope that the inner method sees. |
22:55 |
masak |
rakudo: class A { method m0 { my $a; say $a; method m1 { $a = 1; method m2 { $a = 2; method m3 { $a = 3 } } } } }; given A.new { .m0; .m1; .m0; .m2; .m0; .m3; .m0 } |
22:55 |
p6eval |
rakudo 86bf4c: OUTPUT«Any()Any()Any()Any()» |
22:55 |
masak |
aww. :) |
22:55 |
masak |
rakudo: class A { method m0 { our $a; say $a; method m1 { $a = 1; method m2 { $a = 2; method m3 { $a = 3 } } } } }; given A.new { .m0; .m1; .m0; .m2; .m0; .m3; .m0 } |
22:55 |
p6eval |
rakudo 86bf4c: OUTPUT«Any()123» |
22:55 |
masak |
\o/ |
22:56 |
* masak |
wonders why the first one didn't work |
22:56 |
|
cosimo joined #perl6 |
22:56 |
arnsholt |
But the second one doesn't use lexical scope, though, does it? |
22:58 |
masak |
depends what you mean. $a is *stored* in a dedicated package scope, but it's looked up lexically, as usual. |
22:59 |
masak |
see http://strangelyconsistent.org/blog/where-in-the-world-is-the-package-lexpad for details. |
23:02 |
|
kaare_ left #perl6 |
23:02 |
|
plobsing left #perl6 |
23:02 |
|
dukeleto left #perl6 |
23:03 |
|
dukeleto joined #perl6 |
23:04 |
TimToady |
there's something terribly wrong about using a nested method as a closure; where does the cloned ref live? |
23:05 |
masak |
the cloned ref of what? the outer lexpad? |
23:05 |
masak |
why is the situation any worse than with ordinary closures? |
23:09 |
TimToady |
ordinary closures only live as long as the ref to their clone; that's how you can have multiple clones at once |
23:09 |
TimToady |
if you don't return the pointer to the clone, it can be GC'd immeidately |
23:10 |
TimToady |
where's the pointer to the inner method clone being put? where does the next one go? |
23:11 |
TimToady |
if you do return a pointer to a cloned "method", it really is just a closure that happens to bind the current outer self |
23:11 |
TimToady |
and happens to have a method signature |
23:11 |
masak |
there has to be a static lexpad for each method anyway, right? I just thought of the lexpads as continuations of those. |
23:12 |
masak |
i.e. each method has exactly one lexpad, shared across all objects of that class. |
23:12 |
TimToady |
static lexpads to not make closures |
23:13 |
TimToady |
*do |
23:13 |
masak |
no, my point was just that there would be some lexpad for each method. |
23:13 |
|
plobsing joined #perl6 |
23:13 |
masak |
even when that particular method wasn't running. |
23:14 |
masak |
not that I'm convinced of that myself. |
23:15 |
masak |
but the natural followup to "this shouldn't work" is "how should it be prevented?" |
23:15 |
TimToady |
note that a static 'my' isn't initialized at compile time |
23:15 |
TimToady |
not unless you say BEGIN my $x = 42 |
23:15 |
masak |
nod. |
23:17 |
masak |
I'm just saying that there's nothing *a priori* wrong with 'class A { method foo { my $lexical; method bar { say $lexical } } }' |
23:17 |
masak |
if .bar is called before .foo, the reference goes to the static lexpad of .foo |
23:17 |
TimToady |
yes, other than that it's going to confuse most people completely |
23:18 |
masak |
no argument there. |
23:18 |
masak |
the current hat I'm wearing is "should this work, and how?" |
23:19 |
|
plobsing left #perl6 |
23:19 |
|
szabgab left #perl6 |
23:19 |
|
szabgab joined #perl6 |
23:20 |
TimToady |
a more interesting question is if you say "return method bar", is the method curried on the current self? |
23:21 |
masak |
sounds like too much magic to me. |
23:22 |
TimToady |
"should this work, and how?" :P |
23:22 |
|
felliott left #perl6 |
23:22 |
masak |
I mean, it should return the value that 'method bar' would have had in any other context. |
23:22 |
masak |
I don't see why it particularly should matter that there is a return in the AST attic. |
23:23 |
|
shi left #perl6 |
23:24 |
masak |
rakudo: class A { method foo { return method bar { say "OH HAI ", self } } }; my $a = A.new; my $method-bar = $a.foo; say $method-bar.WHAT; $method-bar($a) |
23:24 |
p6eval |
rakudo 86bf4c: OUTPUT«Code()OH HAI A()<0x3d2e8b8>» |
23:25 |
masak |
already works. :) |
23:25 |
masak |
as to "how?", I'm arguing for "like that". |
23:29 |
|
felliott joined #perl6 |
23:29 |
masak |
being brutally honest and very un-magical about self being the (sometimes implicit) first parameter of methods feels, to me, like a very Perlish thing to do. |
23:31 |
TimToady |
and we can always do the other thing with a normal closure, assuming 'self' closes over the outer method |
23:31 |
masak |
that's what I usually do when I need the other thing. |
23:32 |
masak |
I remember doing it in 2008 for November ;) |
23:32 |
|
eternaleye joined #perl6 |
23:32 |
|
eternaleye left #perl6 |
23:32 |
|
eternaleye joined #perl6 |
23:33 |
|
felliott left #perl6 |
23:33 |
masak |
rakudo: class A { has $.v = 42; method foo(&c) { c("OH HAI") } }; A.new( :v(42) ).foo( -> $greeting { say $greeting, self.v } ) |
23:33 |
p6eval |
rakudo 86bf4c: OUTPUT«===SORRY!===Symbol 'self' not predeclared in <anonymous> (/tmp/79GjW45_a_:22)» |
23:34 |
masak |
:) |
23:34 |
masak |
rakudo: class A { has $.v = 42; method foo(&c) { c("OH HAI") } }; A.new( :v(42) ).foo( method($greeting) { say $greeting, self.v } ) |
23:34 |
p6eval |
rakudo 86bf4c: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22» |
23:35 |
masak |
rakudo: class A { has $.v = 42; method foo(&c) { c(self, "OH HAI") } }; A.new( :v(42) ).foo( method($greeting) { say $greeting, self.v } ) |
23:35 |
p6eval |
rakudo 86bf4c: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22» |
23:40 |
masak |
rakudo: class A { has $.v = 42; method foo(&c) { c(self, "OH HAI") } }; A.new( :v(42) ).foo( method ($greeting) { say $greeting, self.v } ) |
23:40 |
p6eval |
rakudo 86bf4c: OUTPUT«OH HAI42» |
23:40 |
masak |
\o/ |
23:41 |
|
ofir left #perl6 |
23:44 |
masak |
rakudo: sub method($method) { say $method($method) }; method(method {}); say "alive" |
23:44 |
p6eval |
rakudo 86bf4c: OUTPUT«alive» |
23:50 |
|
whiteknight joined #perl6 |
23:55 |
|
felliott joined #perl6 |