Programming Leftovers
-
What Do You Want In A Programming Assistant?
The Propellerheads released a song in 1998 entitled “History Repeating.” If you don’t know it, the lyrics include: “They say the next big thing is here. That the revolution’s near. But to me, it seems quite clear. That it’s all just a little bit of history repeating.” The next big thing today seems to be the AI chatbots. We’ve heard every opinion from the “revolutionize everything” to “destroy everything” camp. But, really, isn’t it a bit of history repeating itself? We get new tech. Some oversell it. Some fear it. Then, in the end, it becomes part of the ordinary landscape and seems unremarkable in the light of the new next big thing. Dynamite, the steam engine, cars, TV, and the Internet were all predicted to “ruin everything” at some point in the past.
-
Spidermonkey Development Blog: SpiderMonkey Newsletter (Firefox 114-115)
SpiderMonkey is the JavaScript engine used in Mozilla Firefox. This newsletter gives an overview of the JavaScript and WebAssembly work we’ve done as part of the Firefox 114 and 115 Nightly release cycles.
-
GNU Guix: Parameterized Packages for GNU Guix
Hello Guix!
I'm Sarthak and I'll be working on implementing Parameterized Packages
-
How to Use “cal_days_in_month()” Function in PHP
The cal_days_in_month() is a predefined function in PHP that returns the total amount of days in a given month for a particular year and calendar.
-
The ElasticSearch Rant
As a part of my continued efforts to heal, one of the things I've been trying to do is avoid being overly negative and venomous about technology. I don't want to be angry when I write things on this blog. I don't want to be known as someone who is venomous and hateful. This is why I've been disavowing my articles about the V programming language among other things.
ElasticSearch makes it difficult for me to keep this streak up.
-
Getting the UTF-16 bytes of JavaScript strings
This post assumes you understand UTF-16.
Recently, I wanted to get the UTF-16 bytes of a JavaScript string for a demo I was working on. I couldn’t find anyone else who had done this, so I thought I’d write this post.
I just want the length
If you need the number of UTF-16 code units, just use the length of the string! The
length
property asks for the number of UTF-16 code units, so you can do this: [...] -
Getting the UTF-32 bytes of JavaScript strings
This post assumes you understand UTF-32.
Recently, I wanted to get the UTF-32 bytes of a JavaScript string for a demo I was working on. I couldn’t find anyone else who had done this, so I thought I’d write this post.
My goal was to write a generator function that yielded each UTF-32 byte.
First, I started by generating the string’s Unicode code points. Iterating over a JavaScript string yields the Unicode code points as strings.
-
Working with the UTF-8 bytes of JavaScript strings
This post assumes you understand UTF-8.
Recently, I wanted to get the UTF-8 bytes of a JavaScript string for a demo I was working on.
I took advantage of JavaScript’s built-in
TextEncoder
, which turns a string into aUint8Array
of the string’s bytes. -
Plenti Is A State-of-the Art Static Generator By Go Lang
Plenti is an impressive static site generator with a powerful Go backend and a sleek Svelte frontend, making it a platform that is sure to impress. One of its standout features is its fully integrated Git-CMS, which is not only cheap but also free to host alongside your static site.
-
Multiple Ruby Info Disclosure Vulns Fixed
Two important security bugs have been found in Ruby. It was discovered that an HTTP response splitting flaw exists in the Ruby cgi gem before 0.1.0.2, 0.2.x before 0.2.2, and 0.3.x before 0.3.5 (CVE-2021-3362). It was also discovered that a buffer over-read occurs in String-to-Float conversion in Ruby before 2.6.10, 2.7.x before 2.7.6, 3.x before 3.0.4, and 3.1.x before 3.1.2 (CVE-2022-28739). With a low attack complexity and a high confidentiality and integrity impact, these bugs have received a National Vulnerability Database severity rating of ''High''.