Giter Site home page Giter Site logo

ClojureScript support? about puget HOT 18 OPEN

greglook avatar greglook commented on July 17, 2024 3
ClojureScript support?

from puget.

Comments (18)

venantius avatar venantius commented on July 17, 2024 5

Nothing blocking it other than time. I've made a bunch of progress since the last comment on this issue, but I haven't had a chance to drag it over the line. I'd say the current status is about 80% done.

from puget.

roman01la avatar roman01la commented on July 17, 2024 4

Hello. What's left to do here? Would be nice to finally finish this :)

from puget.

venantius avatar venantius commented on July 17, 2024 1

I am going to begin work on this.

from puget.

greglook avatar greglook commented on July 17, 2024

Unfortunately Puget is not yet cross-compiled to ClojureScript. As of the 0.9.x series its main dependency (fipp) is cross-compiled though, so in theory this should be doable. I haven't worked a lot in cljs though, so if you have any suggestions I'm all ears.

Mainly I think this would involve making most of the files .cljc and then adding reader conditionals around the Java-specific parts.

from puget.

arichiardi avatar arichiardi commented on July 17, 2024

Yep, are there a lot of Java specific calls? I guess I can have a look at the code and try to contribute 😉

EDIT: I changed the name of the issue.

I see a lot of Java fiddling here and here.

from puget.

piecyk avatar piecyk commented on July 17, 2024

👍 for this, also will have a look, regarding the java-handlers i think we can drop it for cljs will try to have something working.

from puget.

arichiardi avatar arichiardi commented on July 17, 2024

yep agree, putting here as reference http://dev.clojure.org/display/design/Reader+Conditionals

from puget.

greglook avatar greglook commented on July 17, 2024

Yeah, some thoughts:

  • We can drop dispatch/symbolic-reader since it's not very useful standalone.
  • dispatch/inheritance-lookup is going to need to be reworked, but would be nice if the contract held across both clj and cljs. Now that I think about it, I don't even know how inheritance works in cljs. 😞
  • The mvxcvi/arrangement library will need to be ported as well, but shouldn't be too hard.
  • Calculating the sys-id and class name for unknown rendering is currently Java-specific.
  • As pointed out, the java-handlers need to be dropped. We should support the #inst tag for js Dates though.
  • Similarly, the clojure-handlers and clojure-interface-handlers will probably need to be reworked a bit.

from puget.

arichiardi avatar arichiardi commented on July 17, 2024

Yes I notice arrangement, but as you said, there are a few lines of code to change in there. I am more curious about sys-id, what is the purpose? Skimming the code it looks like you're using it as id string in the span creation. It looks that in that when you check it against the class name...is it used for uniquely identify an instance?

from puget.

greglook avatar greglook commented on July 17, 2024

The sys-id used to differentiate otherwise-identical instances of the same class. For Clojure's persistent collections and other EDN primitives, this is not necessary since they support value-based equality. However, if you want to tell two instances of ByteArrayInputStream (for example) from each other, you need to use the system-level hash-code. Hence the use in the unknown formatter.

The package.foo.Bar@123abc format is used by Java as the default toString implementation, so the formatter checks that it's not going to print the same thing twice in case the object doesn't implement a custom string format.

from puget.

arichiardi avatar arichiardi commented on July 17, 2024

Yes I suspected that.

from puget.

arichiardi avatar arichiardi commented on July 17, 2024

@venantius great! Feel free to ping me here or on Slack for testing!

from puget.

greglook avatar greglook commented on July 17, 2024

Cool, I've just started picking up Clojurescript myself! I've experimented a bit with cross-compiling in alphabase and it's pretty nice so far.

from puget.

venantius avatar venantius commented on July 17, 2024

Reference WIP PR here: #30

from puget.

worrel avatar worrel commented on July 17, 2024

hey, any movement on the CLJS support? looks like the upstream PR in clj-arrangement was merged, anything blocking this?

from puget.

piotr-yuxuan avatar piotr-yuxuan commented on July 17, 2024

Hello, just looking for some news, what's up on that issue? If you don't have time to finish it, do you think you could still write what's left for others to try to help you?

from puget.

venantius avatar venantius commented on July 17, 2024

There's been no progress. Anyone interested in picking this up should refer to the WIP PR referenced above for Puget, or could take a look at the syntax-highlighting engine for Planck and work on it from that angle.

from puget.

holyjak avatar holyjak commented on July 17, 2024

@venantius Could you be so kind and describe what is it that needs to be done, i.e. what are the main problems that need to be solved? It is not very clear to me from the PR (the comments there are too low-level for me) or from the " look at the syntax-highlighting engine for Planck and work on it from that angle". I think it would be very helpful to provide a clear description of the task (and the work done so far) so that somebody can pick it up. Thank you!

from puget.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.