403 karma · joined Apr 19, 2024 (2y ago) · 153 submissions
comment 2y ago · link · parent
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
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
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
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
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
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
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
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
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
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
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
To assert that your perspective is the only thing that matters is to assert that nobody else matters.
comment 2y ago · link · parent
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
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
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
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 be a regex or a simpler model checking your prompt for known or suspected bad prompts and refusing outright.
comment 2y ago · link · parent
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
comment 2y ago · link · parent
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
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.