Better HN
topnewbestaskshowjobs
Log inSign up

utensil4778

403 karma · joined Apr 19, 2024 (2y ago) · 153 submissions

Submissions

comment 2y ago · link · parent

Age of consequences, indeed.

It really does feel like we (humanity) are on the precipice of something. We're smack in the middle of an era that entire books will be written about. I really don't like thinking about the decades to come and what kind of world our grandchildren will have.

comment 2y ago · link · parent

Huh, this story sounds familiar. I read a HN comment the other day telling this same story. They didn't just turn a random HN comment into a news article, did they?

Yup. They did. At least they cited it I suppose.

comment 2y ago · link · parent

> Perhaps one reason is that OSS system programmers are washing their dirty linen in public; not a matter of "many eyes make bugs shallow", but that "any eyes make bad code embarassing".

I've committed sins in production code that I would never dream of doing in one of my published open source projects. The allure of " no one will ever see this" is pretty strong

comment 2y ago · link · parent

The Thinkpad TrackPoint mouse has over 20,000 nerve endings

comment 2y ago · link · parent

Prague is fantastic if you can avoid the tourist crowds.

I lived there briefly with a Czech roommate who took me on tours through the "real" city. Also had a British friend there and we went through the usual tourist destinations now and then. The astronomical clock was neat, but the castle was so much more interesting and far less crowded than the old town.

Incidentally, I didn't drink before said roommate introduced me to Czech beer. What I wouldn't give for a nice frosty Kozel here in the states...

comment 2y ago · link · parent

For quite a while before I built my homelab, my git server was a flash drive plugged into my OpenWRT router.

Honestly I still kind of prefer that to gitlab et al. It's nice to not have to leave my terminal to setup a new repo. It takes so much more effort to log into a website and dismiss a bunch of notifications before I can click even more buttons to create a new repo.

I like having all my repos accessible through the website, but I really just want to create new projects through ssh like a civilized person.

comment 2y ago · link · parent

I doubt that wireless energy transmission at this scale and distance will ever be practical. It will probably never be economic compared to terrestrial panels and batteries.

If/when we build space elevators, then orbital solar might make sense to use the tether to transfer power. Even with the lower cost of putting mass in orbit, I don't think it'd be any cheaper than terrestrial solar.

Besides, by the time we figure put space elevators, we'll already have commercial fusion, right?

comment 2y ago · link · parent

<iPhone user> reacted haha to your message

<iPhone user> liked your message

comment 2y ago · link · parent

It should be entirely socially acceptable to respond to any trivial message with "ACKNOWLEDGED" á la Picard

comment 2y ago · link · parent

Because the work is remarkably intricate. It requires you to get real close and personal with the work, usually with magnification. It requires complete and unimpeded dexterity of your fingers, so bulky gloves are absolutely not an option.

Depending on the work, it may also require frequent trips to the hearth for torch work. You really don't want to use an oxy/propane torch in a sealed glovebox.

In short, it's too much hassle and makes the work more difficult and much slower.

comment 2y ago · link · parent

> When are people going to realize that telling customers what they want, reducing value and quality, and ignoring their complaints is not a good business model?

Just as soon as they realize that short-term immediate profit is not the only goal that any business could ever possibly have.

Pretty much the day after never, or right after the collapse of capitalist society. Whichever comes first.

comment 2y ago · link · parent

Okay, that would be a normal amount of bonkers thing to suggest in C or another language with real pointers.

But in C#, that is a batshit insane thing to suggest. I'm not even sure if it's even legal in C# to take a pointer to an arbitrary address outside of your memory. That's.. That's just not how this works. That's not how any of this works!

comment 2y ago · link · parent

For anyone actually interested in this technology, it's something you can do on your own with nothing more than an ESP32.

I've seen research papers on using this method to do gesture detection as well.

comment 2y ago · link · parent

> it works by directly reading the NTFS tables rather than spidering through the directories

Maybe I'm just ignorant of linux filesystems, but this seems like the obvious thing to do. Do ext and friends not have a file table like this?

comment 2y ago · link · parent

> tyre

Believe it or not, the UK is not the entire world.

In the US, we have vast stretches of highway with nothing in sight. You can pretty easily find yourself many miles away from the nearest town and with no cell service to call for help. If you get a flat in the middle of the actual desert we have, you're absolutely fucked without a spare. Your options are to wait and hope someone else drives by to offer help or just start walking. Maybe you'll find a gas station before you run out of water. Even in the more densely developed areas of the country you can find yourself stranded a long way between towns. It's happened to me twice before and it's not at all an uncommon story.

comment 2y ago · link · parent

As far as I understand, modules like an ESP32 for example, carry their own FCC certification. If you include them in your product, you do still need certification of the product overall, but you don't have to worry about the radio certification, just unintentional radiators.

For instance, if your widget includes an ESP32 and a switching power supply, you are (notionally) guaranteed to never fail certification due to bad behavior from the ESP, but if you botch your power supply design and are spewing out noise in the KHz to MHz range, you still fail certification.

Even if every individual component in your device carry their own certification, you still have to certify the product as a whole. Poor PCB design can produce bad EMI. Maybe you're running SPI over a long wire or your traces are routed in a way that accidentally creates an antenna at your SPI clock frequency. Hell, even something as simple as toggling a GPIO pin once a second can emit high frequency EMI under the right conditions.

There are a lot of ways to unintentionally produce harmful EMI, and that's exactly why FCC certification is required for everything. This stuff is hard to get right and there are endless gotchas and exceptions and edge cases and you have to know about and account for all of them.

comment 2y ago · link · parent

I would suspect that the JIT treats a reference as a call to somewhere else in memory, which can have considerable overhead in extremely tight loops. By copying a pointer into a local variable, it may hint to the JIT that you want the pointer in a CPU register with faster access.

Or might be something much more subtle. I know C++ can behave this way, but I don't have in depth experience with C# JIT or x86 assembly.

comment 2y ago · link · parent

Sure, if you discount the fact that other people exist, are conscious, have their own experiences of the same world and also experience joy, sadness, love, and suffering.

To assert that your perspective is the only thing that matters is to assert that nobody else matters.

comment 2y ago · link · parent

I still can't get my head around the fact that one can earn a doctorate in nursing.

Therefore: Dr. Nurse Doctor

comment 2y ago · link · parent

Mechanically, all hemoglobin does is take up an oxygen molecule when in an oxygen rich environment, and releases it in a CO2 rich environment. CO2 just dissolves into the bulk fluid of the blood and diffuses out in the lungs, it is not carried by hemoglobin. However, hemoglobin can bind to CO carbon monoxide, and it can't let go of it. The hemoglobin molecule is effectively dead and useless.

If you had a molecule which functions in a similar way, it'd probably work in blood. The real trick is getting it to release the oxygen in the presence of CO2.

Immune response is a different matter that I don't know enough about to weigh in on. I'd assume there's ways around it. Possibly immunosuppressor drugs for the (hopefully) short time you're on the synthetic blood.

comment 2y ago · link · parent

For anyone else wondering: your body is continually pulling calcium from your bones for metabolic processes. Usually it gets replaced when you consume something with calcium in it.

It makes sense to have somewhere to store extra nutrients so you can keep functioning for a long time between taking in those specific nutrients again.

Your body does this with a lot of your organs. Fat is obviously calorie storage, but muscles can also be resorbed for energy under starvation conditions (or just when they're under used). Your kidneys can resorb water from stored urine, and your intestines pull most water out of what you consume. Most neurotransmitters and hormones get recycled at various rates and turned into new molecules.

I'm sure there's more, but that's all I know of offhand.

comment 2y ago · link · parent

This reminds me of one of my favorite projects.

I once wrote a discord not that interfaced with our Jira system. I wrote a whole chat interface that walked users through the steps required to produce a useful ticket, and they got thrown into a user report category.

The interface was quite thorough and basically forced users to follow a template designed to exctact the relevant details. You could even upload files or screenshots.

It was quite popular with power users as well as our own team. But most importantly, it gave angry users a place to complain instead of directly yelling at a developer.

It was over 10 years ago and I think it's still the project I'm most proud of. The bot as a whole was extremely complex and could interface with several external applications like google sheets and trello. It also had a very nice feature where it would answer my DMs for me. I was a pretty public figure in the community and got a lot of messages that would be better answered by just asking in the general chat. The bot would (respectfully) explain that I can't give 1:1 support to everyone and direct them to better support channels. It also explained that if something really did require my direct attention, I could still be reached by sending another message. Almost nobody ever did. I couldn't believe how effective it was. The DMs still existed in my inbox, but the bot marked them as read so I wouldn't get notified. I'd review them occasionally, I never found any false positives.

But of course that kind of thing is ancient history and will get your discord account banned nowadays. Using a bot to log in as a normal user has been prohibited for a long time. Too bad.

comment 2y ago · link · parent

Several years ago, I picked up an old SmartBoard projector. The thing has no buttons, it's meant to be plugged into a remote control module attached to the board, or controlled over serial as part of a room system, or through its Ethernet connection.

I don't remember how I got started initially, there was some investigation of the network protocol it used. It was some crusty old standard that used an odd command scheme, but I managed to divine what magic packets to send to wake it up and select an input.

I ended up rolling it all into my first and only Android app. It eventually became a full remote control for the thing, including a sleep timer that would turn it off after an hour.

It was extremely basic and horribly ugly. I never looked into automatic discovery of the device on the network, so it had a hardcoded IP address. But it worked well enough to get a free projector running.

Apart from that, every programmer has thrown together innumerable scripts and throwaway programs for one-off tasks. My most recent was a thing that takes in a Diablo 2 save, then sets the version number and recalculates the checksum. My pirated copy is a bit old and won't accept saves made with modern editors. I don't know how many scripts I've written that walk through a file system to find or change something in the contained files.

I also have a version of Klondike solitaire written in C++ with SFML. I initially wanted to build a neural network to play solitaire, but after building the game itself, I found in my research that solitaire is actually a very difficult problem and far beyond my skills.

comment 2y ago · link · parent

A hard restriction would prevent a malicious prompt from being passed to the model. Instead, it seems they've simply asked the model nicely to pretty please not answer malicious prompts.

A hard restriction would be a regex or a simpler model checking your prompt for known or suspected bad prompts and refusing outright.

comment 2y ago · link · parent

This is just the same extremely poorly thought out argument against any type of pure research.

Pursuing knowledge for knowledge's sake always results in improvement down the line, even if it's impossible to predict when and how.

Do you think Benjamin Franklin expected a payoff from the experiments that led to the discovery of electricity? Or Newton researching gravity? Much of our knowledge about the universe comes from researchers picking at a topic just for the hell of it.

> I would rather someone of the intellectual calibre you describe work on problems more relevant to improving the world.

Impressive amount of entitlement here. Nobody owes you anything, and people are free to do anything they want. Not everyone wants to be a hero or great inventor, even if they have the skill for it. Nor is it some universal moral obligation for skilled people to spend their lives producing something profitable or beneficial to society.

Do you have hobbies? If so, you should feel bad because you're wasting your talents on useless unprofitable activities. Better go out and solve the world's problems.

comment 2y ago · link · parent

I've had enough bad experiences with ST to just avoid their MCUs altogether when possible. Last year I wasted several days trying to figure out why a certain ST chip wouldn't respond to the programmer I was using. The chip claimed to support flashing from UART, but the bootloader just never answered. It responded to other interfaces like ST's two wire interface, whatever it was called. Searching around online, it seems like this chip has a silicon bug or a bad ROM and ST is just happy to keep selling it as is for years. They haven't even published errata acknowledging that it's broken and doesn't answer on all interfaces.

comment 2y ago · link · parent

Maybe this doesn't count as static, but I used to regularly use reflection in C# to generate code for interacting with foreign DLLs.

This was a video game mod, essentially. I needed to create a text interface to modify settings for any other mod that might be installed. Other mods would simply implement a settings class with certain attributes, then I could list out all fields and their types. The list was processed into a sort of tree presented through the chat interface. From there I can generate code to modify that settings class from outside its assembly and raise value change events.

The reflection part of that was extremely simple, but just because that's how C# works. C# makes a task like this almost trivial.

At my current job, we have a similar thing. Classes decorated with attributes. We inspect them and check the generic type they implement. This way we register message handlers by their message type dynamically. You write a handler class and it simply works.

Windows Forms had a PropertyGrid control which did the same thing as my text interface, but with a grid of properties you can edit freely.

Most of this stuff is typically done at runtime. But you could have it be static if you wanted. A precious job did this to access the backing array inside of a List<> object. I offer no explanation or excuse for that one.

comment 2y ago · link · parent

One could argue that template metaprogramming is a kludge DSL of its own.

comment 2y ago · link · parent

I like OOP precisely because you can just treat any object like a black box. You don't need to fully understand what the object does at all times.

The way my brain works is by turning all problems into spatial problems. Programs take the form of a large graph with a function or other operation at each node. Generally, I'm modeling data flow through the graph. I can keep a fair amount of detail associated with any node, but it takes effort. There's a lot of information floating around.

OOP just kind of naturally falls out of this kind of thinking. By collecting parts of the program into discrete objects that do their own thing, large parts of the graph can be collapsed into a single node. Data flows into an object, data flows out. No need to spend the mental effort of knowing what happens inside the box. I can just simply trust that I wrote an object to do what it says it does.

Of course this approach often fails and I have to be much more thorough. If I can focus on a small section of the program, the graph becomes almost an arbitrary syntax tree. The past couple of weeks I've been way in the weeds with a microcontroller. At some point I've started modeling parts of the program in terms of assembly instructions and CPU implementation details.

123456