Skip to content

Instantly share code, notes, and snippets.

@dustingetz
Created June 5, 2012 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustingetz/2877043 to your computer and use it in GitHub Desktop.
Save dustingetz/2877043 to your computer and use it in GitHub Desktop.
oskarth
9:00 following lein-cljs simple tutorial. How come a clojurescript hello world is like 10k LOCs generated and is there any way to reduce it by a couple of magnitudes?
TimMc
9:00 dwierenga: That too, actually. They're not *fun* to read, but you can figure them out without too much work.
dwierenga
9:00 in CSV format, with all appropriate quoting and escaping.
hiredman
9:00 dwierenga: ok
TimMc
9:01 oskarth: Because everything is included when you don't turn on optimizations.
amalloy
9:01 dwierenga: and are you giving it a sequence of sequences of strings? it looks to me like you're giving it a vector of a result-set
hiredman
9:01 dwierenga: have you looked a the example usage from the readme of data.csv?
oskarth
9:02 TimMc: I tried some optimizations (assuming you mean in the project.clj file) but it didn't seem to make *that* much of a difference. Is there some other way to minify it down a reasonable size?
dnolen
9:02 oskarth: that's the whole point of advanced compilation. Though don't expect anything tiny - the code generated by CLJS is usually competitive in size with jQuery.
oskarth
9:02 maybe I used the wrong type hints
9:02 ok I see
dwierenga
9:02 amalloy: i have no idea! that's what i'm asking (i think..)
oskarth
9:02 thanks
dwierenga
9:03 hiredman: i'm not sure where i'd find the readme of data.csv??
lazybot
9:03 dwierenga: Uh, no. Why would you even ask?
9:03 ianbarber left the room (quit: Quit: ianbarber).
dwierenga
9:03 pats lazybot on the head
hiredman
9:03 ~google clojure.data.csv
clojurebot
9:03 First, out of 6370 results is:
9:03 clojure/data.csv · GitHub
9:03 https://github.com/clojure/data.csv
9:03 OlegYch|h [~OlegYch@31.24.95.31] entered the room.
dwierenga
9:04 hiredman: i'm not using that, i'm using https://github.com/davidsantiago/clojure-csv
dnolen
9:04 oskarth: that said, when you generate tons of code (which tends to happen when using macros) advanced compilation is close to magic.
9:04 antares_ left the room (quit: ).
9:04 johnkpaul is now known as johnkpaul-afk
dnolen
9:04 oskarth: instead of 600k of JS, you still get something around or smaller than jQuery.
oskarth
9:04 dnolen: yeah, that's true. Looking forward to you coming to HS btw!
9:05 yeah
9:05 BeLucid_ left the room (quit: Remote host closed the connection).
dwierenga
9:05 should i use clojure/data.csv instead?
9:05 jasonbray [~jasonbray@165.20.108.150] entered the room.
9:05 BeLucid [~belucid@38.104.7.182] entered the room.
hiredman
9:05 *shrug*
dnolen
9:05 oskarth: looking forward to it as well!
9:05 dustingetz [~dustinget@38.117.156.148] entered the room.
9:05 rpg left the room (quit: Quit: rpg).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment