HNHacker News
TopNewBestAskShowJobs

Cogito

4,356 karma · joined April 24, 2012

You can get me at andrew.ardill at gmail.
submissionscomments
Cogito··on 10 years of writing a blog nobody reads
I think I took out an extra comma too, which hurts readability.

Personally I write with too many asides, normally done with commas and parentheses. It's a comforting habit to fall into, and makes getting your thoughts out so much easier, at the expense of interrupting the reader's train of thought.

I don't normally notice when I'm writing with asides so the jarring em-dashes were a good reminder to try and edit them out where I can.

Cogito··on 10 years of writing a blog nobody reads
It may be due to AI proliferation, or the culturural bias I have, but I increasingly find em-dashes jarring.

As you point out, authors use them for the "natural and chaotic shifts of thought we all have" and when there are lots of these shifts it feels like I have to keep track of multiple conversations at once.

For example, in the article we have:

If your goal is to have other people read—and hopefully enjoy—your writing, you should make an effort to edit your thoughts.

When I read this I instinctively pause the 'main' thought/voice, read the aside, then re-establish my train of thought. In my opinion the sentence reads just as well without the aside:

    If your goal is to have other people read and enjoy your writing you should make an effort to edit your thoughts.
[edit - putting comma back in to break up the long sentence]

    If your goal is to have other people read and enjoy your writing, you should make an effort to edit your thoughts.
I think this is the only aside formatted like this in the article. The other em-dashes take the place of pauses in sentences, places I would normally use a comma or semicolon, or are used to introduce a list where I would typically use a colon.

Again this is probably a cultural thing, maybe a reaction to AI as well, but I find the em-dash a lot more though-interrupting than the other punctuation choices and I wonder if it's something I'll get used to or not.

Cogito··on Yt-dlp: External JavaScript runtime now required for full YouTube support
I've found having yt-dlp available on my iPhone useful, and used Pythonista to achieve that, but haven't figured out how to get the new requirements to work yet. Would love any ideas people have!
Cogito··on You already have a Git server
> (I forget how git format-patch handles the case where there are two parents.)

As per [0] merge commits are dropped:

Note that format-patch will omit merge commits from the output, even if they are part of the requested range. A simple "patch" does not include enough information for the receiving end to reproduce the same merge commit.

I originally thought it would use --first-parent (so just diff vs the first parent, which is what I would want) but apparently no! It is possible to get this behaviour using git log as detailed in this great write-up [1].

[0] https://git-scm.com/docs/git-format-patch#_caveats

[1] https://stackoverflow.com/questions/2285699/git-how-to-creat...

Cogito··on John Searle has died
Out of interest, what do you think it would look like if communicating was algorithmic?

I know that it doesn't feel like I am doing anything particularly algorithmic when I communicate but I am not the hommunculus inside me shuffling papers around so how would I know?

Cogito··on After 50 years, The Magic Circle finally inducts Penn and Teller
They have a MasterClass® class that you might like if you have an account (or if you don't!)

https://www.masterclass.com/classes/penn-and-teller-teach-th...

Cogito··on Sj.h: A tiny little JSON parsing library in ~150 lines of C99
No claim was made that it is not open source. The contention was over if it was a free license or not:

> not free software

which it is. As F3nd0 said, it's both.

Cogito··on Code formatting comes to uv experimentally
I anticipate this will make it much easier for me to get my little team of actuaries formatting their code.

The impact of uv on our onboarding and utilisation of python has already been huge, and any way I can easily improve their code hygiene is a good one. Yes, I could get them to use ruff standalone, or set up pre-commit hooks etc for them, but the simple mental model that comes from `uv <do something>` is really beneficial.

Will have a play around with this and see how it goes. Would love to be able to hook into other formatters too, but not sure if that's easy or even possible already. For example, I would love it if `uv format` also formatted our SQL/dbt models.

Cogito··on Building the Rust Compiler with GCC
Thanks, I'm pretty sure I was thinking of this whole discussion when I made my original comment :)
Cogito··on Building the Rust Compiler with GCC
I'm completely ignorant so forgive me if this is obvious: in the effort of the parent article - to compile rustc with gcc - will rustc still be feeding lots of code to LLVM, or would that code now be fed to gcc?
Cogito··on Building the Rust Compiler with GCC
Really great read.

Someone mentioned recently that the slowness of rustc is in large part due to llvm. I know that is probably orthogonal to the work here, but I do like the idea of building the compiler with different toolchains, and that there may be follow on effects down the line.

Cogito··on A new pyramid-like shape always lands the same side up
Recent moonlanders have been having trouble landing on the moon. Some are just crashing, but tipping over after landing is a real problem too. Hence the joke above :)
Cogito··on uv: An extremely fast Python package and project manager, written in Rust
This worked pretty well for me:

    uv add --dev uv-bump
    uv-bump
Agree that something like this should be built in.

https://pypi.org/project/uv-bump/

Cogito··on Show HN: I build one absurd web project every month
bios444's comment is a sibling, and yes I can't reply to them.
Cogito··on Show HN: I build one absurd web project every month
Hey bios444 if you see this your comments are not showing as you seem to have been hit by HN's shadowban hammer.

It seems like you might also be absurdwebsite which doesn't seem to be banned (but does have a hidden post from a month ago).

If you plan to use this account it's worth dropping an email to the admins, they are very responsive :)

Cogito··on Power Failure
Just reiterating what cogogo stated in a sibling, but the thing that threw me was the 'review' in the title. I was expecting some critique or comparison but instead saw summary and highlights.

I enjoyed the summary and highlights, and learnt about some details I would likely have never otherwise seen, so I think it's just the framing that seemed 'off'.

Depending on your intent consider reframing or adding critique, but I think the content is good and I appreciate you making it.

[edit] There is some critique and comparison in the opening: "Shakespearean tragedy" and "The result is equal parts invention history, boardroom knife-fight, and forensic accounting thriller." but I think these are the only ones. I would love to know why you think this, and what you like about your "favorite ideas" (and any things you didn't like!)

Cogito··on That fractal that's been up on my wall for years
Thought I'd check the arithmetic for 2 two-digit numbers, and it works!

I expect 41+14 to be 12 (two right plus two up equals two right and two up).

Long addition in long form below uses:

'=' to show equivalent lines (reordering of terms (1+2=2+1), spliting numbers (41=40+1), adding single digits (1+4=22))

'->' for when the algorithm gives a digit

'<' for when we move over a column

    41+14
    = (40+1)+(10+4)
    = 40 + 10 + (1+4)
    = 40 + 10 + 22
    -> 1s digit = 2
    < 4 + 1 + 2
    = 22 + 2
    = 20 + 2 + 2
    = 20 + 41
    -> 10s digit = 1
    < 2 + 4
    = 0
    -> done
    == 12
[edit] Just noticed the article has two different numbering systems, one where 10, 20, 30, 40 are clockwise and one where they are anticlockwise. In both, 1, 2, 3, 4 are clockwise. My addition is on the second, where 10s are anticlockwise (this is what is used in the addition table).

It still works in the alternative system (14+21 should equal 12)

    14+21
    =10+20+42
    ->2
    <1+2+4
    =13+4
    =10+3+4
    =10+31
    ->1
    <1+3
    =0
    ==12
Cogito··on Baby Steps into Genetic Programming
This is from 2011, FYI.
Cogito··on Pierogi in Space
Low earth orbit is in space ('outer space'), so unless they have been to other parts of space not sure it's more correct - perhaps more specific, but I think the more general correct claim wins out.

If they'd previously been up in sounding rockets, or high altitude aircraft, or like a Blue Origin sub-orbital hop we would likely have an interesting discussion here - I will take anything that has surpassed the McDowell line as being 'in space' but think making orbit is more impressive.

https://en.wiktionary.org/wiki/McDowell_line

Cogito··on Inline Evaluation Adventure
Completed it. Was really fun, thank you!

I wasn't sure how to chain function calls so had to look that up to implement movei, but apart from that was fairly straightforward (it's (do (<func1>) (<func2>) ...)).

My UI was pretty simple and ended up being

    (defn looki [] (display-html (look-html (look))))
    (defn movei [dir] (do (move dir) (looki)))
    (looki)
    (movei :south)
    (movei :east)
    (movei :north)
    (movei :south)
    (movei :west)
    (unlock-function :spoiler)
    (stack)
    (push :picture)
    (push :spoilers)
    (peek)
    (pop)
    (reset)
Cogito··on Cross Views
My favourite related trick is to use cross viewing to solve find-the-difference puzzles.

Set up so the two images (with slight differences) are next to each other, cross your eyes, and look for 'shimmering' spots - these are the differences between the images.

It makes differences very easy to spot, which is pretty cool!

Cogito··on Cross Views
Now just need to duplicate the mouse cursor to be in 3D too!

I also had to shrink the window as I couldn't manage the cross view on a widescreen :)

Cogito··on Simple CPU Design
For those who haven't seen it before, throwing out nand2tetris and nandgame as another interesting journey from logic gates -> computer programs running on a CPU.

nandgame, in particular, is really easy to get started with and has been updated quite a lot over the year. If you looked at it a while ago check for new updates!

nand2tetris goes into a bit more detail around some things, I like it too but harder to get started with.

https://www.nand2tetris.org/

https://www.nandgame.com/

Cogito··on Inside the hands-on lab of an experimental archaeologist
Sally Pointer is another experimental archaeologist who produces great content on youtube.

Her stuff tends to be more textiles and foraging based, and is an excellent rabbit hole to go down.

https://www.sallypointer.com/

https://www.youtube.com/c/sallypointer

Cogito··on How far could the sun possibly be?
> why doesn't that make the other stars yellow too?

Most stars appear white/bluish because they are too dim for our colour receptors to perceive. The spectra arriving at our eyeballs is consistent with what you would expect given the type of star, redshift, and atmospheric conditions, but the perceived colour is not.

Cogito··on A* tricks for videogame path finding
I know I had issues keeping track of how many steps I’d taken, but making sure I was generating a good set of neighbours helped with that.

Otherwise it was just making sure I got the rules right, like all AoC problems, and testing different cases to make sure my solution did the right thing.

Cogito··on A* tricks for videogame path finding
A tuple vector with row and column offset, your third option here, which happen to have symbol names of N, S, E, and W.
Cogito··on A* tricks for videogame path finding
My search nodes were tuples of position, direction, and steps taken in the same direction.

More or less a straight depth first search with a priority queue from there.

Cogito··on XCurl
The point I'm supporting is that users will not realise that the documentation that is linked to is from a different project than the one being used.

Hopefully, by focusing on an example of how a support interaction could go (clueless user, lots of back and forth before the key issue is identified), it shows how this practice is good for neither users nor for the curl team who will end up dealing with the fallout.

I also address the MDN example by stating that I suspect the audience and reach of xCurl will create a larger support burden for curl than Mozilla would see in similar situations (aside: even though it wouldn't be reasonable in that case either!)

Unless it's done very carefully, pointing users to the parent project's documentation will cause a support burden on that project, and that's just not reasonable for Microsoft to do in this situation.

Cogito··on XCurl
"Hey, your docs say that curl should be doing this, but it's not working for me?"

<2 pages of back-and-forth posts later>

"Oh you're using xCurl, yeah you need to talk to Microsoft."

It probably depends on the reach this has within the intended audience (people wanting to deploy libcurl on Xbox?) as to how much of a support burden it will end up, but I suspect more than Mozilla has to deal with from similar situations.

Page 1 of 26Next →