Post #64,976
11/25/02 5:32:27 PM
|
bashun
\r\nwhile echo '*shun*';do :;done|head -50\r\n \r\n\r\n 39 characters.
--\r\n Karsten M. Self [link|mailto:kmself@ix.netcom.com|kmself@ix.netcom.com]\r\n [link|http://kmself.home.netcom.com/|http://kmself.home.netcom.com/]\r\n What part of "gestalt" don't you understand?\r\n [link|http://twiki.iwethey.org/twiki/bin/view/Main/|TWikIWETHEY] -- an experiment in collective intelligence. Stupidity. Whatever.\r\n \r\n Keep software free. Oppose the CBDTPA. Kill S.2048 dead.\r\n[link|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html]\r\n
|
Post #64,977
11/25/02 5:41:24 PM
|
Python still the one to beat at 31 characters.
Oh, btw, Mike: *shun*
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #64,988
11/25/02 6:38:10 PM
11/25/02 6:40:33 PM
|
Well I Wouldn't want to shun Mike, but...
if I simply had to shun somebody, maybe:
fort=1to50:?"*shun* ";:next
would be the way to do it on a Commodore 64 (Vic, 128, whatever) in 27 characters.
(Edit: Formatting)
John. Busy lad.
Edited by Meerkat
Nov. 25, 2002, 06:40:33 PM EST
|
Post #64,990
11/25/02 6:41:17 PM
|
Oooers...
Nice and... cramped. I like. ;-)
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #65,083
11/26/02 3:23:58 AM
|
Not you, too!
Bitch.
-YendorMike
[link|http://www.hope-ride.org/|http://www.hope-ride.org/]
|
Post #83,570
2/23/03 7:50:59 PM
|
Nice, but a wee problem...
If you ever LISTed the code, it would expand out the '?' to PRINT IIRC...
I'm getting an urge to write an auto*SHUN*ner in Brainf**k - anybody else tempted?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989
|
Post #64,997
11/25/02 7:17:53 PM
|
Not any more it ain't
ruby -e'puts"*shun*\\n"*50'
Clocks in at 26.
And your Python golf sucks. Here is 29.
python -c"print'*shun*\\n'*50"
But if the goal is just to get *shun* to appear 50 times, I think the following is pretty decent.
ruby -e'p"*shun*"*50'
21 chars.
The following is probably cheating...
ruby -e'p"*shun"*51'
Cheers, Ben
PS Why not Perl? Use the right tool for the job and all that. Ruby was a better choice this time. :-)
PPS Peter: Learn to loop over ranges already? No need to make Perl look like it sucks more than it does already. :-)
"Career politicians are inherently untrustworthy; if it spends its life buzzing around the outhouse, it\ufffds probably a fly." - [link|http://www.nationalinterest.org/issues/58/Mead.html|Walter Mead]
|
Post #65,086
11/26/02 3:42:18 AM
|
Perl range answer
perl -e "for(1..50){print\\"*shun*\\n\\";}"
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Blog]
|
Post #65,097
11/26/02 7:15:29 AM
|
Now inline it
perl -e'print"*shun* "for 1..50'
Or using Scott's trick:
perl -e'print"*shun* "x50'
(Both assume a Unix-like shell.)
Cheers, Ben
PS Ruby still wins at 25:
ruby -e'puts"*shun* "*50'
PPS OK, there is a shorter entry, but it didn't include invoking the language etc. The Ruby program proper is 16 chars.
"Career politicians are inherently untrustworthy; if it spends its life buzzing around the outhouse, it\ufffds probably a fly." - [link|http://www.nationalinterest.org/issues/58/Mead.html|Walter Mead]
|
Post #82,209
2/17/03 12:42:46 AM
|
Re: bashun II
\r\nyes '*shun*'|head -50\r\n \r\n\r\n 21 characters. Best I can tell, invoking an interpreter from the\r\nnext shortest solution involves more characters (that would be Scott's\r\nPython solution). \r\n\r\n\r\n
--\r\n Karsten M. Self [link|mailto:kmself@ix.netcom.com|kmself@ix.netcom.com]\r\n [link|http://kmself.home.netcom.com/|http://kmself.home.netcom.com/]\r\n What part of "gestalt" don't you understand?\r\n [link|http://twiki.iwethey.org/twiki/bin/view/Main/|TWikIWETHEY] -- an experiment in collective intelligence. Stupidity. Whatever.\r\n \r\n Keep software free. Oppose the CBDTPA. Kill S.2048 dead.\r\n[link|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html]\r\n
|
Post #82,210
2/17/03 8:13:54 AM
|
woah... I like it...
b4k4^2
[link|mailto:curley95@attbi.com|greg] - Grand-Master Artist in IT | [link|http://www.iwethey.org/ed_curry/|REMEMBER ED CURRY!] [link|http://pascal.rockford.com:8888/SSK@kQMsmc74S0Tw3KHQiRQmDem0gAIPAgM/edcurry/1//|ED'S GHOST SPEAKS!] | [link|http://www.eweek.com/article2/0,3959,857673,00.asp|Writing on wall, Microsoft to develop apps for Linux by 2004] | Heimatland Geheime Staatspolizei reminds: These [link|http://www.whitehouse.gov/pcipb/cyberstrategy-draft.html|Civilian General Orders], please memorize them. "Questions" will be asked at safety checkpoints. |
|
Post #82,226
2/17/03 10:36:33 AM
2/17/03 10:36:52 AM
|
Reading trouble?
If you read the rest of the thread, the shortest existing solution was [link|http://z.iwethey.org/forums/render/content/show?contentid=64997|mine]. I beat Scott for nice output using Ruby, tied you for just satisfying the rules (albeit with ugly output), and if you make a judgement call just right, I beat you as well. :-P
But that is a nice answer...
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]
Edited by ben_tilly
Feb. 17, 2003, 10:36:52 AM EST
|
Post #82,395
2/18/03 10:53:05 AM
|
bitch, etc
-YendorMike
[link|http://www.hope-ride.org/|http://www.hope-ride.org/]
|
Post #83,413
2/22/03 3:13:34 PM
|
Re: bashun III
Turns out the quotes aren't necessary at least in bash. Need to find\r\nout more about what the globbing rules are. \r\n\r\n \r\nyes *shun*|head -50\r\n \r\n
--\r\n Karsten M. Self [link|mailto:kmself@ix.netcom.com|kmself@ix.netcom.com]\r\n [link|http://kmself.home.netcom.com/|http://kmself.home.netcom.com/]\r\n What part of "gestalt" don't you understand?\r\n [link|http://twiki.iwethey.org/twiki/bin/view/Main/|TWikIWETHEY] -- an experiment in collective intelligence. Stupidity. Whatever.\r\n \r\n Keep software free. Oppose the CBDTPA. Kill S.2048 dead.\r\n[link|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html]\r\n
|
Post #83,414
2/22/03 3:16:56 PM
|
Very nasty
It works...unless there is a file in the directory that matches the pattern *shun*.
Still good enough that I consider it a winner. :-)
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 #120,041
10/3/03 8:12:14 PM
|
You can lose a character
Pointed out by a co-worker...
yes '*shun*'|sed 50q
Or lose the quotes if no files have shun in the name.
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]
|