7 ms·
Common Lisp – Myths and Legends (2002)
- xigoi 4y agoOne thing that puts me off about Common Lisp is functions that do multiple different things depending on a flag passed to them. (format nil s) formats a string, whereas (format t s) formats a string and prints it to stdout. This doesn't look like good design.
- medo-bear 4y agoformat is not just a function. it is a domain specific language. it even has a wikipedia entry, all its own. Like it or not, nothing similar exists in any other language https://en.m.wikipedia.org/wiki/Format_(Common_Lisp) https://en.m.wikipedia.org/wiki/Format_(Common_Lisp)
- xigoi 4y ago> format is not just a function. The article you linked literally starts with: > Format is a function in Common Lisp…
- nequo 4y ago"Not just a function" does not mean that it is "not a function." But I agree with your original point. "format" is not the most descriptive name for something that "formats and maybe prints."
- gumby 4y ago> Like it or not, nothing similar exists in any other language Uh, what? It's not that different from the printf metalanguage (more powerful, sure, but not that different and inspired by printf)
- medo-bear 4y ago> more powerful, sure, but not that different and inspired by printf bit of an understatement. it is an almost turing complete version of printf. https://arcanesentiment.blogspot.com/2009/02/value-of-extensible-format-strings.html?m=1 https://arcanesentiment.blogspot.com/2009/02/value-of-extens...
- smcn 4y agoIt makes sense when you understand what it's asking you for. That first argument is you specifying an output destination. For example, would you like to write to an open file, to an open port, to whatever you want. Specifying `t` is the current standard output, whereas nil is you saying "no, just give me the string". Also, `(format t "str")` does not return a string. At least not on SBCL or CCL.
- medo-bear 4y agothats right. the spec states that if destination is non-nil then format returns nil. otherwise a string http://www.lispworks.com/documentation/lw50/CLHS/Body/f_format.htm#:~:text=Description%3A,kind%20of%20formatting%20is%20desired http://www.lispworks.com/documentation/lw50/CLHS/Body/f_form....
- xigoi 4y agoStill, why not have a function that formats a string and another that outputs it somewhere, instead of one that does two unrelated things?
- atakan_gurkan 4y agoSimply, because they are not unrelated. It would be duplication to have two separate functions to do two tasks that have so much in common.
- xigoi 4y agoWhat does formatting a string and sending a string to a file have in common?
- atakan_gurkan 4y agoI was replying to your original post, did not notice you posted something different here. Formatting a string and then either returning it or sending it to stdout (or any other stream) has too much in common. The work is done in the formatting, sending is just an after thought. In a sense, this is similar to the parentheses and the prefix notation: it can be distracting if you are not used to it, but after a while it becomes very convenient. And I do not mean to sound snobbish, but you can easily write a couple macros to have different syntax for these two tasks if it really bothers you.
- kazinator 4y agoThere is a rhyme and reason to it. There is a stream argument, with the convention that if NIL is used, the stream is an implicit string output stream created for that call, such that the string is returned. And if T is used, then it's a shorthand for standard output. The argument may also be a string with a fill pointer. This convention isn't just in format. It has a name, stream designator: http://www.lispworks.com/documentation/lw50/CLHS/Body/26_glo_s.htm#stream_designator http://www.lispworks.com/documentation/lw50/CLHS/Body/26_glo... Other functions like write support the convention. Moreover there is a broader designator concept at play: there are other kinds of designators. http://www.lispworks.com/documentation/lw50/CLHS/Body/26_glo_d.htm#designator http://www.lispworks.com/documentation/lw50/CLHS/Body/26_glo... A designator is some object that by convention stands for another one, under the semantics of some function. For instance, functional arguments may be function objects or symbols: (mapcar #'list ...) or (mapcar 'list). The list symbol isn't a function, it's a symbol; the reason you can use it as a function is that it's accepted as a function designator. When you call a symbol as a function, it is resolved to the function via its global function binding. Another kind of designator is the spreadable argument list designator: http://www.lispworks.com/documentation/lw50/CLHS/Body/26_glo_s.htm#spreadable_argument_list_designator http://www.lispworks.com/documentation/lw50/CLHS/Body/26_glo... Some functions use this to take a single object or a list in the same argument position. It makes the functions nicer to use in the case when there is just one object, not having to specify the argument as (list arg).
- kagevf 4y ago> (mapcar 'list) Thank you for sharing that, I didn't know that was possible. I also tried just doing 'list at the repl, and sure enough it gets recognized as a function. I thought I could break it by doing this: (let ((list (list 1 2 3))) (mapcar 'list list)) I even tried adding on (funcall 'list list) to that block and it still works the same as if I had used (funcall #'list list) .... I guess it works because the list I bound in the LET isn't referenced as a symbol so FUNCALL etc can distinguish one as a symbol that has a function and the other as the name of a binding ... Was not expecting these results, so I'll need to review symbols and namespaces ...
- 4y ago
- lispm 4y ago> (format t s) formats a string and prints it to stdout FORMAT runs a domain specific language, which causes various print operations to an output stream.
- agumonkey 4y agothis one is particularly strange but it seems cultural, scheme also works the same for printf debugging it's one more parameter you don't wanna type :)
- dreamcompiler 4y agoWe're talking about I/O here, so we're already outside the domain of functional programming: It's necessary to specify where the output is supposed to go, and that's what format's first argument is for. If you want purely functional string creation, #'format can handle that by passing it nil as its "where" argument. In both cases #'format does the same thing; the only difference is where the output goes. If #'format knows it's operating non-functionally it can avoid consing up a string and send its output directly to the destination. So it's not necessarily the case that (format t s) creates a string at all.
- jgeada 4y agoNot expensive? When the reference cost of not hobbled or otherwise limited development environments for almost every other commercial language out there is $0.00, that the hobbyist entry point for LispWorks is $500 is … more than slightly out of whack. And that LispWorks price is just for the development environment, not for access to a curated store and delivery service or anything else. Just as well sbcl (Steel Bank Common Lisp) etc exist.
- eduction 4y agoBorland Pascal was $150 in 1983 and considered affordably priced. (Items like linkers used to be sold separately but were integrated into the Borland Pascal development environment, this was seen as a bargain.) Inflation adjusted that’s $456 today. I’m not saying I’d spend $500 for this but we are spoiled by all the great free tools today and lose sight of the big picture. Software developers in the US routinely make over $200k/yr. What is $500 for a tool if it really did make you more productive?
- kazinator 4y ago> What is $500 for a tool if it really did make you more productive? What is $500 for a tool to you if you make lots of money? Sure, that is one question. The more relevant question is: what is $500 for the tool, to the tool? In 2020, what $500 for a tool is a kiss of death. Nobody learns it; no third-party ecosystem, no jobs, ... OK, you can have some free-with-limitations student or personal editions or whatever. In the FOSS-dominated landscape, that's still a kiss of death. The entire quality and scope depends on the in-house development behind closed doors, which is funded by the $500 licenses. I think, without the multiple efforts to have free Lisp over the past 3+ decades, Lisp would be history.
- eitland 4y agoMicrosoft Office, Microsoft Visual Studio and also Jetbrains wants a word with you. Personally I honestly prefer - LibreOffice (much better for getting styling consistent last I checked + not spreadsheet is not as obsessed with mangling everything into an American date - VS Code (less overhead, more ergonomic and seriously: who develops things that needs old Visual Studio these days who hasn't done so for years?) - NetBeans (yes, I use Jetbrains but only because I have to use Kotlin. NetBeans just works and the shortcuts makes sense to me.) but that doesn't prevent the above mentioned products from earning lots of (hopefully) well deserved money.
- gumby 4y agoHow old is this? Yahoo has surely revamped its code in the past 20 years (if Yahoo stores even exist any more) and John Mallory left MIT decades ago.
- wrs 4y ago"Copyright © LispWorks Ltd 2000-10"
- dang 4y agoText from 2002 looks identical: https://web.archive.org/web/20021105131238/http://www.lispworks.com/products/myths_and_legends.html https://web.archive.org/web/20021105131238/http://www.lispwo.... We've put that in the title above.
- jonas21 4y agoYahoo! Store is what Paul Graham's startup Viaweb became after Yahoo acquired them in 1998.
- dreamcompiler 4y ago> John Mallory left MIT decades ago Not true, and his name is spelled Mallery. No idea if he reads HN.
- gumby 4y agoHe seems to spend most of his time in the mountains
- dreamcompiler 4y agoSince Covid MIT has been kind of a ghost town. Lots of people are working remotely.
- PeterStuer 4y agoPersonal Edition Limitations Please note that the LispWorks Personal Edition, distributed free of charge, has the following intentional limitations: There is a heap size limit which, if exceeded, causes the image to exit. A warning is provided when the limit is approached. There is a time limit of 5 hours for each session, after which LispWorks Personal exits, possibly without saving your work or performing cleanups such as removing temporary files. You are warned after 4 hours of use. The functions save-image, deliver, and load-all-patches are not available. Initialization files are not loaded." And it is not popular because ...
- Guthur 4y agoThere is a multitude of very effective free CL implementations.
- dreamcompiler 4y agoOne big deal about Lispworks is that it comes with a nice GUI creation toolkit. If you need to write a program with a GUI, it's easy with Lispworks and difficult with the free implementations.
- mepian 4y agoYou can get SBCL for free with no limitations which actually beats Lispworks on performance AFAIK: https://www.sbcl.org/ https://www.sbcl.org/
- PeterStuer 4y agoNot around the time where it mattered. I loved Lisp, but when our lab moved to an x86 architecture it was Allegro big bucks or nothing. I was referring to the above pestering of the user base, not that there aren't alternatives.
- whartung 4y agoI used this at work for months. When it quit, I just reloaded and kept going. It was for some local tooling work I was doing. I never ran into any of the limitations save the timeout, which for me was no big deal. I already owned a version at home for myself (it was, like $249 or something at the time), but this was also a time where folks still paid for software. Not everything was done on Linux with GCC, although Java was free at the time. A year before this I had my previous company pony up the $$$$ for Delphi's Enterprise edition (whatever it was called). That was a lot more than LW was. I contemplated getting Franz, but I never wanted to call for a quote, and they didn't publish prices. But I know they were expensive as well. Smalltalk, Lisp, Delphi, Visual Studio, everything cost money. And though Java was free, lots of folks were selling IDEs for it. I used Emacs back in the day, and we paid silly amounts of $$$$ for WebLogic.
- yazzku 4y agoI like how every Common Lisp website doesn't even have an SSL certificate. Just started learning the language recently and it takes two clicks to get anywhere.
- tmtvl 4y agoTime to port certbot to CL?
- yazzku 4y agoI don't see the relation between the web server and CL. Are you saying these sites are running off CL and would benefit from a certbot port, or were you just joking?
- tmtvl 4y agoWhile I wouldn't be too surprised if websites about Common Lisp did the expected dogfooding, it was indeed a joke about certificates being a solved problem.
- aidenn0 4y agocommon-lisp.net sbcl.org abcl.org all do?
- vindarel 4y ago"Who's Using Lisp?" but today? An ongoing list: https://github.com/azzamsa/awesome-lisp-companies/ https://github.com/azzamsa/awesome-lisp-companies/ (Google (they also contribute to SBCL), quantum computing companies, Intel, millions-LOC CAD systems, chatbots companies, trading services, big data analysis providers, the NASA, banks, cloud backup providers, music composition software… and smaller companies and one-person businesses)
- bmitc 4y agoThat list is not curated and kept up to date, and so it looks more impressive than it is. Several of those places are defunct or have put the Lisp codebase into maintenance mode or sunsetted it entirely.
- morelish 4y agoKind of amazing they are still a going business. I didn't realise any companies really used lisp for anything. I assume whoever is paying them money is doing so for some really niche or legacy?
- jolmg 4y agoA few days ago I noticed that commercial Smalltalk also still exists: https://www.cincom.com/us/smalltalk https://www.cincom.com/us/smalltalk By niche, I assume you mean niche interest rather than niche purpose. They're both general-purpose languages that are usable on the latest OSes, after all.
- diskzero 4y agoI am a current LispWorks customer using the product for new product development. I wouldn’t consider my usage niche, but then again, I am not sure what you may consider to be niche or not.
- dilawar 4y agoIsn't grammarly using lisp?
- hajile 4y agoI did some work for a machine translation business that used Common Lisp as their "secret sauce". As they considered it a serious competitive advantage, you wouldn't hear about it anywhere. I've seen this with quite a few other companies since, but that means that lots of companies could be using lisp and nobody would ever know about it.
- kazinator 4y agoSome years ago I read the same "secret weapon" rhetoric on a website dedicated to ... Cobol; I've not taken it seriously since.
- thoueioruo2i34 4y agoOne of the biggest workloads on Google's Borg is the one running the flight-scheduling service that run on CL.