1,042 karma · joined Dec 5, 2017 (8y ago) · 172 submissions
comment 3y ago · link · parent
You should use embedded mode if you do not require fault-tolerance and can miss updates. Otherwise, don't. Regardless of scale.
comment 3y ago · link · parent
comment 4y ago · link · parent
They are different. In some contexts more than others but still different. I love going into the office but pretending its magically more efficient is a bit silly. I like getting distracted at work but don't think it makes me more valuable to the company. I certainly don't write better code at work - if anything my home office allows me to shut out distractions more easily (a luxury not everyone has). This entire argument is silly - not allowing remote work is denying a large portion of a workforce. That workforce may or may not be better or worse but its certainly cheaper for the employer. Why deny yourself a large talent pool?
comment 5y ago · link · parent
comment 5y ago · link · parent
There are a ton of subsidies provided by the government that are not accounted for in this cost. Water rights, land, delivery all are accounted for differently and I would not say with any measure of confidence that they are all represented well in the consumer cost. There is also the large externalities that are completely not accounted for like carbon emissions.
It is sort of like comparing electric cars vs gas back when people would comment how cheap oil is and ignore the wars fought over it and the environmental devastation wrought from its production.
comment 5y ago · link · parent
Im not comparing whether Dockerfiles or buildpacks or nix packages are more ergonomic than one another but i do think your comment is...misguided. From what I have heard Nix is pretty wonderful to use and simplifies the problem - it just requires you learn about Nix a bit which i think is a fair trade-off for the benefits it supposedly provides
comment 5y ago · link · parent
The weakness in the current design is three-fold for me: - I can "forget" to handle in error (ok this can be linted for maybe?) - There is a lot of ceremony in propagating errors up the chain (a very very very common thing to do!) - The convention of (ok, err) is not always conformed to and ultimately provides no benefit over more concrete typings like Result<T, Err>. Now I can easily grep for fallible operations or operations that call fallible operations!
You may be fine with it - I hear the same argument from my coworkers about checked exceptions in java. I think we can do better.
comment 5y ago · link · parent
This is the problem right here. I don't just read code I've written and I don't only read perfectly abstracted code. When I am stuck reading someone's code who loves the book and tries their best to follow those conventions I find it far more difficult - because I am usually reading their code to fully understand it myself (ie in a review) or to fix a bug I find it infuriating that I am jumping through dozens of files just so everything looks nice on a slide - names are great, I fully appreciate good naming but pretending that using a ton of extra files just to improve naming slightly isnt a hindrance is wild.
I will take the naming hit in return for locality. I'd like to be able to hold more than 5 lines of code in my head but leaping all over the filesystem just to see 3 line or 5 line classes that delegate to yet another class is too much.
comment 5y ago · link · parent
That isn't true at all. The implementation of scoped_threadpool being in rust is all the evidence you need that they did not cheat. unsafe is a perfectly valid construct in rust that does not subvert its benefits. It just is a reversal of the defaults in other languages (unsafe by default - opt-in to safer constructs like smart_ptr).
People freak out too much over this stuff. If you are learning - feel free to use escape hatches from "idiomatic rust" but recognize that you aren't being idiomatic (and therefore may be handicapping your learning!). Its okay to use unsafe despite idiomatic rust trying to avoid it unless necessary (and even then providing safe wrappers over it). Its also okay to use Arc<Mutex> and the like if you need to just recognize there may be a better way.
comment 5y ago · link · parent
Ill have a tree of tabs for blogs im reading, a tree for work stuff, a tree for amazon orders, etc. All that context can be closed in a single click. Ill have hundreds of tabs open (but asleep!) and just pick the tree im interested in. Dont need to save bookmarks or save articles for later - they are all there always.
comment 5y ago · link · parent