»ö« 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.
Tene prods jnthn 05:52
masak good morning, zebras! 07:10
masak is on a train
jdhore or are you ON A BOAT!? 07:11
masak I'm on a horse. 07:13
jdhore woot! meme fight! 07:15
masak I accidentally your meme fight. 07:17
dalek kudo: 39cbefe | worr++ | src/core/IO/Stat.pm:
Fixed some stat bugs

  - added isreg
  - added islnk
4cd9b96 | tadzik++ | src/core/IO.pm: Remove rm() as a duplicate of unlink(), but adopt its code into unlink()
07:18
masak dalek: wuss! 07:18
jdhore I made you a meme fight...but it eated it.
*i
masak oh wait, maybe not dalek's fault... 07:19
except in the sense that it caused the flood.
I made you a commit summary... but freenode eated it. :( 07:20
tadzik hello zebrae 08:11
mberends @zebrae.hello(); 08:13
masak .greet() for @zebrae;
tadzik how are you guys doing? 08:15
mberends exceedingly well :)
tadzik masak: are those new IO additions speced? 08:17
masak tadzik: I have no idea. I don't care much for the current IO spec. 08:19
tadzik fair enough
masak I figgered if it helps someone in their pragmatism, so much the better. 08:20
we'll need to do an overhaul at some point anyway.
tadzik I'm excited 'cos the whole File::Tools is useless now, and I didn't like that code anyway :) 08:20
masak :)
tadzik it will make My New Secret Project easier to deplo... Whoops! :)
masak :P 08:21
if we have a big setting, we might as well have the tools we want in it.
tadzik maybe it'll be good to hide then in some namespace, not to keep so many generally-named functions like move, copy etc? 08:22
mberends definitely. namespace pollution sucks. 08:23
masak oh, were they functions? I didn't realize.
thought they were methods on IO.
tadzik oh well
hmm
mberends shopping &
tadzik maybe I didn't realize :)
masak however, namespace pollution in Perl 6 is a smaller problem than in other languages.
since the whole setting is overridable.
even augmentable, thanks to multis \o/ 08:24
tadzik wow, gravatars scale quite well. I accidentally zoomed github 1000% or something, and they look very nice
masak Spotify as such is quite a fantastic piece of tech. on a train it feels miraculous. 08:31
snarkyboojum hello peeps 08:33
masak snarkyboojum! \o/
snarkyboojum masak-san! o/ 08:34
tadzik snarkyboojum! \o/
snarkyboojum heh
masak snarkyboojum: how are things over at your side?
snarkyboojum a bit crazy, but never a dull moment :D
you? 08:35
masak I figure I'll have dullness when I retire :P
snarkyboojum excellent attitude :)
masak so, yeah. same.
snarkyboojum tadzik: oh and hello!
started a new job which uses $java heavily :O
not sure whether that was the right move, but oh well 08:36
masak Java is kind of cute in its limitedness.
its lack of proper closures can hurt a bit sometimes.
snarkyboojum masak: I like that :) I'd add - "In a set-top box kind of way"
masak :P
snarkyboojum masak: my first exposure to java was in 1997 or so, and I'm pleased to say, I can still understand it heh 08:37
masak snarkyboojum: try to code Java like everything you wrote in it is a form of sarcasm. that might help :)
tadzik what is some good resource to learn Java?
snarkyboojum tadzik: the bruce eckel books used to be good
masak tadzik: the JLS is online; it's good, if a bit heavy. 08:38
tadzik: "Effective Java" is very, very good.
tadzik I didn't quite like the longness TBH (Thinking)
masak: as a start?
masak tadzik: for you, yes.
tadzik: I know you're not a beginner.
tadzik will investigate
snarkyboojum come to think of it, the Thinking in Java books might be a tad out of date now 08:39
nfi, but they were free at the time :)
masak tadzik: if you're ever curious about Java generics, there's a 20-page PDF online somewhere which covers them very well. the official tutorial for the Collections Framework is required reading, too. 08:40
tadzik well, about Thinking I was disturbed, for I didn't want to learn OOP from the ground up. I wanted to learn Java, and Eckel spend dozens of dozens of pages expalaining OOP on the example of a LightBulb
masak (also online and freely accessible)
snarkyboojum tadzik: that's true.. probably a little beginnerish, or a tad dry 08:41
masak tadzik: that's where "Effective Java" is good. it assumed you're familiar with OO languages, and just teaches you how to make good use of Java.
*assumes
tadzik cool
snarkyboojum sweet - might check it out myself 08:42
tadzik shame it's not in my library, or maybe translated
snarkyboojum tadzik: how goes ecosystem tools etc?
masak by extension, anything that Josh Bloch has touch has a sheen of quality to it.
touched*
tadzik snarkyboojum: that's the Secret Project :) 08:43
snarkyboojum tadzik: I'd noticed talk of such - sounds interesting :)
masak shucks. lots of electrical outlets on the train -- none of them works, it seems. :/ 08:58
moritz_ good morning 08:59
moritz_ S12 has one mention of SUPER:: 11:05
is that a fossile? 11:06
tadzik moritz_: seen the new IO additions? 11:27
moritz_ tadzik: yes 11:31
moritz_ wonders if File::Find should be turned into dir(:recursive)
tadzik moritz_: how do you feel about making those subs methods, to not polulute the namespace? 11:32
also, isn't rm a duplicate of unlink? 11:33
(with better code actually, but still)
I plan to mess with it a bit and push it as a branch to discuss
dalek: stop slacking off 11:52
kudo: 93cfad9 | tadzik++ | src/core/IO.pm:
Make the new IO subs methods, so they don't pollute the namespace. Also DRY in link() a bit
tadzik hmm, turns out I pushed to master (: 11:54
masak moritz_: yes, the 'SUPER::' in S12 is a fossil. (we've discussed it before) 12:34
masak` what's odd about it is that it seems to be aware of its replacements, 'nextsame' et al. 12:36
maybe there was a transition period during which both were spec'd.
tadzik moritz_: perlgeek.de/blog-en/perl-6/notes-fr...athon.html ~~ s/bee/be/ # unless it's a pun 12:56
tadzik phenny: tell masak have a pull request 13:20
phenny tadzik: I'll pass that on when masak is around.
tadzik rakudo: say foo for []; # insn't that wrong? 13:49
p6eval rakudo 93cfad: OUTPUT«Could not find sub &foo␤ in <anon> at line 22:/tmp/vzIiF6gvxv␤ in main program body at line 1␤» 13:50
tadzik leh
rakudo: say 'foo' for []; # insn't that wrong?
p6eval rakudo 93cfad: OUTPUT«foo␤»
flussence rakudo: say [].so 13:55
p6eval rakudo 93cfad: OUTPUT«Bool::False␤»
flussence dunno where that one loop comes from
rakudo: say $_.perl for [] 13:56
p6eval rakudo 93cfad: OUTPUT«[]␤»
flussence hm
rakudo: say $_.perl for [1..3]
p6eval rakudo 93cfad: OUTPUT«[1, 2, 3]␤»
flussence oh, it's treating the [] as a single item
that seems like how perl5 would handle [], I'm not sure it is wrong... 13:57
tadzik definitely not DWIM
flussence unless [] and () are supposed to be identical.
yeah, agree with that.
tadzik for does something "for each element of an array", imho 13:59
moritz_ note that [] is "an array in a scalar", not just "an array" 14:03
tadzik ok. Supposedly I have %hash = { foo => [] }; and I want to iterate over the elements of foo. How do I write the for so it does no iterations? 14:06
moritz_ no iterations? you don't write the for-loop :-)
tadzik :) 14:07
moritz_ rakudo: say .perl for { a=>1, b=> 2}
p6eval rakudo 93cfad: OUTPUT«{"a" => 1, "b" => 2}␤»
moritz_ that's a single iteration
tadzik example from the battlefield: a Module has a dependencies key, a module installer wants to install all the dependencies. Of course, when { dependencies => [] } there should be no iterations, no installations. But for $module<dependencies> will try to install an array [] 14:08
flussence [].list ?
tadzik not helping iirc
rakudo: say 'foo' for [].list; # insn't that wrong?
p6eval rakudo 93cfad: ( no output ) 14:09
tadzik hrm
maybe it is, and I'm wrong
nevermind then
moritz_ or s/list/flat/ for that matter 14:10
tadzik jnthn++ # Test::mock 14:20
tadzik moritz_: btw, what do you think about my last commits? 14:42
moritz_ tadzik: I've only checked the messages... methods seem fine to me 14:51
tadzik a'right 14:54
JimmyZ moritz_: github.com/rakudo/rakudo/pull/16, I just pull a request, please take a look when you are free. 16:03
moritz_ JimmyZ: I think I'd prefer it if didn't went away immediately, but rather threw a helpful error 16:05
JimmyZ: but I can do that on top of your commit
JimmyZ moritz_: great, thanks ;) 16:05
moritz_ (and it needs to be !*.defined in the undef error message) 16:06
JimmyZ yes, though I am not sure about it. 16:09
JimmyZ ponders someday he will be the release manager 16:19
BinGOs relgineer 16:20
dalek ast: 76534ab | moritz++ | S16-filehandles/ (4 files):
be less paranoid about the actual return value of unlink, just evaluate it in boolean context
17:51
kudo: 6437553 | moritz++ | t/spectest.data:
run two more test files
17:52
kudo: c2403f2 | zhuomingliang++ | src/ (6 files):
removed *.notdef

  (with small corrections from moritz_)
dalek kudo: a3df1e3 | moritz++ | build/PARROT_REVISION:
bump PARROT_REVISION for testing
18:19
dalek kudo: 41313b7 | tadzik++ | Configure.pl:
Use generational_gc. It's not good to get rid of the 4-% speedup
18:47
tadzik bleah, typo 18:47
at least 41313b7 looks nice 18:51
jdhore tadzik, what do you mean by: It's not good to get rid of the 4-% speedup ? 18:54
tadzik jdhore: without this commit, we weren't using Parrot's generational gc, which gives about 40% speedup to the spectest run 18:57
jdhore ah, I know those parts, i've never seen 40+% as 4-%
So I was thinking like 4%? -4% (made it 4% worse)?...what? 18:58
colomon tadzik: I thought we'd been using the new gc for about a week now? 19:03
tadzik colomon: nah, Parrot people made it optional rather than default 19:04
and I noticed that we didn't notice
colomon I thought we saw a 30% speed up then, though. 19:06
tadzik we did
for it was default for a while
in new PARROT_REVISION it's not
flussence ooh, faster spectest? time to see if I can beat my 7:30 time... 19:07
jdhore Actually, that's incorrect
moritz_++ just built his own parrot with gen_gc2 enabled for testing 19:08
tadzik moritz_: can you provide more details?
colomon is confused... 19:09
jdhore I say this because i actually looked at the entire commitdiff for the gen_gc2 branch merge and it specifically said that it did not set it as the default GC. 19:10
tadzik github.com/parrot/parrot/commit/e0...4f3cbfbdd4 19:11
jdhore that doesn't seem to be setting it to gms by default
or unsetting it FROM gms by default 19:12
moritz_ jdhore: when I bumped PARROT_REVISION to RELEASE_3_1_0-184-ga8596df, it sped up rakudo significantly
tadzik oh wait
github.com/parrot/parrot/commit/a81c3fc9b2435
jdhore moritz_, really? Just by bumping it?
tadzik looks like it is the default
jdhore ah
appears so 19:13
tadzik I'm tracking the parrot git log, Justin Case
or I'll just check this file on master
yeah, it's the default, my bad 19:14
tadzik reverts
moritz_ jdhore: well, I also needed to recompile parrot and rakudo... :-) 19:15
jdhore Well yes :P 19:16
tadzik hmm, I accidentally used some -i switch to git, but it turned out alright 19:17
nice, I got a good-looking sha1 again :) 19:18
moritz_ git reset --hard origin/master # if you want to rever everything to "normal"
dalek kudo: 6cf6166 | tadzik++ | Configure.pl:
Revert the last commit, turns out gms is the default on Parrot

This reverts commit 41313b7ab669248b28177990a297c06092eae397.
19:19
flussence :( smolder.parrot.org gives me a HTTP 500 for the TAP upload 19:23
"465 wallclock secs"... not quite 7½ minutes, but close. 19:24
moritz_ flussence: the 500 happened to me too, from time to time 20:01
flussence: it seems that the submission system can't handle the large number of requests by some automatic smoking farms 20:02
tadzik nopaste.snit.ch/34348 -- what was a workaround for that?
moritz_ BUILD($!a) iirc
tadzik right, thanks 20:03
...is that one of the things 6model will fix?
hmm hmm
moritz_ python has something nice 20:36
it's something like sprintf, but with named placeholders 20:37
moritz_ I've been wanting something like that for Perl 6 for quite some time 20:37
I consider stealing it
flussence what's the syntax? is it like named SQL placeholders? 20:38
(":name")
moritz_ ":(name)s"
where s is the format
and name the name
flussence oh, looks like a good idea...
moritz_ $ >>> print "foo %(bar)s baz" % { "bar": "BAR" } 20:39
foo BAR baz
before I learned about it, I thought about %name:s
flussence a lot more readable than %1$d all over the place...
(there's something like this in ICU, I think...) 20:40
moritz_ fwiw I learned about it here: www.korokithakis.net/tutorials/python
I've been thinking about that in the context of my error message grant
because I want to make it easy to customize messages, and to include arbitrary information
so I want to have something like a hash 20:41
which contains lots of context for the error
flussence userguide.icu-project.org/formatpar...sageFormat
moritz_ and the error message can then say something like "Type check failed for assignment; got %(actual)s, expected %(constraint)"
flussence ICU seems to have numbered params and wordy types... guess it's not the same thing 20:42
moritz_ so it will just look into the context hash for 'actual' and 'constraint', and passes the rest to sprintf
flussence (are we going to end up with a java-like exception class hierarchy :) 20:43
moritz_ I don't know enough Java to answer that
but I think classification > tree
flussence PHP does a similar thing... it resembles the diagram in `perldoc perllexwarn` 20:44
moritz_ and I don't think that the classification needs to be implemented through inheritance or role composition 20:45
but I'm not yet sure how exactly it should look like
(which is why I applied for a grant, and haven't written it all down :-) 20:46
flussence well, you've probably got a better idea of how to do it right than I would, so I'll be quiet :) 20:47
moritz_ well, most of my ideas are very abstract
I thought alot about it, but I haven't talked too much about it
moritz_ gist.github.com/845617 # simplist implementation 20:59
*simplistic
tadzik very nice 21:02
. o O ( use Python::Sprintf }
moritz_ well, I'm now pondering what the best way is to include in in Perl 6 21:03
maybe it should be a .fmt feature, or something 21:04
I'm sure masak++ will have an opinion about that
tadzik named fmt? nmft? 21:05
bleh
moritz_ no, in fmt directly 21:06
tadzik nopaste.snit.ch/34352 -- any idea what's wrong here? 21:07
tadzik is trying to workaround Rakudobugs
moritz_ stupid question: is there a reason to not just use has $.c = 666; ? 21:09
tadzik well, that's when the 'submethod BUILD' was failing
I'll see
moritz_ I guess that it's the //= bug
tadzik huh, seems like that easy way works
moritz_ rakudo: my $x = 1; $x //= say("SHOULD NOT PRINT"); say $x 21:10
p6eval rakudo 6cf616: OUTPUT«SHOULD NOT PRINT␤1␤»
tadzik I must say I find Python's documentation syntax superior to POD 21:15
in terms of ease of writing
tadzik maybe there's a need for a parser script generating POD from something similar 21:16
flussence markdown would be nice 21:18
.oO( embedded mkd in pod would be really nice... )
tadzik nah, I think of "just add a q{ some string } in your method body and it will produce POD describing the method name, params and what's in q{}" 21:19
loads of POD in class definitions neither look good, nor are pleasant to write
flussence that's covered by #= and .WHY, iirc 21:32
(current parsing of those comments is a bit broken though)
tadzik .WHY?
hah, that's impossible to find in perlcabal.org/syn/ :) 21:33
ack to the rescue
oh, that .WHY is exactly what I wanted 21:34
hmm, why would like to have `mkdir 'foo', :p`, like we have `mkdir -p foo` in unices? 21:38
donri moritz_: Python has a new formatting language also 21:39
Which IMO is cleaner
moritz_ would like mkdir :recursive or something
donri: do you have a link to that?
donri docs.python.org/library/string.html...ing-syntax 21:40
{} is like %s, {0} can reorder positionals, {name} for named 21:41
tadzik hmm. Is there anything like BUILD in Moose? submethod BUILD is not exactly what I want, as when I write my own BUILD I have to set attributes myself. Is there a way to have a BUILD, or anything else, like Moose has? 22:00
[Coke] skips review. 22:27
sorear tadzik: I do not beleive so 22:56
Moose has a lot of stuff that Perl 6 needs to steal back 22:57
(AFAICT I am completely alone in this view)
donri I think moritz_ or someone said something similar the other day 23:04
jdhore I personally still don't see the appeal of OOP at all 23:24
colomon It's great in the small
jdhore hmm?
colomon OOP
colomon hopes he didn't miss important context there. 23:25
jdhore <colomon> It's great in the small <--- This sentence makes no sense to me.
colomon object-oriented programming is great in the small.
Certain things are perfectly represented as objects.
jdhore I don't get what you mean by "in the small"...In the small-scale? 23:26
colomon Hmmm...
I guess the easiest explanation is that I feel you should make the things that are naturally objects into objects, and then the rest of your code should be a blend of functional and imperative programming using those objects. 23:27
flussence or abbreviated: "it's ok to use main::" 23:28
colomon So for instance, in a CAD program, you'd be crazy to NOT use objects to define your curves.
but I think the idea that your main function (flussence++) should be in an object is 95% insane. 23:29
Which I guess means I feel p6 gets it right: you need both methods and subs. :) 23:30
donri With multidispatch there's no need for classes or methods, just types 23:32
Haskell kinda
colomon bah, arguing whether you've got a type or an object is just splitting hairs, IMO. 23:33
donri sure, but 'object' usually implies more (such as methods) 23:34
colomon afk # gotta put the boy to bed 23:35
donri tell him good night from random person on the internet 23:36
lue hello citizebras! o/