HNHacker News
TopNewBestAskShowJobs

Cieplak

6,168 karma · joined September 30, 2011

λ𝑓.(λ𝑥.𝑓(𝑥 𝑥))(λ𝑥.𝑓(𝑥 𝑥))
submissionscomments
Cieplak··on Should I Run Postgres on Kubernetes?
If you’re asking this question, you should probably be using RDS or another hosted Postgres service.

Personally prefer to operate Postgres on ZFS pools. This offers checksumming (integrity), filesystem-level compression (reduced IO hence faster reads), nvm-e ZIL (faster writes). ZFS also supports snapshotting, so if you run the database in a jail, you can snapshot the entire jail, send it over the network, and start it on another host in exactly the state it was snapshotted.

Cieplak··on Ask HN: Have you ever chosen Postgres over Mongo and regretted it?
I have never regretted it. We dropped Mongo completely about a year after JSONB support was released for Postgres. JSONB indexes perform very well, and can be tuned with different index types (e.g. btree, gin, hash). You get the best of both worlds, i.e. relational models with joins and aggregates, as well as flexible and dynamic document storage. If you want a pure JSON interface to your database, use PostgREST:

https://postgrest.org/en/v5.0/api.html

Cieplak··on An Old Conjecture on Stream Transducers
Reminds me of a stream-processing library that Michael Snoyman recently started working on:

https://github.com/snoyberg/zerem

For background, he authored Conduit, one of the most popular Haskell stream-processing libraries:

https://github.com/snoyberg/conduit

Cieplak··on Logic Theorist
Not the original source but pretty explanatory:

https://history-computer.com/Library/Logic%20Theorist%20memo...

Cieplak··on The Computer and the Brain (1958) [pdf]
Von Neumann died before he finished writing this book.

Another unfinished work of his that's worth checking out is Theory of Self-Reproducing Automata where he introduces his conception of self-replicating automata [1].

[1] https://en.wikipedia.org/wiki/Von_Neumann_universal_construc...

Cieplak··on Ask HN: Who is hiring? (July 2018)
Finix | Embedded Systems Engineer | San Francisco, CA | Onsite | Full-Time | $100k - $150k

Finix builds, manages and sells a payments processing platform (http://developers.finixpayments.com) to banks and other financial institutions. Our stack is mainly Java and Postgres on AWS. We have a few services in Haskell. We are the first seed-stage company that Visa has invested in.

Looking to hire 2 to 3 highly effective engineers who want to work on a state-of-the-art technology platform pushing the future of payments and banking software, and want to have agency over their day-to-day work. Beneficial to understand the payments domain and have experience delivering SLAs of 4 nines (99.99%).

Reach us at this base64-encoded email address: cGF0cmljaytobkBmaW5peHBheW1lbnRzLmNvbQ==

Cieplak··on Streaming with linear types
Super interesting! I had never heard of linear logic before you just mentioned it, so my first question was, how can it be described in terms of category theory. So I googled it, and apparently there is a lot to be said. The first link (pdf) is over 200 pages!

[1] https://www.irif.fr/~mellies/mpri/mpri-ens/biblio/categorica...

[2] http://www.cs.man.ac.uk/~schalk/notes/llmodel.pdf

Cieplak··on BlueChip – An ORM-like syntax for retrieving data from GraphQL or JsonAPI
I’ve been using PostgREST as an ORM for about two years now. I know it may sound unconventional, but it’s definitely worth a try, especially if you’re building HTTP APIs. Here’s an example query:

    /investors?select=name,investments(id,founders(name,address(city,country)))&investment.exit=gt.1000000.00
https://postgrest.org
Cieplak··on FreeBSD Celebrates 25th Anniversary
Edit: I wrote x1.* instances. I meant i3.* instances.
Cieplak··on Show HN: Posthook – Job Scheduling as a Service
This is definitely a needed service. As a business, if something isn't core to the business model, it's better to pay money and avoid distractions, at least until it's clear that something is actually core to the business.

That said, I've wanted something akin to a distributed cron, without the complexities of workflow engines like airflow or azkaban, so I started writing a little HTTP API for scheduling jobs [1], which is mostly complete except for configurable retry logic and failure notifications. To schedule a periodic job that runs every 30 seconds,

    curl http://$HOSTNAME/jobs \
    -d '{ "title"      : "Healthcheck"
        , "code"       : "curl example.com"
        , "frequency"  : "30 seconds" }'
[1] https://github.com/finix-payments/jobs
Cieplak··on FreeBSD Celebrates 25th Anniversary
I’ve been using FreeBSD in production on AWS for a few years now and it’s been great, thanks to ZFS, jails and pf.

There are lots of different ways to configure jails, which unfortunately means there are lots of places to get stuck.

I typically deploy to x1.* instances, which have NVMe drives. I create a zpool of all the NVMe drives, and then mount a zfs filesystem on the zpool at /mnt/jails. I run all my services in jails. Each jail gets its own IP address on the host, and services are made available to the outside world using pf rdr rules. Services in jails are allowed to access the outside network using pf nat rules. pf makes it easy to monitor and restrict network activity for each service.

Once you’ve configured a jail, you can snapshot it with zfs, compress the snapshot, archive it and rsync it to other FreeBSD hosts. Once copied to other hosts, starting the jail simply requires registering it in /etc/jail.conf and running `service jail start $JailName`.

I’ve started documenting this and have been thinking hard about how to provide a more generic container interface on top of this implementation. If you’re interested in the shell scripts, I’ve started posting them here:

https://github.com/cieplak/jz

Cieplak··on Ask HN: Who is hiring? (June 2018)
Finix | Embedded Systems Engineer | San Francisco, CA | Onsite | Full-Time | $100k - $150k

Finix builds, manages and sells a payments processing platform (http://developers.finixpayments.com) to banks and other financial institutions. Our stack is mainly Java and Postgres on AWS. We have a few services in Haskell. We are the first seed-stage company that Visa has invested in.

Looking to hire 2 to 3 highly effective engineers who want to work on a state-of-the-art technology platform pushing the future of payments and banking software, and want to have agency over their day-to-day work. Beneficial to understand the payments domain and have experience delivering SLAs of 4 nines (99.99%).

Reach us at this base64-encoded email address: cGF0cmljaytobkBmaW5peHBheW1lbnRzLmNvbQ==

Cieplak··on Ask HN: "Creative" ways to handle abusive http traffic?
Came here to suggest that, too. Here’s a tutorial on doing it with the pf firewall:

https://home.nuug.no/~peter/pf/en/bruteforce.html

Cieplak··on A Formal Security Analysis of the Signal Messaging Protocol (2017) [pdf]
Why try to break the protocol, when you can just SSH into the endpoint and read the keys and plaintext directly?
Cieplak··on Chip 2.0: High Level C to Verilog with Python Bindings
If you have the money/business, BlueSpec is the best tool for high level synthesis.

http://bluespec.com/54621

Cieplak··on Ask HN: Who is hiring? (May 2018)
Finix | Software Engineer | San Francisco, CA | Onsite | Full-Time | $100k - $150k | Equity

Finix builds, manages and sells a payments processing platform (http://developers.finixpayments.com) to banks and other financial institutions. Our stack is mainly Java and Postgres on AWS. We have a few services in Haskell. We are the first seed-stage company that Visa has invested in.

Looking to hire 2 to 3 highly effective engineers who want to work on a state-of-the-art technology platform pushing the future of payments and banking software, and want to have agency over their day-to-day work. Beneficial to understand the payments domain and have experience delivering SLAs of 4 nines (99.99%).

Reach us at this base64-encoded email address: cGF0cmljaytobkBmaW5peHBheW1lbnRzLmNvbQ==

Cieplak··on Ask HN: What are some examples of beautiful x86 assembly code?
https://2ton.com.au/HeavyThing/#appsources
Cieplak··on Writing a recursive ascent parser by hand
This is a pretty cool JSON parser in C:

https://github.com/vincenthz/libjson/blob/master/json.c

Cieplak··on Proposal: Non-cooperative goroutine preemption
Interesting old thread comparing actors to software transactional memory (STM):

https://www.reddit.com/r/haskell/comments/175tjj/stm_vs_acto...

Seems like pre-emptive actor-based concurrency is simple to implement using STM, but much harder to implement STM with actors.

Cieplak··on Elixir School
It’s very easy to consolidate multiple erlang modules (files) in a single elixir file. Simple to translate erlang to elixir.

Functional programming is a big win, but don’t forget the virtues of static type systems and compile-time code verification.

https://github.com/cieplak/examples/tree/master/elixir

Cieplak··on Google's C++ Class
A Tour of C++

http://www.stroustrup.com/Tour.html

Cieplak··on A week-long programming retreat
Interesting to hear that C++ isn’t that well supported on OpenBSD. The story is quite the opposite with FreeBSD, where it’s really easy to use either clang or gcc. I usually spin up new jails to keep different installations sandboxed. CLion works quite nicely with most window managers on FreeBSD, but I rarely boot Xwindows these days and usually prefer to work with emacs inside tmux from the console.
Cieplak··on CockroachDB Interactive, D3-Powered Simulations
What kind of consistency guarantees can this database provide? Does it support some type of lock so it can be used to give real-time account balances and prevent overdrawing an account?
Cieplak··on ISP Spying
Another cool thing about WiFi routers is that you can use them as radars to monitor people in a home. The 2.4ghz frequency is perfect for reflecting off water bodies while having great penetration through walls.
Cieplak··on Sum Types Are Coming (2015)
Once you get the hang of algebraic data types (ADTs), definitely check out generalized ADTs (GADTs). They reduce the amount of code required to express a solution, make the type system do a ton of work for you to prevent bugs from compiling, and make it easier to embed domain-specific languages in your code. A lot of the GADT tutorials out there are a little abstract for my taste and I wish there were more examples with tangible applications, but this one is decent:

http://joeyh.name/blog/entry/making_propellor_safer_with_GAD...

Cieplak··on An opinionated guide to Haskell
Perhaps you need to update your package index?
Cieplak··on An opinionated guide to Haskell
A lot of people use Atom, but I think emacs + intero is currently the best Haskell tooling. I use it with spacemacs. Has everything I would need from an IDE, including highlighting errors on the fly, auto completion, jump to definition, auto formatting. It’s no intellij, but I’ll take Haskell’s type safety over that any day of the week, and twice on Sunday.

http://commercialhaskell.github.io/intero/

Cieplak··on Ask HN: Who is hiring? (February 2018)
Sorry that you had to click on dodgy sites to figure this out. Another way to do it is to open a terminal and type

    $ python
    > 'eW91ciB0ZXh0'.decode('base64')
PS: you’ll need to import base64 with python3
Cieplak··on Ask HN: Who is hiring? (February 2018)
Finix | Software Engineer | San Francisco, CA | Onsite | Full-Time | $100k - $150k

Finix builds, manages and sells a payments processing platform (http://developers.finixpayments.com) to banks and other financial institutions. Our stack is mainly Java and Postgres on AWS. We have a few services in Haskell. We are the first seed-stage company that Visa has invested in.

Looking to hire 2 to 3 highly effective engineers who want to work on a state-of-the-art technology platform pushing the future of payments and banking software, and want to have agency over their day-to-day work. Beneficial to understand the payments domain and have experience delivering SLAs of 4 nines (99.99%).

Reach us at this base64-encoded email address: cGF0cmljaytobkBmaW5peHBheW1lbnRzLmNvbQ==

Cieplak··on Why I'm excited about Crystal in 2018
Haskell checks all those boxes, plus it’s been around for 28 years. Yes, I am a fanboy. That said, it’s a hard language to learn.

Seems like there’s a mass migration away from Ruby for performance reasons, with people flocking to languages with familiar syntax, e.g., Elixir, Crystal, even though there are very different language semantics.

← PreviousPage 4 of 20Next →