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 8y ago · link · parent

Honest question, just how fast is Julia anyway? Because performance is typically the main reason anyone would want to use it over alternatives. A lot of people justify Julia because, as noted in other comments, it is both high-level yet claims to be nearly as fast as C:

> "Julia is the fastest modern open-source language for data science, machine learning and scientific computing...with the speed, capacity and performance of C, C++..." [4]

That's a bold claim! And there is much evidence to the contrary. I often find that the language falls into a similar trap of many other languages where the creators are evangelists not quite sharing the whole picture. Writing fast Julia code is not always a pleasant experience as you often need to fight the easier idioms. It is marketed as fast, but really, how fast is it?

[0] http://www.zverovich.net/2016/05/13/giving-up-on-julia.html

"What’s disappointing is the striking difference between the claimed performance and the observed one. For example, a trivial hello world program in Julia runs ~27x slower than Python’s version and ~187x slower than the one in C."

[1] https://www.ibm.com/developerworks/community/blogs/jfp/entry...

"We can code in Julia in a way similar to Python's code. However, that code is slower than it should. One way to speed Julia is to take into account the Fortran ordering it uses by looping on j before looping on i in the second loop. We also add decorators to speed up the code."

[2] https://www.codementor.io/zhuojiadai/julia-vs-r-vs-python-st...

"...comparing R's sorting speeds to Julia's is not the complete story, even though on the surface R appears faster, and from a users' perspective, (once the data is loaded) R is still the king of speed."

Stackoverflow has quite a few user posts [3] from folks trying to get their code to perform at the advertised speed vs popular alternative languages. It's not so easy.

[3] https://stackoverflow.com/questions/20613817/julia-julia-lan...

[4] https://juliacomputing.com/

comment 8y ago · link · parent

> How do we know they do anything different for either way?

Because FB has said they will not roll out the data policies in Europe to the rest of the world.

comment 8y ago · link · parent

I think you are talking about the reverse -- how can FB know you are just an American visiting Europe vs. one actually living there? Because in the latter case, you are covered under GDPR but I don't think you are under the first one.

964.

Ask HN: Delete a U.S. FB Account While in Europe

7 points · by hellofunk · 8y ago · 10 comments

965.

Opening of Romeo and Juliet Recited in the Accent of Shakespeare’s Time [video](laughingsquid.com ↗)

241 points · by jb1991 · 8y ago · 107 comments

comment 8y ago · link · parent

It appears in the last three years they haven’t made good on this admission to show language examples on the website:

> Yes you're right, we will put some code samples in earlier on.

https://news.ycombinator.com/item?id=9483621

comment 8y ago · link · parent

Lots of discussion from three years ago:

https://news.ycombinator.com/item?id=9482483

comment 8y ago · link · parent

Exactly. This is common on many programming language sites. You shouldn’t have to dig deep before finding code examples.

Fortunately Rust doesn’t do this and has a big example right at the top of its front page.

comment 8y ago · link · parent

Sounds very interesting. Very much like to see other languages starting to take this stuff seriously. Do you know where Pony is used in industry?

comment 8y ago · link · parent

> Pony's reference capabilities and Rust's borrow checker both provide data safety; they just approach it in different ways and have different tradeoffs.

Would like to see a summary of what those tradeoffs are. Very curious!

comment 8y ago · link · parent

> I think this is a fair and in depth comparison.

redpixie is a MS partner, so I don’t expect it to be fair.

https://www.redpixie.com/blog/iaas-paas-saas

“As a Microsoft Partner, we focus on Microsoft Azure IaaS solutions”

comment 8y ago · link · parent

Anyone have experiences with Azure? Nearly everyone I see personally in industry is doing their research on AWS. This article is obviously trying to market Azure, which makes me curious.

comment 8y ago · link · parent

Functions only return nil when nil is a valid value in your logic.

comment 8y ago · link · parent

I disagree. A keyword is not a null. And nil is a different “type” than something not nil anyway.

comment 8y ago · link · parent

The problem is that ‘get’ possibly creates one nil result. Using the map as a function, even if nil is understood to be an error, now gives you two possible and very different errors from one expression. It’s a bad idea and generates added ambiguity and complexity, which further strays from the article’s philosophy.

comment 8y ago · link · parent

Overall, they are good simply because you do often get quick real-time help, like Irc but with more people.

comment 8y ago · link · parent

But you are advocating to use the map in function position? That’s much worse than get, most of the time.

comment 8y ago · link · parent

> What do you do when you don't know a value?

I use an explicit value to represent the absence of something specific like :id-unknown which is much more useful and safer than just throwing nil in there when a project scales.

If something is nil in Clojure, you have to ask why is it nil? The answer is not always simple. It could be a bug, it could be legit missing data, a number of things.

A simple typo in Clojure can give you nil. You don’t want to interpret that the wrong way.

comment 8y ago · link · parent

‘get’ is a function that will always exist, but using a map in function position is very fragile and everything breaks if the map itself is nil. If you advocating for this, it is contrary to general consensus in the community; you will almost never see this in real code.

Responding to your edit: it’s safe to do it in Haskell because you know it isn’t nil at compile time.

comment 8y ago · link · parent

But you are talking about a statically typed way of handling nil. Options and Unions are not nil, which is the point. But you don’t get this in Clojure and nil can mean a lot of different things in different contexts, which is more complicated than a simple optional.

comment 8y ago · link · parent

But what if the map itself is nil? That’s why using maps as functions is generally not done in the wild.

comment 8y ago · link · parent

I prefer to expect nothing to be nil and assert for this rather than write defensively in case it is accidentally nil. This requires a more structured approach but is a better solution for me. I don’t like nil and prefer not to think of it as a valid value at all. Too many null pointer exceptions has ruined my appreciation even for the bandaids described in this article. It’s the only pain point I have in Clojure. I just think nil is a terrible idea in any language, and the way it is overloaded in Clojure is among the most troubling among languages, in my experience.

comment 8y ago · link · parent

Most legacy cpp features and language semantics will never be removed, despite what many prominent voices in the community think.

comment 8y ago · link · parent

Depends on your goal.

Do you want to:

1) Cool down your room?

2) Warm up the outdoors?

3) Warm your room further?

comment 8y ago · link · parent

> Why remove a feature that could be useful? That makes no sense.

It makes sense in the way that a language which is strongly biased to readability and consistent expectations makes sense. It is also how a language which minimizes programmer error makes sense.

For languages that refuse to remove anything, and thus suffer from unnecessary challenges, see C++.

comment 8y ago · link · parent

I wonder more and more what Elm offers that langs like ReasonML don’t?

comment 8y ago · link · parent

> NP hard

Sorry... what is NP?

comment 8y ago · link · parent

Clojure, on any platform (JVM, JS, .Net) has a fundamental language-level philosophy of easy interop with the host.

comment 8y ago · link · parent

Because React is a very natural fit for a functional language of which JS really isn’t. Which is also why it is so lovely to use React from Clojurescript.
1
323334
110