- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I think it's neat, there have been quite a few occasions that I took on the challenge of writing things with batch files that no sane person should.
Nothing as cool as this though.
Admin
... I can't explain why, but that code makes me want to punch something very, very hard.
Admin
Are you like, angry at numbers, or something?
There's like, way too many of them.
Admin
3.14159th comment.
Admin
Wow.
Just... wow.
Admin
Hats off to the coder, brilliant work!
Admin
That batch script...almost makes we want to install the software necessary to run it.
Almost.
Admin
That script also apparently makes me use the grapefruit words sometimes.
Admin
I have, in my long life, seen very few examples of working so hard to have everyone ask.. "Why The F?"
I am amazed and nauseated at the same time. Bravo.
Admin
Running out of actual, funny comments?
I like reading stuff like that, it's still a WTF (of the re-inventing the wheel/using inappropriate technology genre) but it's a clever and deliberate WTF so worthy of closer inspection.
Admin
Way back when taking a computer course, we were all supposed to write a tutorial on some random part of computing. I was assigned batch files for some reason.
Naturally, I wrote it as a batch file. (Excepting a small program I threw together to make up for the lack of any input-commands in DOS at the time.) Compared to the 'program' I'd written to pull things in and out of archive to save space on our 10M hard drive at home, it was pretty simple.
Admin
Did somebody say quine? I once wrote 3 quines: Two bilingual (c+python and c+ruby) and one in xhtml+javascript. http://twoday.tuwien.ac.at/pub/stories/311724/ :P
Admin
You're a geek, Don. That's why I like working with you.
Admin
The real WTF is that this batch file fails to calculate pi = 4*arctan(1)
Admin
That batch file is not DOSBox compatible.
Admin
Admin
The reason I use these complicated formulas is because the series expansion for arctan(1) takes forever to converge (try it in a spreadsheet).
Admin
It's just gone 10 o'clock (am) and that is the most awesome thing I've seen today...so far.
Admin
Writing DOS batch files makes baby Jesus cry.
Admin
Admin
I once saw Perl master Damian Conway give a presentation called "Fun With Dead Languages" where he calculated Pi using POSTSCRIPT. It's actually turing-complete.
The output looked really nice, though.
He also, if I recall correctly, calculated primes using a parser for LATIN. He supposedly has another parser for Klingon, but it hasn't been approved by the Klingon Language Institute, and you don't want to get on their bad side.
Admin
I have a nice Windows batch implementation of an integer-only Vorbis decoder but the margin is too small to include it.
Admin
I LOVE batch files, and this one just rocks.
I still prefer using batch for simple things, like... oh mapping drive letters to network shares. You can do it in one line and it's simple.
NET USE T: "\SERVER1\Team Design"
Ever do it in a VBScript file? (NOTE: Copy-n-paste from someone else's VBS file, including the typo in the server name.)
Set wshNetwork = CreateObject("WScript.Network") wshNetwork.MapNetworkDrive "t:", "\sever1\team design"
Job security by complexity. There's a WTF for ya.
Admin
I wrote a batch file front end for MP4Box for my specific task of losslessly cropping M4A files then renaming them - it would've been reinventing the wheel had YAMB not started crashing and freaking out on me, but it turns out I actually saved a lot of time by doing a FOR loop through my entire folder of hundreds of files.
Admin
(Also, "How long, oh Lord?" might be relevant here.)
Admin
Man, Win32 Batch files is for pussies. Real Men use MS-DOS/win98 batches, which comes without blocks nor even ''integer support''
if you want integers, you need to implement them. here's how you may implement the syracuse sequence : http://pastebin.com/m3ee81f4c
Admin
Wait, how is that example of VBScript more "complex" than NET USE? Sure VB forces you to create an object to get at the networking functions, but the alternative would be to have 1000 global functions like PHP4. Is that really any better? And is "NET USE" really any easier to understand then MapNetworkDrive?
Admin
Aww, dang. I really need to get my batch bignum library working some day. I did a few things worth mentioning in batch but also, nothing as cool as calculating Pi. Not yet, though :)
Admin
I don't agree with your assessment because of what it represents. net use is calling some code to do the work, underneath the scenes, there are many more lines of code that execute. You can't go by the fact that you only call 1 line that its any better. I can wrap up something into a console app, and the code behind it is much more intensive, and you'd never know the difference.
Admin
I remember Don Lancaster going on and on in column after column about how he did all his computing on his printer. He had some really cheap computer whose sole job was to download PostScript to his fancy printer. Now he uses Distiller to save paper.
http://www.tinaja.com/post01.asp
Admin
"...the technology works well foa shortcut for typing in a bunch of commands."
Apparently it's also effective for cocking up sentences.
Admin
AR_K! AR_K!
Admin
Well that was... pointless. Which is exactly what a stupid coding trick should be, so well done!
Admin
My god, I type like I've got two raccoons by the tail and I'm swinging them onto the keyboard
Admin
Yes, calculating a power series with x=1 is a brillant idea.
Admin
The real WTF is everyone praising this code that uses a ton of GOTO commands...
Admin
"I don't agree with your assessment because of what it represents." - Been reading dilbert?
Maybe it's just good because it's quicker to type... 'and you'd never know the difference.'
Admin
Uhhhh....this is a batch file. use of GOTO is perfectly fine.
Admin
Wow. I thought I was the only one who remembered and laughed at insignificant lines from B&B.
Admin
I'm not knocking the code at all, and understand the need of them in batch files. It's just amusing.
Admin
Oops, hit reply instead of quote.. :(
I'm not knocking the code at all, and understand the need of them in batch files. It's just amusing.
Admin
Addendum: I posted together with your explanation, and I can't delete.
Admin
I have patent pending on that input method; You owe me royalties! Oh wait, you only type 'like' my method. Now how can I charge for that....
Admin
Admin
Not to mention that it wouldn't work anyway. The trailing '' makes the command blow up. Don't ask me how much time it took me to figure this out.
Robust but fast VBscript to map drives here that I stole just last week.
CAPTCHA: nulla - the amount of information I'm contributing to this discussion.
Admin
Admin
SINE! COSINE! COSINE! SINE! Three-point-one-four-one-five-nine!
GO PI!
Admin
The infinite series expansion of arctan is not a power series, and there is nothing wrong with expanding a power series with x=1 either, provided it converges for x=1.
Admin
Admin
More like "brillant" work!