Live data from Hacker News

How to write Common Lisp in 2017 – an initiation manual

articulate-lisp.com

241–250 of 271 posts

Re: How to write Common Lisp in 2017 – an initiation manual

#241

Earlier quoted context omitted.

R is pretty pointless though. Unless you want to rewrite everything between prototyping in R and real deployment with a real language, you are better off writing in Python.

That right there is what I am talking about. I make a point and people have to attack that that the language is pointless when it is the number one language in that domain, which just happened the last two years. Why would you ever have to rewrite the code? Python isn't faster and has less function then R and if you want you can just drop a few lines of Python in a cell of a Notebook. I like Python and its a good cho…

>I make a point and people have to attack that that the language is pointless when it is the number one language in that domain, which just happened the last two years.

That's not true though, R doesn't have anywhere near the ecosystem that Python does for Natural Language Processing, Web Frameworks, Machine Learning, Computer Algebra and Symbolic Reasoning, Systems Programming, Image Processing, Document Processing, and other things I don't know about but if I needed something else then I can use Python confidently that there will be good packages for them with a community around it.

The entirety of R's unique mindshare is that it has a million variations on linear regression and contingency table tests. And frankly they're all so simple to implement that if you can't be bothered to learn how to implement it in 2 lines of Python then you probably don't know what your program is actually doing.

R is something that caught on because it made its statistics package top-level, saving keystrokes for statistics and bio-statistics professors who never needed anything else and didn't know how to otherwise program. It's unique syntax has lead their poor students to have to learn C-family syntax many years after they could have been working and being productive with it.

Now some companies are accommodating R for their entry-level data scientist positions in order to hire cheaper help that can't find better options, but their skills are limited by being disconnected from the rest of the programming world in both packages and syntax.

Re: How to write Common Lisp in 2017 – an initiation manual

#242

Earlier quoted context omitted.

Clojure is tied to the Java environment. Someone who has no use for or interest in that environment has no use for Clojure.

> Clojure is tied to the Java environment. I guess you're not familiar with ClojureScript and/or Clojure CLR?

"Clojure" is being used as a family name for similar, but incompatible dialects. If I were Hickey, I'd trademark it and enforce against these projects.

Look at lispm's comment: https://news.ycombinator.com/item?id=13984011

It's not just the platform libs, but the semantics of things that really should be portable.

Re: How to write Common Lisp in 2017 – an initiation manual

#243

I started a big project at work using Common Lisp in 2017 and could not be happier. Sure, most nice features have trickled down to other languages, but they are rarely as nicely integrated. And Lisp still has many advantages that are not found elsewhere: Unmatched stability, on-demand performance, tunable compiler, CLOS, condition system, and Macros to name a few. It has its warts too but which language does not? I f…

Which lisp implementation are you using? I had the pleasureof using AllegroCL at a gig I did recently. The environment has a bit of a learning curve, but once everything clicks it is like heroin. I ended that job a couple of months ago, but I still have wet dreams about it.

Was it just Allegro CL? or Did you also use it for other Franz Products? We use it at work for freebsd and it's pretty nice.

Re: How to write Common Lisp in 2017 – an initiation manual

#244
post #117

I've been working on a CL project for a couple of years. Was my first big stab at using CL for something other than a toy. Sbcl is a nice choice, but far from the only option. It has many tradeoffs. CL is not without its frustrations. Documentation that has not aged well. A community that can be less than welcoming. (in contrast to say the Racket community) Inconsistencies, e.g. first, nth, elt, getf, aref... However…

This talks about GC settings that worked for them in SBCL for production, not sure if you already tried the same kind of stuff but may be an interesting read http://tech.grammarly.com/blog/posts/Running-Lisp-in-Product... . If you can make an easy to run example of the garbage collector not working correctly, the folks in #sbcl on freenode are very responsive and have commit access to fix it.

They say to never #+sbcl (gc :full t) ;;ar

Re: How to write Common Lisp in 2017 – an initiation manual

#245
post #105

Earlier quoted context omitted.

Do you prefer it over Clojure? If yes why? I'm a bit versed with Clojure but sometimes I feel that it is not a true lisp.

> sometimes I feel that it is not a true lisp. That feeling may be the result of some questionable syntactic design decisions in Clojure. Hickey went over Lisp syntax and tried to remove parentheses wherever possible. (It was the hip thing, PG's Arc did it, too, which may be where Hickey got it from.) As a result, you get a sub-par editing experience —generic sexp-based structure editing doesn't get you as far as wit…

So you seen that video? Great talk though.

Re: How to write Common Lisp in 2017 – an initiation manual

#246
post #105

Earlier quoted context omitted.

Do you prefer it over Clojure? If yes why? I'm a bit versed with Clojure but sometimes I feel that it is not a true lisp.

> sometimes I feel that it is not a true lisp. That feeling may be the result of some questionable syntactic design decisions in Clojure. Hickey went over Lisp syntax and tried to remove parentheses wherever possible. (It was the hip thing, PG's Arc did it, too, which may be where Hickey got it from.) As a result, you get a sub-par editing experience —generic sexp-based structure editing doesn't get you as far as wit…

> you get a sub-par editing experience [in Clojure]

Paredit and vim-sexp have no problem doing structural editing. I don't use it myself, but Parinfer was created with Clojure in mind and people seem incredibly happy with it.

> diminished readability [in Clojure]

If you watched the talk that you lifted "complected" from, you'd know that this is subjective. Is German unreadable because I don't know German?

> Clojure syntax is a "complected" derivative of Lisp :-)

Complected in some ways sure, but far less so than many lisps, and certainly less so than Common Lisp. It seems your familiarity is complected with your reasoning.

Re: How to write Common Lisp in 2017 – an initiation manual

#247

Earlier quoted context omitted.

That right there is what I am talking about. I make a point and people have to attack that that the language is pointless when it is the number one language in that domain, which just happened the last two years. Why would you ever have to rewrite the code? Python isn't faster and has less function then R and if you want you can just drop a few lines of Python in a cell of a Notebook. I like Python and its a good cho…

>I make a point and people have to attack that that the language is pointless when it is the number one language in that domain, which just happened the last two years. That's not true though, R doesn't have anywhere near the ecosystem that Python does for Natural Language Processing, Web Frameworks, Machine Learning, Computer Algebra and Symbolic Reasoning, Systems Programming, Image Processing, Document Processing,…

> That's not true though, R doesn't have ...

Your comparing a general purpose language and a domain specific language.

Domain specific just talking in statistics and data science. I don't need a webframe work I need to make my report and have the charts work. I also push out my reports in Word and PowerPoint and I can't do that in Python but I can in R with ReportR library (The whole reason why I left Python and Pandas and came to R)

I say if you want to do more then the domain specific then sure Python is an awesome language and you can use your Python skills for more, but if you want the extras that the domain specific language gives you come on board.

To say R is a "Pointless Language" is very troll like especially with companies spend millions of investment and infrastructure that have come to R in the last 24 months.

I could also say what I always say about Python. It is the World's Great Second Best Lanaguge. It doesn't do anything "best", but it is a awesome second best and if that is fine with you have fun. I love Python but I also see the limits of the language. I thought 15 years ago Python would revolutionize everything and everything would be written in it. We now have Lua that took over for game scripting. We have C++ still ruling the day for applications. Web development has been dominated by JavaScript and Mobile development and Python is well .... So the two largest platforms aren't really impacted by Python.

> Now some companies are accommodating R for their entry-level data scientist positions in order to hire cheaper help

http://www.datasciencecentral.com/forum/topics/what-pays-mos...

http://www.kdnuggets.com/2015/05/r-vs-python-data-science.ht...

It isn't a clear picture but NO way is Python dominating in pay or work. R is a GREAT language and so is Python but for some weird reason Python community hates on R. While the developers of R and Python respect and work with eachother and help both sides. I am shocked you feel Python is so over powerfully awesome.

Re: How to write Common Lisp in 2017 – an initiation manual

#248
post #120

Earlier quoted context omitted.

I have used both in production setting and can say that the tooling for most CL implementations is just plain light years ahead of Clojure, and there is no sign of it really improving. For Clojure the interactive debugging experience is just plain dreadful and for a dynamic language this is pants on head crazy imo. For me a dynamic language has to have a good interactive debugging experience because you have foregone…

The JVM indeed quickly got me disinterested in Clojure. However, I have similar issues with other (free) Lisps, with probably only Emacs Lisp being the exception. As a Smalltalker ("the other heroin of the programming world") I'm used to a highly integrated and responsive development environment; from what I heard from other Lispers, the quick feedback and gradual building up of your program is a shared aspect, but t…

You might find MIT Scheme interesting, because it has a built-in Emacs clone. Just call (edit) and you're in.

I think what it really comes down to is that writing and maintaining an editor (especially a good one) is a very large task. A language that lets you use an editor you already like thus has a double advantage, with the possible downside that the integration won't be as good as possible. SLIME is pretty nice though.

Re: How to write Common Lisp in 2017 – an initiation manual

#249
post #199

Earlier quoted context omitted.

But this is true for anything that's in the callee position, right? Either it can be determined (possibly via static flow analysis) that it's a particular function, in which case it is inlined; or else it is an unknown function, in which case it won't be. It would seem that statically verifying that something is a vector reference isn't really harder than doing the same for a function, all else being equal.

if a Common Lisp compiler sees a call to cl:aref then it can inline it, without using static flow analysis or similar...

I was under the impression that CL compilers already had to do a lot of fairly complicated static analysis to achieve acceptable performance, because of dynamic typing.

Re: How to write Common Lisp in 2017 – an initiation manual

#250
post #232

Earlier quoted context omitted.

> * The relation between the various native data-types were quite unclear to me. http://sellout.github.io/media/CL-type-hierarchy.png

> http://sellout.github.io/media/CL-type-hierarchy.png Indeed. Take for example base-char, which is a type. base-char derives (derives? the straight solid black line is not represented in the legend) from character, which is a built-in class (according to legend). So is character a class too? does base-char encapsulate a character or something like it? Before anyone comment, please keep in mind that this comment does…

Types in Common Lisp may or may not be represented by classes (all classes are types, not all types are classes). In this case, character is indeed a class, while base-char is not.

It's definitely true to say that base-char is a subtype of character, in that some characters are also base-chars, while others are not. (The spec defines that there are at least 96 standard characters, all of which are of type standard-char, and thus also of type base-char. Implementations may add others. Interestingly, the spec doesn't define how those characters are encoded; of course most modern implementations use some variant of Unicode.)

Some examples:

    (typep #\A 'base-char) ⇒ true
    (typep #\A 'standard-char) ⇒ true
    (typep #\A 'extended-char) ⇒ false
    (typep #\A 'character) ⇒ true
    (typep #\𝀽 'base-char) ⇒ false
    (typep #\𝀽 'extended-char) ⇒ true
etc.
Post reply on HN