8 ms·
I really, really like that "Why?" explanation page; I feel like many projects could benefit from copying that idea. Frequently, the first thought I have when I
by tclmeelmo 10y ago
I really, really like that "Why?" explanation page; I feel like many projects could benefit from copying that idea.
Frequently, the first thought I have when I see projects is, "okay, neat, but why does this exist?", and the answer takes some digging. It's wonderful that in this example the answer is made so obvious.
- luckydude 10y agoThanks. Given the state of the world we felt that not answering why would just get a pile of "Neat|WTF|Huh - why did you do this?"
- tclmeelmo 10y agoI should have also said in the original comment that Little, beyond the website, looks genuinely neat and I'm looking forward to exploring it further. I just finished skimming through the paper you have linked on the site and liked it quite a bit. It directly answered another question I had, which was what would it take to implement Lisp-style syntax in the same fashion as you did for C-style syntax? I'd normally talk myself out of ideas like that, but your paper is talking me into thinking about it more. Thanks for sharing all of this!
- luckydude 10y agoOur pleasure. We're around on the irc channel or the forum or someplace there is a mailing list (if not, dev@bitkeeper.com gets to all the people that are current hackers). I'm tickled pink that Little is on the front page of hacker news.
- tyingq 10y ago> I really, really like that "Why?" explanation page; Me too. Especially the comparison of tcl to their language: set x [expr {[lindex $red $i] - [lindex $blue [lindex $green $i]]}] vs x = red[i] - blue[green[i]] I had to work in Tcl early in my career...80 hours a week for a straight year, so I recognized that madness immediately.
- kevin_thibedeau 10y ago> so I recognized that madness immediately. It's just bizarro lisp without the parentheses.
- fancy_pantser 10y agoIt combines the power of Visual Basic with the readability of PostScript.
- nilkn 10y agoKeep in mind that this example was (presumably intentionally) cherry-picked to show off the worst of Tcl's syntax. It's not really representative of how expressive the language can be in the right context, and it doesn't show the benefits that you can get from having a very simple, regularized syntax with little added sugar. On the topic of expr, though, it can be avoided if desired in favor of Lisp-style prefix operators: http://www.tcl.tk/man/tcl8.5/TclCmd/mathop.htm http://www.tcl.tk/man/tcl8.5/TclCmd/mathop.htm
- tyingq 10y agoThere are things to like about tcl, but lists aren't really one of them. Not cherry picked, an "official" page describing lindex: http://wiki.tcl.tk/1481 http://wiki.tcl.tk/1481 Objectively compare that with most any other language's docs for lists/arrays/whatever. "Everything is a string" does have some downfalls.
- nilkn 10y agoI think you might have misinterpreted my point. When I said it was cherry-picked, I did not mean that it wasn't a legitimate example or that lindex is not a real, standard Tcl function. It's a completely fair example and is something that is liable to happen in practice. All I meant is that it was clear from the context that an example was chosen showing a weakness of the language (relative to standard C-like syntax) and that it's not quite fair to judge the whole language based on that one example. Tcl's incredibly simple syntax and lack of syntactic sugar are what lead to situations like that example. But those same things are also responsible for making the language Lisp-like and fairly homoiconic. You can do incredible things in Tcl thanks to its simple syntax which is amenable to macros and code generation.
- beachstartup 10y ago> We (BitKeeper folks) did our GUI interfaces in Tcl/Tk years ago because it meant we could have one gui person and get the same gui tools on Windows, Mac, Unix, and Linux. Yes, somewhat clunky (less so over the years), but as a small start up it was great not having to have a developer for each platform, both for initial coding and for ongoing maintenance. hey, that describes my very first development job! i wrote a cross-platform tcl-based installer for a desktop application at the first company (a small startup) i ever worked for. it was really easy to write (i was literally 17 years old) and there were fairly solid libraries for doing windows-y registry-ish things and unixey install things too. one of the senior guys on the team took my code and integrated it into their cross-compiled build system and it spat out a very decent product that helped our users install the program on i think 3 or 4 different platforms (win95, linux/X, and solaris, possibly HPUX or some other weird platform). that was my very first significant contribution to any software project. i seem to remember that at the time the shrinkwrapped installer licenses cost $10's of thousands for commercial use. it probably took about 60-80 hours of my time at $17.50 an hour... clearly a bargain.
- amelius 10y ago> We (BitKeeper folks) did our GUI interfaces in Tcl/Tk years ago because it meant we could have one gui person and get the same gui tools on Windows, Mac, Unix, and Linux. Ok, sounds reasonable. Except... now you have to hire another person to do language development/maintenance :)
- luckydude 10y agoNow that's a valid point. So it's 2/3rds instead of 1/3rd but the guy doing the language is a languages/compiler guy (used to be professor at Brown) and he loves this stuff. So not a big money win but definitely a big karma win, he's having fun.