Fork me on GitHub

Interesting discussion on literate programming. I've long thought about a language with one unit(set of one or more related functions) per file, where the docs, comments, tests, specs, etc for the unit could live side by side in a different files, then an editor could combine the desired parts to display.


@mikeb i like that idea


i think light table tried using a function as a unit that could be combined with others in different ways by the editor


was abandoned pretty quickly if I remember correctly


Yeah, I think to make it happen it needs to be a language built around the concept, where clojure is still file based, too complex for editor to break everything apart.. But if everything was broken apart, the editor could be free to display in new and different ways.


I think it could be done in Clojure, and it’s something I’ve toyed with trying. Unfortunately it’s a lot of UI work just to get to a proof of concept.


It would still use files under the hood, but you could present a function-based UI to the user.


@cfleming: excited you’re thinking about that. I’m guessing it would be difficult in intellij?


Well, it’s probably difficult in anything that’s not designed to work like that. IntelliJ’s UI is actually pretty flexible, but I’d have to talk to JetBrains about how best to do it.


I imagine there are a lot of assumptions in things like navigation that might be hard to work around.


I was also thinking you could have a function relationship view, as well as an order of execution view too. I even went so far as to create a super ugly dummy html of general idea, I will post link later when I have access to it.


I spend a huge amount of time navigating around the IntelliJ codebase figuring out how to do things. I’d love to be able to have a function relationship view (snap @mikeb) which I could save and come back to to remember how my investigation went.


I would think it's a huge and hard undertaking regardless of what base was used.


To do it right, absolutely. I’m unsure how much work it would be to get to a PoC


@cfleming would love to hear what you find


i was talking to a guy after a local meetup, and he mentioned viewing code in order of execution as well. i think he called it a call-stack view


I think Chris Granger actually worked on an implementation of the code bubbles idea for an MS debugger.


it came up because I brought up how under-utilized Atom’s technology feels to me. So much flexibility with having an editor in a DOM. I feel that would make something like a function relationship view easier in Atom than others


This looks like the VStudio implementation:


@cfleming god i want that in a VR space so I can position code around in a physical space


Shaun I was thinking exactly the same thing when watching the arcadia guys videos... then the scale of work might be more comprehensible for non developers.


@mikeb ahh yes, that’s definitely where I got that idea from I think


@shaunlebron Actually I think something like that is pretty easy in Swing too (what IntelliJ uses). But things like taking advantage of all the data visualisation libs out there like Proto-REPL does is definitely much easier.


And some things like the collapsible REPL results too.


In general, being able to easily mix quite different mediums should be easier in a web pane.


@cfleming yeah, I’m not familiar with much about desktop UIs honestly. I think the mixing of different mediums is what I’m excited about for what may come after Parinfer, and a load of other things you guys are touching on


was kind of sad to see Light Table pivot to Eve. but so many problems to solve—I guess it’s good they chose the more important one


whoever will try another next-gen editor will probably need decent financial backing. I don’t see it happening as a side project


Yes, no doubt. There’s no way I can keep up with the vast majority of what I’d like to do on Cursive, and that’s built on really significant existing infrastructure.


It’s a massive amount of work.


I can imagine


i can barely work on parinfer when working fulltime, and that’s just a simple input/output text processor


i’m out for the night, but I sat down a recorded a video summarizing my thoughts on Parinfer v2 tonight


demo editor is updated here for trying out behavior differences:


Hey @cfleming please don't laugh, but here is the very rough thought I was playing with for a function based interface with attached repl/tests/docs, created long ago. On the top function say-hi if you click the repl/docs/tests buttons at bottom they will show. I was just thinking how nice it would be to have everything relating to a single "unit of code" right there beside each other. The language is made up.


@mikeb No laughing, that’s cool! Interesting idea having the REPL available right by the function with some usages shown there.


Pharo smalltalk has a really cool doc search function where you can say: I have this data, and I’d like that data - which function will do that for me?


So if you say: I have ” foo ” and I want “foo”, the search would return str/trim


I like the code bubbles idea of having notes right there in the workspace too.


Shaun, that's some amazing work on v2.


@mikeb thank you! 😕 hope it works out, but we’ll see


this is why I worry about edge cases even when nobody is reporting them: > This is great news. I’ve stopped using parinfer because it often modifies my AST in ways I don’t expect. With these changes, I think I can start using it again. Nice work! from: