Remix.run Logo
GrowingSideways 2 hours ago

> I haven’t seen any evidence that “everything is a file” helps much in a world of web APIs and SQL databases

Well for one thing, such an abstraction enables you to avoid web apis and sql databases!

moron4hire 2 hours ago | parent [-]

You're going to have to explain to me how a parametrized request/response system like calling a Web API or making a SQL query can be mapped to reading files. I've seen some stuff that people do with FUSE and it looks like ridiculous circus hoop jumping to making the Brainfuck-is-Turing-complete version of a query system. We have syntax for a reason.

zozbot234 an hour ago | parent | next [-]

Plan9 allows for implementing file servers in user space and exporting a whole file tree as a virtual "folder", so it's really more of "everything as a filenserver". No different than FUSE, really.

ori_b an hour ago | parent | prev | next [-]

Typically, if you were writing your hypothetical sql client in rc shell, you'd implement an interface that looks something like:

    <>/mnt/sql/clone{
        echo 'SELECT * from ...' >[1=0]
        cat /mnt/sql/^`{read}^/data # or awk, or whatever
    }
This is also roughly how webfs works. Making network connections from the shell follows the same pattern. So, for that matter, does making network connections from C, just the file descriptor management is in C.
GrowingSideways an hour ago | parent | prev [-]

In addition to the sibling comment, you might also consider simply not using the APIs or SQL queries to begin with. Many people have entire careers without touching either.