»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:00 masak left 00:01 s1n joined 00:03 stkowski left 00:04 ymasory left 00:06 VXZ left 00:08 rgrau left 00:15 plobsing joined 00:30 coldhead left 00:35 coldhead joined 00:37 impious joined 00:39 whiteknight joined 00:44 shi left 00:54 wiseguyxp joined 01:03 felliott left 02:03 wiseguyxp left, noganex left 02:05 noganex joined 02:12 impious left 02:18 am0c joined 02:21 eternaleye left, eternaleye joined 02:30 leprevost left 02:41 wiseguyxp joined 02:46 wiseguyxp left
sorear good * #perl6 02:49
TimToady chow 02:50
coldhead LAKSA! 02:53
sorear TimToady: Why isn't <|s> spelled <?boundS> ? 02:56
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.
TimToady sorear: too long 03:00
03:02 whiteknight left 03:04 felliott joined 03:17 felliott left 03:19 ryan_ left
colomon sorear: what is the context on .coordinates? (Agree completely about C over R, of course.) 03:28
TimToady irclog.perlgeek.de/perl6/2011-02-09#i_3269388 03:35
sorear colomon: Complex.reals name replacement bikeshedding
colomon ah.
the discussion seems to completely miss the fact that Complex.reals is the Complex implementation of Numeric.reals. 03:36
TimToady and down at 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.
TimToady why is Numeric.reals called .reals? 03:38
colomon moritz_++ understands.
because it expresses the Numeric object as a series of Reals. 03:39
a better name would be great.
.values seems like it's on the right track. 03:40
03:42 dukeleto left, dukeleto joined
TimToady sorear: I tried rebooting viv, but it didn't quite work for me. maybe you'd have better luck... 03:50
colomon hmmm.... though I suppose .coordinates is a sort of valid interpretation, depending on dimension. :) 03:51
TimToady it's pretty good huffman coding too :) 03:52
sorear TimToady: I'll take a look later; how did it fail? 03:54
TimToady 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
TimToady yes, go fer it 03:56
03:57 satyavvd joined
sorear TimToady: what was your position on the proper place of EXPR again? 03:58
colomon afk # bed, but hey, I'd go for .coordinates 03:59
TimToady sorear: I've lost the context of the question
sorear TimToady: does method EXPR { ... } belong in the setting? 04:00
TimToady well, a lot of what is in STD really belongs in the setting eventually, like most of the operator defs 04:01
but I'm not sure about EXPR; it seems more central to how STD grammars work
sorear Now that niecza supports loop labels I can probably bring its EXPR a lot closer to the official version 04:06
(it's implemented as a state machine now, in a "if and while are universal" sort of way)
04:12 nrr left 04:13 nrr joined 04:23 Su-Shee_ joined 04:27 Su-Shee left 04:40 mtk left 04:52 mtk joined 04:59 wiseguyxp joined 05:19 envi joined 05:20 meteorjay joined 06:09 lopaway left 06:13 lopaway joined 06:14 agentzh joined 06:17 eternaleye left, eternaleye joined 06:31 kjeldahl left 06:36 brill left 06:39 justatheory left 06:40 Mowah joined 06:44 kaare_ joined 06:48 brill joined 06:49 eternaleye left, eternaleye joined 07:06 dukeleto left 07:07 dukeleto joined 07:14 wtw joined
sorear out 07:20
07:23 wiseguyxp left 07:24 kfo joined 07:28 kfo_ left 07:49 bacek joined, vutekija joined 07:53 Su-Shee_ is now known as Su-Shee, bacek left 07:54 vutekija left, kjeldahlw joined, cosimo left
dukeleto o/ 07:55
08:00 rupert joined
moritz_ \o 08:09
08:09 bacek joined 08:14 shi joined 08:18 nadim_ left 08:19 nadim joined 08:22 bacek left 08:30 rupert left 08:34 bacek joined 08:36 eternaleye left 08:43 eternaleye joined 08:44 eternaleye left, eternaleye joined
apejens moritz_: is the code for the irc log bot available? 08:49
sjohnson oh shit yeah 08:50
github.com/moritz/hugme/blob/master/hugme.pl
oh.. log bot. oops 08:51
apejens it seems ilbot might be it :) 08:52
thanks
sjohnson :3 08:53
moritz_ apejens: it is 08:55
sjohnson thats the first thing i've done right for #perl6 08:56
08:57 kjeldahlw left 09:02 sji joined 09:04 shi left 09:06 shi joined 09:07 sji left 09:14 woosley joined 09:19 am0c left 09:31 dakkar joined 09:33 am0c joined 09:34 daxim joined 10:07 am0c left 10:33 mtk left
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:49
moritz_ with COMEFROM? :-) 10:50
anyway, my condolences
flussence COMEFROM fryingpan
moritz_ sits over a set of coupled differential equations 10:51
11:04 masak joined
masak lol hai zebras 11:04
phenny masak: 02:57Z <sorear> tell masak I support ".coordinates". C is a vector space over R.
masak I can live with that. very Descartes.
as long as we don'e spell it .coördinates :P 11:05
11:06 woosley left 11:10 fIorz is now known as florz
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:14
moritz_ .values is SOOO BAD 11:15
it makes a single-item list behave differently from the item
masak well, we have that in other corners of the model as well. 11:17
.say works totally different for an IO than for anything else.
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.
flussence (1+2i).«<re im> 11:19
moritz_ just not .values please :-) 11:20
masak: note that .say breaks a different assumption than .values
and so far we have been very careful not to break the assumption behind single-item lists
masak granted. 11:22
yes, I see the risk with using .values
.coords, p'haps. 11:23
moritz_ wfm
11:23 jedai left 11:25 jedai joined 11:41 satyavvd left 11:45 redicaps joined 11:46 maja joined, maja left 11:47 maja joined 12:11 eternaleye left 12:20 Trashlord left, Trashlord joined 12:36 awoodland left 12:42 bluescreen joined 12:58 redicaps left
takadonet morning all 13:02
13:04 MayDaniel joined 13:05 agentzh left
dalek kudo: 86bf4cc | bacek++ | / (4 files):
Add write barriers to work on generational_gc parrot branch

Since master now has a noop write barrier macro too, this does not disrupt operation on parrot/master
Also bumps PARROT_REVISION to ensure safe operation on parrot/master
Signed-off-by: Moritz Lenz [email@hidden.address]
13:07
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
[Coke] bacek++ 13:15
13:15 felliott joined
moritz_ indeed bacek++ 13:16
13:18 wolfram_ joined
masak morning, takadonet. 13:20
takadonet masak: how are u?
masak takadonet: liking my new $dayjob. busy but satisfied. and u? 13:21
takadonet busy as freaking hell and freezing 13:22
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?
wolfram_: if it's indeed only half a circle, it's a bug (or I thoroughly misunderstand complex math)
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),
..Complex.new(-1.83697019872103…
flussence those seem to form a whole circle to me...
wolfram_ moritz_: .roots are on a full circle. FFT needs only half circle 13:25
moritz_ wolfram_: ah, then I misunderstood what you wrote
flussence .grep(*.im >= 0) ?
moritz_ flussence: that's still throwing away half of the calculated values
flussence hm, yeah.
tadzik rakudo: 4/6 == 2/3 13:26
p6eval rakudo 03380c: ( no output )
tadzik rakudo: say 4/6 == 2/3
p6eval rakudo 03380c: OUTPUT«Bool::True␤»
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
wolfram_ But a comment might mend this: (^@odd »*» (2 * pi / @_))».cis; # cis = cos + i sin 13:28
13:30 jimbob joined
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_ :-)
masak not only for that reason :) 13:31
I like the FFT theory because of the pretty graphs.
moritz_ have you ever seen a fourier transformed cat? :-) 13:32
masak once. a horrible sight.
wolfram_ ??
masak wolfram_: xkcd.com/26/
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""
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
masak aww :/ 13:35
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
...crap
moritz_ tadzik: is that on a fresh version of the branch?
yesterday it segfaulted for me too 13:38
tadzik moritz_: nah, like 3 commits ago
or 6? I can't pull from git on my uni
13:38 MayDaniel left
tadzik well, I can httppull 13:38
moritz_ urks
the only thing that's blocked here is SMTP
I can live with that 13:39
13:39 drbean left
tadzik well, the only things that are not blocked here is ssh, http and email-related things 13:40
moritz_ if ssh is open, nearly everything is open :-) 13:41
by the power of tunneling
tadzik yeha
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:42
13:44 satyavvd joined
zenog Hi guys, another stupid beginner's question: What is wrong with the following code? nopaste.info/4a3ac4887a.html 13:53
I get "Invalid namespace key of type 'P6opaque' in get_pointer_keyed" 13:54
... which does not tell me too much.
moritz_ I think you need to call self!private($a, 'hello') 13:55
and it could be that class Class already exists, and gives you a weird error
rakudo: class Class { }
p6eval rakudo 03380c: ( no output )
moritz_ hm
zenog Ah I thought that self.!private was needed, got another weird message for that ... 13:56
moritz_: Thank you.
moritz_ rakudo: class Class { method public($a) {self!private($a, 'hello') }; method !private($a, $b) { say "$a says $b" } }; Class.new.public('Zeno')
p6eval rakudo 03380c: OUTPUT«Invalid namespace key of type 'P6opaque' in get_pointer_keyed␤ in main program body at line 22:/tmp/RmHUBlYRGq␤»
moritz_ huh.
zenog moritz_: bug? 13:57
moritz_ zenog: bug!
zenog moritz_: rename to "MyClass" does the job.
but of course it would be nice if rakudo reported that the class already exists ;-) 13:58
masak submits rakudobug
moritz_ rakudo: say Class
p6eval rakudo 03380c: OUTPUT«Could not find sub &Class␤ in main program body at line 22:/tmp/sLFryh8fGF␤»
masak dåligt.
zenog masak: great, thank you!
moritz_ rakudo: class Class { }; say Class.new
p6eval rakudo 03380c: OUTPUT«Invalid namespace key of type 'P6opaque' in get_pointer_keyed␤ in main program body at line 22:/tmp/kRxQkfD1oU␤»
moritz_ maybe a parrot PMC leaking 13:59
rakudo: say pir::new('Class')
masak supposedly.
p6eval rakudo 03380c: OUTPUT«␤»
masak moritz_++
moritz_ rakudo: say pir::new('Class').PARROT
p6eval rakudo 03380c: OUTPUT«Method 'PARROT' not found for invocant of class 'Class'␤ in main program body at line 22:/tmp/FYrmXOgzIq␤»
moritz_ rakudo: say pir::typeof(pir::new('Class'))
p6eval rakudo 03380c: OUTPUT«Class␤»
moritz_ rakudo: class ResizablePMCArray { }; say ResizablePMCArray.new 14:00
p6eval rakudo 03380c: ( no output )
masak zenog++ # finding a new kind of bug 14:02
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
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
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
How would I express that in Perl 6?
14:07 colomon left
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
masak zenog: see S12 for lots of details. 14:07
moritz_ and S06 for the signatures etc.
14:08 colomon left
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.?
masak: cool
masak zenog: exactly.
14:08 colomon joined
masak zenog: you'll want to get a handle on how the multiple dispatch works and when it will fail. 14:08
zenog: one of jnthn++'s talks might be a good way to learn this.
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
masak jnthn.net/articles.shtml
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
moritz_ the "signatures, the full story" is a very good talk
masak moritz_: 'runtime at the latest, compile-time when you can'
or s/at the latest/when you must/ for increased symmetry :)
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
so for understanding, that approach is better
14:10 plobsing left
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.
moritz_ about which a user needs to know nothing 14:11
masak moritz_: agreed on all counts.
moritz_: but zenog was requesting compile-time if possible.
wolfram_ rakudo: say 180.to-radians
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␤»
moritz_ rakudo: class Role { }; say Role.new
wolfram_ How's that supposed to work?
p6eval rakudo 03380c: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'Role'␤»
colomon rakudo: say 180.to-radians(Degrees) 14:12
p6eval rakudo 03380c: OUTPUT«3.14159265358979␤»
colomon rakudo: say 180.to-radians(Gradians)
p6eval rakudo 03380c: OUTPUT«2.82743338823081␤»
masak I wouldn't mind if Degreed was assumed there.
*Degrees 14:13
moritz_ and .to-degrees defaulting to Radians?
masak yeah.
those are by far the most frequent two, IMO.
moritz_ agreed
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.
zenog: right.
rakudo: class A { method foo {}; method foo {} }
p6eval rakudo 03380c: ( no output )
masak :/
std: class A { method foo {}; method foo {} }
p6eval std 625303c: OUTPUT«ok 00:01 118m␤»
masak o.O
TimToady: ^^
14:15 satyavvd left
moritz_ it's fine for STD not to complain 14:15
that's a check that the MOP should do for you
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
masak moritz_: fair enough.
zenog masak: Currently, there is a runtime error, but no compile-time error.
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?
masak zenog: since the MOP composes the class at compile time, it should be possible to make that a compile-time error.
flussence more descriptive than a .to-whatever
PerlJam good now #perl6 14:17
masak PerlJam: \o
14:17 fhelmberger joined
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
PerlJam assuming ints are radians sounds completely wrong to me.
And for exactly the reason that wolfram_ just said 14:18
colomon PerlJam: indeed
PerlJam (even though that wasn't his intent :)
14:18 stifynsemons joined
PerlJam also, IMHE, radians aren't usually integer :) 14:18
wolfram_ Compex exp, .polar etc. are all in radians 14:19
flussence PerlJam: I had to make at least one stupid mistake today :)
moritz_ making the default dependent on the exact type would be so very wrong
wolfram_ So on a comuter I would always assume to-degree to imply from radians
PerlJam flussence: it wasn't a mistake, you were vetting an idea that brought other ideas into relief :) 14:20
wolfram_: that doesn't sound right either 14:21
moritz_ can very easily understand that POV
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
wolfram_ colomon: tried to leave a comment about that on your blog months ago. Never appeared. do you censor? :-)
masak good morning, pm
moritz_ good am, pm
colomon wolfram_: I don't censor, but I don't always approve things that get flagged as potential spam, either. 14:23
If you commented in the midst of the great spam comment attack of '10, it's entirely possible I missed approving it.
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
colomon flussence: that one's trivial, if spelled properly. :) 14:25
wolfram_ colomon: Your blog post is from April 2010. Comment came briefly aferwards.
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␤»
wolfram_ But technical problems with company environment or browser or... are equally possible
pmichaud note that Degrees => Radians would be a named argument 14:28
moritz_ colomon: that Pair is a named argu... what pm said
pmichaud might want parens
colomon yes, I worked that out
Is there an easy way to work around that?
pmichaud work around what?
moritz_ (Degrees) => Radians I guess
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)
p6eval rakudo 03380c: OUTPUT«3.14159265358979␤»
colomon parens sort of uglify the sub, though
14:30 pmurias joined, felliott left
colomon oh, wacky. there appear to be all sorts of interesting comments caught in my spam filter. :( 14:31
14:31 plobsing joined 14:33 kaare_ left, felliott joined
colomon though I don't see anything as far back as April. Sorry, wolfram_ 14:38
14:44 felliott left
wolfram_ colomon: Never mind. It was about the same things i just said here. 14:47
Ans now that you are aware of the problem, i might have better chances with future comments ;-) 14:49
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.
moritz_ yep, the number system in general was completely unusable before colomon++ came along and fixed it :-) 14:53
14:54 awoodland joined 14:56 mkramer left 14:59 mtk joined
sorear good * #perl6 15:01
takadonet sorear: hey 15:02
sorear zenog: hi 15:04
15:04 shi left, Trashlord left 15:05 wtw left
zenog sorear: hi. did not have time to work on the decimal stuff, sorry. 15:05
15:06 kaare_ joined
sorear zenog: do you still want to do it? 15:10
15:10 mtk left, masak left 15:11 kaare_ left
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:13
15:15 mtk joined 15:17 benabik joined 15:18 benabik left, benabik joined 15:19 kaare_ joined
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
wolfram_ acoth vs. acotanh: 54,400 to 1,130 results on google and 129,000 to 160 results on google codesearch 15:23
moritz_ Mathematica uses ArcCoth 15:24
zenog sorear: OK, great ;-)
moritz_ tries to recall if he ever actually used that function...
wolfram_ And of course there is 'arcoth' -- just found out that's what Bronstein-Semendjajew uses ;-)
15:25 mkramer joined
moritz_ isn't there a difference between the 'a' and 'ar' variants? 15:25
wolfram_ moritz_: I'm not sure I ever used it. I just try to stress some Complex trig identities. 15:26
moritz_ wolfram_: feel free to add them as test cases to the roast repo 15:27
wolfram_: do you already have commit access?
wolfram_ moritz_: no, and maybe I should not have. I don't know git and I spend too much time on this already. 15:29
moritz_ wolfram_: your choice 15:30
15:30 plobsing left 15:31 plobsing joined
wolfram_ I'll ask here if I feel like doing something like that. 15:32
sorear Should X[] and Z[] contain controllable loops? 15:34
moritz_ sorear: you mean controllable by next() etc? 15:35
I'm inclined to say "no", but it's just a gut feeling 15:36
tadzik /o\ 15:37
tadzik has 49.5 points from electronics, 50 passes
moritz_ ouch 15:38
arnsholt I'd say making the X and Z metaops is a bad idea
Too much potential for magic code
15:38 masak joined 15:45 plobsing left, wolfram_ left 15:47 aesop left
sorear arnsholt: too late, they already are 15:48
arnsholt Oh well =) 15:49
15:51 felliott joined 15:52 wiseguyxp joined 15:57 bluescreen left 16:01 justatheory joined 16:10 envi left 16:11 plobsing joined, alester joined 16:12 ashleydev left 16:14 Patterner left 16:16 ymasory joined
flussence can a module :auth<> have multiple values? 16:16
16:17 Psyche^ joined, Psyche^ is now known as Patterner 16:18 wiseguyxp left 16:19 aesop joined 16:20 ashleydev joined, risou joined
masak flussence: it can, at least in theory. don't know what that would signify, though. 16:21
16:22 Alias_ left
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:22
moritz_ :auth<github.com/rakudo/> ? 16:23
or even rakudo/rakudo
flussence yeah, I guess that works
TimToady morning, Xebras and Zebras 16:31
zenog Shouldn't be try.rakudo.org/ be linked from the main page of perl6.org?
Maybe below the download button? There isn't a better prove of the actual availability of Perl 6 ... 16:32
masak +1 16:33
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...
might be fixed now, actually... 16:35
benabik Hm. The tutorial on try.rakudo.org has some funny formatting: "Example: (,10,\-,2,),\*,4" 16:36
16:37 Sarten-X left
flussence oof. not sure how that happened... 16:38
oh, some idiot wrote "example" twice instead of "match" in the json file... :) 16:39
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...
ok, tutorial should show up correct now. 16:44
(still needs more content, mind you)
16:45 Sarten-X joined
flussence (if it's still broken, force-refresh try.rakudo.org/js/chapters/1.js in the browser) 16:46
benabik flussence: WORKSFORME 16:47
flussence I need to get a non-ancient version of rakudo onto there some time too... :/ 16:48
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:52
moritz_ you can also scp a built parrot, if you preserve paths and the platform is the same 16:53
TimToady I have not strong prefs between ceiling and ceil 16:54
16:54 molaf joined
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
TimToady maybe we should shorten floor to floo, or flo 16:55
moritz_ rakudo: say 0.6.Int 16:56
p6eval rakudo 86bf4c: OUTPUT«0␤»
moritz_ .Int is shorter than .ceil after all :-)
TimToady point
same keystrokes
flussence that's why we need native types :)
moritz_ hey, our strings need .keystrokes methods :-) 16:57
TimToady and .pixelwidth
flussence (argh!)
masak .floor and .Int are only the same for non-negative numbers.
moritz_ rakudo: say (-0.6).Int
p6eval rakudo 86bf4c: OUTPUT«0␤»
moritz_ correct 16:58
masak i.e. don't use .Int instead of .floor unless your domain only contains non-negative numbers.
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␤»
moritz_ rakudo: say (3+4i).floor
p6eval rakudo 86bf4c: OUTPUT«floor is only defined for Reals, you have a Complex()␤»
moritz_ rakudo: say (3+4i).round
p6eval rakudo 86bf4c: OUTPUT«round is only defined for Reals, you have a Complex()␤»
moritz_ rakudo: say (3+4i).squared
p6eval rakudo 86bf4c: OUTPUT«Method 'squared' not found for invocant of class 'Complex'␤ in main program body at line 22:/tmp/_UxDCsBefr␤»
masak .squared? :) 17:00
moritz_ my bad, should be .square
in correspondence to .round
or maybe .angled
masak .pointy 17:01
moritz_ -haired-boss 17:02
17:04 cotto_work left, ymasory left 17:05 cotto_work joined, orafu left, cotto_work left 17:07 cotto_work joined, cotto_work left, cotto_work joined
masak rakudo: sub pointy-haired-boss { .chr for 39, 111, 39 }; say pointy-haired-boss 17:07
p6eval rakudo 86bf4c: OUTPUT«'o'␤» 17:08
17:08 cotto_work left, spq joined, cotto_work joined
moritz_ pointy-haired boss with list comprehension! \o/ 17:08
17:09 cotto_work left 17:15 dual left
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/
moritz_ parallelizable, even though they are lazy? 17:16
TimToady lazy is only mostly lazy, batches are still allowed
moritz_ right
17:16 cotto_work joined
TimToady we do need to come up with a way to recognize those constructs that require strict laziness to work, however 17:17
17:17 cotto_work left
TimToady self-referential lazy lists tend to be that way 17:17
17:17 cotto_work joined, cotto_work left
TimToady maybe data-flow can force that though 17:17
17:19 colomon left, mj41 left 17:24 MayDaniel joined
moritz_ .u 􏿽xE2􏿽x84􏿽xA6􏿽xCE􏿽xB7 17:26
phenny U+2126 OHM SIGN (􏿽xE2􏿽x84􏿽xA6)
U+03B7 GREEK SMALL LETTER ETA (η)
arnsholt There's a separate ohm sign? *sight* 17:27
-t
moritz_ "of course"
arnsholt It's Unicode, after all. Shoulda guessed =) 17:28
moritz_ they even have www.fileformat.info/info/unicode/ch.../index.htm
17:28 ymasory joined
tadzik omg 17:28
Unicode is kind of silly with all this characters
17:29 ymasory left
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
masak arnsholt: Unicode bases its characters around different *meanings*, not around different aspects. 17:29
arnsholt Yeah, I keep expecting it to conform to my ideas of reasonable =)
17:29 rgrau joined
arnsholt Yeah, it does make sense, on some level 17:29
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?
tadzik or maybe I shouldn't say that
arnsholt It's a bit handwavy at times
pmichaud .u 蝶
masak .u ampere
phenny U+8776 CJK UNIFIED IDEOGRAPH-8776 (蝶)
masak: Sorry, no results for 'ampere'.
pmurias sorear: do you plan do focus on spec tests in the near future? 17:31
17:31 cotto_work joined
tadzik .u tadzik 17:31
phenny tadzik: Sorry, no results for 'tadzik'.
17:31 cotto_work left
[Coke] .u coke 17:35
phenny [Coke]: Sorry, no results for 'coke'.
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
[Coke] WOT!?
17:35 cotto_work joined, cotto_work left
tadzik .u meth 17:36
phenny tadzik: Sorry, no results for 'meth'.
TimToady also, lazy lists can often be pipelined 17:37
17:38 daxim left 17:43 mj41 joined 17:45 MayDaniel left, slavik1 left 17:48 cotto_work joined, cotto_work left 17:52 cotto_work joined, slavik1 joined, cotto_work left, gbacon left 17:54 gbacon joined 17:56 cdarroch joined, cdarroch left, cdarroch joined
[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
I assume he means mini-cami.
12:57 <@cotto_work> I'd be surprised if that were the problem, but I can connect to other channels just fine. 17:57
17:58 cotto_work joined, cotto_work left
flussence huh. 17:59
[Coke] nevermind. he can connect to #parrot with camelia in the topic.
18:00 cotto_work joined, cotto_work left 18:01 cotto_work joined, cotto_work left, colomon joined 18:02 risou left, cotto_work joined, cotto_work left, cotto_work joined, cotto_work left 18:04 flussence_ joined
flussence_ well, xchat works here... 18:04
18:04 flussence_ left
flussence I've had some less-than-fun character encoding crashes from it before though 18:05
Tene iirc x-chat can have different encoding settings per-network 18:06
18:06 dakkar left
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␤»
zenog colomon: I have continued fixing the perl 6 from two days ago: nopaste.info/8bf9b0fced.html It runs now without error message, but still contains numerical bugs that I am currently hunting ... 18:08
18:09 cotto_work joined
colomon zenog: I'll take a look when I get a chance here. 18:09
18:09 cotto_work left 18:18 impious joined, impious left
zenog colomon: no hurry ;-) 18:21
18:21 dukeleto left 18:22 dukeleto joined, ymasory left 18:23 molaf left 18:28 shi joined, ymasory joined 18:31 cafesofie left 18:32 awoodland left 18:36 M_o_C joined
bbkr i think i've found what's causing socket bug: rt.perl.org/rt3/Ticket/Display.html?id=83866 , probably also 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:36
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␤»
bbkr now works :)
18:39 M_o_C left 18:41 stkowski joined 18:42 cafesofie joined 18:45 icwiener joined 18:47 mtk left 18:48 mtk joined 18:50 pmurias left 19:04 Trashlord joined 19:05 colomon left
PerlJam bbkr++ 19:05
19:09 ymasory left 19:13 [particle] left 19:15 [particle] joined
PerlJam bbkr: were you going to submit a patch to change the default for $family? 19:16
19:22 mkramer left, ymasory joined 19:30 _jaldhar left 19:32 cotto_work joined, cotto_work left, ymasory left 19:40 _jaldhar joined 19:43 colomon joined 19:45 ymasory joined
masak reads 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
as the first in a series of four, no less.
19:52 mkramer joined 20:03 Sarten-X left 20:11 Sarten-X joined 20:17 fhelmberger left 20:21 MayDaniel joined 20:26 mikehh joined 20:29 Sarten-X left 20:37 Sarten-X joined, dual joined 20:40 awwaiid joined 20:47 jevin joined 20:54 MayDaniel left 21:19 plobsing left 21:23 benabik left 21:34 Mowah left
sjn masak: www.goopen.no/program/ 21:46
masak looks 21:49
looks good \o/ 21:50
arnsholt Oooh. I should try to attend that
masak arnsholt: it'd be very nice to meet again.
arnsholt Whoa. 'Cept I can't afford the attendance fee 21:51
4 kilo-NOK is a bit outside my budget
masak that does seem a bit steep, yes. 21:52
diakopter USD?
masak phenny: 4000 NOK to USD? 21:53
guess not.
diakopter phenny: .g 4000 NOK to USD
heh
21:53 VanDamas joined
masak VanDamas: hello! Lithuania? 21:54
masak , newbie accoster 21:56
21:56 VanDamas left
diakopter hrm 21:56
flussence meep.
masak some newbies don't respond well to accosting.
tadzik hugme: hug freenode 21:57
hugme hugs freenode
flussence it's aliiiiiiiive
sbp .c 4000 NOK in USD 21:58
phenny 685.94 U.S. dollars
sbp the .c command is the Google Calculator
and that's the currency conversion syntax
masak sbp++
22:03 Lorn left
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:03
slavik1 sounds fun 22:05
masak hugme: hug flussence 22:07
hugme hugs flussence
flussence oh well, my netbook's doing a fair job of pretending to be a desktop... just slower. 22:08
22:14 plobsing joined 22:24 Sarten-X left
masak std: class A { method foo { method bar {} } } 22:25
p6eval std 625303c: OUTPUT«ok 00:01 118m␤»
masak rakudo: class A { method foo { method bar { say "OH HAI" }; self.bar } }; A.new.foo 22:26
p6eval rakudo 86bf4c: OUTPUT«OH HAI␤»
masak tries to think of a situation where he would actually want to nest named methods... 22:27
colomon it doesn't seem that far-fetched. 22:31
masak it's certainly consistent that it works.
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.
it's so convenient.
colomon errr.... though can a sub inside a method see everything the method can anyway?
22:32 Sarten-X joined
flussence that's how closures work, isn't it? 22:33
masak yes.
colomon: hm... the lexical nesting might actually be a reason for nesting the methods... :)
rakudo: class A { method foo { my $a = 42; method bar { say $a } } }; given A.new { .foo; .bar } 22:34
p6eval rakudo 86bf4c: OUTPUT«42␤»
masak rakudo: class A { method foo { my $a = 42; method bar { say $a } } }; given A.new { .bar }
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␤»
masak submits rakudobug
I suspected that might happen :P
colomon oh, now that's an interesting question. should the top scope even be able to see .bar? 22:35
I would have thought no.
masak oh, the top scope sees .bar 22:36
it's just that at the point .bar is called, if .foo hasn't been called, $a contains a Null PMC.
colomon because it's a method, not a sub?
masak because the lexpad in .foo has never been visited, and thus is not active. 22:37
this'll all be fixed when we have static lexpads.
colomon no, my question / answer was about visibility.
masak the visibility of .foo and .bar is the same.
because they are methods.
they both register with the class. 22:38
colomon to me, that argues that nested methods should be illegal
masak it doesn't to me, but go ahead.
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:39
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....
masak sure, if you declare them as 'is export'. 22:42
I'm sorry, but I don't really see the problem.
22:43 ymasory left
colomon Trying to restate it, I understand two reasons for nested subs: 22:43
1) Interior sub is a handy utility for the exterior sub, but shouldn't be visible to the outside world.
masak s/shouldn't/needn't/, but yes.
colomon 2) Interior sub needs the context of the exterior sub. 22:44
masak right.
(2) is more by need, while (1) is more out of convenience.
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.
masak but (2) might well hold.
and the thing I just rakudobug-submitted will go away, and one'll just get an uninitialized variable.
it could be a way to pass state between methods :)
(not saying it'd be advisable, just that it'd fall out naturally as a possibility) 22:46
man, at some point I'd like to give a talk just about all the weird things that fall out of lexical scopes... :)
arnsholt It can be summed up in a single word, can't it? 22:48
"Awesome" =)
masak :)
well, it's such a simple idea, and yet it just keeps producing new crazy uses. 22:49
closures? just a consequence of well-implemented lexical scoping.
attributes hanging off the class? the class is a module, which is a lexical scope. 22:50
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'?
if they're not multi, it's a class composition error.
if they're multi, it should be fine and they should dispatch as normal multi methods do. 22:52
22:52 drbean joined
masak in other words, nesting methods has no effect beyond the lexical scope that the inner method sees. 22:52
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()␤»
masak aww. :)
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 }
p6eval rakudo 86bf4c: OUTPUT«Any()␤1␤2␤3␤»
masak \o/
masak wonders why the first one didn't work 22:56
22:56 cosimo joined
arnsholt But the second one doesn't use lexical scope, though, does it? 22:56
masak depends what you mean. $a is *stored* in a dedicated package scope, but it's looked up lexically, as usual. 22:58
see strangelyconsistent.org/blog/where-...age-lexpad for details. 22:59
23:02 kaare_ left, plobsing left, dukeleto left 23:03 dukeleto joined
TimToady there's something terribly wrong about using a nested method as a closure; where does the cloned ref live? 23:04
masak the cloned ref of what? the outer lexpad? 23:05
why is the situation any worse than with ordinary closures?
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
if you don't return the pointer to the clone, it can be GC'd immeidately
where's the pointer to the inner method clone being put? where does the next one go? 23:10
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
and happens to have a method signature
masak there has to be a static lexpad for each method anyway, right? I just thought of the lexpads as continuations of those.
i.e. each method has exactly one lexpad, shared across all objects of that class. 23:12
TimToady static lexpads to not make closures
*do 23:13
masak no, my point was just that there would be some lexpad for each method.
23:13 plobsing joined
masak even when that particular method wasn't running. 23:13
not that I'm convinced of that myself. 23:14
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
not unless you say BEGIN my $x = 42
masak nod.
I'm just saying that there's nothing *a priori* wrong with 'class A { method foo { my $lexical; method bar { say $lexical } } }' 23:17
if .bar is called before .foo, the reference goes to the static lexpad of .foo
TimToady yes, other than that it's going to confuse most people completely
masak no argument there. 23:18
the current hat I'm wearing is "should this work, and how?"
23:19 plobsing left, szabgab left, szabgab joined
TimToady a more interesting question is if you say "return method bar", is the method curried on the current self? 23:20
masak sounds like too much magic to me. 23:21
TimToady "should this work, and how?" :P 23:22
23:22 felliott left
masak I mean, it should return the value that 'method bar' would have had in any other context. 23:22
I don't see why it particularly should matter that there is a return in the AST attic.
23:23 shi left
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>␤»
masak already works. :) 23:25
as to "how?", I'm arguing for "like that".
23:29 felliott joined
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:29
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.
I remember doing it in 2008 for November ;) 23:32
23:32 eternaleye joined, eternaleye left, eternaleye joined 23:33 felliott left
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)␤»
masak :) 23:34
rakudo: class A { has $.v = 42; method foo(&c) { c("OH HAI") } }; A.new( :v(42) ).foo( method($greeting) { say $greeting, self.v } )
p6eval rakudo 86bf4c: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
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␤»
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␤»
masak \o/
23:41 ofir left
masak rakudo: sub method($method) { say $method($method) }; method(method {}); say "alive" 23:44
p6eval rakudo 86bf4c: OUTPUT«␤alive␤»
23:50 whiteknight joined 23:55 felliott joined