HNHacker News
TopNewBestAskShowJobs

sordina

222 karma · joined January 17, 2010

submissionscomments
sordina··on Myers Diff Algorithm – Code and Interactive Visualization
Seems like this would have been super useful when I was creating a Levenshtein transition effect: https://jsfiddle.net/kdqost0z/2/

Not that efficiency really matters much for my use-case!

sordina··on The Power of Prolog
Check out https://en.wikipedia.org/wiki/Horn_clause

You can read this as two statements:

"The length of a list is 0, if the list is empty."

"Otherwise, if the length of a list Ls is N0, and N is N0 + 1, and N is greater than 0, then Ls with an additional element is of length N.

sordina··on A.I. Duet: A piano that responds to you
I think that this response is confused. What is your point? That people can't differentiate random notes from a duet? That people would believe that anything associated with tensorflow was imbued with sophisticated behavior?

How does that relate to this experiment? It's clearly not just playing random notes in the example video...

sordina··on Reflecting on Haskell in 2016
https://github.com/sol/doctest#readme - Very popular.
sordina··on Typed, modular macros for OCaml
I agree, you may wish to do that but I was answering the question "What is the utility of typed-templates", not "contrast type and runtime error tradeoffs".
sordina··on Typed, modular macros for OCaml
There may be a bunch of other reasons, but the one that springs to mind is localisation of errors. You'd ideally like to know about any mistakes you've made in your macro before you run your macro. And when you do learn about a mistake you'd like the error to describe where the mistake is in macro-land rather than generated-code land.
sordina··on Lumo – A fast, standalone ClojureScript REPL that runs on Node.js and V8
Why do you think Haskellers would be offended by this?
sordina··on The cryptopals crypto challenges
I got stumped on this when trying to generate the finite fields for RSA in order to solve 1.7 and then getting discouraged. I'm not sure how deep to go on coding up solutions for these, as a lot of libraries will do most of the work for you but then you're not learning much. I guess go as deep as you can and then back off when it's untenable.
sordina··on Ask a Female Engineer: Interviewing and Company Culture
Completely agree. This stance clearly makes sense from any individual's perspective.
sordina··on Ask a Female Engineer: Interviewing and Company Culture
The point is valid, but this obviously puts organisations trying to recruit their first female employees in a bit of a pickle. For the benefit of the common good (getting more small businesses and startups to hire more women) it might be better to asses a business's desired trajectory rather than its current state... right?
sordina··on Learning from Ada
Yes. You can defer type errors. I turn this on in development.
sordina··on Reasons not to use (i.e., be used by) Facebook
Anchoring, and door-in-the-face?
sordina··on NPM and Left-Pad: Have We Forgotten How to Program?
Check out the work on Morte for a more reasoned approach for how to take micro-modularization to it's natural (or insane) conclusion.
sordina··on Show HN: Honest Salary – Help make salaries fair and honest by sharing yours
I don't know any general answers, but here are some scenarios:

* Your colleague who did not realise that they were being highly underpaid gets a reasonable offer from another company and leaves. They were a lynchpin in the organisation and the whole company goes under. You now earn zero salary. If they were more aware of others salaries within your company they may have renegotiated and stayed.

* After years of hidden salaries within the company, some colleagues salaries are leaked. What was previously imagined to be an equitable workplace is now exposed to be highly inequitable. This is felt to be a betrayal of trust by many and sows discontent within the company. The previously happy workplace is now a minefield of distrust and back-room back-stabbing. Now everyone is stressed. This situation would have never arisen if salaries were disclosed from the start.

* An elite of skilled negotiators emerges within the company that far out-earns the contingent of members whose domain-skills would grant them the greater reward in a meritocracy. This leads to a bozo-effect as they rise in the ranks due to greater financial freedom. Nobody can quite pinpoint where it all started going wrong. This transition would have been transparent in a disclosed-salary scenario, and would have been suppressed.

* Your conscience is plagued by guilt about the possibility that you might be robbing your equally deserving peers of their share of the pie. You don't sleep so well. If you knew that they were earning the same as you you could sleep better.

You get the idea.

sordina··on We Hire the Best, Just Like Everyone Else
Maybe if you're a flooring company hiring flooring installation staff, you would ask for something like that.
sordina··on The Evolution of a Haskell Programmer (2001)
Well yeah, of course, but what conclusion are are you drawing from this?
sordina··on “Screw it, I'll make my own” – The story of a new programming language
Agda allows for "mixfix" function names with spaces. It's very interesting.
sordina··on Kubrick's ‘Barry Lyndon,’ a masterclass in bringing a filmmaker's vision to life
I watched this film without any previous exposure to sentiments about it, or Kubrick. I chose to watch it based purely on the title. I still came to the conclusion that it is one of the greatest films ever made.

* The photography is singular, this is self-evident * The acting is outstanding

Complaints usually then come down to story and direction.

I interpret the direction as perfectly executing my understanding of Kubrick's intended impact: Contrast between character (developed through the story) and sentiment.

A sentiment engineered with all the available emotional tools:

* The tone of the narration * Slow pacing * Divine Music * Lavish Costume

All intended to convey the message - "Take this very seriously". Imparting a gravity to every word and action. Be it glory, or tragedy.

What then of the contrasting element - Character?

As you say - The protagonist is unlikable. This wasn't a mistake. He's a selfish, spineless, jerk, of no inherent merit, who raises himself to mediocre heights through questionable behaviour, morals, and company only to be struck down again. A parody of the Greek tragic form.

What does that leave us with? A comedy!

It's a simple proposition, a farcical contrast between story content, and story form. Told completely straight-faced and dry. In this light I find it to be one of the most original and daring pieces of cinematic story-telling I know of.

The punchline to the joke, however, seems to be that I've never found another person who shared this perspective, and most seem to take the the sentiment seriously and at face value... You seem like you might be someone who enjoys looking at it from this angle.

I haven't yet read or watched any reviews of this film or the book it was based on, and was surprised to see the film being discussed on Hacker News, so in the tradition of a good internet commenter, I'm writing this comment before having read the article.

I'll go ahead and read OP's link now and see if any of my ideas are vindicated :)

sordina··on Kubrick's ‘Barry Lyndon,’ a masterclass in bringing a filmmaker's vision to life
I think this is true, but that the beauty is meant to serve as a farcical contrast to the triviality and lack of meaning in Barry's story. The point was really driven home with the final scene of the story being accompanied by Handel's Sarabande, a work of monumental gravitas implying transcendent tragedy, when in reality Barry was a nobody, a jerk with no morals or conviction hardly deserving a second thought.
sordina··on Show HN: Lego – A Let's Encrypt Library and CLI in Go
Googling this isn't going to be fun either.
sordina··on Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV
I made a little tool called SQLBong that does something similar by embedding Sqlite3 under the hood: https://github.com/sordina/SQLBong
sordina··on Becoming Productive in Haskell
According to http://en.wikipedia.org/wiki/Function_object, many languages implement the "Function Object" pattern:

  * C
  * C++
  * C#
  * D
  * Eiffel
  * Java
  * JavaScript
  * Lisp
  * Scheme
  * Objective-C
  * Perl
  * PHP
  * PowerShell
  * Python
  * Ruby
Although many of the languages listed here implement the pattern, it's not clear that many of them use the "Functor" terminology. I've certainly never heard of it referred to as such in Javascript or Ruby, and most-often referred to as "Callable" in Java.

That being said, I think anyone would agree that terminology choices in Haskell can only fairly be accused of ignoring PL parlance that was in existence before the terms were adopted in Haskell...

With that being said, the "Functor" terminology timeline:

  ~ 1942 - Category Theory - http://en.wikipedia.org/wiki/Category_theory
  < 1991 - Haskell         - Notions of computation and monads (Moggi)
  > 1994 - C++ STL         - http://en.wikipedia.org/wiki/Standard_Template_Library
  > 1995 - Gang of Four    - http://en.wikipedia.org/wiki/Design_Patterns
  > 2000 - C#              - http://en.wikipedia.org/wiki/C_Sharp_(programming_language)
  > 2004 - Java Generics   - http://en.wikipedia.org/wiki/Java_version_history

(correct me if I'm wrong here)

Now clearly we can't accuse Moggi of arrogantly ignoring existing PL terminology, because it didn't exist at the time. So, should we then say that Haskell users should have abandoned the term once it started being used differently?... This seems unfair too, as it was already in use in the Haskell ecosystem by then. I really can't accept that Haskell users are arrogant simply for using a term they adopted very early on consistently and in line with its original definition. Maybe they are arrogant, but certainly not for that reason.

So maybe they are arrogant because they don't play well with others? How do they react to other people using the term in a different fashion? I have never seen a Haskell user complain about someone calling a C++ function-object a functor. Maybe it has happened, but I just don't see it coming up very often.

> And when Haskell proponents state that their definition is right because it's the one from category theory, non-FP programmers find that rather arrogant.

I've never seen a Haskell user bust up a conversation and chastise a bunch of C++ users for talking amongst themselves about function-object "Functors". That would be arrogant, but does that ever happen? Why would they do that? The only time I can see Haskell users forcing definitions down people's throat is in situations like this, where they are being berated for using their own terminology and decide to set the record straight. That being said, who's forcing? The replies could really only be accused of being informative.

What do you suggest Haskell users should do? Stop calling functors functors? Sheepishly demure and say "okay you're right, we're wrong" when someone says that functors are how C++ does them?

Really I couldn't care less about the terminology point as I don't believe it has ever caused any significant issues in terms of ambiguity. And I'd be surprised if anyone earnestly attempting to learn Haskell was slowed down because of these terms (slowed down more than if Haskell invented totally new terms). The only reason why I'm getting worked up is because of the "arrogant" label.

Now how did this thread of conversation start?

  > I really like the author's suggestion of
  > mentally translating Functor to Mappable.
  > Are there any other synonyms for other Haskell terms of art?
  > ...
  > What I'd really like, I suppose, is a complete overhaul of Haskell syntax

  >> As others pointed out, the way Haskell uses
  >> the term "functor" is related to the way mathematicians
  >> had been using it for at least a decade before cfront.
Is that arrogant? Surely it's more arrogant to come in as a beginner of a language and suggest that it change its terminology without attempting to understand why it uses it? Still, none of the Haskell users here accused david-given of being arrogant, they simply informed him of the provenance of the term. Because we love to help.

I guess I just wished that people would make sure that they are at least justified when using inflammatory language.

Sorry about the rant.

sordina··on Learn you an Agda
Writing Agda is a very interactive experience. The only IDE that provides this interactivity at present is Emacs. If you take a look at some Youtube clips of people editing Agda you'll see why you would want an IDE. Not that this can't be done elsewhere, just that it hasn't been done yet.
sordina··on Becoming Productive in Haskell
I certainly wouldn't blame anyone for not being familiar with the terms. What I would blame people for is attacking Haskell's choice of terminology due to it not 'being like c++'. A generous interpretation of intent goes a long way, and if that is out of reach, at least do enough research to make sure you're not pointing out weaknesses based on a false premiss. Instead I commonly see people starting from "I don't find Haskell intuitive" and extrapolating to "Haskell's contributors are indoctrinated and people who defend its use of established terminology are arrogant". Maybe I should just ignore such points of view but they seem to be infectious.
sordina··on Becoming Productive in Haskell
> sometimes completely at odds with the way other languages use them: e.g. C++ also has functors, and they're completely unrelated to Haskell functors.

Really, this should be considered as C++ perverting the existing terminology from category-theory for Functors.

> I really like the author's suggestion of mentally translating Functor to Mappable. Are there any other synonyms for other Haskell terms of art?

I think that there is a great deal to be said for leveraging intuition. But who's intuition? Who was Haskell designed by/for when Functor was first defined in the standard library?

> What I'd really like, I suppose, is a complete overhaul of Haskell syntax to modernise and clarify everything: make it use actual words to describe things (foldl vs foldl'? BIG NO).

The intention is admirable, but what does it cost to do it, and what is gained by doing it? It seems that the implication is that certain functions become immediately intuitive to people (what kind of people?) in certain contexts, and that possibly-by-analogy, these context can be extended (how far?). I'm not saying that this is a bad goal, but rather than try to compromise in this manner, the Haskell community has often adopted terminology that is precise instead of intuitive.

Functors could have been Mappables, but how far would that analogy hold, and who is already familiar with maps in this context? Better to use an accurate term, and when someone unfamiliar with it learns it in this context, they will be able to apply it to many other contexts.

> Put in syntax redundancy and visual space to avoid the word soup effect: typing is cheap, understanding is expensive. Normalise and simplify terminology.

On the surface, I've always supported this - if only for the reason that I would always like to be able to pronounce a combinator when I'm talking to someone. The downside would be the combinatorial explosion of different subsets of names that people would learn for even one library. I'm not sure weather it would be a net plus or minus.

> Fix the semantic warts which make hacks like `seq` necessary --- if I need to worry about strictness and order of evaluation, then the language is doing lazy wrong. etc.

I think you will find that this is an unsolved problem. Better to allow people to be explicit when necessary instead of making the language totally unusable.

> Basically I want language X such that X:Haskell like Java:K&R C.

I think I understand the sentiment, but the analogy feels too shallow. For instance, I would make the following predictions from your analogy - Do they hold?

* Runs on a virtual machine instead of being compiled * Extraordinary measures taken to make the language and binary-formats backwards compatible. * More type-safe * Less primitives * More automated memory-management

> This will never happen, of course; the people who have the knowledge to do such a thing won't do it because they are fully indoctrinated into the Haskell Way Of Life...

Indoctrinated is obviously a loaded term. I think you will find that nearly all Haskell programmers in any position to influence the development of the language are very open-minded when it comes to new ideas. Part of the reason why Haskell looks the way it does today is because it was intended to be a platform for experimentation.

sordina··on Becoming Productive in Haskell
It's not a pretty-printer. It's fine for printing stuff when you don't care what it looks like most of the time. Pretty printing is a vague term though. There are certainly many ways to pretty-print in Haskell, some of which are bi-directional pretty-printers/parsers.
sordina··on Shen: A Sufficiently Advanced Lisp [video] (2014)
> it seems impossible to have both macros and a type system on par with Haskell

You should check out the work being done on typed template Haskell then.

sordina··on Use Haskell for shell scripting
Sorry Tel, I didn't mean to imply that nobody uses them, more that I would guess that they are used less than 1% of the time where their inclusion could be beneficial.
sordina··on Use Haskell for shell scripting
You're right that Haskell doesn't distinguish different IO actions other than by the type they return. There are certainly libraries that do this though, although they aren't widely used.

Even though Haskell doesn't distinguish different classes of IO actions, it still distinguishes IO actions from other kinds of actions (such as stateful actions as per your example), and pure computations and that provides a hell of a lot of bang for buck.

The Idris language has the notion of effect types [1] to make achieving the goal of categorising the kinds of effects being used in a function easier to deal with, but that uses the dependent capabilities of the language.

[1] http://eb.host.cs.st-andrews.ac.uk/drafts/eff-tutorial.pdf

sordina··on Meteor and Qt
I just wrote the Haskell DDP client last week :)
← PreviousPage 2 of 4Next →