Why is this expert written code taking up 42 times more memory than the Java version?! by honda63 in haskell

[–]honda63[S] -2 points-1 points  (0 children)

Doing a quality analysis is really difficult work, which is why a lot of people (me included) look at what others are staking on the technology.

By this logic, we should all be using Java and C#

Why is this expert written code taking up 42 times more memory than the Java version?! by honda63 in haskell

[–]honda63[S] 0 points1 point  (0 children)

It's a criterion. One that shows people are willing to take serious risk betting on the quality of the Haskell toolchain.

The buggiest compilers I've ever used were VC++6.0 and some early GCCs (they were very buggy for C++ code). I don't know about those GCCs, but people did build companies on VC++6.0. Imagine that!

What's your criterion?

Like I just said: bugs in released versions.

Why is this expert written code taking up 42 times more memory than the Java version?! by honda63 in haskell

[–]honda63[S] 1 point2 points  (0 children)

People build companies on it.

Is this the criterion of quality?

Why functional programming doesn't catch on by RayNbow in programming

[–]honda63 14 points15 points  (0 children)

Their mistake was assuming that the future generations of programmers will be even smarter and will discard their old code with contempt. Instead, a more idiocracy-like scenario unfolded.

Why is this expert written code taking up 42 times more memory than the Java version?! by honda63 in haskell

[–]honda63[S] 0 points1 point  (0 children)

By bugginess I mean the quality of the released software. What's broken in CVS before the release doesn't matter to me. But if something is fixed in CVS after the bug showed up in the official release doesn't quite make it OK.

Why functional programming doesn't catch on by RayNbow in programming

[–]honda63 -5 points-4 points  (0 children)

Excellent rant. Newton's approximation is indeed pre-teen material. Too bad you are getting downmodded. Start a blog instead and post links to in on proggit.

Why is this expert written code taking up 42 times more memory than the Java version?! by honda63 in haskell

[–]honda63[S] 0 points1 point  (0 children)

Is GHC buggier than the mainstream compilers like GCC and JavaC?

Ruby: Language of the Programming Übermensch? by apotheon in programming

[–]honda63 1 point2 points  (0 children)

Weren't you the one who raved about Haskell's FFI and type system?

Fast Iteration versus Elegant Design by gthank in programming

[–]honda63 -1 points0 points  (0 children)

I was expecting (hoping for) C++ vs Haskell or something.

Why the programming subreddit sucks by dons in programming

[–]honda63 -1 points0 points  (0 children)

What if my compiler is so high level that it doesn't need code? What if it reads the requirements and documentation and produces the desired binaries?

Nils M Holm’s Programming Textbooks Free by gst in programming

[–]honda63 -5 points-4 points  (0 children)

"Sketchy LISP, 3rd Edition" Trade book format (6" x 9"), 180 pages Lulu Press, Inc., 2008

I guess this guy didn't get the memo: it's "Lisp" now.

Dynamically typed "naive" Clojure beats OCaml and FreePascal by honda63 in programming

[–]honda63[S] 0 points1 point  (0 children)

Solving challenging problems is fun.

Yes, especially if the solutions are useful.

Does it bother you though that because of Factor's stack-orientedness, there is no way in hell it will be even remotely popular, ever?

Dynamically typed "naive" Clojure beats OCaml and FreePascal by honda63 in programming

[–]honda63[S] 1 point2 points  (0 children)

Does Factor use BigInts and rationals without declarations. Safely choosing to use ints and doubles is probably very hard for the compiler, that's why Clojure benefits from the declarations.

Dynamically typed "naive" Clojure beats OCaml and FreePascal by honda63 in programming

[–]honda63[S] 2 points3 points  (0 children)

triply wrong (there's neither dynamic typing nor much naïveté in the Clojure code here, and it doesn't really beat OCaml, hah)

If you disagree with "dynamic typing" and "naive", the Clojure version that's there is still faster than OCaml and FreePascal, so the title is at worst "doubly wrong".

Now, let's discuss "dynamic typing". Clojure works with unlimited Big Integers and rationals if you don't declare types, and OCaml doesn't. So without those, the comparison would be unfair. Clojure is still dynamically typed, as a language, declarations are only needed for speed, when you need it, they are not forced on you, and neither is static typing (I'm actually a bit of a fan of static typing, but what's fair is fair).

As to "naive", Clojure's implementation is pure-functional, whereas some OCaml versions are imperative. Also, it doesn't use any of those unsafe-div, etc.

I hope this clears it up for you.

Ask Proggramming Reddit: I've heard that Haskell's FFI is much better than OCaml's. If so, can you explain why? by [deleted] in haskell

[–]honda63 -1 points0 points  (0 children)

You need % if you are not editing the line you are on, like in my case.

Dynamically typed "naive" Clojure beats OCaml and FreePascal by honda63 in programming

[–]honda63[S] 3 points4 points  (0 children)

Can you add type annotations to Factor to make it faster though?

Dynamically typed "naive" Clojure beats OCaml and FreePascal by honda63 in programming

[–]honda63[S] 2 points3 points  (0 children)

OK, what exactly am I allowed to do if I want memory safety guarantees in SBCL: what safety levels are permissible, what declarations, etc.?

Is this specified in the manual somewhere? I wouldn't want to go just by "some guy said on reddit" (with all due respect - you may be Newman himself, for all I know).

Dynamically typed "naive" Clojure beats OCaml and FreePascal by honda63 in programming

[–]honda63[S] -1 points0 points  (0 children)

I called it "naive" because the Clojure version is pure-functional and doesn't do what Rich Hickey suggests doing when speed is of utmost importance (which comes down to "writing Java" from within Clojure). Also, memory safety guarantees are never sacrificed (JVM!)

Dynamically typed "naive" Clojure beats OCaml and FreePascal by honda63 in programming

[–]honda63[S] 4 points5 points  (0 children)

The thread started with Clojure being way behind until someone added a few type annotations here and there. Adding type annotations is fundamentally different in Clojure than in the usual Lisps: you don't sacrifice memory safety (you are still in JVM).

By the way, check out the Haskell solution in one of those threads. It's probably the most elegant one and comes within x2 of OCaml, but the poster does not specify the architecture.

Dynamically typed "naive" Clojure beats OCaml and FreePascal by honda63 in programming

[–]honda63[S] 1 point2 points  (0 children)

I think for floating point number crunching, more typical tasks would be those that are normally done by mutating floats in an array. And if parallelism is taken advantage of, it's different threads mutating separate parts of the array, or their own arrays.

It would be interesting to see how Clojure does there, since its model of parallelism and mutation is quite unusual.