~hauleth

https://hauleth.dev

~hauleth/public-inbox

Last active 1 year, 26 days ago

~hauleth/blog

Last active 2 years ago

~hauleth/bare-erlang-devel

Last active 2 years ago
View more

Recent activity

Similar project to BARE 2 years ago

From Łukasz Niemier to ~sircmpwn/public-inbox

When looking through the RFCs I have found XDR[1] format which is quite similar to the BARE with few differences:

- less integer types - only 32-bit and 64-bit
- no maps
- no optionals (can be implemented via unions)
- more C-like description language rather than Go-like
- is big-endian
- variable length entries must be padded with zeros up to 4 bytes

[1]: https://datatracker.ietf.org/doc/html/rfc4506
--

Łukasz Niemier
lukasz@niemier.pl

Re: cond-like macro 2 years ago

From Łukasz Niemier to ~technomancy/fennel

> unless I misunderstood you, `if` should be enough here, no?
> 
> (if check1 action1
>    check2 action 2)

I must have missed that syntax in the docs. Sorry for bother.

--

Łukasz Niemier
lukasz@niemier.pl

cond-like macro 2 years ago

From Łukasz Niemier to ~technomancy/fennel

Sometimes I need to change some conditions and **I know** that only one will be true. It would be handy to have built-in macro that would allow something like

    (cond
      check1 action1
      check2 action2)

Right now the only way to achieve something similar from what I see is to do

    (match true
      (_ ? check1) action1
      (_ ? check2) action2)

Does anyone have macro that would achieve something like that? Maybe it would be useful to have such functionality built in.