Better HN
topnewbestaskshowjobs
Log inSign up

hellofunk

9,428 karma · joined Jul 10, 2015 (11y ago) · 3,276 submissions

John Bellick, Mexico City
Submissions

comment 9y ago · link · parent

> Edit: prove it otherwise.

> Edit2: it's not me who needs to prove lisp is useful. At least, be honest with yourselves.

This is one of the great fallacies among the naive in their logic.

For example: I know for a fact that you never wear underwear. I don't have to prove this, because it is a fact. If you don't agree, then it is up to you to prove otherwise.

See how that reasoning works?

Thank goodness the criminal justice system in most Western nations doesn't rely on that logic.

comment 9y ago · link · parent

Addressing one of your own delusions from above:

> Homoiconicity is practically useless

So many libraries in Clojure that lead to serious productivity benefits rely on macros, which in turn are possible because of homoiconicity. It's more than useful, it's a key ingredient in the power of the language. You can extend and embed the language or sub-languages or quickly write a particularly potent DSL in just a few lines of code in Clojure thanks to this feature.

Compare this to language that offer macros but without homoiconicity and the benefits are clear. The two different ways to write macros in C and C++ involve language semantics and syntax that are quite different from the regular syntax. In Clojure, the language is identical, you can actually control the compilation process using the same regular Clojure code that you use everywhere else. It's really quite amazing how far this gets you.

comment 9y ago · link · parent

> It's mostly used with webprogramming which is the easiest domain out there.

I had to laugh out loud at that one.

comment 9y ago · link · parent

> It cannot be extinguishes as it never took of.

I'm not sure what you mean by "never took off" but thousands of developers around the world, myself included, have made their living just writing Clojure code for many years. So, it has certainly taken off for them. And there are many, many companies using it all over the world. I live in a town of about half a million people, so not super big, and there are about 12 companies primarily operating on a Clojure codebase.

comment 9y ago · link · parent

> If you don't know how logic works then why programming?

Logic and precedence rules are two different things. I know plenty of Haskell devs who frequently consult not just the precedence but also the associativity (right/left) or operators or functions when reading or writing their code. C++ also has a very long list of precedence rules. It's not trivial and many find the lack of these added complexities an advantage in the simple lisp syntax.

> It won't, it'll just make the code monoton and harder to look at.

True, only if you haven't written much lisp.

I suspect you are trolling here, possibly, so maybe my feedback won't matter.

comment 9y ago · link · parent

It's also not idiomatic to write "doSomething" instead of do-something, but I thought those mentions detracted from the point.

comment 9y ago · link · parent

> (still 4 parens, however)

My example has 2 parens.

Even if you're not excited about the JVM, ClojureScript is particularly productive for front end development, where I genuinely love it tremendously.

comment 9y ago · link · parent

And in Clojure:

     (let [a 123
           b 456
           c 789]
        ...)
Clojure syntax was designed with a clear and deliberate attempt to remove many of the parenthesis from lisp syntax. This is just a part of the greater design goal of offering very concise and elegant syntax in general, which is one of the reasons I keep coming back to it.

comment 9y ago · link · parent

You don't need emacs for good parenthesis control. The same tools emacs uses for this are available in about a dozen editors at least. Vim, Atom, Cursive/IntelliJ, Eclipse, Sublime Text, it's pretty common in most good editors.

comment 9y ago · link · parent

> Last time I checked there were not more parenthesis in lisp than parenthesis+brackets+curly brackets on other languages.

This is true a lot of the time. Also, commas don't exist in Clojure.

So you might have this in a C-like language:

     if ((foo > bar) && (bar > boo)) {
        doSomething(a,b,c);
     } else {
        doSomethingElse(d,e,f);
     }
And in Clojure:

     (if (> foo bar boo)
         (doSomething a b c)
         (doSomethingElse d e f))
Another interesting side effect is that in C-like lang, one my say that due to precedence rules, (foo > bar) does not need the parenthesis since && is lower precedence. Yet, if you weren't sure, you'd have to take a short break and go look that up to be certain. Most devs will just keep the parenthesis instead of take that little break, or they will write them in anyway for readability. In Lisp, precedence rules are never an issue because all operators and functions are applied the same way. So the parenthesis might seem cumbersome at first, but they quickly make syntax quite a lot simpler.

comment 9y ago · link · parent

The parenthesis disappear from your thoughts after a few days, especially if you are using a proper editor with a feature like paredit.

Clojure improves on this compared to other lisps because it uses brackets and squiggly braces instead of parenthesis for a lot of its syntax, making that aspect much easier to read.

Just stick with it, you will see it is a non-issue after you get started in earnest.

comment 9y ago · link · parent

Ten years ago (appoximately) I read an article about how PHP was dying, thanks in part to many new languages cropping up. But I see PHP mentioned all the time here on HN, and the PHP meetups in my area are frequent and popular, and major companies run on PHP.

For decades, there have been rumors about the death of dynamic languages in general. And yet the decades pass and not only do those languages continue to flourish, but others come along and get popular too.

Clojure just turned 10 years old and I see no signs of it slowing down. They did consolidate their 2 major conferences in the States into just one annual conference, so there's that (which may not mean anything). But I am in a large city and companies keep appearing and starting up with Clojure as their key language.

With Clojure, it's an oddball because it is very simple and very powerful. Oftentimes, simple languages are not so powerful, and powerful languages are not so simple. But with Clojure, you can very easily get yourself into the situation of having extremely dense logic in just a few lines, where another language might easily take 10x (or more) lines to accomplish the same. This leads to code that can indeed be difficult to read later, especially if you are on a team and others must help maintain it. The Clojure community has come up with some excellent solutions to this problem, most recently the Clojure.spec library which is gaining wide adoption, which not only makes such "cleverness" easier to understand when reading it, but also makes a codebase automatically testable with property generators, which is a major feature. But your point about readability is always going to exist with a language like Clojure if it isn't written with a team in mind. That doesn't take away from its power though, in my opinion.

However, there is one particularly indispensable tool that Clojure offers that I have not seen anything to meaningfully compete with for productivity, and that's ClojureScript. Writing a front end with Reagent or even the alternative libraries is such a major win over everything else I've tried. I've worked a bit with Elm, Typescript, Reason, Bucklescript -- I am so spoiled by the extremely fast turnaround and easy interaction with very powerful features like React in Clojurescript that I don't see anything on the horizon that will come close to replacing that workflow for now. Perhaps some day something will come along to shine an even brighter light on how front ends can be developed, but for now, ClojureScript remains one of the most significant contributions to the software industry in many, many years.

comment 9y ago · link · parent

You mean "but making money on software is hard!"

comment 9y ago · link · parent

Personally, I'd love this (except without any dependence on Qt).

comment 9y ago · link · parent

I don't quite understand the relevance here of the server. An SPA may or may not have a tight interaction with a server. Most of the time, an SPA to me is mostly living as a browser process, with occasional interaction with a server, but that doesn't have to be the case. If it is too tightly tied to a server, then it's not really a true front-end application, it's more like a web site in that regard. SPAs are usually more than a window into a server, they are a dynamic application unto themselves.

comment 9y ago · link · parent

I hope you're not serious. When we talk about an SPA, we're not talking about how it looks or animates. We're talking about functionality, really.

comment 9y ago · link · parent

Well, we can thank companies like Google, and the powerful role that email ended up playing in our world, for the simple fact that web-based email took off, and therefore email clients that ran on web pages became not only important but also the key to the bottom line for some companies. And when those companies then invested billions of dollars into browser technology to make it an even better platform for their content, and increased the power of JS and what a browser can do, then writing complex applications became inevitable.

And the trend only continues, with the wave of virtual DOM technologies that have taken what used to be a static-based layout engine and made it quite dynamic.

As for popularity, is there any other competing medium that allows an app to pretty much instantly run anywhere regardless of platform without user installation? No. And for that reason, they will always remain an intriguing way to distribute software.

Just as many of the first apps for iphoneOS ten years ago were silly and stupid, a lot of it boils down to taste. Not all web apps are worth it, but so many are! Tastes will evolve for both users and developers.

comment 9y ago · link · parent

> I tend to agree that all the SPA hype and all the additional levels of abstraction on top of HTML+JS+CSS need to go in favour of lightweight readable dead-simple sites, this is what the web is meant for in the end. For apps we have apps.

I kind of disagree. The web is no longer about a single consistent form of content. You have sites. And you have web apps. They are not the same thing. When people ask me what I do for a living, I say, "I write web apps." They often say, "oh, cool, I've been looking for a web designer." I say, "no, I don't really do web design for web sites, I build software applications that run on a web page." So maybe the world isn't entirely used to the concept yet, but that doesn't mean there isn't a valid separation. A web app should not be like an informational web site, and vice versa. But that doesn't mean one should disappear. That's up to designers to understand, not really for users to understand.

comment 9y ago · link · parent

> Setting up on new computer has been painful

What about Selective Sync which has been there for years?

comment 9y ago · link · parent

I'm getting downvoted but am genuinely curious if that is a possibility.

comment 9y ago · link · parent

May not be admirable qualities, but they are often qualities of genius. The paranoia of Goedel was about as debilitating as it comes. And if you read a good Einstein biography, I think you'll discover more about him than you were expecting.

comment 9y ago · link · parent

What you are talking about is sentiment analysis, and you are right that tops often form when everyone is raving about the unstoppable force of the market. I know many traders whose careers are based on mainly on sentiment study; it's not just mere anecdotes.

comment 9y ago · link · parent

Is it possible the Fed is buying into the market to keep it up?

comment 9y ago · link · parent

I think you mean Clojure, not Closure. The latter is a library by Google.

comment 9y ago · link · parent

Haskell is really the intersection of functional programming and static typing at the highest level, and these are 2 very different things, and it will be very easy to get lost in the typing aspect for fear of not grasping the functional aspect.

If your goal is to teach just functional programming, then Haskell may be too much since the language is about a lot more than just functional programming.

Scheme or a light lisp (including Clojure) is often the way FP is initially taught, since you can focus directly on the functional aspects and leave the complexities of static typing out of it. This was the tradition at MIT for a long time (maybe still is).

comment 9y ago · link · parent

This is an insult to addicts of every kind, everywhere.

comment 9y ago · link · parent

Mushrooms were made illegal in the netherlands a few years ago, but "magic truffles" are a loophole in the law because they are not mushrooms, so they are still for sale. It's a bid of a shady distinction.

comment 9y ago · link · parent

The cognitive overhead is really not about type annotations. It's about program structure. If you watch the video, I think there are some good points made.

comment 9y ago · link · parent

No. See here: http://learnyousomeerlang.com/what-is-otp

comment 9y ago · link · parent

Ironically, those who prefer dynamically typed languages would make the exact same argument.
1
414243
110