Live data from Hacker News

Cirru – An editor for AST

cirru.org

21–30 of 53 posts

Re: Cirru – An editor for AST

#21

What I want is for the editor to be aware of the semantics of the language and offer me language-unique tools to edit code, also to generate and work on macros, in the language it's editing , or at least one that is close enough to it I don't have to switch gears in order to get a tough task done. Otherwise it really doesn't improve on a text editor. All of these things would require a ton of work, so I stick with Su…

Have you looked at the likes of MPS from Jetbrains? https://www.jetbrains.com/mps/?fromMenu

It lets you build a language and an editor that forces you to follow the syntax and semantics of your language. Pro tip: Your language can be based on java :)

Re: Cirru – An editor for AST

#22

I find myself wanting to edit the textual version of the AST itself, as the tree interface seems too cryptic edit: I'm guessing its probably a bug that is confusing me the most, as I'm getting both a inline tree and a indented tree at the same time for a node

Author here. Try http://text.cirru.org see if it fits your mind. I guess people always hate news things that breaking others. Me too....

That does feel a lot clearer

I guess my main thing is I don't know if I should trust my understanding of the tree display or not

Perhaps, as a sort-of training assistant, have the resulting "code" optionally appear beside the editor?

e.g. https://i.imgur.com/92stVmi.png

(I also noticed that you are looking for TCO for python, In some cases Coconut can do TCO, and can compile to python, but its somewhat of an unweildly tool to use

http://coconut.readthedocs.io/en/v1.2.2/DOCS.html#function-d... )

Re: Cirru – An editor for AST

#24
Reminds me of

http://www.lamdu.org/

while trying to remember the name I discovered:

https://www.facebook.com/notes/kent-beck/prune-a-code-editor...

http://jetbrains.com/mps

https://github.com/cxxtree/cxxtree

http://www.greenfoot.org/frames/

http://unisonweb.org/

https://github.com/chrisdone/structured-haskell-mode

https://www.emacswiki.org/emacs/ParEdit

https://github.com/projectured/projectured

Re: Cirru – An editor for AST

#25

Earlier quoted context omitted.

Author here. Try http://text.cirru.org see if it fits your mind. I guess people always hate news things that breaking others. Me too....

That does feel a lot clearer I guess my main thing is I don't know if I should trust my understanding of the tree display or not Perhaps, as a sort-of training assistant, have the resulting "code" optionally appear beside the editor? e.g. https://i.imgur.com/92stVmi.png (I also noticed that you are looking for TCO for python, In some cases Coconut can do TCO, and can compile to python, but its somewhat of an unweildl…

I agree. I'm just too lazy to add that. Actually on http://cirru.org/ there's a button named "Show me data". By clicking at the button you get the data in vectors, which is almost the thing you shown in the png. Personally I'm already familiar enough to read AST from the UI with nothing like assistant.

I think reading by a JavaScript programmer, TCO is "Tail Call Optimization".

Re: Cirru – An editor for AST

#27
post #24

Reminds me of http://www.lamdu.org/ while trying to remember the name I discovered: https://www.facebook.com/notes/kent-beck/prune-a-code-editor... http://jetbrains.com/mps https://github.com/cxxtree/cxxtree http://www.greenfoot.org/frames/ http://unisonweb.org/ https://github.com/chrisdone/structured-haskell-mode https://www.emacswiki.org/emacs/ParEdit https://github.com/projectured/projectured

Awesome!

You may also add these projects:

https://github.com/shaunlebron/parinfer https://github.com/prettier/prettier

They are fixing the same problem Cirru Project was trying to solve, just in a more practical way.

Re: Cirru – An editor for AST

#28
I don't want to be a downer, but the visual presentation is awful, I could not work with the nesting direction changing all the time.

If there were a good language-specific pretty printer, and it looked like regular text in the language, I could probably stomach it.

Re: Cirru – An editor for AST

#29

What I want is for the editor to be aware of the semantics of the language and offer me language-unique tools to edit code, also to generate and work on macros, in the language it's editing , or at least one that is close enough to it I don't have to switch gears in order to get a tough task done. Otherwise it really doesn't improve on a text editor. All of these things would require a ton of work, so I stick with Su…

Author here. Your are right. Graphical editor is just a favor of myself and happened to make implementing this features easier. If you are skilled enough to parser code in text and build a tree underneath, it's definitely the same result that you got smart IDE that helps write code faster. BTW, I don't know much about building IDEs, so I won't analyze code by myself and let the editor recognize the code. Could be ver…

Have you tried VSCODE, their open language server protocol means that most popular languages have code completion, refactoring, code lens and debugging support.

It's totally free and open source. I was a hard core JetBrains user but vscode has been amazing. They even got minimap like sublime in last release.

Every month they move at an amazing velocity working on features devs ask for. I feel it's the modern democratic IDE

Re: Cirru – An editor for AST

#30
post #29

Earlier quoted context omitted.

Author here. Your are right. Graphical editor is just a favor of myself and happened to make implementing this features easier. If you are skilled enough to parser code in text and build a tree underneath, it's definitely the same result that you got smart IDE that helps write code faster. BTW, I don't know much about building IDEs, so I won't analyze code by myself and let the editor recognize the code. Could be ver…

Have you tried VSCODE, their open language server protocol means that most popular languages have code completion, refactoring, code lens and debugging support. It's totally free and open source. I was a hard core JetBrains user but vscode has been amazing. They even got minimap like sublime in last release. Every month they move at an amazing velocity working on features devs ask for. I feel it's the modern democrat…

No. But I have a friend who writes in C# and he showed me quite some tips on VS Code. I know it's very smart and IDE understands code in semantics, that can be a lot better than Stack Editor that only recognize the structure. I will keep an eye on that.
Post reply on HN