7
lopu
4y

Don't you guys think we need live programming?

Like a development runtime, instead of doing this whole file based development thing? We edit files, and then run them, why aren't we just running a program constantly and editing it as it runs? It would let us inherently take advantage of concepts like objects and lists instead of having to build plugins that analyse and modify our files to sort of act like complex programming data structures.

If we just programmed using these complex data structures to begin with.

Like do you realise how antiquated the idea of a file is, and folder, that's literally a paper based analogy.

Imagine if we just had objects, with pointers and property names, the best we have is ln -s file1 file2 but that's not a real pointer.

Anyway, hope someone understands me!

I'm writing a medium article called a world beyond files but I'm stuck at how low level to go and who the audience of the article should be.

I went really in depth into what this idea of an "object" is, and how it can be expressed in a file but once a program picks it up it becomes much more and almost alive.

Comments
  • 0
    Sure it is, a symlink is pretty much the exact FS-equivalent of a pointer.
    Its stores the location of other data, without knowing anything about the nature or even existence of said data.

    I'd guess you don't know C/CPP, but that's how pointers work on the lower level and symlinks are pretty fucking good analogy for them.

    I guess what you mean are reference types.
    Autodereferencing pointers to the actual data.
    Hardlinks share some of the aspects of ref-counted reference types.
  • 0
    @metamourge ok you're right, and I had never heard of hardlinks so thank you! But it looks like they don't work for directories :') still interesting but it's also a point as to why an active runtime using all the concepts in a programming language would have its advantages
  • 2
    I think erlang has something similar where you can replace code live during runtime.

    It was designed for use in phone switch boards that could be upgraded without downtime.
  • 0
    @lopu hardlinks to directories don't work to prevent file system loops.
  • 0
    @metamourge can you think of an equivalent to hardlinks of a cow filesystem?
  • 0
    @Voxera ohhhh wow interesting I just read into it a little bit. I mean we do have the whole webpack hot reload thing but that still works from files but I'm sure it could be modified, I've never looked into how webpack hot reloading works.

    What I really mean though is we need an interface for doing this, where we browse and edit object hierarchies and functions directly instead of modifying files.

    @Shiggy well in JavaScript you have objects where you can say object.property = object

    Not quite sure what you mean though?
  • 0
    @lopu if in a hierarchy of /mnt/a/b/ you hardlink /mnt/a/b/a to /mnt/a you have a loop in your filesystem. The files /mnt/a/b/file.dat and /mnt/a/b/a/b/file.dat should now be the same, but haff different links and such are different files, despite having the same hardlink destination on the drive.
    Additionally, if you delete the hardlink to /mnt/a you have a loop with existing hardlinks which you can't access again. Still, it is not free memory, since each file/folder is hardlinked by at least another folder.
  • 0
    Lisp has had this feature for years.
  • 0
    @lopu like @voxera pointed out elixir/erlang/beam can basically do that already and such a program could probably be made in that using its outstanding metaprogramming abilities
  • 1
    @matt-jd exactly. In erlang you can interact with the runtime and even replace methods in memory.
    Any processes started using the old definition will complete using that but any new invocations will use the new version.

    This was intended so that you could patch a running switchboard without dropping ongoing calls.
  • 0
    @matt-jd @Voxera wow that's cool, thanks for the history! :)

    Do you know if anyone made GUI's for doing this more easily? Because I imagine it was done through cli or scripts?
  • 0
    @lopu the beam environment doesn't really have any gui tools but you could use phoenix for some kind of local host Web-thing read a blog post about this a few months ago
Add Comment