1,261 karma · joined May 6, 2011
You used a word that has a specific meaning to refer to something else, hence the miscommunication.
I don't share it though. And it's interesting to think what assumptions lie beneath it. If you were bi, would your wife not allow you to hang out with men too? And if she were bi, what would you think of her having woman friends? Do you think this arrangement would also be "the most sensible thing to do" for a non-monogamous person, or for someone who's monogamous and completely at peace with their partner?
There was this blog post of a company trying improve their clients' webpage performance by incrementally migrating them from JS to WASM/Rust: https://zaplib.com/docs/blog_post_mortem.html
In short, their idea failed. Those rewrites did not yield the "orders of magnitude" perf improvements that they were hoping for. A quote from the article:
> Rust is faster than JS in some cases, but those cases are rarer than we expected, and the performance gain is on the order of 2x some of the time, not 10x most of the time.
Having had a good deal of experience programming in JS, this doesn't surprise me. JS engines are extremely good at JIT optimizing, especially if you know what you're doing and give them code that's suitable for optimization (e.g. using mostly primitives and arrays, simple loops, avoid creating tons of intermediate data structures, etc).
IDK if any of this counts as "serious evidence". It's purely anecdotal really. But it's on par with the "evidence" presented as a counter to this.
Depending on where one lives, but many people have access to "free" government services, ranging from roads, education, unemployment security, healthcare, and more. The costs of these services are payed by taxes.
Some "free" services are sustained via donations. Wikipedia is a good example of this.
Some people might say that those are not examples of "for free", because someone is paying for those things, either via taxes or donations. They do have a cost for society. Yes, but in that case then ad-based services are not free either: the advertisers are putting the money to run those services, and the society is also paying a huge cost in thousand of hours of people's lives wasted down the drain, promotion of harmful products, scams, etc.
Not a very significant distinction: if active users stopped posting, scrappers wouldn't have much of a reason to keep scrapping.
For calls with some non-block arguments, it's not so clear-cut as "always include parentheses".
Some methods are so prevalent that they almost become part of the language "syntax", even though there's nothing syntactically special about them. For example, you rarely see parentheses used on calls to `attr_accessor` or `private`:
class Cat
attr_accessor :fluffiness
private def plan_world_domination
# TODO
end
end
I think parentheses around `private(def some_method ... end)` would be especially non-idiomatic. Even though passing the result of the `def` expression to the `private` method is exactly what's happening.Another place where it's usual to omit method call parentheses is on embedded DSLs. For example, in RSpec it's uncommon to include parentheses on calls to `describe` or `it`.
describe "RSpec DSL" do
it "looks neater without parentheses" do
# ...
end
endIf you're using FactoryBot for example, you can use `build(:taco)` to instantiate a Taco without persisting it to the DB. If you use `create(:taco)` instead, then yes, the Taco will be saved to the DB, as well as all its associations (if any). This can of course bloat up your test execution time if you're doing this kind of instantiation + persistence on every test.
FactoryBot docs generally use `build` in their examples, as this should be the default build strategy used for most tests, while `create` should only be used on cases where you actually need to interact with the DB.
The fragmentation on Linux desktop causes a lot of churn, both in users looking for more cohesive desktop experiences, and on developers looking to not having to deal with all this mess.
In regards to major backwards-incompatible version changes, to me it's pretty clear that many developers simply don't give enough priority to maintaining backwards compatibility. Most cases i've seen of backward-breaking changes were unnecessary: the new features could've been added while maintaining the existing APIs (maybe deprecating them if needed). The decisions to not maintain the existing (and now deemed "old") APIs were not done on a technical ground, but more on an ideological/purist ground, where the "old" APIs were considered "bad" or too costly to maintain (both claims totally subjective and not supported by much evidence). And simply not enough thought was put in considering how users of the APIs may find it difficult to do a major version update, or might simply churn away and not do the update or look for an alternative.
Now, i don't have direct experience with GTK, so i might be totally bullshitting and maybe nothing that i said applies to GTK major version bumps. But the fact that so many projects find it hard to update and are stuck on older versions for long times, and that the desktop UI paradigm hasn't changed that much in the last 20 years (how much MUST the APIs for windows and UI controls change then?) makes me suspect that there is at least a bit of that backwards-compatibility disregard here too.
I don't understand what you mean by any country. I think every country i've visited so far has been safer than my home country. So in my case at least, no, i didn't have to be particularly careful as a tourist, in fact i've needed less care when being abroad than when being at home.
Functions do have a place too of course; even single-use ones. Especially when you can give them a clear purpose and name.
I think the conflation came more from the "community" than from the React team itself. Many people were (ab)using Redux for simple cases were Context would have been sufficient and, in the process, paying the price of having a lot of boilerplate related to writing anemic "reducers" whose only purpose was to store things on the global state, and eventually also paying the price of having a ball-of-mud of a global state where no-one could be sure of the dependencies between components, as anyone could be accessing anything on that big ball-of-mud. (Been there; not proud.)
So, when the Context API came along, with a much leaner API (no actions or reducers) and less "global-y" feel than Redux, people who were misusing the latter naturally saw the former as a good replacement
There's probably nothing unique about it, but the server/browser model allows anyone on a team to access the Figma project as long as they have a web browser, while a classic client/server model would require a dedicated client software to be installed to access the project.
On my last job, we switched from using Abstract for sharing designs between the designers and developers, to using Figma for both designing and sharing between all team members, and the switch was a huge success.
Speaking for myself alone, the experience on Abstract was pretty terrible: the native application didn't have a Linux version, and the web client was dog-slow, buggy and limited in features. Figma, on the other hand, being the same web client for everyone, meant a pretty decent experience from the get go, which was a welcome change TBH.
Not that unlikely i'd say, at lest if the stack size is unreasonably small.
For example, on nodejs, JSON.stringify() chokes with a nested array of 10K depth:
> N=10_000; JSON.stringify(JSON.parse("[".repeat(N) + "]".repeat(N)))
Uncaught RangeError: Maximum call stack size exceeded
at JSON.stringify (<anonymous>)
Curiously, JSON.parse() is OK with arrays of 10M depth (and probably more). A difference of over 3 orders of magnitude between functions that seem pretty symmetrical at first glance.Imagine that you build some software that lets users nest things —e.g., a circuit designer, a visual programming language, a UI builder, etc— and you wanna save these nested structures as JSON, or process them recursively. Pretty natural fit i'd say. Now, as a user, i'd be pretty upset if my magnum opus of a very complex circuit, or giant visual program, or very busy beast of UI art, starts creashing the program when exceeding a mere 10K elements. My computer has gigabytes of memory! And, presumably, there's a lot still available. But nope, a meager stack can ruin all the fun.
I personally think this is a pretty silly limitation to have on software, especially given today's memory sizes.
What in the hell? I think i totally failed to communicate what i mean if took that from what i said.
I tried to say that it's a personal decision of mine to try to change my workplace if i learn that people i work with/for are completely immoral. Like, i don't wanna work with people like that. It's a personal decision. But i wouldn't want to force anyone to agree with me or anything of that sort. Sorry if it came out that way, i didn't mean to.
No need for these assumptions. Your argument is clear without them.
Maybe you and i would not respond the same way on the same situation, and that's OK. Personally, when i had coworkers that would say things that i consider totally indefensible, yes, it made me feel terrible and angry, but at the same time, i was at least glad to now know who i was dealing with. I knew that person couldn't be trusted, and how i should (avoid to) interact with them. This is especially true for me in the cases where such person is a superior, or when nobody else in the organization calls on their shit; those are start-to-look-for-another-job situations for me personally.
And, sincerely, i don't think banning such topics from work environments would work for these kind of cases. Those people will keep being the way they are and acting their shitty way when and where they feel they'll get away with it; you'll just may not know who they are, yet.
Disclaimer: i'm not from the USA, or a "first world" country, so it's very possible for our cultures and work environments where we've been to be quite different.
Oh, buckle up!
new DOMPoint<Number>(4,5)
Let's first clean things up a bit: DOMPoint an Number are just identifiers. So, let's replace those with a and b: new a<b>(4,5)
Let's also add some spacing around these tokens to distinguish them better: new a < b > (4, 5)
Yep, those < and > are comparison operators.And let's also add some parentheses to make clear the order of operations in these comparisons. The above expression is equivalent to:
(new a < b) > (4, 5)
Now, let's remember that a is DOMPoint, so `new a` is just instantiating a new DOMPoint object. Yep, the parentheses at the end of the `new Something` calls are optional if no parameters are passed. > new DOMPoint
DOMPoint { x: 0, y: 0, z: 0, w: 1 }
(That's the result of trying that out on a JS console. The initial > on the first line is the REPL prompt, not part of the JS syntax. And the second line is what the REPL prints.)So the < operator is comparing a DOMPoint object to b, which is Number, which is just a constructor function. IIRC, what JS does is these kind of situations is to convert both operands to strings and then compare those.
> (new DOMPoint).toString()
"[object DOMPoint]"
> Number.toString()
"function Number() {
[native code]
}"
So the first < comparison is going to compare these two strings, and since '[' is less than 'f' (of course... ASCII), the < result will be `true`. The whole expression can then be reduced to: true > (4, 5)
The right-hand side of this > operation, `(4, 5)`, is curious. The parentheses are just normal parentheses for grouping expressions, but what's inside of them are two expression joined together by the comma operator[1]! Basically, both expressions, 4 and 5, are evaluated, one after the other, and the result of the whole is the result of the last one: > 4, 5
5
So, we're almost there! The whole thing can now be reduced to: true > 5
Since one of the operands is a number, JS tries to convert the other one to a number too. `true` converted to a number yields 1, which is not bigger than 5 — finally, something that makes sense!So now we know why the whole thing that looks like TypeScript but isn't, is valid JavaScript and evaluates to false :)
> new DOMPoint<Number>(4,5)
false
1: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...It's true that people here need either an alternative currency for purchasing foreign goods (access to USD or other currencies is restricted, and customs fees are insane), or an alternative asset for keeping the value of their savings.
But it's not true that people need Bitcoin. As a currency for purchasing things, Bitcoin is useless. People here are better off evading customs taxes (smuggling), and purchasing via USDs bought on the black market. And for keeping the value of their savings, again, people usually turn to USDs. Some people have speculated with BTC and other cryptocurrencies, yeah, but this is not so much for savings, but more for greedy speculation.
And it's not like the USD is important on itself, it's just an intermediate goal for something else. If the USD becomes too unstable or loses much of its value, people here will turn to other stronger foreign currencies.
So, imagine what this means in the context of what your parent comment said: that Bitcoin's ledger being trivially replaceable.
No, Bitcoin is not needed here. Not at the moment at least. And if it is in the future, so be it, but so can be any other crypto or alternative currency. Who can predict which it will be (if any)? I don't see how betting on future Bitcoin's value for countries like mine makes any sense when there nothing inherent about Bitcoin that would make more valuable than any other alternative currency.
Grifters should be punished for their scams, and it's also acceptable for "investors" on these scams to lose their money i think (that's a hard punishment already; no need for anything extra). Thinking of it the other way around: as a society, it wouldn't be nice to bail out or compensate these "investments", as doing so would encourage people to keep doing throwing their money on things they don't have any clue about and expect to be compensated if it turns out bad.
But, it's also totally possible for a program to store a backup, and let the user restore that the next time they open the program in desperation for not having saved their document in a moment of distraction.
> but it should be a "lesson learned"
Yes. And as the article notes, the lesson can be that software and UX can be make to accommodate better for possible user mistakes. I personally think it's nice to have Undo actions, or some ways to revert possible mistakes. It makes software way less scary :)
And it's not like non-root user is nothing. I, as a user, can of course access and edit files on my $HOME directory. But it's insane that a transitive dependency of a dev dependency that has been installed without even my knowledge can have by default the same permissions to access and override any file on my $HOME directory.
but if you want to render to the DOM —and you want to use the DOM if you want to have decent accessibility, or not have to reimplement all the complex user interactions that the browsers take care of— then i think an immediate mode framework might have a great impedance mismatch with the DOM, as the latter is a retained mode GUI model
Not only are many (most?) of SWE jobs quite questionable in their value, but they are also very inefficient in my experience, at least in bigger organizations. So you're not only dealing with the dissatisfaction of doing something that's pretty meh (at best), but also with the boredom of being super inefficient and knowing you could do so much more with your time.
Of course, we're all free to leave and do something else. But it's not easy to go against the current.
But, if it doesn't matter, why not let RuboCop make all `if`s consistent with `rubocop --auto-fix` and be done with it, instead of configuring RuboCop to not complain about it?
It seemed that this style choice did, in fact, matter a bit. At least enough to make you change RuboCop's defaults to accommodate to it. And that's fine; that's why those things are configurable :)
Of course, it's also fine to decide not to use RuboCop if you need to reconfigure a lot of it's defaults. Fighting with our own tools doesn't make any sense, but for some reason it's not an uncommon thing to do in this industry.