Dual numbers are a handy way to compute derivative down to machine precision. Here is a work in progress that lets you do that. It is an alternative to Automatic Differentiation.
When you type a function into a cell then press Ctrl-Shift-A you will see a list of argument names for the function appear. I wrote two macros that do something more useful.
If you enter just the name of the function (with no arguments) in a cell you will see a number appear. It is the register id of the function.
If you select the cell with this number and hit Ctrl-Shift-B then the cell contents will be replace by the function called with its default arguments.
If you press Ctrl-Shift-C then the default arguments will be placed in the cells below the function and the function will now refer to these cells.
Let me know if you think I should write a Ctrl-Shift-D that creates two columns. The first column would be the name of each argument and the second column would be their default value. It would also define names for the arguments and use those in the function call instead of cell references.
I’ve just committed some changes that only work in VS2019. If you want to stay with VS2017 you will need to checkout that tag,
git checkout VS2017
I am using the inline variables feature of C++17 instead of Meyer singletons.
I’ve been revisiting my Excel Monte Carlo software and put something together: xllmonte.com. Let me know what you think.
For the love of our shiny new github gods, please have the common human decency of mentioning the SHA when reporting what you think is a bug in the open source software you are using for free. If you don’t know what that means, please don’t bother the person who’s work you are freeloading off of.
Sorry if that sounds harsh, but you really should spend a few minutes learning the tools before imposing on people who spent many hours creating software you find useful. Be considerate.
Gather ’round kids for tales of yore. It used to be possible to write software that simply did its job and that was it. There was no need to keep changing it.
It was a simpler, but still complicated, time back in the day when Dennis, Brian, Rob and less-sung heroes were ardently trying to convince AT&T management that Unix could be a streamlined version of Multics. They got shot down (“Are you guys nuts? That was huge a failure.”) and had to cook up a scheme their management could swallow.
I wonder if they were influenced by SGML and Charles Goldfarb from IBM. Their pitch was to write a system that marked up documents using semantic content that made them amenable to computer processing. They used
nroff as cover to write Unix.
One of their most brilliant accomplishments was the notion of a hierarchical filesystem where files were just a stream of characters, and the hardware was fast enough at the time to make this practical. There were people then who didn’t trust giving up their data to this abstraction. How do you know where your data is if you didn’t spin up a disk and seek to the sector you wrote it to?
How often do standard Unix commands need to be rewritten? They are simple, orthogonal programs acting on a stream of bytes.
Eliding a lot of history so I can get to my point, and mad props to Linus for his brilliant work, but git was something he wrote for himself to deal with the influx of Linux kernel patches he had to deal with. He didn’t want to pay money for proprietary software that did a better job.
People not as smart as Linus started to put, as they say, porcelain around his plumbing infrastructure.
And there seems to be no end is sight. Tonight I had to deal with the latest “improvements” on github. Hence my post instead of working on my open source software. I have to spend time figuring out their latest tweaks to do that.
“The new native
Extend your GitHub workflow beyond your browser with GitHub Desktop, completely redesigned with Electron. Get a unified cross-platform experience that’s completely open source and ready to customize.”
No, thanks. Electron? What happened to Atom or even VS Code?
Could you kids please get on my lawn. I’ll even buy you a lemonade. Just stop pretending change is better.
Some years ago I attempted to market a product that did Monte Carlo simulation in Excel. One of my best customers at the time asked me to resurrect an old version recently. Give tukhi.com/tukhi_free0_0_0_0.zip a spin if you are curious.
Getting ready for teaching this fall and noticed the library is failing to compile for 64-bit builds with the latest version of Visual Studio 2017:
Severity Code Description Project File Line Suppression State Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2). xll12 c:\users\kalx\source\repos\xll12\xll\args.h 192 Active
I was baffled. Every integer is an INT32 but the compiler was still complaining. The offending line was
args[ARG::ArgumentHelp + i - 1] = argumentHelp;
When I changed this to…
auto n = ARG::ArgumentHelp + i - 1; args[n] = argumentHelp;
…the compiler warning disappeared.
I auto know better, but I have no idea why.
Next step: put some tooling around TypeScript to automate everything.
Graph Query Language.
It’s a thing now. Leave it to Facebook to come up with a completely misleading name.
It is true a tree is a graph. Querying is only one of the things it helps you with. It is not a language.
It is a specification that has been around since 2012 that is a huge improvement over REST that let’s you not only query, but provides a simple view for users doing CRUD on legacy systems in an efficient way.
If it has a dirty secret, it is that programmers have to figure out how to turn the specification into something that does more than just an http request/response. The challenge programmers now have is to figure out is how to marshal multiple resources from one call into a response that conforms the query.
This makes it easy for clients. When they ask for something, they get back a response in the same format as they ask for. It allows them to concentrate on the model. The view/presenter/controller becomes trivial for the people actually using the data.