the true reason C++ always wins
LaurieWired
Silicon Forest
If the type is too small, Ctrl+ is your friend
I came up with a way to factor numbers without dividing. I use a table and by chaining through the table I can factor any number. Problem is - for big numbers I need a really big table. The amount of memory the table would require would be equal to 100 times the number you want to factor, and that only works up to the quadrillions. But then I got to thinking that much of table is going to be repetitive, and you might be able to just record the differences from the base table and so generate any portion of the table you need. Going to run some experiments, see how they work out.
"This is creepy as heck, but I am having fun with it. This uses a difference filter that I have written from scratch using Windows Media Foundation. The filter was inspired by some sci fi that I read, which posited that dinosaurs could only see movement. When you stop moving, the image sort of fades away..."
Okay, it's not really a self-driving system, it's an 'advanced driver assistance system'. I dunno, I kinda think they are just useful enough to be dangerous. If they do a good job of driving the car you are very likely to be lulled into complacency and then when something unexpected happens, are you going to be alert enough to react? Seems to me the only way to maintain constant alertness is to do your own driving.
Computers can be very reliable, certainly more reliable than people. But a system for driving a car needs to be able to avoid, or at last cope with, impending disasters. The question for most people is: are these systems going to better than a good driver? Being better than an average driver might be good enough for insurance companies, but everyone who thinks they are better than average (which is everyone) is going to want a system that is statistically better than good.
There are some poor drivers out there, and there are some people who don't like driving and for them these fancy gee-gaws might be useful. Can't imagine that anyone would not like driving. I mean, isn't that what makes us Americans?
Whatever: here's the read.me file from github:
openpilot is an operating system for robotics.
Currently, it upgrades the driver assistance system in 275+ supported cars.
Quick start: bash <(curl -fsSL openpilot.comma.ai)
To use openpilot in a car, you need four things:
openpilot.comma.ai to install the release version.We have detailed instructions for how to install the harness and device in a car. Note that it's possible to run openpilot on other hardware, although it's not plug-and-play.
openpilot is developed by comma and by users like you. We welcome both pull requests and issues on GitHub.
Want to get paid to work on openpilot? comma is hiring and offers lots of bounties for external contributors.
openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.
Any user of this software shall indemnify and hold harmless Comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys’ fees and costs) which arise out of, relate to or result from any use of this software by user.
THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT. YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS. NO WARRANTY EXPRESSED OR IMPLIED.
By default, openpilot uploads the driving data to our servers. You can also access your data through comma connect. We use your data to train better models and improve openpilot for everyone.
openpilot is open source software: the user is free to disable data collection if they wish to do so.
openpilot logs the road-facing cameras, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs. The driver-facing camera is only logged if you explicitly opt-in in settings. The microphone is not recorded.
By using openpilot, you agree to our Privacy Policy. You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.
Via Detroit Steve
I've been thinking about text editors, Aedit in particular. Aedit was like the first text editor I really got to know. This was back in the early 1980s and we were using Intel blue box development machines that the company was renting from Intel for the astronomical price of a thousand dollars a month, least ways that's the way I remember it.
I kept using Aedit when I went to work for Intel. I spent, I dunno, five or ten years using it. Then Windows came on the scene with their fancy schmantzy bullshit and I got to learn a whole new way way or ruining my life.
So here we are 30 years later and I am still pining for my lost Aedit text editor. Then I got to thinking that I should probably just write my own. I mean, how tough can it be? So now I'm thinking about this and I start thinking about different ways of storing text in memory. Do we do it by the line, or maybe strings, or just as one big block of text? This leads to the question of how do you handle the case where the text it too large to fit in memory? Kind of an unlikely scenario, I know, given the amount of memory modern computers have, but Aedit ran in like 64KB and could Handle any size file. Well, any size you could fit on a disk and our 8 inch hard disks were only 10MB. I do remember tackling files that were over one megabyte and Aedit did not complain. It might have gotten a little slow, but it handled the file just fine. So now I'm wondering how would I handle a multi-terabyte file. That is probably a ridiculous case, but if you are going to allow a program to handle large files, someone is going to push it to the limit, so you need to be prepared.
And then I thought: I wonder if maybe somebody else has already done this, and lo and behold, they have:
Port of Aedit to C
Using the source of Aedit shared on https://github.com/abiliojr/aedit.git, the code here is an attempt to port from PLM to C and to support newer operating systems.
So now I have another reason to get myself in gear and get a new Linux box and get away from this stinky Chromebox.
Ten or twenty years ago when I used to work at Stevens, I ran into a circuit that used a couple of ADCs (Analog to Digital Convertors). I was flummoxed when I started looking at it. ADCs are used to read the voltage of a signal and often that voltage is fluctuating at some frequency, so you want to taking readings often enough that you are getting a picture that reflects what is actually happening. If the signal is varies periodically with a frequency of, say 60Hz, like house current, and you take readings at the same frequency, your readings will all show the same voltage. It might be any value from zero to the maximum value. To get an accurate picture you need to take readings at some multiple of the signal frequency. Two, three or more times faster than the signal frequency.
When I look at the circuit and the ADC chips, I discover that the readings are transferred from the ADC to the CPU as serial data, that is, one bit at a time. Further, the two ADCs were daisy chained together, so the eight bits of data from one ADC were pumped out of one and into the other, and then pumped out of the second and into the CPU. This means that it took at least sixteen ticks of the serial clock to transfer the readings from the two ADCs to the CPU. This means that the serial data clock needs to be running 16 to 20 times faster than the frequency of the signal that you are trying to measure. This sounded nuts to me. Why would you want to handicap your measurement circuit with a 20x speed reduction?
Then I did the math and realized that the serial data clock was running at a frequency of something like 30 Mhz while the signal we were trying to measure was only around 1 megahertz.
This memory just popped into my head last night. Since it made such an impression on me I thought I would write it down.
The red arc describes the upper side of the hull, the blue follows the lower side. The straight green, red and black straight lines are radii for the upper arc. The length of the spindle is 70 meters and the diameter at the center is 8 meters.
CPU ticks Slices Volume
4 1 3,518.583,772
4 10 1,883.743,261
17 100 1,883.565,830
133 1,000 1,883.565,812
1,339 10,000 1,883.565,812
12,929 100,000 1,883.565,812
131,847 1,000,000 1,883.565,812
1,110,081 10,000,000 1,883.565,81310,897,789 100,000,000 1,883.565,810
The volume is in cubic meters. At one hundred slices we already have the volume to the nearest liter (one one-thousandth of a cubic meter). At one thousand slices we have the volume to down to one cubic centimeter (one milliliter). At ten million slices the last digit starts changing. I suspect we have reached the limit of what can be done with floating point math without taking a closer look at the equations. I'm not going to do that. The nearest cc is close enough for me.
Comma-fication
Big numbers without commas are hard to read, so I spent most of a day working out how to automatically place commas in the output. It made the program four times as long. In some versions of C you can use an apostrophe to tell printf to insert commas, but it wasn't available with the online compiler I used, so I wrote my own routines. And because I wasn't sure if it was working correctly, I wrote another one to verify the first.
I also added some rudimentary command line parsing so you can change the length, beam and number of slices without having to modify the code.
Blog post: Jules Verne - Nautilus
C program source code on github
OnlineGDB IDE (Interactive Development Environment) C compiler
Nematodes have successfully adapted to nearly every ecosystem: from marine (salt) to fresh water, soils, from the polar regions to the tropics, as well as the highest to the lowest of elevations. They are ubiquitous in freshwater, marine, and terrestrial environments, where they often outnumber other animals in both individual and species counts, and are found in locations as diverse as mountains, deserts, and oceanic trenches. They are found in every part of the Earth's lithosphere, even at great depths below the surface of the Earth. They represent 90% of all animals on the ocean floor.
![]() |
| GoPiGo Programmable Robot Kit |
A connectome is a map of the brain's neural connections, also known as the brain's wiring diagram. It's made up of neurons that communicate through synapses, and each connection is made up of the presynaptic axon, the postsynaptic dendrites, and synapses between the neurons. Connectomes can be represented in graph or matrix form, and are used to analyze network organization.
![]() |
| The Making of a Fly |
NSO Group Technologies (NSO standing for Niv, Shalev and Omri, the names of the company's founders) is an Israeli cyber-intelligence firm primarily known for its proprietary spyware Pegasus, which is capable of remote zero-click surveillance of smartphones. It employed almost 500 people as of 2017.NSO claims that it provides authorized governments with technology that helps them combat terror and crime. The company says that it deals with government clients only. Pegasus spyware is classified as a weapon by Israel and any export of the technology must be approved by the government.According to several reports, NSO Group spyware has been used to target human rights activists and journalists in various countries, was used for state espionage against Pakistan, for warrantless domestic surveillance of Israeli citizens by Israeli police, and played a role in the murder of Saudi dissident Jamal Khashoggi by agents of the Saudi government.In 2019, instant messaging company WhatsApp and its parent company Meta Platforms (then known as Facebook) sued NSO under the United States Computer Fraud and Abuse Act. In 2021, Apple filed a lawsuit against NSO in the U.S., and the US included NSO Group in its Entity List for acting against U.S. national security and foreign policy interests, effectively banning U.S. companies from supplying NSO.
It's not like I don't have enough to do, but I had to start playing with ncurses, a computer programming library that enables doing crude, text based graphics in a terminal window. I did something and now my cursor keys are behaving erratically and capital-h and control-h don't work. I am going to try and find a solution, but I suspect I will have to reboot to clear things up. I am reluctant to do that because I've had a stupid recursion demo running in another terminal window for about a week and it would be a shame to shut it down when it is so close to finishing. Yeah, right, it's probably going to take a couple of months to finish and we'll probably have a power failure before then.
9,223,372,036,854,775,807 = nine quintillion two hundred twenty three quadrillion three hundred seventy two trillion thirty six billion eight hundred fifty four million seven hundred seventy five thousand eight hundred seven
![]() |
| Jadium |
I came across a different version of Numbrix called Jadium. Well, not really, I stumbled on a page with a single static example (above). Numbrix is a fairly simple game, you just need to fill in all the 9 x 9 square with the numbers from 1 to 81 in sequence. It shows up in the Sunday newspaper supplement Parade, if you still get the Sunday paper. It's usually pretty easy, but change up the starting configuration just a bit and it can quickly become more difficult. Jadium is supposed to be more difficult and given that it has only a few numbers posted to start, I can see that it could be. But no on-line version, and just this one image, so I'm wondering if it is even possible to solve it.
How-some-ever, I wrote a program a while back to solve Numbrix puzzles and since this one conforms to the same rules as Numbrix, it should be able to solve it. So I tried it out.
Just for a baseline, I tried it with a completely empty field.
No problem, filled in the field very quickly. Next I tried it with the Jadium example.
This one took a while, several seconds in fact, long enough to make me wonder if it had gotten hung up. But no, it just took a while.
Source code can be found here.