News for hackers. Stuff that matters.

hazbo

Re:Ask HN: Any Interesting Niche Hobbies? on Thursday April 09, 2026 @06:15AM (#47701633)
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.

Re:Programming Languages That Blew My Mind (2023) on Monday November 04, 2024 @10:29AM (#42042423)
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.
Re:Ask HN: What is the best way to learn Erlang? on Thursday October 03, 2024 @04:41AM (#41728603)
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?
Re:Ask HN: What is the best way to learn Erlang? on Tuesday October 01, 2024 @09:28AM (#41708113)
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...

Re:Ask HN: What is the best way to learn Erlang? on Tuesday October 01, 2024 @08:47AM (#41707654)
From OP's post:

> But my current project requires me to learn erlang

Re:Ask HN: What is the best way to learn Erlang? on Tuesday October 01, 2024 @08:22AM (#41707451)
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.
Re:Ask HN: What is the best way to learn Erlang? on Tuesday October 01, 2024 @08:01AM (#41707265)
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!
Re:Ask HN: What is the best way to learn Erlang? on Tuesday October 01, 2024 @07:53AM (#41707194)
I also really love this book! I'd also add that Adopting Erlang[1] is a great resource.

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

Re:Ask HN: What is the best way to learn Erlang? on Tuesday October 01, 2024 @07:50AM (#41707172)
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/

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.
What's an "unclosed group"? And how would I go about finding that out without reading some sort of manual?
Re:A Cheat Sheet to Database Access Control: PostgreSQL on Wednesday April 03, 2024 @07:04AM (#39915876)
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.
Re:Dear Paul Graham, there is no cookie banner law on Monday March 18, 2024 @10:24AM (#39744985)
It's now magically made it to page 6, seems a bit odd
Re:If buying isn't owning, piracy isn't stealing on Saturday December 09, 2023 @07:07AM (#38581260)
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

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

As the title states, just interested in finding some examples people think would be particularly good reads, especially for people approaching the language for the first time.Ideally examples that show what a "complete" Rust project might look like in terms of the way it is laid out and what associated tooling / scripts that are commonly used or included in Rust code bases.

( Read More... | 5 comments | 2 points | on HN )
Re:Proof Math Is Engineered on Wednesday September 14, 2022 @10:40AM (#32837913)
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.

Ask HN: What are some interesting examples of Prolog?

I'm trying to source some programs and libraries written in Prolog to gain a better understanding of how a complete application is put together. Lots of Hello, World-esque examples out there, but looking for things that are a little less trivial.I did come across terminusdb: https://github.com/terminusdb/terminusdb which looks interesting.Any other codebases people would recommend that are...

( Read More... | 63 comments | 198 points | on HN )
Re:A Lisp interpreter written in Lisp (2017) on Monday August 09, 2021 @08:47AM (#28116076)
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

Re:Lang Jam: create a programming language in a weekend on Sunday August 01, 2021 @08:35AM (#28025841)
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.

Re:APSE – A Personal Search Engine on Tuesday July 27, 2021 @05:28AM (#27970392)
> 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.

Re:The Hijacking of Perl.com on Monday March 01, 2021 @08:39AM (#26302639)
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.

Older »