News for hackers. Stuff that matters.
Re:Penpot, Open Source Figma alternative, raises $8M in funding by tbatchelli on Wednesday September 28, 2022 @12:39PM (#33010027)
This project is mostly ClojureScript. That's quite of an endorsement of the clojure ecosystem.
Re:Penpot, Open Source Figma alternative, raises $8M in funding by b0afc375b5 on Wednesday September 28, 2022 @01:24PM (#33010596)
I'm an experienced Vue/Nuxt developer. After trying out Typescript and Svelte, I think I want to go all in on ClojureScript.

Currently learning through an open source book right now (https://www.learn-clojurescript.com/). I was planning on paying for it after I read the book to see if it was worth it, but I paid for it halfway through.

Re:Penpot, Open Source Figma alternative, raises $8M in funding by papaver on Wednesday September 28, 2022 @06:15PM (#33013950)
absolutely love clojure and all that it's taught me. i even ported many of the core functions to python so i could continue using them.

but not a fan at all of writing html in clojurescript. it's extremely ugly to look at vs raw html/jsx. and became cumbersome really fast for me as my app grew in size... maybe there are better alternatives now, this was around 5 years ago.

using react with libraries like ramda/redux/rxjs in affect achieve the same thing but with 10x more libraries and references online.

the philosophy behind clojure will completely change how you code and visualize problems if you embrace it. honestly can't remember the last time i wrote a for loop...

Re:Penpot, Open Source Figma alternative, raises $8M in funding by thom on Thursday September 29, 2022 @01:13AM (#33016687)
I’ve done projects with enlive and quite enjoyed it. Allows a workflow where designers create pure HTML/CSS templates and you just fill in the blanks using selectors and transformations written in Clojure.

https://github.com/cgrand/enlive

Re:Penpot, Open Source Figma alternative, raises $8M in funding by stefcoetzee on Wednesday September 28, 2022 @11:59PM (#33016153)
Was it hiccup syntax that became cumbersome to write?
Re:Penpot, Open Source Figma alternative, raises $8M in funding by papaver on Thursday September 29, 2022 @10:25AM (#33021079)
yes, hiccup. small stuff is fine but when working with real apps and 100s of lines of html that make up pages... no thanks.
Re:Penpot, Open Source Figma alternative, raises $8M in funding by barrenko on Wednesday September 28, 2022 @03:19PM (#33012040)
This what all those "Clojure needs Rails" posts miss. Clojure is Rails.
Re:Penpot, Open Source Figma alternative, raises $8M in funding by yjp20 on Wednesday September 28, 2022 @02:23PM (#33011390)
Just curious - what did you not like about svelte?
Re:Penpot, Open Source Figma alternative, raises $8M in funding by b0afc375b5 on Thursday September 29, 2022 @01:10AM (#33016665)
I have a huge bias towards functional programming, one core tenet of which is immutability. When I was going through the official svelte tutorial I read this[1] paragraph:

> Note that interacting with these <input> elements will mutate the array. If you prefer to work with immutable data, you should avoid these bindings and use event handlers instead.

Which left me with the impression that svelte's functional story wouldn't be that great. Though I did still finish the tutorial.

As my first project I tried to migrate one of our static websites to svelte with sveltekit. It didn't really feel like I was doing something different than when I was using Vue3/Nuxt3, so I might as well stick with it. I understand that the technical tradeoffs are different, svelte is compiled and has no runtime after all, but the developer experience pretty much feels the same.

[1] https://svelte.dev/tutorial/each-block-bindings

Re:Penpot, Open Source Figma alternative, raises $8M in funding by swyx on Wednesday September 28, 2022 @02:04PM (#33011122)
> After trying out Typescript and Svelte, I think I want to go all in on ClojureScript.

ouchhh what a burn haha

Re:Penpot, Open Source Figma alternative, raises $8M in funding by vlovich123 on Wednesday September 28, 2022 @04:30PM (#33012855)
Can’t speak to frontend / UI things but I’ve generally found typescript a pretty easy language to implement Cloudflare R2 on top of Workers. I have no experience with ClojureScript so I can’t provide any meaningful comparison. YMMV.
Re:Penpot, Open Source Figma alternative, raises $8M in funding by axlee on Wednesday September 28, 2022 @06:36PM (#33014121)
> (ns hello-world.core (:require [goog.dom :as dom] [goog.dom.classes :as classes] [goog.events :as events]) (:import [goog Timer]))

(let [element (dom/createDom "div" "some-class" "Hello, World!")] (classes/enable element "another-class" true) (-> (dom/getDocument) .-body (dom/appendChild element)) (doto (Timer. 1000) (events/listen "tick" #(.warn js/console "still here!")) (.start)))

How is that even workable? And that's just an HTML fancy hello world.

Re:Penpot, Open Source Figma alternative, raises $8M in funding by cfiggers on Wednesday September 28, 2022 @07:04PM (#33014325)
I'm not sure I understand. What's not workable about it?
Re:Penpot, Open Source Figma alternative, raises $8M in funding by getcrunk on Wednesday September 28, 2022 @03:35PM (#33012219)
Yea what's the tldr on clojurescript
Re:Penpot, Open Source Figma alternative, raises $8M in funding by b0afc375b5 on Thursday September 29, 2022 @01:33AM (#33016808)
My tldr would be:

- simple (lisp) syntax

- immutability

- emphasis on data (collection and sequence) transformations

Also the concurrency model of ClojureScript's `core.async` is similar to Go, which is good apparently? I have not tried Go yet, but to me it looks similar to Elixir/Erlang's actor model.

NOTE have not finished the book yet.