I mean, I’ve never used JSONs before but I imagine you could still write to them in realtime at least, as inefficient as that sounds lol. So you could probably get the same results on an actual text editor if you could modify it to update the text automatically when it detects a change instead of prompting the user
Before nginx was a thing, I worked with a guy who forked apache httpd and wrote this blog in C, like, literally embedded html and css inside the server, so when he made a tpyo or was adding another post he had to recompile the source code. The performance was out of this world.
This reminds me of one of my older projects. I wanted to learn more about network communications, so I started working on a simple P2P chat app. It wasn’t anything fancy, but I really enjoyed working on it. One challenge I faced was that, at the time, I didn’t know how to listen for user input while handling network communication simultaneously. So, after I had managed to get multiple TCP sockets working on one thread, I thought, why not open another socket for HTTP communication? That way, I could incorporate a fancy web UI instead of just a CLI interface.
So, I wrote a simple HTTP server, which, in hindsight, might not have been necessary.
Yeah, I think it’s all about context. If it’s just part of a personal project or something you’re sharing with a few friends, it’s a useful tool. If it’s being presented as real art or even used commercially, that’s when the issues start coming up.
was it a car crash video/gif sub? sounds familiar.
I also remember a dank meme with a sketch of jesus and a helicopter pilot, with different dumb captions, like “hit this bong before you takeoff, bro, trust me, my son”
If you’re provided a tool that solves a problem, I don’t really get ignoring that and continuing to focus on that solved problem as if it weren’t solved because you think all the tools should solve it on principle
That’s a little bit like saying, “I don’t understand why people continue to complain about the landmine sitting right there on the ground. We’ve painted it red so you can easily walk around it, so how has the problem not been solved?”
Land mines are painted red in my shop. You want to change the language to remove a land mine that everyone competent already knows enough to step around. The problem has already been solved, so why are you continuing to complain about it?
Just to be clear, I’m not actually calling for JavaScript to change, I’m just pointing out that people are right to point out this as being a problem. Having said that, if everyone competent uses linters now so that this feature isn’t used in practice anymore, then getting rid of it shouldn’t even break anything, and arguably code which would break is already broken because it uses an operator that no one should be using, so you shouldn’t be using this code anyway.
I can sort of get down with what you’re saying, but on the other hand, we all have design constraints, inside and outside of programming, I think this is a very minor one
Using linters in a professional setting is more like moving all your actual employees into a different office and letting them use robot avatars in the original office who can never step on that landmine.
The benefit of this is that millions of other robots continue to depend on the original office being exactly as it is and many of them will never change or update, nor is their any need for them to.
Breaking backwards compatibility on the web needs much better reasoning than ‘I don’t want to use a linter’.
Yeah, it’s true. I knew all the other ones, had to put that one in the dev tools console to believe it. I was just happy to know === continues to be sane in that comparison.
That would be weird if a string containing a space wasn't equal to 0 " " == 0, but that's not the case in JS. If you think that "" and " " being equal to 0 is weird then I agree, but since they are, you should expect "t" and "n" to equal 0 too.
The == operator in JS will try to cast the things being compared and do all kinds of ‘smart’ assumptions about what equality means. This is why everyone uses === instead…
If " " wasn't equal to 0, it wouldn't make sense, but since a string containing a space equals 0, you'd expect the same to apply to a string containing a tab or a newline. (or at least I'd expect that)
I admit I have never dabbled in javascript, despite being a proficient programmer. I now dread to ask... would any string that contains only whitespace == 0? " \t\n \t " for example?
Yes, it would. Just like a string of spaces " " == 0, but it isn't that bad; === is Javascript's version of == in other languages, and, thus, you should be using it if you don't want that wonkiness.
== is just for convenience, like when you want to make sure that the user didn't leave the form empty and the button shouldn't be greyed out, and other UI stuff. Without these kinds of features JS wouldn't be used in so many toolkits.
Ok, I always mistakenly assumed === was the identity operator in JS, too. TIL, thanks! As much as we like to poke fun at JS, every time I’m taught the rationale behind some aspect of it, I find it redeeming and even a little endearing.
The explanation given to you makes it sound like == was deliberately designed to be a more convenient version of ===, but what actually happened was that == used to be the only equality operator in JavaScript, which meant that if you didn’t want it’s auto-coercing behavior then you needed to go out of your way to add additional type checks yourself. Because this was obviously a tremendously inconvenient state of affairs, the === operator was introduced later so that you could test for equality without having to worry about JavaScript doing something clever underneath the hood that you weren’t expecting.
The explanation given to you makes it sound like == was deliberately designed to be a more convenient version of ===
I mean technically == was deliberately designed to be a more convenient version of other languages’ == operator… Just specifically more convenient for light UI stuff since that was all JavaScript was supposed to be used for at the time (or all they thought it would be used for).
But give programmers a way to write and execute a small script and someone will eventually use that to try and write an emulator that emulates the computer it’s running on, so the web evolved into more complicated applications, and then that convenience turned out to be wildly inconvenient, not to mention horribly unexpected for programmers coming from other languages, so then they added the triple equality to match other languages.
You have to remember that the underlying principle of JavaScript seemed to be “never throw an error”, even if what it’s being told to do is weapons grade bollocks.
Also, most cryptos have state of the art programming. They have to, because any little hole or vulnerability puts millions or billions of dollars at risk.
It’s an exchange where you can exchange a token of the same name (their token). The primary purpose is not for that token, it’s mainly known for being an exchange.
There’s no lowest bidder here, how’d you even come up with that?
People employed in crypto are usually very well paid, because they have to be good at their jobs.
The absolute majority of cryptocurrencies is fully open source.
Seriously man, educate yourself before spitting nonsense.
Edit: I’d appreciate if anyone downvoting me provided their reasons for doing so, preferably with sources to back them up. I’m happy to provide examples to back my arguments up if requested.
Have you heard of Indian call centers? Let’s ban phones, let’s ban email, let’s ban gift cards, let’s ban bank accounts.
The fact that the technology is also being used to scam people doesn’t mean that the whole thing is bad. There are numerous use cases beyond illegal activity, and you focusing on a tiny fraction of the whole thing just shows that you don’t actually want to understand, but that hate is your only way of expressing, that you don’t understand it.
Here, read up. They’ve got studies and sources for their claims.
It may seem like it, but it sure isn’t like it. You’ll obviously hear about the bad and nothing about 5he good, unfortunately that’s how media works nowadays.
Do you want to elaborate on those issues that are unacceptable and unfixable? I’m not saying there aren’t any, but you’re describing a trade-off, and crypto isn’t the only thing in the world with trade-offs.
Fiat is a great example - conveniet, nice, until it starts hyperinflating, until people use it to fund wars, until the government confiscates it because you insulted a politician on Twitter.
From scams to just cyber attacks with no safe guards would make everything impossible to handle. There is no bank covering you or insurance. People dying, losing keys etc drive deflation. BTC/Mining coins are destined to die. Maybe there is something there, but it certainly isn’t finance.
Inflation is necessary for multiple reasons, but you can read on that yourself. Such as; what would happen if everyone considered holding to money an investment? IMO these facts make Fiat sound so much better…
You’re free to hold your crypto on an exchange, you’re free to buy a hardware wallet and do your due diligence when confirming transactions, you’re free to create a multisig for your coins and tokens to introduce multiple factors for signing.
But it’s your choice.
people dying, losing keys
That’s on them, it’s like stuffing money into a mattress and not telling your family.
mining coins are destined to die
Mining’s not great for sure, but “destined to die” makes no sense.
Inflation is necessary so that people spend the thing
That’s kinda funny, because in the case of Ethereum, the deflation comes from people using and spending Eth on gas.
I’m also not saying that Ethereum is the perfect currency to replace fiat, the utility there comes from everything that’s built on top of it.
Widen your horizon, crypto isn’t just a medium for payments.
Hardware wallets are safe, multisigs are safe. You can be safe if you put in the effort. If you don’t want to do it, that’s your call, doesn’t mean the system sucks.
Yeah difficulty is adjusted depending on how many “devices” (simply put) are mining, the target is a specific blocktime.
What’s gonna kill bitcoin is the ever decreasing issuance, but that’s not the problem of crypto nor mining for that matter, just bitcoin.
Have you skimmed over the point that I think that Ethereum (one of the few sustainably deflating cryptos) isn’t just a currency but also a base for other things that may also serve as a currency?
Also, it’s not bad for the currency itself, just for the economy around it. And again, I’m not saying Ethereum should replace the dollar.
Yeah, you hear about the things that go wrong and not about the ones that don’t.
I’m not saying everything is perfect, obviously it isn’t, but the people on here are talking about how incredibly shit it is without any redeeming qualities, which just simply isn’t true. It’s harder to prove a negative (that things aren’t bad), especially since nobody’s gonna write a “no protocol got hacked today, $x billion is safe” article.
programming.dev
Active