Well, it's easy to say if you don't live near one.
But if you do, the smell, view, and fact that ground water becomes undrinkable will convern you. Not to mention the space they take, where little life can live on.
In the USA, you have a huge space, including deserts, so a landfill may be out of most human reach. But in France, landfills can't be far, and take the place of either a forest, or accomodations.
We don't have a better way to deal with the huge amount of trash than landfills for now. But reducing the number or size of them would be a nice to have.
I don't mean it should be a priority compared to most urging issues like climate change, but let's not get too comfy with it either.
If you are on HN, you likely use a computer a lot. But 15 years ago, a switch occurred, and nowaday, there are way more people using a phone that don't have a computer at home, or use it rarely.
This means for the vast majority of people today, and hence customers, the phone IS the computer. It's the entry point for everything.
They consume content, shop and even work on that.
But phones have terrible ergonomics. Their productivity sucks.
One of the reason is the limited screen space.
For someone using a phone, mostly as a communication device, while doing important things on a computer, a small phone makes sense. I'm this kind of person. My phone is too big for my taste. Anything complicated, I reach for my laptop: it's more efficient. Phones are terrible at multitasking, and constraint myself to 2 finger typings, tabs that open in several steps and a viewport of the size of 2 credit cards?
But we are not the target.
For the target, a big screen is the mandatory crunch they need because they watch a lot videos, do banking, read pdf and even type work stuff on their phone. This tiny, constrained square they have to make do with for everything.
It makes small screen a hard sell. The iphone mini was not a great success if we compare it to other phones, despite everybody claiming we would all love it.
If this is your threat model, don't hope the user do not make mistakes, rather whitelist devices that the machine is allowed to plug in for card readers.
Don't understand why you are being downvoted, coming from another language, it's an understandable surprise.
The explanation is that Python features heavy dynamism, meaning one can easily replace any part of the system at runtime (at any moment), including builtins, code objects, and even hook into the parser, AST, import mechanism, etc.
This renders inlining a dangerous exercice: say you inline the builtin len() function, how do you know it's not the intent of a code that runs later to replace it with a different implementation?
Now, there are ways to implement inlining, but they are not as straightforward as say, with a compiler, when you know nothing is going to change afterward.
> The explanation is that Python features heavy dynamism
JavaScript too, any function can be dynamically changed at any time, but its function calls are 30x faster (roughly, I measured it just now with a for loop doing 100 million function calls, which took 0.5s in JS, 15s in python)
This is a realistic scenario if you want to run e.g. a custom statistics function on a large array in python so it can be annoying (and yes numpy can do things but that's no reason to keep the main language encouraging less readable code where you don't define separate functions)
> its function calls are 30x faster (roughly, I measured it just now with a for loop doing 100 million function calls, which took 0.5s in JS, 15s in python)
Your benchmark also measures iterators and boxed integers, which were not in the JavaScript version, so it's not clear how much of the difference is due to function call overhead.
(Of course, it certainly doesn't help Python's performance that there's no simple way to do loops without iterators and integers without boxing. It would be nice if a future version could optimize the abstractions away.)
On second thought, I'm not sure. Can you observe the number's object identity like you can in Python? Does JavaScript have to allocate a new Number object for each "i++"?
My point was that the Python version of Aardwolf's function call benchmark [1] is definitely using iterators and boxing all numbers, so it's doing a lot more than just calling a function, and the Java equivalent would look something like this:
Long f(Integer x) {
return new Long(x.longValue() * x.longValue());
}
// ...
Double v = new Double(0.0);
Iterator<Integer> range = IntStream.range(0, 100000000).iterator();
while (range.hasNext()) {
Integer i = range.next();
v = new Double(v.doubleValue() + f(i).doubleValue());
}
Hence the "So it's something that had be delayed.", and not "this is something impossible".
Javascript has the benefit of having billions of dollars allocated to it from Google/Microsoft/Apple to hire dozen of amazing engineers full time over decades to work on it.
We are talking a difference of funding of 6 order of magnitudes. Not to mention one is a language that has to stand on its own, the second has an accidental monopoly on the most popular plateform in the world.
> Python has existed since 1994, yet in 2011, the Python Software Fundation budget was less than $40K
Exact, as usual it is mainly a question of human resources. Hence why I advocate for Python switching to GraalPython as the default runtime, it would enable much better performance in the next few years.
Also, I'm pretty sure cpython devs should ask Google/OpenAI/MicrosoftAI funding, how many millions can they waste on useless projects while not improving the core bottleneck..
You are asking for the rarest thing of all, a geek and volounteer worker that is also good at dealing with big entities and comfortable with managing money.
> how do you know it's not the intent of a code that runs later to replace it with a different implementation?
I think progress could move forward by adding a compiler flag "assume no fully free function body replacement" you know just like in every other mainstream language.
It's not body replacement, it's function reference erasing. There is no way in Python to tell something has been replaced or not, since variables are dumb labels and a reference is the same kind for any object. In fact, there is no particular difference between 2 objects in python.
E.G: functions are objects, and any object can be called as a function. And it's just a reference to "something callable" in the namespace mapping (literally a dict in most implementations), which is mutable by definition
Also a compiler flag would not help, since most users don't compile the python VM.
Now, you could put a runtime flag, that list all stuff that are created for the first time in a namespace, and refuse to allow reassignment.
It's possible, but it would break a LOT of things and prevent many patterns.
The last attempt was to put guards, and to assume no replacement, but if a replacement occurs, then at this moment we revert locally this assumption.
The process is refined at each iteration, but there is no turn-key solution as you seem to believe.
> I think progress could move forward by adding a compiler flag "assume no fully free function body replacement" you know just like in every other mainstream language.
Ah yes, a compiler flag which literally says “break the language”, that sounds like a great feature which would be used a lot.
> assume no fully free function body replacement
There is no “body replacement”, the `len` builtin is looked up as a global in the module on every access, anyone can just replace the module’s global.
I'm just advocating for a compiler flag that says "do_reasonable things" just like in every other mainstream language. Python must free himself from those idiosyncrasies if it wants to stay relevant, migrations are not that hard especially since those patterns seems illegitimate or workaroundable (e.g. use overriding if you want to replace a function or do extension methods). At worst at least tag the concerned functions as dirty via an annotation which will tell cpython to locally deoptimize.
I'm not arguing for an exceptional thing, just for conventionality and sanity.
I think you're missing how deep the function reference change goes in standard code. What about unittest mocks? Conditional module loading? Enabling/disabling tracing features? I'd bet there's some dynamic function reference assignment that happens during python console startup.
It's not unreasonable. It's just what the language makes easy and useful. It's still used much less than for example method aliasing in Ruby which has about the same result.
JavaScript doesn't do this, you can replace properties of window at will. I don't think Ruby does it, or Lua. PHP probably does it under some circumstances in modern versions but only because it's remarkably un-dynamic for an interpreted language.
This is normal fare for high-level interpreted languages, for better or worse.
But that means you have to add all sorts of dependency tracking, such that you are able to deoptimise any function affected by mutation on things which were optimised in or out.
This means your complexity increases very fast, very high, before you can have anything which actually works.
If by "just fine" you mean, "with incredible engineering resources funded by a small number of large companies with deep pockets and with some performance cost to check that the optimization is still valid", yes.
One of our scientific collaborators is _literally_ of the view that "One day people will realise what a mistake python 3 was, and go back to Python 2" (which is a verbatim quote).
While this has happened with Perl (AFAIK, people realized what a mistake Perl 6 was, and there's a plan for Perl 7 to mostly go back to Perl 5, which makes it two breaking changes in a row), I see no signs of it happening with Python; instead, every new Python 3 release gets farther from Python 2.
I don't think people considered Perl 6 a "mistake". It's more that they realized that it wasn't a successor to Perl 5 and is instead a separate language. The language itself isn't a mistake, it was treating it as the next version that was.
The Perl community may be attempting to "fix" that mistake with Perl 7, but the damage has been done. I think Perl 6 fractured the community so hard and scared away so many users that both Perl 7 and Raku are likely to be minor languages for the foreseeable future.
If either of them has legs, I think it's likely to be Raku. Because Raku is at least an interesting language with a lot of really interesting, powerful language features.
Perl 5/7 by virtue of its history, is mostly just another dynamic scripting language, but one with a particularly unfriendly syntax. Aside from CPAN and inertia, I think there is relatively little reason to write new Perl 5/7 code when PHP, Python, Ruby, and JavaScript are out there.
That mistake was sad. In the end they succeeded at creating a language that fixed most Perl problems and is actually quite awesome. But at the cost of catastrophic loss of mindshare.
Raku is too slow for no obvious reason, plus every lib has to be rewritten from scratch, including the good and mature ones from Perl.
There are more interesting things happening with Ruby and Python. In fact there are Python libs for obscure stuff like CAN-bus and ISO-TP. Want to talk to a vehicle ECU? It can be done with Python.
There's also lack of momentum and quite a lot of bikeshedding in the Perl community. There were attempts to modernise Perl by rurban and others, but they were met with unecessary resistence. Without community support they all ended up as one man shows. Perl is pretty much a dead end. You are hearing this from someone who still writes Perl code every day for work. My latest proof of concept was done in Ruby and it will probably end up as production code.
I've tried for several iterations until I finally gave up and moved on to Ruby, Racket etc. Moose is quite slow itself. I never use it or anything that depends on it. I use Moo or Mojo::Base instead.
Inline::Perl5 is quite an ugly last resort solution. And you still need a Perl intepreter as opposed to calling on C code from D where you just need the libs.
If you gave up on it, why still keep saying it is slow, when you have no current information about that?
Also, when you're talking slow: why is it that any performant Perl module, actually has most of its logic written in XS (aka C)? So I think it's shows quite a bit of hutzpah to call Inline::Perl5 "an ugly last resort solution", whereas a *lot* of upstream CPAN modules rely on the hack that is XS to make them performant. To give you an example: the pure Raku version of Text::CSV is more than 2x as fast as the pure Perl version of Text::CSV.
I thought the Perl situation was a little more nuanced.
Although Perl 6 was meant to be a Python 3000 type thing, it was spun out into its own language (Raku). Perl 7 will continue the 5.x lineage, but with saner defaults. Thus, any code that’s around now should run, but the interpreter’s name might change.
(I think…I mostly keep up with Perl for nostalgia’s sake).
> Although Perl 6 was meant to be a Python 3000 type thing, it was spun out into its own language (Raku).
The problem for them is that Perl 6 actually had an official release (and IIRC, more than one) under the Perl 6 name; the rename of the language to Raku (which IIRC was originally the name of just one VM for running Perl 6 programs) came later. So anyone who managed to keep up with the latest release of the Perl language would have two huge breaking changes (Perl 5 to Perl 6 and Perl 6 to Perl 7), the second one undoing most of the changes of the first. (AFAIK, PHP avoided all that by deciding to go back before officially releasing PHP 6, so anyone who was following the latest release just jumped directly from PHP 5 to PHP 7, avoiding the breaking changes which had been planned for PHP 6.)
I get how you (and perhaps others) might think it's as you say. But I can tell you're not saying what you've said based on knowing it to be true but guessing it to be so. And while your guess isn't a surprising one given natural assumptions due to the names "Perl", "Perl 5", "Perl 6", and "Perl 7", it doesn't correspond to what has actually happened.
Anyone keeping up with the latest release of the Perl language has had near zero breakage for decades. (Indeed Perl has a well deserved reputation for having an outstanding track record in this regard compared to almost all other mainstream PLs.) I personally see every likelihood Perl 7 will extend that track record, though of course my crystal ball prognostications are necessarily based purely on what I see.
No one using P6 or Raku had a huge breaking change from Perl 5. No one using P6/Raku will have another one going to Perl 7.
If you presume Raku and Perl are different languages you'll get the essence of what has actually happened so far, and seems likely to be more or less true for the rest of this decade at least.
Incorrect, Raku(do) is not the VM. It's MoarVM (or JVM but that one is trailing behind). Rakudo is the reference implementation.
Also you should think in terms of Perl 5 -> 7. Raku is the language formally known as Perl 6. Perl 7 isn't undoing anything, it will be the successor to Perl 5. Perl 7 should have been 5.32 with saner defaults, but of course it's now going to take another 20 years of bikeshedding until this is happening.
It needed to be done; there were several choices in python 1/2 holding the language back, that all but necessitated breaking changes. Mostly with string/bytes/unicode handling. And the non-breaking route would have been a long term pain.
They didn't decide to break over print() and cosmetic changes, it runs way deeper.
According to Jean-Marc Jancovici (https://www.youtube.com/watch?v=IaQ-U-dP_7M, in french though), this is right on the money: CO2 being extremly stable and given the quantity we already have transfered in the atmosphere, a 1.5°C global rise in temperature is inevitable already. We'd have to in the negative indeed to have a impact, and with the system inertia and the cascading effects, it's not even sure it would reverse the trend completly.
Windows terminal is the best thing that happened to Windows since WSL and I hoped it's going to be default soon, because I work with clients that are using W10 but still stuck with cmd.exe, and I have to bypass all their security policy to use cmder so that I have a decent working experience.
First, I don't want to train a commercial product so that it can make money with me. How crazy is that?
Secondly, I've been told it takes 20 minutes of browsing and it would train automagically. Well after 30 minutes that I regret spending, it was still showing me the most terrible content humanity has ever produced and my eye were bleeding.
I uninstalled the app and won't touch it again. It feels like being a teen forcing oneself to start smoking cigarets.
Do you use Netflix? YouTube? Twitter? Facebook? You're training all of these just by using them. I've seen way worse stuff on Twitter than I ever have on TikTok.
Most crimes are left unpunished, even more so corporate crimes, because it's usually very hard to prove there is one, to demonstrate who is guilty, and costly to sue for little gain.
In fact for corporate crimes, it's even worse, because there is little skin in the game: rare jail time and fines that are only a subset of the money earned by committing the crime, when there is any.
Make it 2 months of jail + 1 one day for each patient data which has been breached for eveyrbody in the chain of command responsible, and you'll wager it will happen a lot less.
Yes, but those things have been historically mostly provided by volonteers, and I can understand they didn't want to spend a lot of effort trying to clean the mess of a giant corporation of Microsoft for free.
MS should have provided a formulat parser and interpretter as a FOSS portable C lib decades ago. But at the time, they didn't pretend to be the good guys to win market shares, they publically despised anything open or free, so it couldn't happen.
I guess it would have help OOo a lot at the time, and would help pandas today.
Now that MS has VSCode, maybe they'll end up doing a LSP, but I doubt it. Programmers are not their target for excel.
But if you do, the smell, view, and fact that ground water becomes undrinkable will convern you. Not to mention the space they take, where little life can live on.
In the USA, you have a huge space, including deserts, so a landfill may be out of most human reach. But in France, landfills can't be far, and take the place of either a forest, or accomodations.
We don't have a better way to deal with the huge amount of trash than landfills for now. But reducing the number or size of them would be a nice to have.
I don't mean it should be a priority compared to most urging issues like climate change, but let's not get too comfy with it either.