#clojure logs

2013-11-02

00:06biggbear,(defn <? [x y this then] (if (< x y) this then))
00:06clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
00:07biggbear,(defn fun [x y] (<? x y :ordered (fun y x)))
00:07clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
00:08biggbearthis last function is throwing StackoverFlowExeption when evaluating (fun 2 1)
00:11swarthybiggbear: I'm not sure-- still new to clojure but maybe look at using loop/recur instead of calling fun within fun
00:11swarthy,(defn fun [x y] (<? x y :ordered (recur y x)))
00:11clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
00:12hiredmanbiggbear: clojure is strictly evaluated
00:12hiredmanbefore calling <? all the arguments are evaluated
00:12hiredmanwhich is another call to fun, which is another call to fun, which is another call to fun, etc, etc
00:13hiredmanof course the stack overflowed
00:14biggbearhiredman then this is where macro comes?
00:14hiredmanno
00:14hiredmanthis where you read sicp and learn about using recursion
00:15biggbearok great.
00:15swarthyi don't know the <? function, but you need an exit condition or you recurse forever
00:15hiredman~sicp
00:15clojurebotsicp is http://www.codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages:Clojure:Chapter_1
00:15hiredmanfeh
00:15hiredman~sicp
00:15clojurebotsicp is http://web.mit.edu/alexmv/6.001/sicp.pdf
00:15biggbearsicp ok
00:15xuserThe Little Schemer is great for learning recursion
00:16biggbearthanks swarthy :) very appreciated
00:17muhoowow, lein-cljsbuild hates lein-pedantic. a lot.
00:22muhoolong, but that was a fun 10 minutes of trying to get cljs working, i guess i'll wait a few more months https://www.refheap.com/20394
00:24swarthymuhoo: have you read David Nolens newest article on getting CLJS up and running?
00:25swarthyhttp://swannodette.github.io/2013/10/27/the-essence-of-clojurescript/
00:25swarthynot sure if it will help you or not
00:25swarthybut there it is
00:27muhooswarthy: that is what failed, yes.
00:27muhooi was using his lein plugin to generate that project. lein-pedantic hates it very much
00:29muhooand i'm still stuck on the old lein-pedantic because new lein doesn't appear to have the feature of suggesting what dependencies to use to resolve the conflict yet.
00:29swarthylein deps :tree ?
00:30swarthyis this relevant: http://swannodette.github.io/2013/10/27/the-essence-of-clojurescript/
00:30swarthyhttps://groups.google.com/forum/#!topic/clojure/9cA5hvFJTkw
00:30swarthysorry wront paste
00:31swarthywrong*, meant that google link
00:37muhoonaw it's a problem with lein, and it looks like 2.3.3 finally incorporates lein-pedantic, so i can migrate.
00:37muhooand, cljsbuild now works. nice.
00:39muhoothough there is fun stuff like https://www.refheap.com/20395 ... a conflict deep inside a plugin
00:39muhoointernally inconsistent within the plugin, hmm, might try to patch that
00:40muhoointeresting, clojurecript includes clojure/data.json instead of cheshire
00:40muhooi thought cheshire was a lot faster/better
00:42amalloymuhoo: cheshire isn't a contrib lib
00:42muhoowhat do you mean by contrib?
00:43muhooooh cool, "lein assoc :pedantic? :warn check" gets pretty damn close to old lein-pedantic
00:43technomancylein-assoc?
00:44technomancyoh, apparently I wrote that
00:44muhoohaha
00:44technomancylein update-in is built-in and more flexible FWIW
00:44jared314did you write lein repl too?
00:44muhoothis was kind of not so meaninful tho https://www.refheap.com/20399
00:45muhootechnomancy: thanks, will use that now.
00:45technomancyjared314: the server side; the client side is by trptcolin
00:45technomancywell, arguably cemerick wrotce the server side
00:45technomancyanyway, I wrote a bit of it
00:46jared314because i'm trying to dynamically add nrepl middleware from a lein plugin
00:46muhootechnomancy: how would one update-in at the root level of the project?
00:46muhooi.e. to add :pedantic? :warn ?
00:46technomancymuhoo: update-in : :pedantic? :warn
00:46technomancythe top level is special-cased as :
00:46muhoo: , thanks
00:46technomancywhich is kinda weird but whatevs
00:46muhooshould be in docstring, maybe?
00:47muhoocause lein help update-in didn't mention it afaict
00:47technomancyit is =)
00:47muhooah, there it is, thanks.
00:47technomancyI guess the wording is a bit awkward
00:48muhoomight just need more examples maybe
00:48technomancysure
00:48muhoobtw, above goes java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to clojure.lang.Symbol
00:49muhoolein update-in : :pedantic? :warn check
00:49technomancyright; you have to indicate the end of the updat-ein with --
00:50muhooand assic os needed, great. so this works:
00:50muhoolein update-in : assoc :pedantic? :warn -- check
00:51technomancyor a shell alias?
00:52muhootechnomancy: https://www.refheap.com/20400
00:52technomancyoh nice; do you get hyperlinked line numbers for that?
00:52muhooi do, and it didnt' work for a while but seems to now
00:53muhoohyperlinked line numbers started working a few days ago and i'm not sure what changed
00:53technomancyI feel like that should be part of clojure-mode but it isn't
00:54muhoothe problem was clj-stacktrace mangling the line numbers, IIRC
00:55muhoocouple people were talking about it last week
00:55technomancyoh yeah ,the regex is probably expecting boring vanilla ones
00:55technomancywe should get a regex in clojure-mode that does both
00:55muhoowhre is clojure-complete coming from?
00:56muhooi get this a lot : https://www.refheap.com/20401
00:56technomancyone of them is coming from lein's :base profile
00:56technomancyno idea about the other
00:56muhooand it's not too clear from the :tree where it is
00:57muhooanyway, thanks for getting at least some of pedantic's features into mainstream lein
00:57technomancyby the time :tree gets it the profiles have already been merged unfortunately
00:57muhoooh. so maybe it's coming from my profiles.clj then
00:57technomancylikely the :user profile, yeah
00:59muhoothanks again, that makes sense. i'll bisect it and see what comes up. there's a lot of crap in my :user
00:59technomancynp
00:59muhooi.e. https://www.refheap.com/20402
01:01technomancyhuh; I don't expect any of those have it, but who knows
01:01technomancylife is full of surprises
01:03ddellacostamuhoo: I see that a lot. I looked into it once and it was some CLJS lib (piggieback?) so maybe that's a clue...ken-cljs-2/lein-template perhaps? (https://github.com/kenrestivo/ken-cljs-2/blob/master/src/leiningen/new/ken_cljs_2/project.clj)
01:03ddellacostalots going on there
01:09jared314the nrepl middleware project entry for lein repl can be a list of vars or symbols right?
01:15jared314nm the source says yes
01:15muhooddellacosta: all my wacky custom crap, yeah
01:17muhooddellacosta: i was attempting to roll my own framework
01:23jared314is there any way to confirm an nrepl middleware is loaded in the lein repl?
01:47jared314when leiningen does a project/merge-profiles does it use any of the existing keys in the map?
01:50dobry-dendamn, lamina/aleph are sick
01:51dobry-deni was pretty much rolling my own hilariously bad lamina on top of core.async
02:28amalloydobry-den: isn't core.async already a lamina-alike?
02:41dobry-denamalloy: i thought so, then i gave lamina a shot since it worked with gloss (and aleph on top of lamina and gloss)
02:42dobry-denlamina is higher level and async
02:42dobry-denthan*
02:42dobry-denor it has a lot more things already built for you rather
02:43amalloymmmmmm, i'd say that lamina covers a lot more levels. it has low-level scheduling stuff, on top of which it builds things that are similar to core.async; but zach has put a lot more time into it and still more things are built on top of that
02:43dobry-denyeah exactly
02:44dobry-dennow i'm using aleph and it cleaned up a comical amount of code for me
02:47amalloy<3 ztellman
03:20ddellacostahmm, having trouble getting lein ring to pick up resource changes. I've set auto-reload? to be true, and added "resources" explicitly to the reload-paths vector in the :ring section in my project.clj. Running it like: lein ring server-headless. Anything I'm forgetting?
03:21ddellacosta....although, I thought resources was in the classpath already, so I shouldn't even need to configure the reload-paths arg...?
03:27bitemyappddellacosta: what sort of resources?
03:27ddellacostabitemyapp: html in this case.
03:27ddellacostabitemyapp: using stefon for other stuff.
03:27bitemyappddellacosta: templates or static?
03:28ddellacostabitemyapp: templates.
03:28bitemyappddellacosta: what kind of templates? what library?
03:28ddellacostabitemyapp: hmm, good point--I wonder if static stuff is fine
03:28ddellacostabitemyapp: enlive pre-processing of html, using deftemplate.
03:28bitemyappddellacosta: not to ask the obvious, but are you caching or memoizing?
03:28ddellacostabitemyapp: right, I wonder if enlive is caching it regardless of lein settings...excellent use of the Socratic method sir. :-)
03:29bitemyappddellacosta: https://groups.google.com/forum/#!topic/enlive-clj/L9A7nlHhu-k
03:29bitemyappddellacosta: all signs point to...yes
03:29ddellacostabitemyapp: yep.
03:29bitemyappddellacosta: the solution is in that thread.
03:29bitemyappddellacosta: I'm going to start charging for googling peoples' problems someday.
03:29bitemyappand on that day, I will be a rich, rich man.
03:30ddellacostabitemyapp: you are a mensch.
03:30bitemyappGoogle query that got us this answer: enlive deftemplate caching
03:30bitemyappddellacosta: I want to be a rich mensch. :P
03:30ddellacostabitemyapp: yeah, my main problem was I was completely sidetracked by thinking this was a lein issue.
03:30bitemyappthis is why we bring second-brain in.
03:30ddellacostaddellacosta: yep. Again, thank you, thank you.
03:30bitemyappalso it tickles me silly that the Chinese for computer is "electric brain"
03:30bitemyappddellacosta: oh it's no problem. you know that.
03:30bitemyappI just like beign Mr. Fix-It.
03:31ddellacostabitemyapp: I owe you yet another beer/tea for when we are finally hanging in person. ;-)
03:31bitemyappbeing*
03:31ddellacostabitemyapp: is it really? that's awesome (re: Chinese word for computer)
03:31ddellacostabitemyapp: the Japanese is boring; it's just the English word with a Japanese pronunciation (like most computing terminology in Japanese)
03:32bitemyappddellacosta: slap a kana on it and pronounce it with mouth-marbles is the Japanese way.
03:32abaranoskywhat's poppin
03:32bitemyappabaranosky: talking about Chinese and Japanese words.
03:33bitemyappbumping into obnoxious enlive behavior.
03:33abaranoskyWo shi meiguo ren.
03:33bitemyappddellacosta: I like that the Chinese make some words like that (not all) "their own" by forming Old-English style word kennings.
03:33bitemyappabaranosky: indeed you are.
03:33ddellacostathat is indeed cool. I love that kind of stuff.
03:33ddellacostawhat does that mean, abaranosky ?
03:34bitemyappmakes Chinese vocab a lot of fun.
03:34bitemyappddellacosta: "I am an American"
03:34ddellacostathat's Chinese huh?
03:34ddellacostaah, haha
03:34abaranoskyMandarin
03:34ddellacostaah
03:34ddellacostaone of these days, I will study Mandarin...
03:34bitemyappddellacosta: which might actually mean "Please rip me off" in pragmatic terms.
03:34ddellacostafirst is Spanish though...
03:34ddellacostabitemyapp: haha
03:34bitemyappddellacosta: why Spanish?
03:34abaranoskyWo bu shi zhonguo ren!
03:35abaranoskyNi shi meiguo ma?
03:35ddellacostabitemyapp: because I'm the only one in my immediate family that doesn't speak, and my brother-in-law is Argentinean
03:35abaranosky:)
03:35ddellacostawait, does that first one mean something to do with not being Chinese?
03:35ddellacostaalso, Spanish is hella useful
03:36bitemyappddellacosta: yep, I'm not chinese.
03:36ddellacostaI just wrote hella in the Clojure channel, someone hit me
03:36abaranoskyI impressed my girlfriend by asking the Chinese waiter, who was having a harder time understanding that I wanted some rice, by saying "fan"... hehe.. I'm pretty advanced :P
03:36ddellacostanice, somehow I figured that out...
03:36bitemyappddellacosta: *I* say hella because I live in the bay area - what's your excuse?
03:36bitemyappabaranosky: how much Mandarin *do* you know?
03:36ddellacostabitemyapp: I hang out with people from the west coast sometimes
03:36abaranoskythat's about it :P
03:36ddellacostaabaranosky: that's cool. I wish I had even that much Chinese. You can get a lot of mileage out of a little.
03:36bitemyappddellacosta: second one is, "you from the US?" I think.
03:37abaranoskywish is a four letter word
03:37ddellacostaah, gotcha
03:37ddellacostaheh, so 'tis
03:37abaranosky"Are you American?" I believe
03:37bitemyappidioms in Chinese being what they are and all that.
03:37bitemyappI'm actually monolingual. My English is quite good, but I wish I wasn't mono.
03:38bitemyappI just remember bits of pieces of previous dabblings.
03:38ddellacostabitemyapp: yeah, I mean, it's a common thing with us Americans.
03:38ddellacostabitemyapp: but it's tough if you don't have the environment to force you to speak every day.
03:38bitemyappLooks like round-trip tickets from SFO to Tokyo (Narita?) are ~$1k
03:39bitemyappGoing to mark that down as a plus for living on the West coast.
03:39bitemyappddellacosta: I have a secret dream of dating somebody multi-lingual so I can have an excuse to bust out of being mono.
03:40ddellacostabitemyapp: yeah, it's not a bad cost from the west coast. Come on out. ;-)
03:40bitemyappddellacosta: I'm due for a vacation, I've only taken one in 7 years.
03:40abaranoskybitemyapp: my girlfriend is a Portuguese speaker....
03:40ddellacostabitemyapp: re: dating a speaker of a foreign language, I can say it definitely works wonders.
03:40bitemyappabaranosky: brazilian or portuguese?
03:40abaranoskybut she never wanted to speak with me... I used to want to speak it with her, and learn etc
03:40abaranoskyAzorean Portuguese
03:40ddellacostaabaranosky: are you learning Portuguese? That's a cool language. I like how it sounds.
03:41abaranoskyno, she neer wanted to speak it, and then I gave up caring :)
03:41bitemyappNuts.
03:41abaranoskyI think she thinks she's not that good at it or something
03:41ddellacostaabaranosky: it's really tough to get over the initial hurdle of speaking if you can't handle a normal conversation (dunno if you can or not, just saying). My wife basically had to go away and study English separately before we could use it in daily life.
03:41clojurebotIt's greek to me.
03:41bitemyapplol @ clojurebot.
03:41abaranoskynice ^^
03:42ddellacostayah, perfect, haha
03:42ddellacostaabaranosky: ah, well, that sounds like a different problem...
03:42bitemyappddellacosta: wow, that's intense. I knew Japanese people were often bad at English, but I didn't know it was that bad.
03:42bitemyappddellacosta: one of the hardest parts of learning to speak Japanese (to my mind, anyway) is that if you don't have daily exposure the enunciation patterns are very obvious or familiar to an English speaker.
03:42ddellacostabitemyapp: I mean, they learn a ton of vocabulary--so she will often know how to say random stuff like "particulate matter" and whatnot. But having a conversation is way different.
03:43bitemyappthe words "roll" in a way American English speakers don't do often (IMO)
03:43bitemyappddellacosta: ...particulate matter? lolwut
03:43ddellacostabitemyapp: yeah--the biggest difference there is that it's a lot "flatter" intonation-wise.
03:43ddellacostayeah, right? haha
03:43bitemyappyeah, the flatness. Precisely.
03:43ddellacostabut it is easy at first if you just try to pronounce things with a monotone.
03:43ddellacostayou can begin to add accents once you are more comfortable
03:44bitemyappI'm also paranoid about suffering from that effect where if you as a guy, learn Japanese from a woman, you can end up sounding a bit girlish apparently?
03:44ddellacostabitemyapp: ...sadly, yes. It's kind of unavoidable. I have tried hard to weed that out but I still say things in a feminine way at times, apparently.
03:45ddellacostabitemyapp: I mean, I don't actually care *that* much, since I'm not particularly bothered by these kinds of gender issues
03:45ddellacostaI think it probably bugs my wife more than me
03:45bitemyappOh sure, but it could put you on the wrong foot in an awkward situation.
03:45ddellacostabitemyapp: yah, I mean, I'm a foreigner so I'm already on the wrong foot. ;-)
03:45ddellacostaI get cut a *lot* of slack.
03:46sritchie_seangrove: did you ever figure out your AOT issue?
03:46abaranoskyjust make fun of yourself a lot, and laugh at yourself... they'll just consider you a crazy American :D
03:46ddellacostaabaranosky: yep. :-)
03:47abaranoskybetter yet, say intentionally ridiculous things
03:48bitemyapp"I have a huge cat in my pants"
03:48abaranoskyand see if anyone says anythign... or if they try to be polite... (rofl)
03:48sritchie_about the AOT issue...
03:48sritchie_bitemyapp: I wonder if it's because tools.reader is AOT
03:48bitemyapp"I travel through time via tuna"
03:48sritchie_https://github.com/clojure/tools.reader/blob/master/project.clj
03:48sritchie_against a future version of clj
03:48abaranoskyso a guys walks into the bar... and he has an AOT issue
03:48bitemyappsritchie_: wrong person ^_^
03:48sritchie_whoops, meant Bronsa
03:48sritchie_autocomplete fail
03:48bitemyappunless you want to shanghai me into working on compilers :P
03:49bitemyappI don't advise it. I make a big mess.
03:49sritchie_Ijust need seangrove's solution :)
03:53ddellacostabitemyapp: If I'd just read the enlive docs: https://github.com/cgrand/enlive#auto-reloading-112
03:53bitemyappddellacosta: I won't say it happens to the best of us, because it actually happens to all of us.
03:53ddellacostabitemyapp: ha
03:53ddellacostaRTFM strikes again
03:54ddellacostagranted, it's completely unclear how to use this
03:54abaranoskyI still think keywords are overrated
03:54abaranoskydo we relaly need three ways to make stringy things?
03:54bitemyappyes
03:54devnjust caight that out of context
03:54devncaught*
03:54devnbut what are you talking about overrated?
03:54abaranoskyI said it mostly out of context :D
03:54bitemyappit's an older conversation. I think having strings, symbols, and keywords be distinct things is great.
03:55devnbitemyapp: it does cause some problems
03:55bitemyappabaranosky is a goddamn heathen and doesn't appreciate the Lispy awesomeness and should go write TCL as penance until he understands his sins.
03:55abaranosky:P
03:55bitemyappTCL is directly relevant to why I think having keywords and symbols is awesome.
03:55bitemyapppsychotic language for psychotic nihilists.
03:55devnit annoys me that clojure.walk has stringify-keys but not stringify-symbols
03:55abaranoskyI am spending an hour converting some stuff to use strings, because the annoying hoopa I have to go through to deserialize the keywords
03:56devni wish that would get fixed
03:56bitemyappdevn: this is why everybody has util namespaces and libraries.
03:56abaranoskyI mean... I can't complain
03:56devnthat sounds like a punchline
03:56abaranoskyClojure's annoyances are tiny in comparison to literally every other lang
03:57abaranoskybut I'll complain anyway
03:57bitemyappHas anybody bothered to do a write-up comparing stream fusion and reducers?
03:57devnin fact, that is a sort of punchline, more of a tag -- Dom Irrera in the Big Lebowski
03:58bitemyappoh dear sweet god: https://github.com/aamedina/core.reducers.async
03:58bitemyapptoo bad he didn't do anything
03:59bitemyappoh well, at least he linked the stream fusion paper.
03:59bitemyappthis is going to end in me reading Wadler and Oleg. I need sleep tonight.
04:02abaranoskyso has anyone dug into the core.async implementation?
04:03bitemyappdepending on what you're trying to get out of it, you might want tbaldridge's videos that he did on deep code-walking macros and the Go macro itself.
04:03abaranoskyI saw a talk about core.async at the last Clojrue meetup in San Mateo, but it was about how to use it, not how it is implemented... so I got interested in reading the source more
04:03abaranoskybitemyapp: yes, I watched them
04:03abaranoskythat's some of the more educational Clojure material I've read in a while.
04:04bitemyappI find the high level patterns more interesting because core.async is actually pretty spare and low-level relatively speaking (intentionally)
04:05abaranoskyyou mean the patterns of how to compose core.async?
04:05bitemyappyes but I'm specifically thinking of things like pipe and conduit from Haskell-land.
04:05bitemyappmore familiar might be Lamina.
04:06abaranoskyI've got plenty to learn there
04:06bitemyappabaranosky: point being to enable very declarative but still composable and powerful ways of expressing async dataflow.
04:08abaranoskyI guess I've never worked on a projected that really needed async dataflows
04:08abaranoskyit's hard for me to make the usecase feel concrete
04:09bitemyappabaranosky: what is interesting about core.async to you?
04:09bitemyappare you using it as a way to understand Clojure better?
04:10abaranoskybitemyapp: understanding how it works so I can write better code
04:10abaranoskybtu also, understanding good use acase for it
04:10abaranosky*but also understanding good usecases for it
04:11abaranoskyI already learned some techniques to help me improve my print-foo library :)
04:14abaranoskypretty interesting to see a legit use case for a state monad approach in Clojure too
04:15bitemyapp'specially if you need rollback.
04:15bitemyappthat's half of what Haskellers use it for.
04:17abaranoskybitemyapp: were you saying you like Haskell for deploying machines?
04:17abaranoskyWe're investigating alternatives to Chef at work... any thoughts?
04:17bitemyappabaranosky: not precisely. I use Haskell the same way Facebook uses Pytohn.
04:17bitemyappand probably similar to how technomancy uses OCaml.
04:18bitemyappactual remote orchestration, provisioning, and deployment are done with Python for now because it's "easy", but I've been considering working on some automation tooling to replace that with Haskell.
04:18bitemyappMore typically, I use Haskell where I need little deployable executables/scripts that are more sophisticated than I'd like to do use an actual scripting language for, but can't be run as a daemon or service with Clojure.
04:19bitemyappfast starting binaries, Lisp, concurrency - pick two.
04:19bitemyappFSB + concurrency -> Haskell, FSB + Lisp -> Common Lisp (ick), Lisp + Concurrency -> Clojure
04:20bitemyappactually, I'm being a little unfair WRT concurrency and Common Lisp, but there's definitely no STM which is kinda my bare-minimum these days.
04:20bitemyappabaranosky: so uh, as far as Chef goes, I use Fabric + Cuisine + Cuisine-PostgreSQL + Cuisine-Sweet
04:20bitemyappCuisine is explicitly designed to provide idempotent semantics for your scripts in Fabric like Chef.
04:20abaranoskyI think Fabric is something being considered
04:20bitemyappexcept Fabric is more straight-forward than Chef and a fair bit simpler.
04:21abaranoskyAlso Rex, a Perl Fabric
04:21abaranoskyI really dislike Chef
04:21bitemyappI'm considering finding or building a Fabric + Cuisine'ish library for Haskell.
04:21bitemyappI hate Chef and Puppet both.
04:21bitemyappAnsible, Salt, and Fabric are the most plausible choices and Fabric is the one I know best and am the most productive in.
04:22abaranoskySomething more straightforward the Chef is all I really care enough to vote for, since I am not heaivly involved in that part of the tech sphere
04:23abaranoskyI'm much more heaivly focused on doing Clojure backend services, so whatever they find that is nice and clean, and keeps people happy, then I'm all for it
04:23bitemyappthe real problem with most libraries like this, and is partly why Chef and Puppet are designed the way they are, is that ssh clients are a massive...MASSIVE pain in the ass.
04:23bitemyappFabric has all the ssh related bugs and issues nailed down and if I attempted a migration of that part of my work to Haskell I'd probably end up in ssh-hell
04:24bitemyappabaranosky: Fabric is much more straight-forward than Chef - just make certain you use Cuisine and the third-party Cuisine stuff :)
04:24abaranoskyCuisine... are those like recipes?
04:24bitemyappabaranosky: I can share examples from my work stuff if you want to see idiomatic and non-trivial Fabric scripts
04:24bitemyappCuisine is a library built on top of fabric. It might be easier if I just show code.
04:24abaranoskyyes... I can forward them on to other cguys at work
04:24bitemyappincidentally, my fabric scripts that I wrote recently are for deploying a Clojure app server and Datomic
04:25bitemyappso it at least has some overlap with what you're up to.
04:25bitemyappfortunately I work at a company that is very permissive WRT non-core intellectual property ;)
04:27abaranoskybitemyapp: that's cool
04:27abaranoskybitemyapp: have you heard of Rex? Supposedly Fabric is a Python Rex, or vice versa
04:27bitemyappnope. I've done a very good job of avoiding Perl.
04:28bitemyappI started out doing dev-ops and stuff in that realm with Ruby
04:28bitemyappthen Python, now a mix of Python and Haskell.
04:28abaranoskyyeah.. not sure what they see in the Perl, over Python... but I'm sure they *do* see something useful about it, because they're very good engineers
04:28bitemyappeh fuck it. I'm just going to open source these as fabric recipes and do the sanitization process entailed.
04:29bitemyappabaranosky: you'll have a github link from me by the end of the weekend ;)
04:29bitemyappI got my migration toolkit for Datomic working, I'll have to open source that next week.
04:30abaranoskyhow much have yo been using Datomic?
04:30bitemyappabaranosky: it's been my whole world the last month or two.
04:30bitemyappso it has joined my "has used in anger" bucket
04:30bitemyappwith "used in anger" being figurative and literal.
04:31bitemyappI was both solving a problem and vanguarding technical options for a future project.
04:31bitemyapphow I managed to squeeze some Clojure and Datomic into my 99% Python company that quickly is a mystery to all.
04:31borkdudebitemyapp what does your migration toolkit do exactly?
04:31bitemyappborkdude: not a whole lot right now, lets you pass a mapper fn for translating the datoms.
04:32bitemyappborkdude: I can't really answer your question in detail unless you hint at how much you know about Datomic.
04:33borkdudebitemyapp I have built one that writes a schema version number into datomic and scans a directory for edn files for updates and applies them according to the current schema version, along with the possibility of applying functions to them
04:33bitemyapp...edn files?
04:33bitemyappI'm not sure why edn files would be involved.
04:33borkdudebitemyapp they contain the datoms that will update the schema
04:34bitemyappyou're talking about something else
04:34bitemyappI have that too
04:34bitemyappwhen I say migrations, I mean changes to existing defined attributes.
04:34bitemyappwhat you're talking about is a 5 line gen-schema fn in my @work project, I'm talking about 200 lines of pain and fear.
04:34borkdudeI mean both schema and attributes
04:35bitemyappborkdude: you translate the data from the origin database to the new one?
04:35bitemyappborkdude: so you can change an attribute from long to string and translate the data accordingly?
04:35bitemyappI'm not seeing how you can do that with edn files.
04:35bitemyappunless you're inlining functions somehow.
04:36borkdudebitemyapp you can do anything inside the function you can define for a migration step
04:36bitemyappit might be easier if I just see the code to understand exactly what you're talkin about
04:36bitemyappborkdude: is this on github?
04:36borkdudebitemyapp so, print nonsense, or transform data from attribute to attritbute, whatever you want
04:38borkdudebitemyapp it's not on github, part of a commercial project, but it's only 84 lines
04:38borkdudebitemyapp well, it is on github, but in a private repo :-) I was just wondering if your migrations did anything I might have overlooked
04:38bitemyapplovely, but if you're not going to open source it, then this is a pointless conversation.
04:39bitemyappborkdude: when you're migrating the database, are you translating from an origin to a destination database?
04:39bitemyapp`cbp: howdy
04:39`cbpbitemyapp: hi
04:39borkdudebitemyapp let me post an example of how you can define migrations, maybe that would be helpful
04:40bitemyappit's entirely possible that the current 146 (actual code) + 90 (tests) lines will get collapsed when I go to do cleanup and open source it.
04:41`cbpwat
04:41bitemyappbut there's an element of irreducible complexity because in the end, you have to reduce over the entire transaction log and track identity across datoms - generating new tempids and then assoc'ing when they get transacted incrementally.
04:41borkdudebitemyapp https://www.refheap.com/20404
04:41bitemyapp`cbp: migration toolkit for Datomic.
04:42`cbpoh
04:42bitemyapp`cbp: I work on a lot of database stuff. I think this is detrimental to my sanity. This is from stuff I did at work.
04:42bitemyappborkdude: not even close.
04:42bitemyappborkdude: this is the 5 line gen-schema fn I referred to.
04:42bitemyappborkdude: you cannot change existing attributes in the schema in Datomic without translating the data.
04:42`cbpyou paste to refheap then change it to text mode !!
04:43bitemyappborkdude: you have to reduce over the entire transaction log and dump/load the whole database history.
04:43`cbpsry im tired :P
04:43borkdudebitemyapp you can do that in the post-processing-function you can apply along
04:43bitemyappthat's not a post-processing fn then, it's a migration fn.
04:43bitemyappis it getting called on each datom, each tx, or each entity?
04:44bitemyapplol @ `cbp
04:44borkdudebitemyapp it is just a function that is called after transacting the datoms from the corresponding edn file
04:45borkdudebitemyapp so you can for example translate data from one attribute to another
04:45bitemyappthis cannot solve the problem I am talking about.
04:45bitemyappyou can't do that.
04:45bitemyappyou can't change an existing attribute in the schema.
04:45bitemyappattributes, once installed with a given definition, are permanent.
04:45bitemyappyou have to translate the entire database.
04:45borkdudebitemyapp that's not what I'm saying
04:46bitemyappyou can't transact datoms into a schema they don't match
04:46borkdudebitemyapp the datoms in the edn files only contain updates to the schema, no other data
04:47bitemyappthat's the gen-schema fn I am talking about.
04:47bitemyappyou're not solving the same problem I was
04:47bitemyappyou may not understand that at present, but I can guarantee you it's different.
04:47borkdudebitemyapp ok, never mind then
04:47bitemyappI am translating the entire database from origin -> destination
04:47bitemyappso that I can make changes to the schema and translate the data to match the new schema.
04:48bitemyappbecause Datomic supports literally nothing like this, so you have to do it yourself.
04:48mercwithamouthi'm just fooling around making a very basic CRUD system... new programmer...very new to lisp...can someone point me in the right direction as far as how to seed all of my 'names' into my create-record function? https://www.refheap.com/20405
04:48bitemyappwhich is fine, you'd have to do this with anything that has "history", but all the same, I needed the toolkit so I could write migration functions.
04:48mercwithamouthpoint in right direction..as in mention a method to use without solving this problem for me =P
04:49bitemyappmercwithamouth: most "CRUD" apps let the database solve these kinds of problems for them.
04:49bitemyapplike auto-incrementing primary keys.
04:49mercwithamouthbitemyapp: well i know..i just want to feed in each value from my names vector one at a time
04:50mercwithamouthi'm just doing this to get familiar with clojure
04:50mercwithamouthi don't expect it to be more than 40-50 lines
04:50bitemyappI'm a believer in practical-minded projects, but okay.
04:50bitemyappmercwithamouth: feed what? I'm not sure what you're asking for.
04:50bitemyappyou want to have a mutable collection?
04:50bitemyappor do you want to try to do this in pure code?
04:51mercwithamouthsee my names vector with "J" "Roboto" etc? I want create a function that feeds each one in to created record
04:51bitemyappI think you'd be better served with immutable data.
04:51mercwithamouthyeah just pure code...most likely won't even save this =)
04:51bitemyappmercwithamouth: quit with the word feed, be more descriptive.
04:51`cbpwhat does feed mean
04:51bitemyappsee, he's confused too.
04:51mercwithamouthiterate through? map in?
04:51bitemyappto accomplish...what?
04:51bitemyappyou say record, but I don't know what you're expecting on the other end of the rainbow.
04:52bitemyapp do you just want a map like {:username "blah" :id 2} ?
04:52mercwithamouthmake a record with "J" as the name and an id = 1 then Roboto, id 2
04:52mercwithamouthwell yeah...in the end it would create a map with all of my names and a key
04:53bitemyappmercwithamouth: example is forthcoming, uno momento.
04:53abaranoskyhave you guys seen the Demonic library?
04:54abaranoskyAmit and Siva wrote it and were using it on their old startup's code
04:54abaranosky... with Datomic
04:54bitemyappabaranosky: seen it, yes.
04:56bitemyappmercwithamouth: https://www.refheap.com/20406
04:57biggbear({:x :not-nil :y nil} :y) => nil ... How do we know there is actually :y with value nil?
04:57bitemyappuser> (create-records-for-names [] names)
04:57bitemyapp[{:id 1, :name "J"} {:id 2, :name "Roboto"} {:id 3, :name "Isis"} {:id 4, :name "Paul"} {:id 5, :name "Leaf"} {:id 6, :name "Astro"} {:id 7, :name "Yoda"}]
04:57bitemyappbiggbear: you don't, and if you don't want to run into that, don't assoc nil into maps.
04:57bitemyappbad mojo.
04:57bitemyappBAD mojo.
04:57bitemyappbiggbear: but if you really cared...
04:57bitemyapp,(contains? {:y nil} :y)
04:57clojurebottrue
04:58bitemyappbut don't do that. *scowls*
04:58bitemyappmercwithamouth: satisfactory?
04:58biggbeargood bitemyapp :)
04:58mercwithamouthbitemyapp: negative...BUT i've almost got it
04:59bitemyappmercwithamouth: ...er...what I posted on refheap isn't what you wanted?
04:59bitemyappit's a chainable "database" you can put stuff into and take stuff out of. foundations of CRUD.
04:59bitemyappyou could even model it as a map of maps, keyed by primary key.
05:00mercwithamouthoops..forgive me. 5am here =P
05:00`cbp,(map #(zipmap [:name :id] %) (partition 2 (interleave ["J" "Roboto" "Isis" "Paul" "Leaf" "Astro" "Yoda"] (range))))
05:00clojurebot({:id 0, :name "J"} {:id 1, :name "Roboto"} {:id 2, :name "Isis"} {:id 3, :name "Paul"} {:id 4, :name "Leaf"} ...)
05:00bitemyappthen auto-incrementing primary keys could be implemented more safely
05:00bitemyapp`cbp: I was trying to come up with something realistic, that's just cheating :P
05:00bitemyappreduce is at least generalizable to adding stuff to the database, haha.
05:01mercwithamouthyeah that's exactly what i want. i wouldn't have thought of that =P
05:01bitemyapp`cbp: clever use of zipmap.
05:01`cbpty
05:01mercwithamouthi'm glad i asked...i decided to do this tonight to force myself to pick up on at least one new method without copying from a book, thank
05:02bitemyappmercwithamouth: a better implementation than the vector based one in the refheap would look like {0 {:name "blah"} 1 {:name "woot"}}
05:02bitemyappmercwithamouth: you should translate the vector based one I wrote to something that produces primary-keyed maps like I just showed an example of!
05:02mercwithamouth`cbp: your example as well. i've used zip in ruby...wouldn't have thought to do that either
05:02bitemyappmercwithamouth: that would be a good exercise, I think.
05:02bitemyappmaking it work differently.
05:03mercwithamouthalright, that'll be next
05:03bitemyapp`cbp: people like to talk about how rarely they use juxt, but I use zipmap even less.
05:03`cbpreally
05:03bitemyappI feel like I should use it more often. maybe time to go pattern hunting? :P
05:03`cbpI mean i know i see it rarely but i use it all the time hah
05:04bitemyappmercwithamouth: after you get the primary-keyed maps version working, make a more correct create-id function.
05:04bitemyappmercwithamouth: if you have records 1, 2, and 3, but record 2 gets deleted, the next primary key should be 4, not 3. That creates a collision and will overwrite data.
05:04bitemyappmercwithamouth: this should give you some fun material to play with :)
05:04bitemyappif you need a hint, (but no code!) ping me on here.
05:05mercwithamouthbitemyapp: yeah i have a few empty functions in my editor for that part
05:05bitemyapp`cbp: hell or highwater, we're releasing something this weekend.
05:05mercwithamouthwill do
05:05`cbpawesome
05:05`cbpmusic to my ears
05:05bitemyapp`cbp: fearful to my liver and arteries.
05:05`cbp:-(
05:06bitemyapp`cbp: I like to eat junky chinese food when I hack on nights and weekends. If I start tumbling down a rabbit-hole, I start drinking scotch while coding :P
05:07`cbpjunky chinese food might be more healthy than what i have sometimes
05:07bitemyapp`cbp: junky mexican food? we have a lot of that in San Francisco.
05:07bitemyappfortunately, regular exercise and my shifting to drinking tea while coding is helping me to not kill myself.
05:07borkdudeorder some vegetarian chop suey, it might be the healthiest chinese order option
05:08bitemyappbleh. I like meat.
05:08`cbp3 large pizza for about $14.50 -> suddenly arm cramps all weekend
05:09bitemyappthat's pretty hilarious, but why does your arm cramp?
05:09borkdudeartery blockages? ;)
05:09bitemyappI actually take better care of myself than my joking about congestive heart failure would indicate.
05:09bitemyappborkdude: scary.
05:09`cbpprobably
05:09bitemyappyou can get crepes in SF slathered in nutella and strawberries.
05:09bitemyapp`cbp: also that is really cheap pizza.
05:10bitemyapp`cbp: $14.50 is one medium pizza in SF>
05:10bitemyapplarges are $16-20
05:10bitemyapp`cbp: one bottle of Mexican coke is $2
05:11bitemyappalright, I'm headed to bed so I'm not totally useless tomorrow. Goodnight all :)
05:11`cbpits from struggling low higiene joints here
05:11`cbp3 for the price of one
05:11`cbpgn
05:15`cbpheh took me too long to find it http://www.smbc-comics.com/?id=3090#comic
06:10gtsiftsishey, what is the standard way of documennt clojure code? I mean in ruby we have rdoc or yardoc, is there something similar in clojure?
06:18basitwhat is the recommended way of installing clojure on mac ?
06:18basitor where can i read about it?
06:18john2xleiningen
06:18basitok
06:19basiti'll take a look
06:19basitthanx
06:20basitdoes it not have a mac like installer? there only seems to be a script
06:54cYmenbasit: it has no gui scripts is all you're going to get
07:14Glenjaminhi guys, what's recommended as a good entry tutorial for already good programmers?
07:14MorgawrI love the O'Reilly book
07:15Morgawrit's really great but it's not really a "tutorial"
07:15Morgawrhttp://www.clojurebook.com/
07:22Glenjamincheers
07:45makkalothi, i want to fork a repo which uses leiningen, i want to make some changes and use my version instead, what is the preferred way to do that ?
07:45ohcibihi i'm using midje for testing but it wont report succesful/unsuccesful tests at the end of each run (i.e. it always says 0 tests run, 0 tests passed, etc.) only if a tests fails I see something... is there a way to integrate midje properly with leiningen?
07:46makkalotohcibi, https://github.com/marick/lein-midje
07:48ohcibimakkalot: thanks
07:53cYmenI'm trying to calculate primes but having trouble making it fast. This is what I currently have: http://pastebin.com/pZgncZVV Any suggestions?
08:00cYmenNot sure how idiomatic that is and how unidiomatic I should get making it faster....
08:08david118how do I stop an error message for casting java.lang.string to clojure.lang.ifn?
08:09phalphalakFore debugging purposes I often use something like (defn id-prn [v] (prn v) v) to test for interim results. Am I reinventing the wheel here or is there no core function that does this already?
08:09Bronsadavid118: it means you're trying to use a string as a function ##("foo")
08:09lazybotjava.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn
08:10phalphalakdavid118: do you want to catch the error instead of preventing it from happening?
08:12david118not sure. it's a simple function...
08:13david118i'm trying to use a method in a sequence of conditionals that call (myfn "param1", "param2", "param3", "param4") ...
08:13phalphalakdavid118: as Bronsa mentioned it's usually an indication that you provide a string instead of a function.
08:14david118however for all the conditionals param1,2,3 are all the same so I want to make a function to wrap than and just pass in param4
08:15david118I thought I could just (defn myfn1 [arg] (myfn "param1, "param2", "param3", arg))
08:18cYmendavid118: but?
08:18david118.. I get the cast error on the param when I try to call (myfn1 "param4")
08:19phalphalakdavid118: do you have a code example you could share? (using refheap, pastebin or the like)
08:19david118it says "param4" : cannot convert string to ifn
08:19phalphalakdavid118: seems param4 is a string that is being called as a function
08:20phalphalakdavid118: maybe myfn1 is at fault?
08:21cYmendavid118: are those commas really there?
08:22cYmenand the " don't seem to match up either
08:22teromcommas are whitespace
08:24cYmenterom: huh...interesting choice
08:24david118yes. the commas are there. I'm trying to abstract it into the minimal example atm
08:25david118(the commas are there and work before I make the change)
08:26teromcYmen: sometimes they are useful, for example in maps you can separate things like {:a 1, :b 2} etc for readability
08:28teromthere are also some clever uses for commas for example within threading macros
08:31phalphalakterom: you mean as a visual marker for the insertion point?
08:32teromphalphalak: yes. http://blog.fogus.me/2009/09/04/understanding-the-clojure-macro/
08:33phalphalakterom: interesting. Thank you for pointing this out
08:35cYmenfilterscc
08:35cYmensorry, typo
08:35cYmenIf I want a mutable array, do I have to use Java for that?
08:36teromcYmen: you can access Java arrays from Clojure. The question is why would you want one?
08:43cYmenterom: http://pastebin.com/pZgncZVV trying to do a prime sieve
08:46teromcYmen: have you seen this: http://clj-me.blogspot.fi/2009/07/everybody-loves-sieve-of-eratosthenes.html
08:51cYmenno...
08:52cYmenWell, I'll definitely read it now. There's some stuff in it I have no idea what it does.
08:52cYmenBut the timings don't seem to be much better than my solution.
08:52cYmenThen again that was with a 4-years-ago computer..
10:40ddellacostahuh, how do I debug a compile error with lein uberjar? I can run the app fine otherwise, but when making jar/uberjar, I get a nullpointerexception
10:45noididdellacosta, you can `export DEBUG=1` to make Leiningen print debugging information
10:45ddellacostanoidi: that's helpful--thanks!
10:52john2xI'm getting "Unable to resolve symbol" when trying `lein test :only foo.bar/quux`. quux is defined and referred, but it's newly added. Doesn't `lein test` automatically resolve the namespace?
10:53sandbagsanyone here using the ClojureScript library Enfocus?
11:01bjaI really wish I could post the shit code and engineering from a "community leader" in public to shame them
11:06john2xdo I need to do something else so `lein test` can find the newly defined symbol?
11:20llasramjohn2x: Running `lein test` spins up a new JVM, so "newly defined" doesn't really matter. As long as the code is in the file
11:22john2xyeah, that's what I thought. this is weird. probably just need some sleep.
11:25john2xhmm even removing an existing symbol and then running its tests, `lein test` doesn't complain.
11:27ziltiI want to call a method of which I don't know the name until run-time... What's the best way to do it? Unfortunately eval a quoted form doesn't work, I get "RuntimeException: Can't embed object in code, maybe print-dup not defined:" then.
11:28ziltiA Java method, of course
11:32llasramjohn2x: It sounds like you're not editing what you think you're editing
11:33llasramzilti: You can use the Java reflection APIs, but `eval` should also work. What are you trying to do at a higher level?
11:34ziltillasram: Basically I want the equivalent of (eval `(. ~javaObject ~(clojure-expression-resulting-in-a-symbol) ~argument))
11:34ziltillasram: Oh, clojure.lang.Reflector/invokeInstanceMethod seems to do the trick
11:35llasramI meant a higher level than that :-) Like, why do you not know the java method until runtime?
11:35ziltillasram: I'm writing a JavaFX library, and want the possibility to provide the arguments to a new JavaFX node as a map so it's declarative.
11:38llasramI see. For a different approach, you could write a macro which did a translation once from the declarative identifiers to functions invoking the associated method. That would probably be simpler to write, and more performant. Then at runtime, you would just do map lookups to map from declarative form to functions
11:38andrewmcveighIs there a clojure reader implementation that doesn't throw away ;; comments?
11:39_scapeso lwjgl creates a special thread that works on opengl commands, and calling these functions outside of the specific opengl contextual thread fails-- which makes it slightly difficult to do repl work with a running instance. I thought about using an atom and setting it with quoted functions to run and then evaling them during the loop in the opengl thread, but this feels very backwards. is there a better to communicate with the opengl th
11:39_scapewith repl?
11:39ziltillasram: I'm not sure I fully understand what you mean
11:40llasramandrewmcveigh: I think you can do that w/ sjacket, but I'm not sure how mature it is https://github.com/cgrand/sjacket
11:41llasramzilti: I assume you have keywords like `:some-property` which you wan to translate to method calls like `.setSomeProperty`. Yes/no/maybe?
11:41ziltillasram: exactly.
11:41andrewmcveighllasram: great, thanks :) ... doesn't need to be that stable/mature, just messing around atm.
11:42andrewmcveighAh, this is what cgrand was talking about in his EuroClojure talk last year... I think?
11:43llasramzilti: Ok. So you can have a macro which reflects on the Java type with the .setSomeProperty method, and produces the forms for defining a map of `{:some-property (fn [o v] (.setSomeProperty o v))}`
11:43llasramThis is an internal macro you call once to define the map
11:43llasramThen the actual runtime code just looks up functions in that map
11:44ziltillasram: So like a "startup macro" that generates all those possible method calls and stores them in a map?
11:44llasramExactly
11:44llasramThat way you only do all the reflection once, and runtime errors (typos, whatever) are just map-lookup errors, and not weird runtime eval/reflection exceptions
11:45ziltillasram: Sounds interesting and quite... challenging. I'll try that. Thanks!
11:47llasramnp; good luck!
11:47squidzdoes anybody know a way to search a clojure/clojurescript project with emacs?
11:49llasramsquidz: `find-grep` is built-in. And I use `ag` (tool and emacs extension) myself
11:49squidzllasram: never heard of ag
11:50squidzllasram: from what I see it allows you to serach a source controlled project?
11:50llasramYeah. It's like `ack`, but re-written in C and with (IMHO) saner defaults
11:51squidzah okay. Thanks for the tip, I'll try it out
12:03squidzllasram: thanks for the tip, ag.el works like a charm. Nice and fast
12:04llasramnp
12:05`cbp(inc llasram)
12:05lazybot⇒ 11
12:05xuser(dec llasram)
12:05lazybot⇒ 10
12:05xuser(inc llasram)
12:05lazybot⇒ 11
12:05xuser;)
12:05llasramheh
12:05squidz(inc llasram)
12:05lazybot⇒ 12
12:20the-anomehi
12:41joegallothe-anome: hi!
12:50cYmenhm...seems project euler is not ideal for learning clojure :)
12:52xusercYmen: try 4clojure.com
12:54MorgawrcYmen: I learned clojure with project euler, it was fun :P
12:54Morgawrbut if I go back now and re-read my solutions (I only got like the first 100 problems) they were so ugly and un-clojurey
12:55cYmenYeah, that is to be expected.
12:56cYmenBut for actually learning the style and idioms of a language is there any good way other than reading code?
12:58MorgawrcYmen: https://github.com/bbatsov/clojure-style-guide this is nice if you just want to know common idioms and style
12:58Morgawrelse, just read code, write code, play around and hang out in this channel to learn neat data transform tricks :P
12:59cYmenI wish people would just hire clojure coders.
12:59cYmenEasily the fastest way to learn something is doing it 8 hours a day. :)
12:59AimHereThe way it works is that clojure coders end up getting managerial jobs or owning companies, then demanding more clojure
13:00Morgawrwe can only hope :P
13:00cYmenSounds good, do that then call me!
13:08llambdawhat's the best way to serve up clojure data structures via ring/jetty? for example, i have a function that returns a map and a binary response would be appropriate for the time being
13:12sritchiellambda: check this out: https://github.com/tailrecursion/ring-edn
13:13llambdasritchie: thanks
13:24the-anomehi, may I ask for an example on applying two simple functions to a list of numbers using the sequence monad (sequence-m)? for instance, adding one and then multiplying by two? Thanks in advance!
13:25the-anome(this monad thing is really arcane magic :) )
13:38dobry-denllambda: yeah, edn is pretty much the clojure version of json
13:38dobry-denany time i build an api that someone else needs to use, i make sure to output edn to expose them a few bytes at a time to the language of the gods
13:39dobry-denbefore their lang's edn lib turns it back into json
13:39llambdadobry-den: lol
13:40llambdathey don't know what they're missing!
13:41dobry-denpersonally i was sold when i found out i didn't have to type commas. [1 2 3] sign me up
13:46seangrovednolen: The cljs-warning-handlers change is a bit bigger than I expected, still working on it
14:04silasdavisis there a function or an idiom to use when you want something like update-in
14:06silasdavisbut that will also traverse sequences as if you used (partial map #(update-in % [<rest of keys>] f))
14:08silasdavisso it might be used like (update-in m [[:people] [:name :languages] [:origin]] f)
14:08silasdaviswhere there is an implied map between the partitions during the update
14:11akurilinSo I'm usinjg clj-pdf to generate a doc
14:11akurilinAm I correctly understanding that in PDF you use tables for alignment?
14:12akurilinAs opposed to html-style floating etc
14:19akurilin(I guess there's an actual align, which is a start)
14:21muhoowow, this is some crazy async lamina stuff, but what does it DO? https://github.com/flatland/telemetry
14:23muhooa message queue server, maybe? it's mysterious.
14:37dobry-dencute website http://flatland.org/
14:39dobry-deni thought flatland was 1 gansta til i now see it's like 5 ganstas
14:44dobry-denHas anyone been interested in implementing ecdsa & secp256k1 in Clojure?
14:48silasdavisI think I managed to specify :jvm-opts in .lein/profiles.clj at some point
14:49silasdavisI've tried adding it under :user but it doesn't seem to be working
14:49silasdavisanyone know what I need to do?
14:51dobry-densilasdavis: i don't know, but can't you also specify them in an env variable in the meantime?
14:52shai_I'm having difficulty getting the repl to work
14:52shai_I just installed jdk on ubuntu
14:53shai_I am able to get the ClojureScript:cljs.user> prompt
14:55shai_I want to use clojurescript to get something running on the browser
14:57dobry-denshai_: https://github.com/magomimmo/modern-cljs
14:57dobry-denwalks ya through it
14:58dobry-denscroll down and youll see tutorials
14:59shai_https://github.com/clojure/clojurescript/wiki/Quick-Start
14:59noonianshai_: last time i tried the cljs-kickoff leiningen template it worked out of the box :p
14:59shai_how different is the link you gave with the link I just pasted?
14:59shai_I can't even type in the 4 lines of code without getting an error
15:00dobry-denshai_: the link i gave you is an annotated walkthrough that works
15:00shai_dobry-den
15:00shai_thanks
15:02dobry-denshai_: the clojurescript wiki link is showing you how to use the compiler directly. the link i gave you shows you how to use the popular cljs-build plugin to do that kind of stuff for you
15:02dobry-denand it shows you what an actual workflow might look like
15:04dobry-deni personally made a 'cljs-sandbox' project with the basics hooked up so that i dont have to remember how to hook everything up when i just want to cough up some 5-min cljs to play with an idea i had
15:05dobry-dennoonian also points out a template (lein new cljs-kickoff my-app) that'll spit out some boilerplate for you if you think you missed something
15:06noonianas far as a repl, the link from the cljsbuild page for different ways of using the cljs repl helped me get to the point where you can type (js/alert "foo") in the repl and see an alert on the screen
15:07dobry-denyeah, the modern-cljs tut also sets it up with some verbiage for slow ppl like me
15:09dobry-denbut the last time i worked with a cljs repl (months ago), it had some issues for me. iirc it wouldn't like me scroll back through history or something
15:09dobry-deninstead it would print ^D when i arrowed-up
15:10noonianyeah, rlwrap is awesome for stuff like that
15:10noonianwould run with rlwrap lein trampoline cljsbuild repl-listen
15:10dobry-dennoonian: thanks. never knew about rlwrap
15:10dobry-denyeah that would solve it
15:11noonianyeah its great for any repl that doesn't have niceties like history
15:12ziltillasram: It worked, but it takes 350ms...
15:13ziltillasram: I'll probably go for a "memoize" approach to it instead of generating them all at once
15:27seangrovehrm, how strange
15:27seangroveCan you not quote an ns form?
15:27seangrove,(quote (ns cljs.analyzer-tests (:use [example.new])))
15:27clojurebot(ns cljs.analyzer-tests (:use [example.new]))
15:27seangrove,(do (quote (ns cljs.analyzer-tests (:use [example.new]))) *ns*)
15:27clojurebot#<Namespace sandbox>
15:28seangroveQuoting the ns form seems to reset the nrepl to some default namespace
15:28llasramzilti: Something take 350ms for a one-time set-up operation is bad?
15:29ziltillasram: It increases the startup time until the program is ready. 350ms isn't critical for me, but probably for others using the lib. Anyway, I'm using clojure.core/memoize now, it was a small change.
15:30llasramFair enough
15:30ziltiI was surprised how easy memoization is in Clojure
15:35akurilinI'm derping out, I shouldn't have to ask this.. Is there a way to merge a nested vector "upwards"? As in, with [[a b] [[c d] [e f]]] , can I get [[a b] [c d] [e f]] if my code looks like [[a b] (foo)] ??
15:35lazybotakurilin: What are you, crazy? Of course not!
15:45muhoolol lazybot
15:45llasramnice
15:46llasramakurilin: You'd need to do (concat [[a b]] (foo))
15:46llasram(where `(foo)` returns `[[c d] [e f]]`)
15:46llasramOr `into`, etc
15:47muhoocojs, maybe, too
15:47muhoocons
15:49dobry-dena naive solution is to `flatten` and then `partition`.
15:49llasramYou spoke the name of the forbidden function!
15:49llasram~guards
15:49clojurebotSEIZE HIM!
15:49akurilinllasram, got it, thanks. Was somehow hoping to apply from within into the surrounding vec :)
15:50akurilinNot really a "thing" apparently :)
15:50llasramakurilin: There is unquote-splice in syntax-quoted forms, but it isn't usually used to just build up normal data structures
15:51llasram,(let [x [[:c :d] [:e :f]]] `[[:a :b] ~@x])
15:51clojurebot[[:a :b] [:c :d] [:e :f]]
15:52dobry-den"what you don't implement with `juxt` is not worth implementing at all" - rich hickey
15:52llasramAre we inventing rhickey quotes?
15:55muhoocitation needed
15:55muhooi can't imagine him being that dogmatic about anything except immutability
15:55akurilinllasram, that's a helpful example, thank you. It's pretty neat that you can even do that in the first place
15:56llasramakurilin: now that I'm thinking about it, bbloom does have this library: https://github.com/brandonbloom/backtick
15:56llasramwhich extends syntax-quote to be a general useful data structure template mechanism
15:57muhoowow i thimk there are as many clojure web frameworks as there are clojure web developers
15:57llasrammuhoo: What did you just come across?
15:57akurilinllasram, is this for working with things like hiccup?
15:58akurilinI don't do much hiccup myself, but it sounds like having to run concat all the time might break you out of the visual flow of things being nested
15:59cYmenman...lazyness is so weird :)
16:00cYmenI keep messing stuff up with debug prints. :)
16:00llasramakurilin: Kind of. The way built-in syntax-quote works is optimized for generating data structures which represent Clojure code. backtick generalizes that so you can use the same facilities to generate data structures which represent other things
16:01llasramakurilin: One example could be something like hiccup, although hiccup actually has it's own work around -- any lazy seqs are spliced into their containing sequence
16:04akurilinllasram, got it!
16:05shai_i feel stupid. All these plugins and github forks have me kind of stressed out
16:05bitemyappshai_: hum?
16:05shai_I downloaded leingen and now I need to download lein-cljsbuild
16:05shai_grrrr
16:05bitemyapplol.
16:05bitemyappshai_: you haven't run into any actual problems yet, it's going to be okay :)
16:06shai_but how come these aren't provided from the people at clojure.com? Do we have to depend on these developers to maintain their plugins?
16:07llasramUltimately we all die alone, shai_
16:07shai_llasram, so were helpless
16:07shai_clojure is a hyped language for the moment, but once support dies, it dies
16:07llasramNah, because at least with this software, it's all open source :-)
16:08llasramIf you're in a position where you want to pay for support, Clojure may not be the language for you at the moment
16:08shai_I wonder if im better off just learning common lisp or scheme?
16:08shai_fuck paying for support
16:08llasramOk. Then what's the problem?
16:08llasramThe code is there, the community is active
16:08llasramEverything's good
16:08shai_yeah, im tripping
16:09tbaldridgeif you don't want to pay for support, don't. Otherwise do and talk to Cognitect
16:09tbaldridgethere's no forcing anyone either way
16:11shai_I guess I just need to become proficient enough to write plugins and libraries when needed to help myself and the community
16:11shai_I hope clojure stays alive and healthy as the years go on
16:11tbaldridgewhat language doesn't require that?
16:11jared314shai_: are you looking for a long-term language, or something you can sell to a management?
16:12shai_no your right, my frustration just comes from jumping around language to language. I still havn't found my niche
16:12shai_I just want to grow up with a solid language.
16:12jared314there is no solid language
16:12shai_I've read hackers and painters and Paul Graham sold me on lisp
16:12shai_and then i've been using javascript for my internship and #javascript recommened clojurescript which excited me
16:13tbaldridgebeing a polyglot isn't bad. I've forgotten how many languages I know.
16:13jared314my first car was a old ford truck, then it was a jeep, and now a vw
16:14jared314i still drive the same
16:14bitemyappshai_: just learn.
16:14shai_you are all right, thanks for the truth :)
16:14bitemyappshai_: there are no final languages, you should rejoice in this.
16:14cYmentbaldridge: I tend to remember which languages I knew but not the languages. :)
16:14muhoollasram: hoplon
16:14shai_yeah, always cool stuff to learn and projects to work on
16:14bitemyapptbaldridge: Cognitect offers straight up, "how do I Clo-jurr?" support?
16:16muhoocYmen: i started using clojure.tools.trace and my printf factor reduced significantly
16:16tbaldridgebitemyapp: money talks, right? :-P
16:16llasramI assumed it'd be more: "My business is on fire because of this bug in `clojure.core/map`. Fix it for me, Cognitect."
16:16bitemyapptbaldridge: I guess, it just tickles me.
16:16llasrammuhoo: Huh. The Lisp Curse, I guess
16:17tbaldridgeI mean, we are a consulting company, so we've worked with companies in the past that say "we need help ramping up our people on Clojure".
16:17bitemyapptbaldridge: I shanghai'd a coworker into learning Clojure and Datomic on the @work project and he was able to pick everything up on his own just fine (Python guy). Paying support for that would baffle me.
16:17bitemyappBut, whatever spreads the Clo-mpire I guess.
16:17cYmenmuhoo: looks interesting, thanks
16:17tbaldridgebitemyapp: I'm not saying I'd pay for something like that, but if you want to pay me to teach Clojure...heck-yes!
16:17shai_wait im not understanding now lein-cljsbuild works, do i grab it from github and place it in my projects /src directory?
16:18bitemyappshai_: no. it's a Leiningen plugin.
16:18bitemyappshai_: things that start with "lein-*" are generally Leiningen plugins.
16:18shai_ok
16:18bitemyappshai_: you put Leiningen plugins in the :plugins vector of your project.clj just like the :dependencies.
16:18bitemyappnobody say a fucking word about profiles.
16:19llasramshai_: I think someone already linked you, but seriously, do try starting here: https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-01.md
16:19shai_bitemyapp, so I don't have to download anything, just add that one line of code in project.clj
16:19bitemyappright.
16:19bitemyappshai_: dnolen has graciously put an example CLJS project online where you can look at the project.clj https://github.com/swannodette/mies
16:19bitemyappoh woops, that's the template.
16:19bitemyappshai_: just follow the "Usage" instructions and then look at the project.clj
16:19shai_bitemyapp, right, thanks again
16:20bitemyapphttps://github.com/swannodette/mies/blob/master/src/leiningen/new/mies/project.clj
16:21bitemyappgf3: jealous of kitty *_*
16:22muhoollasram: it's not just lisp, it's linux too.
16:22llasramIn what sense?
16:23muhoowhen i was working as a musician, i used linux as my instrument and studio. people would say "oh, do you use ableton?" and i'd say, no i use two dozen synths, sequencers, plugins, etc, and my own custom code, all glued together with python and bash, and they'd look at me ike "uh, yeah, but what program do you use?"
16:24bitemyapplmao.
16:24llasramnice
16:24muhooso composability isn't just a lisp thing, it's kind of a unix thing too.
16:25llasramWell, as long as they're actually composable
16:25muhooso now people say "oh you write web apps in clojure? what framework do you use?"
16:25muhooand i say, uh, i have a project.clj that's 300 lines long...
16:25muhooand they say "right, but what framework do you use?"
16:26muhooso the facepalm has remained constant
16:26bitemyappmuhoo: I've talked to people that didn't seem to understand the value of not having to throw out your car just because the alternator needed swapped.
16:27cYmenSomehow I don't find that question odd. I mean if you write a webapp in 300 lines you have to have support libraries. :)
16:27muhoocYmen: i meant the project.clj, which is the list of, and configuration for, libraries
16:28muhoothat doesn't include the actual code (which is often very short because the libraries and language are so good)
16:28cYmenSo you use a lot of libraries but not "one" framework?
16:29mtpa framework is made up of....
16:29mtpDRUMROLL PLEASE
16:29mtpl i b r a r i e s
16:29cYmenMONKEYPOOP!
16:29cYmenoh libraries...i was gonna say libraries
16:29jared314rainbows?
16:29jared314i thought it was rainbows
16:30`cbpgems
16:30mtpproject.clj *is* the framework
16:30jared314so lein is your framework?
16:30cYmenhrhr
16:30mtpwhat
16:30mtpno
16:30muhoodog is my copilot
16:30mtpthe framework is nothing more or less than the libraries you use
16:30mtpbut the name-of-the-thing is not the thing
16:30llasramA framework is a library become obsessed with its own abstractions
16:30mtpthere
16:31cYmenhaha
16:31muhoothat's good
16:31mtpobsession is usually bad
16:31cYmenindeed
16:31muhoo~framework
16:31clojurebotexcusez-moi
16:31muhoo~framework is a library obsessed with its own abstractions
16:31clojurebotOk.
16:31muhoo~framework
16:31clojurebotframework is a library obsessed with its own abstractions
16:31mtp:)
16:33llasramOne day I will actually read clojurebot's source, and learn how to use it
16:33jared314i've looked at it
16:33muhoolazybot seems pretty readable. not sure about clojurebot
16:34cYmen~lazybot
16:34clojurebotlazybot is echo ~lazybot
16:34muhoo~clojurebot
16:34clojurebot"More human than human" is our motto.
16:35jared314can you def functions in the clojurebot sandbox
16:35jared314?
16:35muhoo,(def foo "bar")
16:35clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
16:36muhooNO SANDBOX! DENIED!
16:36muhooall i wanted to do was play stairway to heaven :-(
16:36muhoohey, wait.... "sanbox"
16:36muhoois that a box with a storage area network in it?
16:37jared314i think it's a part of a storage area network
16:37jared314like a router
16:37muhooit's a typo, obviously. i'm being a smartass
16:38jared314no no, i think it is something more
16:39jared314there is no way something that sophisticated would make a simple mistake like that
16:40shai_I'm getting an error when trying to cljsbuild
16:40shai_http://pastebin.com/8FUrRg4X
16:40jared314check your project.clj formatting
16:40jared314it has a syntax error
16:41shai_http://pastebin.com/gMZkuj9E
16:42jared314you don't have enough } ] ) at the end
16:43jared314it looks like a missing } at the end
16:43shai_jared314, yeah that was it. thanks!
16:51shai_success! However, looking at the .js script file that clojure compiled, it seems like a lot of code for a simple hello world statement
16:51shai_isn't that like really slow for the browser?
16:51jared314what optimizations have you turned on?
16:51shai_whitespace
16:51shai_and pretty code
16:52jared314have you tried advanced?
16:52shai_nope
16:52shai_:optimizations :whitespace :advanced?
16:52tbaldridgeshai_: when you do advanced and gzip it, most apps I've worked on are < 40KB. That's about the size of jquery. For an entire app
16:52shai_hmm
16:54tbaldridgeadvanced compilation turns on the Google Closure optimizing compiler that removes tons of code.
16:54shai_if i want multiple optimizations would it be :optimizations :whitespace advanced
16:54jared314i don't think you need whitespace with advanced
16:54tbaldridgejust advanced
16:55shai_k
16:55tbaldridgebut you won't be able to read that code at all, so only use it at the end
16:55shai_and then lein cljsbuild once everytime i change something right?
16:55jared314or auto
16:55shai_cool
16:56jared314but do a clean build every so often
16:56shai_ok
16:56jared314sometimes it keeps stuff around
16:57shai_time to hack the repl!
17:18astoddardI am trying to do some clojure evangelism to a Netbeans user. What is the current recommended Netbeans tooling for Clojure?
17:20jared314i think enclojure died
17:21bitemyappastoddard: closest equivalent is CCW + Eclipse, otherwise, Emacs.
17:21astoddardSo enclojure was THE netbeans plugin and it is no longer active?
17:21_scapeCCW is standalone(ish) now
17:22jared314i've heard la clojure is getting better
17:22jared314but i don't use intellij
17:22astoddardI'm an Emacs user myself. But the guy I'm trying to gently push towards Clojure is Netbeans all the way.
17:24bitemyappastoddard: that's regrettable (for them)
17:25jared314astoddard: you can't save them all
17:26seangrovebitemyapp: Meh, the tooling for clojure (emacs included) is pretty woeful
17:26seangroveI think LightTable has the potential to do a lot more...
17:26bitemyappsometimes, da. Being hung up on a particular IDE like Netbeans is pretty limiting though.
17:27bitemyappIt's hard for me to complain about tooling with Leiningen though.
17:27bitemyappIf you've done Python, you'll know what I mean.
17:27seangroveMaybe Cider? I'd like to see things like slamhound, pedantic, etc. working in realtime with every keystroke highlighting unused vars, imports, type errors, etc.
17:27bitemyappCider is just nrepl.el
17:27seangrovebitemyapp: Oh yes, there's a solid foundation, but thinking about extending it up and into editors
17:27tbaldridgeLightTable has yet to prove it can actually be anything more than a half decent text editor with a cute repl
17:28bitemyappI'm not part of the YC mafia, so I'm skeptical as well.
17:28seangrovetbaldridge: I agree, but curious to see how the plugins work when it comes out
17:28tbaldridgesadly, every time I use LightTable it seems that they removed something. These days you open it up and it's just a blank screen with some text. Where's the ui?
17:29tbaldridgeI think LT is suffering a bit from feature creep and wanting to "save the world".
17:29jared314i thought that was the point of a good text editor?
17:29_scapei ended up dropping LT
17:29bitemyappthe instarepl thingy is nifty, I could actually use the continuous/instant feedback, but everything else is o_o
17:29_scapeusing sublime text 2 with an nrepl plugin i found on git, works well enough
17:29seangrovetbaldridge: Well, I've only used it for a few minutes, but I assume extending it to handle things like intelligently highlighting unused imports, marking impure functions, type errors, etc. is probably easier than emacs
17:30tbaldridgehas anyone done that yet? If not it's all vaporware.
17:30seangrovetbaldridge: In the java world, yes
17:30tbaldridgein LT?
17:30jared314that will depends on when they actually release the plugin api
17:30bitemyappthat's really common in the Java and .NET world.
17:30seangrovetbaldridge: No, jetbeans or eclipse, or whatever they use
17:30bitemyappnetbeans*
17:30seangroveFrom what I understand, haven't used it myself, just watched it
17:31seangroveClojure has definitely done a better job of keeping the smarts in libraries rather than the editor, compared to CL & smalltalk
17:32seangroveI'm just eager to see some of those things come together and have emacs (and friends) make use of them
17:33tbaldridgebut can you do stuff like prove pure functions in clojure? Is reduce pure?
17:33seangrovetbaldridge: I don't know, just a fantasy of mine, but certainly the other stuff is lower-hanging fruit
17:34bitemyappI'm secretly hoping ambrose learns the joy of monads so that we can start annotating impure functions with the IO Monad.
17:34bitemyapp: ann println [Any * -> IO ()]
17:36astoddardI was hoping to push a Netbeans clojure plugin as a "gateway drug". Seems like I need a different tack. Emacs or vim are unlikely a good sell to my "mark". I wonder if a straight jump to LightTable is viable.
17:37jared314he will be complaining about the lack of Netbeans
17:37shai__So far I am only able to see my simple.html file that is hosted on 0.0.0.0:8000 via pythons httpserver, however I'm having difficulty with the repl
17:38shai__I created the connect.cljs file and specified http://0.0.0.0:9000/repl as the location
17:38shai__when I navigate there, I get an alert box saying no 'xpc' param provided to child iframe
17:39shai__I have a cljs prompt: ClojureScript:cljs.user> (js/alert "hi")
17:39shai__after I execute, I don't see anything on the browser, and the cursor in my terminal sort of stays there, doesn't give any indication of success
17:40noonianshai__: how did you start your cljs repl?
17:40shai__lein trampoline cljsbuild repl-listen
17:41noonianand in your cljs code do you have a line that tries to connect to the listening repl?
17:41shai__http://pastebin.com/T2jtkJu0
17:41shai__noonian ^^
17:42noonianone thing i do to make sure i am connected is, after i start a fresh repl i'll type a simple expression like "(+ 2 2)" that should not return until the repl is connected
17:43noonianthen you visit your web page and if the repl returns 4 you know you are successfully connected
17:44_scapeanyone programming with lwjgl? wondering how to simply work with repl and the gl context thread in lwjgl
17:44dobry-denIf you have (defn dup [stack] (cons (peek stack) stack)), how come (dup (dup (list 1 2))) doesn't work? ("Cons can't be converted to IPersistentStack")
17:44ziltiI have this line in my code (defmethod construct-node 'javafx.scene.Scene [clazz args] (run-now (clojure.lang.Reflector/invokeConstructor (resolve clazz) (to-array [(:root args)]))))
17:45ziltiIt works perfectly fine when used from the REPL, but when called from inside the code with exactly the same arguments, I get a ClassCastException claiming "clojure.lang.Symbol can't be cast to"
17:46shai__noonian, yeah my repl isn't returning anything, and i visted my website...
17:46dobry-den,(let [stack (list 1 2 3)] (cons (peek stack) stack))
17:46clojurebot(1 1 2 3)
17:48dobry-den,(let [stack (list 1 2 3), dup (fn [s] (cons (peek s) s))] (dup (dup stack)))
17:48clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Cons cannot be cast to clojure.lang.IPersistentStack>
17:51dobry-denOh yeah, conj works for lists
17:51dobry-dencons is something special. mahbad
17:51dobry-denI think this is the first time i've ever deliberately used a list
17:52llasramI needed to recently, and it's oddly difficult
17:52llasram,(class (list* [1 2 3]))
17:52clojurebotclojure.lang.PersistentVector$ChunkedSeq
17:52llasram,(class (list* 0 [1 2 3]))
17:52clojurebotclojure.lang.Cons
17:52llasram,(class (apply list 0 [1 2 3]))
17:52clojurebotclojure.lang.PersistentList
17:53llasram,(class (conj (list 0) 1))
17:53clojurebotclojure.lang.PersistentList
17:53llasram,(instance? clojure.lang.Counted (list 0))
17:53clojurebottrue
17:53llasram^^ makes it worth it
18:01jared314is there a way to expose a namespace from a lien plugin in the lein repl?
18:02bitemyappllasram: makse what worth it?
18:03ziltiHow for ***** can it be that a function acts entirely differently depending on where it is called from when the arguments are *exactly* the same?
18:04akurilinOk I'm going to ask this here, I don't where else. Is there a way to "force" a certain set of PDF contents to all fit on one single page? As in, I want to repeat the same template once per page, but the content can change possibly to the point where it spills over to the next page.
18:04akurilin(using clj-pdf)
18:05seangrovezilti: Certainly possible
18:05seangroveThat whole "pure" thing :P
18:05ziltiseangrove: How do you mean? The function is pure
18:06seangrovezilti: What's the source?
18:06technomancyjared314: no, lein enforces isolation between itself and the project
18:07jared314technomancy: so :injections and :init are the only way?
18:07seangrovelynaghk: Given your experience with angular and core.async, would you do anything differently now if you were making a clojure(script) app that had to work well on mobile as well?
18:07ziltiseangrove: https://www.refheap.com/20414#L-246
18:09seangrovezilti: No idea, never worked with that api
18:10seangroveIt's resolving the constructor at runtime though, so presumably if the class def has changed, then that method changes
18:11llasrambitemyapp: Oh, that PersistentList is Counted, so `count` is O(1)
18:11ziltiseangrove: I trigger the call of construct-node both times manually - once directly by calling it (that way it works) and once via the "fx" macro (fails with ClassCastException)
18:15llasramzilti: Your fx macro doesn't have any syntax-quoted forms. AFAICT, the body will directly run during macro-expansion
18:15ziltillasram: That is, when I call it. And I call it from the REPL.
18:18srrubyI want to have my json output pretty printed in a manner that produces valid json. json/pprint doesn't seem to work. I'm able to pretty print in node using JSON.stringify.
18:25_scapeanyone programming with lwjgl? wondering how to simply work with repl and the gl context thread in lwjgl
18:27bbloom_scape: i've played with it a bit
18:27bbloomi made a separate namespace for the "window", so that i could reload the file i was working on a bunch w/o having to worry about disturbing the context thread
18:28_scapeinteresting
18:28_scapei'll definitely try that
18:28bbloomthen you just "send" a function to the window
18:28bbloom& it runs it on it's thread
18:28lazybotjava.lang.RuntimeException: Unable to resolve symbol: it in this context
18:29_scapedo you have any code on git i could peruse?
18:29_scapehow would you send the window thread your code? that's where i am struggling, I want to be able to do some interactive work with it via repl
18:30shai__what could be a possible reason for lein cljsbuild auto to stay stuck at Compiling ClojureScript?
18:30seangroveshai__: No changes to the source?
18:32shai__seangrove, that would make a lot of sense
18:33bbloom_scape: i'm running ` $ find . -depth 2 -name 'project.clj' | xargs grep lwgl` hold on :-)
18:33_scapehah no
18:33_scapenp
18:36bbloom_scape: this code does way too many random unrelated things to be useful to learn from :-P
18:36bbloom_scape: but mainly what i did was simply (.start (Thread. run))
18:36bbloomand run simply did @render each frame
18:37_scapewas render an atom or a thread?
18:44_scapebbloom: as in? (def render (.start (Thread. run)))
18:46devnhard problems.
18:46tbaldrid_devn: I've heard they are so freaky fast they may get it to you before you release the enter button
18:46devnhaha
18:47devni can't be bothered to fill out forms!
18:48_scapelol devn
18:48_scapethat rocks
18:48devnmore than anything it's going to be fun to write the functions for selecting toppings
18:49devn(with-toppings [...] (sandwich :bread :wheat ...)) or something
18:50devnit needs to be macro-laden and over-engineered
18:50devnmaybe use core.logic to declaratively generate sandwiches
18:50_scapelol
18:53bbloom_scape: nah, i had (comment (.start (Thread. run))) for testing
18:54bbloomwhat you can also do is something like this:
18:54bbloom(.start (Thread #(run #'render)))
18:54bbloomthen when you redefine render, it updates dynamically
18:55_scapeinteresting, ok thanks
18:57noonianhas anyone experimented with using precompiled clojurescript + node.js for shell scripting?
19:23Morgawrdefn- binds a function locally inside the namespace, right? if I try to call that function from outside that namespace it won't exist at all?
19:25hiredmanno
19:26hiredmandon't use defn-
19:26hiredmanprivate is silly, don't do it
19:27unsymbolagreed
19:33Morgawrhiredman: why is it silly?
19:36hiredmanMorgawr: make things private only makes it harder for possible downstream consumers of your code to reuse it as they like
19:36seangroves/like/need
19:36hiredmanoh? would this code be perfect for you if you could just access it? oh you can't because I said it was private? too bad
19:37hiredmanprivate is a self inflicted wound
19:37Morgawrhiredman: I don't agree, generally yes but if I am storing some global data that I need to use only internally in my namespace (and I don't *want* anybody to tamper with it), I see no reason why I'd want it to be public
19:38hiredmanMorgawr: right, that is your point of view, what about the point of view of the consumer of your code?
19:39hiredmanis code more reusable and customizable if everything is open and accessable, or everything is closed and hidden?
19:39Morgawrthe library/code is open source if they want to tamper with my code, this specific data is not required outside of my namespace though and accessing it from outside it is also a design problem in itself so the user should not use it
19:40MorgawrI don't really see the roblem
19:40Morgawrproblem*
19:40MorgawrI'm not talking about hiding some important function or anything
19:40hiredmanforcing people to fork and do their own release is silly
19:40MorgawrI'm not saying that, I'm just saying that there is no way somebody would even need this in the first place
19:41hiredmanMorgawr: so why make it private?
19:41hiredmanif there is no possible reason for someone to use it, then leaving it public they still won't use it
19:41hiredmanprivate is silly, qed
19:41mtp if there is no possible reason for someone to use it, WHY ARE YOU WRITING IT
19:42Morgawrbecause a user accessing it (even by accident or because they don't properly understand the function interface to my library) is an error that I want to avoid
19:42Morgawrmtp: because I use it internally
19:43mtpMorgawr‘ maybe your internals should have a better interface
19:43hiredmanMorgawr: I'll worry about errors in my program, you worry about errors in your library
19:43Morgawr:|
19:43hiredman(which isn't even true, I'll end up worry about errors in the whole thing regardless)
19:45metellusprivate is good because it lets you define your api and be able to mess with the internals all you want
19:45metellusconsumers shouldn't know about the implementation
19:45hiredmanmetellus: no, that is what versioning lets you do
19:45Morgawrversioning AND having a clear public interface
19:45hiredmanno
19:45bitemyappfuck ^:private. Wall-hack 'til the end.
19:45hiredmanprivate doesn't make a clear public interface
19:46Morgawrwith versioning you know when you are breaking the external interface, having internals and private stuff means you can change that WITHOUT breaking the interface (see: difference between minor and major versioning)
19:46hiredmanMorgawr: internal is not the same as private
19:46Morgawrdefine: internal
19:47mtpprivate is bad because it is meaningless
19:47hiredmanmost clojure code exists as a collection of namespaces, clojure's "private" is namespace level, if you have internal things that you want to use from another namespace, they cannot be clojure private
19:47mtpthat access control is rarely *actually* useful for anything besides obfuscation
19:47bitemyappinternal is namespace private, private is class/instance private.
19:47bitemyappprotected is inherited class/instance private
19:47Morgawrokay, I want something internal that *cannot* be accessed from outside the namespace, why is that bad? :|
19:47hiredmanso if you have a large code base clojure's private is already pointless
19:48mtpMorgawr‘ why do you want it inacessible
19:48bitemyappprivate can goooooo toooooo hellllllll
19:48hiredmanMorgawr: because it limits reusibility
19:48mtpif nobody else needs it, why write it
19:48mtpyou seem to think you need it, but are you the only person who uses your code??
19:48lazybotmtp: Uh, no. Why would you even ask?
19:48Morgawrmtp: because users modifying it (if it's an atom for example) outside of the namespace can break everything and I don't want it to be mistaken as something a user of my library can (or should) access in the first place
19:49Morgawrit's like asking why we'd want stuff that is read-only anywhere
19:49danlarkinprivate is easy for people to "get" so it's popular to use before you realize its ramifications for those downstream (aka cursing a library author for making private the one function you need to use)
19:49mtpMorgawr‘ then it sounds like your design is fragile
19:49Morgawrthere is an obvious reason why somebody would want a read-only data
19:49bitemyappMorgawr: then make it immutable, doofus.
19:49mtpMorgawr‘ apples and oranges
19:49Morgawrbitemyapp: but it needs to be mutable inside my namespace but not accessible from outside it
19:50bitemyappMorgawr: you're writing bad code. `rm -rf` and try again.
19:50zalzanelmao
19:50Morgawryeah no ;)
19:50mtpthen it sounds like your design is poorly abstracted
19:50bitemyapp^^ this.
19:50MorgawrI mean, I am most likely writing bad code but this is a generic question
19:50bitemyappit's a bullshit question
19:50mtpeither case, it sounds like a generic DESIGN problem
19:50bitemyappyou're setting up a bullshit non-necessity to cover for deeper problems.
19:50mtpso change your DESIGN
19:50danlarkinnothing needs to be "protected"
19:50Morgawrokay, let's go back to my question
19:50bitemyappUnfuck your design and watch your problems fall away.
19:50mtpno, let's not
19:50Morgawr00:23 < Morgawr> defn- binds a function locally inside the namespace, right? if I try to call that function from outside that namespace it won't exist at all?
19:51bitemyappMorgawr: why don't we stop with the x-y bullshit and you tell us what you're actually trying to accomplish?
19:51MorgawrI just asked a question about defn-
19:51Morgawrand the only response I got was "don't use it"
19:51hiredmanMorgawr: there is a step in the clojure compiler's var resoution that checks the private flag
19:51mtpit is a bad question, reasoned from badly thought-out premises
19:51Morgawrwhich is not the answer to the question I asked
19:51mtp<mtp> it is a bad question, reasoned from badly thought-out premises
19:51Morgawrmtp: please leave, kthx
19:51mtpneed i go on
19:51hiredmanMorgawr: if you do manually var resolution the flag doesn't get checked
19:51mtpno
19:51mtpplease liset
19:51mtplisten
19:52danlarkinyall need to chill out
19:52mtpyou are asking for help, and telling us that /we are wrong/
19:52hiredmanMorgawr: defn- still creates a globally interned var, it just has a private flag on it
19:52Morgawrhiredman: what's manual var resolution?
19:52Morgawrmtp: no, I'm not asking for help, I'm asking for a clarification on the clojure internals, stop trying to answer a question I did not ask
19:52bitemyappwell if you don't know what that is, you probably shouldn't be trying to do shit like this.
19:52Morgawrbitemyapp: I've seen it used and I wanted to know how it actually worked
19:52Morgawrjeez
19:52mtpMorgawr‘ stop asking questions you don't understand
19:53Morgawrnext you'll be telling me to not use anything I do not know about
19:53mtpyep
19:53bitemyappI want you to stop trying to write C# in Clojure.
19:53Morgawrdude what
19:53Morgawrare you drunk?
19:53mtpmaybe you should understand what you are trying to do before you do it
19:53bitemyappnot for at least 48 hours.
19:53Morgawr:P
19:54mtp"how it actually works" is irrelevant to the problem you are trying to solve
19:54bitemyapp~xy
19:54clojurebotxy is http://mywiki.wooledge.org/XyProblem
19:54Morgawrmtp: the problem I am trying to solve is to understand how defn- works
19:54mtpMorgawr‘ no, it isn't
19:54bitemyappMorgawr: http://mywiki.wooledge.org/XyProblem
19:54bitemyapp~botsnack
19:54mtpyou keep insisting that it is
19:54MorgawrI don't get why you all jumped the ship and flamed me for asking a simple question
19:54clojurebotThanks, but I prefer chocolate
19:54bitemyappMorgawr: the question betrayed the whiff of evil. We're going to scourge you now.
19:54mtpMorgawr‘ because it isn't as simple as you want it to be
19:54Morgawr:|
19:55MorgawrI
19:55Morgawrjust
19:55Morgawrasked
19:55Morgawrhow defn- works
19:55mtp<mtp> "how it actually works" is irrelevant to the problem you are trying to solve
19:55MorgawrI DON'T HAVE A PROBLEM TO SOLVE
19:55Morgawrjesus christ
19:55mtp<mtp> "how defn- actually works" is irrelevant to the problem you are trying to solve with deft-
19:55bitemyappI should write a script that automatically forks Clojure libraries and pushes the same libraries up to my own repo but with all defn- removed.
19:55mtpthen maybe you should come up with a problem then
19:55bitemyapps/defn-/defn/g # FREEDOOOOOOOOMMMMM
19:55Morgawrmtp: the problem is that I am stuck chatting with trolls like you
19:56zalzanewow the nerd drama is hot in here
19:56danlarkincan't you guys calm down? this isn't helpful to anyone
19:56mtpinstead of trying to solve nonexistent problems in the guise of 'learning'
19:56danlentz0Has anyone tried to lein repel
19:57Morgawrdanlarkin: yes, sorry, I will calm down
19:57danlentz0Lein REPL :connect to a heroku template configured dyne recent
19:58danlentz0I am getting the message "port is required"
19:59danlentz0This is a stock lein new heroku fooapp
20:00danlentz0And having followed the getting started docs
20:01jared314are you passing a port in your Procfile?
20:01danlentz0Has something changed in the way lein REPL :connect http://user:pass@host.com/REPL works?
20:02danlentz0Jared314 no
20:02danlentz0Now where did it say to do that?
20:03jared314danlentz0: well, you shouldn't need too because the template looks in the env var for the port
20:03jared314but i was just asking
20:04Morgawrso, now I know that to rile up this channel I need to mention private functions and defn- :P it's great
20:04danlentz0What env var?
20:04Morgawrsorry for causing a flame war though, really
20:04Morgawrit wasn't my intention
20:04danlentz0PORT if not set seems to default to 5000
20:05jared314private functions!
20:05jared314i hate private functions
20:05jared314am I to late for the flame war?
20:05Morgawryes
20:05brand0I thought nREPL defaults to a random port
20:06bitemyappjared314: you're right on time, grab your stick and start beating Morgawr
20:07danlentz0brand0: So where am I supposed to provide that port
20:07danlentz0In Procfile?
20:07brand0you can change it in your profile.clj if you're using lein
20:08brand0under defproject add :repl-options {:port 50000}
20:08brand0for example
20:08danlentz0That would be like :repl-options {:port 1234}
20:08danlentz0?
20:08brand0yep
20:09danlentz0Sorry i was typing while you wre
20:09danlentz0Ok thats perfect.
20:09danlentz0Someone should add that tidbit to the readme
20:09brand0it's handy
20:10brand0which readme?
20:10danlentz0The lein heroku template
20:12brand0I had to dig for that option, I found it on a mailing list somewhere
20:13danlentz0Btw I've been pretty dazzled by the clojure heroku experience. So far. I've been really down on heroku for a long time b/c it really seemed to me like a total PITA but the clojure heroku experience is remarkably pleasant
20:13brand0actually, it's in the sample.project.clj now that I look for it
20:16danlentz0Leinegan has truly been one of the most significant assets clojure could have ever asked for
20:18danlentz0I'm not sure if you can totally appreciate it w/o spending some time in common-lisp for example where everyone individually does all that stuff by hand.
20:19danlentz0And there is no agreement between any two given developers on best practice
20:19brand0yeah, I resisted lein at first
20:19brand0but it's invaluable
20:19brand0danlentz0: are you using the heroku free instance?
20:20danlentz0brand0: Yup
20:20danlentz0danlentz.herokuapp.com
20:20danlentz0And the free PostgreSQL
20:20bitemyappLeiningen is happy-time.
20:20brand0woah it took forever to load lol
20:21brand0there we go
20:21danlentz0It's only a little weird it's not written in clojure tho
20:23danlentz0It was a tragic mistake that the slime devs were so unfriendly to user community contributions and in particular outright obstructionist toward clojure
20:24danlentz0But in the end clojure will be better off because of it, since it was possible to build nREPL in a much better thought out manner
20:26danlentz0The emacs/clojure experience is not yet as nice as the CL/ slime but when it does get there it will be built on a considerably more solid foundation
20:27danlentz0Although the CIDER renaming did hack me off a bit recently
20:29jared314i had not heard about the CIDER renaming
20:29danlentz0But hopefully that will be the final project/splitting/renaming/refactoring for a while
20:30danlentz0I just declared emacs bankruptcy and started over.
20:30danlentz0Couldn't deal with emacs-live etc. guess I am already too set in my emacs ways
20:31danlentz0Cider is a pretty crappy name choice also
20:32benkayi'm dreading the day i declare bankruptcy from emacs-live
20:32danlentz0 Try googling cider see how long you have to scroll before you find the emacs clojure link
20:32bitemyappbenkay: github.com/bitemyapp/dotfiles
20:32bitemyappbenkay: time to cowboy up.
20:33danlentz0I was like totally offline for 2 days.
20:34danlentz0It turns out without a basic set of core customizations
20:34benkaybitemyapp: that's a lot of dot
20:35danlentz0I can't even find my ass with emacs
20:35jared314isn't cider already the name of multiple different IDEs
20:35danlentz0It's like totally unusable by default
20:35danlentz0Shh. It's a terrible choice but let's not rename any more this week
20:36danlentz0Pretend you like it and move on.
20:37bitemyappbenkay: working Emacs + nrepl stack. Vanilla, no weird Emacs Live bullshit.
20:37danlentz0Lest I am cast back to the uncustomized emacs hinterlands in exile
20:37jasonjcknany one ever use jarjar with clojure
20:38bitemyapplein jarjar binks?
20:38jasonjcknuh yes?
20:38danlentz0Prelude is also rediculous IMO
20:38jasonjcknthere's a lein plugin?
20:38jasonjcknlooking..
20:39danlentz0I mean -- disabling the freaking ARROW keys for gods sake?
20:39danlentz0Could see at that point we would probably not be getting along
20:39jasonjcknbitemyapp: what did you mean by binks?
20:40jasonjcknbitemyapp: I don't see a lein plugin
20:40bitemyappI was being a smart-ass, sorry.
20:40jasonjcknok i got the reference
20:40bitemyappjasonjckn: do you want an uberjar or what?
20:40danlentz0If I want to fuck up my settings that bad I'm perfectly capable of fucking them up myself
20:40jasonjcknI want jarjar
20:41jasonjcknhttps://code.google.com/p/jarjar/
20:41bitemyappjasonjckn: dude, no.
20:41bitemyappjasonjckn: just use lein uberjar.
20:42jared314jasonjckn: uberjar does that
20:43shai__Do i have to compile my .cljs everytime I make a small change?
20:43bitemyappshai__: lein cljsbuild auto
20:43shai__bitemyapp, sometimes it stays stuck at Compiling ClojureScript
20:44benkayi have a project stalled out right now because clojurescript won't compile unless i blow away the resultant js files
20:44benkay(just noising up everyone's signal over here...)
20:44shai__it takes unncessarily long for a small change, such as updating the string set to (write js/document " ")
20:44benkay(i have zero intent to dig into this until after vacation)
20:45jared314wasn't there a cljsbuild bug about that
20:45jtoyis there a xpath /html parser for clojure? I dont see one
20:45jared314someone was saying to use the SNAPSHOT version
20:45danlentz0ClojureScript is ok to use on heroku right?
20:45jtoylike nokogiri in ruby
20:47shai__How come I updated my .cljs and without even compiling, the changes are reflected in the browser?
20:47shai__when i refresh
20:47jared314danlentz0: with results on node.js or the compiler?
20:47seangroveshai__: presumably you have cljsbuild running auto?
20:47shai__seangrove, ohhhhhh so I only have to run it once?
20:47seangroveshai__: more or less, yes
20:47shai__and after that, if I try to run it again it will be frozen
20:47shai__because its already running
20:47shai__ahhhhhhhhhhhhhhhhhhhhhh
20:48seangroveWhen you save a cljs file, you should see output from you cljsbuild
20:48danlentz0jared314: I will need to think thing through further
20:48shai__nowwww, i have seen a light
20:49danlentz0I was thinking that cljs would be able to build when I git push, just like it works with the clj
20:49jared314jtoy: I normally use enlive for that
20:50danlentz0Not intending for running JS server side
20:50shai__seangrove, how do I turn cljsbuild auto off
20:50seangroveshai__: just use cljsbuild once <profile name> if you only want to run it once
20:51jared314danlentz0: so a precompile asset type of thing?
20:51shai__cool
20:52noonianyou can use ctrl+c to stop the auto process
20:52seangrove$seen ambrosebs
20:52lazybotambrosebs was last seen quitting 1 hour and 25 minutes ago.
20:53jared314benkay: have you tried using lein-cljsbuild 1.0.0-SNAPSHOT?
20:53danlentz0Y that's all if been thinking of doing but you never know sometimes the task is modest at the start right up until the point at which I become carried away
20:54shai__noonian thanks
20:55danlentz0The discussion going on over in #lisp?
20:55danlentz0what do you guys think of clojure?
20:55danlentz0;)
20:55shai__dalentz0, what about it
20:56shai__how much different is clojure from common lisp
20:56danlentz0shai__: i mean that was it--- "what do you guys think of clojure?"
20:56shai__danlentz, that was my question
20:56shai__im a lost soul trying to navigate my way
20:57danlentz0shai__: Common-Lisp is shakespeare and clojure is Hemmingway.
20:57shai__perfect analogy
20:57shai__thanks, that makes me pretty excited!
20:58danlentz0Minor in english lit finally pays off 20 years later...
20:58jared314danlentz0: i think you need a custom heroku buildpack for the precompile
20:58jared314danlentz0: http://kolov-it.com/clojurescript-on-heroku-extra-build-step-on-deployment/
20:58shai__danlentz0 :)
20:59danlentz0Y i made that same metaphor to some common lispers yersterday and they seemed pleased by it too
20:59shai__and similar to how we studied shakespeare as well as hemmingway in high school, we can work with both CL and CLJ to re-inforce each other
21:00shai__and provide a broader understanding
21:01danlentz0And its absurd to say that shakespeare should be discarded because we have hemmingway.
21:01danlentz0Or the reverse
21:02shai__danlentz0, exactly
21:03shai__so clojure offers all the libraries that java offers?
21:03shai__Can I get through college working with clojure instead of java?
21:03danlentz0They are both brilliant, and we are very fortunate to have both
21:03shai__we're talking about java and clojure now right?
21:04shai__we're able to write a program in half java and half clojure?
21:04benkaybitemyapp: there's gold in them thar dotfiles. the .lein/profiles.clj in particular
21:05danlentz0You will have instructors whose whims you will be forced to appease regardless so just expect it to be like that
21:05danlentz0Arbitrary
21:06danlentz0Some will have grudges against anything but {}
21:06shai__hmmm. I've heard functional programmers are generally more capable
21:06danlentz0() will be considered outcast, unclean
21:07shai__i don't know how accurate that is, but so I've heard
21:07shai__is that just another political subjective debate?
21:07jared314shai__: subjective debate
21:07shai__its so confusing though
21:07benkayso many factors
21:07benkaystarting with the parens
21:07benkayI AMS HOW PAREN LISP SUX
21:08jared314since I am not a paid to teach, I only care to inform the already curious
21:08shai__i like the ( ) in lisp, its simple
21:08danlentz0Umm i would draw the analogy that the generalization youre making is essentially racism
21:08danlentz0I mean its the same sort of reasoning
21:08shai__the ( ) programmers being more capable?
21:09danlentz0Making broad generalizations like that about matters that are so intangible
21:10shai__hmmm
21:10danlentz0There are dumb java devs and there are brilliant ones.
21:11danlentz0Everybody gets to pick their own brush. Judge the painting not the easel
21:11dobry-denI don't think the benefits of functional programming are all that subjective.
21:11danlentz0There are wonderful benefuts
21:11danlentz0That does not imply all non-functional programmers are idiots
21:12shai__maybe not that their idiots, but they are sketching with a number 2 pencil and not a beautiful pen?
21:12danlentz0There are also cases where FP is not the most afvantageous approach.
21:13shai__true
21:13dobry-denthe a-ha moment for me was realizing that mutability should be an optimization, not a default
21:13jared314it has always been an optimization
21:14dobry-denand always default
21:14jared314because computers couldn't handle the immutable approach
21:14danlentz0Well in the end nobody cares what brand of pen was used to write the great literature. It only matters what words the author chose to write
21:15shai__danlentz0, true
21:16danlentz0Sometimes, neither is best and something nondeterministic apprach such as Prolog is the best way
21:17shai__i guess it takes time and experience to understand multiple paradigms and what suits a certain problem better
21:17shai__thats the real skill, to have fluid intelligence and be able to adapt
21:17danlentz0Sometimes what would work best is to sit down and peek/poke binary data directly to memory
21:17shai__lol
21:17clojurebotCool story bro.
21:17shai__lol
21:17danlentz0And you say, my god! Ive become a Turingnmachine!
21:18shai__is clojurebot a real person
21:18jared314no
21:18shai__what triggered his response
21:18danlentz0He cant vote but I think there are 12 states where he can legally get married
21:19shai__clojurebot, I demand that you speak to me
21:19danlentz0Clojurebot: seduce lazybot:
21:19clojurebotHuh?
21:19danlentz0lazybot: Seduce clojurebot
21:19shai__clojurebot, who created you
21:19clojurebotExcuse me?
21:19shai__you heard me very well
21:20shai__*read
21:20danlentz0The bots are not feeling the saturday night vibe
21:21danlentz0lazybot: Identity danlentz
21:21danlentz0lazybot: danlentz identity
21:21shai__they need some repl pebbles
21:22danlentz0No idea I don't speak bot
21:30shai__i can only run lein if I type .sh afterwards like lein.sh
21:30shai__how can I fix this?
21:31seangrovePut it in your PATH, remove the .sh extension
21:31seangroveMake sure it's chmod'd +x
21:35bbloomthen type `man bash` and start reading :-)
21:35bbloom^^ a good investment of your time
21:35shai__bbloom, i suppose. So much to learn, fun, yet frustrating
21:36bbloomman man
21:36bbloomthen from there, man bash
21:37shai__k, and then I'll try man bbloom :)
21:37bbloom~ $ apropos bbloom
21:37clojurebotTitim gan éirí ort.
21:37bbloombbloom: nothing appropriate
21:37shai__lol
21:37shai__,(+ 3 3)
21:38clojurebot6
21:38shai__thanks clojurebot
21:50bjaanyone know of a way to convince crate to not escape something during (html)?
21:50bjasomething like &raquo;
21:55seangroveSurely I must be crazy with this implementation of format-currency: https://www.refheap.com/20421
21:55seangroveThis is in clojurescript without any external dependencies, but there must be something infinitely more clear
21:56bbloomhaving recently done some i18n work... *cringe*
21:56bbloomhttp://numeraljs.com/ maybe ?
21:56bbloomactually wait no
21:56bbloomsurely gclosure has something for this
21:57seangrovebbloom: Good point, let me look that up
21:57seangrovebbloom: Yup, thank you for that
21:57bbloomyeah, goog/i18n directory
21:58bbloomnow, how to find a simple fucking function in that java-ish mess of an API w/ worse than javadoc custom nonsense
21:58seangroveNah, I'm a ninja at the closure docs at this point
21:59seangroveOne year of staring at them frustrated...
21:59bbloomi usually just grep around w/ vim
22:01bbloomugh. you create a MUTABLE NumberFormat object
22:02bbloomoddly, the first arg to NubmerFOrmat is a number|string, not a enum
22:03bjaseanaway: I'd be tempted to use goog.i18n.NumberFormat
22:03bbloomb/c they define the enum as a "static field" of sorts on the NubmerFormat class
22:03bbloomso the constructor can't take an enum value from there
22:03bjaerr, late to the party
22:04bjais there something hiccup-like in cljs that lets me say [:p "foo" (unknown-function-here "&trade;")] and get a paragraph with foo&trade; in it?
22:05bbloomer, clarifying what i said: the constructor *does* take an enum value from there, but the type system can't use that type to annotate the constructor
22:08seangroveI can't even get it to require the goog.i18n namespace properly
22:08bjanvm
22:09bjacrate does it via (html [:p "foo" (raw "&copy;")])
22:09seangrovebja: I'd recommend dommy over crate
22:09bjafor some reason, I don't think that was working 10 minutes ago
22:09bbloomseangrove: what happens?
22:09bjaseangrove: I'm using dommy at $dayjob, but had crate loaded in my repl
22:10bjaand frankly, I'm just using it as a hiccup renderer
22:10bjaI'm not certain that dommy or crate beat each other at rendering hiccup into dom elements. I'm willing to be shown that I'm wrong there though.
22:12bjaseangrove: if I'm already using jayq to do my dom manipulation, is there a particular reason to prefer a particular hiccup implementation?
22:12seangrovebbloom: Oh, nothing, just me being confused by some auto-cljsbuild stuff
22:13seangrovebja: I've just been very impressed with dommy, both from a templating and dom manipulation standpoint
22:13seangroveBut if you're happy with crate, then go for it, of course
22:14bjaseangrove: I like dommy a lot. I'm also absolutely sick of fighting misc 3rd party js that assumes I have jquery loaded up
22:14seangrovebja: Yeah, I just avoid jquery altogether at this point
22:14bbloomjquery is great at the same scale that CSS is great
22:15bbloomfor adding a little bit of behavior (style, in the case of css) in an aspect-oriented cross-cutting way for an otherwise static/simple *document*
22:15bbloomat application scale, both are a nightmare
22:15bjaseangrove: I wish that was an option for me. With the size of my team, building my own random UI controls has been a dream that we just don't have time for. Finding stuff that is both functionally complete (or close) and not depending on jquery has been challenging.
22:16bjait's possible I just don't know where to look though
22:16seangrovebja: Interesting. closure.ui is pretty complete, but I agree it was an incredible nightmare getting up to speed with it
22:16seangroveI mean, hard to communicate how much it hurt to get things built in it originally
22:17bjaby size of my team, I mean we're growing a 3rd developer, and our combined js experience is along the lines of "init jquery plugins to make Django/Rails/Wordpress look prettier"
22:18seangrovebja: And you're using cljs?
22:18bjasean, 0 frontend people. cljs seemed easier since we're already in clj
22:18bjawith our app, there's actually very little browser-specific stuff
22:18seangroveSounds like a recipe for disaster :P
22:18bjait's worked out okay
22:19seangrovecljs isn't so amazing that you can get away from js yet.
22:19bjait's pretty close for us
22:19seangroveThat's awesome, especially if you haven't done much js before. I wouldn't have thought it would work out well.
22:20seangroveI wonder if you're an exceptional case, or if the cljs env is just more complete than I realized
22:20bjait helps that our app probably ports to Android or Swing with 20% code change (the dommy stuff)
22:20bbloomi guess w/ source maps now, you can probably avoid js pretty well
22:20bbloomjust need to know enough for interop
22:20bjaI read output cljs at an 8th grade level
22:20bjawell, output js from cljs
22:20bbloomi've seen some 8th graders rocking some js :-P
22:21seangrovebbloom: I don't think the source map tooling is at a practical level yet
22:21bjait took us a bit longer in some places where others might have not been hung up
22:21seangroveUntil it's tied together with cljs-build and compojure as middleware so it "just works", that is
22:21bjawe didn't know that jquery binds clicks to like everything on your page for instance
22:21bjaso when we imported our first jquery-using visualization stuff randomly stopped working
22:22bbloomyou might be talking about event delegation. you can usually just give a lower level selector to prevent capture
22:22bbloomhttp://davidwalsh.name/event-delegate
22:25bjaat the end of the day, we work mostly with App, Pages, Panes, Widgets, and a couple services called Query and AuthN. You basically only need to know you're in a browser when it comes time to render html or listen to events
22:25bbloomso only when it really sucks, got it :-P
22:25bjathat said, I really enjoy writing go loops
22:28bjaI wish I had a resource on staff who really wanted to write stylsheets
22:38muhooi think they're called "designers".
22:38muhooand aren't too hard to find
22:40seangrovehah, muhoo, glad to see you have a sense of humor