HackerTrans
TopNewTrendsCommentsPastAskShowJobs

hazbo

no profile record

Submissions

Ask HN: Which open source tools are best for code-heavy technical writing?

2 points·by hazbo·vorig jaar·1 comments

People have been searching for this song from 'The X-Files' for 25 years

npr.org
2 points·by hazbo·3 jaar geleden·0 comments

Hands-On Change Data Capture in Go with Postgres and Debezium

blog.ori.co
2 points·by hazbo·3 jaar geleden·0 comments

Hands-On Change Data Capture in Go with Postgres and Debezium

blog.ori.co
1 points·by hazbo·3 jaar geleden·0 comments

Ask HN: What are some good examples of Rust code bases to read and learn from?

9 points·by hazbo·3 jaar geleden·5 comments

Proof Math Is Engineered

github.com
3 points·by hazbo·4 jaar geleden·1 comments

Ask HN: What are some interesting examples of Prolog?

198 points·by hazbo·4 jaar geleden·63 comments

comments

hazbo
·3 maanden geleden·discuss
Perfumery.

It's something I got into a few years ago and has been a real eye-opener into the world of perfumery and our wonderful olfactory senses. Strangely, though I suspect is the case with many other hobbies, there is crossover with programming albeit somewhat abstractly.

Often it's about building abstractions and reusable components. For example let's say you wish to create an apple note (typically referred to as an accord). You're not tasked with creating the scent of an actual apple but rather the illusion of apple. This is done by mixing ingredients (usually referred to as raw materials) which are generally split into two categories, synthetic and natural, where a synthetic material if often just an isolated molecule and a natural material may be an oil extracted from nature or a tincture, among other kinds. Once you have mixed the raw materials and are happy with the result, you've essentially created a formula which is a reusable component that can then be used in one or many of your creations.

Aside from the creative process of making the actual perfume, you've then got a ton of applications in which to use it such as a fine fragrance, a candle, room spray, shower gel, shampoo, laundry detergent to name just a few.

With new raw materials becoming available all the time there are just endless possibilities as to what you can create and it, for me, has been a lot of fun both learning the craft and creating actual perfumes that I myself now wear.
hazbo
·2 jaar geleden·discuss
I remember my mind being blown when I first came across list comprehensions. It was one thing to be able to effectively generate one list from another:

  Squares = [X*X || X <- [1,2,3,4]].
(This can be read as, Squares equals a list of X*Xs such that each X is a member of [1,2,3,4])

Going from that to then realizing that you can use list comprehensions to implement quicksort in basically 2 lines of code:

  qsort([]) ->
     [];
  qsort([H | T]) ->
     qsort([ X || X <- T, X < H ]) ++ [H] ++ qsort([ X || X <- T, X >= H ]).
These examples are written in Erlang though list comprehensions are found in many other languages, Python and Haskell to name a couple.
hazbo
·2 jaar geleden·discuss
Does this logic not basically invalidate anything that isn't imperative at a high level that eventually runs on a processor? Like, "why bother writing Haskell? It just gets compiled and ran imperatively." Isn't the whole point that you can reason about Haskell?
hazbo
·2 jaar geleden·discuss
That's true, in fact there are a whole bunch of BEAM languages[1]. It's just if OP needs to learn Erlang for their current project, learning Elixir, Gleam, LFE etc... might not be the best use of time.

[1]: https://github.com/llaisdy/beam_languages?tab=readme-ov-file...
hazbo
·2 jaar geleden·discuss
From OP's post:

> But my current project requires me to learn erlang
hazbo
·2 jaar geleden·discuss
I think Erlang's concurrency model is quite a bit different to the likes of Go (and probably most other languages). With Go you still have to worry about shared memory and have to manage that correctly when using Go routines. In Erlang, there is no shared memory with processes. Parallel processes are completely independent, they have their own stack and heap, and so the only way one process is able to share or access data to/from another process is through message passing.
hazbo
·2 jaar geleden·discuss
I've had such a good experience with ELP, though did have some issues getting it working correctly with my emacs setup (that's probably somehow my fault). I will say though that for VSCode, it's a case of installing the extension, zero config and it just works!
hazbo
·2 jaar geleden·discuss
I also really love this book! I'd also add that Adopting Erlang[1] is a great resource.

[1]: https://adoptingerlang.org/
hazbo
·2 jaar geleden·discuss
In recent years there has been some improvement with the available tooling with the likes of rebar3[1] and just a few months ago WhatsApp released ELP (Erlang Language Platform)[2] which integrates with your IDE as a language server that provides really nice support when working with Erlang.

[1]: https://www.rebar3.org/

[2]: https://whatsapp.github.io/erlang-language-platform/
hazbo
·2 jaar geleden·discuss
I'm not arguing that I think "Invalid name" is a good message here. I don't think it is. But if you're relying on either familiarity or the ability to look it up, then you're still relying on there being a manual to provide that information in the first place if it is not somehow included in the error message itself. As would be the case here with Bee and rg.
hazbo
·2 jaar geleden·discuss
What's an "unclosed group"? And how would I go about finding that out without reading some sort of manual?
hazbo
·2 jaar geleden·discuss
This seems rather incomplete. Even if you were to use the cheat sheet to create a role/user and create a policy with a condition there's zero mention of row-level security, or even the 'ENABLE ROW LEVEL SECURITY' statement which is a requirement for any of this to even work. There's no mention on differences between 'USING' and 'WITH CHECK' on a policy and it seems to give off the idea that users and roles are separate things.
hazbo
·2 jaar geleden·discuss
It's now magically made it to page 6, seems a bit odd
hazbo
·3 jaar geleden·discuss
I recently learned that it had been reported that the music for those ads was stolen and used without permission.

https://en.wikipedia.org/wiki/You_Wouldn%27t_Steal_a_Car
hazbo
·4 jaar geleden·discuss
Link to explanation on README: https://github.com/avaneev/prvhash#proof_math_is_engineered
hazbo
·4 jaar geleden·discuss
A few years ago I was working at a startup and we had just started moving some stuff over from AWS to GCP. Things were going pretty good with GCP until one day they pulled the plug on everything with no explanation. It turns out that our company credit card details had been fraudulently used without our knowledge. The criminal had decided to use the card to buy Google Ad Words or something like that - this is the same card we use on our GCP billing account. Anyway Google just took prod down with no notice on grounds of fraud. Could happen to anyone.