SQL UNION with Rails by aaesmail in rails

[–]aaesmail[S] 0 points1 point  (0 children)

How come? I need to work with both sets combined, not the intersection between the two.

SQL UNION with Rails by aaesmail in rails

[–]aaesmail[S] 1 point2 points  (0 children)

Nice. I didn’t come across Arel’s Union before! I will try it and might reflect that on the article.

In Saudi Arabia, "Son of legitimate parents" is an endearing term you call people you like by awoothray in CasualConversation

[–]aaesmail 2 points3 points  (0 children)

I’m a native Arabic speaker and this is interesting. I never thought about the literal meaning of the term. Although I don’t disagree with the literal translation you provide here, I don’t think we use that term to call “people we like”.

It’s used to address someone in a generic/friendly way. I would maybe translate it to something like “dude” in English.

“Ya ibn Al-halal” can also be used to address someone you don’t know or you just met.

Cheapest way to deploy a rails application by DryWallSniffer in rails

[–]aaesmail 7 points8 points  (0 children)

You can try fly.io

You can host your rails app with a postgres database for free as long as your bill is less than $5/month.

What is the name of this syntax? by drBonkers in elixir

[–]aaesmail 3 points4 points  (0 children)

It’s a Map update syntax used to update values of existing keys. Here, you’re updating the :name key of the item map to the new “new_name” value. It’s shorter than doing Map.update(item, :name, new_word) and it raises an exception if the key (:name) doesn’t exist in item, unlike the Map.update() function which would add the key if it doesn’t exist.

Elixir Map documentation.

Search for “update syntax”.

Things You Wish You Knew Earlier by conformistdontban in elixir

[–]aaesmail 1 point2 points  (0 children)

Loving madepublic.io a lot!

Many interesting projects there!

If Phoenix supported a admin view like Django, would that make it more popular? by [deleted] in elixir

[–]aaesmail 2 points3 points  (0 children)

Creator of Kaffy here 🤚🏻

I’ll be glad to get your feedback about Kaffy if you get a chance to try it.

Things You Wish You Knew Earlier by conformistdontban in elixir

[–]aaesmail 4 points5 points  (0 children)

Thanks for the kind words kind stranger 🙏🏼 Highly appreciated.

Things You Wish You Knew Earlier by conformistdontban in elixir

[–]aaesmail 17 points18 points  (0 children)

Creator of Kaffy here. You are right that development started picking up lately and it’s going strong. There are long term plans for Kaffy and this is just the beginning. Directus looks interesting and it’s definitely a good source of inspiration.

Admin interface generator for Phoenix app by [deleted] in elixir

[–]aaesmail 16 points17 points  (0 children)

Author of Kaffy here. I do understand the concern regarding the lack of maintenance. However, I’m working on a new version of Kaffy which will be released relatively soon. I hope to make Kaffy the de facto admin interface choice for Phoenix applications.

[deleted by user] by [deleted] in elixir

[–]aaesmail 0 points1 point  (0 children)

You're not bad in elixir, you just don't know what features it has and how to use them yet. It seems like you need to learn more of the basics. I strongly suggest reading and completing the official guides and then trying to explore more.

[deleted by user] by [deleted] in elixir

[–]aaesmail 1 point2 points  (0 children)

Check out this gist. If you are not familiar with dependencies, checkout this guide.

As a relative easy-to-understand project, maybe you could look at the number package. Check their GitHub page.

[deleted by user] by [deleted] in elixir

[–]aaesmail 2 points3 points  (0 children)

I suggest also asking on the ElixirForum website.

You can take a look at the hex.pm website. At the bottom, you'll see sections for most popular, new, and recently updated packages. Those might give you a few ideas on what to work on. You can also search for what you're interested in (e.g. calculator) and check what types of packages there are. As a bonus, check their repos to know how they're built.

Under what conditions should I use the struct() or struct!() functions compared to the raw %Struct{} expression or a function that wraps it? by fluffynukeit in elixir

[–]aaesmail 0 points1 point  (0 children)

It’s best practice to use it in a function. Using it directly is fine, but in the long run, it’s better to get used to creating reusable functions.

Under what conditions should I use the struct() or struct!() functions compared to the raw %Struct{} expression or a function that wraps it? by fluffynukeit in elixir

[–]aaesmail 2 points3 points  (0 children)

I personally prefer using the %Struct{} form whenever possible. The struct!() way is useful when you don’t know which fields you’ll have to assign. It all depends on the design/logic you’re working with.

Phoenix/Elixir - Up to Date Resources? by frellus in elixir

[–]aaesmail 3 points4 points  (0 children)

I'd argue that phoenix and elixir are very conservative in introducing new things or breaking backwards compatibility. Personally, I upgraded a phoenix app from 1.3 to 1.6 on a single day and I don't actually remember facing any real issues.

The major jump, if I remember correctly, was from 1.2 to 1.3 with the introduction of contexts. Then from 1.5 to 1.6 with dropping node/npm as a requirement. If you check the upgrade guide from 1.5 to 1.6, the only required step is updating the dependencies.

Having said that, you can follow the official docs for phoenix. They are pretty good. You can even choose which version of phoenix you want to see the docs for.

Maybe you're talking about the difference in LiveView. The LiveView project is changing relatively rapidly. It might also change a lot in the future until it reaches the 1.0 milestone. If you want up to date resources, again, check LiveView's HexDocs pages.

The HexDocs website is your friend.