Terris
Terris
AEAsh Elixir
Created by moissela on 7/28/2023 in #support
Prefixed base62 UUIDv7 primary key implementation with Ash
I don't know how to extend Ash, so I'm useless. However, I want this solution, so I cheerlead thou. I built something that uses calculations but just as a spike. I know that's not what I or anyone else wants - for one, it doesn't work with Ash JSONApi or Ash GraphQL. https://gist.github.com/dev-guy/51a4c12983424d3480cd1201263b50c9
25 replies
AEAsh Elixir
Created by Korbin on 7/23/2023 in #support
Differences between UUID primary keys in Ecto vs Ash
Creating a uuidv7 type and checking if the https://pgxn.org/dist/pg_uuidv7/ extension is installed (otherwise use v4) is on my todo list.
31 replies
AEAsh Elixir
Created by Wout on 5/15/2023 in #showcase
Ash Tutorial With Livebook
If this gets moved can someone please post a note to #announcements-archive or #showcase or ... ?
58 replies
AEAsh Elixir
Created by Terris on 7/7/2023 in #support
How should module calculations return errors?
Is this the right way? Whatever calculate/3 returns seems to be used literally. I'd rather not end up with {:error, errormessage} as the value of a calculated field. ``` defmodule Example2.Calculations.ID do @moduledoc false use Ash.Calculation @impl true def calculate(records, , _) do Enum.map(records, fn record -> case Example2.UUID.fromid(record.id, record.struct) do {:ok, string} -> string # If I don't do this, the calculated field contains {:ok, string} -> {:error, 'Failed'} end end) end end
9 replies
AEAsh Elixir
Created by Terris on 7/7/2023 in #support
How should module calculations return errors?
Oh, so calculations can return a raw value or a tuple.. did I not read the docs closely enough ?
9 replies
AEAsh Elixir
Created by Terris on 7/2/2023 in #support
CRDT and Ash
5 replies
AEAsh Elixir
Created by Terris on 7/2/2023 in #support
CRDT and Ash
Thanks. I researched it a little and the deal breaker is incompatibility with Yjs which is used on the client side (I'm not using liveview forms).
5 replies
AEAsh Elixir
Created by Terris on 5/21/2023 in #support
Log in with username and password in Phoenix app
And why is email special? It could be a phone number.
12 replies
AEAsh Elixir
Created by Terris on 5/21/2023 in #support
Log in with username and password in Phoenix app
Currently toying with idea that email address isn’t unique. Only usernames in a tenant are unique
12 replies
AEAsh Elixir
Created by Terris on 5/21/2023 in #support
Log in with username and password in Phoenix app
Thank you! I have been through that article. Very well written. I’d love to be able to give you some code back that would have a flow that say would verify the email address first and then ask for a username. My liveview and elixir skills are still pretty bad.
12 replies
AEAsh Elixir
Created by Terris on 5/22/2023 in #support
Modeling Context Multitenancy
@Zach Daniel In the thread linked above, you seemed to be recommending combing context and attribute multitenancy where only the Organization would be attribute tenanted. Did I misread that? "I've done multitenancy setups before and have been able to do it with a tenanted users table, and an attribute multitenancy organizations table". Perhaps you weren't saying that the Organizations table should be tenanted. At any rate, I recall a conversation on this discord server (which I can no longer find here or via google) about a similar scenario where User needs particle/wave duality -- tenanted and untenanted -- the latter is for managing Organizations
10 replies
AEAsh Elixir
Created by Terris on 5/21/2023 in #support
Log in with username and password in Phoenix app
Using " identity_field(:username)" does what I want. However, is there a way to require email address and username in the registration form? I tried
register_action_accept([:username, :email])
register_action_accept([:username, :email])
But it will prompt for one or the other.
12 replies
AEAsh Elixir
Created by Terris on 4/14/2023 in #showcase
Phoenix+Ash+Svelte : Better together
The Phoenix community is generally anti-javascript. If you're proficient in JS, LiveSvelte is for you. Phoenix and LiveView are for battle-hardened scalability, collaboration, and API-less app development. Svelte completes the picture.
11 replies
AEAsh Elixir
Created by Terris on 4/14/2023 in #showcase
Phoenix+Ash+Svelte : Better together
I’m still learning. For example, I’m still not sure what the word component means exactly in Phoenix and liveview. It seems trivial but there are details.
11 replies
AEAsh Elixir
Created by Terris on 4/14/2023 in #showcase
Phoenix+Ash+Svelte : Better together
If you haven’t seen this video, it’s powerful. https://www.youtube.com/watch?v=JMkvbW35QvA
11 replies
AEAsh Elixir
Created by Terris on 4/14/2023 in #showcase
Phoenix+Ash+Svelte : Better together
LiveSvelte is about to add a sigil (https://github.com/woutdp/live_svelte/discussions/33) to make it easier to use. SSR is probably something that most people would disable as a lot of Svelte usage doesn’t support it and I doubt many Elixir devs want to be running Node or Deno in production. LiveSvelte is cool but it doesn’t do much, which means that there are fewer things to go wrong so IMO it is production ready because Svelte is rock solid. The combination of Svelte and LiveView makes combining server and client state easier. I am currently working on integrating a design system with semantic colors and small look-things like rounding. This has nothing to do with Svelte or Phoenix but as Svelte has a larger community, it is further along in that regard. Whereas phoenix has only recently added Tailwind, Svelte Skeleton has been implementing a design system on tailwind for much longer (see https://www.skeleton.dev/docs/tokens and watch https://www.youtube.com/watch?v=JbxKTBvSLeY). Only small projects and MVPs hard-code color names in a billion places. Green and blue should instead be called primary and secondary.
11 replies
AEAsh Elixir
Created by Terris on 4/19/2023 in #support
Ash-Postgres and uuidv7
FYI.. uuidv7 support in Elixir https://github.com/bitwalker/uniq
8 replies
AEAsh Elixir
Created by Terris on 4/19/2023 in #support
Ash-Postgres and uuidv7
Awesome! Thank you!
8 replies
AEAsh Elixir
Created by ZachDaniel on 2/28/2023 in #showcase
Model your Domain, Derive the Rest
Is there a recording?
7 replies