[HN Gopher] You Are in a Box
___________________________________________________________________
You Are in a Box
Author : todsacerdoti
Score : 111 points
Date : 2025-07-14 15:02 UTC (7 hours ago)
(HTM) web link (jyn.dev)
(TXT) w3m dump (jyn.dev)
| PaulHoule wrote:
| I feel this the most on mobile platforms where the phone really
| should be acting as your agent but instead we're stuck with all
| these apps.
| nikolayasdf123 wrote:
| interesting. how would you make it better?
| PaulHoule wrote:
| Clear APIs and better semantics. Another post points out how
| gross mistrust gets in the way but there are alao little
| mistrusts. For instance if there was an API to compare
| restaurant menus and order things through an agent that moves
| power up to the agent who can influence who gets the
| business.
|
| That is, I'm not afraid of being branded subversive because I
| like to eat strange foreign foods, I'm afraid that I'm going
| to get the worst pizza in town instead of the best pizza in
| town because somebody paid off Apple or because Google or
| Facebook can put up a tollbooth in front of new entrants or
| that they might not be interested in working with or being
| fair with independent restaurants because private equity has
| bought most of them up.
| idle_zealot wrote:
| It is worse on phones, but most desktop computing feels like
| this too, at least when you're not at a command line. I've been
| trying to puzzle out what I'd like computing to look like
| instead, but I don't get far beyond a concept of "objects" and
| "actions" as fundamental building blocks. How to actually
| expose this... yeah, it's tough.
| jynelson wrote:
| have you seen https://pharo.org/ by chance? it's a smalltalk
| IDE built in smalltalk, which means that the whole thing is
| editable at runtime. it's hard to describe before you see it,
| https://pharo.org/features has some demos.
| mapcars wrote:
| I tried pharo, its an interesting thing but I don't see it
| as a particularly practical solution.
|
| Yes its editable in runtime, but not the whole thing and
| not reliably so: I remember changing some low level array
| methods that broke the whole image.
|
| Even in pharo your data has to be organised in some way and
| if you add new code to existing image you have to know how
| to reach the data you need.
|
| And the biggest downside to productivity and stability is
| it doesn't have a type system and every action can fail
| because the receiver doesn't support a particular message.
| igouy wrote:
| Doesn't editing "the whole thing" include edits that
| break stuff?
|
| > data has to be organised in some way
|
| Yes it does.
| igouy wrote:
| Smalltalk implementations usually do support live coding
| "allowing developers to modify and experiment with code
| while the program is running".
|
| https://www.cincom.com/blog/smalltalk/smalltalk-
| programming-...
| PaulHoule wrote:
| There's a tension between the bash economy which is too
| simple but pleasantly terse and the powershell economy which
| has a richer data structure but feels painfully verbose.
| coldpie wrote:
| COM, buddy! Publish your interface with a known UUID, anyone
| can claim support for your interface in the system registry,
| there's a standard way to initialize libraries and pull
| objects supporting the interface out of it, so now you can
| pull other peoples' applications into yours, without knowing
| anything about their software. This is used _all over the
| place_ on Windows, for things like arbitrary cross-
| application embedding and context menu support... at least
| before we realized we miiiight want to have some notion of
| "computer security".
|
| https://learn.microsoft.com/en-us/windows/win32/com/com-
| tech...
| pjc50 wrote:
| There's an additional factor on the phone and increasingly the
| computer: mutual distrust.
|
| All the apps are carefully sandboxed, because left unattended
| they _will_ steal your data. The new category of AI largely
| works by sending your data to a server in the US where it can
| be surveilled. It would be great to have interoperability but
| first the user has to have confidence that it 's not going to
| be weaponized against them.
| jdauriemma wrote:
| The "in a box" phenomenon is very tangible to me when I am
| using the iOS Shortcuts feature. Its capabilities are so
| powerful, but its utility will always have a ceiling because
| app publishers' interests are generally not aligned with
| exposing a Shortcuts API to users. The more easily a user can
| automate and script the tasks that they use your app for, the
| less engagement their metrics will show.
| singpolyma3 wrote:
| I like this post but the whole thing is a tease for an unwritten
| next article
| jynelson wrote:
| lol yeah it absolutely is
|
| originally i had them both in one article but it was getting to
| be really quite long and i am still thinking through what i
| want to say in the follow-up
| rustyminnow wrote:
| A bit off-topic, but in a shell pipeline like that, if you
| put your pipe chars at the end of the line you don't need
| backslashes and you can comment out bits of the pipe for
| devving.
|
| This little change was mind-blowing for me so I always try to
| share when I can :)
| jynelson wrote:
| thanks :) i prefer to have the pipes on the new line so
| it's more clear how the data flow works, but that's a cute
| trick.
| jhoechtl wrote:
| > Every program attempts to expand until it can
| read mail. Those programs which cannot so expand are replaced by
| ones which can. --Zawinski's Law of Software Envelopment
|
| Its THE Zawinski of XEmacs so maybe not the best example.
| fellowniusmonk wrote:
| Emacs has it right though, more right than wrong, they just, as
| a community, hate humans.
|
| Data and data collections should have app-tributes, apps
| shouldn't have data.
|
| The problem with most operating systems is that they need to
| model space time and minds as first class but they don't.
|
| I've been using my own personal OS for years now that I call
| imtropy, once your abstraction maps to reality everything
| becomes easier to reason about.
|
| The simple fact is most people and programmers are stuck in
| logic and rationality when they should think a layer deeper,
| coherence is all that matters.
| LorenDB wrote:
| Am I the only one who finds the Sam Altman-esque 'all lowercase
| except for proper nouns like Linux but not including the pronoun
| i' writing style unbearable to read?
| happytoexplain wrote:
| I definitely find it difficult, cognitively, for long-form
| writing. It's also the second time recently I've seen all-
| lowercase blog-post-length content, after previously having
| _never_ seen it, so I wonder if something is happening
| culturally to pull text-message style formatting up into the
| rank of published content.
| BolexNOLA wrote:
| My guess is it's meant to come off as more authentic and
| conversational, like an informal chat.
| rmccue wrote:
| It's often used as a tone signifier:
| https://www.theguardian.com/society/2025/feb/18/death-of-
| cap...
| happytoexplain wrote:
| Yeah, I suspect that's the intention. There's a definitely
| a cultural break. To me, lowercase creates a casual tone in
| texts/chat. But in long form, _especially_ published (i.e.
| purposefully displayed to an audience), it sends me a tone
| of disinterest or laziness at worst; or at best, simple
| innocent ignorance /mistakenness (like misspelling).
| Clearly neither is the case here though.
| BolexNOLA wrote:
| oh yeah i definitely agree! the tone communication can be
| useful but in longform writing it gets very grating and
| confusing/distracting. it's also just more social
| engineering to pretend to be authentic when one is
| clearly not.
|
| i prefer this type of writing for comedy generally
| makingstuffs wrote:
| Probably an article written by an LLM which has been
| instructed to look _more human_.
|
| I guess time will tell if this is a new 'thing' people do
| -\\_(tsu)_/-
| Cheer2171 wrote:
| i hate this writing style so much. i have to do extra work
| fighting autocorrect to make it seem like i just rolled out of
| bed and typed it out on my phone. i am so smart, see, i don't
| care about Big Establishment Grammar, my ideas are so good it
| will pierce through
| bitmasher9 wrote:
| My output is so high that editing anything more completely
| than iOS automatically handles for me is a waste of my time
| ricoxicano wrote:
| ... or people who type in lowercase just keep autocorrect
| off?
| olejorgenb wrote:
| Agreed. Honestly - life's too short to read a text the author
| couldn't even be bothered to capitalize correctly.
| owebmaster wrote:
| "I" being capitalized is one of the most weird quirks of the
| English language.
| KineticLensman wrote:
| arguably it makes what would otherwise be a very little
| letter stand out more in text
| lukas099 wrote:
| I agree. A quick search tells me the practice was started for
| legibility in hand-written manuscripts [1], or for that and
| also to emphasize the importance of the writer (seems
| egotistical to me :)) [2], or those reasons and also to help
| distinguish English from other languages but we don't really
| know [3].
|
| [1] http://www.alt-usage-english.org/excerpts/fxwhyisi.html
| [2] https://www.thesaurus.com/e/grammar/whycapitali/ [3]
| https://greatbigstory.com/why-do-we-capitalize-the-word-i/
| shpx wrote:
| You can use your ad blocker to lowercase the entire internet
| like this *##body:style(text-transform:
| lowercase !important;)
|
| it might become bearable eventually.
| zparky wrote:
| i like it. maybe because i grew up with phones and texting but
| having perfect punctuation reads very formal to me, and if im
| reading a personal blog post i assume its casual reading. if i
| get a text that ends in a period mark, i assume the person
| typing it is MAD. i also just like lowercase glyphs more they
| look more pleasing to me
| rekrsiv wrote:
| your brain is only fighting it because it's expecting
| capitalization, the same way parens put new lisp users off and
| javascript has difficulty shedding its semicolons; it's all
| just struggling to let go of something that was drilled into
| you.
| mgdev wrote:
| it's pretentiousness thinly disguised as modesty.
|
| trust me.
| vinceguidry wrote:
| What I find pretentious is the legion of commenters who can't
| find anything better to comment on and instead pretend
| they're smart by nitpicking some stylistic choice in the most
| low-effort way possible.
| happytoexplain wrote:
| Classic case of "you're pretentious", "no, you're
| pretentious". It's exhausting how often we reach for the
| word "pretentious" when we have bitter feelings about one
| person's opinion of another person or their work.
| treetalker wrote:
| No.
| staticshock wrote:
| i tend to draft everything lowercase, and then go back and
| uppercase things depending on how much of a formal vibe i'm
| going for. capitalization rarely helps me formulate an idea,
| and so my writing often splits into phases: (1) formulation,
| (2) polish.
|
| also, it's worth noting that proper capitalization does not
| automatically yield text worth reading. from that perspective,
| i like lower case text as a form of rebellion against the
| artifice of rules; any rebellion against particular aesthetics
| is fair game in my book. more generally, i'm skeptical of
| process advocacy in cases where the process seems to be done
| for its own sake.
|
| on the flip side, good grammar helps me parse sentences, so i
| do sympathize with arguments in its favor.
| accoil wrote:
| I find all lowercase messes with my parser, and is fustrating
| to read. I think I may treat sentences as a single unit, and
| use the capitilization to detect the boundaries. Without it I
| find bouncing to/from sentences slower (which can happen if a
| latter sentence/paragraph adds more context, and I want to
| revisit the previous idea).
|
| Interestingly your semi-colons stand out much stronger than
| the periods for me.
| eddythompson80 wrote:
| Good meme.
| card_zero wrote:
| CAPITALS AT LAST
|
| https://archive.org/details/livestimesofarch0000marq/page/20.
| ..
| drcongo wrote:
| I'd closed the tab by the end of the first sentence. If the
| author can't be bothered, then neither can I. I tend to find
| people who do this have a superiority complex, they think
| they're so much better than everyone else that they're
| justified in offloading their own tiny cognitive load on to
| _everybody_ else.
| rekrsiv wrote:
| The author put a lot of effort into actually writing the
| thing, and correctly capitalized quotes, which clearly
| indicates a stylistic choice. You aren't willing to read text
| that isn't written in your preferred style, but you believe
| it's the author who has a superiority complex?
| happens wrote:
| So, you barely read one sentence, then went to the comments,
| read an entire thread, and took the time to post about how
| the author probably thinks they are superior to you?
|
| I strongly recommend rethinking that approach. You ascribed
| intentions to the author and then spent more time getting
| upset about them than you did interacting with the content.
|
| There are actually interesting points in that text, yet here
| we are getting fussy about the author's supposed lack of
| decorum. That's really disappointing to me.
| hombre_fatal wrote:
| It's fine in tweets and even HN/Reddit comments, but it becomes
| a tacky affectation when used in longer form, deliberate
| content.
| jtsnow wrote:
| I wonder if unconventional writing styles are becoming the
| signal for deliberate content. If text is too polished- or
| even using certain punctuation- can lead to readers
| questioning whether AI assisted in the creation of the text.
|
| A quick search shows that others have made this connection
| between Altman and lowercase and non-AI authenticity:
| https://ted-merz.com/2023/12/18/writing-in-lowercase/
|
| It looks like this particular blog previously used
| conventional capitalization from 2017 to late 2023. The first
| post in this style appears to hint at a kind of shift in
| identity of the author, so perhaps, in this instance it is
| more a signal of personal expression or tribalism than non-
| AI-ness. Then again, we may see the line between the two
| continue to blur.
| soulofmischief wrote:
| I do it a lot, do me a favor and don't attribute it to Sam
| Altman since some of us have been doing this for a long time.
| If you don't like it, you don't have to read it, but you also
| don't need to be patronizing and close-minded about how others
| choose to express themselves.
| AlexandrB wrote:
| I think writing like this is disrespectful to your audience
| since they have to put in extra effort to parse your text. If
| you choose to express yourself like that, fine, but it's not
| patronizing to point this out.
| soulofmischief wrote:
| Maybe you're not the intended audience! :)
| brazzy wrote:
| Weird. I actually never noticed that while reading the entire
| article. And I'm almost 50. No idea what that says about me.
| xnorswap wrote:
| It's something I experimented with as an edgy teenager. It's
| not something I'd expect from an adult.
| numpad0 wrote:
| for reasons I don't (want to) understand, lowercase i and
| psychopathic credit stealing prompting seem to yield best
| results for llms... e.g. "i want xyz how do i do it, ok please
| do so", not "I'm trying to do xyz. Could you guide me through?"
| rglover wrote:
| No. It's obnoxious signaling/tribal adherence. Relevant [1].
|
| [1] https://www.youtube.com/watch?v=F4ifVvgZU58&t=623s
| rob wrote:
| It's cool if you're on desktop Slack or Messenger or something
| between friends, but making a conscious choice to go into your
| phone's settings and turn capitalization off for everything you
| do is a bit weird and over the top.
|
| Seems to be a trend though now to do it everywhere in public.
| I've seen the htmx author do that and the guy who wrote the
| second forked version of opencode.
| chao- wrote:
| I waste brain cycles correcting the author's formatting
| mistakes while simultaneously trying to understand the meaning.
| Thus I read slower, but not the productive kind of slow reading
| --I am not contemplating the concepts more deeply. I am slowed
| down by a lazy lack of editing, for no gain.
|
| Not sure what it has to do with Sam Altman though.
| viccis wrote:
| Tell me you didn't grow up on IRC and AIM without telling me
| you didn't grow up on IRC and AIM
| happytoexplain wrote:
| I did grow up on IRC and AIM. I use all-lowercase even today
| in text-messaging. I explicitly undo autocapitalization of
| "lol", and so on.
|
| But the topic is long-form, published content. Writing styles
| communicate tone, which may change culturally with
| generations.
| fracus wrote:
| I didn't know that was a thing. It's purpose seems to be
| different for the sake of being different.
| dang wrote:
| " _Please don 't complain about tangential annoyances--e.g.
| article or website formats, name collisions, or back-button
| breakage. They're too common to be interesting._"
|
| https://news.ycombinator.com/newsguidelines.html
|
| (Of course annoyances are annoying, but they're also
| distracting, and they tend to get stuck at the top of threads,
| choking out more interesting conversation.)
| heady wrote:
| It's a highly-dimensional box, isn't it? This age-old tension
| between interface standards and business/innovation speed.
|
| Everything is a file is a good example of a fundamental and major
| standard that lasts till today and even though IPC kind of didn't
| make it all the way, I think about the core UNIX philosophy and
| Alan Kay's thoughts around as very, very accurate in terms of
| where we've ended up and what the likely ways out look like to
| me.
| quilombodigital wrote:
| This really reminds me of what Plan 9 was aiming for -- breaking
| out of the 'box' by making everything a file, using per-process
| namespaces, and cleanly exposing system and network resources
| with proper permissions. It had that same idea: your environment
| shouldn't be a prison, it should be a flexible, composable space.
| (https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs)
| (https://fqa.9front.org/fqa0.html)
| CGMthrowaway wrote:
| Cool idea. Seems like it would require an entirely new
| philosophy vs our present one on security.
| quilombodigital wrote:
| Yes, you would eventually be capable of sharing GPU power,
| devices, audio, anything. Imagine all your machine's idle
| power available to others. Right now your GPU is barely being
| used.
| packetlost wrote:
| Yes, but it also removes a lot of footguns. Access to
| resources (ie. paths mostly) is controlled almost entirely by
| the parent process, which makes access controls highly
| pluggable and flexible.
|
| The real problem is Plan9 never really had a lot of attention
| put on the things that make having a sane security policy
| good. Factotum seems, at best, to be bolted on after the
| fact.
| MisterTea wrote:
| > Factotum seems, at best, to be bolted on after the fact.
|
| What gives you this impression?
| packetlost wrote:
| It literally was, it didn't exist until the 4th edition
| of Plan9. That isn't to say it isn't a good idea (or
| implementation), but security is very clearly not a
| primary concern in Plan9.
| MisterTea wrote:
| > but security is very clearly not a primary concern in
| Plan9.
|
| That is a myth that keeps getting propagated.
| https://plan9.io/sys/doc/auth.html
| packetlost wrote:
| That paper is about factotum which was introduced in 4th
| edition, like I said. Regardless, I'm more talking about
| the fact that transport encryption still isn't used
| ubiquitously to my knowledge.
| MisterTea wrote:
| > That paper is about factotum which was introduced in
| 4th edition, like I said.
|
| Which describes that yes, there was security in Plan 9
| prior to Factotum, just that it wasn't good enough.
|
| > Regardless, I'm more talking about the fact that
| transport encryption still isn't used ubiquitously to my
| knowledge.
|
| It certainly is. You get SSL/TLS for free on Plan 9 as
| its a service. You dont mess with security code and
| instead use tlssrv(8). See
| https://man.9front.org/8/tlssrv
| packetlost wrote:
| I didn't see there wasn't, I said it wasn't a priority.
|
| I stand corrected on tlssrv
| no_wizard wrote:
| I think OpenDoc was meant to be this kind of thing as well. I
| mean the breaking out of the box part, you can read what other
| programs write kinda thing.
| cryptonector wrote:
| What an awesome username!
| simpaticoder wrote:
| Computers are boxes, therefore all software is literally (and
| figuratively) "in a box", are they not? This might seem like a
| frivolous jest, but it is not. For example, the author points out
| that clojure, java, kotlin can interoperate, but notes they are
| stuck in the same jvm 'box'. This generalizes and recurses, so
| you must find a specific place to stop, and then motivate that.
|
| One likely place to stop is at "processes". But this must be
| motivated since ultimately processes are as synthetic a
| convention as a language thread - it's just that the runtime is
| called a "kernel" instead of a "runtime".
|
| Ultimately I think what the author is getting at is a data
| problem, not a code problem. Or rather, it's yearning toward a
| world where data and code are strongly decoupled, conventions
| around data are standardized, so that processes written in
| disparate tooling can successfully interoperate locally. However
| I doubt there is much appetite for a "model of everything"
| registry (such things have been tried, and failed, in the past).
| That said we might take another stab at this, since LLMs make
| likely that software will become more dynamic in terms of
| translating data structures at runtime such that one program can
| examine a peer program and its data structures, and how to map
| them to local data structures, thus achieving interoperability
| without a centralized agreement on representation.
| xnorswap wrote:
| It's not long now until we re-invent SOAP and pretend it's a
| productivity breakthrough.
| singpolyma3 wrote:
| This is called GraphQL
| no_wizard wrote:
| Having used SOAP and GraphQL, I really disagree with this
| characterization.
|
| The problem I have seen at most organizations is they
| simply want their APIs to reflect their database schema,
| even if its not a good or useful idea. They throw junk over
| the wall.
|
| They carry this practice over from REST to GraphQL and of
| course its horrible, its not a good way to use the
| technology.
|
| Now organizations that understand GraphQL allows you to
| create a data schema unbound by its sources, they leverage
| GraphQL quite well, and its very pleasant to use.
| Unfortunately not enough organizations do this, or do this
| well.
|
| SOAP was and is still simply a bad protocol and had tons of
| issues ranging from security to payload size to parsing
| issues between different clients
| procaryote wrote:
| Why wouldn't you want your database schema to match how
| you use it?
| dnpp123 wrote:
| The vocabulary you speak/write every day is a box.
|
| Your brain is a box.
|
| Your body is a box.
|
| /s
| dec0dedab0de wrote:
| _and always, always, always, you are at the mercy of the program
| author._
|
| Not if it is open source, and you're willing to put some effort
| into it. When I write code I like to think of it more as using a
| computer effectively instead of programming.
| chubot wrote:
| > there is no interop between powershell and nushell
|
| FWIW I wrote a post about this design issue:
|
| _Oils Is Exterior-First (Code, Text, and Structured Data)_ -
| https://www.oilshell.org/blog/2023/06/ysh-design.html#survey...
|
| That is
|
| - Powershell and nushell have an "interior" design (within a
| process/VM)
|
| - while POSIX shell, bash, OSH, and YSH have an "exterior" design
| (between processes)
|
| And I'll claim that the exterior design is the glue you need in
| large, heterogeneous systems. Making the shell "interior" and
| "easy to use" is at odds with the role as essential glue -- it
| creates pressure for something else to be used instead.
|
| ---
|
| Maybe the more pithy statement is here:
|
| _A Sketch of the Biggest Idea in Software Architecture_ -
| https://www.oilshell.org/blog/2022/03/backlog-arch.html
|
| _The lowest common denominator between a PowerShell, Elvish,
| Rash, and nushell script is a Bourne shell script (and eventually
| a YSH script)_
|
| I also claim this isn't theoretical -- there are probably a non-
| trivial number of bash scripts gluing together PowerShell and
| other shells. IMO it's better to have 1 type of glue, than 2 or
| more types, which I call "Unix sludge / Cloud sludge".
|
| ---
|
| And I disagree with this part, which references protocol buffers:
|
| > how do you get a schema? well, you establish in-band
| communication. RPC is ...
|
| Protocol buffers transmit schemas OUT of band, usually via a
| monorepo. The data sent over the wire can't be interpreted
| without the schema information compiled into the binary.
|
| The monorepo works well enough within Google, but even there it
| failed to scale (probably around the time of "Alphabet", e.g.
| Waymo and other companies)
|
| Also, protobufs are biased toward C++; users of other languages
| feel this friction to varying degrees. In general, they'd rather
| use .gob for Go, pickle for Python, JSON for JS, Java
| serialization, etc.
| frizlab wrote:
| Swift has interoperability with Java (early stages, but works).
| BwackNinja wrote:
| Zawinski's Law, when taken literally, argues that programs all
| eventually need to be communicated with by people and other
| programs using a generic protocol and without using program-
| specific or domain-specific libraries to do so.
|
| Unix shells (local), I'll add in HTTP (remote), and Email (remote
| and asynchronous) are the only forms that are ubiquitous,
| precisely because they enforce no structure for the payload. The
| structured alternatives are only popular in specific domains
| because they create their own ecosystem. As long as input can
| clearly be parsed, which goes hand in hand with being human-
| readable as long as you're not trying to be too efficient, you
| get schema implicitly transmitted out of band (by having output
| that you can visually inspect) and interoperability for anything
| that can read and write text.
|
| I'd be interested in other directions this might go, but I remain
| skeptical of anything that will introduce and enforce a new
| paradigm that requires adding complexity to programs to
| accommodate it.
| bdlowery wrote:
| The trend of typing all lowercase in articles is annoying.
| rossant wrote:
| It definitely is.
| pjlk wrote:
| Agreed. Now the article appears to be in ALL CAPS for me, even
| the code block.
| jynelson wrote:
| good catch. fixed the code block.
| wwarner wrote:
| The key point of the article is "your data is trapped inside your
| program", i.e. data models can't generally be shared between
| programs. One thing that has improved my life has been using
| apache arrow as a way to decrease the friction of sharing data
| between different executables. With arrow (and it's file based
| compressed cousin parquet), the idea is that once data is
| produced it never needs to be deserialized again as you would
| with json or avro.
| bsder wrote:
| How are you handling data update? Last I checked, Arrow and
| similar systems had extremely poor performance if you needed to
| mutate data at even modest rates.
| wwarner wrote:
| you create an output arrow table and populate it with rows.
| but w/r/t the original idea, arrow data always comes with a
| schema and is efficient and compact, so it makes it easier to
| share data between different programs.
| PaulDavisThe1st wrote:
| Data and data models are not the same.
|
| Sharing data is just totally undefined for the overwhelming
| majority of all data in the world, because there just isn't any
| standard for the format the data should be in.
|
| Data models are even harder, because whereas data is produced
| by the world, and data formats are produced to intentionally be
| somewhat generalized, data models are generally produced in the
| context of a piece of software.
| williamcotton wrote:
| Just this past week I've been working on a toy/experimental web
| DSL [0] that uses dynamically loaded shared libraries as
| middleware that pass per request arena-allocated Jansson json
| objects between steps in a pipeline. It's extensible in that new
| middleware can be created. Influenced by bash and OCaml/F#, here
| is some kind of demo of the syntax: POST
| /api/users |> validate: ` name: string(3..50)
| email: email age?: number(18..120) team_id?:
| number ` |> jq: `{ sqlParams: [.body.name,
| .body.email, .body.age] }` |> pg: `INSERT INTO users
| (name, email, age) VALUES ($1, $2, $3) RETURNING *` |>
| result ok(201): |> jq: `{ success: true,
| user: .data.rows[0] }` validationError(400):
| |> jq: `{ error: "Validation failed",
| field: .errors[0].field, rule: .errors[0].rule,
| message: .errors[0].message }`
|
| I'm generally curious as to how jyn thinks this would fit in to
| their box-based framework.
|
| [0] https://github.com/williamcotton/webpipe
| freedomben wrote:
| This looks really neat! I typically don't like these DSLs, but
| this is one I would actually use.
| cryptonector wrote:
| I've wanted to do just this. I've used libmicrohttpd, and...
| it's not my favorite. But if you're going to do it in C then
| libmicrohttpd is probably the best API to use. You get bonus
| points for using jq :)
|
| If you're also using jq you might as well ditch Jansson and use
| jq's `jv` API. I highly recommend it.
| williamcotton wrote:
| One thing that sold me on Jansson is that you can set custom
| allocators which work very well with the request arena. Once
| those allocators are set the json objects continue to use the
| arena even when used in middleware. This makes memory
| management a cinch!
|
| From what I can tell jq's C lib doesn't yet expose a way to
| set custom allocators.
| cryptonector wrote:
| You can set a custom allocator, but it's global. You could
| contribute a feature to set thread-local custom allocators
| -- it'd be quite easy.
| jynelson wrote:
| oh hey Will! long time no see lol, it's been ages. small world.
|
| i think this is on a good track! i like that it's designed to
| be extensible while still keeping some amount of structure, and
| that the DSL makes things very compact. how are those filters
| implemented? are you spawning a shell to run jq or are you
| interpreting in-process or something like that?
|
| in general i'd love to see a bunch more DSLs, i think using
| general-purpose languages for everything is most of the time
| not actually helpful (cc https://jyn.dev/constrained-languages-
| are-easier-to-optimize...). i have some vague thoughts about
| how to make interop between DSLs and the host language easier
| but i need to think about them some more.
| subjectsigma wrote:
| Ever heard the cliche about "designing a game with no rules"?
| Seems pretty similar to "structured data with no boxes." I think
| data boxes as defined by the author are not inherently bad.
| Optimization and specialization go hand-in-hand.
| gramie wrote:
| Sorry, I couldn't finish reading because the entire article is in
| capitals.
| stronglikedan wrote:
| Right? Who thinks that is acceptable in 2025?
| bdangubic wrote:
| it was acceptable in 2024? what year did it become
| unacceptable?
| jcranmer wrote:
| Unclear, but it looks to be somewhere around the year 1000.
| dlt713705 wrote:
| Since October 1995 and the publication of RFC 1855.
|
| https://www.rfc-editor.org/rfc/rfc1855
|
| Communication has not been merely a matter of personal
| habit -- it follows commonly accepted standards for
| exchanging information within a group. Ignoring these
| conventions risks your message being unread, unheard, or
| misunderstood.
|
| That said, it seems possible the author is intentionally
| addressing a specific subgroup that has agreed upon a
| different set of communication rules.
| bdangubic wrote:
| Status of this Memo: _This memo does not specify an
| Internet standard of any kind._ - MY FAVORITE kind of
| Memo :)
| packetslave wrote:
| Someone who is writing on their personal blog and doesn't
| give a damn what is "acceptable" to some rando on the
| Internet?
| stickfigure wrote:
| If you're publishing a public blog, by definition your
| audience _is_ randos on the internet. Also, the author is
| posting in this thread.
| dblitt wrote:
| Looks like it checks for the referrer in main.js and adds the
| uppercase text-transform if you come from HN:
| let host; if (document.referrer) { host = (new
| URL(document.referrer)).host; } if (host ===
| "news.ycombinator.com" || host === "lobste.rs") { let
| style = document.createElement('style'); // let
| transform = host === "lobste.rs" ? style.textContent =
| ` body { text-transform: uppercase; } pre,
| code { text-transform: none; } `;
| document.head.appendChild(style); console.log("HN
| readers clearly can't handle the typing habits of the average
| trans girl."); return; }
| Centigonal wrote:
| Sounds like the author got called out for not capitalizing
| the start of her sentences[1] and decided that, if HN readers
| want capital letters, they will get them.
|
| [1] https://news.ycombinator.com/item?id=39027187
| packetslave wrote:
| It's a less... dramatic... version of what happens when HN
| links to JWZ's blog.
| Minor49er wrote:
| Which is funny because if you engage Reader Mode in the
| browser, everything becomes proper except sentences, which
| still start with lowercased letters for some reason. Names
| are still properly capitalized. It's truly bizarre
| 1vuio0pswjnm7 wrote:
| What would happen if no "Referer:" HTTP header is sent and
| Javascript engine is absent or disabled
|
| Answer: The text will be mostly all lowercase, along with some
| sentence case
| Terr_ wrote:
| > Your data is trapped inside the box that is your program.
|
| Well if we're going to get philosophical about it, "I" happen to
| be ~30 trillion cooperating boxes known as cells, so say nothing
| of all the other enclosed, enclosing, or cross-connecting
| boundaries one might draw.
|
| Keeping the data/molecules/etc. "hostage" is probably to my
| benefit, as opposed to an, er, Evangelion ending.
___________________________________________________________________
(page generated 2025-07-14 23:01 UTC)