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

I think most Clojure devs would definitely agree with Norvig on this one (and on most things -- Norvig does actually know what he is talking about.)

Design patterns are indeed common and necessary in some languages that are not as flexible. But few languages are as flexible as a lisp, with all the pros and cons that brings. Focusing on re-usable patterns to force on very different problem domains is counterproductive in a language that gives you much better (and more creative) ways of solving problems.

comment 9y ago · link · parent

> The project is about ~100,000 LOC

And I'd bet money that if that same project were translated into ClojureScript, it would be less than one-third that size for the same benefits.

comment 9y ago · link · parent

> Plus most of modern JavaScript has most of the same benefits as Clojure anyway

Except for the very elegant syntax. Your Clojure code will be at least half the size of equivalent JS code, probably much less than that. And without pulling in explicit dependencies on ImmutableJS, React and others.

Projects with less code have less bugs and are more fun to think about, in general. That's something extra Clojure brings to the table.

comment 9y ago · link · parent

Immutable programming with proper immutable data structures (i.e. persistent) is very different than immutable programming in a language with lots of constructs for mutation.

You can throw "const" on things but that isn't really the same kind of immutable programming that exists in Clojure.

Because immutable programming is not just about data not changing, it's about the transformations you can do on that data without concern for the costs that would arise if you did those same transformations in a language without immutable data structures.

comment 9y ago · link · parent

This article might appeal to some out of curiousity but it is not of much practical value. Design patterns are not a thing in Clojure. The whole idea behind the flexibility of the language is that you don't need a pre-existing pattern to force on your problem; instead, the language makes it possible for each problem to build its own pattern. (And that is the point, I think, in this article.)

I've worked with and around Clojure developers for years now, and no one talks about traditional design patterns. Design patterns add complexity, not simplicity, to a language. By contrast, Clojure solutions are relatively simple. Design patterns often evolve in languages where you struggle against the language's design to express a solution. When a language strips away those obstacles, pre-existing patterns become less necessary.

comment 9y ago · link · parent

I agree. I've worked in both Elm and ClojureScript. In one, I have to constantly deal with compiler errors. In the other, about as much runtime errors. The net time for error handling is the same. But the net time in actually writing code is in favor of ClojureScript, which requires at least half as many lines as Elm (and often much less than half).

Error handling is somewhat over-emphasized in comparison to other things that affect productivity (and maintainability).

comment 9y ago · link · parent

Actually, my experience in Europe is that some organizations only remove data that is visible by others on the same continent or even just a single country in the EU, while allowing that content to remain visible outside the EU.

comment 9y ago · link · parent

I don't think the 8-meg phrase was ever the official name of the program that "emacs" stands for.

comment 9y ago · link · parent

> Haskell is the easiest path to practicing FP

Have to disagree here. Haskell is good for learning about advanced type systems along with FP.

But for the "easiest" path to just learning FP, Scheme, SML, even Clojure are far more approachable.

comment 9y ago · link · parent

I would invite the OP to read a basic book on music theory, any good undergrad-level text should do, before stating some of the "facts" he is making, which are just untrue.

For one thing, the author is confusing physical pitches with musical notes. C double-sharp exists and is enharmonic to D, for example, because the frequencies are the same. But these are very different notes in a musical context.

There are many examples of this in the article that would be cleared up by a basic understanding of music theory that all music students complete, many of whom do this in piano lessons growing up long before graduating from highschool.

I admire the effort, but I often see people analyze music from a perspective that is not actually that of a musician, and there are always huge gaps in the understanding that needn't be there if they sought a basic knowledge of the matter.

Example:

> For some reason I don't totally understand, some have 2 names (e.g. C#=Db, D#=Eb, F#=Gb, A#=Bb).

Fair enough, you don't understand this, so that should be a clue that more knowledge is necessary before making this claim:

> There is also no E#. It just doesn't exist. Get used to it. Those are the 12 notes.

Incidentally, it goes much further than this, and for good reasons. F is the same pitch as E# and G-double-flat, but all three are distinct musical notes which serve different purposes.

There's also C-flat, B, A-double-sharp.

And B#, C, D-double-flat, etc.

comment 9y ago · link · parent

Your comment is unclear.

comment 9y ago · link · parent

Shostakovich is a 20th Century composer, died in the 1970s, so at least as far as he is concerned, he wrote music with today's tuning systems.

comment 9y ago · link · parent

Why is that scary? React's paradigm has changed how UIs are built in many different platforms. And you don't have to use React directly to enjoy its paradigm since other libraries and technologies have appeared that follow the same approach.

comment 9y ago · link · parent

> Twenty serious adverse events were reported, that were all considered unrelated to the intervention.

Including one death.

comment 9y ago · link · parent

10 degrees C was used as "cold" in this study, as per the article.

1186.

Hot drinks probably cause cancer, warns World Health Organisation (2016)(telegraph.co.uk ↗)

1 points · by hellofunk · 9y ago · discuss

comment 9y ago · link · parent

I suppose the newer BroadcastChannel would be an option too, for high performance multi-window usage.

comment 9y ago · link · parent

I find myself wondering how important the "fun facts" are in this fascinating thread about Go:

https://twitter.com/pasiphae_goals/status/923820615022399488

comment 9y ago · link · parent

How are portals implemented? Are they using broadcastchannel API or postmessage, etc, to communicate between the windows in the same app?

comment 9y ago · link · parent

> having a better modal editor than what evil is already providing

FWIW, after using Evil for 1 year and generally liking it, it still fell a bit short for me since you are still in emacs and still need emacs keybindings some of the time, and some other modes will conflict with Evil, so it was a bit hard to maintain. I switched from Evil to God Mode which gives you modal editing in emacs but using emacs key bindings. I have found this to be a good compromise.

1191.

Megacomputers and the Quest to Understand Superstorms(wired.com ↗)

2 points · by hellofunk · 9y ago · discuss

1192.

China warns on overseas content after publisher Springer Nature pulls articles(straitstimes.com ↗)

1 points · by hellofunk · 9y ago · discuss

comment 9y ago · link · parent

This article reads like an April fools joke.

comment 9y ago · link · parent

Another comment here claims that that photo is mislabeled and not an Amazon property.

comment 9y ago · link · parent

Ah, well I get that same behavior in Emacs. Doesn't always help though.

1196.

This Company Just Gave Non-Smokers 6 Days Off to Compensate for Cigarette Breaks(boredpanda.com ↗)

2 points · by hellofunk · 9y ago · discuss

comment 9y ago · link · parent

How does Cursive know if you're pulling out a valid keyword in a map?

comment 9y ago · link · parent

> I didn't really understand his talk I think he was too abstract

Then you better stay away from another talk at the same conference, by Guy Steele [0] !

[0] https://www.youtube.com/watch?v=dCuZkaaou0Q

comment 9y ago · link · parent

I was surprised to see Haskell in widespread use at several large enterprise companies in Singapore.

comment 9y ago · link · parent

Rich was a professor of an advanced C++ class (at NYU, I think) in the late 90s, and wrote a very popular paper on how to get some killer performance out of that language. He's been around the block and knows a thing or two about these things.
1
394041
110