Post #140,999
2/10/04 6:01:34 PM
|
I've just turned into my mother
I've got Sarah writing "I will not forget my homework" in her notebook.
I think I'll let her stop after 10 pages.
|
Post #141,001
2/10/04 6:17:58 PM
|
Ahh, page 5
I switched it to "I will not forget my science homework". I think I'll change it to health on page 10.
|
Post #141,003
2/10/04 6:21:51 PM
|
Went through that a while ago with Duncan
He hates writing. It made for a good deterrent... for a while.
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #141,005
2/10/04 6:28:46 PM
|
Re: I've just turned into my mother
\nfor (page=0; page<10; page++)\n for (line=0; line<60; line++)\n puts(strcat("I will not forget my homework in ", page<5 ? "science." : "health."));\n All done Dad!
-drl
|
Post #141,007
2/10/04 6:44:39 PM
|
"... you smart college guys -"
10 points for movie; xtra for actor
|
Post #141,016
2/10/04 7:06:52 PM
|
You can't strcat into a constant
|
Post #141,022
2/10/04 7:18:37 PM
|
no sense of humor :)
-drl
|
Post #141,060
2/10/04 9:40:55 PM
|
There is no humor in buggy code
Especially if the compiler is stupid enough to take it but it'll crap all over the stack. Can you tell I tested it?
|
Post #141,086
2/11/04 1:53:26 AM
|
What didn't trust yourself? :)
-drl
|
Post #141,122
2/11/04 9:05:41 AM
|
What compiler was that?
The code passes const char * where char * was expected. Should better barf.Or, for C, at least warn.
--
"...and pronounce all four E's in the word 'shit'"
|
Post #141,123
2/11/04 9:07:59 AM
|
IT WAS A JOKE FER CRIMINY
I guess it wasn't funny! SHEESH!
-drl
|
Post #141,125
2/11/04 9:09:02 AM
|
Looks to me like they got you good, Ross.
--\n-------------------------------------------------------------------\n* Jack Troughton jake at consultron.ca *\n* [link|http://consultron.ca|http://consultron.ca] [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\n* Kingston Ontario Canada [link|news://news.consultron.ca|news://news.consultron.ca] *\n-------------------------------------------------------------------
|
Post #141,126
2/11/04 9:12:04 AM
|
SHAADAAPP! WHACK!
-drl
|
Post #141,127
2/11/04 9:12:29 AM
|
Next time, use Perl for string processing jokes :)
--
"...and pronounce all four E's in the word 'shit'"
|
Post #141,128
2/11/04 9:14:57 AM
|
I don't think I remember how!
-drl
|
Post #141,132
2/11/04 9:57:51 AM
|
Shoulda wrote it in Smalltalk
Less likely to make a fatal error.
| out | out := WriteStream on: (String new). 1 to: 10 do: [:page | 1 to: 60 do: [:line | out nextPutAll: ('I will not forget my homework in ', (page > 5 ifTrue: [ 'science' ] ifFalse: [ 'health' ]), '.'); cr. ] ].
Transcript show: out contents asString.
- Yes I tried it.
The tree of research must from time to time be refreshed with the blood of bean counters. -- Alan Kay
|
Post #141,138
2/11/04 10:57:06 AM
|
Re: Shoulda wrote it in Smalltalk
\n: PUNISHMENT\n 10 0 DO\n 60 0 DO \n ." I will not forget my homework in "\n J 5 < IF ." science." ELSE ." health." THEN\n NEWLINE TYPE\n LOOP\n NEWLINE TYPE\n LOOP ;\n\nPUNISHMENT\n\nI will not forget my homework in science.\n..\nI will not forget my homework in health.\n ok\n - I tried it.
-drl
|
Post #141,161
2/11/04 1:19:00 PM
|
That's nice.
Where were YOU when we were shunning Mike in assorted languages?
[link|http://z.iwethey.org/forums/render/content/show?contentid=64921|http://z.iwethey.org...w?contentid=64921]
It started out as a minimalist thing; shun Mike in the least possible amount of code. It evolved into shunning Mike any way you like.
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Home Page - Now with added Zing!]
|
Post #141,182
2/11/04 3:44:45 PM
|
I don't visit scripting
not much anyhow. Guess I should. Ok, late and lame but:
1 to: 50 do:[:x | Transcript show: 'shun'; cr].
The tree of research must from time to time be refreshed with the blood of bean counters. -- Alan Kay
|
Post #141,183
2/11/04 3:47:59 PM
|
Bitch.
-YendorMike
[link|http://www.hope-ride.org/|http://www.hope-ride.org/]
|
Post #141,238
2/11/04 6:17:37 PM
|
Re: I don't visit scripting
: SHUN 50 0 DO ." Shun" LOOP ;\n FORTH should be called "Smallertalk" :)
-drl
|
Post #141,240
2/11/04 6:18:24 PM
|
But you missed the most important part!
Just WHO does that program shun?
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Home Page - Now with added Zing!]
|
Post #141,820
2/14/04 11:52:57 PM
|
Better late than never
Here's my belated BrainF8ck entry: \n>+++++++[ < + + + + +\n++ >- ]< +[ -> [- ]>\n++ ++ ++ [< ++ +++ ++\n>- ]<.>+++++ ++ +[ <+ + ++\n+++++>-]< +.------- -- -- .+ + ++\n ++ ++ ++ ++ +. -- - --\n -- .[ -] >++++++[< ++ +++\n++>-]<.[- ]+ ++ +++++++++ +. <]\n
|
Post #141,821
2/15/04 12:28:42 AM
|
Outfreakin-standing!
-drl
|
Post #141,824
2/15/04 5:12:21 AM
|
You win, I wot.
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Home Page - Now with added Zing!]
|
Post #141,842
2/15/04 12:11:21 PM
|
Re: Better late than never
\n>++++++++++ ++++++++++++ ++++++++++++ +++++++++++ +++ +++\n++++++++++++ ++++.>++++++ ++++++++++++ +++++++++++++ +++ +++\n+++ +++ ++++ ++++ +++ +++ +++ +++\n+++ +++ ++++ .>++ +++ +++ +++\n++++++++++++ ++++ ++++ +++ +++++++++++\n++++++++++++ ++++ ++++ +++ +++++++++++\n+++ ++. >+++ ++++ +++ +++ +++\n+++ +++ ++++ ++++ +++ +++ +++ +++\n++++++++++++ ++++++++++++ +.>+ +++++++++++++ +++ +++\n+++++++++++ ++++++++++++ ++++ +++++++++++ +++ ++.\n
-YendorMike
[link|http://www.hope-ride.org/|http://www.hope-ride.org/]
|
Post #141,852
2/15/04 3:56:04 PM
|
- style points
You could have at least tried to make it do something interesting. :-P
Cheers, Ben
"good ideas and bad code build communities, the other three combinations do not" - [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
|
Post #141,157
2/11/04 12:26:23 PM
|
Readable code is your friend.
So is reading the requirements: """ Requirements: 1. I've got Sarah writing "I will not forget my homework" in her notebook. 2. I think I'll let her stop after 10 pages (note the word "after"). 3. Ahh, page 5 -- I switched it to "I will not forget my science homework". I think I'll change it to health on page 10. """ homework_type = u""\nfor page in range(1, 11):\n print u"Page: %d" % page\n if page == 5:\n homework_type = u"science "\n elif page == 10:\n homework_type = u"health "\n for line in range(60):\n print u"I will not forget my %shomework." % homework_type\n
I was one of the original authors of VB, and *I* wouldn't use VB for a text processing program. :-) Michael Geary, on comp.lang.python
|
Post #141,168
2/11/04 2:15:30 PM
|
Re: Readable code is your friend.
program homework;\r\n\r\nconst\r\n subj1 = 'science';\r\n subj2 = 'health';\r\n\r\nvar\r\n pagenum : integer;\r\n pagecnt : integer;\r\n linecnt : integer;\r\n i\t : integer;\r\n \r\nbegin\r\n pagecnt := 11;\r\n linecnt := 60;\r\n for pagenum := 1 to pagecnt do\r\n begin\r\n for i := 1 to linecnt do\r\n begin\r\n\t if pagenum < 5 then\r\n\t writeln('I will not forget my homework');\r\n\t if (pagenum > 5) AND (pagenum < 10) then\r\n\t begin\r\n\t write('I will not forget my ',subj1);\r\n\t writeln(' homework');\r\n\t end;\r\n\t if pagenum > 10 then\r\n\t begin\r\n\t write('I will not forget my ',subj2);\r\n\t writeln(' homework');\r\n\t end;\r\n end;\r\n end;\r\nend. \r\nI agree. Sometimes, the least l33t solution can be the best.
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Home Page - Now with added Zing!]
|
Post #141,169
2/11/04 2:52:55 PM
|
Ugh!
Not only is it Pascal, it's Pascal with three-space indenting!
-YendorMike
[link|http://www.hope-ride.org/|http://www.hope-ride.org/]
|
Post #141,209
2/11/04 5:22:00 PM
|
I knew I'd seen that syntax somewhere before
Ah..Pascal.. brings back high-school memories.
/evil grin directed at CRC
|
Post #141,172
2/11/04 3:12:31 PM
|
Bad - pagecnt and linecnt should be constants, too. HTH! :-)
|
Post #141,187
2/11/04 3:52:17 PM
2/11/04 3:54:37 PM
|
Re: Bad - pagecnt and linecnt should be constants, too. HTH!
I thought about that.
However, if you define them as constants and then later alter the program to read those values in from a file or the user, you'd end up altering more program than if they're declared as variables.
Always plan for the future, and think very hard before declaring something to be constant.
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Home Page - Now with added Zing!]
Edited by pwhysall
Feb. 11, 2004, 03:54:37 PM EST
|
Post #141,189
2/11/04 3:55:04 PM
|
Or, "all constants are variables!" :)
Alex
The mind is not a vessel to be filled but a fire to be kindled. -- Plutarch
|
Post #141,252
2/11/04 7:27:02 PM
|
Not very "XP" of you - "Always do the least you need to do".
Or, if you want to be REALLY evil, declare them as "assignable typed constants" -- Borland's oldancient concept of "constants" that weren't really constant at all, apparently as a hack(*) at introducing initialized variables to Pascal. (Yes, it's deprecated like all Hell, of course; but the option IS still there, even in Delphi 7.)
But, really, all this [link|http://martinfowler.com/articles/newMethodology.html|"agile methods"] blither is looking more and more convincing to me... Certainly you are agile enough to CHANGE the constants into variables, should the need ever arise? Especially since the change wouldn't be all that big in the first place; the mechanics of file opening and reading and so on would positively dwarf it anyway.
(*): Misguided and best forgotten -- nay, best chopped into microscopic slivers, then burned to cinders and the ashes incinerated AGAIN, then buried under a mile-thick shield of depleted uranium at the bottom of the Marianas trench, and THEN forgotten! -- but, alas, undead like some fucking mummy in a cheesy horror flick.
[link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad] (I live in Finland, and my e-mail in-box is at the Saunalahti company.)
You know you're doing good work when you get flamed by an idiot. -- [link|http://www.theregister.co.uk/content/35/34218.html|Andrew Wittbrodt]
|
Post #141,333
2/12/04 3:05:25 AM
|
I'm not very XP, no.
And I compiled that code with fpc, which is available at:
[link|http://www.freepascal.org/|http://www.freepascal.org/]
I dunno what your strange Windows-things do; because they're not free or Free, so I can't obtain them.
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Home Page - Now with added Zing!]
|
Post #141,337
2/12/04 3:13:13 AM
|
Bullshit, and you (ought to) know it.
PeeWee obstines: I dunno what your strange Windows-things do; because they're not free or Free, so I can't obtain them. Thought I'd mentioned [link|http://bdn.borland.com/museum/|this] often enough.
[link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad] (I live in Finland, and my e-mail in-box is at the Saunalahti company.)
You know you're doing good work when you get flamed by an idiot. -- [link|http://www.theregister.co.uk/content/35/34218.html|Andrew Wittbrodt]
|
Post #141,338
2/12/04 3:14:28 AM
|
That's nifty.
Ta, I'll have a rummage.
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Home Page - Now with added Zing!]
|
Post #141,340
2/12/04 3:18:39 AM
|
That is great!
A museum that insists on touching! Danke!
-drl
|
Post #141,341
2/12/04 3:23:47 AM
|
Sigh
10,000 lines per minute!
Look at the compile times vs. MSC 5.0 - how the hell did we let them win??
[image|http://bdn.borland.com/article/images/20297/turboc.jpg||||]
-drl
|
Post #141,345
2/12/04 3:41:36 AM
|
Heh, look at the magazine quote...
...by Peter Feldman, PC Week; in later days, Peter Coffee at PC Week -- now renamed e-Week -- has been very much gushing about Delphi.
Unless it's the same guy who changed his name, Borland has been very lucky with the Peters at that rag.
[link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad] (I live in Finland, and my e-mail in-box is at the Saunalahti company.)
You know you're doing good work when you get flamed by an idiot. -- [link|http://www.theregister.co.uk/content/35/34218.html|Andrew Wittbrodt]
|
Post #141,378
2/12/04 9:41:18 AM
|
It was all about Windows
Borland completely bungled that move.
--
"...and pronounce all four E's in the word 'shit'"
|
Post #141,494
2/12/04 5:23:42 PM
|
Not bungled...
they were fucked by the Vole.
Go back into your history and read up on Shulman's Undocumented Windows. That will completely explain why Borland faltered.
jb4 shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating that facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT
|
Post #141,495
2/12/04 5:27:50 PM
|
Including the use of Buck Forland in the credits.
Alex
The mind is not a vessel to be filled but a fire to be kindled. -- Plutarch
|
Post #141,352
2/12/04 4:48:08 AM
|
Obstines..HeeHee____Guess you obstreps, eh?
|
Post #141,241
2/11/04 6:18:52 PM
|
YYEWWW!
-drl
|
Post #141,257
2/11/04 7:40:49 PM
|
Re: What compiler was that?
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
main(){
puts(strcat("This is a test", "crap")); } cc a.c ./a.out Segmentation fault
|
Post #141,260
2/11/04 7:47:07 PM
|
(remind me to dunk Barry and then hold him down)
-drl
|
Post #141,267
2/11/04 8:05:48 PM
|
Re: (remind me to dunk Barry and then hold him down)
Barry may be a candidate for The Box (no, not Our Box)
Box with one pushbutton:
Indicator says, "push to test" [He will] Indicator changes to, "release to detonate"
Kinda like when you 'activate' your OEM copy of Ex Pee Homeboy, no?
\ufffd Anon zIWEr
|
Post #141,278
2/11/04 8:36:03 PM
|
Sounds like a good gag gift
And then the "Dentonate" would be an appropriately bad sound effect (farts, etc)...
Cheers, Ben
"good ideas and bad code build communities, the other three combinations do not" - [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
|
Post #141,268
2/11/04 8:09:36 PM
|
remind me to drunk barry and ho him down :-)
and everywhere the great Curse of the New World, the American Child, in all its raucous, spoiled, undiciplined, selfish ghastliness, the female specimens keeping up an incessant high-pitched whine and the male infants racketing like cowpokes on payday. There's nothing wrong with grown Americans, by and large you wont find heartier men or bonnier women anywhere, but the only remedy I can see for the children is to run Herod for President. Sir Harold Flashman esquire VC OBE
questions, help? [link|mailto:pappas@catholic.org|email pappas at catholic.org]
|
Post #141,393
2/12/04 10:39:56 AM
|
Only if I get to choose the source of the 2nd part
|
Post #141,416
2/12/04 11:50:50 AM
|
beep's nextdoor neighbor's party
and everywhere the great Curse of the New World, the American Child, in all its raucous, spoiled, undiciplined, selfish ghastliness, the female specimens keeping up an incessant high-pitched whine and the male infants racketing like cowpokes on payday. There's nothing wrong with grown Americans, by and large you wont find heartier men or bonnier women anywhere, but the only remedy I can see for the children is to run Herod for President. Sir Harold Flashman esquire VC OBE
questions, help? [link|mailto:pappas@catholic.org|email pappas at catholic.org]
|
Post #141,382
2/12/04 9:54:21 AM
|
Joys of ANSI C, I guess
Bleeech
--
"...and pronounce all four E's in the word 'shit'"
|
Post #141,490
2/12/04 5:18:13 PM
|
Musta been a Micros~1 compiler
or a pre-3.0 gcc/g++
jb4 shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating that facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT
|
Post #141,130
2/11/04 9:46:09 AM
|
Friend's kid got out of an oral presentation
in a speaking class by having his Macintosh deliver the presentation via speech synth. Stupid teacher gave him a pass for "innovation".
Definitly showed moxie.
The tree of research must from time to time be refreshed with the blood of bean counters. -- Alan Kay
|