This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
as a beginner to cljs is https://book.fulcrologic.com/ a good book? I haven't done frontend development professionally. I know the basics of HTML, CSS and JS. And I am learning cljs but just making sure if I am doing this right : learn cljs -> learn fulcro
I would say Fulcro is a lot if you are new to ClojureScript. Whatβs your learning goal? Do you already know Clojure?
I've worked with functional languages and I like the concept of immutable data types and functions as data. My past experience has mostly been in ocaml, rust, coq, purescript and a bit of react not much but I know the hang of it. Have also done a fair amount of python and bash scripting (I dislike bash and still did it for a year) I am trying to learn clojurescript specifically because I want to built something visual and animated (using quil ofc). I tried rescript but I think the JS-FFI is not something I understand, although I am still trying and there aren't much resources now, at least compared to cljs. Clojurescript has a mature ecosystem and there is a lot of attention to design of programs. I have also used and liked racket but I haven't coded much in it because of an irrational fear of looking like I am using a lot of "theoretical" languages and not real world languages. Also JS was supposed to be a lisp so I want to try and learn lisp for frontend development. Lastly for my overshare (π ) I would say I have not built something that I am proud of because I never enjoyed it. I am unemployed right now so I thought what the hell!! Anyway so that's my learning goal.
And I am learning clojurescript using the book : https://www.learn-clojurescript.com/
Also getting a job is easier for frontend devs. I just need to showcase what I can do (which I don't know yet)
I was interested in formal verification (although I have no official education in it) but the market for that is very slim if you don't have a phd. So I thought "let's be employable"
> Also getting a job is easier for frontend devs. I just need to showcase what I can do (which I don't know yet) not implying that the job is easy just that there is a market for frontend development and not proof engineering (in India afaik)
I agree that Fulcro is a heavy first lift. re-frame
offers an easier lift, execellent doc, lots of community support, and lots of jobs. https://github.com/day8/re-frame
Thanks @U0PUGPSFR I will checkout re-frame! π
np @U047KCSP20P! I should mention that another candidate is Helix (https://github.com/lilactown/helix) but you did not mention React in your skillset. Consider that if you know React.
And I have a pure HTML/CSS library mxWeb
(https://github.com/kennytilton/matrix/tree/main/cljc/mxweb) but that lacks the doc and cimmunity of re-frame. A walkthrough: https://github.com/kennytilton/mxtodomvc
I did start on a learning path for that (https://github.com/kennytilton/mxweb-trainer) but got side-tracked by ClojureDart! π Starting again on the trainer and would be happy to coach you through that.
Happy Lisping!
Thanks @U0PUGPSFR I'll checkout mxweb-trainer seems like something I can learn by doing and I like that approach
Also I did some react so I'll checkout Helix
"I can learn by doing and I like that approach" Right! I hate just reading about a library. But I stopped working on that when ClojureDart was released and spent months on https://github.com/kennytilton/flutter-mx. Now I am trying to decide if I should switch the trainer to CLJD/Flutter or continue with the Web version. What would your vote be?
I have never used flutter so I cannot comment on that π but I am sure a lot more experienced folks can tell
FYI, @U047KCSP20P, I am switching to Flutter/MX for my next tutorial/trainer. Btw, I was mistaken, you did mention "a bit of React". I think Helix will be the easiest on-ramp for CLJS UI programming for you. That or re-frame. Check them out and see what feels right?
Thanks a lot @U0PUGPSFR that was really helpful advice!!
;; Hi!
;;
;; I have a list of pages. I want to generate links back and forward where
;; applicable. Is there a function that does something similar to this?
(defn smaller-sequences [coll n])
;; such that I can do something like
(->> (smaller-sequences [1 2 3 4] 3)
(map (fn [[a b c]]
{:prev a
:curr b
:next c})))
;; =>
[{:prev nil :curr 1 :next 2}
{:prev 1 :curr 2 :next 3}
{:prev 2 :curr 3 :next 4}
{:prev 3 :curr 4 :next nil}]
;; ?
I think perhaps partition https://stackoverflow.com/questions/1427894/sliding-window-over-seq
(let [numbers '(1 2 3 4 5)]
(map (fn [prev curr next] {:prev prev :curr curr :next next})
(conj (butlast numbers) nil)
numbers
(concat (rest numbers) '(nil))))
For the record, partition worked great :) Here's the resulting code:
(def slides
(let [indexes (partition 3 1 (concat [nil] (range (count slides-raw)) [nil]))]
(mapv (fn [[prev current next] slide]
(cond-> slide
true (assoc :i current)
prev (assoc :prev {:i prev})
next (assoc :next {:i next})))
indexes
slides-raw)))