Better HN
topnewbestaskshowjobs
Log inSign up

simplify

2,061 karma · joined May 24, 2009 (17y ago) · 911 submissions

Submissions

comment 9y ago · link · parent

It loads much faster, which matters a great deal to me.

comment 9y ago · link · parent

I find lisp to be the most beautiful and readable language. Lisp has practically zero syntax; all code can be written equally. You can even create your own "syntax" / language features without waiting years for the approval of a committee (I'm looking at you, JavaScript).

What repetition are you referring to?

comment 9y ago · link · parent

The article doesn't mention it, but this architecture is good for functional programming as well. If you model those three inner circles as pure functions operating on input and returning results + effects, your app becomes easy to test and easily maintained by a good type system.

comment 9y ago · link · parent

The GraphQL plugin[1] looks great. I was eagerly waiting for Flow's tooling to catch up because of their GraphQL support, but I guess TypeScript is running laps :)

[1] https://github.com/Quramy/ts-graphql-plugin

comment 9y ago · link · parent

I think concatenative languages have great potential when paired with a proper type system and IDE. But you're absolutely right when it comes to plain text programming; point-free style feels clever to write, but makes it more difficult to read.

comment 9y ago · link · parent

I feel the same way. I'm eager to use Flow, but their tooling is just so far behind. Until it catches up I'm using TypeScript, which is much, much better than nothing :)

comment 9y ago · link · parent

SSL is based on obscure prime numbers. Another example is user passwords (obscure text). Sessions and API tokens, too. Credit card numbers, garage door openers, and SIM cards all rely on hidden information. Even door locks are a physical form of hidden keys.

But you're right, there are some forms of security that don't require obscurity. For voting systems though, I would categorize them as "cat and mouse" systems, which unfortunately fall into the obscurity category.

comment 9y ago · link · parent

What about investing stocks and bonds into companies that manufacture fast cars and boats? :)

comment 9y ago · link · parent

All security is some form of obscurity, is it not?

comment 9y ago · link · parent

Are you suggesting we take their behavior for granted? Positive behavior needs to be praised – it's part of how society influences its members.

comment 9y ago · link · parent

What did the other logo look like?

comment 9y ago · link · parent

What's your opinion of ChainPad's algorithm? Are there any obvious downsides?

comment 9y ago · link · parent

The problem isn't "two writes at the same time", it's the server thinking everything's OK for two separate users.

If can model your database differently for this rudimentary example, then good for you – you're thinking about race conditions. Many web programmers do not think about them at all, and race conditions are usually not trivial to fix.

comment 9y ago · link · parent

You're right, I meant to say the most commonly unaware vulnerability.

comment 9y ago · link · parent

This is correct. Race conditions are still the most common vulnerability in web applications.

Take a classic example: a one-time use coupon. Without some kind of locking, two simultaneous requests would be able to use the same coupon successfully. Roughly:

  0.0s - [1] Client 1: Apply coupon
  0.0s - [2] Client 2: Apply coupon
  0.1s - [1] Server to database: Is coupon marked as used?
  0.1s - [2] Server to database: Is coupon marked as used?
  0.2s - [1] Database to server: Nope! All good.
  0.2s - [2] Database to server: Nope! All good.*
* Since the question was asked for both requests at the same time, the answer was "Not used" in both cases.

  0.3s - [1] Server to database: Update coupon as used.
  0.3s - [2] Server to database: Update coupon as used.*

         * Coupon has been used twice :(
Node's async model is not going to help you here. You will need something more, such as a mutex.

comment 9y ago · link · parent

What's the difference between "serverless" and "cloud"?

comment 9y ago · link · parent

> Not an option on Heroku; Heroku will restart dynos as part of deployment, again losing state.

Do heroku's custom buildpacks not allow you to prevent restarting the dyno?

comment 9y ago · link · parent

I don't know why you're getting downvoted, it's a good question. I am not a fan of trump, but I also want to see and verify examples of Fox distorting things.

comment 9y ago · link · parent

I strongly believe concatenative languages – particularly statically typed ones – are one paradigm of programming that have not been explored nearly enough. It's good to see more activity in this area :)

Here's another interesting concatenative language in development that I'm following: http://kittenlang.org/

comment 9y ago · link · parent

It sounds like you're describing Marko.js. Once v4 is released, I predict server-side rendering will become popular again. It's like a vue.js + server-side rendering + client-side rendering + a built-in automatic webpack, yet everything is easy to learn and use. Too good to pass up.

comment 9y ago · link · parent

If each page has different dependencies, you're not sending much duplicate content. Also, SSR supports incremental rendering (due to HTTP streaming), something that is currently impossible to do with SPAs.

See this article for more detail: https://jakearchibald.com/2016/fun-hacks-faster-content/

comment 9y ago · link · parent

That almost sounds like server-side rendering :)

comment 9y ago · link · parent

Awesome! Can't wait for a sublime plugin :)

comment 9y ago · link · parent

How does this compare with Marko.js, which also compiles (and renders!) JavaScript on the server before sending to the client?

comment 9y ago · link · parent

The term "moral high horse" refers to someone who is elevating themselves above you in effort to show/feel superiority. I did not get that tone from the article at all. If anything, it seems you are trying to "pull him down" in effort to invalidate his noble suggestions.

comment 9y ago · link · parent

Would be good to add some concatenative languages to that list :)

http://evincarofautumn.blogspot.com/2012/02/why-concatenativ...

comment 9y ago · link · parent

The problem is overblown. It's not going to cause any deep, hard-to-debug errors. If you accidentally type `a-b`, you'll get an error message that says "a-b is not defined". Fix it and you're done.

comment 10y ago · link · parent

Having it reversible would be nice, too. Knowing the click is irreversible gives an uneasy feeling.

comment 10y ago · link · parent

Seems like the perfect kind of app to build on sandstorm.io, since it's something you'd probably want to own on your own servers.

comment 10y ago · link · parent

The "jQuery === bad code structure" association is strong, even today. But the fact is you can write good code with jQuery – without Backbone – just fine.

Most all web developers of that day were new to programming (experienced folk didn't take JS seriously), so naturally they did not know how to write well-designed software. The benefit of Backbone was not Backbone itself – it was the community push for thinking about code structure in general.

1
232425
31