Fork me on GitHub
#parinfer
<
2017-06-20
>
mikeb02:06:03

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.

shaunlebron02:06:53

@mikeb i like that idea

shaunlebron02:06:44

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

shaunlebron02:06:32

was abandoned pretty quickly if I remember correctly

mikeb02:06:41

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.

cfleming02:06:05

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.

cfleming02:06:23

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

shaunlebron02:06:01

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

cfleming02:06:45

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.

cfleming02:06:15

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

mikeb02:06:41

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.

cfleming02:06:45

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.

mikeb02:06:56

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

cfleming02:06:19

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

mikeb02:06:37

@cfleming would love to hear what you find

shaunlebron02:06:54

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

cfleming02:06:44

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

shaunlebron02:06:46

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

cfleming02:06:12

This looks like the VStudio implementation:

shaunlebron02:06:15

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

mikeb02:06:33

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.

shaunlebron02:06:18

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

cfleming03:06:12

@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.

cfleming03:06:38

And some things like the collapsible REPL results too.

cfleming03:06:41

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

shaunlebron03:06:41

@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

shaunlebron03:06:52

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

shaunlebron03:06:59

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

cfleming03:06:47

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.

cfleming03:06:56

It’s a massive amount of work.

shaunlebron03:06:53

I can imagine

shaunlebron03:06:31

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

shaunlebron03:06:34

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

shaunlebron03:06:15

demo editor is updated here for trying out behavior differences: http://shaunlebron.github.io/parinfer/demo

mikeb03:06:31

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. https://s3-us-west-2.amazonaws.com/language-ideas/ide/space.html 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.

cfleming03:06:06

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

cfleming03:06:50

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?

cfleming03:06:15

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

cfleming03:06:33

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

mikeb05:06:47

Shaun, that's some amazing work on v2.

shaunlebron17:06:49

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

shaunlebron22:06:18

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: https://www.reddit.com/r/Clojure/comments/6ibyhr/parinfer_why_v2_is_different/