Live data from Hacker News

Elixir – HUGE Release Coming Soon

genserver.social

41–50 of 83 posts

Re: Elixir – HUGE Release Coming Soon

#42

Earlier quoted context omitted.

Zero-arity functions are your externally visible module constants. :)

Sure, but I find it less readable and more verbose than your usual constants. Also you can't pattern match on a function return value IIRC. Or maybe I didn't find the right syntax, I get "invalid pattern in match" or "cannot invoke remote function inside a match" when pattern matching on function parameters. There's also solutions with macros, but why complicate something so simple :)

> Also you can't pattern match on a function return value IIRC.

You definitely can. A function return value is just any other value and you can pattern match on it directly, or with the `case` or `with` constructs.

Re: Elixir – HUGE Release Coming Soon

#43
post #17

I hope its a big update with static types

IIRC José recently said he was was gonna spend some time thinking about Elixir's approach to typing, so that's probably it. My hope is a smaller runtime that works well for CLI tools. I'd love to use Elixir for small scripts I'd ordinarily use Go/Python for.

I had an idea years ago when I still had the young man’s dream about writing a programming language. It came after I took over a J2ME project that was trying to do a great deal of functionality in an 85K jarfile.

That idea was that there should be a little language inside of each big language that is used to implement the self hosting aspects of the language, and then a small set of additional libraries would provide a usable embedded variant of the ecosystem, good for small places and things that have to start quickly.

Re: Elixir – HUGE Release Coming Soon

#44

Earlier quoted context omitted.

Sure, but I find it less readable and more verbose than your usual constants. Also you can't pattern match on a function return value IIRC. Or maybe I didn't find the right syntax, I get "invalid pattern in match" or "cannot invoke remote function inside a match" when pattern matching on function parameters. There's also solutions with macros, but why complicate something so simple :)

> Also you can't pattern match on a function return value IIRC. You definitely can. A function return value is just any other value and you can pattern match on it directly, or with the `case` or `with` constructs.

I think the poster means "you can't pattern match with a function value

Re: Elixir – HUGE Release Coming Soon

#46

Earlier quoted context omitted.

Sure, but I find it less readable and more verbose than your usual constants. Also you can't pattern match on a function return value IIRC. Or maybe I didn't find the right syntax, I get "invalid pattern in match" or "cannot invoke remote function inside a match" when pattern matching on function parameters. There's also solutions with macros, but why complicate something so simple :)

> Also you can't pattern match on a function return value IIRC. You definitely can. A function return value is just any other value and you can pattern match on it directly, or with the `case` or `with` constructs.

What would be the correct way to pattern match here?

  def foo(), do: "bar"
 
  def foo(value), do: value

Re: Elixir – HUGE Release Coming Soon

#47

Hi everyone! I want to align everyone expectations and say this is not related to the Elixir language itself but rather the Elixir ecosystem. The language has been stable for years and non-minor features always discussed upfront through several proposals. With that said, if you are interested on the work happening on types, I wrote recently about it here: https://elixir-lang.org/blog/2022/10/05/my-future-with-elixi..…

the Elixir metaverse? ;P

Re: Elixir – HUGE Release Coming Soon

#48
post #14

Earlier quoted context omitted.

I thought so too, but Jose Valim says "never before seen on Elixir or the BEAM", while Gleam exists and Jose undoubtedly knows about that project: https://gleam.run/

Also meta has a static typing system for Erlang. Also, dialyzer exists. So if it's "never" he means set theoreic types, but there are incomplete set theoretic type libraries for elixir

By meta do you Facebook? If so just say that, it's confusing otherwise.

Re: Elixir – HUGE Release Coming Soon

#50
post #25

He has been teasing this for a couple of months now. This cryptic twitter post[1] would suggets something related to nx[2] as numbat is their logo and that is the alt text on that tweet. The most out of the box thing I can think of is that one of the image generative models has been ported to elixir. That would be insane! That numbat twitter image is suspiciously 512x512. [1] https://twitter.com/josevalim/status/1583…

ah, seems pretty clear you probably figured it out. very cool!
Post reply on HN