Hacker Newsnew | past | comments | ask | show | jobs | submit | nightwolf's commentslogin

If you do end up trying it out and hit any roadblocks, please don't hesitate to file an issue. I'd be very interested in hearing how it goes!


This is fantastic, thank you for making and sharing it?

Is there any chance of Heynote supporting Clojure syntax one day?


clojure.spec is explicitly not a type system:

https://clojure.org/about/spec#_expressivity_proof




Happy to see both my favorite editor and my favorite programming language hit the front page of Hacker News! FWIW, I responded to some of the points regarding Tutkain over at reddit[1].

[1] https://www.reddit.com/r/Clojure/comments/rflhxf/comment/hoi...


Do you mean Fogus, or have I missed something?


Yeah sorry; that would have been interesting, but fogus.


The person who mentioned using the Cursive debugger is different than the person who mentioned using the REPL.


It's not about the person, but the idea.


>the "DOM is your API" paradigm

What does that mean, exactly? Do you have any resources you could link to?


Not OP and I don't have any resources for you, but I spent a while playing around with Polymer in the very early (0.3) stages, and was one of the first internal Google customers for them.

I found that once you have web components, there's nothing stopping you from representing your entire webapp's UI in terms of semantic elements only. For example, a HN comment thread could look something like this:

  <hn-thread 
     title="Ask HN: What are the cons of Google Polymer?"
     votes="47"
     comments="46"
     posted="20160509T12:12:00">
    <hn-comment author="sshumaker" posted="20160509T14:12:00">
      Disclaimer: I led development of gaming.youtube.com...
      <hn-comment author="justjco" posted="20160509T14:40:00">
        I found you don't really need Redux if you follow the "DOM is your API" paradigm....
        <hn-comment ...></hn-comment>
      </hn-comment>
      <hn-comment author="torgoguys" posted="20160509T14:56:00">
       You answered the question asked, but I'm also curious as to what you liked about it for that project.
      </hn-comment>
    </hn-comment>
  </hn-thread>
All of the details about how to present a <hn-thread> or <hn-comment> are encapsulated in the definition of the custom element, and you only specify the data that changes between each one. Similarly, you could define methods on <hn-comment> that pop up a comment box when you hit "reply", for example, and this also drops out of the light DOM tree.

When you do it this way, your DOM becomes basically isomorphic to what you would write in your Redux state or send in a JSON response. You could, in fact, write a trivial helper to convert between JSON and DOM, but there isn't really a need when you could just send HTML down the wire.


This sounds quite a lot to React components. Cool to see different technologies agree on the benefits of componentized UI!

That said I believe Redux is not so much about representing the state tree as it is about making its mutations centralized and predictable (the same actions, replayed, will always produce the same state). While a componentized tree often helps ensure this, it is less of a case when the state shape itself doesn’t neatly match the rendered component tree. This is the use case where Redux, in my opinion, offers some options.


Yeah, it is quite a lot like React components. Polymer and React actually came out around the same time (early 2013), but Polymer spent forever in development and only recently reached 1.0, so React got a lot of the developer momentum.

If you're doing webcomponents right (i.e. adhering to the Law of Demeter, not handing out references to internal shadow/shady-DOM nodes, defining an API for possible child components), then you naturally get centralized & predictable mutations as well. The methods & child nodes of a top-level component become the API by which events can mutate the page, and then any state changes propagate down to the leaves of the component tree only via well-defined APIs.


I really can't wait till more people figure this out. Using html for documents again is going to be very powerful and freeing for those who adopt it.


I see now, many thanks for the informative reply!


> > the "DOM is your API" paradigm

> What does that mean, exactly? Do you have any resources you could link to?

Check out the "Thinking in Polymer" talk from Polymer Summit 2015: https://www.youtube.com/watch?v=ZDjiUmx51y8

Specifically talks about "the DOM is your API" at 0:49 --> https://youtu.be/ZDjiUmx51y8?t=50

disclaimer: technical writer for polymer


The variable isn't mutated, actually — it's rebound. See http://natescottwest.com/elixir-for-rubyists-part-2/, for example.


Yes it is. x is the variable. It changed from 1 to 2. Mutation is a synonym for change. Try it yourself in the interpreter! So data is immutable, but variables are mutable in Elixir.


But if you passed that first x to a process, it would still be 1 even after you ran `x = 2`.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: