1,515 karma · joined Jul 3, 2024 (2y ago) · 606 submissions
comment 2y ago · link · parent
It’s common that as project grows larger and more unwieldy, people ask for more warranty and help from their tooling. I think Python position on this strikes a good balance - provide the infrastructure for adding type hint but delegates type checking to a third party.
comment 2y ago · link · parent
Mature languages don’t tend to break working code. That was true when the quote was pronounced and that’s still true today.
Python is fairly unique in its propensity to be an unstable target. I personally can only think of the JS ecosystem has being worse but even then that’s mostly a library thing as the VM will run even the oldest JS code you can find. I wish the same could be said of Python.
comment 2y ago · link · parent
That’s prospective technology developed literally in order to overcome the limitation that is lithium availability… The battery you are talking about in China is both the first and very small capacity related to the grid.
I’m sorry but I think you clearly have an axe to grind and are not engaging with me with full intellectual honesty here.
comment 2y ago · link · parent
comment 2y ago · link · parent
No, the whole point is that it’s completely dissimilar to that.
> But does this have anything to do with monads or some monadic version of state?
There is no monadic version of state. The State monad is a way of chaining things together (not unlike shell pipes) which is nice in Haskell because it gives access to some of the language syntactic sugar (the do notation). There is nothing particularly special there otherwise.
The key takeaway here is that you can avoid littering your global scope by explicitly passing what’s shared as functions arguments and then remove side effects if you also pass by value.
Yes, it is this simple.
comment 2y ago · link · parent
Yes, very much so. That’s part of why the UN is not taken very seriously and why the security council exists.
> The senate has plenty of representativity.
Debatable. It was certainly fit for purpose when it was set in place. Is it appropriate nowadays? Probably not, especially when you consider how it impacts the electoral college.
I tend to find the USA political system a bit dubious (I think the same of the one of my own country to be clear and I generally have a poor opinion of presidential systems anyway). Still, the country has been mostly stable until now so I guess it’s fit for purpose.
comment 2y ago · link · parent
comment 2y ago · link · parent
The key idea is that you can have something ressembling states with pure functions if you pass the a representation of the initial state as an argument and have the modified state be part of what the function return. You can then use this modified state as an argument for the next function call. The State monad is just an handy way to do this chaining.
But, yes, the actual state representation is in the way the argument is encoded, that's true.
Edit: I find it hilarious that I’m the one downvoted here while all the comments saying complete non sense about monads - including the ones clearly having no clue of what a monad actually is - are not. Never change HN.
comment 2y ago · link · parent
It could be a very good idea (especially if you can spin it out at some point) - I mean Dassault Systemes started this way and they are a billions dollars company but that came from an engineering company a 100 times larger than your own and for which the investment was pocket change - but it’s going to cost you more than you think, take more time than you think and be more taxing on your time than you think. Also you need to maintain it forever.
If you haven’t done it yet, I would pay for a very serious benchmark of what’s available on the market and open discussion with integrators to see if a custom integration on top of something on the shelf couldn’t be made especially if you have people in house doing low-code thing before pulling the trigger.
comment 2y ago · link · parent
Anyway I’m not American. The quality or lack thereof of the US political system doesn’t really affect me. Would appreciate the US getting its act together when it comes to GHG emission however because we share the same planet.
comment 2y ago · link · parent
One of my friend works in reinsurance and his favourite joke is that every time the insurance company pays a claim, someone is getting fired. Obviously a joke but it seems to paint a fairly accurate picture of how the business is run.
comment 2y ago · link · parent
A constitution is not a sacred text but a very practical one. The constitution of my country went trough five major rewrites and was amended approximately a dozen of times since the last rewrite and somehow we are still a liberal free country.
The idea that touching it in any way or form is a slippery slop leading to less rights is a fallacy.
comment 2y ago · link · parent
Anyway, yours and the other answer I got confirm what I though. The word definition has indeed been widely broadened in the US.
comment 2y ago · link · parent
Still, an unlikely candidate for a recent uptake in cancers amongst the young at least as a general category and not aiming at a specific new class of additives.