Hacker Newsnew | past | comments | ask | show | jobs | submit | zachdaniel's commentslogin

I think its also important for people to realize that

1. its opt-in, if you don't like it don't use it :)

2. we don't do magic migrations. We generate a regular ecto migration from your resource changes. So you can use it as a starting point and hand edit it (and often you should or even must as we can't do things like generating data migrations).

3. you don't have to map your resources one-to-one with tables. We support multiple resources being sourced from the same table, and turning on and off migration generation per resource. It's very common to have an Ash resource backed by a postgres view, or two ash resources backed by the same table. The migration generator merges resource definitions together to create "the strictest table definition that supports both resources". You can also remap field names. So at the end of the day, you can have your cake and eat it too on that front.


We tried to make it a bit clearer recently with the section on "Compatibility". "Works great with Phoenix, Ecto and all the other first rate tools in the Elixir ecosystem."But you aren't the first person to say this. It's complex because we do build your APIs for you, and it's not a requirement to use Phoenix to make this work. But Ash also can (and usually does) act as something you use alongside Phoenix. It makes it difficult to message :(


Ultimately we avoid that with a few specific things:

1. As sane config as possible.

2. ability to hook into functional processes and see what's going on

3. Layered escape hatches. You can add functional hooks to actions, or you can use a manual action to take over the data layer interaction, or you can write a "generic action" which gives you even more control. The escape hatches are designed to allow as much customization without sacrificing capability as possible.

4. Ash isn't its own language/environment. It's just an Elixir library. If doing something with Ash is proving difficult for whatever reason, you can opt not to use it for that, and then you're back in Elixir-land in full control. Ash doesn't attempt to "own" the things you use it with (in fact we take extra care to be as compatible with other tools as we can. For example, each Ash resource is also an Ecto schema. In this way, Ash can handle the 90+% of your application that is typically table-stakes, and you can handle the rest.

Also, I liken declarative programming to sushi. There are a lot of people who don't like sushi, because they've only had bad sushi :)


Thanks for explaining!

Another approach that I think works well is exemplified by ‘make -n’ where it prints a script for what it would do in a particular situation. Make’s rules-based syntax has its advantages, but imperative scripts are also pretty easy to understand, so it’s nice to see a conversion from one to another. (To go deeper, though, you need to understand what the commands do.)

I haven’t used it, but I believe the Cue language can generate JSON output, which would be another example of translating from a sophisticated config language to a simpler, more verbose one. (Though, again, you need to understand the code that ingests the configuration to go any deeper.)


Thank you


We share a lot in common with those design principles, yes. Ultimately though I don't believe in modeling as a sort of "pure" thing that you can do in advance of coding. Our tools are aimed at essentially doing both at the same time, finding the middle ground between your domain model and reality.


It now says "Elixir" right on the tin :)


I still don't see it anywhere other than the small caption mentioning ElixirConf (still not obvious that it's meant for Elixir) and the mention of Phoenix + Elixir ecosystem under the "Compatibility" section (way too far down the page).


Yep, because I pushed a different change and accidentally removed the word Elixir again. Pretty stupid of me, it’s been a hectic day. We’re putting it back as we speak.


Okay, fixed :)


Can confirm I see it now! Definitely more immediately obvious what Ash is this way :)


We used to have tons of information and I spent a bunch of time removing it all trying to simplify. I very clearly removed too much . But, it’s definitely not GPT generated.


When simplifying don't lose base information. Language, aim, actual benefits. "Everyone" use graphql, json and data layers.


Thanks for the feedback! Its pretty difficult to find someone with no context on what we're building at all and say "hey does this tell you what this thing does/what info is missing", so this is very useful.


Just do user interviews of FAANG devs that work in Ruby or something?


So, something that is very clearly true is that was need to make the website better :). We aren’t being vague on purpose! Most people who go to our website have gone with an idea of what Ash is already having seen a talk from me or talked to someone about it.


Our recent changes to the website aimed at trimming it down were clearly overzealous.


Is there a reason you're being opaque about the fact that it runs on Elixir? Why not just say right at the top "a framework for elixir lang" or something similar?


Not at all! Just an oversight :)


The small change you made to the front page already makes it easier to understand! Thank you!


When they don't you just write them yourself. All we do is generate migration files to provide a good starting point. Its a convenience tool.


For the same reasons that the author dislikes Tesla, I prefer it :D


To clarify: it's the same reason that I like plug.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: