HNHacker News
TopNewBestAskShowJobs

MartinMond

1,979 karma · joined January 16, 2009

Co-Founder Nutrient.io
submissionscomments
MartinMond··on Ask HN: Generic Replacement for Rbenv, NVM, GVM?
There is https://github.com/HashNuke/asdf but it is rather minimal
MartinMond··on Windows Bridge for iOS
Is the copyright notice still anywhere? It says Copyright Microsoft on the top of the file.
MartinMond··on Windows Bridge for iOS
Looks like they took the MIT-licensed PSTCollectionView without any attribution: https://twitter.com/steipete/status/629364240063799296

Compare: https://github.com/Microsoft/WinObjC/blob/106d8b2738101872a1... and https://github.com/steipete/PSTCollectionView/blob/master/PS...

Edit: They added the license https://github.com/Microsoft/WinObjC/commit/611e9e5a4b837360...

MartinMond··on The Little Schemer Exercises in Elixir
A simple approach: Set up your apps' supervision tree such that you got poolboy [1] with a fixed pool of 20 worker processes and the one GenServer that distributes the work.

If you go with one GenServer per node, then that one just connects to redis and just pulls jobs (using BLPOP or whatever). When it has gotten a job it checks out a worker from poolboy and assigns it that work.

You could also just have every single worker process go directly to redis and have it pull jobs in a loop. But where's the fun in that ;)

If you want a single global coordinator instead of one per node you can use :global [2] to globally register a process in the cluster. This process is then cluster-wide reachable under its registered name. It can talk to each of your worker pools in the cluster and round-robin try to check out workers and assign them work. And if you do this you might as well ask yourself if you really need redis instead of keeping it all within your Elixir system.

Deciding on which node this process lives is still up to you, but there are libraries like locks [3] that allow you to automatically determine a leader in your cluster.

And once this is done you can start dealing with overload :)

Of course this is just a simple and naive approach, there are a lot of really useful Erlang libraries to check out. Here's a list of libs that helped me when getting started by reading their docs and sources in no particular order:

https://github.com/heroku/canal_lock - Erlang lock manager for concurrently variable resource numbers

https://github.com/jlouis/safetyvalve - queueing facilities for tasks to be executed so their concurrency and rate can be limited on a running system

https://github.com/fishcakez/sbroker - process broker for matchmaking between two groups of processes using sojourn time based active queue management to prevent congestion.

https://github.com/ferd/backoff - exponential backoffs and timers to be used within OTP processes when dealing with cyclical events, such as reconnections, or generally retrying things

https://github.com/jlouis/fuse - A Circuit Breaker for Erlang

https://github.com/basho/sidejob - Parallel worker and capacity limiting library for Erlang

https://github.com/pspdfkit-labs/sidetask - My humble Elixir wrapper for basho's sidejob

[1] https://github.com/devinus/poolboy also used in Ecto, look through the Ecto sources if you want to see how it's used in Elixir.

[2] http://erlang.org/doc/man/global.html

[3] https://github.com/uwiger/locks and then https://github.com/uwiger/locks/blob/master/doc/locks_leader...

MartinMond··on The Little Schemer Exercises in Elixir
A simple way to do that in Elixir / Erlang is to just have each node spawn 20 processes that fetch work from redis (or a central coordinating process on another node)
MartinMond··on Show HN: Kvpbase – a new way for developers to store data
What about riak's pre-commit hooks?
MartinMond··on Show HN: Kvpbase – a new way for developers to store data
> kvpbase also allows you to program it - tell it what to do when data is read, written, or deleted - so you can offload heavy tasks from your app.

Isn't that exactly what "every database ever" calls triggers?

From the Postgres docs: http://www.postgresql.org/docs/9.4/static/trigger-definition...

> A trigger is a specification that the database should automatically execute a particular function whenever a certain type of operation is performed. Triggers can be attached to tables, views, and foreign tables.

Even NoSQL DB's like redis or riak have the ability to execute user-supplied Lua resp. Erlang.

http://docs.basho.com/riak/latest/dev/advanced/commit-hooks/

http://redis.io/commands/EVAL

MartinMond··on Time and time correction in Erlang
In the upcoming Erlang 18 time got a huge refactoring: http://www.erlang.org/documentation/doc-7.0-rc2/erts-7.0/doc...

There's a talk from Erlang Factory SF 2015 about the changes as well: https://www.youtube.com/watch?v=gfsc2MyP8p8

I think the concepts presented are applicable to all systems and not really Erlang specific, so I highly recommend it.

MartinMond··on Welcome to OpenBSD [pdf]
> Random PIDs > Eliminates race conditions > Say you have a root daemon that forks then the child drops privileges. If you can beat the child you can inherit root privileges

Can someone explain this? I don't see what this has to do with the randomness of pids.

MartinMond··on Ask HN: Who is hiring? (March 2015)
PSPDFKit ➡ Remote ➡ Full Time

We (bootstrapped and proud) build the leading PDF Framework for iOS and will launch an Android version soon. Dropbox and Evernote (also IBM & SAP) are just some of the companies that use our framework in their Apps.

Our headquarters is in Vienna, Austria, but our team can be found all over the world in places like Raleigh, Hamburg, Ljubljana, Kiev, Mexico City, and Berlin. We are committed to having the best developers regardless of location.

★ Android Engineer -- Help us build PSPDFKit for Android, our upcoming PDF framework for Android. PSPDFKit for iOS is the leading PDF framework on iOS, it's used by Dropbox and Evernote, and we want PSPDFKit Android to match that level.

★ Frontend Engineer -- We recently started building a customer-facing product to complement our native frameworks and are looking to hire a HTML/CSS/JS Frontend engineer with experience in React/Ember/Angular to join our team.

★ Ruby on Rails Engineer --We recently started building a customer-facing product to complement our native frameworks and are looking to hire a Ruby on Rails engineer to join our team.

https://pspdfkit.com/jobs/

Send us an email if this sounds interesting: jobs@pspdfkit.com

MartinMond··on WhatsApp Web
I wonder if this is related to them rolling out end-to-end crypto on Android but not yet on iOS.
MartinMond··on Fasting triggers stem cell regeneration of damaged, old immune system (2014)
The study you linked is from Feb 8, 2012.

I think this is the actual study: http://www.cell.com/cell-stem-cell/abstract/S1934-5909(14)00...

MartinMond··on Fasting triggers stem cell regeneration of damaged, old immune system (2014)
Article is from Jun 5 2014, here's the University of Southern California's article: https://news.usc.edu/63669/fasting-triggers-stem-cell-regene...
MartinMond··on Rudder: An etcd backed overlay network for containers
This is interesting, it's pretty similar to http://tinc-vpn.org which is a mesh VPN.
MartinMond··on Why don't I metaprogram more?
Check out Elixir's metaprogramming guide: http://elixir-lang.org/getting_started/meta/1.html
MartinMond··on New AWS region coming soon: eu-central-1
Shared storage? Use Riak CS, MogileFS, ceph, LeoFS, Openstack Swift etc. as a S3 replacement.

Availability zones: Hetzner has multiple independent DCs and they are happy to place your servers in different DCs if you ask them. What Amazon calls "Elastic IP" they call "Failover IP".

Yes if you only need to host your blog yet you don't want it to go down when the HW inevitably fails, don't go to Hetzner because setting up Postgres failover and Chef and all that is complicated.

And if you're big / have enough money Hetzner's off-the-shelf HW and their unwillingness to offer an SLA will make you move away.

But there's a sweet spot for Hetzner, it's where you want good performance for a great price, have enough money/knowledge to setup proper bare metal deployments with failover yet don't yet need the guarantees of a "premium" DC or the features of AWS.

I know quite a few companies which fit that description.

MartinMond··on New AWS region coming soon: eu-central-1
I hope Hetzner will be able to compete, because their offers have so much better performance per EUR than Amazon's: https://www.hetzner.de/en/hosting/produktmatrix/rootserver-p...

I talked to some colleagues about scaling with Hetzner and their answer was to just overprovision like crazy since Hetzner's so cheap anyhow.

MartinMond··on Ask HN: Books on network programming patterns?
Just Open a Socket - Connecting Applications to Distributed Systems is a great talk to watch:

https://www.youtube.com/watch?v=jytJXjI0oQU https://speakerdeck.com/seancribbs/just-open-a-socket-connec...

Other talks from ricon.io and the various Erlang conferences are great too, but those are more about distributed systems and not primarily network programming. But since you mentioned the ZeroMQ patterns that should be just what you want.

http://thinkdistributed.io/ http://ricon.io/ https://www.youtube.com/user/ErlangSolutions/videos

MartinMond··on A Grieving Father Pulls a Thread That Unravels BNP’s Illegal Deals
That's exactly what the French government alleges: http://dealbook.nytimes.com/2014/06/02/french-officials-twis...

  At the heart of the French government’s campaign is the
  concern that American prosecutors have created a two-tiered
  system of justice: one in which American and British banks
  escape criminal charges and the other that forces BNP to
  plead guilty to sanctions violations and pay a record fine.
MartinMond··on Concurrency is the New Memory Management
Erlang has preemption and process isolation in user-space.

Go's goroutines also somewhat approach proper user-space preemption/isolation.

MartinMond··on Why Go Is Not Good
Doesn't Go have a GC? How can you then "picture what the C equivalent would look like"?

Yes there are GCs for C, but is anyone successfully doing "systems programming" (whatever that may be) in C with GCs?

MartinMond··on Why Not Erlang? The Lack of Onramps
That Elixir / atom-shell integration sounds awesome. Any chance of open sourcing (parts of) it?
MartinMond··on [dead]
There are some serious issues with Telegram's cryptography it seems: https://security.stackexchange.com/questions/49782/is-telegr... and http://unhandledexpression.com/2013/12/17/telegram-stand-bac...

See also http://thoughtcrime.org/blog/telegram-crypto-challenge/ (comments: https://news.ycombinator.com/item?id=6936539 )

MartinMond··on Elixir v0.14.0
We've started using Elixir in our Erlang application and it's been a pleasure to work with. Everyone in my office agrees they would've loved to have this when they started with Erlang.
MartinMond··on 4K for $649: Asus' PB287Q monitor reviewed
Ah yes. Thanks!
MartinMond··on 4K for $649: Asus' PB287Q monitor reviewed
Ah, that was stupid of me :) Thanks!
MartinMond··on 4K for $649: Asus' PB287Q monitor reviewed
Can someone explain how this is 4k? Apple's Thunderbolt Display has a resolution of 2560x1440 [1] and ASUS' PB287Q also has 2560x1440 according to Amazon [2].

What am I missing? UPDATE: I transposed digits and looked at the PB278Q not the PB287Q.

[1] https://www.apple.com/displays/specs.html

[2] http://www.amazon.com/PB278Q-27-Inch-LED-lit-Professional-Gr...

MartinMond··on Dropbox Webhooks
I tried BTSync and was blown away by how much faster sync in general and especially LAN sync was. I guess Bittorrent Inc. knows how to properly transfer files.
MartinMond··on My Experiment Opting Out of Big Data Made Me Look Like a Criminal
I guess the most well-known case is HSBC laundering drug money. Do you know any "real consequences" for employees that resulted of it?
MartinMond··on Elixir v0.13.0 released, hex.pm and ElixirConf announced
Been using Elixir for a new project and it's really nice.

For me it's not so much about bringing a nicer syntax to Erlang (Erlang's syntax is very nice once you get used to it, except for single assignment IMO. I'd prefer it if Elixir had taken Erlang's syntax and added support for rebinding variables and macros) but about tooling (mix, the build tool absolutely rocks) and libraries (e.g. take a look at http://github.com/elixir-lang/ecto).

← PreviousPage 3 of 9Next →