> ActiveRecord is more pleasant to work with than the ORM of Phoenix IMHO, but not everyone shares the same feeling.
Well, depends on what you do. Ecto is closely follows SQL logic and allows to translate weird sql queries into code directly. All queries are explicit, e.g. you either do preload(...) or can't access nested records at all, no chance of N+1 by design.
Changesets are also different and are just functions you can define as needed.
defmodule MyApp.User do
...
def changeset(user, attrs) do
user
|> cast(attrs, [:email])
|> validate_required([:email])
# This matches the error from the DB uniq index to the :email field
|> unique_constraint(:email)
end
Calling it not an ORM just cause it implements a DTO is splitting hairs. It's an ORM. If you are hydrating an object that saves to storage and you are manipulating it's life cycle and then casting types between your storage primitives and your language primitives from memory to disk you are writing code that every other ORM is writing and it's not special.
As soon as you add use Ecto.Schema to your model it's an ORM.
> But it doesn't require a database and queries have to be explicit!
I'd say Rails is faster than Phoenix (as in development speed) only for the first day or so. After that you'll stumble upon impicit logic, method-missing and this kind of stuff, which will require more time to figure out how it works. Elixi/Phoenix is more exlicit in that regard, making long-term support (as in anything past first week) a breeze. No hidden state, no figuring out where ModuleName.method(params) is coming from, no need to setup stuff to launch said method (just pass right arguments). The only downside i see is smaller library of ready to use packages
Elixir and Phoenix is a better production platform than Django.. I’m not throwing shade on Django, many production systems use it happily. I’m saying that Phoenix/Elixir is better, partly because of the BEAM and OTP and partly because of the language and the framework. Real concurrency. Better performance. Far more robust in production. The language is pre-compiled, and while not statically typed, that alone provides one more safety layer. It’s functional, which avoids a lot of the ugly patterns in both Rails and Django. It has a built-in fast and reliable KV store. It has distribution between the nodes if you want it (e.g. for a distributed cache). It enables you to debug with a remote shell connected live to the running system. There’s a lot more than I can add here.
I am a Go dev, too. I consider Go my main language. The BEAM has a very, very similar architecture to the M:N scheduler in Go. Goroutines are not dissimilar to BEAM processes. You can similarly run thousands of processes on the BEAM. But Go does not have a real Phoenix equivalent and there are reasons to use Elixir and BEAM, especially on the web side, including some of what I already mentioned above.
Equivalent Go code would be very long and very ugly.
Golang has its positives but you also lose a lot. Whole ecosystem is not comparable, like "debug live production cluster" is one-command away for Elixir vs "fuck you" for Golang
Probably going to be replacement rather than direct recompilement of structs. I imagine all sorts of corner cases are lurking around if you swap implementation around, e.g. if someone force-pushed unknown key into a struct at runtime. Would be nice to keep current struct syntax though with the only difference in declaration
i suspect a lot of tools will try to fetch the url without explicit user action (e.g. messengers do that kind of crap). Gotta be hard to keep keys non-revoked, which is a nice side-effect
If you don't use heat pump (which can have 300-500% efficiency), whatever you plug into a wall socket will produce heat at exactly 100%. So the real choice here is either monetize what you are doing with electricity or using a heat pump
my friends have been heating their apartments in the winter mining cryptocurrencies. they're not into crypto, in that they don't do it in the summer, it just helps offset the cost in rentals without heat pumps -- gamers who've already purchased the gpus
1) they do protocol sniffing, and any inconsistency (including statistical) gets you blocked
2) "white list mode" which engaged sometimes (poorly implemented atm), means nothing goes outside of country at all (means 99.9% of everything is broken). They really want to become North Korea soon
Are any streaming sites allowed? It should be really easy to make a VPN through HTTPS tunnel appear to have a traffic pattern exactly like you are streaming videos and/or music (depending in the bandwidth needs) by throwing discardable traffic through when no valuable traffic is needed.
Obviously, everything can be cut off, but the point is that if encrypted something is allowed, there should be a way to get anything through.
If they turn off the internet, that gives you more time to meet your neighbors and do "arts and crafts" and read (cook)books. He's getting so old, at some point the horse throws him off
> How are you suffering equal heat stress from being submerged in moderately warm water
by the rules of this universe, you can't survive being submerged in 40C water for a prolonged period of time (even 37C would kill you as well), because humans produce heat and if you can't dispose of it you'll overheat and be dead soon enough
So while I definitely think it's possible that hot baths and sauna have similar effects, I don't think this can be shown by simple thermodynamics and would require medical studies. Some sibling comments have already mentioned some.
To be clear, my objection was only to the supposed explanation/assertion of resulting core temperature being all that matters, not to the possibility that that's true.
Humidity is the key, Finnish style sauna is low humidity+ high temperature (85-115C is OK i think), while Russian banya-style is low temperature (60-80C with high humidity). Both of them produce about the same load on a human
My problem with turkish style hammam is that unless it's extremely well maintained it often smells of mold. When I went to some nice hammams in turkey, I didn't have that problem but outside of turkey, it's often unbearable.
That's interesting. I don't have much the habit of doing sauna, as you can likely tell, so I might have tried only high humidity saunas. I'll give it a try one day with low humidity if I find one.
* VP9 where AV1 is not available (default YouTube codec, almost universally hardware-supported). Also universally supported .webm is vp9+opus - which mostly used as modern .gif
Well, depends on what you do. Ecto is closely follows SQL logic and allows to translate weird sql queries into code directly. All queries are explicit, e.g. you either do preload(...) or can't access nested records at all, no chance of N+1 by design.
Changesets are also different and are just functions you can define as needed.
reply