3 ms·
Fine by me, pick your latest toy language and demonstrate how you can write a toy webserver in 3 lines or a Fibonacci calculator in 3 characters. When you need
by cpppppppp 17y ago
Fine by me, pick your latest toy language and demonstrate how you can write a toy webserver in 3 lines or a Fibonacci calculator in 3 characters.
When you need to get some real work done give me a call - I just put my rates up.
- jacquesm 17y agoI've written a non-toy webserver in C++, it's been making me money since '98 or so, it's still cooking along at http://upload6.ww.com/_/stats.html http://upload6.ww.com/_/stats.html 25M hits / day, 5 servers like that. It's a single threaded 'select' based webserver that pushes images posted by one user to many others. I could have done that in C, but C++ seemed nice at the time, so I used it. Finally, after debugging obscure runtime issues and memory leaks it dawned on me that the program was ok, I just wasn't competent enough in C++ to do this quickly and error-free. So, bit by bit I started to get rid of the OO features, the program became faster, and more reliable. When it was back down to bare-to-the-metal 'C' with C++ comments it ran faultless, and it has been doing so for well over a decade now. The webcam software was a different story, because it had to run on the microsoft platform it had to be in C++, fortunately Borland C++ builder was an excellent environment, and I never regretted using it instead of using C. The GUI features of C++ builder made life a lot easier. My 'take home' was if you have to use C++ be very careful and use as many quality libraries as you can find so you don't end up spending a lot of time chasing obscure bugs. And if it is systems level stuff, stick to C.
- uninverted 17y agoI wonder what a language with a three character Fibonacci sequence would be like. You'd probably need Unicode, if the language wasn't specifically designed for the Fibonacci sequence.
- tesseract 17y agohttp://www.dyalog.com/dfnsdws/n_fibonacci.htm http://www.dyalog.com/dfnsdws/n_fibonacci.htm
- mahmud 17y agoA "language" that has fibonacci builtin can do it 2 characters. fx. where f is the name of the fibonacci function and x is a single digit number. A fibonacci DSL could do it in 1; if all input is expected to be an integral value and the machine only computes fibonacci values, then typing a single digit number would have the intended consequence: (loop (print (fib (parse-integer (read)))))
- blasdel 17y agoSomeone clearly needs to extend HQN+ with another primitive -- http://www.cliff.biffle.org/esoterica/hq9plus.html http://www.cliff.biffle.org/esoterica/hq9plus.html