There is also the [units] command from UNIX. I think the original was by Ken Thompson (AFAICR).
https://www.unix.com/man-page/v7/1/units/
$ units You have: 1 foot candle You want: lumens meter * 0.310896 / 3.2165097
HN user
There is also the [units] command from UNIX. I think the original was by Ken Thompson (AFAICR).
https://www.unix.com/man-page/v7/1/units/
$ units You have: 1 foot candle You want: lumens meter * 0.310896 / 3.2165097
Inspired by nullprogram's recent post on his alternative, libc-less, thread api.
I decided to see if I could replicated it in zig. I could, with caveats.
We need to bring ChatGPT into the modern age.
Plain ascii text output is a relic of previous century; the domain of the neckbeard!
I write a clone of the unix cmp utility.
(spoiler) I use zig SIMD features to make it faster than GNU cmp.
It's an interesting idea. If I had 2 phones I would probably install LineageOS on one of them and use that as my daily driver.
Keeping the other phone for banking only.
Many banks have gone this route.
Either no online access thru a website or requiring an app on your phone as part of the login process (which amounts to the same thing, no phone app, no banking).
I noticed a void in zig space. A wrapper for the pcre2 (perl regex) library (or any regex library). So I wrote one.
I briefly describe how wrapping C libraries works in zig and provide a complete (single file) zig wrapper for pcre2.
Inspired by a recent post on a D macro which generates an unrolled binary search, I wanted to see whether I could do the same thing in zig.
I could. Here it is...
Programmers need to stop working for free and stop aiding the normalization of free work.
No other profession works for free. On the rare occasions they do, they expect and receive massive social status boosts.
Is meta-programming possible in zig?
What can be done with comptime and how does it compare to Lisp and Nim?
I have recently started using the Nim programming language.
It has a killer feature: meta-programming.
Here I describe how I implemented a html templating system using Nim meta-programming.
Thank you, that was very informative.
Any open source language could do the same without massive investment (many have). What I meant by this was wrapping other open source libraries like libsodium etc. rather than implementing crypto libraries from scratch. I, wrongly, assumed golang might also be doing that.
It is true I have no experience implementing cryptographic libraries.
(The one and only WalterBright! What an honour.)
Terribly sorry about that. I've moved you into the list. It's been a long time now but I really did like D and its meta-programming features.
Is that the same Anders Hejlsberg who developed Turbo Pascal and Delphi for Borland, another company which microsoft successfully crushed in the 80's and 90's? (Hint: It is).
We could have C# 30 years before we did if it weren't for microsoft.
Richard Stallman once said he'd rather use software that was slightly less good over non-free software.
If you think this is insane or don't understand the viewpoint, I refer you to the fable of the wolf and the dog. https://fablesofaesop.com/the-dog-and-the-wolf.html
I find myself only replying to people who disagree with me. That is sad.
I've added Vale to my blog post. It looks very interesting.
Congratulations on taking a stand for what you believe in.
I constantly hear that "we can't do it without corporations" and yet there are so many counter examples.
Most of the corporations were built on free languages and ecosystems which existed before they did.
Pip is separate from python itself. With a given language can I download packages with curl and install them myself? I think I can trust curl.
The problem is not only that the tool connects to the networks, but who is behind the tool. Google is a company whose business is collecting all the information on people it can. I don't think those in control of python/pip have the same incentives.
As I said I love golang. I invested a lot of my own time into learning it and its ecosystem. The time developers spend learning a language and its libraries should not be discounted.
Maybe we overestimate how much corporate backing is required to make a language a success. After all we had successful languages and ecosystems long before any corporations became interested in funding such things.
You mention golang's crypto. Is it true that all that code is native to the go project or are they mostly just wrapping other open source libraries which have been created by 3rd parties? Any open source language could do the same without massive investment (many have).
Remember when programming languages were free?
When your compiler/editor didn't call back to some corporation every time you compiled code?
When our package managers weren't linked to data aggregators watching our every move?
When we used free tools to build free software.
:) I am glad to have enterained you.
My end game is to get people to write
int const delta = (cp[IPOPT_OLEN] - 1);
instead of repeating expressions like this: (cp[IPOPT_OLEN] - 1) and adding variants elsewhere like this: cp[IPOPT_OLEN]. It's confusing and causes bugs. Naming things helps and costs nothing.Thank you for the clarification. I did not look at the surrounding code.
However, my point still stands that extracting the complex expression as delta would have helped and possibly avoided the original bug.
int const delta = (cp[IPOPT_OLEN] - 1);
Further proof is that the original author first commited a broken fix. Again this was caused by the confusion between delta and delta-1, which would have been clear had delta been explicitly named.This sort of code is just begging to be misunderstood.
- if (cp[IPOPT_OLEN] > 0 && cp[IPOPT_OLEN] < hlen) {
+ if (cp[IPOPT_OLEN] > 0 && (cp[IPOPT_OLEN] - 1) <= hlen) {
I believe there is a bug in the bug fix.
I've explained it here: https://blog.deckc.hair/2022-12-11-incorrect-bug-fix-for-24y...
In brief (cp[IPOPT_OLEN] - 1) is the delta, not (cp[IPOPT_OLEN]); according to the original code. (I don't pretend to know where the original -1 comes from).
This means that the IF-statement check is incorrect.
Yes I wrote the same thing here http://blog.deckc.hair/2022-11-19-ted-unangsts-golang-obfusc...
I see honk hasn't been mentioned on this thread. It's also an activitypub server which is very lightweight (golang) and easy to set up your own server. https://humungus.tedunangst.com/r/honk
Honk Avatars are Perfect as designed by Ted Unangst.
Honk is a Mastodon alternative. It is much simpler to install on your own server.
In this post I outline the reasons why the people who nitpick about the avatar image system are wrong.
I also show how a misguided user might switch to normal image avatars with a simple code patch. I only do this so that you might avoid being tempted to perform such a corrupting change yourself.