by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 01 16:39
    yairchu commented #111
  • May 01 16:17
    danra edited #111
  • May 01 16:17
    danra opened #111
  • Apr 24 17:55

    yairchu on master

    Fix animation of list evaluatio… (compare)

  • Apr 24 14:01

    yairchu on master

    Oops caching sugar broke switch… (compare)

  • Apr 24 12:57

    yairchu on master

    calculate completions in monad … (compare)

  • Apr 23 17:03

    yairchu on master

    Control.Monad.Once: Execute act… Sugaring result is cached Towa… (compare)

  • Apr 23 16:48

    yairchu on wip-cache

    Control.Monad.Once: Execute act… wip (compare)

  • Apr 23 15:44

    yairchu on wip-cache

    Control.Monad.Once: Execute act… wip (compare)

  • Apr 23 15:39

    yairchu on wip-cache

    wip (compare)

  • Apr 23 14:00

    yairchu on wip-cache

    Control.Monad.Once: Execute act… wip (compare)

  • Apr 23 13:56

    yairchu on master

    inline expr (compare)

  • Apr 23 12:07

    yairchu on master

    GUIMain.make gets mkWorkArea pa… (compare)

  • Apr 23 11:15

    yairchu on wip-cache

    Control.Monad.Once: Execute act… wip (compare)

  • Apr 23 10:17

    yairchu on master

    inline function with bad name … minor cleanups (compare)

  • Apr 23 09:37

    yairchu on wip-cache

    Control.Monad.Once: Execute act… wip (compare)

  • Apr 23 09:20

    yairchu on master

    CodeEdit gets the sugared worka… (compare)

  • Apr 23 09:02

    yairchu on wip-cache

    Control.Monad.Once: Execute act… wip (compare)

  • Apr 22 09:26

    yairchu on wip-cache

    Control.Monad.Once: Execute act… wip (compare)

  • Apr 21 22:10

    yairchu on master

    sugarWorkArea does sugaring wor… (compare)

Eyal Lotem
@Peaker
(all do not have contradicting connotations)
Eyal Lotem
@Peaker
Minghao Liu
@molikto
I am working on a dependently typed language, and I think proof assistants is in a position that structual editor is ideal for and much needed, because mathematicians love their LaTeX symbols. As I think more and more about structural editors, I think the semantics of it should be seperated from syntax. so no "semantically bug-free editing", but only that it creates a AST that is type-correct (ast's type in host language). I looked into MPS and found it has very good architecture, but I don't like the way it handles semantics. I think a structural editor framework should be more like language server and only handles editing and presentation.
does this sounds reasonable to you? another structual editor framework?
Minghao Liu
@molikto
https://www.youtube.com/watch?v=viF1bVTOO6k&feature=youtu.be this videos applies so much for proof assistants, they usually needs to show the context (type of holes) and also they usually has a open-term evaluator (evaluation with type errors)
Yair Chuchem
@yairchu

Hi! I definitely agree that structural editors and rich IDEs are very suitable for proof assistants, and making a framework for those is certainly useful. But that's a pretty grand task and our focus in Lamdu for now is creating a single language and environment.

Where we can we try to apply good software engineering principles so we try to make our components as re-usable as we can and hopefully other folks could re-use them for other environments :)

Minghao Liu
@molikto
I am not sure I am up to such an endeavour yet. as a dependent typed language is already a huge one. what's the hardest part (parts) of the GUI side of lamdu?
Yair Chuchem
@yairchu
Part of our endeavour is that we needed to create a custom UI library for our needs (which are keyboard based editing of rich structures with responsive layout and animations), and coming up with the right design and implementing the UI framework was pretty difficult. The UI library is re-usable btw an we plan to take it out from the Lamdu repo to a standalone library
Minghao Liu
@molikto
what about automate layouting? I just tried with Lamdu and it seems it cannot handle a long expression of 1 + 1... + 1..
Yair Chuchem
@yairchu
what do you mean by "cannot handle"? perhaps you mean you don't like the way it handles it?
The way it "is supposed to work" is that it will start laying out the top-level AST nodes vertically so you'll have a lot of
"""
1
+
1
+
1+1+1+1+1...
"""
stuff going on.
Minghao Liu
@molikto
yes. this is not what I expected because in a text editor it softwrap, but again if you are thinking in ASTs what Lamdu do is reasonable.
Yair Chuchem
@yairchu
Yeah, 1+1+1+1+1 is sort of an edge case but the results we get for typical ASTs are quite satisfactory imho
Minghao Liu
@molikto
I am reading the paper "A New Approach to Optimal Code Formatting" and want to see if it fits a projectional editor, but I found that algorithm very cool
Yair Chuchem
@yairchu
Sound interesting I'll have a look at it
Minghao Liu
@molikto
I asked around and found out the paper I mentioned has a "horizontal compose" operator, and I don't really need this. A simpler one is "wadler's prettier printer," which doesn't have the horizontal compose, and is quite simple and clean. But I think they doesn't quite applies to Lamdu, as it has mixed vertical expression inside horizontal ones.
I haven't decided if I want inline vertical expressions, but I think I tend to make things as close to textual as possible.
Yair Chuchem
@yairchu
Btw one reason not to go very fancy in an editor's auto layout is that you don't want things to change too much when the users are making edits
Eyal Lotem
@Peaker

In other words: for Lamdu, the optimal layout may not be ideal - as it may be chaotic: change too much between small incremental edits.

Also: Wadler's pretty printer, IIRC, prefers to split vertically as late as possible, so you get lots of tiny trees hanging at the end of a horizontal line.
We prefer the opposite: split vertically as early as possible (in the outer-most expression), and have the lower levels of the AST fit together horizontally in lines.

Minghao Liu
@molikto
thanks!
Minghao Liu
@molikto
7B2C161CB9CD7DA7497DBACC07B29637.png
I've started a little bit with the project, it supports a generic syntax for specifying grammars. here it's the own grammar specified in it's own grammar... it has auto-layout. but I think I have some design problems reguarding baseline alignment when expressions have different hight
I don't know if anyone interested in collaborating on this project...
Yair Chuchem
@yairchu
@molikto if you want to reach a wider structural editing audience you can try in https://www.reddit.com/r/nosyntax/
Minghao Liu
@molikto
Thanks!
Janus Troelsen
@ysangkok
@yairchu is it possible to define your own types in lamdu now?
Vladimir Gordeev
@vladimir-vg
Hey everyone! Do I understand correctly that Lamdu stores source code as structured data, in database?
Yair Chuchem
@yairchu
@vladimir-vg Yes
@ysangkok sorry for the late reply, I missed the notification. Unfortunately we haven't yet implemented editing of nominal types. Did a lot of prep to it so it will come :) You can still import them via a json file and can still of course use structural types