Hacker Newsnew | past | comments | ask | show | jobs | submit | not_kurt_godel's commentslogin

> I think browser shouldn't be that complex.

how is browser formed. how curl get internent


They need to do away instain coders!

As long as we're on the subject, I'll take the opportunity here to vent about how embarrassingly buggy and unusable VS Code is in general. It throws me for a loop that pros voluntarily use it on the rare occasions I'm forced to use it instead of JetBrains.

I agree water should probably be priced more in general, and it's certainly more expensive in some places than others, but neither of your examples is particularly representative of the sourcing relevant for data centers (scale and potability being different, for starters).


Okay, how long is the debounce window? Where in the input pipeline do you debounce (obviously not immediately on keystrokes)? Will debounce work for long-running requests, which are event-driven and not time-driven?

I have seen, far too many times, naive approaches like wrapping all click handlers in a "debounce" function cause additional issues and not actually solve the underlying problem.


To clarify - I am not stating that simple debouncing is the solution to all the issues you're identifying. I agree with you that handling some of them can be very complex. I just shared the article as a pointer to a broadly similar concept that can be used to help communicate the gist of what you're talking about.

And even if it were, calculators (computers) were world-changing technology when they were new.

Did either of those systems have unit or integration tests?


Do any of the competitive solutions?



Very fascinating article.


Java: List<Object>

Python: list[Any]

...what am I missing?


You're missing the specialisation of Object/Any. For example Array.flat called with [int, [bool, string]] returns a type [int, bool, string]. Admittedly this is somewhat niche, but most other languages can't express this - the type information gets erased.


You're missing the input type, essentially. Those are just array types. The TypeScript type signature more of a function type, it expresses flattening a n-dimensional array (input type) into a flat array (output type).


I'd love to see the results of mandating a random order dict impl at an actual company/org (but hate to be forced to participate). Hopefully you hired developers who really like to write sorting algos.


Swift (heavily used by Apple) has randomly ordered dictionaries for security:

> In particular, random seeding enables better protection against (accidental or deliberate) hash-flooding attacks

https://forums.swift.org/t/psa-the-stdlib-now-uses-randomly-...


Perhaps not unrelated to why Python is the #1 most popular language while Swift is #22 https://www.tiobe.com/tiobe-index/


Swift isn’t popular because its Dictionary type uses randomly ordered keys?


It certainly could be a reason among many. Just look at the thread GP shared, containing multiple years' worth of users voicing frustration at the introduction of this behavior.


Probably the inference is YAGNI .


Well, that is how hash tables in go works, so you'd not have to look that far.


Perl since 5.8.something has had the option of perturbing the hash function, so it is different from run to run. You can also set the set to a given value in order to lock in the sequence.

In any case, it is not ordered. If you want that, you have to explicitly sort the keys of the hash.


Great. Maybe GP will go a step farther and also mandate arrays that return elements in random order too. Relying on insertion order for any reason is for weaklings.


And then you're sunk the moment anyone else needs to run your code, or even if you just need to run your own code on another machine.


Never happened.


I salute you for never needing a new computer, ever.


I get a new machine most years from the business.

I suggest a systems administration course if you're having so much trouble with Python libs. It can help, knowing your way around the filesystem and how to use PATHs, etc.


Hey, good for you that you like doing things the hard, fragile way. Personally I'll stick with the natively supported python solution that was made part of the standard library precisely because the overwhelming majority of Python programmers find your approach unsatisfactory.

https://peps.python.org/pep-0405/


It's not hard at all, just a pip install away. Perhaps a rare uninstall later.

It sounds like you haven't read the full thread. It's common for younger developers to be slaves to "best practice" even in exceptions where it doesn't apply.

Appeal to authority is not a compelling argument either.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: