@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27



Comments:

<0> I'm not saying that it should be in the main POD. It should just be documented. Somewhere.
<1> "Sunrunner20" at 71.252.175.109 pasted "Can't get perl to accept the @orig[$i]... line" (41 lines, 762B) at http://sial.org/pbot/18622
<2> been working on that all afternoon, can't get that line to work for some reason
<3> Ani-_: it is, it's documented in the source code, fit documentation for the people who are going to be using it
<3> sunrunner20: turn on warnings and strict, fix the problems you encounter, then re-paste the code
<2> i tried
<2> wait
<2> strict?
<4> sunrunner20: that is horrible code
<5> sunrunner20: use strict; use warnings;
<4> but do as Somni says
<0> Somni: in what file would that be? :/
<6> fgrep -r
<2> ok, theres -w whats "strict"?
<3> Ani-_: universal.c
<4> sunrunner20: perldoc strict



<7> sunrunner20: Type 'perldoc strict' in your shell or go to http://perldoc.perl.org/strict.html
<3> Ani-_: that's where the functions are declared, I'm sure you can follow them from there
<4> sunrunner20: use strict; and use warnings; should be in your code
<8> Gah.
<8> I had to make pizza for the kids, but I can't eat any.
<8> That's painful.
<6> devoured before you can get your hands on a slice?
<9> Khisanth: HE'S TURNING VEGAN
<6> I prefer the evil children theory
<8> For the nonce, I am cutting out both dairy and wheat.
<8> So...
<9> Yeah, but mine has the advantage.
<8> THAT'S PIZZA
<10> nonce?
<10> Oh!
<10> :)
<9> Yaakov: You can still eat humans though, right?
<10> Neat.
<8> I don't eat any meat.
<9> Vegans =[
<4> does human brain count as meat
<10> torbjorn: Aye.
<0> Somni: not seeing a whole lot documentation in there... But I'm done for today.
<6> heh the code IS the documentation
<9> Khisanth: Yeah, in somni's world maybe.
<10> You're lucky you weren't within range when you said that.
<9> Of what?
<6> "If you can't understand this code then you shouldn't be using this module"
<10> I'd rather listen to politics all day than have to hear someone explain that their code is "self-documenting" one more time.
<8> I can't even understand my OWN code.
<10> "If you can't understand that the whole reason it's a ****ING MODULE IS SO THAT I DON'T HAVE TO KNOW HOW IT WORKS then maybe you shouldn't be SHARING YOUR CODE."
<9> Masque: There is a certain argument to be made for at least attempting to be self documenting
<3> Ani-_: I didn't say it was documentation, I said it was code
<9> Well, ok.
<8> By the way, Masque, HAPPY BIRTHDAY MAN.
<10> buu: I disagree. Write clear, clean code. And then document it.
<10> Yaakov: Hey, thanks!
<9> Masque: I think that's what I meant.
<8> I was afraid I would forget.
<10> buu: Yes, but they're not the same thing.
<10> Yaakov: Well, depends. If that was for 2005, you did. If it's for 2006, you're well in time!
<9> Masque: There is two levels of documentation
<10> buu: No no no no no!
<9> DIE IN A FIRE
<10> There is DOCUMENTATION. Then there is CODE.
<9> Bah.
<8> You know... sometimes I actually SPLIT UP LINES into MULTIPLE LINES to make things more clear.
<6> Masque: well that was the whole point the "module" in question ISN'T meant to be used by the general public
<9> There is DOCUMENTATION and there is DOCUMENTATION and there is CODE
<10> Yaakov: Yes, indeed. That's making it "readable".
<10> That is not "documenting the code".
<10> Nor is that "self-documenting".
<10> It's just "not HOLY GOD MAKE IT STOP ugly".
<8> But perl laughs at me. It sneers. It says, what's wrong--can't play GOLF?!
<10> Khisanth: Yep. Still I'd push for documentation for those who DO need to use it.
<11> You can totally use my modules without writing any code, just documentation.
<8> I actually write the documentation for each subroutine as a comment next to the sub declaration at the beginning of the program.
<3> why bother? Internals:: maps directly to internal calls that are already documented
<10> Somni: I think that's fine. A single rabbit hole is all good.
<11> Yaakov: Hey. I got something for you. A literate programming prototype that generates the POD from the comments.



<11> It's not really literate programming. It's just laziness in action.
<10> When Internals:: maps to Foozbucket:: which silently maps (sometimes) to Ribbit::Brainstorm:: and that occasionally makes a call to Internals:: and only at the fifth circle of hell next to the box of wheat thins is anything documented, well, that ****s.
<11> If laziness can be said to act... or something.
<8> dngor: I am pretty consistent with the comments, I suppose they could be translated fairly easily.
<10> Generally I figure that if a line of code takes more than 15 seconds to write, it probably deserves a quick note above.
<8> expects, returns
<8> err
<11> Yaakov: That's my thesis. Grab all the /^#/ comments before a sub, and generate an =head2 subname out of them.
<8> requires, accepts, returns
<11> It's weird. I'm more inclined to comment a function than to document it. So turn the comments into documentation, I say.
<10> dngor++ # That's documentation, no?
<8> Then in the sub, the code gets comments so I don't go nuts asking "WHY THE HELL DID I DO THAT?!"
<10> If the comments document the code, so be it.
<10> Yaakov: You're hired!
<11> Masque: Pretty much. This just promotes internal comments to user serviceable docs.
<8> I like my requires, accepts, returns API definition. It is what I teach my programmers.
<8> Masque: To the left!
<10> dngor: TextMate lets you auto-fill sub stubs which you can make include requisite doc space.
<10> I find my biggest hangup with adding pod above a sub is the actual pod tagging.
<8> I tried TextMate and went with vim.
<9> Masque: Oh god, don't interleave pod
<6> dngor: isn't that more or less the same as javadoc? :)
<9> I'll hunt you downa nd kill you
<10> buu: It's perfectly acceptable between subs.
<10> IN a sub, dear God no.
<10> IMHO
<10> of course.
<10> Which actually is somewhat humble this decade.
<9> It hurts.
<10> buu: Perhaps, but it also tends to get coders to write the documentation.
<11> Khisanth: So I'm told. But when is an idea truly something divorced from everything that has come before?
<10> pod hurts, so.
<11> Masque: Compare http://poe.dyndns.org/~troc/tmp/tweaked-kernel.pm vs. http://poe.dyndns.org/~troc/tmp/tweaked-kernel.html
<6> dngor: well the reason ask is because someone already implemented THAT
<11> Khisanth: Still not getting your point. People invent stuff, and then new stuff is invented which are improvements on the existing stuff.
<11> Khisanth: Or should we stop making new stuff because it's only a little better than the old stuff?
<10> Sweet merciful crap. OmniGroup++ got back to my support request in six minutes.
<6> I don't see how implementing something according to the same specs can be any better or worse
<10> dngor: Brings tears to my eyes, man. Beautiful.
<11> Khisanth: Ok. Still not seeing your point, though. Maybe you should splain it?
<8> Does javadocwork with perl?
<8> Does javadoc work with perl?
<12> Shouldn't sysread() return immediately if there are no more bytes to read?
<12> On a socket.
<2> that hasen't helped..
<4> strict and warnings?
<4> i find that very hard to believe
<12> say I use IO::Select...
<3> sunrunner20: paste the new code
<12> IO::Select tells me that a certain socket handle is readable.. but that socket has received a partial line (eg.. no line feed).. my program hangs :-/
<1> "Sunrunner20" at 71.252.175.109 pasted "ditto" (35 lines, 729B) at http://sial.org/pbot/18623
<2> crap
<2> forgot to edit out the headers
<2> mech
<2> bbl, parrents forcing me out to dinner
<3> malverian: your program must be waiting for a newline before it considers the read done; modify your program not to do that
<12> Somni, I'm doing a $foo = <$rh>
<12> Somni, What way do I have around this?
<3> malverian: that'd be the problem then; you don't mix buffered reads with select
<3> you should be using sysread
<13> malverian: use sysread()
<12> Somni, Well.. I tried that :-/
<3> malverian: if it didn't work you did it wrong
<12> Somni, I read one byte at a time until sysread returns false
<12> Hmm.. I think I have an idea...
<3> you don't need to read a byte at a time
<13> malverian: that's silly, read up on sysread()
<3> you also may have been ***uming there was a newline in your input
<3> you cannot ***ume that
<12> Is there any way to find out how many bytes are ready on a handle?
<3> just read a chunk; say 1024 bytes


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #perl
or
Go to some related logs:

#math
unmasking amsn
#kernel
#ubuntu
#mysql
#perl
#suse
gentoo Failed on MD5 verification
#python
downgrade gaim



Home  |  disclaimer  |  contact  |  submit quotes