HNHacker News
TopNewBestAskShowJobs

flakes

731 karma · joined August 11, 2023

submissionscomments
flakes··on gh-116167: Allow disabling the GIL
> I wouldn't be surprised if he's going to be dealing with Java v1.5 instead of the latest features.

Well I certainly hope not… LTS for Java 5 probably hit end of life when he was 2. I’d say most likely the version being installed is Java 17, or 11 if theyre really dated. Java 8 would likely be the absolute minimum, mainly due to the industry being so slow to migrate away from it. Newer programmers are unlikely to ever know what Java felt like before generics and lambdas existed.

flakes··on Testcontainers
It depends on what you’re testing. Applying the schema is pretty fast (30-40ms), compared to the container creation (1-2 seconds). If you need a lot of test data it would take time, but most of the time Im only applying enough rows to hit my test conditions. For crud apps I usually orchestrate the test setup using the public APIs of my application against the fresh instance.
flakes··on Testcontainers
I do this a lot for Postgres testing. In my setup, I create a single database for the entire test run. Each test creates its own schema in that database and applies the latest table definitions.

With this setup, I only eat the container creation once, while allowing every test to operate in isolation from one another, be parallelized, and test against a real database.

I do a similar trick for S3 containers by applying a unique guid prefix to the buckets in each test.

flakes··on Ask HN: What do I do with my side projects?
> People will happily spend $5 for coffee but have an existential crisis when asked for a $1 app.

I think the key here, is that when you buy a coffee, you're reasonable sure of what you'll receive. You know coffee, you probably know the store, and although not all coffee shops are great, it's likely going to be good enough.

When you buy a random one dollar app, you spin the wheel, and the odds of that wheel landing on anything useful to you is extremely low. You have no way of telling if the app is the result of honest hard work, or the result of a cookie cutter build made from some user on fiverr.

So for me, it's not existential crisis, but an exhaustion from past annoyances.

flakes··on Cyclist hit by driverless Waymo car in San Francisco, police say
This is all true. As a driver, you are definitely expected to be aware at all times. Things like schoolzones enforce drivers being more aware and slowing even more. We have rules to not pass school buses when children are departing. We have speed limits that are lower in suburbs.

Even if you follow all of these rules, theres not too much you can do about someone suddenly staggering infront of your car. Obviously if you see them ahead of time, be even more cautious.

(also drunk people are in-part banned from roadways- public intoxication is a misdemeanor)

flakes··on Cyclist hit by driverless Waymo car in San Francisco, police say
I don't agree with most laws that impose absolutes. The courts exist to deal with grey areas.

A large number of pedestrians struck by cars each year (at least in North America), are themselves intoxicated, and not fit to walk along roadways. There are many cases where the driver should not reasonably be at fault for a pedestrians erratic behavior.

There's also the "hit-to-kill" phenomenon in China, where it can be financially devastating to leave a person living with significant injuries, but affordable if you had simply killed them (50K USD vs 1M over a lifetime). In extremely sad circumstances, this has motivated people to hit the victim multiple times.

flakes··on On the Costs of Syscalls (2021)
That one had me laughing really hard haha
flakes··on On the Costs of Syscalls (2021)
The best part of this thread was the link to the discussion on the removal of pid caching in `getpid` causing regressions in systemd https://bugzilla.redhat.com/show_bug.cgi?id=1469670

I've been on a code-deleting rampage lately, killing off many minor features that add a lot of complexity for seemingly little gain. Glad I don't have anyone interrogating me like this!

flakes··on Zed, a collaborative code editor, is now open source
This looks really cool, but I have a suspicion my employer would be against external connections. Any distant plans in the future for an enterprise/onprem license?
flakes··on Zed, a collaborative code editor, is now open source
> It seems to be hyper-selected to just Silicon Valley techbros, instead of either the more general US tech industry, or the worldwide tech industry.

How do you validate this claim? The country demographic in the survey shows that USA makes up only 21% of responses.

https://survey.stackoverflow.co/2023/#section-key-territorie...

flakes··on Ollama releases Python and JavaScript Libraries
Exactly that. Client host options default, https://github.com/ollama/ollama-python/blob/main/ollama/_cl...

Also overrideable with OLLAMA_HOST env var. The default imported functions are then based off of a no-arg constructed client https://github.com/ollama/ollama-python/blob/main/ollama/__i...

    # ollama-python/ollama/__init__.py
    _client = Client()

    generate = _client.generate
    chat = _client.chat
    embeddings = _client.embeddings
    ...
flakes··on Zed, a collaborative code editor, is now open source
I don't think that's quite fair. The stackoverflow survey shows a large number of developers have made the move to Mac. Certainly not the majority, but a very healthy share. https://survey.stackoverflow.co/2023/#section-most-popular-t...

Anecdotally, Mac has become very popular at my workplace, with a growing number of developers choosing Mac for their primary device. We mostly target Linux, so regardless of workstation we're usually remoting into a Linux box or running some VM/Docker setup locally. When I can work on projects locally without a VM, the interactions on Mac feel a lot more natural compared to Windows.

I don't think I would switch back to a Windows machine any time soon, although if I was offered a Linux laptop I'd be very tempted.

flakes··on Show HN: Sendenv, a CLI tool to share environment variables
> Sharing environment variables is an ad hoc manual process at my current company (and was the same way in previous workplaces as well).

It really shouldn’t be that way. If the data is meant to be selectively accessed, it should have access controls in place with Authentication, Authorization and Auditing. If its any employees discretion to share the data with another adhoc, I certainly hope the secret is not of great value.

flakes··on Amazon R&D spending is more than that of all companies and government of France
Then call the category ~200. IMO This is prime enshitification. You cant search for anything reliably any more. You dont get to see what youre actually searching for.. just whatever a company thinks they can make more profit off of.
flakes··on Show HN: #!/usr/bin/env docker run
Huh, I guess I've never given it too much thought. I was under the impression for some reason that the first argument was supposed to be an absolute path.
flakes··on Show HN: #!/usr/bin/env docker run
Curious for what systems this does not work? I start a lot of my shebangs with `#!/usr/bin/env <app>` such that I can rely on PATH for resolving application locations.
flakes··on Four Team Types
You could also make the argument that both “complicated-subsystem” and "platform" teams, are just another "stream-aligned" team whose primary clients are internal to the company.

Overall this post just seems like a great way to see who can win the "most pedantic" award in a management meeting.

flakes··on Power over fiber
Wireless signals can drop off very quickly even in clear water. Add dirt, algae, turbulence, etc to that and it quickly drops off in about a meter for reasonable devices. For our bot we had about 3 1080p video streams being sent back over the wire, which requires a decent amount of bandwidth (we used a small fiberoptic ethernet switch on the surface and inside the enclosure).

Apart from that, if your ROV is light, and the cable is durable enough, the cable can make for a good retrieval method when you brown out the bot haha.

flakes··on Power over fiber
Thats super cool for the ROV aspect. In university I was part of the underwater robotics program, and optimizing the tether was a huge aspect. We used a fiberoptic line for communication, leaving the rest of the cable mostly dominated by the copper conductor for power.

Any weight reduction that can be made for the cable internals is actually two fold. The cable needs to remain neutrally buoyant as to not pull on the ROV and not restrict the pilot. Less internal weight in the cable means less foam/other material needs to be added to offset the negative buoyancy.

flakes··on 4B If Statements
A true production quality implementation should always use recursion.

  func isOdd(n int) bool {
    switch {
    case n == 0:
      return false
    case n > 0:
      return !isOdd(n-1)
    default:
      return !isOdd(n+1)
    }
  }
flakes··on FUSE-T is a kext-less implementation of FUSE for macOS that uses NFSv4
> This approach could even be useful on Linux where fuse isn’t viable (e.g inside containers)

By viable do you mean secure? You can definitely use FUSE within containers, but you do have to cap-add SYS_ADMIN.

flakes··on Catalyst – Tailwind CSS Application UI Kit
I had to double take this, because I use a very different web framework also called Catalyst http://catalyst.perl.org/

Perl in all its glory and horror.

flakes··on A medieval map that made cartography into a science
Very cool! It took me a while to figure it out, with Africa being on the north east sector. Once I spotted Italy it made way more sense! :)
flakes··on FFM (Foreign Function and Memory API) Goes Final
Its relatively common in Python for C/C++ code to be shipped pre-compiled as part of binary wheels (for at least the most common architectures). You do still end up falling back to sdists if your Python version or OS don't line up with any of the supplied binary wheels from the author. e.g. take a look at the pre-compiled set for pydantic-core https://pypi.org/project/pydantic-core/#files
flakes··on Ask HN: What side projects landed you a job?
I still like to help people regardless of if it will directly benefit me. It was just a nice perk.

Although, since they made all of these controversial changes, it feels less like helping people and more like doing free work for a random company.

The real killer for me was limiting the data dumps to paying customers. They really let down the community who trusted SO would be a trustworthy steward of the data. The charm of the site is gone.

flakes··on Ask HN: What side projects landed you a job?
Not really a side project, but I used to be a lot more active on stackoverflow. A recruiter reached out to me through the job board that stackexchange used to host. Been with the job for about 5 years now.

Pretty lame that they discontinued that job board. It was a lot nicer experience than using linkedin.

flakes··on How to Do a TypeScript Conversion
> Typing Python that wasn't written with type hints in the first place is always going to be a complete nightmare though

Couldn’t agree more. I joined a new team and recently finished converting a 20K line repo. It was a grueling grind to get mypy running in strict mode.

I’m continually finding that a huge benefit of typed python code isn’t autocomplete or catching bad argument passing, but preventing developers from creating patterns that are unmaintainable.

If your code is too complex to type correctly, its probably too complex in general :)

flakes··on In 1886, the US commissioned watercolor paintings of every known fruit (2019)
What's wild about this, is that there are probably a huge number of fruits that were not even discovered yet at this time. For example, this fruit discovered in 2016 https://blog.pensoft.net/2016/02/12/new-species-with-heart-s...

> Just in time for Valentine’s Day, botanists from Hawai’i have discovered a new species of plant with small heart-shaped fruits. The new species is a member of the coffee family (Rubiaceae) and part of the genus Coprosma, which occurs across many remote islands of the Pacific Ocean. They named the new Hawaiian species after the symbol of love – calling it Coprosma cordicarpa – meaning the Coprosma with heart-shaped fruit.

flakes··on Cosmopolitan Third Edition
I think a lot of the "logical reason" is driven by more the ephemeral, sandboxed, execution tools. e.g. a `docker run` or `serverless` architectures, where full root filesystems are populated on demand. Less executable data size there can go a long way in reducing latency/price.
flakes··on uBlock Origin 1.53
When you right-click an element on the page (and you have uBlock installed at default settings) there should be a dialog for it at the bottom.
← PreviousPage 4 of 6Next →