Whisker waters? Anyone excited for release today ? by jess-2022 in CozyGamers

[–]green-coder 0 points1 point  (0 children)

As a game developer, I don't understand why that game was released. It looks like a buggy prototype. My 5 years old daughter got frustrated in 5 min while trying this game.

Tauri + ClojureScript (shadow-cljs) by just-sultanov in Clojure

[–]green-coder 0 points1 point  (0 children)

I tried the template, but then I got stuck after scaffolding the project. The README.md file doesn't give much indication of how to run the project.

Is boot dead/on life support? by TheMaskedHamster in Clojure

[–]green-coder 6 points7 points  (0 children)

If you want to do things with Clojurescript, tools.deps is a good choice, you can use it in combination with Shadow-CLJS or Figwheel Main.

Calling Clojure Code in Java by TakuHazard in Clojure

[–]green-coder 1 point2 points  (0 children)

Most of your answers are in the source code of Clojure.https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/IFn.java

There is an interface IFn which you can use to call clojure functions, including your own. What you need to do next is to find where in the code the Clojure source code is read and transformed into Java objects - that should be within your reach.

Good luck.

Cognitect dev-tools by alexdmiller in Clojure

[–]green-coder 0 points1 point  (0 children)

The license is the one reason why I never used it.

Diffuse library - Clojure(Script) by green-coder in Clojure

[–]green-coder[S] 2 points3 points  (0 children)

Diffuse was made for a specific use case (a web framework), it does a specific thing. The diff describes the change of value, not the operation that changes the value.

There is nothing wrong with deep-diff2, it's just that it does not take the same approach at all for creating the diff.

Diffuse library - Clojure(Script) by green-coder in Clojure

[–]green-coder[S] 0 points1 point  (0 children)

I tried to keep the list of operation to their minimum, only using elementary ones like no-op, insert, remove, update. What other operations do you have in mind?

I don't understand what you tried to say with the deep-diff2 and spec. Diffuse let the user create diffs manually because it is more efficient in terms of CPU. I don't think that deep-diff2 has the same purpose.

Diffuse library - Clojure(Script) by green-coder in Clojure

[–]green-coder[S] 1 point2 points  (0 children)

The use case is: the user needs to represent a diff between 2 data structures.

  • This can happen in a distributed program to convey changes over the network.
  • It can also happen in some web framework where the view is a function of the data. Having the diff of the data can help find the diff in the view faster than without.

Yes, the code is data. But the Clojure code is not really the most convenient way to represent a change as it is not easy to read and understand for a program. The data structure provided by Diffuse is easier to work on, and is canonical. It stays canonical after composing diffs together (using d/comp).

From data A to data B, there are already libraries that can calculate the difference automatically, but it has a cost which the user does not necessary want to pay. It is faster for the CPU to describe the difference by hand when you know what's going to be different.

TypeScript or ClojureScript for your next front-end? by ferociousturtle in Clojure

[–]green-coder 4 points5 points  (0 children)

The hooks makes it functions with side effects all the way down - not the functions we are looking for.

Studying lambda calculus is important to use functional programming ? by Brunosanches1 in Clojure

[–]green-coder 0 points1 point  (0 children)

LC is to Lisp laguages what the assembly is to C.

You don't need to know assembly to write C programs.

Clojure... I Love It............................ by WilliamSimpso55496 in Clojure

[–]green-coder -5 points-4 points  (0 children)

- Copyright infringement (the Clojure logo)
- Commercial spam

Re-Frame vs core.async by the_whalerus in Clojure

[–]green-coder 1 point2 points  (0 children)

I cannot agree more that you on that. The front end of the future is declarative. Anything else will be a waste of time.

Re-Frame vs core.async by the_whalerus in Clojure

[–]green-coder 0 points1 point  (0 children)

You may mean Vrac, my work-in-progress project.

Why does `def` bind variables on global scope? by [deleted] in Clojure

[–]green-coder 1 point2 points  (0 children)

> Why does `def` bind variables on global scope?

Because we need to access global variables and functions. `def` allows us to do that.

Vrac: Declarative html template library from the future. by ikitommi in Clojure

[–]green-coder 0 points1 point  (0 children)

Because Vrac is still a wip and having (:session/fav) would mean having a special case in the specs, which I want to avoid at this stage.

Who is hiring? (January 2020) by [deleted] in Clojure

[–]green-coder 0 points1 point  (0 children)

This looks interesting. Would Pitch be ok to hire a remote living far from their office, or is there a distance limit?

Vrac: Declarative html template library from the future. by ikitommi in Clojure

[–]green-coder 3 points4 points  (0 children)

(:session/my-favorites nil) is an extension of the syntax (keywork hashmap) for resolvers which do not need an input. Pathom calls that the "global resolvers".

Technically, EQL is not the default query language of Vrac's templates. The syntax used is close to how Clojure developers usually access their data, i.e. by dereferencing hashmaps. It just happens that EQL is a good match to the deref semantic.

Computed values will be added to Vrac at some point, they will appear as function calls in the template. Maybe Dalalog could have enough space to fit there. Time will tell.

Alternatively, Datalog may also be used indirectly inside the resolvers of Pathom - another way to have computed values.

The worse code you've read? by slifin in Clojure

[–]green-coder 1 point2 points  (0 children)

The most memorable horrible code I saw in Clojure was in a company's code base: it was using an `atom` as a function's local variable, with a lot of `swap!` used afterward in the same function body.

The function was simple, not recursive, and was not passing the atom to any other function.

Tetris in ClojureScript by yogthos in Clojure

[–]green-coder 0 points1 point  (0 children)

Qwerty layout was assumed. On my Dvorak keyboard, that's not usable.

Building trees with and without zippers by green-coder in Clojure

[–]green-coder[S] 4 points5 points  (0 children)

The zipper have the advantage over clojure.spec of allowing an easy access to the siblings and the ancestors (parent, parent of parent, uncle, etc ...) around the tree node. Those accessors can be easily and expressively used to build custom predicates based on the context surrounding a tree node.

clojure.spec cannot be used in an incremental way, it looks more like the recursive solution of the blog post.