HNHacker News
TopNewBestAskShowJobs

knome

2,187 karma · joined April 12, 2007

http://michaelspeer.knome.net/

(2) the subculture of the compulsive programmer, whose ethics prescribe that one silly idea and a month of frantic coding should suffice to make him a life-long millionaire. --ewd1036

submissionscomments
knome··on Emacs Turns 50
Oh, definitely. I had had some other shell calls and just followed the pattern. It was fast enough that I never bothered to go back and look up the right way to do it :)
knome··on Emacs Turns 50
you can replace or wrap arbitrary functions or update values freely in emacs. most of the editor is written in elisp. only the primitives are in c.

you can write (arbitrary (lisp)) and then just put the cursor after the end parenthesis and hit `Ctrl-x Ctrl-e` to evaluate it. It works just like you had typed out something in a python repl, only you can inspect, add, or update anything inside of your running copy of emacs.

As an example, I've had a chunk in my ~/.emacs for 15+ years that rewrites a few builtin functions to prefix all of the backup files emacs makes with a `.` because I don't like to see them in `ls` listings but still want them local to where they were made should I want to diff them against the current version. (the default is just a ~ suffix, and there's a common directory relocation many people use to pile them all in a backups directory somewhere)

As another, I wanted to be able to punch a button and drop the current datetime into a file, for files where I keep records and the like, so I added this:

    (defun my-date-insert ()
      (interactive)
      (insert (substring (shell-command-to-string "date") 0 -1 ))
      )
    
    (global-set-key [f9] 'my-date-insert)
Albeit, you needn't shell out to get a date in emacs, I dropped in in their years ago on a whim and just used what I knew at that time to toss it together.
knome··on Patch the Planet: global response coordination as agents uncover vulnerabilities
>You can read code, rewrite the functionality yourself, and sell it, and not be at odds with copyright

Traditional reimplementation often separates the roles of investigation and implementation specifically to avoid assertions of copyright infringement. WINE, for example, does not accept patches from anyone with prior experience in the Windows code base.

By training and generating from the same the LLM, as one necessarily must do as LLMs are built from training, you inherently violate this distinction.

>If you don't want your code to be used as possible inspiration

Inspiration is a human affect. Training an LLM and generating tokens therewith are mechanical processes.

Courts have not yet decided whether LLM data mogrification truly constitutes fair use.

>then you are not actually for open source, and are using the wrong license. The licenses are legal bindings, not moral bindings

It is not for you to decide what rights someone else wishes to attach to code they release. There are many open source licenses for those wishing to grant various sets of rights. Your reference to morality seems more in line with the GPL specifically, as the Free Software Foundation has a moral stance on freedom in computing not necessarily shared by other open source licenses. 'Free Software' is the term taking a moral software stance.

>"Don't use any concept found within this code" would be a license that doesn't really fit with any current copyright law

Yes. That would be a patent.

>and it wouldn't allow any software to exist, except that made in the 70's.

Patents only last 20 years. They have frequently delayed the spread of certain algorithms and data file formats under their restrictions. This has frequently lead to open source, and proprietary for that matter, being forced to invent their own methods to work around the prohibited ones.

knome··on Patch the Planet: global response coordination as agents uncover vulnerabilities
Few works are released directly to the public domain. It is my understanding that the public domain doesn't even exist in all legal jurisdictions.

Most people license out the software under specific requirements and prohibitions. BSD requires attribution. GPL variants require adherence to copyleft when distributing derivative works. A little under half of all github repos don't even have a license, which means that though the source is published, no one has any license under which to copy it or derive new works from it.

So far as I have seen, whether aggregating and munging these works into abstract LLM weights constitutes fair use is still legally unclear. If not deemed fair use, it is almost certainly a massive violation of copyright.

knome··on God of War on PSP, recompiled to WebAssembly and running in the browser
you would expect wine to be translating the executable in some way if you considered it emulation, but wine loads and runs the binaries as they are. it provides a PE/COFF loader and linux-native replacements for windows apis. the machine code of the original executable is running directly on the processor.
knome··on Who Aligns the Aligners?
Quantum immortality is just an absurd quasi-religious pretense of physics that caters to those that fear death but feel embarrassed to participate in the traditional socially approved coping mechanisms.
knome··on Logo Programming Language
ha. 4th grade for me, though I'm more amused than salty about the affair. who's ever heard of 'recursion'? honestly.
knome··on Is it safe to call print in a Python signal handler?
the first line of the article points out that python isn't run in the POSIX C handler. that just sets a flag for the interpreter to act on. the python issue is an unsafe re-entrant handling strategy in the interpreter.
knome··on The Fabled Flatbreads of Uzbekistan (2015)
>Migrant is actually the wrong word entirely, I think.

immigrant, im- (variant of in-) ; migrant into your country

emigrant, ex- ; migrant out of your country

both are still migrants. there is no specific cause for migration required to be an migrant.

you just need to move somewhere new to live.

knome··on Some combinatorial applications of spacefilling curves
https://eisenwave.github.io/voxel-compression-docs/rle/hilbe...
knome··on Under federal rule, colleges must leave grads better off or lose financial aid
>s/learn/be indoctrinated/

Yeah, this comment demonstrates my own perspective on it quite well, in that it's likely just another bald political attack by the current administration on education, wherein a bureaucrat will get to decide what does and does not constitute a worthwhile degree, and is allowed to become the gatekeeper of what universities may teach by selective topic by topic defunding.

Will they decide to ignore the salaries of students "not working in their field"? That could be used as an instant bludgeon against anything centered on history, philosophy, or other educational paths that do not generally have high paying careers associated with them, even if those graduating from them do generally earn more on average than those with only a high school diploma.

Twenty years ago something like half of those in tech didn't have a college degree of any kind. Plenty of businesses are run by folks that don't have college degrees. Crafting statistics through careful manipulation of who is counted for making the comparisons could be used to exclude almost any set of courses that isn't STEM, law or medicine.

knome··on HackerRank open sourced its ATS. My resume scored 90/100. Oh wait 74. No – 88
For a single word response, perhaps.

But for anything else I wouldn't.

The entire chain will be affected from the different tokenization on down. Even if it lands in roughly the same semantic area, it doesn't mean it will land there with anything like the same syntactic selections. Anywhere there were multiple near-tokens could easily select a different route based on even minor fluctuations in the starting conditions. It's chaotic.

knome··on Age verification tech could put children at greater risk, says think tank
Of course they pull that kind of crap. Teens are often plenty smart, just generally naive to consequences.

They'll do this kind of stuff even if we require spybotting the entire internet. Kids already lean on sketchy older siblings or friends or stolen/fake credentials to acquire booze illegally. Getting them to sign up for and verify online accounts would be next. Or paying/doing favors for random sketchy adults. Or buying them online, as the original article mentioned.

Anything more than the equivalent of "mark this device account as being PG/PG-13/Adult" isn't buying more security for kids, just more intrusion into the lives of everyone else, while pushing access into a black market that will create new dangers for the kids entering into it.

A device flag enabling an http header indicating a device account is "PG-13" could still allow a kid to sign up to non-adult sites online, but then have appropriate restrictions on usage etc applied to the accounts. Kids can access their friends, maybe the media cuts off during school hours, but they don't feel the need to escape the system, and are more likely to stay within it.

Requiring invasive overbearing authoritarian systems be put in place with the excuse of saving the children won't accomplish the stated goal, just the unstated one.

knome··on Age verification tech could put children at greater risk, says think tank
You're a parent. Be the bad guy if you feel it's right.

Wanting the government to levy a society-wide information tracking system because you don't want your child to be upset at you is incredibly selfish.

knome··on Moving beyond fork() + exec()
the only difference between a thread and a process on linux is how many structures they share. the function is identical.
knome··on PlayStation Architecture
it's not uncommon for runtimes to use always-zero bits from aligned pointers or bits above 48 (unused in most current 64bit CPUs) to store flags today. you don't need special 'bit-addressing' to do it. byte addressing works just fine.
knome··on Age verification for social media, the beginning of the end for a free internet?
mandating devices provide a `NoAdult` setting, so so browsers could check it and then send something like a `x-NoAdult` header would give websites a reasonable method for distinguishing minors (or people that just don't want adult content).

it's the old 80s/90s bead curtain separating the adult movies area from the rest of the video store. it keeps kids reasonably separated, and leans on parents making their kids mind. I think that's a reasonable target.

it would work without forcing every internet user that wants to use a given service from having to submit government identification, go through interviews, or sign up to massive centralized identification systems that will inevitably track every movement people make online.

if history is any indicator, those things will lead to breaches and abuse, and people's privacy will be violated.

if there's a legally mandated way for parents to stop their kids from peeking through the internet's bead curtain, that should be sufficient for most purposes.

if the argument is that bad or foreign websites might not implement it, it's not wrong, but that same problem exists with the mass-surveillance methods as well.

if you keep going down the path of forcing everything, eventually you end up with a national firewall, vpns are illegal, anything that can provide anonymity or pseudo-anonymity online is illegal, no one has privacy, and busybodies will spend all their time hunting folks for liking things they don't want them to like when the inevitable breaches come.

to your last point, sure, a 14 year old shouldn't be able to just wonder into a liquor store, but a 40 year old should.

knome··on Voxel Space
that's what the y-buffer is that the article mentions in the front-to-back rendering section.

it tracks how tall each columns write is so you can use it to only write the diff between it and the voxel behind it, skipping writing anything at all if the voxel behind is shorter than the current height.

So once you're done rendering front-to-back, you've got a y-buffer of highest-writes you can slap your blue sky across from highest-to-screentop on each line, avoiding the need to clear by write the sky to the full screen before starting the render.

knome··on Voxel Space
You could avoid a full screen clear by using the y-buffer to draw in sky segments after rendering terrain.
knome··on YouTube to automatically label AI-generated videos
>the algorithms love recommending AI content

wouldn't be surprised if it's because they don't have to pay out for AI music.

knome··on Show HN: Write your BPF programs in Go, not C
'berkeley packet filters', these days 'extended berkeley packet filters', are little program snippets you can inject into the linux kernel from userland programs to run logic on hooks on various events without the need to switch back to userspace.
knome··on No way to parse integers in C (2022)
this wouldn't catch overflow or underflow errors, nor does it allow non-base-10 numbers, nor does it handle negative numbers. and writing your own parser is a failure case by op's logic. they are complaining about the builtin parsing functions.

the author admits you can parse signed integers in their second example, but for unsigned, they don't like seem to like that unsigned parsing will accept negative numbers and then automatically wrap them to their unsigned equivalents, nor do they like that C number parsing often bails with best effort on non-numeric trailing data rather than flagging it an error, nor do they like that ULONG_MAX is used as a sentinel value by sscanf.

I'm not sure what they mean by "output raw" vs "output"

    $ cat t.c
    
    #include <stdlib.h>
    #include <math.h>
    #include <stdio.h>
    
    int main(int argc, char \* argv){
    
      char * enda = NULL;
      unsigned long long a = strtoull("-18446744073709551614", &enda, 10);
      printf("in = -18446744073709551614, out = %llu\n", a);
      
      char * endb = NULL;
      unsigned long long b = strtoull("-18446744073709551615", &endb, 10);
      printf("in = -18446744073709551615, out = %llu\n", b);
      
      return 0;
    }
    $ gcc t.c
    $ ./a.out 
    in = -18446744073709551614, out = 2
    in = -18446744073709551615, out = 1
    $
I get their "output raw" value. I don't know what their "output" value is coming from.

I don't see anywhere they describe what they are representing in the raw vs not columns.

knome··on Notion leaks email addresses of all editors of any public page
and I might respect your opinions if they weren't couched in vapid complaints over the formatting of casual online intercourse. nobody with an argument of substance starts off with a complaint on the casing of someone's statement.

if true, your claim of the inability of the financial worker sector to absorb masses of workers dumped from a company going under due to fraud committed by the company sounds like exactly something that a social safety net would assist with, giving the workers a larger space to safely transition from one position to another.

an emotional appeal to insist on allowing a company engaged in criminal acts to persist because it might have a negative impact on those working for it isn't logical. if the company valued its employees, it shouldn't have engaged in fraud and been folded under as it deserved.

knome··on The seven programming ur-languages (2022)
I would add another to the list, which is languages where every expression yields zero or more values, particularly `jq`. there are some antecedents in Icon and xquery, but these generally require explicitly opting into either production or consumption of value streams, where jq does this stream processing automatically from the ground up. (icon requires use of a suspend and needs an every clause to walk the generated values, xquery requires explicit 'for' statements over streams as many builtin operators fail on value streams)

in jq, the comma separates expressions, which independently yield values. a span of such expressions is called a 'filter', since they are always run by passing values from the prior filter into them (with the initial values sourcing from json objects on stdin, or an implicit null if you pass -n to the program).

    $ jq -nc ' def x: "a", "b", "c" ; def y: 1, 2, 3 ; x, y '
    "a"
    "b"
    "c"
    1
    2
    3

    $ jq -c '. + 10, . + 20' <<< '1 2 3'
    11
    21
    12
    22
    13
    23
brackets collect values yielded inside of them.

    $ jq -nc ' def x: "a", "b", "c" ; def y: 1, 2, 3 ; [x,y] '
    ["a","b","c",1,2,3]
if you have a complex object that includes multiple expressions yielding multiple values, construction will permute over them.

    $ jq -nc ' def x: "a", "b", "c" ; def y: 1, 2, 3 ; {"foo": x, "bar": y} '
    {"foo":"a","bar":1}
    {"foo":"a","bar":2}
    {"foo":"a","bar":3}
    {"foo":"b","bar":1}
    {"foo":"b","bar":2}
    {"foo":"b","bar":3}
    {"foo":"c","bar":1}
    {"foo":"c","bar":2}
    {"foo":"c","bar":3}
the pipe operator `|` runs the next filter with each value yielded by the prior, that value represented by the current value operator `.`.

    $ jq -nc ' 1,2,3 | 10 + . '
    11
    12
    13
    $ jq -nc ' 1,2,3 | (10 + .) * . '
    11
    24
    39
binding variables in the language is similarly done for each value their source yields

    $ jq -nc ' (1,2,3) as $A | $A + $A '
    2
    4
    6
functions in the language are neat because you can choose to accept arguments as either early bound values, or as thunks, with the former prefixed with a $.

for example, this runs `. + 100` parameters context, with `.` as the 10,20,30 passed to it:

    $ jq -nc ' def f($t): 1,2,3|$t ; 10,20,30|f(. + 100) '
    110
    110
    110
    120
    120
    120
    130
    130
    130
where this runs `. + 100` in the context of its use inside the function, instead receiving 1,2,3:

    $ jq -nc ' def f(t): 1,2,3|t ; 10,20,30|f(. + 100) '
    101
    102
    103
    101
    102
    103
    101
    102
    103
so you could define map taking a current-value array and applying an expression to each entry like so:

    $ jq -nc ' def m(todo): [.[]|todo] ; [1,2,3]|m(. * 10) '
    [10,20,30]
it's a fun little language for some quick data munging, but the semantics themselves are a decent reason to learn it.
knome··on Notion leaks email addresses of all editors of any public page
the answer to that is a functional social safety net for the innocent employees to land in, not allowing companies to violate the law with impunity.
knome··on Claude Code's source code has been leaked via a map file in their NPM registry
>there is no point in code-reviewing ai-generated code

the idea that you should just blindly trust code you are responsible for without bothering to review it is ludicrous.

knome··on Everything old is new again: memory optimization
>which buffers everything in memory

gnu sort can spill to disk. it has a --buffer-size option if you want to manually control the RAM buffer size, and a --temporary-directory option for instructing it where to spill data to disk during sort if need be.

knome··on Claude Code, Claude Cowork and Codex #5
no they don't. "department of war" is a "secondary title" of the DoD.

https://www.whitehouse.gov/presidential-actions/2025/09/rest...

only congress can change the name.

knome··on Fined $48k for using a jammer to keep commuters from using phones while driving
you're responsible for understanding the ramifications of things you do if a reasonable person should recognize those ramifications.

any reasonable person would have known they were interrupting emergency services. not a lawyer, but surely something akin to gross negligence would apply?

knome··on Fined $48k for using a jammer to keep commuters from using phones while driving
and they were doing that indiscriminate jamming as they drove around for two years.

if op is trying to cast someone making up rules in their head and going vigilante to enforce it on everyone else out of some sense of self-righteous indignation as some sort of heroic action the government is unfairly attacking, I doubt they're going to find many friendly to their perspective.

Page 1 of 21Next →