28 ms·
Why Lisp is now an acceptable scripting language
- gkya 11y agoArchived version from 11th of March: https://web.archive.org/web/20160311062403/http://fare.tunes.org/files/asdf3/asdf3-2014.html https://web.archive.org/web/20160311062403/http://fare.tunes...
- clishem 11y ago1. Doesn't work either for me. 2. http://webcache.googleusercontent.com/search?q=cache:LWgWzFIG_0wJ:fare.tunes.org/files/asdf3/asdf3-els2014.pdf+&cd=2&hl=nl&ct=clnk&gl=nl http://webcache.googleusercontent.com/search?q=cache:LWgWzFI...
- plugnburn 11y agoWhen I opened the page, I honestly thought CSS failed to load. But then I looked at the first line of the page source: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> I think they really shouldn't tell us what is now an acceptable scripting language if they still consider that design and that doctype acceptable in 2016.
- itsunbelievable 11y agoThis is sickening-grade bikeshedding. Next time, spare us, and say it to your rubber duck instead.
- shrugger 11y agodeleted b/c brigading
- ZenoArrow 11y agoHaving an insight into one area of computing doesn't make you an expert in all areas of computing.
- shrugger 11y agodeleted b/c brigading
- ZenoArrow 11y agoConsider if I was an expert in databases. Why would the appearance of a site dedicated to databases matter? It'd be completely unrelated to the topic I'd be sharing information on, and time I could spend improving the site could be time I spend improving my knowledge even further. As for this Lisp scripting site, for all I care the author could've shared the information via a Pastebin site and I would've got the same value out of it.
- yoklov 11y agoAnd this happens regularly! I know of experts in programming languages[0], compression[1], graphics[2, 3], and computational geometry[3] who all have sites that both have excellent content, and look fairly awful. [0]: http://piumarta.com/index.html http://piumarta.com/index.html [1]: http://cbloom.com/ http://cbloom.com/ [2]: http://iquilezles.org/ http://iquilezles.org/ (okay, this one doesn't look that bad in retrospect) [3]: http://paulbourke.net/ http://paulbourke.net/
- ktRolster 11y ago[0] and [3] look great, unless you are opposed to simplicity. They kind of follow "brutalism" in a web architecture.
- plugnburn 11y agoExcept that most pastebins would at least make the text more readable than it is there. Especially on mobiles. Markdown with Strapdown inclusion, a pastebin, a CMS, bare Bootstrap... anything would be more readable than this.
- trajing 11y agoI feel as though this is at least somewhat relevant: http://motherfuckingwebsite.com http://motherfuckingwebsite.com
- cisstrd 11y agoThen surely, so is this http://bettermotherfuckingwebsite.com/ http://bettermotherfuckingwebsite.com/
- deleted 11y ago[deleted]
- JetSetWilly 11y agoThey made it washed out with poor contrast and made the lines annoyingly short. Seems like the first site is more readable to me.
- coldtea 11y agoEverything we know from centuries of design experience and all science knows about the eyes and how we read, tells us they made it better than the first site. There's not even a parallel universe where the first one is better -- and it's not a subjective issue either.
- JetSetWilly 11y agoWhat papers say that low contrast is better than high contrast black on white? There is research to show that black on white is better than white on black, but I doubt there's any to show that poor contrast dark grey on light grey is better than black on white. It is just a fashion, there's no science to say that low contrast is better. http://contrastrebellion.com/ http://contrastrebellion.com/ Shorter lines I might grant you, though.
- coldtea 11y ago>What papers say that low contrast is better than high contrast black on white? Not about low contrast being better -- only about (slightly) reduced contrast than full on white on black blaze. Black on white is better for readability, but the brightness can induce fatigue for longer term use (and people use computers all day long) and also hurt knowledge retention (according to educational related research). A slightly off-white is better there than shining a white backlight on your eyes for hours on end (and adjusting monitor brightness achieves the same effect, color-wise as having a "less white" background in the first place, and is recommended by doctors).
- agumonkey 11y agoI hope he doesn't look at HN HTML code.
- plugnburn 11y agoLooked. So what? There's a difference between "ugly" and "invalid". Both cases are bad but the first one has much more impact on end users. Edit to answer "how is it invalid": is this not enough? http://validator.w3.org/check?uri=http%3A%2F%2Fnews.ycombinator.com&charset=%28detect+automatically%29&doctype=Inline&group=0 http://validator.w3.org/check?uri=http%3A%2F%2Fnews.ycombina...
- agumonkey 11y agoHow is it invalid ?
- agumonkey 11y agoThis is HN webpage, I meant the article page doctype. taken from w3c: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> article doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- plugnburn 11y agoI meant that website is probably valid but ugly, and HN page is vice versa.
- plugnburn 11y agoDid you just register to say that? Hilarious. I'd always laughed at "developers" that can't even arrange their own websites properly and still try to educate us about what's acceptable and what is not. Don't know a thing about web design? Use a ready-made blogging platform then, not a school-grade HTML4 style-less nonsense. No one forces you to roll your own solution every single time. But heck, even a simple Bootstrap-based page would be much more readable. Seriously, it reminded me of my very first HTML page made in school in 2004 when I knew nothing of it. The only difference is that I omitted the doctype altogether back then. P.S. HN thinks that I'm "submitting too fast", so it took me about an hour to wait for an ability to reply.
- LukeB_UK 11y agoThis is the website of John Walker, cofounder of Autodesk: https://www.fourmilab.ch/ https://www.fourmilab.ch/ There are lots of good articles on there, but the site uses frames. Does that detract from the quality of the content? No. Paul Graham's site: http://www.paulgraham.com/ http://www.paulgraham.com/ Has a HTML 4.01 Transitional doctype and uses tables for layouts. Does that detract from the content? No. Hell, you're on hacker news. It doesn't even define a doctype and also uses tables for layouts.
- plugnburn 11y agoYou are obviously trying to do some appeal to authority, which doesn't work on me. No one is an authority for me. > This is the website of John Walker, cofounder of Autodesk If he's a cofounder of Autodesk and can't make a decent website himself, how hard would it be to pay someone who can? > Paul Graham's site Even worse than the former. Someone, stop that pain, tell him finally how to adjust screen resolution over 640x480! > Does that detract from the quality of the content? Yes. It shows the real attitude to the target audience. > Hell, you're on hacker news. It doesn't even define a doctype and also uses tables for layouts. Correct, but at least it has some CSS and doesn't look like a hello-from-nineties.
- LukeB_UK 11y ago
- kovek 11y agoI am not sure if this is a case of what this website calls "composition/division" or "genetic": https://yourlogicalfallacyis.com/composition-division https://yourlogicalfallacyis.com/composition-division
- Matt3o12_ 11y agoI don't see anything wrong with that. Just because it doesn't use the fanciest and newest version of bootstrap, doesn't mean the site is bad. Sure it uses an old version of HTML but what the heck? It can read it just fine and safari's reader works perfectly – much better then most of the sites that use modern CSS. I'd rather have a site that loads quickly then a site that loads tons of MBs for scripts, big images and fonts (and thus eats up all my mobile bandwidth) just to see a site that breaks safari's reader, and disables zoom so I can barely read it. I'm not saying that all of those fancies sites are like that but a lot are. Especially when they're made by backend engineers who don't know much about UX design. I'd rather get a well made HTML 4 site then a badly made HTML 5 site.
- wtetzner 11y agoLooks like it was created with an older version of Scribble: http://docs.racket-lang.org/scribble/ http://docs.racket-lang.org/scribble/ I'm not sure why that would call the contents into question.
- plugnburn 11y agoIf it's true, then in this case that's literally shouting "I don't give a slightest finger about my users, I'll toss them an autogenerated pile of markup and will not even test if it's legible". There's also a huge difference between "minimalistic" and "outdated". One should exit the cryo-chamber in order to see it though. -------------------------------------------------------------------- To put it all together: The authors of all those sites (as well as their supporters here) seem to live in a parallel universe where all users have nothing but 640x480 VGA cards and Dillo browser is the best one out there, lynx/elinks/w3m is a norm in that universe, and the most recent smartphone of 2016 is called Nokia 9110 Communicator. They may produce the best content but it remains absolutely worthless and can't gain any level of trust until they actually care of delivering that content. If they can't make nice looking (not even to mention the word "responsive") websites themselves, they may ask or hire someone to do it. There's nothing wrong with it. But if such a way was chosen deliberately then it's a good indicator of the attitude to the website users. And if the users bite this and say "yeah, it's ok, we can trust him anyway because he's successful at other fields", it kinda looks like a sect. Questions about why such a "successful person" haven't created a decent site (himself or with someone's help) remain unanswered. So be it. Because, you know, it's pointless to argue with sectants. So, given the level of pseudo-elitist zombie ochlocracy here, I'm not going to discuss this topic any further. Believe whatever you want to believe. Live in a parallel world as long as you can. But rest assured: reality will catch you at the most inopportune moment.
- x1024 11y agoIf an HN post with 10 upvotes makes your site go down, do you really have the right to tell people how to write code?
- coreyp_1 11y ago2 things: 1.) that's more a statement of the hardware than the software, and they may be running on a tight budget (I have no idea b/c I can't see the site). 2.) If it has 10 upvotes, then that probably means that a significantly higher # of people are trying to view the site so they can decide whether or not to vote, which is not a trivial situation if you aren't prepared for it.
- wisienkas 11y agoWould be fun to have a tracker of how many clicked the link from HN as well
- jwdunne 11y agoHave you read the article? Its a guide to ASDF 3, a CL build system, and features that help with scripting. There's nothing "no code consultant" about it. Its not even a philosophy-methodology piece. The above comes across as outright dismissive.
- x1024 11y agoNo, I hadn't read the article. The site was down...
- hellofunk 11y agoIf you don't know the most common causes of a site going down, do you really have the right to ask people if they really have the right to tell people how to write code?
- wtetzner 11y agoNo to mention they're not actually telling people how to write code.
- sdegutis 11y agoBack in 2012 when I was sure I wanted to master some dialect of Lisp but wasn't sure which one yet, I read about 80% of Practical Common Lisp before I noped the heck out of there. The whole reason I was drawn to Lisp was for its semantic and syntactic purity, simplicity, and consistency, and out of the three popular Lisps at the time, CL felt like it had these the least. Ultimately I ended up going with Clojure after a year of flirting with various Schemes.
- mbrock 11y agoI don't think purity and simplicity are virtues of Common Lisp. It's more of a pragmatic, industrial, old language, meant to unify the competing dialects back in the 1980s.
- hga 11y agoOld as in so old, its goes directly back to the first LISP, which was implemented as FORTRAN subroutines which ran on a vacuum tube computer, the IBM 704, which was, at least, advanced enough to use magnetic core memory. Scheme rethought a number of things with the experience of a couple of decades in developing languages, and Common Lisp included one of its breaking changes, lexical scope (I think Gnu Emacs Lisp and AutoCad's AutoLISP are the only widely used dialects with dynamic scope, and they're obviously not primarily language implementations).
- duncanawoods 11y agoI have tried lisps looking for the famed syntactic purity but I didn't really find it. For example, following the little schemer books, they don't print scheme as the actual ascii you need to type, instead they use typography like bold, italic and greek symbols that you have to replace with the uglier reality to distinguish between things like s-expr from lists. It feels like they are embarrassed by the cludgy real syntax, so they hide it and push the difficulty on to the reader. To give clojure a whirl, I was prepared for lispy paren extravagance but when translating a small program to my best guess at idiomatic clojure (I'm sure I failed) there were so many non-s-expr syntactic special cases for things like list comprehensions and common macros that the result felt like it was jealous of non-s-expr languages and didn't actually want to be a lisp. In truth, I believe a strong contrast between different syntactic elements helps readability, so I don't think the s-expr regularity I expected is something I actually want.
- deleted 11y ago[deleted]
- 616c 11y agoPeople who agree with the overall philosophy of this will be interested in avesh, an attempt to write a full shell in CL. https://gitlab.com/ralt/avesh https://gitlab.com/ralt/avesh I am also very interested in xonsh. I am increasingly of the opinion that as useful as a package manager would be like {bash,zsh} compliant shells written in host languages that allow you to merge bashisms/Unixisms into your host lang and vice versa. I started looking into this, specificaly with Haskell. I founde chrisdone's Hell and tangentially turtle. Combining those would be insane!
- vram22 11y agoThere is/was also scsh, a Scheme shell for Unix.
- 616c 11y agoWell, yes, I am aware of it. I had trouble getting scsh to work well. Outside of Guile, I am not even sure what Scheme implementations are viable. I have played with Chicken and Gambit very minimally. IIRC, schs uses the MIT48 or a classic Scheme variant specific to it, and I do not know if there is anything "built" on top of that. Where as least other esoteric schemes (Chicken, Gambit, Gauche, etc.) are full environments people can code in, in theory. Guile is fascinating to me because this concept, subsumed into Emacs (a la the guile->elisp super project), means a very interesting idea that I think moves beyond the IDE. Some people here will poo poo that, but I find it very interesting as I have moved away from tmux and screen and into Emacs as my combined editor AND terminal manager. I know I know, where's the Unix philosophy. But, I like this. Soon I will play with this stack on top of Guix, and well, that is more Lisp Machine that I should be allowed to have.
- vram22 11y agoHave you considered Racket? I believe its a sort of Scheme (experts, feel free to correct me) and a friend told me it has a small but good community. Also, an IDE, many libraries, etc.
- amelius 11y agoCan anybody explain the advantages of switching to a functional language when it is not a pure one? For example, how is it better than Javascript? Is the uniformity of the syntax (and perhaps implicit currying) the main benefit?
- michaelsbradley 11y agoWhich dialect/s of Lisp have implicit currying as a language feature? Or do you have in mind other non-pure functional languages?
- llamaz 11y agoWhen the inputs are similar to the outputs, (e.g. text with linux CLI commands) functions can be very flexible and do things they were not originally designed to do (e.g. linux CLI commands). An assumption that's implicit in what I've said is data flow programming. Data flow programming is when programming is thought of as connecting black boxes with inputs and outputs together. This way of programming is inherently modular. This is to be contrasted with (i) iteration, or recursionn which are inherently un-modular and (ii) The von Neumann model of computation, where there is a separation between code and data, and programming is thought of to be functions acting on the data (the problem with this model is that things need to be executed in a certain order, and sometimes the order isn't explicit in the code, which leads to bugs. Contrast this with data flow programming, where time is modelled explicitly) In LISP, the common interface between functions in the list rather than text. To encourage data flow programming and discourage recusion, map, filter, and fold are provided.
- jwdunne 11y agoI'm not so sure about implicit currying in CL. The uniform syntax that provides homogeny between code and data is exactly the main benefit because, for example, you can go ahead and add implicit currying (and much more). An example result of this benefit is CLOS from memory - a filly featured object system that is composed of extensions to the core language. In fact, I think it has many powerful features not present in archetypical OO languages. Multi-dispatch is one feature I recall from the top of my head.
- JoelMcCracken 11y ago
- EuAndreh 11y agoFrançois-René Rideau has done a lot to evolve ASDF, the Common Lisp build system, and lots have been done since, also, like an implementation manager[0], an assets downloader[1] and compiler[2]. [0]: https://github.com/roswell/roswell https://github.com/roswell/roswell [1]: https://github.com/eudoxia0/rock https://github.com/eudoxia0/rock [2]: https://github.com/eudoxia0/asdf-linguist https://github.com/eudoxia0/asdf-linguist
- dheera 11y agoWell, you can use LISP/Scheme as a procedural language with a little "code obfuscation" ... (define (return x) x) (define (! a b c) (not (b a c))) (define (-- a) (- a 1)) (define (cout junk thing) (display thing)) (define << 'nothing) ;ignore this look at this ;........... ............................................... ( define (__I_AM_HAPPY happiness) ( if(! happiness <= 0) ( begin ( cout << "happy happy joy joy"; ) ( __I_AM_HAPPY (-- happiness); ) ) ; else ( ( return "yay! i'm done with 6.001 project"; ) ) ) ; got that? now we can do this: (__I_AM_HAPPY 10)
- catnaroek 11y agoWait, so now what determines whether a language is “procedural” is its surface syntax rather than its semantics?
- gkya 11y agoJust take a little joke mate. It's fun.
- betenoire 11y agoWhat other kind of syntax is there? But yes, I've seen a lot of procedural code in every paradigm I can think of. Lots of cargo-cult programming results in it.
- jonathankoren 11y agoSit down dear child and hear of languages long ago... Back I. The days of vacuum tube and electromechanical switches, when punch tape rules the world p, there were two languages: The Algorithmic Language, and the List Processor. The List Process, or LISP, to its friends was built around s-expressions. The other, also known as ALGOL, was built around a strange and unholy hybrid of text and formulae that only an insane mathematician would love, for almost every statement was a special case. ALGOL syntax went on to rule the world. Seriously kid. There are only two syntaxes, and procedural, structural, object oriented, aspect, imperative, and all the rest are immaterial to the syntax, for they refer to how programs are organized, not what keys you press on the keyboard. Don't they teach programming languages anymore?
- stewbrew 11y agoNow that scripting languages are almost dead?
- weatherlight 11y agohttp://www.tiobe.com/tiobe_index http://www.tiobe.com/tiobe_index 4/10 top languages are scripting languages. Not bad for something that's almost dead.
- deleted 11y ago[deleted]
- stewbrew 11y agoWhat does that tell us? That there is a lot of legacy perl & php code around that has to be maintained? I personally used to like lisp (scheme actually) and ruby but I would never use them (or another dynamically typed language) again. Never! I'll take another look at common lisp as a (scripting) language when optional static typing is available, standardized, and commonly used. And no, typed clojure and (unfortunately also) typed racket aren't viable alternatives.
- davexunit 11y agoLisp is an acceptable language for a variety of things, not just "scripting". I work on many projects written in Guile Scheme that range from game engines to static site generators to dynamic web applications to package managers, and I write one-off scripting tasks with it, too. There's a lot of mystique around Lisp and Scheme, and people tend to write it off as a relic of academia, but I use it for practical needs every day. Lisps enable a type of development via live coding that I have yet to see a non-Lisp match. I've used the REPL for doing everyday calculator tasks to live coding video games, and I've used it for customizing an X11 window manager in the past, too. But rather than read about me confess my love for Lisp, I recommend that people just pick a Lisp that looks fun and take it for a spin. You might find a lot to like.
- petra 11y ago>> Lisps enable a type of development via live coding that I have yet to see a non-Lisp match. How does it compare to using python for live coding?
- diggan 11y agoin lisps, data is code is data. So imagine you can edit your program while it's running, since it's just data. How that compares to python, I'm not sure. But I don't think you can easily modify python code as easily as you can modify lisp programs.
- vram22 11y ago>you can edit your program while it's running, since it's just data. When I was playing around with Franz Lisp some years ago, I saw this feature, and then soon after, I saw the Edit-and-Go feature in a new MS Visual Studio release. Think I read somewhere that it was ad{a|o}pted from Lisp.
- preek 11y agoIf you want to compare Lisp Live Coding and you know Python, then let me compare it like this: How much faster can you get things done using something like ipython vs. a compiled static language like C(++/#) or Java? I don't want to go into a flamewar against the other languages, of course. Yet, if you favor an ipython repl against the compile/build/test cycle, then Lisp gives you just about the same order of magnitude more power. I've done professional Python coding for 2.5 years, Ruby and JS for 7. I always believed that the REPL combined with those languages being dynamically typed can yield big advantages. With a Lisp you can evaluate your code in real time in your editor. Also your app will re-load your code live without losing it's state. I've done that with Backends, Web Frontends and Mobile Apps. It's pretty awesome, not just compared to everything else^^ Take it for a spin and enjoy the ride(;
- superskierpat 11y agoI recently rewrote many of my shell scripts in guile, a really fun experience. And tail call recursion makes it pretty easy to reason about the code, no more looking up bash cheat sheets every time I write a script
- corragon 11y agoIf someone wanted to get started into Lisp programming, what REPL and resources would you recommend? I began working through SICP a while back, but found it difficult to know what dialect of Lisp to use. As a complete newbie to Lisp, it was near impossible to debug why the code I wrote from SICP didn't work at all.
- arh68 11y agoSICP is written for Scheme, not Common Lisp, so that might've been your issue. They're not at all the same, despite both being Lisps. Just use Common Lisp. I use SBCL. Read Practical Common Lisp [1] &/ ANSI Common Lisp [2]. Skim the CLQR [3]. If you're just starting out, you can get away with just using the REPL. You might get that ^]]A crap when you up-arrow to previous expressions, so install rlwrap and run 'rlwrap sbcl' instead of just 'sbcl'. Once you get tired of that and want to use an editor, get Emacs (on OS X: see [4], on Ubuntu: apt-get install emacs24). Install SLIME [5] through package-install to send expressions down from a .lisp file to the REPL (with C-x C-e). If you get stuck, try looking for youtube videos (or add an email to your HN about). [1] http://www.gigamonkeys.com/book/ http://www.gigamonkeys.com/book/ [2] http://www.paulgraham.com/acl.html http://www.paulgraham.com/acl.html [3] http://clqr.boundp.org/download.html http://clqr.boundp.org/download.html [4] https://emacsformacosx.com/ https://emacsformacosx.com/ [5] https://github.com/slime/slime https://github.com/slime/slime
- groovy2shoes 11y agoFor SICP, you need a Scheme implementation (specifically, one that supports IEEE Scheme if you're using the second edition of the book -- R5RS, the most widely-implemented standard, is a strict superset of IEEE Scheme and works just fine with the code in the book, apart from the non-standard "picture language" stuff in chapter 2). I highly recommend using Racket with the DrRacket IDE and Neil van Dyke's SICP package from the Planet package repository. It's the easiest way to get up and running with an editor and a REPL, and it's got support for the "picture language" in chapter 2. You could also give it a shot with MIT Scheme -- I've got a feeling it's the implementation SICP (2e) was developed with. It's also got a built-in Emacs-like editor called EdWin. Launch the MIT Scheme REPL and type `(edwin)` to get at the editor. GNU Emacs has an extension called Geiser (available in MELPA) that works well to integrate with Racket and Guile. Otherwise, the cmuscheme package that ships with Emacs gives you rudimentary REPL integration with just about any Scheme interpreter (and quite a few Schemes, such as Gambit, come with packages to better integrate with cmuscheme and scheme-mode). If you're not an Emacs user and you're not willing to invest the hour or so it takes to get a handle on the basics, you can, of course, use any editor you want and use the `load` procedure (which, iirc, was omitted from IEEE, but most Schemes have it) at the REPL to import definitions from a file (or there's always good ol' copy+paste). If you want to learn Common Lisp rather than Scheme, you can check out "Successful Lisp" by David Lamkins and/or "Practical Common Lisp" by Peter Seibel, both of which are freely readable on the Web. You'll also want to keep the ANSI Common Lisp HyperSpec by Kent Pitman handy as a reference (also free on the Web). For this, you can grab virtually any ANSI Common Lisp implementation (GNU clisp, SBCL, Clozure CL, ABCL, etc.). GNU Emacs has excellent support via the SLIME package (available from MELPA), or the other-editor with the `load` function will work here, too. If you want to learn Emacs Lisp, GNU Emacs comes with an introductory programming book that uses Emacs Lisp, "An Introduction to Emacs Lisp Programming" by Bob Chassel, and the Emacs Lisp Reference Manual. As you might guess, GNU Emacs has the best editor support for Emacs Lisp, though Vim at least has syntax highlighting for Emacs Lisp. If you want to learn Clojure, the only freely-available book I'm aware of is "Clojure for the Brave and True" by Daniel Higginbotham, though I'm sure there are others. MELPA has the CIDER package available for Clojure support in GNU Emacs. I'm not familiar enough with Clojure at this point to know what the equivalent to `load` is, though. At this point, I've pretty much exhausted my usefulness on this matter. If you want to learn T, ISLISP, EuLisp, Le Lisp, Arc, or any other Lisp dialect for that matter, I can't help you. After all that, I highly recommend starting with SICP. It's really a great introduction to programming, and it also covers quite a few concepts that will likely be new to you even if you're already a programmer (mostly in chapters 3-5). (Disclaimer: although I like most of the Lisp dialects, my favorite is absolutely Scheme, so I may be biased ;)). Pick an (IEEE or R5RS) Scheme interpreter, have a glance over its documentation, and you should be good to go!