Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please put up a video #14

Closed
zcaudate opened this issue Sep 3, 2018 · 14 comments
Closed

please put up a video #14

zcaudate opened this issue Sep 3, 2018 · 14 comments

Comments

@zcaudate
Copy link

zcaudate commented Sep 3, 2018

I'm really curious about calcit/respo and the workflow that you have built.

I'm hoping you can put out a video. It would help the understanding of some of the motivations why this has been built from the ground up. Something like the series Brian Marick did for midje - https://vimeo.com/19404746 would be amazing.

@tiye
Copy link
Member

tiye commented Sep 3, 2018

Don't have enough time for a video yet. Maybe you can try my old one, which is partly related to this repo. https://www.youtube.com/user/jiyinyiyong/videos?view_as=subscriber

@zcaudate
Copy link
Author

zcaudate commented Sep 3, 2018 via email

@zcaudate
Copy link
Author

zcaudate commented Sep 3, 2018

I'm actually really curious about how you are using the editor as an emacs replacement and some of the features that are 'must haves' that emacs lacks.

@tiye
Copy link
Member

tiye commented Sep 4, 2018

No summary. They are various features I added to the editor in different periods: https://www.youtube.com/playlist?list=PLyvBXLgHYHy1AIK6i5uw3_H5BIUP4CQx6

I tried for days but never got to use Emacs. What features do you think is "must have"? I can add demos the next time I record videos.

@zcaudate
Copy link
Author

zcaudate commented Sep 4, 2018

I like emacs, but the one thing that it hasn't got is a tree view. I use textmate for that.

Calva's actually really good but feature wise... cider is really good.

However... I think the codebase is getting a bit big and it's starting to cause problems on my computer... ie. not connecting to the repl etc... and so I'm exploring other options.

@zcaudate
Copy link
Author

zcaudate commented Sep 4, 2018

the last demo for cirru is neat. It reminds me a little bit of lighttable with smalltalk style editing features. it's pretty cool.

how does eval work?

@tiye
Copy link
Member

tiye commented Sep 4, 2018

I like emacs, but the one thing that it hasn't got is a tree view. I use textmate for that.

Well, I use Sublime Text most of the time for my cljs code.

cider is really good.

I haven't used Cider, really.

how does eval work?

I can connect to a Socket REPL and send code by pressing keys. However I barely used it after added it in Calcit. Most of the time I will add the code I need to repeat running in on-reload! and it just reloads and runs.

@tiye
Copy link
Member

tiye commented Sep 4, 2018

@zcaudate
Copy link
Author

zcaudate commented Sep 4, 2018

Nice. I think I understand it a bit more. Am I right in that it can be summarised as 'an intergrated environment/dsl for building ui components'?

Some observations (I may be wrong)

  • I really like the 'code as building blocks' pattern of design
  • I really like the fact that code blocks can be isolated in a tree like structure.
  • I'm not sure how it would be used with clojure proper, especially differentiating between [], () and {} brackets
  • The lack of eval is a big problem for me, especially when working with clojure.
  • There is no output mechanism (like a repl or display) except for the final webpage (which is also a problem for me)

Some questions:

  • How efficient is the virtual dom and how does it compare to react? Are there any benchmarks?
  • can the dom be applied to javafx (something similar to https://github.com/halgari/fn-fx)

@tiye
Copy link
Member

tiye commented Sep 4, 2018

I'm not sure how it would be used with clojure proper, especially differentiating between [], () and {} brackets

If you want to know the underneath, read the code https://github.com/Cirru/sepal.clj/blob/master/polyfill/cirru_sepal/core.cljs#L141 Live demos can be found on http://cirru.org/ .

The lack of eval is a big problem for me, especially when working with clojure.

I would like to know how you use eval in your real projects. It's kind of unfamiliar to me. Most of my habits came from Webpack based workflows.

There is no output mechanism (like a repl or display) except for the final webpage (which is also a problem for me)

There are logs in shadow-cljs and Chrome Console. I've been adapted to it after debugging JavaScript for so many years.

How efficient is the virtual dom and how does it compare to react? Are there any benchmarks?

No, no benchmarks. It's definitely slower compared to React. Only faster part is Respo it built with Clojure data structures, which is immutable by default. But React can always be faster again with help of Immer or ImmutableJS combining with React.PureComponent. I observed that using Persistent Data has some cost than using JavaScript data directly. It will be slower in theory.

can the dom be applied to javafx

No. Respo DOM patches are translated to DOM operations. https://github.com/Respo/respo/blob/master/src/respo/render/patch.cljs#L84

@zcaudate
Copy link
Author

zcaudate commented Sep 4, 2018

regarding my clojure workflow, here are some video captures:

--

regarding sepl, I would recommend using a multimethod for code transform as it's more extensible

(defmulti transform-xs first)

(defmethod transform-xs "def"
  [[_ & body]]
  (assert (string? func) "[Sepal] function name should be a symbol!")
  (assert (coll? params) "[Sepal] params should be a sequence!")
  `(~'defn ~(symbol func) [~@(map transform-x params)] ~@(map transform-x body)))

etc...

Are you familiar with light table?

@tiye
Copy link
Member

tiye commented Sep 5, 2018

(defmulti transform-xs first)

Not used it before. I think I will try it really late.

Are you familiar with light table?

Tried using it for some months. I wasn't writing cljs at that time. Surprised by its cool features but never used it in my real projects.

@tiye
Copy link
Member

tiye commented Sep 5, 2018

The videos showed quite interesting features.

  • inline eval. I saw that in Light Table. It was cool. I would love to have it. Just not figuring out how to make it work well with Calcit. Another problem is I always do UI programming. Big part of them I still want the instant results in a browser.

  • auto completion. I write TypeScript at work. It's definitely something I want.

  • go to definitions in source files. Currently I can open https://clojuredocs.org/search?q=join from my editor , which is a Web page. At least there's a way to find that on GitHub.

  • Emacs key bindings. I know it's powerful. Sublime Text might have learnt some from it. However I still in fear of learning tens of key bindings.

@zcaudate
Copy link
Author

zcaudate commented Sep 5, 2018

for me, this was a wow: https://www.youtube.com/watch?v=gtXpOD6jFls and I was a huge light table fan for a long time but it never eventuated.

Yeah. I know what you mean about the bindings. I keep it simple and use the following:

  • arrow keys,
  • ctrl-arrow keys for slurping and barfing,
  • C-x-e for eval
  • C-u-x-e for inline eval.
  • C-c C-k for whole file compilation
  • Meta-. for jumping

Thanks for the info. I'll close this ticket for now. I'll most likely have some questions about the respo virtual dom as I'm currently working with javafx and am looking to implement something on top of it.

@zcaudate zcaudate closed this as completed Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants