HNHacker News
TopNewBestAskShowJobs

hazbo

757 karma · joined August 14, 2013

submissionscomments
hazbo··on Ask HN: Any interesting niche hobbies?
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··on Programming languages that blew my mind (2023)
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··on Ask HN: What is the best way to learn Erlang?
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··on Ask HN: What is the best way to learn Erlang?
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··on Ask HN: What is the best way to learn Erlang?
From OP's post:

> But my current project requires me to learn erlang

hazbo··on Ask HN: What is the best way to learn Erlang?
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··on Ask HN: What is the best way to learn Erlang?
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··on Ask HN: What is the best way to learn Erlang?
I also really love this book! I'd also add that Adopting Erlang[1] is a great resource.

[1]: https://adoptingerlang.org/

hazbo··on Ask HN: What is the best way to learn Erlang?
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··on BeeBase, a programmable relational database with graphical user interface
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··on BeeBase, a programmable relational database with graphical user interface
What's an "unclosed group"? And how would I go about finding that out without reading some sort of manual?
hazbo··on A Cheat Sheet to Database Access Control: PostgreSQL
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··on Dear Paul Graham, there is no cookie banner law
It's now magically made it to page 6, seems a bit odd
hazbo··on If buying isn't owning, piracy isn't stealing
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··on Proof Math Is Engineered
Link to explanation on README: https://github.com/avaneev/prvhash#proof_math_is_engineered
hazbo··on Tell HN: Google Cloud suspended our production projects at 1am on Saturday
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.
hazbo··on A Lisp interpreter written in Lisp (2017)
I can't recommend the talk Dr Byrd did on this enough:

https://www.youtube.com/watch?v=OyfBQmvr2Hc

It's one of my favorite programs to play around with. I wrote about an Erlang implementation of this a short while back:

https://thingstoreadabout.substack.com/p/lisp-in-seven-parts

hazbo··on Lang Jam: create a programming language in a weekend
When you think "language", try not to let your mind jump straight to "compiler" or "interpreter". Think more, "specification". If I asked you to write me a C compiler and you delivered on that, I'm not left with a new language. You didn't design a new language, only the compiler for an already specified language.

Designing a language is more about defining a specification. Then 10 different compiler engineers may pick that spec up and implement 10 different implementations of the same language, for example.

hazbo··on APSE – A Personal Search Engine
> Do you use Windows, macOS, iOS, Android?

Their answer to this might simply be "no". There are people who just wont touch devices that are shipped with code / programs that don't respect the privacy of the user, unless installing free software to override the stock proprietary system is an option.

hazbo··on The Hijacking of Perl.com
The use of the word "popular" made me wonder this. Either way, happy to clarify the facts in the case that other people didn't get the joke.
hazbo··on The Hijacking of Perl.com
Perl and Raku are two individual languages. Perl is still very much alive https://www.perl.org/
hazbo··on Not Lisp again (2009)
I was able to write something similar in chez-scheme

  (define deriv (lambda (f)
      (let ((dx .0001))
          (lambda (x)
              (/ (- (f (+ x dx)) (f x)) dx)))))
hazbo··on Advanced Join Patterns for the Actor Model Based on CEP Techniques
Footnote from page 3:

> Elixir can be regarded as a modern Erlang (e.g., with macros) that runs atop BEAM; i.e.,the Erlang virtual machine.

I've heard quite a few descriptions of Elixir, relative to Erlang, but I'm not quite sure about this one. Erlang has macros[0], though the syntax and general format does differ from that of Elixir's[1]. And though Erlang has been around since at least 1986, it has changed a lot in that time and is what I'd consider to be a modern programming language today, used at places such as WhatsApp, Grindr, Pintrest etc...

[0]: https://erlang.org/doc/reference_manual/macros.html#defining...

[1]: https://elixir-lang.org/getting-started/meta/macros.html#our...

hazbo··on Show HN: Cookie Recipe Generator
https://www.fastfoodmenuprices.com/starbucks-prices/
hazbo··on Programming Idioms
Previous discussion: https://news.ycombinator.com/item?id=21080606
hazbo··on Ask HN: Best Static Site Builder?
I think this is the way to go if you're not one to change the HTML very frequently. It can be a repetitive process to update HTML for each page if you've wound up with lots of them. If that's not so much a concern, go for it!
hazbo··on Ask HN: Best Static Site Builder?
A slightly different take on this. I've recently seen people combine Pandoc[1] with their own (generally quite small) shell script. It's pretty amazing how little time it can take just using Pandoc / shell to come up with something that's just right for your needs, without all the bells and whistles.

[1]: https://github.com/jgm/pandoc

hazbo··on Ask HN: Who wants to be hired? (September 2019)
Location: Newcastle upon Tyne

Remote: Yes

Willing to relocate: I'll be moving to Portland, OR next year, but potentially I could, yes.

Technologies: Go, C, Erlang, Docker, Kubernetes

Résumé/CV: https://storage.hazbo.co.uk/harry-resume.pdf

https://github.com/hazbo

Email: hello@{HNusername}.co.uk

Hey! I'm a software developer currently based in Newcastle-upon-Tyne in England, though I'll be moving to Portland, OR later next year. I'm available to start straight away! Would be interested in working with functional programming languages - but generally open to anything.

hazbo··on Aerc – An email client that runs in the terminal
I was thinking exactly this. It's unbelievable the amount of amazing things Drew has been putting out there recently.
hazbo··on Ask HN: What's your stack for your side projects?
Go, Python, C, Postgres, Redis
Page 1 of 2Next →