WASM Raycaster in C with Clang no stdlib
I’ve been building software for profit for 25 years now - for fun since I was about 12. For the past year and a bit, I was focused on helping build out and fix some infrastructure. While there was some coding involved, I wasn’t doing much new software development.
I had an urge to shake off a bit of cruft, and do a little “code 5k”. I felt like digging back into some lower level code to stretch my legs - and, of course, throw in some games programming.
SVG as a UI
SVG as a UI
Did you know you can put JavaScript into SVG files? You can use this little technique to make little embeddable Flash like applications that also work as standalone applications.
Here is a small example (lightly tested in Firefox and Chrome):
Try clicking around in that image above (or use w,a,s,d to move the circle around). If you view that SVG directly
=> https://robrohan.com/wp-content/uploads/2023/01/test.svg
you’ll notice it works just like it does when it’s embedded.
You Don't Need All That JS. Diffy.
I find the simplest solution is often the best one. When it’s not, it’s often on the right path.
I’ve been helping a mate try to get his startup running. He is a seasoned (and exclusively) back end engineer who is now thrust into the new 2020 front end world. He hates it. He bemuses, “nothing makes sense and everything is overly complicated.”
Humorously timely, there as a video put out by the goto;
event: You Really Don’t Need All That JavaScript, I Promise. I really connect with the first part of the video, I think he does a great job of summarizing problems with modern “doing it the right way” web development.
It is time to get into Webassembly
I’ve been keeping an eye on webassembly for the past few years, but it hasn’t felt ready to be used yet. However, over the weekend I took another look, and, to me, it seems baked enough to start using it “for reals” now.
If you don’t know, webassembly is an attempt to create an assembly like language for the web. Instead of writing JavaScript, you’d write in an assembly language which would get your code base to run much faster (sometimes 30x faster from what I have read).
Web Components and Training Plans
Web Components are the future… at least that’s what this news letter I read said.
I like the promise of web components. They basically, seem to me, to be Angular 5 / React like functionality built into standard HTML. They give you the ability to create new tags for HTML that do super special things.
I’ve been wanting a way to publish and share some basic .ics (ICalendar) files on my running / triathlon site.
Sharing Angular 5 Modules
If you’ve ever worked on a project where you’ve tried to share code between two (or more) projects, you probably understand the pain. Sadly, I’ve worked on a few.
Admittedly, on the surface it seems like a tempting proposition. On paper, it sounds quite easy. For example, one system I worked on we had a single nuget library where we kept our domain objects. The logic went: “All you have to do when you want to make a change is update the domain object project, build, push the new library to the nuget server, then pull down the new library to the other projects, and then rebuild those. It’s easy.”
Using AWS Codebuild with Yarn and Chrome
I am a big fan of using CI / CD. As most software engineers are. That’s not a very controversial stance.
For open source projects there are some really nice services out there. One such service is Travis CI. I really like their service for open source projects, but I have a few side projects that I don’t want to open source.
My side projects are not for monetary gain so there is no revenue from them. They aren’t going to be businesses or anything like that, but I also have no desire to open source them. When I went to look at using Travis CI for these type of projects, the pricing model is, well, way too pricy - $69 USD per month… per month. My entire Amazon infrastructure bill isn’t that much.
A More Interesting Retry
I’ve been playing with writing my own Typescript / WebGL 3d game engine from scratch and fumbling about with machine learning (which oddly have a lot in common). The hobby has led me to studying linear algebra, which has got me looking at lots of problems in a different light. I blame a lot of my recent thinking on the YouTube Channel 3 Brown 1 Blue. The author of that channel lays out maths in a very visual way - it is much to my liking. The way he explains things has really re-sparked my interest in mathematics.
What are closures in javascript
In my pursuit of gainful employment, I was asked an interview question about closures in javascript. The question kind of threw me for a loop because when writing javascript I have never consciously thought “ok, now I need to use a closure here.” I answered the question poorly - mostly just passing on it - and decided to research it later.
Now, I have used closures in Groovy which look something like this:
One-time pad in Javascript
Recently, I was doing some research on encryption for a project. I’ve used encryption libraries in past projects, but I’ve never written any actual encryption algorithms myself. And as the Internet does from time to time, I got sucked into looking around at the various algorithms. I came across an interesting encryption algorithm that I had never heard of. Apparently, it can not be cracked: the one-time pad.
This is the one that most movies reference when you see the spy guy with his little flip book of paper. He’d write down some random numbers he heard off the radio, or what have you, then burn up the page. It’s an incredibly simple algorithm, and that makes it very useful because you don’t even need a computer to do the encryption / decryption.
Older »