#clojure logs

2013-09-08

00:00callenakurilin: and yes it has been solved.
00:01akurilincallen, I think one feature I was looking for was looking at a map of parameters and building a query from that. So for example, if :limit is nil, omit that part of the query altogether instead of having me manually write a (when)
00:01callendevn: disillusioned eh?
00:02callenakurilin: if you want to build queries from maps, use the fn* counterparts to the macros in Korma.
00:02callenakurilin: you don't, strictly speaking, have to use the macros at all.
00:02ArthurZTook a look at Korma, it's an ORM
00:02calleninternally Korma queries are just maps.
00:02callenArthurZ: it's not an ORM.
00:03callenit's a SQL abstraction library.
00:03callenthere are no objects or object state involved as far as what people typically use an ORM for.
00:03ArthurZThen what ORM is?
00:04ArthurZEntity Framework like but still
00:04akurilinArthurZ, amusingly, about two years ago I made the same statement at a clojure meetup, and people politely corrected me.
00:04callenArthurZ: not really @ Entity Framework. you're misunderstanding the wording used.
00:04ArthurZDoes Korma allow DDL?
00:05callenArthurZ: you don't really have a frame of reference for understanding what it is, so it's best not to conjecture based on one or two pages of skimmed documentation.
00:05callenbut suffice it to say, it's for interacting with SQL databases in terms of SQL.
00:05akurilincallen, OK let me look for those. If I could solve the boilerplate and DRY problem in my DAL, my life would be significantly more pleasant.
00:06ArthurZAha, yes, if it is using SQL it is not the ORM
00:06callenakurilin: just try to be a wee bit patient, the * fns weren't originally intended for "human consumption" - that having been said, I find them more pleasant than using c.j.j
00:06callenbecause again...it's just maps.
00:07akurilincallen, korma has no row and column "callbacks" does it? I have the habit to transform underscores into dashes once the data is back in Clojure and clojure.jdbc handles that case pretty well.
00:08akurilin(same with casting known column names to something else like joda time)
00:08gwsakurilin: i think korma has prepare / transform
00:08ArthurZA closer look reveals Korma is akin LINQ
00:09callen'ish. not quite as explicitly monadic but there's still a contextualization.
00:09akurilingws, fair enough, that seems to do the trick
00:11ddellacostaso, I'm a bit confused by nrepl.el. When I startup up a repl via jack-in, it won't pick up on namespaces from the project in the current directory? Is there a way to set it up to do that, or is the proper way to start up a separate repl in the project dir and connect to that?
00:12akurilinHm since you guys are trying to convert me back to korma, how's support for db-specific data types? I remember arrays being not supported outside of gfredericks' fork of korma, but I'm not using those anymore. What about simpler custom types like IP addresses and UUIDs?
00:12ddellacostathe latter works well enough, but I don't see why I can't access namespaces in the cwd by default. Hrm.
00:13callenddellacosta: I'd recommend doing it the "proper" way
00:13SegFaultAXThis song has been stuck in my head for like 20 hours straight...
00:14ddellacostacallen: which is...?
00:14callenSegFaultAX: http://www.youtube.com/watch?v=urNyg1ftMIU cure what ails ya
00:14callenddellacosta: lein repl in terminal, connect to the port explicitly with M-x nrepl
00:14ddellacostacallen: okay, thanks
00:14callenddellacosta: the reason for doing that isn't just do things work - other tooling needs it too.
00:14callenlike...grench.
00:15ddellacostacallen: ah, okay--thanks for the explanation.
00:15callenIMHO, they should just remove n-j-i
00:19sontekAll the cool kids are using cassandra + cassaforte now
00:20callencassandra is cool. managing a cluster of cassandra instances isn't incredibly awesome though.
00:21ArthurZI still can't figure what would be the reluable limit on the number of rows to ask from Cassandra
00:22ArthurZCallen: a Cassandra instance lives on each node
00:22ddellacostaargh, how do I fix the ugly-ass characters in emacs w/nrepl...
00:22callenArthurZ: my name is callen btw.
00:22callenddellacosta: what...characters? ANSI?
00:23ArthurZBut there are many questions about Cassandra how to say scale down, e.g removing nodes
00:23ddellacostacallen: yeah, I must be doing something dumb somewhere,either in my terminal config or something, I always get lost in the configurations…I've got urxvt on mac os x
00:24ddellacostalike, formatting characters look like so: ^[[36m
00:24callenddellacosta: that's ANSI. Where are they coming from?
00:24ddellacostacallen: well, I only see it in the *nrepl* buffer
00:24ArthurZDud I misspell your name Callen: ? Sorry if so, otherwise it is very nice to meet you, I am Arturo
00:24callenddellacosta: can I get a screenshot? do you know who is printing the ANSI chars?
00:24callenArthurZ: it's callen, not Callen.
00:25ddellacostaANSI huh...
00:25ddellacostacallen: um, yeah, one sec
00:25callenddellacosta: ANSI color codes are how blackwater does its thing.
00:25ddellacostacallen: ah, gotcha
00:25callenbut usually your stdout stuff that isn't part of your REPL session will go to the terminal lein repl, where ansi color codes should work, not in the nrepl
00:25callenUNLESS - you manually printed something with ANSI chars in the repl.
00:25callenwhich would be strange.
00:26ArthurZSorry callen: the 1st letter gets capitalized automayically on my Galaxy
00:26callenthat's unfortunate.
00:27ddellacostacallen: http://imgur.com/zEOZKVL
00:27sontekArthurZ: Removing nodes from a cluster is pretty well documented, its pretty easy to scale it down
00:27ArthurZcallen: I didn't know lower case letter in a nane makes a difference
00:28callenddellacosta: are you a midje user?
00:28ddellacostacallen: on this project, I am.
00:28callenddellacosta: that's unfortunate.
00:28ddellacostacallen: I thought we had this conversation--there are things about midje I like, and things about clojure.test I like, and neither one is ideal
00:28callenddellacosta: find out how its printing ANSI chars and if they're smart (midje? dodgy proposition) they will have a var you can override and set to false for shutting off ANSI characters.
00:29ArthurZsontek: the documentation exists but lags behind
00:29callenddellacosta: I was asking because I wanted to make certain you weren't directly responsible for the ANSI chars.
00:29callenddellacosta: I know you use midje sometimes.
00:29ddellacostacallen: ah, gotcha. :-/
00:30callenddellacosta: if it ends up not being possible, let me know and I'll write an evil-evil-evil hack to override their bs, gratis and fueled by hate.
00:31callenactually I should add a convenience fn for that in blackwater.
00:31callenor in clansi itself. hrm.
00:31ArthurZMe
00:31ddellacostacallen: I found the relevant code. It's in a directory called "emission," which seems appropriate somehow
00:32ddellacostacallen: anyways, it's this: https://github.com/ibdknox/colorize
00:32callenddellacosta: an unfortunate decision, it's unmaintained and there's no way to disable the ANSI characters from what I can tell.
00:32callenStandard midje though.
00:33ddellacostacallen: ah, well, looks like I may be able to configure it within midje
00:33callengood, but the library itself (colorize) should have the ability to disable itself.
00:34ddellacostacallen: yeah. :-(
00:35ddellacostacallen: in any case, thanks for pointing me in the right direction. As usual. ;-)
00:37ddellacostaargh, never mind, it's hard coded into autotest. ARGH
00:37callenddellacosta: I like you too much to enjoy your misery. this is so conflicting.
00:38ddellacostacallen: hahaha, it's okay, I won't begrudge you a bit of smug smirking. ;-)
00:39callentea and smuggery. today-was-a-good-day.
00:40ddellacostacallen: https://github.com/clojure-emacs/nrepl.el/pull/275
00:41ddellacostawell, my attempt to shift over to nrepl was thwarted for today. Luckily I can use it in my day job.
00:43dissipate_racket has an object system? the heresy!
00:43callennot really heresy. Racket is an laboratory.
00:44callenddellacosta: I just went to test marick's example midje project and it breaks on load. lol.
00:44ddellacostacallen: d'oh
00:44callenCBA to proceed.
00:44ddellacostacallen: I forgive you
00:44ddellacostacallen: I have better things to do as well
00:47callenddellacosta: just fyi, but prism isn't perfect. I've managed to break it once in 2 weeks of testing, but I think I was doing something evil/not-safe.
00:47callenthat having been said, given how much simpler clojure.test + prism is, any fixes would be fairly straightforward.
00:47callenI've been doing a lot of (refresh) (run-tests) lately too.
00:48callenSierra's (refresh) style works well for me.
00:48ddellacostacallen: I think the main point is, do I want to spend time getting midje working how I want it, or do I want to use clojure.test and add the features here and there that I need. I'm really used to clojure.test, the codebase is relatively easy to understand, and I can just start adding some features here and there as I need
00:49ddellacostacallen: and adding a few small libraries on top of clojure.test would be much more Clojure-esque methinks
00:49callenddellacosta: that was more or less my attitude after trying midje and watching it evolve (into a monster)
00:49ddellacostacallen: it's too bad--there really are a lot of great things in midje. I am not going to unequivocally bash it. But it really does feel like it grew too fast.
00:50callenddellacosta: well, I'm not delusional. I know people have *reasons* for using it.
00:50ddellacostacallen: I like the => syntax too, that is nice in a lot of cases. Ideally I could use that along with (is …), then I would be super happy.
00:50callenddellacosta: I just lean more conservative in terms of using tools I can understand, modify, and expect to not eat my children.
00:51callenddellacosta: could just implement the => thing.
00:51ddellacostabut on the clojure.test side, the way fixtures work is superior imho.
00:51ddellacostacallen: exactly what I'm thinking
00:53seancorfieldddellacosta: fwiw, i use expectations and the colorization it uses is compatible with nrepl.el and emacs...
00:53callenddellacosta: well, there's always leiningen test selectors. I could write a library to run the tests using similar logic as Lein test selectors.
00:53ddellacostaseancorfield: good to know. Will give it a shot--been meaning to actually.
00:53ddellacostacallen: I want to be able to filter in the repl as I move through a testing flow, so to speak. That's one thing that midje has that I really like.
00:53seancorfieldwe switched everything from clojure.test to expectations after seeing it at clojure/west 2012... we love it! :)
00:54ddellacostaseancorfield: oh, nice--good to know.
00:54seancorfieldexpectations has the idea of 'focus', if i recall correctly
00:54seangrov`Been using clojure.test and cemerick's cljs.test, like both quite a bit
00:54ddellacostaseancorfield: will definitely give it a shot. focus = filter basically?
00:54seancorfieldyeah
00:54ddellacostaseangrov`: yeah, use cljs.test a lot too, there isn't much else out there, although I guess prismatic has something pretty much the same
00:55callenI think Prismatic's goal is to just fork the entire universe and have their own cloister.
00:55callen ;)
00:55seancorfieldddellacosta: see Focused Testing on this page http://jayfields.com/expectations/odds-ends.html
00:55seangrov`callen: There are few companies I think could pull that off - prismatic seems to be one of them
00:56ddellacostacallen: I have to say, speaking of prismatic/forking the universe I'm starting to feel more and more frustrated with domina, and wishing I'd started using dommy a while back. I think I've heard someone else on here saying that too...
00:57ddellacostaseancorfield: those docs are great, thanks!
00:57callenddellacosta: last commit in domina - 6 months, last commit in dommy - 6 days.
00:57ddellacostacallen: exactly my point
00:57callen(I need to write that library comparison helper)
00:57callenRaynes even wrote a nifty github helper library.
01:10RaynesOh look, callen. You're my greatest marketing person.
01:11callenRaynes: I market other peoples' fine (soft)wares too.
01:11callenRaynes: but you're speshul. *_*
01:14seabreI'm just starting out with clojurescript. So would you guys recommend dommy over domina?
01:15dissipate_how can i represent an irrational number as an infinite stream in clojure?
01:19dissipate_er, sorry, infinite sequence
01:20callenseabre: yes but if it breaks, you can't sue us.
01:20seabrelol
01:20akurilincallen, oh man, with blackwater I can now catch db calls slipping through my with-redefs
01:21akurilinI always forget to stup a call here and there
01:23akurilinSqueaky clean now.
01:28callenakurilin: good :)
01:35ddellacosta_seabre: dommy, give it a shot, and you can also check out the goog.* stuff that is baked in: http://docs.closure-library.googlecode.com/git/namespace_goog_dom.html
01:36seabrecool ok
01:36seabreI'm playing with core.async in cljs right now
01:36seabreIt's pretty neat
01:43sdegutisBy the way, this was my idea from earlier:
01:44sdegutishttps://github.com/sdegutis/clojuredocs/wiki
01:44sdegutis\cc callen
01:46sdegutis*Don't* edit it yet. I'll probably need to re-seed it which will wipe out any changes.
01:48seabresdegutis: That's neat
01:48akurilincallen, first issue for you my friend :P
01:48akurilincallen, I got the honor for #1
01:49akurilinsorry that it's purely cosmetic :(
01:52seancorfieldsdegutis: why don't you contribute to other people's projects instead of constantly creating your own which you seem to abandon quickly?
01:53sdegutisseancorfield: Okay, that's fair, if you're *only* looking at my testing lib.
01:53seancorfieldand this new documentation site
01:54seancorfieldafter all, we have http://clojure.org/cheatsheet which is well-maintained
01:54sdegutisseancorfield: Which one? clojuretip.herokuapp.com? That's not abandoned, it's done.
01:54sdegutisseancorfield: I can't agree with that when the highest Clojure it uses is 1.3
01:54seancorfieldand we have http://clojure-doc.org which is open to evreyone to contribute
01:54sdegutisOh sorry, totally misrea.
01:54sdegutisd
01:55seancorfieldsdegutis: that cheatsheet covers new in 1.5 stuff too
01:55sdegutisseancorfield: There's legitimate answers to each of these, give me a second to write them down.
01:56sdegutisseancorfield: First of all the cheatsheet is totally different. It isn't comprehensive, it just covers the most commonly used functions/vars. This site's goal is more like clojuredocs.org where it aims to cover *every* built-in namespace and var within.
01:56dissipate_seancorfield, speaking of 1.5, do you know if the book 'Clojure Programming' is 100% compatible with 1.5?
01:56sdegutisseancorfield: And clojure-doc.org is not API-oriented but topic-oriented which is a very different goal.
01:56seancorfielddissipate_: Clojure Programming was written for 1.5
01:58dissipate_seancorfield, my version says it was written for 1.4
01:59sdegutisseancorfield: Anyway I'm sorry I made that mistake with the testing lib. It was a mistake. I intentionally haven't said anything about it since, so it can die a quiet stillbirth.
02:01sdegutisseancorfield: And to be fair, if you look at *all* of my other projects on github.com/sdegutis, they're all actively maintained and some are even used by people :)
02:01sdegutis(With the exception of the testing lib of course.)
02:01seancorfield`darn, laptop battery died
02:02sdegutisHeh. I've found http://logs.lazybot.org/irc.freenode.net/%23clojure comes in handy when that happens :)
02:04dissipate_sdegutis, what have you contributed to clojure contrib?
02:04seancorfield`dissipate_: yes, you're right, it does refer to Clojure 1.4... I'm a bit surprised... I was sure Chas et al said it was developed for 1.5...
02:04sdegutisdissipate_: I don't think that exists anymore.
02:05dissipate_sdegutis, what have you contributed to clojars?
02:06sdegutisdissipate_: Nothing of importance yet. Why?
02:06dissipate_seancorfield`, well, i guess i'll find out. :D
02:06dissipate_sdegutis, was just curious
02:08seancorfield`dissipate_: at least the big backward compatibility breaks were between 1.2 and 1.3 so it's been pretty stable since :)
02:08seancorfield`sdegutis: clojure contrib exists as a series of well-maintained libraries
02:08sdegutisseancorfield`: Right :)
02:08dissipate_sdegutis, i found this stuff: https://clojars.org/sdegutis
02:09sdegutisdissipate_: yeah that's my testing lib in its various forms.
02:09sdegutisdissipate_: we should pretend that page doesn't exist
02:09dissipate_hehehe
02:09seancorfield`http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go
02:10dissipate_seancorfield`, i see.
02:10seancorfield`lots of libraries there that are well-maintained parts of clojure contrib as well as a lot of new ones
02:10sdegutisOkay, I *think* it's feature-complete and stylish. https://github.com/sdegutis/clojuredocs/wiki
02:11sdegutisThose are the main two things needed, on account of how re-seeding is impossible after someone starts editing, and how re-styling is impossible without reseeding.
02:12sdegutisThe URLs are admittedly not pretty though. https://github.com/sdegutis/clojuredocs/wiki/clojure.core-set%5BDash%5Dagent%5BDash%5Dsend%5BDash%5Doff%5BDash%5Dexecutor!
02:14seancorfieldif you can make a replacement for http://clojuredocs.org work as a well-maintained, easy to use web site, the community will be grateful
02:15seancorfieldthese days i use http://clojureatlas.com but i do wish Chas would update it with 1.5.1 content...
02:15ddellacosta_agreed. I wish clojuredocs.org was updated. I still use it constantly.
02:16sdegutisseancorfield, ddellacosta_: That's why I think this github-wiki solution is perfect.
02:16ddellacosta_one thing I love about clojuredocs.org is the Quick Ref, which organizes things by topic: http://clojuredocs.org/quickref/Clojure%20Core
02:17sdegutisIt's editable by anyone who has a github account. It's not bad looking. It's updated to use Clojure 1.5.1
02:17sdegutisAnd anyone can add examples and edit the see-also list.
02:17sdegutisddellacosta_: Ah, neat. I wonder how hard it would be to port that to this github version.
02:17ddellacosta_sdegutis: I think you have some good points. But I would suggest that you post an email on the mailing list asking what folks thing, what they would be interested in contributing to, etc.
02:18ddellacosta_sdegutis: that way you can gauge interest and also get some folks to start contributing right away.
02:18sdegutisHmm.
02:18ddellacosta_sdegutis: I think there is a natural reaction from some of us when we hear of "one more docs site" regardless of how good an idea it is….so, just saying. Again, I really don't want you to feel like I'm shutting you down, as I think I did last time.
02:19seancorfieldone of the big benefits of clojuredocs is that it is searchable and it includes contrib libraries
02:19ddellacosta_sdegutis: It's more that, I think your solution is probably excellent--already it's nice to have the wiki with all the functions there updated for 1.5.1
02:19sdegutisddellacosta_: That time you had legit points. :)
02:19sdegutisddellacosta_: This time, this is an awesome thing and I think everyone will be happy.
02:19ddellacosta_sdegutis: right--so get some feedback on the mailing list.
02:20seancorfieldany docs site that has a chance of being taken seriously has to include the active contrib modules as well and have a good search feature
02:20ddellacosta_sdegutis: for example, as nice as what you've got there already, you are going to have a hard time pulling me away from clojuredocs.org without being much closer to feature-parity
02:21sdegutisseancorfield: Not only does this have the ability for adding new things to it but I think it'll be easy to extract my initial-seed-fn into something that general lib authors can use to add their own lib to this. It is just a public git repo after all :)
02:22ddellacosta_sdegutis: again, please, take this as positive criticism--I'd like to see your effort succeed if it has a chance to replace clojuredocs.org and be a *well-maintained* alternative. I agree the wiki started by Klishin et. al. has different goals too
02:22sdegutisThanks for your feedback.
02:22seabresdegutis: How would you handle newer versions of clojure?
02:23sdegutisseabre: Namespacing the files is probably sufficient. In fact I should do that right now.
02:23seancorfieldwell, once you've solved the problem of how to re-gen docs from source as it is updated without blowing away any existing edits, i'll happily run your functions to add java.jdbc ...
02:23sdegutisseabre: That way it can handle multiple versions of the same fn
02:23sdegutisseancorfield: Hmm interesting, that gives me an idea.
02:33andyfingerhutsdegutis: If you are still around, I was curious about a few odd bits of text in your some of your clojuredocs wiki pages. For example, look near the middle of this page: https://github.com/sdegutis/clojuredocs/wiki/clojure.core-read
02:33sdegutisandyfingerhut: what should I see?
02:33andyfingerhutDo you see a very long line beginning with user=> (read-string ... ?
02:34sdegutisandyfingerhut: Yes.
02:34andyfingerhutCompare to the much shorter corresponding line on this page: http://clojuredocs.org/clojure_core/clojure.core/read
02:34andyfingerhutLooks like some kind of strange character encoding munging going on.
02:35sdegutisWhoa. Yeah. Never heard of c5059c899760cdd632303de7cdd40fdcc9280712quot; before
02:36andyfingerhutProbably has something to do with the backspace in the original, perhaps. How did you get the text from the clojuredocs.org site?
02:36sdegutisandyfingerhut: https://github.com/dakrone/clojuredocs-client
02:36sdegutisIn the REPL right now looking for it..
02:39sdegutisandyfingerhut: Hmm, weird. The file looks normal, it just has escaped quotes. Maybe github-wiki is assuming they're a reference to something and getting tricky..
02:41andyfingerhutI haven't looked through all of the pages. I just got (un)lucky and read that page to spot-check if you had taken examples from clojuredocs site, which you obviously have. Looks like your doc strings and source code come from Clojure 1.5.1?
02:41sdegutisandyfingerhut: Yep, 1.5.1
02:41andyfingerhutNice
02:41sdegutisandyfingerhut: And yeah I used clojuredocs.org's API to extract examples and see-alsos. I omitted the comments because I've never seen them actually used.
02:42andyfingerhutI guess as a wiki there is no way to enforce the "structure" of each page remain the same over time as people edit it?
02:42sdegutisLooks like github-wiki is rendering it weirdly when you escape strings within strings within code-blocks.
02:43sdegutisandyfingerhut: no, but I'm going to put a stern warning on the front page that if people break the structure, it's really rude.
02:43sdegutisandyfingerhut: especially because if the structure remains in-tact, then I can easily do seamless updates of just the doc/source sections for 1.6 while leaving the examples/see-alsos intact.
02:45sdegutisandyfingerhut: Ha. I found a fix, by making sure that escaped quotes within strings have 2 slashes instead of one. Except I'm nervous that using a regex for this will replace \" in comments and stuff where it shouldn't.
02:46andyfingerhutcallen: Sorry, I think my IRC client doesn't handle private messages well, and I can't figure out how to send them
02:46callenandyfingerhut: join #callen
02:49andyfingerhutTranslating escapes between two different markup formats can be tricky.
03:00fkeyhmmmm
03:00fkeyits late, but i might of found another bug in cljs
03:00fkey1 sec
03:00fkey&((fn toList [x] (if (list? [x]) x (list x))) '(1))
03:00lazybot⇒ ((1))
03:00fkeywhat am i doing wrong?
03:01fkeyi am expecting (1)
03:01fkeyooo
03:02fkey(if (list? [x])) could be doing it ..duuur
03:02fkeysorry
03:05sdegutis,(replace "\\\"" #"\\\"" "\\\\\"")
03:05clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (3) passed to: core$replace>
03:05sdegutis,(clojure.string/replace "\\\"" #"\\\"" "\\\\\"")
03:05clojurebot"\\\""
03:05sdegutiswat
03:07andyfingerhutBackslash escaping rules in Clojure are different for strings and regexs, IIRC. It ain't fun. You are trying to replace all occurrences of a backslash followed by a quote in some string, with two backslashes followed by a quote?
03:09sdegutisHeh.
03:09sdegutisYeah, I think so.
03:09sdegutisandyfingerhut: Sounds right.
03:11andyfingerhutSince what you are searching for is a constant string, you can leave off the # and not uses regexes at all in that case.
03:11andyfingerhutThat at least gets you to one less set of rules for how to parse strings.
03:12sdegutisandyfingerhut: I wonder if it could be a case of recursive find/replace happening, since the thing-to-find is a substring of the thing-to-replace-with.
03:12sdegutis,(clojure.string/replace "\\\"" "\\\"" "\\\\\"")
03:12clojurebot"\\\\\""
03:12sdegutisThat fixes it :)
03:12sdegutisThanks andyfingerhut.
03:13andyfingerhutsdegutis: You are welcome. I did some mucking about with clojure.string/replace implementation for Clojure 1.5.1, and I still don't know exactly what is going on in your example yet. May be a bug.
03:15sdegutisandyfingerhut: Well at least it isn't as ugly anymore: https://github.com/sdegutis/clojuredocs/wiki/clojure.core-read
03:15sdegutisandyfingerhut: Actually I don't think regexes *should* work recursively, but that's the only explanation I can think of.
03:16andyfingerhutclojure.string/replace is definitely implemented so that when it finds a match, it does not look for another match within the replacement, but only starts looking for another match after the end of the previous match.
03:16sdegutisRight, ok.
03:18andyfingerhutOK, I understand the behavior now. Check doc string for clojure.string/replace. When the thing to be matched is a regex, then the replacement string has special treatment for backslashes.
03:19andyfingerhutSpecial treatment *on top of* the usual Clojure special treatment of backslashes.
03:19andyfingerhutThis would have done what you wanted, too: (str/replace "\\\"" #"\\\"" (str/re-quote-replacement "\\\\\""))
03:20andyfingerhutBut if you don't need a regex, simplify your life and don't use one :)
03:21sdegutisOooh. So weird.
03:21sdegutisHeh I should have read the docs. How ironic.
03:21andyfingerhutI wrote those docs, and I forgot that detail :)
03:21sdegutisHeh :)
03:26fkeyhuh
03:26fkey&(type (concat '(a) '(b))
03:26lazybotjava.lang.RuntimeException: EOF while reading, starting at line 1
03:26fkey&(type (concat '(a) '(b)))
03:26lazybot⇒ clojure.lang.LazySeq
03:26sdegutisfkey: You coming from Common Lisp?
03:27fkeysdegutis: i'm from all over the place <_<
03:27sdegutisfkey: Right, but concat and '(...) and list? are very Common Lisp and Scheme
03:28fkeyah, well yeah my 1st expierence with common lisp, and did a little scheme to
03:28sdegutisAh.
03:29andyfingerhutfkey: anything in particular surprise you about the result you saw?
03:29sdegutisfkey: Now you've got lazy sequences. They're great. It means you can map over infinite sequences and only take some.
03:29fkeyi had some code and been bashing my head because found out (list? ) is failing
03:29fkeyi mean..makes sense
03:29sdegutisfkey: like ##(take 3 (map clojure.string/upper-case (repeat "hi")))
03:29lazybot⇒ ("HI" "HI" "HI")
03:30fkeyjust wasn't expecting that heh
03:30dyresharkfkey: try seq?
03:30dyreshark&(seq? (concat '(a) '(b)))
03:30lazybot⇒ true
03:30fkeydyreshark: yep, just tried it and that worked. curious about vectors now
03:31fkeyi thought vectors where sequences too
03:31fkey&(type? [])
03:31lazybotjava.lang.RuntimeException: Unable to resolve symbol: type? in this context
03:31fkey&(type [])
03:31lazybot⇒ clojure.lang.PersistentVector
03:32fkeywell being itterable i think is done by a interface or something..i forgot what richey said in his talks
03:32andyfingerhutYou can make a sequence from a vector with seq, or a vector from a sequence with vec, but they are not the same thing, even though (= [1 2 3] (seq [1 2 3])) is true
03:33andyfingerhutclear as mud? :)
03:33fkeyah theres seq? and sequential? heh
03:33dyresharkfkey: sequential?
03:33dyresharkyou beat me to it
03:33dyreshark:p
03:34fkey&(seq? '())
03:34lazybot⇒ true
03:34fkeyok
03:34fkeyi think i'm in business ... heh
03:35fkeyb-e-a-utiiiiful
03:35fkeyas a fun clojure project i created a flowcharting program
03:35fkeyso you can type what the flowchart should be
03:36fkeyie, (do "step" (if "thisIsTrue" (do "true1" "true2") (do "false1" "false2")))
03:36fkeyetc
03:36fkeythanks to seq? it's not throwing errors anymore and the graph is working! hurray!
03:36fkeyjust got to implement lines for the while loop
03:36fkeyso it loops back on the right side
03:36fkeyerm left
03:37fkeygoing to release the project once i clean it up and threw it up on a website..will be nice when i have to explain a idea to someone at work you know? hah
03:38andyfingerhutHave you seen graphviz / dot?
03:38fkeynaww
03:39fkeyim using html5 with canvas element
03:39fkeydidn't want people to have to download extra software and stuff
03:39andyfingerhutI don't know for sure how well it would be able to draw flowcharts, but it does have lots of nice features for graph drawing.
03:39fkeynice
03:40andyfingerhutI wouldn't want to stop you working on a fun project, though :)
03:41fkeyof course not! trying to learn clojure anyway
03:41sheldonhi don't understand what i read from (doc if-let) and (doc when-let) -- they both talk about if/when "test is true", but the signatures don't indicate that one supplies a test expression?
03:42fkeyfreaking before i discovered cljs/read-string i wrote a simple parser <_< . i did it in a very stupid manner to
03:44fkeybut this flowcharting thing will be great
03:44fkeysimple syntax to show logic flow
03:45fkeyand to change node type, you just have to pre-fix the string , ie "!some node" will make it a input node. if it uses the built-in control loops, it automatically makes it a dimaond
03:45fkeywill have a few other node types to
03:45andyfingerhutsheldonh: Doc strings might not be the clearest on those. A few examples are on clojuredocs.org here http://clojuredocs.org/clojure_core/clojure.core/if-let and here http://clojuredocs.org/clojure_core/clojure.core/when-let
03:47gwsfkey: for inspiration there's also yuml.me activity diagrams http://yuml.me/diagram/scruffy/activity/draw
03:51sheldonhandyfingerhut: ahhh. so for if-let, you get the else expression when the binding is logically false
03:52andyfingerhutsheldonh: yep
03:53sheldonhandyfingerhut: and when-let is the for form of if-let
03:54andyfingerhutsheldonh: Not sure what you mean by the "for form of if-let". It is like when is to if, in that the body of a when can have multiple expressions, but it doesn't do anything if the condition is logical false.
03:59sheldonhandyfingerhut: ah. nothing to do with looping. (when [...] (x)) is (if [...] (do x))
03:59andyfingerhutsheldonh: yes
04:02sheldonhandyfingerhut: okay great. that's been needling me for days. thanks!
04:07sheldonhso now... looking at (source reductions), i don't understand how it works without blowing stack on large input collections. it doesn't use (recur)
04:08andyfingerhutsheldonh: via the magic of lazy-seq
04:08amalloysheldonh: the same way most lazy sequence functions work: it immediately returns a lazy-sequence, and then the caller's stack frame does the recursion for you by calling the lazy seq
04:09amalloypoorly worded: "...by asking for the next item in the sequence"
07:46sisciaanybody here ?
07:46sisciaI have a problem deploying a war with lein-ring, but I really don't have any clue of what is going wrong...
07:47sisciaother than a NullPointer exception...
07:50squidzsiscia: probably can't help you, but you should probably pastebin some more info if you want help
07:51sisciasquidz: yes, you are right... but it is so cryptical that...
07:51sisciahttps://www.refheap.com/18442
07:53siscialast time I have resolve the same problem removing some unnecessary require from the files, but I checked and there are not unnecessary import/require anymore
08:27squidzdnolen: I saw that you improved the compilation process for clojurescript. Any idea when that will be in the maven repository?
09:22PudgePacketHey guys, just quick one, Bait vs Lure ?!
09:35sisciaI have a problem deploying a war with lein-ring, but I really don't have any clue of what is going wrong...
09:35sisciaother than a NullPointer exception...
09:35sisciahttps://www.refheap.com/18442
09:36sisciasomebody have some ideas ???
09:38siscialein javac, compile and check don't show any problems (other than some reflection warning, and another warning due to a library I am using...)
11:09cjfriszis the samples/repl browser-connected repl example in the clojurescript github repo still supposed to work, or has it been orphaned?
11:10cjfrisz(I've never done a browser-connected repl and am having trouble getting _anything_ to work)
11:10paulswilliamsesqHi all - any vim-fireplace users happy to answer hopefully a simple question regarding loading and the REPL?
11:10ambrosebspaulswilliamsesq: shoot
11:11paulswilliamsesqambrosebs: cheers - I'm up and running with fireplace, having it reload code happily. cqp also works a treat allowing me to evaluate things ok.
11:12paulswilliamsesqambrosebs: however, following https://github.com/clojuredocs/guides/blob/master/articles/tutorials/vim_fireplace.md, when I got back into the lein repl, I can't access the parse function that I defined with the core.clj file.
11:13paulswilliamsesqambrosebs: the guide suggests that as you're using the same repl, then reloading will occur on the repl command line and from within vim
11:13ambrosebspaulswilliamsesq: did you switch namespaces in lein repl?
11:14paulswilliamsesqambrosebs: yep using (ns command-line-args.core)
11:15ambrosebspaulswilliamsesq: you're definitely connected to the right REPL?
11:16paulswilliamsesqer, only through running lein repl from the same directory as vim was fired up for?
11:16paulswilliamsesqambrosebs: any way to check explicity?
11:16ambrosebsok. That doesn't always work for me.
11:16ambrosebsYes, :Connect
11:17ambrosebsand tab through for the argument and insert the correct port.
11:19paulswilliamsesqambrosebs: right, that seems to be issue.
11:19ambrosebspaulswilliamsesq: I always put this in my project.clj :profiles {:dev {:repl-options {:port 64394}}}
11:20paulswilliamsesqambrosebs: so what's the cause? and do you increment the port for each project?
11:20ambrosebspaulswilliamsesq: no idea, yes.
11:21ambrosebspaulswilliamsesq: I've been using fireplace since the beginning, but I've never bothered to investigate.
11:24paulswilliamsesqambrosebs: right, cheers for help. I gonna investigate this now. target/repl-port was updated correctly. wonder whether I started vim too early or similar.
11:24ambrosebspaulswilliamsesq: nice.
11:25xeqicjfrisz: I'm not sure about a raw cljs repl using only clojurescript tools, but lein cljsbuild, piggieback, and austin have all worked for me to get a cljs repl up
11:26cjfriszxeqi: do you have resources? I couldn't grok what steps I was missing on the clojurescript github wiki
11:27xeqicjfrisz: https://github.com/emezeske/lein-cljsbuild/blob/0.3.2/doc/REPL.md for cljsbuild
11:27xeqihttps://github.com/cemerick/piggieback#browser-repl and https://github.com/cemerick/austin#browser-connected-repls for the others
11:28cjfriszxeqi: thank you muchly
11:28xeqiat this point I'm using austin for my projects, but thanks with an emacs/nrepl for the project, start server, start cljs repl type workflow
11:29xeqi*but thats for an emacs/nrepl ....
11:49bluebat,(+ 1 1)
11:49clojurebot2
11:50philipp`Hi, I am currently going through the exercises at 4clojure, I was wondering why the following doesn't work:
11:50philipp`,(conj {:a 1} '(:b 2))
11:50clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.util.Map$Entry>
11:51philipp`conj can add vectors to maps, why not lists?
11:52hyPiRionNo, conj can add map entries to maps
11:52hyPiRion,(conj {:a 1} [:b 2 3])
11:52clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Vector arg to map conj must be a pair>
11:52hyPiRion,(conj {:a 1} [:b 2])
11:52clojurebot{:b 2, :a 1}
11:53hyPiRionWhy that is, well. *shrugs*
11:54philipp`Hm, okay. I don't see any reason why lists couldn't be used as paird as well.
11:54hyPiRionwell, they are returnes as "vectors" when read out
11:54hyPiRion,(find {:a 1} :a)
11:54clojurebot[:a 1]
11:58gfredericks,(vector? (first {:a 1}))
11:58clojurebottrue
11:59hyPiRion,(class (first {:a 1}))
11:59clojurebotclojure.lang.MapEntry
11:59cjfriszWhenever I try to connect a repl to my browser, I get a slew of "WARNING: Symbol [x] is not a protocol at line [n] [some cljs file in my project]" where [x] is a basic interface (e.g. IHash, ILookup, etc.)
11:59cjfriszWhy is this happening?
12:01cjfriszHere's a full set of the warnings if my description is unclear: https://gist.github.com/cjfrisz/352ab3670a72d49c24c5
12:12borkdudeRaynes do you still use Textual? I am trying to build the latest from github using Xcode 4.6.3 but I get some errors about .xib files.
12:14bbloomborkdude: I didn't realize it was available freely on github. 5 bucks seemed like a no brainer in the app store to me
12:14borkdudebbloom it's not about the 5 bucks, it's about not being able to stand to build something ;)
12:15borkdudecan't stand not building something
12:17borkdudecan't stand not being able to build something I mean
12:17fsilerI sympathize, borkdude
12:25borkdudehmm, what's up with emacs for osx showing the toolbar when you go full screen
12:26ambrosebscjfrisz: turns out I was AOT compiling Clojurescript which completely broke Typed CLJS.
12:26ambrosebsShould be better.
12:26cjfriszambrosebs: oooooh, now I can back to my gradual-typing branch
12:26ambrosebscjfrisz: I updated one of the tickets you opened.
12:26cjfriszambrosebs: Awesome, I'll check it out
12:27cjfriszNow if I can just get a damn cljs repl working, I can get on with the stuff I really need to do today
12:27ambrosebsthat's for experts.
12:27ambrosebs:)
12:28serycjonHi, do you have any recommendations for beginning with clojure? Good books, tutorials, whatever? I'm functional programming newbie. Thanks
12:28bbloomcjfrisz: try cemerick's stuff
12:28cjfriszbbloom: you mean piggieback?
12:28borkdudeserycjon what about clojurebook.org
12:28borkdude.com
12:28bbloomcjfrisz: and this: https://github.com/cemerick/austin
12:29borkdudeserycjon start with that one and read The Joy of Clojure alongside or after it and start doing it
12:29cjfriszbbloom: Ah, was still juggling cljsbuild instructions with piggieback. Looks like I needed to skip ahead and look at this too.
12:29borkdudeserycjon excellent learning experience: 4clojure.org
12:30bbloomcjfrisz: cljs' browser repl situation is somewhat nightmareish still
12:30bbloomcjfrisz: cemerick is slowly saving the day w/ his projects & now contributing to lein-cljsbuild
12:31bbloomchas is one of those rare devs who seems to eat slog work and shit usefulness
12:31serycjonborkdude thank you very much! I will try it immediatelly :)
12:33cjfriszbbloom: that is a commendable quality
12:33cjfriszbbloom: should piggieback and austin go in my project.clj, or are they ideally in a global dev profile?
12:33cjfrisz(I'm still a noob with respect to lein best practices)
12:34bbloomcjfrisz: i don't have any long running cljs projects & every time i start a new small project, everything is totally new/different, so project.clj is fine :-P
12:35bbloomcjfrisz: treat it like you treat any refactoring task! put it in one project.clj, and if you need it again, put it in two and make a mental note. when you put it in THREE, then factor it out :-)
12:35cjfriszbbloom: true
12:36cjfriszI feel like I need to take a weekend to track down all the stupid things I do in my Clojure dev environment and fix them
12:36borkdudeserycjon there is an old (now removed) SO thread here about the differences about the existing clojure books: http://michielborkent.nl/comparingclojurebooks.html
12:43seangrov`$lastseen stuartsierra
12:43seangrov`lazybot isn't around, I guess
12:43gfredericks$seen stuartsierra
12:43seangrov`Also, I got the command wrong
12:44gfredericks&'wat
12:44gfredericksah well
12:52hyPiRionlazybot died
12:52hyPiRionlong live lazybot
12:53bbloomi'm curious… you think rich, back in his C++ days, overloaded the pointer dereferencing operator like IDeref? :-)
13:05jstewidentify sootroom
13:06silasdaviswhy does (zipmap (repeat :poll) [12 3 4]) give a different result to (zipmap (repeat :poll) [12 3 4])
13:07silasdavisor even
13:07silasdavis`(zipmap 3 (repeat :poll) [12 3 4])
13:07silasdavis'(zipmap 3 (repeat :poll) [12 3 4])
13:07silasdavis,(zipmap 3 (repeat :poll) [12 3 4])
13:07clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (3) passed to: core$zipmap>
13:07hyPiRionuh
13:07hyPiRion,(zipmap (repeat :poll) [12 3 4])
13:07clojurebot{:poll 4}
13:08hyPiRionNot sure why you'd have the exact same key three times though.
13:11gravany folks played with core.async in clojure (not cljs)?
13:11gravi'm having trouble running the examples (or anything for that matter)
13:16silas_,(zipmap (repeat 3 :poll) [12 3 4])
13:16clojurebot{:poll 4}
13:17silas_,(zipmap [1 2 3] (repeat 3 :poll))
13:17clojurebot{3 :poll, 2 :poll, 1 :poll}
13:19silas_why do I not get "doing" printed every second in: (take 5 (repeatedly #(do (Thread/sleep 1000) (println "doing") :foo))) ?
13:21bbloomsilas_: you probably get about 30 of them b4 it stops, right?
13:22silas_no it waits the full 5 seconds then prints everything
13:23silas_,(take 5 (repeatedly #(do (Thread/sleep 1000) (println "doing") :foo)))
13:23clojurebot(doing\ndoing\n:foo doing\n:foo doing\n:foo doing\n:foo :foo)
13:23bbloomsilas_: ah, either way, the answer is chunking.
13:25bbloomsilas_: it's fetching 30ish items all at once
13:29silas_bbloom, I've tried it with 200 items, I still only get everything back at once
13:30bbloomsilas_: try using doseq
13:30llasramThis might just be I/O buffering
13:30bbloom(doseq [x …] (prn x))
13:30bbloomsilas_: it will take some REPL behavior out of the equation
13:31silas_bbloom, thanks that was it
13:35bbloom(defn seq?? [x] (or (seq? x) (nil? x)))
13:35bbloom:-)
13:35bbloomnext up: seq?!?!?
13:36gfredericks(def seq?!?!? (comp seq? rest reverse rseq seq))
13:37bbloomlol.
13:38mtpwut
13:45gfredericksif we are afraid to do things like this the language will never improve
13:45bbloomlike what?
13:46gfredericks(def seq?!?!? ...)
13:47bbloomhow does this improve the language?
13:51gfredericksI really need to stop this IRC deadpan thing
13:52bbloomgfredericks: see, here i thought you were advocating for making interobangs legal identifier characters
13:53bbloom(defn seq‽ [x] (or (seq? x) (nil? x)))
13:53cjfriszbbloom: do I need google closure related dependencies explicitly listed in my project.clj to get browser-connected repl stuff to work?
13:53wafuntil clojure resembles APL it will never surpass java and c# in the enterprise
13:53bbloomcjfrisz: i don't think so
13:53cjfriszI just got one working that used cljsc directly, but I would rather use lein cljsbuild, and I notice that there are some goog files missing in my out directory
13:54bbloomcjfrisz: i always use a master branch checkout of cljs though, so i usually have a closure jar from the bootstrap script
13:54cjfriszThat is, I got cemerick's example in the piggieback readme, but it seems like a no-go for my project thus far
13:55bbloomcjfrisz: you're really asking the wrong guy. i just hack on the compiler. i have wasted many many hours on the damn browser repl. there is like a weird flaw in my brain where i just can't get it to work
13:55gfredericksbbloom: only brehaut would advocate for that
13:55bbloomcjfrisz: bug dnolen & cemerick
13:57cjfriszbbloom: will do, thanks
13:59dissipate_waf, APL, are you cray?
13:59dissipate_actually, clojure does resemble APL
14:00dissipate_to me anyways
14:00wafdissipate_: :) just playing off of bbloom's interrobang comment. I like using a normal qwerty for development
14:01dissipate_waf, are you kidding? if you aren't doing dvorak, you aren't even in the game.
14:02wafhaha, i'm one of those clojure heathens that uses vim instead of emacs. dvorak would break my brain
14:02dissipate_waf, i'm a heathen using light table and eclipse with counter clockwise.
14:03dissipate_my setup actually reeketh of the cube farm
14:03sdegutisWhere's lazybot?
14:04hyPiRiondead.
14:05dissipate_sdegutis, someone caused it to crash, so it's off to have its bugs fixed and formally proven with coq
14:07borkdudewhat clojure ide can rename/refactor names nowadays? in all namespaces for a given project
14:07borkdudeand i don't mean a simple search/replace
14:07dissipate_borkdude, eclipse?
14:08borkdudedissipate_ seriously?
14:08sdegutisWhat do you guys think of this? https://github.com/sdegutis/clojuredocs/wiki
14:09dissipate_borkdude, https://code.google.com/p/counterclockwise/
14:09borkdudedissipate_ I'm looking at the release notes, but where can I find this feature, or isn't it described somewhere? https://code.google.com/p/counterclockwise/wiki/ReleaseNotes#Version_0.13.0_SNAPSHOT
14:10dissipate_sdegutis, are you kidding me? i don't see the section for special forms
14:10borkdudedissipate_ I have used ccw but I didn't know it could do it
14:10llasramborkdude: I don't believe any current Clojure environment can do that
14:10sdegutisdissipate_: Why would I be kidding you?
14:11dissipate_sdegutis, i would have thought that there would be a highly visible section for the special forms
14:12sdegutisdissipate_: Oh. I don't yet know how to generate those docs from within Clojure. Ideas?
14:13dissipate_sdegutis, are the special forms in there anywhere?
14:14dissipate_sdegutis, not from within clojure, but you can use an HTML user agent to download and parse this page: http://clojure.org/special_forms, then reformat the elements for your page.
14:14sdegutisdissipate_: Not yet. I'm generating the entire wiki from within a Clojure function. It basically gets all vars within a given namespace and prints docs for them.
14:14sdegutisdissipate_: I wonder if it would be easier to use clojruedocs.org's API, granted I'd have to give it a list of special forms first
14:14sdegutishttp://api.clojuredocs.org/
14:15borkdudehttp://dev.clojure.org/display/community/Project+Ideas#ProjectIdeas-RefactoringfeatureforCCWotherIDEs
14:15dissipate_sdegutis, does that API have the special forms?
14:16sdegutishttp://api.clojuredocs.org/examples/clojure.core/do
14:17dissipate_sdegutis, hmm. why does it say 'do' is in clojure core?
14:17dissipate_sdegutis, the word 'core' doesn't show up on this page at all: http://clojure.org/special_forms
14:18dissipate_sdegutis, something is off. how can a special form be defined in a namespace?
14:19dissipate_sdegutis, if it was in clojure.core then in theory your page would have already had it
14:20dissipate_sdegutis, what am i missing?
14:20javeis there a "lint" or "checdoc" like thing for Clojure?
14:23javeI have some clojure code of questionable quality here: https://github.com/jave/btc-coffee
14:25sdegutis,(zipmap [1 2 3] (repeat inc 10))
14:25clojurebot#<ClassCastException java.lang.ClassCastException: clojure.core$inc cannot be cast to java.lang.Number>
14:25sdegutis,(zipmap [1 2 3] (iterate inc 10))
14:25clojurebot{3 12, 2 11, 1 10}
14:25sdegutisNeat.
14:25clojurebotGabh mo leithscéal?
14:25sdegutis,(map list [1 2 3] (iterate inc 10))
14:25clojurebot((1 10) (2 11) (3 12))
14:25llasramjave: There was a tool which suggested more idiomatic ways of expressing forms found in your code, but I can't seem to remember its name...
14:26javellasram: cool, ping me if you remember it
14:27borkdudemaybe kibit
14:27javeah ok thanks
14:28borkdudebut it remember vaguely there was some effort in a newer project, don't know for sure
14:28borkdudeit -> I
14:28sdegutisJust found a Clojure snippet that crashes github's markdown parser.
14:29llasramYeah, that was it!
14:29llasramThere's also https://github.com/jonase/eastwood
14:29llasramI've never used either myself
14:29cjfriszbbloom: I seem to have figured it out
14:29sdegutis,[\| (\| \s \t \a \c \k) (\h \a \y)]
14:29clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn>
14:29sdegutis,'[\| (\| \s \t \a \c \k) (\h \a \y)]
14:29clojurebot[\| (\| \s \t \a \c ...) (\h \a \y)]
14:31bbloomcjfrisz: you're clearly smarter than me then :-P
14:32cjfriszbbloom: or at least damned determined and willing to spend hours fiddling and pattern matching on things I don't really understand
14:32bbloomcjfrisz: yeah, but i've done that like 5 times & haven't gotten any faster at it :-P
14:32dissipate_jave, if there was a tool that could automate code quality detection for clojure, we wouldn't be using it.
14:33max1is anyone aware of a way to do this[1] with leiningen? [1] http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#AppendingTransformer
14:33sdegutisLOL, this crashes github's wiki page: ##(println "```clojure\n\\k\n\n```")
14:34dissipate_cjfrisz, cargo cult pattern matching?
14:34cjfriszdissipate_: only the cultiest!
14:35dissipate_cjfrisz, you know there is a tool that gives you the RE for a given text?
14:36cjfriszdissipate_: yes, I went through a dark period where I was intimately familiar with emacs's regex builder
14:36cjfriszI was a brasher man then...
14:40callenKorma PRs are slowly disappearing :)
14:40bbloomoh man, exciting: I just did (->> blah (map (juxt :id (juxt :foo :bar))) (into {}))
14:40bbloomthat's some glorious higher order function magic right there: double juxt!
14:41callenbbloom: have you done any Haskell?
14:42bbloomcallen: not for anything real
14:42bbloomcallen: mostly just read it when i have to & occasionally compile & tweak various projects to learn about them
14:43callenbbloom: I've found it really difficult to call much of any Clojure code I've seen "higher order" with respect to fn composition after doing Haskell.
14:43bbloomcallen: just let me revel in the glory of a nested juxt
14:43callenokay.
14:44dissipate_callen, bbloom said i was a troll when i mentioned that haskell can be used for systems programming
14:44dissipate_seems to be a touchy subject for him
14:44callendissipate_: I wouldn't ever ever attempt to use Haskell for systems programming.
14:44bbloomdissipate_: no, i said you were a troll when you transitioned from ignoring good advice to giving bad advice
14:44callenI wouldn't use a virtual machine based Clojure for systems programming either.
14:45dissipate_callen, why not?
14:45callendissipate_: systems programming means you need at least a measure of control over memory alloc.
14:45callenthis is why Rust gives you ways to avoid gc.
14:45dissipate_callen, haskell has excellent multi-threading support
14:45hyPiRiondefine systems programming first, guys.
14:45bbloom(inc hyPiRion)
14:46bbloomhyPiRion: you'd get karma if lazybot was here. i'll owe you one
14:46callendissipate_: irrelevant
14:46hyPiRionhaha
14:46dissipate_callen, would you use go for systems programming?
14:46callendissipate_: no, it's not a systems language.
14:46callenGolang is an applications language.
14:46callengeneral purpose.
14:47dissipate_callen, http://golang.org/doc/faq#What_is_the_purpose_of_the_project
14:47callendissipate_: they had to change the tag-line of Golang from systems language to general purpose language because they misused the terminology.
14:48callendissipate_: please stop with this conversation, it's clear you've never done any systems programming.
14:48dissipate_callen, i have, in C
14:49callendissipate_: fiddling with some single-file C programs does not a systems programmer make. I'm not really known for being a nice person, this is me cutting it off at the limits of my patience.
14:52fkeyis there any "thread" form that inserts the given x into the 2nd position of every form?
14:53callenfkey: you should fix the arity rather than do that but if you must, try as->
14:53fkeyex, for (-> x .do .something) , .do and .something would receive x
14:53fkeycallen: thanks, i am in clojurescript land
14:53metellus(-> x .do .something) is equivalent to (.something (.do x))
14:54sheldonhfkey: smells like a map or a juxt?
14:54metellusif you want (.do x) (.something x) you might want (doto x .do .something)
14:54coventry2e
14:54bbloom(doc doto)
14:54clojurebot"([x & forms]); Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments. The forms are evaluated in order. Returns x. (doto (new java.util.HashMap) (.put \"a\" 1) (.put \"b\" 2))"
14:54fkeymetellus: thanks, i think thats what i want
14:54bbloom(doc ..)
14:54clojurebot"([x form] [x form & more]); form => fieldName-symbol or (instanceMethodName-symbol args*) Expands into a member access (.) of the first member on the first argument, followed by the next member on the result, etc. For instance: (.. System (getProperties) (get \"os.name\")) expands to: (. (. System (getProperties)) (get \"os.name\")) but is easier to write, read, and understand."
14:55callen(doc as->)
14:55clojurebot"([expr name & forms]); Binds name to expr, evaluates the first form in the lexical context of that binding, then binds name to that result, repeating for each successive form, returning the result of the last form."
14:57borkdudekst
14:57borkdudesorry, typo…
14:57borkdudeis there a way to see what theme is loaded in emacs currently?
14:58callenborkdude: the #emacs channel has a lot of very helpful people in it :)
14:58borkdudecallen yes, but I'm afraid of them
15:03sdegutisdissipate_: Added special forms.
15:03sdegutishttps://github.com/sdegutis/clojuredocs/wiki
15:07dissipate_sdegutis, no dot '.' special form?
15:08sdegutisdissipate_: oh yeah, trying now.
15:09sdegutisOkay it's adding, but it'll be as empty as http://clojuredocs.org/clojure_core/clojure.core/_dot is
15:10sdegutisdissipate_: https://github.com/sdegutis/clojuredocs/wiki/special-forms-.
15:10borkdudehah, probably I had no color theme loaded (just moved me .emacs.d folder)
15:13dissipate_sdegutis, you can screen scrape from here: http://clojure.org/java_interop#dot
15:20sdegutisdissipate_: Hmm
15:21seangrov`dnolen: Is 509-protocol-warn merged into master now?
15:21seangrov`Want to experiment with the incremental/auto builds
15:24coventry2symbolhound really sucks, at least for clojure. Anyone found an alternative which lets you search for strings with non-alphanumerics?
15:25sdegutisdissipate_: wanna help with that part?
15:27bbloomseangrov`: do `git fetch --all`
15:27bbloomseangrov`: then: `git branch --all --merged master | grep origin/509-protocol-warn`
15:27bbloomseangrov`: and you can double check yourself with --no-merged
15:27bbloom:-)
15:29seangrov`bbloom: Thank you, I feel I've failed to pick up a lot of basic stuff whenever you mention these things
15:29seangrov`I'll make a note of this in my bbloom.org
15:30bbloomseangrov`: i'm honored to have a whole org mode file
15:30dissipate_sdegutis, i could, but it wouldn't be in clojure.
15:31sdegutisdissipate_: why not?
15:31callenbbloom: solid. :)
15:31dissipate_sdegutis, my main languages are perl and python. for screen scraping, i use Mojolicious
15:32sdegutisdissipate_: what better way to learn Clojure ;)
15:32seangrov`bbloom: Well, after some help with templating, git rebasing, code patches, etc. I realized you were just cluttering my other "notes" file
15:32callenscraping HTML isn't screen scraping unless you're rendering the page with webkit.
15:32mattmossI went to bbloom.org and got nothing. lol
15:32callenmattmoss: org-mode
15:32mattmossYa, I gets it now. :)
15:32dissipate_sdegutis, true. but by the time i finished, you would probably already be done.
15:33callenmattmoss: not everybody knows what org-mode is.
15:33dissipate_sdegutis, how long are you willing to wait for this?
15:33mattmosscallen: I use it a bit myself... need to go deeper, tho.
15:33mattmossI don't do *everything* in emacs yet. Working on it...
15:34sdegutisdissipate_: few more seconds
15:34callenmattmoss: (inc knowledge) once a day :)
15:34dissipate_sdegutis, hehehe
15:34dissipate_sdegutis, i don't even know what the best user agent library is in Java
15:35bbloomcallen: i do that, but it just returns the same number every day. i really need a knowledge atom
15:35mattmosslol
15:35sdegutiscallen: what do you think of this wiki?
15:35sdegutisre https://github.com/sdegutis/clojuredocs/wiki
15:36mattmoss(swap! bbloom inc :knowledge)
15:36bbloommattmoss: arity error.
15:36magomimmodid anyone use fixture with clojurescript.test?
15:37bbloommattmoss: (swap! bbloom update-in [:knowledge] inc)
15:37mattmossdoh
15:37mattmossThat's what I meant.
15:37callensdegutis: don't seek my approval, you won't get it.
15:37hyPiRion(swap! bblom update-in [:knowledge] (fnil inc 1)) ; In case he has no knowledge from before
15:37dissipate_sdegutis, Please see http://clojure.org/special_forms#. ? it's not even hyperlinked
15:38hyPiRion(Not likely, but you can never be too sure)
15:38seangrov`(fnil inc 0) I think you'll find
15:40bbloomseangrov`: shh don't tell him. i want new instances of bbloom to get an unfair advantage
15:46seangrov`Interesting, working off of the 509-protocol-warn branch, every other incremental build fails
15:47seangrov`lein cljsbuild auto dev; builds ok - change 1 file, save, build fails - change same (or another) file, save, build passes
15:48seangrov`I'll see if I can track it down
15:48sdegutiscallen: why not?
15:49sdegutiscallen: you're a fan of wikis, right?
15:50callenI care about a specific problem, not littering github with wiki implementations.
15:53sdegutiscallen: oh, I see. You're just not seeing that this solves a specific problem.
15:53sdegutiscallen: Clojuredocs.org has Clojure 1.3 docs at the latest, this version has Clojure 1.5.1 docs. See the specific problem that was solved?
15:53callensdegutis: I understand everything you're up to exactly because you're only doing this because of your misbegotten understanding of something I mentioned.
15:53callensdegutis: it is you that are confused, not me.
15:54sdegutiscallen: wait, you think I did this github wiki project for you or because of something you said?
15:54callenI saw you start on it immediately after I mentioned clojuredocs was out of date.
15:54callenThe causality was very obvious.
15:54callenI mentioned one facet, of one component, of a much larger problems and you sprinted off, abandoned yet another project, and are up to another random thing you'll just end up abandoning.
15:56sdegutiscallen: Wow. Not only am I insulted by that, but it actually shows just how self-centered you are. If you'd paid attention to anyone besides yourself, you'd seen that I've been frustrated with clojuredocs.org being out of date for a few months now and have been thinking of a good solution.
15:56sdegutiscallen: It has nothing to do with you or what you said. Sorry to inform you that the world doesn't revolve around you and the shit you say in IRC.
15:56callensdegutis: I asked to be disincluded from whatever it is you're up to. Stop insulting me in public. I've been graceful enough not to air your dirty laundry in public, don't make me regret that.
15:57sdegutiscallen: I have a right to defend myself in public from all the arrogant insult you hurl my way in public.
15:57sdegutiscallen: And I fail to see how I "abandoned another project" in doing this wiki. What project?
15:57callenI've also been polite enough that whenever I have a grievance with you, I tried to pull it into privmsg rather than attempt to embarrass you in a public channel, but you persist in bugging me in public.
15:57sdegutiscallen: asking for your opinion on something I thought you would like is hardly "bugging" you.
15:58callensdegutis: you should assume by default that unless you have just cured cancer or you have something you need from me, you shouldn't talk to me.
15:58sdegutisAnd you did NOT pull *any* of this into a priv-msg at all. You started shit-talking me right away in #clojure, before I even knew you felt this way.
15:58sdegutiscallen: Oh I see. It's just part of who you are.
15:58arrdemcallen, sdegutis, kindly take this somewhere else. #clojure is not the place.
15:58sdegutis*plonk*
15:58arrdemseriously.
15:59sdegutisarrdem: Sorry, you're right. I'm done with callen.
15:59bbloomsdegutis: good call.
15:59callenarrdem: I whole-heartedly agree, but I couldn't let what he was saying stand un-responded to.
15:59bbloomcallen: yes, yes you can
15:59arrdemcallen: yes you can
15:59sdegutisarrdem, bbloom: although to be fair, I do believe I had a right to defend myself in the same venue that he insulted and attacked me.
15:59bbloomsdegutis: ignore him, he enjoys being a dick
15:59callenI don't.
15:59bbloomcallen: coulda fooled me
16:00muhoo,gentlemen
16:00clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: gentlemen in this context, compiling:(NO_SOURCE_PATH:0:0)>
16:00callenbbloom: not enjoying being a dick, doesn't mean I am going to suffer the wanton abuse of somebody like him.
16:00muhoo~gentlemen
16:00sritchiebbloom: stop feeding, dude
16:00clojurebotYou can't fight in here. This is the war room.
16:00bbloomsritchie: you're right
16:00arrdem(inc muhoo)
16:01callenbbloom: I take advice and correction from people like TimMc, happily.
16:01callenarrdem: sadly lazybot is remiss in its duties.
16:02arrdemcallen: Q_Q no karma today then
16:02dissipate_sdegutis, callen tried to brow beat me as well right off the bat. :(
16:02seangrov`I like muhoo's original line
16:02seangrov`,gentlemen
16:02clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: gentlemen in this context, compiling:(NO_SOURCE_PATH:0:0)>
16:02sdegutisDoes it make sense to just show docs for the latest Clojure version in this wiki?
16:03sdegutisI don't know how common it is to have a project that *can't* upgrade Clojure versions. We updated from 1.3 straight to 1.5.1 with no problems.
16:04dissipate_<bbloom> sdegutis: ignore him, he enjoys being a dick yet you teamed up with him to browbeat me
16:04callenthe loss of contrib caused much gnashing of teeth.
16:04grandyquestion: is it possible to write a clojure program that uses seesaw and serial port access w/o worrying about threading at all?
16:04sdegutisdissipate_: let's drop it
16:05amalloysdegutis: upgrading to 1.3 was the hard one. everything after that has been basically fine
16:05sdegutisamalloy: sounds like Clojure is getting more stable all the time
16:06bbloomdissipate_: my apologies for my tone at that time. I won't apologize for giving you good advice though: seriously, go read On Lisp
16:06sdegutisIn that case, I think it makes sense to just support "the latest Clojure". If anyone wants a similar thing for Clojure 1.5 or Clojure 1.4, they can run my wiki-seed Clojure script in a new git repo and upload it to another github wiki, right?
16:06callenOn Lisp is great.
16:07sdegutisAnd as long as the structure of each wiki stays the same, I can update the script to only replace the Doc section of each page with the new docs. Although new/removed pages will be a bit trickier.
16:09dissipate_bbloom, i will. thanks for pointing me to it.
16:10seangrov`On Lisp, I need to revisit it
16:10seangrov`Thinking about making my way through Lisp In Small Pieces again, I didn't actually translate any of it to code last time
16:11sdegutisI've found that Lisp books focus a lot on macros and a recursive style, including On Lisp.
16:11sdegutisMaybe I'm mistaken.
16:15asoloveAny cljs users here? I would like some workflow advice.
16:16seangrov`anyone?
16:16clojurebotJust a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."
16:16callenOn Lisp and Let over Lambda probably represent a particular style of Lisp book.
16:16seangrov`Let Over Lambda blew my mind
16:16callengrok*
16:16sdegutisseangrov`: in what regard?
16:17callenseangrov`: I never did Lisp in Small Pieces. Any good?
16:17dissipate_seangrov`, what about 'structure and interpretation of computer programs'?
16:17seangrov`sdegutis: Reader macros
16:17callenSICP is a beginners book that does a lot to seed the foundations of FP.
16:17sdegutisseangrov`: Oh.
16:17seangrov`dissipate_: Yeah, SICP is kind of a great place to start. I didn't appreciate it the first time I read through it, because I was angry about learning scheme
16:18callenseangrov`: I think that's most peoples' experience of it if they didn't know upfront what the value was.
16:18hyPiRioncallen: LiSP is good if you want to implement a lisp. It talks deeply about the internals and what choices you have, etc.
16:18callenespecially if it was something where they were obligated to learn it.
16:18seangrov`callen: Yeah, LiSP helps elimate the, "Lisp programmers know the value of everything and the cost of nothing" stuff
16:18callenahhhh. Very good.
16:19callena weird alternative might perhaps be the tutorial where you implement a Scheme on Haskell. Only negative thing is it encourages the uni-typed fallacy.
16:19seangrov`I've never done that, but like I mentioned, I'd like to experiment more with Haskell
16:20sdegutisseangrov`: I'm still angry about having learned Scheme. It makes me want to like it so much and then falls short.
16:20sdegutisAlthough I hear Racket doesn't fall short.
16:20hyPiRionsdegutis: You're free to stay in Clojureland :)
16:20sdegutisThat too :)
16:20callenseangrov`: the problem with learning Haskell is that I'm not sure there's one good way to learn Haskell. Peoples' epiphanies in HS will come out of nowhere and for seemingly unpredictable reasons.
16:21coventry2tools.trace interacts confusingly with exploring lazy sequences at the repl. "How the hell did the symbol TRACE: end up in my output??"
16:21sdegutisClojure is the "simple Lisp" I've been waiting for.
16:22sdegutisIt's not that it's simple (nothing really is), just that it's simple in the ways I need it to be.
16:22callenI've told hacker news users where clojurians hang out on IRC. Please forgive me.
16:22Brand0lol
16:24seangrov`callen: What's your hn username?
16:26callenseangrov`: coolsunglasses
16:27sdegutis,(hash-combine 100 "a")
16:27clojurebot-1640524969
16:28sheldonha lot of people ask "Learn You A Haskell or Real World Haskell". i think the best answer is both. they both drop you pretty hard to points, at which point it helps enormously to flip over to the other book until you get stuck there
16:28callenI don't doubt that some people might get value out of RWH, but I found it rather sparse in terms of information value and enlightenment. Enormously disappointing.
16:29callenI'd probably tell a new person to do LYAH and then a series of small projects like the Scheme-in-Haskell. maybe learn Parsec along the way.
16:30sheldonhjust make sure your new person has a fallback plan when chapter 3 on types and typeclasses leaves them for dust :)
16:30callensheldonh: is that where LYAH loses people?
16:31sheldonhcallen: some. it's a pretty shocking introduction to typeclasses, i thought
16:31dissipate_sheldonh, haskell is a language born and bred in academia, but is supposed to be used in the 'real world'. not sure how that shakes out.
16:32sheldonhdissipate_: it's well worth taking a look at, even if only for the algebraic types
16:32callenI found the type system enlightening, but not the GADT part.
16:33callenthe monads, the advanced type system, and function composition patterns are why I'd recommend learning Haskell to somebody.
16:33dissipate_sheldonh, and monads? i've heard they are a big turn off.
16:36sheldonhdissipate_: well i suppose it depends on what you're already into. it blew my mind, and i suspect made my introduction to clojure a lot more enjoyable
16:36sheldonhcallen: when i whined about LYAH, the concensus seemed to be "yeah, if you're new to functional programming, neither of those books is going to do it for you. flip flop and be patient"
16:37sheldonhdissipate_: well either i totally didn't get monads, or there's nothing to them
16:38sheldonhdissipate_: i'll let you know when i get to side effects in clojure ;)
16:38callenyou probably used monads in Clojure and didn't know it.
16:38callenlearning monads is about reifying something that's already happening. it's not alien.
16:38dissipate_i want to learn haskell some day. but right now i barely have time to lean clojure!
16:38xeqicore.async's go macro is implemented as a monad iirc
16:38dissipate_actually, i'd rather learn clojure and macros really well before delving into haskell.
16:38bbloomxeqi: yeah, tim used a state monad
16:38callenwhich is a continuation monad.
16:38calleneventually you tug at the string enough for the sweater to unravel. then it stops being mysterious.
16:38bbloombut all effects are delimited continuations :-P
16:38dissipate_i've also read in several places that you can have memory blow up with haskell's default lazy evaluation
16:38callenspace leaks don't matter if you're just learning.
16:38callenI just use them as a blunt instrument excuse for not bothering to use Haskell outside of pedagogy.
16:38bbloomdissipate_: also, it's a dual leak. see this comment:
16:38bbloomhttp://lambda-the-ultimate.org/node/2273#comment-40156
16:38callenbbloom: I agree with the response though, it's a whole program problem.
16:38bbloomi'm a big fan of non-strict evaluation, but i don't believe in *implicitly* non-strict execution
16:39bbloomcallen: true
16:39callenthat was my real objection to Haskell. I didn't have a choice in having to force strictness in awkward ways whenever I wanted to avoid laziness.
16:40bbloomcallen: yeah, haskell has strictness annotations, which is a really weird notion b/c it means that things are now transparently strict in usage
16:40dissipate_bbloom, and how do you detect those leaks and fix them before they worm their way into a large software system?
16:41bbloomdissipate_: *shrug* i don't write much haskell. but it's not like strict GC-ed languages aren't without their space leak problems
16:41callenwrite perfect code or wait for your program to blow up, then sift through the entrails to find the source of the space leak.
16:41bbloomdissipate_: and even in clojure people "hold on to their head" without need often
16:41callenunless some sort of static analysis tool for finding them has come out.
16:41dissipate_bbloom, that's very true. i've had my fair share of using 'weaken' in perl.
16:42callenI'd be very very surprised if that was the case though.
16:42callenbest you could is a glorified lint really.
16:42bbloomdissipate_: profiling tools are useful. hurray JVM ecosystem
16:42sheldonhcallen: having looked at the C that haskell produces, static analysis would be hilarious
16:43callensheldonh: static analysis is part of the point of Haskell.
16:43callenyou analyze the Haskell, not compiler output.
16:43coventry2Are there any obvious reasons why using (intern) to copy everything from (ns-publics 'clojure.core) into another ns would not result in a fully functional copy of core? This is for testing some debugging-instrumentation code. I would also want to do it for all of clojure.core's tests.
16:44sheldonhcallen: it's not that i don't believe it. i just can't imagine it :)
16:46sontekHow do you guys handle authentication in your apps right now? Are you using something like cemerick/friend?
16:47callensontek: I don't recommend the use of friend unless you're tackling something very complicated that is close to commending the use of a state machine.
16:47callenwriting simple auth fns that return true/false and a middleware isn't difficult.
16:48sheldonh+1
16:48sontekWas wondering if people had a specific library they used for handling sessions/cookies
16:48sontekfor the authentication
16:48callensontek: I use lib-noir stuff for encrypted cookies.
16:49callenI simply read the state of the session (in the middleware) to grab a user-id and fetch the user state and inject it into the request.
16:49callenfrom there, you just check for the existence of the user and what roles they have to decide on a per route basis if you want to pass/fail access.
16:50sontekcallen: sounds good
16:50callensontek: github.com/bitemyapp/neubite/ for a deployed example.
16:50callenignore the mongodb. I was feeling especially nihilistic when I wrote that app.
16:51sheldonh:)
16:52callenooh, my klout score has almost caught up to Hickey's. fun. I wonder how many more times I can make fun of MongoDB for being terrible on Twitter to catch the rest of the way up.
16:52sheldonhcallen: it's only terrible on Twitter? *badadush*
16:59sontekwhats your twitter? I need to follow clojure people now that I'm abandoning the python community
17:00callensontek: bitemyapp - but, you should follow the people I follow, not me.
17:00callenmy github is the same.
17:01jballanchmm...anyone have tips on updating a field of a js object in cljs?
17:01jballancdoing (set! (.-myField myObj) new-val) all over the place just seems ugly
17:01seangrov`jballanc: Is this for interop?
17:01jballancinitially yes
17:02jballancI'm doing a straight port first, then later "clojure-izing" it
17:02seangrov`Well, there is aset
17:02coventry2jballanc: then you're doomed to lots of in-place modifications.
17:02jballancseangrov`: does aset work on fields?
17:03seangrov`But like coventry mentions, really it's ugly for a reason
17:03akurilincallen, ping. Was your recommendation to turn off ansi colors in the log output to avoid crapping up the log file with extra characters? I actually kind of like that it's extra readable with tail -f, but I guess that's the only place that works.
17:03seangrov`When "clojurizing" it, you don't want to be settings any fields if you can get away with it
17:03jballancseangrov`: that's the plan
17:03callenakurilin: oh good, I looked for you in here and you weren't :)
17:03jballancok, it's as I suspected then...thanks!
17:04callenakurilin: it's up to you re: ansi coloring. I just wanted people to have the option.
17:04callenakurilin: do you want me to remove newlines or not?
17:04seangrov`jballanc: You can also use doto to clean it up a bit
17:04seangrov`e.g. (doto obj (aset "field" "value") (aset "another-field" "another-value"))
17:05jballanchmm...that might help
17:05callenakurilin: but yes, removing ANSI colors - I had clean logs in mind. it's up to you whether that matters or not.
17:05sheldonhakurilin: as long as you can grep past the colors... :-)
17:05callensome people don't want to manually filter ANSI codes out of their logs.
17:06akurilincallen, I'm trying to figure out what to do with that SQL query string across multiple lines situation. From what I can tell Rails dumps the query out in one single line
17:06akurilinso you might consider normalizing whitespace to 1 space at most
17:06callensingle line is a simple implementation for me.
17:06akurilinand replace newlines with one space
17:07callenThat's doable.
17:07akurilincool
17:07akurilinAgain, it might be just me and my way of doing things, so if there's a significantly better way I can just switch to that :)
17:07sheldonhwhat are you going to do with newlines in quoted strings?
17:07callenakurilin: no, it's fine. Thanks for filing the issue.
17:08callensheldonh: too bad so sad.
17:08sheldonhquery logging is the devil's work, anyway :)
17:08callensheldonh: what makes you say that?
17:10akurilincallen, I just now ran a sample insert in Rails and got the following output: http://pastebin.com/JzuRpZzN . It looks like they track the beginning/end of transactions and the individual SQL queries inside
17:10akurilinas in, they tell you how long each one takes
17:10sheldonhcallen: ugh, it's fraught. it starts with "oh, so we'll have to rule out syslog as a transport", meanders past secure data disclosure and ends up with exasperating stuff like "but if we aren't faithfully logging quoted strings, why bother logging them at all?"
17:10Rayneswat
17:10RaynesAm I seeing people talk about rails in #clojure?
17:11callenRaynes: don't worry about it. it's about blackwater.
17:11callenakurilin: I don't really operate at that level of abstraction in blackwater. all I know is queries and runtimes.
17:11akurilincallen, also the other thing we don't have right now in blackwater are the values of the params.
17:11akurilincallen, oh I see, so would that be not feasible at this point?
17:11callenuhhhh...maybe? it's something I'd rather wait to see if people really need.
17:12callenvalues in params could potentially be useful for diagnosing index behavior, but not a high priority yet.
17:12callenI'm kinda waiting to expand blackwater until I can talk to seancorfield.
17:12akurilincallen, fair enough.
17:12callenakurilin: the reason I want to talk to corfield is that I strongly suspect I am not wrapping the right parts of c.j.j
17:13akurilincallen, I'm actually curious, does sql allow you to run an explain and still get the resultset back?
17:13callenI could be wrong, but that's why I need to talk to him.
17:13callenakurilin: not simultaneously that I'm aware of. You can run the explain separately.
17:13callenyou don't really want blackwater to explain your queries do you?
17:13akurilinoh you'd have to run stuff twice, I get it
17:13callenquery planner output is voluminous.
17:14akurilincallen, I think the only use case would be to have this super-verbose mode for index debugging, but you could do this by hand anyway from the repl if you wanted to.
17:14akurilinand it's probably not even the best place to do it
17:15callenyou're right, not the best place. neat idea though.
17:15akurilinHonestly just seeing those ms values is a good indication of something gone wrong :)
17:15callenprecisely.
17:15callenit's like I said in the README, blackwater is the canary in the coal mine. human intervention beyond that.
17:15callenI'd consider something like, "warn me if my query is relying on unindexed fields", but that's already getting kind of invasive.
17:16callenand the ms value should tip you off anyway.
17:19callenakurilin: thank you for caring about the silly little library :)
17:20akurilincallen, my pleasure, gotta start giving back somewhere, might as well be there.
17:21akurilinI might have asked this several times before, but is there any way of determining at runtime what profile I'm running as? For example, I might want to set *use-ansi* to false in production. I could have an external config entry for that, but it'd be easier to just ask if I'm in uberjar profile.
17:24akurilinI guess one way is to add :use-ansi false to :env map in :uberjar profile and default to true if the key is not there.
17:28sheldonhoh i see. cons doesn't realize a lazy sequence
17:28sheldonhone less hoop to jump through :)
17:30callenakurilin: yeah I'd use the env map.
17:34callenakurilin: it's uploaded.
17:34callenakurilin: 0.0.7, flattens the newlines out and scrunches the whitespace together.
17:34callenhttps://clojars.org/blackwater
17:43seancorfieldjust saw you invoked my name callen ? about blackwater... and c.j.jdbc i gather?
17:46callenseancorfield: yeah, I had a bit of a dumb wrt the underlying API in c.j.j, was hoping to steal some of your time to figured out a better approach than what I'm currently doing (whack-a-mole). Nothing big.
17:46callenI was planning on just doing so at the next meetup you were at since it's presumably time you've already allocated to the community :)
17:47sdegutisI think a key principle behind good Clojure code is YAGNI.
17:49seancorfieldcallen: ah, and i threw a wrench in your plans by not being at the meetups for a while...
17:50glosolihmm is there something default in Clojure Mode for Emacs, to make Enter work as C-j ?
17:50akurilincallen, awesome, thank you!! That's pretty darn fast!
17:50akurilincallen, what meetups are you guys going to?
17:50seancorfieldglosoli: C-h c C-j says that's newline-and-indent for me
17:51callenseancorfield: it's your time, not mine, and the meetup I went to was very wonderful. I ended up having some great conversations.
17:51seancorfieldakurilin: the (San Francisco) Bay Area Clojure Meetup
17:51callenakurilin: I went to the SF one on the 5th
17:51callenI'm RSVP'd for the next few.
17:51seancorfieldI've been running that meetup for about two years, while Amit was too wrapped up in Runa
17:51seancorfieldbut now he has more time so I'm taking a break for a while
17:51callenunderstandably.
17:51akurilinseancorfield, cool, been to it a couple of times a while ago, didn't know any of the names at the time.
17:52callenakurilin: 'ho damn, you're in the Yay?
17:52seancorfieldI may attend the San Mateo ones if the topics are interesting enough, but SF is a bit of a PITA to get to really for me
17:52akurilincallen, yeah, I'm in the Twitter building about 7 days a week :)
17:52akurilincallen, you in the area?
17:53callenakurilin: ah man, we should get lunch or something.
17:53callenakurilin: yeah, I live in Ingleside and work in SOMA.
17:53seangrov`seancorfield: Would be interested in talking there, either about the cljs source map work or getting "real keywords" into cljs
17:53seangrov`Should I email Amit?
17:53seancorfieldI live in the East Bay - and work from home :)
17:53seancorfieldYeah, seangrov' that would be the best
17:54seancorfieldyou have his contact details?
17:54seangrov`Yeah, looks like it
17:54akurilincallen, sure, any time. I'm also going to have to find some time to make it to the meetups as well, been a while.
17:54seancorfieldyou can always contact the meetup organizers...
17:55callenseangrov`: I'd love to hear about either of those subjects.
17:55callenakurilin: yeah, the only time I'd gone to the meetups before was to teach Emacs+Clojure, ended up having them clone my dotfiles repo. lol.
17:55seangrov`callen: I don't think I have anythign super insightful to say, but maybe a 10-15 minutes overview of what it involved. Would be cool to get others working on the cljs compiler as well.
17:55callenI hope nobody's still using that install still.
17:55akurilincallen, that's one way of "teaching" :)
17:56callenakurilin: I was showing them how to use it, rather than how to install it :P
17:56sdegutisThis is getting confusing
17:56callenseangrov`: making cljs less scary is good.
18:04seancorfieldseangrov`: i saw david had released some incremental compilation improvements just recently?
18:05seangrov`seancorfield: Yeah, I've pulled them down but seen the same improvements
18:05dissipate_has anyone downloaded the book 'on lisp' onto the amazon kindle ereader?
18:06callenseancorfield: David was VERY excited when he got it working.
18:06seangrov`woops, I've *not* seen the same improvements
18:07callenseangrov`: understanding that you've got a bunch of production code strewn about, is it possible you might have a contrasting code sample that doesn't benefit as much as the stuff Nolen was working with?
18:07akurilinWhat is the deal with having two vars with the same name, one with a * after it? As in, my-function and my-function*. Is this a common pattern for defining a macro and a function it calls internally?
18:07callenakurilin: yep.
18:07callenakurilin: the recommended pattern is to make the function do most of the work, then just sugar it with the non-* macro.
18:08callenakurilin: Korma follows this pattern.
18:08bbloomakurilin: some of us feel that the * naming is a bit of an anachronism though
18:08seancorfieldfigured that's what you meant... i haven't tried it yet... and i'm not familiar enough with cljs to really know what's up... but it sounded like good progress :)
18:08bbloomakurilin: i prefer a -fn suffix for the functions that back my macros
18:08seangrov`callen: Definitely could be. I also trigger some bad compilations on every-other compile when using auto. But now I know enough that I can talk a bit with dnolen and possibly track down the issue myself
18:08bbloomakurilin: a * suffix basically is an admission that i couldn't come up with a better name
18:08callenseancorfield: it at least sets a nice precedent for not tossing out as much stuff from compile to compile.
18:09callenbbloom: I like the macro fn* naming convention.
18:09callenand would prefer to be able to clearly and unambiguously identify macro and function counterparts.
18:09seancorfieldakurilin: i also do that with an internal implementation for an interface, such as when instrumenting code for New Relic
18:09seangrov`seancorfield: Yeah, there aren't many reasons left not to do most development in cljs at this point
18:09callennote that the syntax was sufficiently clear that akurilin guessed what was going on.
18:09seangrov`Getting started is still rough, but I'm not clean on how to fix that quite yet
18:10callengetting started meaning getting lein-cljsbuild to work, or understanding how to organize things?
18:10seangrov`callen: More like time-to-repl-working
18:10akurilincallen, I was using clojure.jdbc's db-transaction as example, and it's pretty obvious from that example since the former is a two-liner, and the latter is a giant blob of logic.
18:11seangrov`You need a host html page setup, etc.
18:11callenseangrov`: have you tried Austin?
18:11seangrov`Not yet, looking forward to it though
18:11callenI've seen some new people gravitate towards that.
18:11bbloomcallen: the problem is that * is used in lots of places besides just macro/function divide
18:12akurilinbbloom, that's fair, I'll keep it in mind
18:12akurilinbbloom, that's also true. Whenever I see * my gut reaction is "this is some magical part of Clojure I haven't used yet likely"
18:12bbloomakurilin: heh, but it's also on list*
18:13bbloomakurilin: it literally means "like that thing without the star, only a little different"
18:13callen* is an indication that you're looking at an underlying primitive of some sort.
18:13dissipate_if i were to implement the public suffix algorithm in clojure, would that be worthy of clojars? http://publicsuffix.org/list/
18:13callenI don't think it's really that unclear, but that might be the CL brain damage talking.
18:13akurilinis *foo* a convention for per-thread bindings?
18:13bbloomcallen: does list* underly list?
18:13callendissipate_: you can deploy whatever you want to clojars.
18:13bbloomakurilin: yes
18:14akurilinOk the next person to overload * with some other meaning gets the hat of shame.
18:14dissipate_callen, would this be useful?
18:14callenI think having universal warning signals like * and ! are useful and I don't find the patterns unclear.
18:14bbloomcallen: * is useful, but it's also vague
18:14callenby the time you need to care, you already know what it means.
18:15akurilinbbloom, that latter scenario you listed does sound a bit silly, although I do struggle every time with finding good meaningful function names that fit under 10 characters.
18:15callenit's not like monads in Haskell where you're forced to care but nothing makes sense.
18:15akurilinIt's really challenging.
18:15lgs32ahello
18:15callenlgs32a: hi
18:15bbloomakurilin: naming things is very difficult :-)
18:15lgs32ais anybody experienced with debugging future
18:15callenbbloom: I hear datomic solved the other hard problem.
18:15lgs32afutues
18:15lgs32afutures
18:15sheldonhoff-by-one errors? ;)
18:15lgs32aits a problem
18:16dissipate_god damnit, someone already did it
18:16lgs32abecause i have a future that throws java.util.concurrent.ExecutionException when i deref it
18:16lgs32aand then i only see the exception
18:16lgs32a"Don't know how to create ISeq from: clojure.lang.Keyword"
18:16lgs32abut not the right stacktrace
18:16lgs32abecause it must have catched the exception
18:16akurilinbbloom, one of the few things I liked about objective c and its addFooTo:(something *)bla with:(something *)bar, even though many times is was just garish.
18:16lgs32are-thrown
18:16callenlgs32a: find out where it's trying to seq over a keyword.
18:17lgs32ahaha
18:17lgs32ai am doing for 30m now
18:17seancorfieldlgs32a: i general develop & test without future calls and only add them in once i'm sure the underlying code does the right thing
18:17bbloomakurilin: that's why half my functions just take a damn map as their only (or close to only) argument
18:17lgs32aits ridicolus, the bug does not exist
18:17callenlgs32a: corfield's advice is solid.
18:17lgs32aso to speak
18:17lgs32ai know
18:17lgs32abut this is already high level code
18:17lgs32aon top of a 4k+ lines code-base
18:17akurilinbbloom, I'm with you on that one. Positional parameters stop being fun after 1 parameter :) Also makes mocking of those functions a nightmare.
18:18lgs32aa handler fn for two async channels that maintains local state in a future
18:18akurilinI want a couple of hours of my life back trying to hunt down an incorrect with-redefs
18:18seancorfieldand your unit tests don't show any problems? (he asked, leadingly...)
18:18callenlol ^^
18:18lgs32anow
18:18lgs32athe error is certainly not thrown from low-level of my code
18:18lgs32athat is all well-tested
18:18lgs32ait must be directly in the function where the ref is used
18:18callenlgs32a: that reduces the surface area you need for check for a keyword being Seq'd over.
18:19dnolenseangrov`: note the improvements only apply if you use :optimizations :none, we can't make Closure any faster.
18:19lgs32aya
18:19lgs32ai know
18:19dnolenseangrov`: :whitespace is also significantly faster
18:19callendnolen: handy for local dev though, right?
18:19lgs32ait would be too nice if the concurrent exception would print the stack-trace
18:19bbloomwhat's the preferred representation for 3x3 affline transformation matrixes these days?
18:19dnolencallen: exactly which is the important thing
18:19bbloom(in clojure, i mean)
18:19lgs32acan i print the stack-trace of the second last exception?
18:19lgs32asomehow?
18:19callenbbloom: representation for outer API or for inner work?
18:20dnolenseangrov`: did you actually encounter issues w/ my changes? I was going to merge to master
18:20bbloomcallen: preferably with a nice data literal representation
18:20callenbbloom: Have you looked at mikera's core.matrix?
18:21bbloomcallen: yeah, looking at it now, but it seems to be aimed at arbitrarily sized matrices
18:21bbloomcallen: i want something tuned for 2D transforms
18:21hfaafbis the order of arguments in cons and conj supposed to represent the operation itself?
18:21callenbbloom: 3x3 eh? clj-tuple?
18:22hfaafbalternatively is there a reasoning to argument orders that are unique to lisp/clojure?
18:47justin_smithany tips for using jni / native code from clojure? no matter where I put the .so, I can't get System/loadLibrary or System/load to work
18:47justin_smithI am trying to use lib_jcsound from the libcsound-java project (debian)
18:50justin_smith(System/getProperty "java.library.path") shows a path that contains the .so I want to load
18:52gravgrav
18:53Rich_MorinAny suggestions on economical hotels near the conj?
18:53sontekJoy of Clojure (Fogus) vs Clojure Programming (Emerick), any tips?
18:53justin_smithboth are good, if you can only get one get the Emerick one
18:53callensontek: they serve different purposes at different times.
18:54hyPiRionsontek: yes
18:54hyPiRion(Yes to both)
18:56sontekClojure Programming is on kindle, so I'm leaning towards it, but thats not a very scientific reason
18:57callensontek: you typically read Joy of Clojure after you already understand the basics of Clojure.
18:58clj_newb_2345when are ~/.emacs and ~/.emacs.d/init.el called? does ~/.emacs need to call ~/.emacs.d/init.el ?
18:59calleninit.el gets called automatically. a .emacs is not obligatory.
18:59justin_smithclj_newb_2345: it will use the first one it finds
19:00justin_smith.emacs, .imacs.el, .emacs.d/init.el all in ~
19:00justin_smithhttp://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
19:00justin_smiths/.imacs.el/.emacs.el
19:01clj_newb_2345noted, thanks
19:03justin_smithI have this native code library for java, it is installed, I have no idea how to load it in clojure
19:03justin_smithI don't understand the error I am getting
19:05callenjustin_smith: can you start with a refheap?
19:05justin_smithyeah, I actually finally got the lib loaded, now I cannot access the contents
19:05justin_smithone sec
19:06callenjustin_smith: what were you doing wrong?
19:07justin_smithI was using System/load to specify the full path of the artifact, but not including the .so as part of the name
19:07justin_smithbetter would be to find it in the path, that is still unresolved
19:10justin_smithhttps://www.refheap.com/18452 here I have the code that worked for loading the .so, and the contents of the related jar
19:10justin_smithhow do I go about loading that jar in order to use the code in the jni lib? or is it possible to see what was in the jni lib and access it without the jar?
19:11clj_newb_2345M-x customize face <RET> cursor <RET> -- I change the "black" to "green", it shows up as green on my screen. I hit "set for current session" and "Save for future session". Then, I go back to my buffer -- still black, when I do Mx customize-face <ret> cursor <ret> -- cursor is still set as black, not green. Wtf is going on?
19:13justin_smithclj_newb_2345: #emacs is more likely to be helpful with that I think
19:17muhooheh, this guy's attitude about java is about the same as mine: http://code.nomad-labs.com/2011/12/09/mother-fk-the-scheduledexecutorservice/
19:18muhoo(yes i got bit by this while trying to use at-at)
19:19arityfnWhats a popular framework for web development?
19:21seancorfieldClojure is much more about composing libraries than full frameworks.
19:22callenarityfn: it's not a framework, but http://www.luminusweb.net/ does a good job of teaching best practices and shows you nice libraries.
19:23arityfncallen: ill check it, thanks.
19:23arityfnou9
19:23seancorfieldarityfn: if you really do want a framework, I ported one of the most popular CFML frameworks to Clojure a while back :) https://github.com/framework-one/fw1-clj
19:24seancorfieldbuilt on Ring + Enlive / Selmer with its own routing code
19:24brehautarityfn: dont put off actually learning ring either
19:25brehaut(not that there is much to learn, but it is the foundation of everything else)
19:25seancorfieldyeah, pretty much everthing is based on Ring :)
19:27callenbrehaut: Luminus is just Ring.
19:27brehautcallen: yes i realise that
19:27brehautcallen: but sometimes people dont like looking below eg compojure
19:28callenbrehaut: we try to use the middleware to sidestep that problem. The middleware forces you confront the nature of it directly without doing something tedious.
19:29justin_smithany tips for using reflection or other such tricks to figure out how to use a jar? I used mvn to install it to my local repo, and have added it as a dep in my project.clj - but none of the classes I am asking for are being found
19:30justin_smithI unpacked the jar and asking for the classes defined in there is also failing
19:32justin_smithfor example - jar file has csnd/csnd/Soundfile.class but (import '(csnd.csnd Soundfile)) fails
19:32justin_smithas does (import '(csnd Soundfile))
19:32justin_smith(ClassNotFoundException)
19:37tomjackare there more than two possible answers to that question?
19:37tomjack1) typo, 2) jar not on classpath
19:37justin_smithit is in my project.clj, which is not throwing an error
19:37justin_smithor could an error in my project.clj deps be silently failing?
19:38tomjackI have to ask, though I bet you know, you did kill your jvm and restart?
19:38tomjack(after adding the dep)
19:38justin_smithI found a blogpost about using the api - am I correct that "import csnd.Csound;" translates to (import '(csnd Csound)) in a repl?
19:38tomjackI would not be surprised if there are other answers, but would also bet they are relatively rare compared to those two :)
19:38justin_smithyes, I killed the repl, ran lein deps, and ran lein repl again
19:39tomjackthat looks right t ome
19:39tomjackbut that would be csnd/Csound.java, not csnd/csnd/Csound.java ?
19:39tomjacker .class
19:39justin_smithyeah, I tried both variations
19:39justin_smiththe dir naming structure threw me off a bit
19:40tomjackand the jar you're looking at is the one that is reported by `lein classpath`?
19:40justin_smithI'll check
19:44justin_smithOK, starting from scratch here, the right jar (the one I mvn installed manually) is being found, the so is loading successfuly
19:45justin_smithnow I am getting a NoClassDefFoundError
19:45justin_smithwould that be caused by doing the mvn install wrong?
19:45justin_smith"The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found."
19:45justin_smiththat is weird
19:46tomjackhmm
19:46tomjackoh
19:47justin_smithI'll do another refheap paste
19:47tomjackthe only time I have seen that is when there was some initialization trouble for the class and then you try to load it again
19:47tomjackso hopefully you should see some other exception first, before the NoClassDefFoundError, in a fresh repl?
19:47justin_smithhttps://www.refheap.com/18453 transcript of lein classpath and a fresh repl
19:48tomjackah I see
19:48tomjack"(wrong name: csnd/Csound)"
19:48tomjackthe jar is busted?
19:48justin_smithmaybe
19:48justin_smithI could ask the debian maintainer what is up
19:48justin_smithmaybe recreate the jar taking the top level library out?
19:48tomjackyeah
19:48justin_smith*top level directory
19:49tomjackbet it will work
19:49justin_smithI'll try
19:49justin_smiththanks very much for the help
19:54justin_smitha jar is just a zip with a magic directory structure and META_INF dir right?
19:54dnolenreal Keywords landed in ClojureScript master
19:55justin_smithwith the new jar (taking out the extra csnd folder) I am back to just ClassNotFoundException)
19:55justin_smithdnolen: kickss
19:55justin_smith*kickass
19:55tomjackbizarre, dunno
19:56tomjackhmm, I see JNI?
19:56tomjackthat raises my probabality for explanations I don't understand :)
19:56justin_smithheh
19:56justin_smiththe jni seems to be doing the right thing
19:56justin_smithbut yeah, it is kind of unknown to me too :)
19:57Bronsadnolen: did you already check how much does this reduce code-size with advanced-optimizations?
19:57justin_smithyeah, with the distro's jar, I get the NoClassDefFoundError, (wrong name), with the version taking the top level dir out I just get ClassNotFoundException
19:58dnolenBronsa: I don't really expect it to have much of an effect.
20:02dnolenClojureScriopt 0.0-1877 going out
20:08shaungilchristafter much rumination I think I have decided the reason clojure/scirpt makes me so happy is that it keeps you out of "the loathe zone" e.g. where regardless of best practice you are just not happy with the resulting codebase. With clojure there is always a way to make it better/cleaner/more abstracted in a good way. that is all.
20:08justin_smithhere here
20:08justin_smithif only I could figure out this jni weirdness
20:09lynaghkdnolen: any thoughts on the cljs middleware proposal?
20:09dnolenlynaghk: looks awesome to me
20:09lynaghkdnolen: I was a bit surprised at how easily it was to actually implement on top of the existing codebase
20:09dnolenlynaghk: so you actually have this and it already works?
20:09lynaghkdnolen: the biggest gap right now is handling :foreign-libs and other JavaScript/Closure fanciness.
20:10dnolenlynaghk: yeah that's what I would assume, I still don't really understand closure.clj fully and there are things about it that just don't make sense.
20:10callenshaungilchrist: thank you for having a name that doesn't begin with "sean"
20:10lynaghkdnolen: there's an implementation in the repo, yeah. I haven't used it a ton yet, but I'll put together my own lein-cljsbuild-like thing and kick the tires for a while
20:11lynaghkdnolen: yeah. there's all of this stuff in there around trying to order the dependencies for Closure.
20:11dnolenlynaghk: which isn't consistent
20:11lynaghkdnolen: My gut feeling is that we should just let Closure handle all of that nonsense
20:11dnolenlynaghk: if that's possible sure, though I'm not sure that it is.
20:12lynaghkdnolen: there are some promising looking bits in the Closure Javadocs
20:12dnolenlynaghk: I think the main flaw currently is that "compiled" ClojureScript is treated as any old JS file, which make the dependency order change under incremental compilation
20:12dnolenlynaghk: huh cool, more than happy to punt that work if we can.
20:13lynaghkit's easy to order the cljs-generated files since we have requires info already: https://github.com/lynaghk/clojurescript-compiler-proposal/blob/master/src/com/keminglabs/cljs_proposal/condense.clj#L52
20:13dnolenlynaghk: radical!
20:13lynaghkhowever, if possible I'd like to get rid of that and use Closure's "manageClosureDependencies" option. I tried for 10 minutes but my Java-fu was not strong enough to get real output
20:14lynaghkbut, yeah. Closure is already parsing the JS. Clients should not have to regex through their JS for goog.provides shit.
20:14dnolenlynaghk: spelunking in Closure source is not my idea of fun - it took forever to figure out what the hell I was supposed to do to enable source maps
20:15lynaghkdnolen: yeah, no joke. My plan was (and still is) to just make noise about what I have and hope some Javadoc-fiend figures it out = )
20:15dnolenlynaghk: anything that simplifies closure.clj gets a thumbs up from me, however we'll probably want to leave closure.clj alone
20:15dnolenlynaghk: I suspect folks like Relevance also have a lot of custom stuff built on the internals
20:16dnolenlynaghk: or at least give people significant heads up about breaking closure.clj.
20:16lynaghkdnolen: I'd want to get 'em on the phone and ask about what they are and aren't using
20:16dnolenlynaghk: this sounds like a really good plan
20:16dnolenlynaghk: I'm be happy to join in on that
20:16lynaghkif possible I'd like for the ClosureScript source code to actually look good.
20:16dnolenI'd be
20:17SegFaultAXVersioning is usually a good way to do that.
20:17lynaghkpractice what we preach, you know. Separate concerns, isolate side effects, don't crawl the file system from every function =P
20:17lynaghkdnolen: you know who the right person to talk to there would be? stuart sierra or brenton ashworth?
20:18dnolenlynaghk: I think we should ask Alex Miller if he can arrange it, I'm sure Stuart & Brenton will want to be in on this
20:18lynaghkah! I just had the same thought
20:18lynaghkI'll shoot him an email
20:18lynaghkthe closure stuff is mostly plumbing, so I don't think it'll be too hard to come up with a plan.
20:19lynaghkDo you have a sense for what we should/shouldn't expose w.r.t the AST?
20:19lynaghkdnolen: a ton of cool stuff will come out of exposing the AST: https://github.com/lynaghk/clojurescript-compiler-proposal/blob/master/src/com/keminglabs/cljs_proposal/middleware.clj#L50
20:19dnolenlynaghk: I'd say expose nothing until an AST can be agree upon
20:19lynaghkdnolen: just not sure if the format is stable/documented anywhere
20:19dnolenagreed
20:20dnolenlynaghk: it'll be important to get Rich, Ambrose's feedback on the AST, Bronsa probably has some thoughts, etc
20:22dnolenlynaghk: is your solution for moving away from namespaces atom to implement memoization everywhere?
20:22lynaghkdnolen: is that the motivation, you mean?
20:23dnolenlynaghk: I just mean if you're looking into that, how are you going invalidate cache around tooling/reflection services?
20:23dnolencaches
20:23lynaghkI'd like to minimize the amount of mutable state inside the compiler. Right now it looks like a lot of magic twiddling happens based on the order forms are flying through the analyzer
20:24dnolenlynaghk: yes I understand the goal, but how are you going to address the above ^
20:24lynaghkThat said, rearchitecting the compiler is above my pay grade
20:24lynaghkright now, not going to. There may be caveats like "you can't actually analyze different namespaces in parallel"
20:26lynaghkmy gut feeling is that we'll be able to memoize cljs analysis (aside from redefinitions of JVM macros)
20:26dnolenlynaghk: ok, so then I think whatever you come up w/ needs to address the reality that analysis side effects the namespaces atom
20:26dnolenlynaghk: you can't push that under the rug in any design
20:27lynaghkdnolen: let me check and see where the namespace atom is actually used
20:29lynaghkdnolen: uh, yeah. I have no idea what is going on
20:29dnolenlynaghk: def is the primary offender
20:30dnolenlynaghk: everything else just uses to to figure what has and hasn't been declared, what has and hasn't been analyzed
20:30dnolenlynaghk: parse 'def in analyzer.clj
20:31lynaghkdnolen: does the analysis of a namespace depend on the contents of other namespaces?
20:31lynaghkespecially since one cannot define macros within ClojureScript namespaces
20:31dnolenlynaghk: yes, parse 'ns will analyze all dependencies
20:32dnolenlynaghk: we can't properly analyze a namespace without understand what's coming from required namespaces
20:33lynaghkdnolen: what's an example?
20:33dnolenlynaghk: example of what?
20:33lynaghkdnolen: of where knowing nothing about other namespaces inhibits full analysis of a namespace
20:34dnolenlynaghk: nearly everything around function invocation - optimizing and warning
20:35lynaghkI get that you wouldn't be able to emit warnings about, e.g, "foo/bar: no var bar in namespace foo"
20:35dnolenlynaghk: if we don't analyze a depended namespace you have to go through generic function dispatch, .call - this means no arity checking, touching arguments object, etc
20:35lynaghk(at analysis time, anyway; once you had all namespaces in hand it seems like you'd be able to do that)
20:35lynaghkdnolen: how difficult would it be to split that into two passes?
20:37dnolenlynaghk: like analyze an entire namespace w/o using that information, and then analyze everything again?
20:38lynaghkdnolen: yeah. split analysis into many smaller passes instead of a monolithic side effecting fn
20:38akurilincallen, when I want to change the value of sql-color in blackwater, do I just intern a new value over it, or is there a better way? This works, but might be not the most idiomatic.
20:38lynaghkdnolen: http://www.cs.indiana.edu/~dyb/pubs/nano-jfp.pdf
20:39dnolenlynaghk: yes, I know that, but that doesn't really address what I just said
20:39lynaghkthe proposal to split cljs compiler into a set of sequential middlewares is basically the same thing.
20:39callenakurilin: go with that for now.
20:39dnolenlynaghk: you're going to analyze an entire namespace and none of if will be correct because you don't have dependency information
20:39lynaghkdnolen: sorry, maybe I misunderstood. (Also, I'm not saying that splitting up the analyzer right now will be a walk in the park)
20:39callenakurilin: can make a feature request on github if you like.
20:39akurilincallen, cool. I think something like timbre uses atoms for its config settings.
20:40akurilincallen, I can't think of a super compelling reason to want more than that at this point, since it works just fine.
20:40callenakurilin: I've got config patterns in my other libraries. I know how to handle it, I just need to know what people want to be able to configure.
20:41lynaghkdnolen: sure, plenty of it will be correct. There will just be lots of loose ends about "foo/bar, whatever this is" that gets filled in later on a second pass
20:42lynaghkdnolen: alternatively, it could be done on a single pass where the dependent namespaces are explicitly passed in
20:42dnolenlynaghk: in theory I like this idea - but I think we're going into the weeds which what I was suggesting earlier
20:42lynaghkand the namespaces are all sorted before analysis
20:43dnolenlynaghk: which is why I said earlier, enhancements should simply accept the side-effecting nature the namespaces atom
20:43lynaghkso using clojure.core/memoize is out of reach right now
20:43dnolenlynaghk: to not accept it means a considerable amount of reworking which is unrealistic in any reasonable amount of time.
20:43lynaghkand we should have another cache invalidation scheme?
20:44lynaghkdnolen: yeah, I hear you---since I'm not doing the rearchitecting myself I can't exactly force the issue =P
20:46dnolenlynaghk: I think you can get 90% of benefit of your pipeline concept even w/ namespaces atom
20:46dnolenlynaghk: another thing to consider is what the tensions are here w/ Clojure philosophy that compilation unit is a function, not a module (aka namespace)
20:48lynaghkdnolen: yeah, but given how many things hook into *cljs-ns* I thought that namespace-level would be the best I could do.
20:48dnolenlynaghk: I just mean wanting to be able to get at namespace in a functional way is somewhat at odds with the way the ClojureScript compiler is constructed
20:50lynaghkdnolen: you and I should probably Skype about this sometime before reaching out to Relevance
20:50lynaghkfigure out what we actually want
20:51dnolenlynaghk: yes - it's worth digging into the CLJS internals a bit to see how things are to understand the path towards where you want it to be.
20:51dnolenlynaghk: more than happy to answer any questions you may have of course.
20:52lynaghkdnolen: oh, I've been digging around quite a bit lately. Where I want it to be (a more functional compiler) is too far for a near-term plan.
20:53lynaghkSo I'm content to do per-namespace stuff. Your point about analysis depending on the actual analyzed contents of dependencies is news to me, though---I'll look into that a bit more
20:54lynaghkIt sounds like the original design (just emit stuff and let Google's compiler clean up and optimize) has evolved into CLJS itself doing more and more compiler-y optimization things
20:54dnolenlynaghk: http://github.com/clojure/clojurescript/blob/r1877/src/clj/cljs/analyzer.clj#L633
20:55dnolenlynaghk: emiting invoke's is a total monster http://github.com/clojure/clojurescript/blob/r1877/src/clj/cljs/compiler.clj#L581
20:55dnolenlynaghk: but it uses the information collected during dependency analysis
20:56lynaghkdnolen: I wonder if you could do the core.memoize approach if you just passed in the namespaces atom too
20:56dnolenlynaghk: all pretty gnarly stuff, but it's also why ClojureScript is pretty zippy
20:56dnolenlynaghk: that's a good idea
20:57lynaghkdnolen: memoization for most userland projects is pretty negligable compared to not re-analyzing cljs.core on every build, though
20:57lynaghk= )
20:57dnolenlynaghk: and then tooling services could simply accept it
20:57dnolenthe namespaces map
20:58lynaghkdnolen: yep.
20:59coventry`Is there a clojure.test macro for "This runs without errors"? At the moment I'm using (is (eval [result])).
20:59lynaghkdnolen: fun fact: my interest in redesigning the CLJS compiler interface came out of me designing a build tool.
20:59lynaghkendless summer yaks.
21:00dnolenlynaghk: heh yes on avoiding reanalysis of core.cljs. changing the compiler to be more disciplined about namespace atom interaction sounds like a good way forward w/o need to rearchitect
21:00lynaghkdnolen: I'll keep an eye on that as I start using my proposal redesign. Thanks for the advice!
21:01benkay_,(+ 1 2)
21:01clojurebot3
21:01coventry`(Or more generally (is [(f)]). In my case, I am eval'ing something.)
21:08ambrosebscoventry`: IIRC thrown?
21:10justin_smithcoventry`: if what you want is to know it runs without an error (is (do (f-that-may-throw-error) true))
21:10coventry`ambrosebs: No, that's to assert that an exception has been thrown. I want to assert that none have been thrown, and make no other claims about the result.
21:10ambrosebscoventry`: (not (thrown? ..))
21:10coventry`justin_smith: Thanks. I think wrapping the call in a vector is a more concise way of doing that.
21:10justin_smithany errors that were not expected by a thrown block are reported
21:10coventry`ambrosebs: Oh, you can do that? Great.
21:10ambrosebscoventry`: ah i see
21:11justin_smithcoventry`: but less explicit
21:11ambrosebssorry, just work up
21:11ambrosebs*woke
21:11justin_smithbut (not (thrown? ...)) actually reads as the thing you are checking for, which is nice
21:12justin_smithwith (do (f) true) or [(f)] it is only implied by the language semantics
21:13coventry`ambrosebs: Thanks, that works great.
21:13ambrosebscoventry`: oh I was right. haha
21:13ambrosebs;)
21:13justin_smithalso, if all you care is that it is not an error, you can just have the call inside a deftest form, no need to even have a call to is, an error will be reported if it occurs
21:17benkay_,(+ 1 2)
21:17clojurebot3
21:19sinistersnare,(* 2 4 6 21 5 7 2134)
21:19clojurebot75287520
21:20sinistersnaretest
21:20sinistersnareballs
21:21justin_smith,(*(*)(*))
21:21clojurebot1
21:37coventry`I have a repl in which the following form results in the error No method of interface: <namespace>.t. I'm curious about what's going under the hood. I did do a (defprotocol t) earlier in the file.
21:37coventry`,(fn* ([b c] b (a (inc c))) ([] (a 1)))
21:37clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: a in this context, compiling:(NO_SOURCE_PATH:0:0)>
21:51clj_newb_2345anyone her eusing http-kit in production apps?
21:56justin_smithclj_newb_2345: nope, I've been happy with ring (for server), clj-http (for synchronous client calls), and http.async.client (for async client)
21:56clj_newb_2345how about web sockets?
21:56justin_smithno experience with that, sadly
21:56clj_newb_2345my alternative is studying netty
21:57justin_smiththough I have a friend who recommends aleph
21:58justin_smithaleph may not perform as well (not sure of that?) but it has a nice functional design
21:58justin_smithhttps://github.com/ztellman/aleph
21:58jimrthyI'm using http-kit in something resembling production
21:59jimrthyI'm not doing anything fancy or taxing, but it's working a lot better than pretty much anything else on that server.
22:01ToBeReplacedso, i'm not a web developer... today i learned that common practice is to load javascript from 10 different social media sites ... wtf?
22:02ToBeReplaceddoes someone have a quick link to show me how to accomplish all the "share" stuff with just html? i'm missing details for some of them
22:03sinistersnareToBeReplaced: why are you asking this in #clojure?
22:03ToBeReplacedsinistersnare: just where i usually hang / get quality information -- i can take it elsewhere
22:04clj_newb_2345it's reasonable
22:04sinistersnarei mean i dont really care, i just think that it might be off topic enough that its not the best place
22:04clj_newb_2345for all the login with fb; login with linked in; login with twitter; pin it on pinterest crpa
22:04SegFaultAXToBeReplaced: What do you mean to accomplish all the share stuff with just HTML?
22:04SegFaultAXThat's not even a sensical question.
22:04clj_newb_2345but yeah, I agree with sinistersnare -- it is off topic for #clojure -- maybe #startups?
22:04sdegutisHey guys.
22:05SegFaultAXclj_newb_2345: We're very often not on topic here, I don't think it matters that much.
22:05sinistersnarewhy startups? i think thats for like beginning businesses... maybe #html
22:05sinistersnarealso, #startups is empty...
22:05sdegutisSince there's a different set of faces in here than earlier, what do you think of this? https://github.com/sdegutis/clojuredocs/wiki
22:05sinistersnarelol jk that was #startups? not #startups
22:05clj_newb_2345not always being on topic does not imply we should encourage off topic
22:06ToBeReplacedSegFaultAX: ex. create an href to share a URL on facebook instead of using their JS button (legal, and shown here: http://www.sharelinkgenerator.com/ )
22:07SegFaultAXsdegutis: 2 things: First, I would group all the ear muffs together in their own category. Second, I would put all the functions/macros that start with a non-alpha numeric into one category. There aren't enough + to warrant its own category, for example.
22:07SegFaultAXToBeReplaced: Why?
22:07sdegutisSegFaultAX: Oh good idea.
22:08ToBeReplacedSegFaultAX: load times (solvable), security (not solvable), customizability within their branding laws (solvable)
22:10SegFaultAXToBeReplaced: You said it yourself though, the HTML is just an href. That's not what makes a sharing button though. There is also a bunch of styling and potentially functionality.
22:10sdegutisSegFaultAX: Fixed.
22:10sinistersnaresdegutis: the titles dont seem to like '-'
22:10sinistersnarefor example the '->' macro
22:11ToBeReplacedSegFaultAX: here is what i was looking for: http://thetechstuff.com/how-to/3086/embed-social-buttons-without-javascript-facebook-twitter-google-plus-pinterest-linkedin-digg-stumbleupon-reddit-tumblr
22:11sdegutissinistersnare: That's one downfall of it being a wiki. But it's not a technical limitation, as the page for defn- and defn have two different URLs. It just means the titles on the page itself are sometimes wrong. Not sure how to fix it though.
22:12sinistersnarejust letting you know, as it was misleading when i first saw it
22:12sdegutisI think one way is, if the page begins or ends with a hyphen, it could be replaced with &dash; or something.
22:12sdegutisProblem with that is you can't easily find the page by retyping that part of the URL.
22:12sinistersnareyep
22:13SegFaultAXToBeReplaced: If you want to cram all your HTML, CSS, and JS together, go for it. I wouldn't recommend it.
22:14ToBeReplacedSegFaultAX: there's no JS involved at all... just <a href="blah" target="_blank">
22:14clj_newb_2345alright
22:14SegFaultAXToBeReplaced: Did you read all the way through?
22:14clj_newb_2345aloha is a nice netty/clojure binding
22:15SegFaultAXToBeReplaced: That article suggest putting everything in-line is all. Less than ideal for sure.
22:16ToBeReplacedeh, what's so bad about that?
22:16ToBeReplacedthe intent is right with the implementation
22:16SegFaultAXToBeReplaced: Same as always, mixing orthogonal concerns. Content, styling, and functionality.
22:19SegFaultAXReally annoys me sometimes that vectors don't have a built-in way to dissoc/remove items.
22:20justin_smithSegFaultAX: maybe you want a datatype that can do that without replacing every item before the removal point
22:21ddellacostaSegFaultAX: what's wrong with remove?
22:21SegFaultAXddellacosta: Remove doesn't do what you think it does.
22:21SegFaultAXddellacosta: It's the dual of filter.
22:21justin_smithddellacosta: that does not work by index, which is what I think he wants
22:22ddellacostaSegFaultAX: What I think it does is remove the item that you identify with a predicate. It seems to do this…?
22:22ddellacostajustin_smith: ah, okay.
22:23ddellacostaSegFaultAX: just curious what you expected it to do; is justin_smith correct?
22:23SegFaultAXjustin_smith: Sure, but it annoys me that I usually end up writing something like (vec (concat (subvec v 0 i) (subvec v (inc i))))
22:24technomancyif you could do that, they wouldn't be vectors
22:24technomancy(that is, they wouldn't be fast at what they currently do)
22:24SegFaultAXtechnomancy: it could use exactly that implementation for all I care.
22:24justin_smithyeah, exactly - the way clojure does things is there is an easy shortcut if there is a CPU friendly algorithm, it helps avoid bloated slow code
22:25SegFaultAXI just want to give a vector and an index, and get a vector back.
22:25technomancySegFaultAX: that's just asking for memory leaks
22:25technomancydo not want
22:25xeqidoesn't subvec hold a reference to the original vector?
22:26gfredericksyep
22:26xeqiI ended up using https://github.com/wagjo/data-cljs 's finger trees when I wanted removal by index in a recent cljs app
22:27gfredericksSegFaultAX: maybe use that new vectors lib?
22:27SegFaultAXThen some other mechanism is fine.
22:27SegFaultAXBut not being able to remove items from vectors (or rather not having that functionality built in somehow) is sometimes annoying.
22:28SegFaultAXgfredericks: Link?
22:29gfredericksSegFaultAX: https://github.com/clojure/core.rrb-vector
22:31SegFaultAXgfredericks: Neat! Source is nuts, though.
22:33ddellacostaxeqi: that is pretty cool (data-cljs)
22:35devnDid anyone notice that Clojure is now in the list of "popular languages" on GitHub?
22:35arrdemw00t
22:36devncan you break dance? like, are you physically able to breakdance, however good you might be?
22:36sinistersnareyes i am!
22:36sinistersnareim no good though
22:36gfredericksSegFaultAX: huh. yes it is nuts.
22:37sinistersnaredid anyone else notice that the /topic hasnt changed in 2 years? :p
22:37devno|< o\< o|< o/<
22:37sinistersnare"""Topic set by chouser at Wednesday, July 20, 2011, 20:57:2 """
22:37devnsinistersnare: this is why technomancy is an op nowadays
22:37devnim not sure what should change about it, though
22:37sinistersnareno reason, i just think its interesting how it hasnt :D
22:38SegFaultAXCould add refheap as the official paste.
22:39SegFaultAXIn the /topic that is.
22:39ddellacostawhat is topic meant to do?
22:39ddellacostaSegFaultAX: agreed
22:39justin_smith#emacs changes their topic to various inside-joke type references that kind of relate to emacs. Then again that channel is 95% off topic.
22:39SegFaultAXddellacosta: Set a topic for the channel. :)
22:39sinistersnarerefheap is nice
22:39sinistersnareyou should also add that sinistersnare is awesome, but its ok if you dont
22:39ddellacostaSegFaultAX: sorry, I mean, what is the point of having a topic? Like, what is the etiquette with regards to topic in IRC?
22:40sinistersnareits just a general intro message to the channel
22:40SegFaultAXddellacosta: These days it's usually just useful links and tips for new users like "here's our website/docs, here's how to access the channel bot, don't say "lol", etc."
22:40ddellacostaSegFaultAX: gotcha, thanks. Seems like what I thought but don't know much about the history of it.
22:41justin_smithrefheap is nice, I like the command line integration of sprunge though (for example I have a script that takes the current paste item from the clipboard, sends it to sprunge, and puts the url to access the sprunge paste into the clipboard paste buffer)
22:41sinistersnarei hate #python 's |no lol|
22:41SegFaultAXddellacosta: Back in the day, topics were used as sort of an MOTD as well.
22:41arrdemsinistersnare: eh #python is so big that no lol is a significant volume reducer
22:42SegFaultAXddellacosta: These days most chanops don't care enough to update topics regularly. Ours is a good example. :)
22:42ddellacostaSegFaultAX: haha, gotcha
22:42sinistersnarei guess, but sometimes things get off topic, and my childish brain says, lol <rest of statement>, and i get yelled at via /query by a bot
22:42justin_smithkind of like hardly anyone bothers having a .plan anymore
22:42ddellacostawhen I think of .plan, I always think of John Carmack
22:42arrdemmy local 2600 meet's chan uses the topic to note the next meeting date, but other than that most of the chans I'm in have static topics
22:43SegFaultAXarrdem: There are still 2600 meetups?
22:43justin_smithI think .plan was killed by all the exploits of fingerd
22:43arrdemSegFaultAX: there's #atx2600...
22:43sinistersnareyeah what is a .plan or a 2600? /17-yearold
22:43arrdemSegFaultAX: no idea if they still exist elsewhere tho
22:43SegFaultAXsinistersnare: 2600 is a very old hacker periodical.
22:43ddellacostaarrdem: http://www.catb.org/jargon/html/P/plan-file.html
22:44arrdemsinistersnare: http://en.wikipedia.org/wiki/Finger_protocol
22:44justin_smithback when peope ran fingerd without getting rooted, .plan was like a more usable facebook
22:44arrdemsinistersnare: ^ -2
22:44sinistersnarecool
22:44justin_smithwhat is joe up to? finger joe@joes-server.org
22:44mtpyou can run fingerd without getting rooted
22:44sinistersnare""the .plan file in a user's home directory is displayed when the user is fingered""
22:44mtpbecause we've learned a bit about how not to write fingerds
22:44SegFaultAX#bash is a good place to find greybeards that probably know.
22:44justin_smithmtp: people stopped using it, because exploits were frequent, is how I remember it
22:44ddellacostajustin_smith: ah, those innocent days
22:44SegFaultAXOr #perl.
22:44justin_smithmaybe now there is a safer version
22:44justin_smithbut the momentum is gone
22:45mtpyeah
22:45arrdemhaving <nick>.com seems to be the current equivalent at least for #clojure..
22:46SegFaultAXGotta own your handle.
22:46justin_smithyeah, finger/.plan was before you could assume everyone had / used a web browser
22:47SegFaultAXRandom thought... Now is actually a really good time for there to be a resurgence in "root this box" type wargames.
22:47arrdemSegFaultAX: lol metasploit
22:47SegFaultAXNow that things like docker exist, it would be cheap and easy to do it securely.
22:47SegFaultAXAnd you could create a new container per player, so everyone gets a clean environment to hack.
22:48sinistersnarethis stuff sounds fun!
22:49SegFaultAXsinistersnare: Hacking wargames used to be somewhat popular. I don't know if they are now. I would guess probably not.
22:49arrdemSegFaultAX: ooh nice idea! some ppl in my area do in person CTFs pretty regularly but dragging docker in could be run
22:49sinistersnarei remember a website 'hackthissite.com' or something
22:49justin_smithon a much smaller / less real world scale, a clojure version of core wars, where everyone gets their own thread / repl in the same vm could be interesting - I assume certain operations that manipulate threads would need to be nerfed out though
22:49sinistersnareso i can see that :p
22:49SegFaultAXjustin_smith: I've often though of doing something like that in Erlang.
22:49arrdemjustin_smith: I don't know how you'd do core wars for clojure tho... taking over other threads isn't something you can really do in clojure
22:50SegFaultAXjustin_smith: Everyone gets n processes.
22:50arrdemjustin_smith: but it'd be totally fun
22:50justin_smithhmm
22:50justin_smithwell you could also try to starve / crash threads via bugs
22:50justin_smithlast thread running in the core dump wins!
22:50arrdemlol
22:51justin_smithfor utility, knowing how to fuck with concurrent code is a good step to avoiding doing it accidentaly
22:51SegFaultAXNow that you mention it though, it would be cool if someone implemented one of theses types of games entirely out of persistent data structures
22:51SegFaultAXAnd there was an API that allowed any agent to query the state of the game at any point since it started.
22:52justin_smithinstant replay built in
22:52justin_smithheh
22:52SegFaultAXThat too.
22:53justin_smiththe competition would get owned by people with elisp nrepl triggers
22:53justin_smith(my prediction)
22:53arrdemso... what happens if you alter-var-root on a recursive fn?
22:53justin_smithyou win
22:53arrdemright
22:53SegFaultAXSandbox.
22:53arrdemso you use the ns tools to enumerate all the def'd symbols
22:54arrdemSegFaultAX: nah. just eval everyone's code in a single ns!
22:54arrdemallow for cross thread IO by f*cking with symbol defs!
22:54justin_smiththis is starting to sound kind of fun
22:54arrdemkinda like the old redcode bomber... just enumerate symbols and nill em out!
22:55justin_smiththere could also be a less real-time version, like the original core wars - more like pokeman where it is all about putting the right fighter in the ring
22:55SegFaultAXarrdem: Since you typed f*cking: http://www.youtube.com/watch?v=dF1NUposXVQ
22:55arrdemlol george carlin. seen it.
22:56arrdemSegFaultAX: do we have an official cursing policy? I try not to and this is largely a polite channel...
22:56arrdemmod today's blowup
22:56SegFaultAXarrdem: George Carlin... really?
22:56sinistersnarei mean, were all adults here (except for me i guess, i meant mentally..) so why not?
22:56sinistersnareas long as its not cursing people out
22:57SegFaultAXarrdem: But you miss the point. Saying f*ck vs. fuck makes aboslutely no difference. Your intent is the same, and that's all that matters.
22:57arrdemeeeh... but the counter argument is that it doesn't add anything to the discourse. it's just an emphisis modifier.
22:57arrdemsinistersnare: oops. ^
22:58arrdemSegFaultAX: yep. which is why I don't usually. my apologies.
22:58sinistersnareoh idk if there is, whatevs
22:58sinistersnare:p
22:59SegFaultAXarrdem: I'm not offended. I'm just saying, if you're going to use a word, use the damn word. Don't rely on my string interpolation.
22:59sinistersnarelol
22:59sinistersnaredamn, i guess that was a useless phrase :/
22:59arrdemdevn: why'd you just go star 37 things in two minutes?
23:00justin_smithsinistersnare: l*l
23:00sinistersnarejustin_smith: no l*l allowed
23:00justin_smithno, no, l*l is the way around the |no lol| rule
23:00arrdemsinistersnare: you just banned l, ll, lll, llllll.... but not lol
23:00sinistersnareif lazybot sees fu*k, then it just sends out, "i think you meant FUCK"
23:01SegFaultAXUnless the rule is no #"l.l"
23:01sinistersnarearrdem: oh balls...
23:01justin_smithdepends if this is regex interpolation of globs, or sh style
23:01SegFaultAXjustin_smith: That's why I used . and not *
23:02arrdemany oppinions on Nightcode? I glanced at it, but as with LightTable I went back to doing work in emacs without trying.
23:03sinistersnarearrdem: i like it!
23:03justin_smithI have heard some funny things about behaviors of automatic sanitizers; I bet you could make automatic offensive term interpolators do funny things as well
23:03sinistersnarebut i dont really do enough clojure (no free time/ im no good at it) to do much
23:03arrdemcat /usr/share/badwords
23:03justin_smith"buttociated"
23:03SegFaultAXsinistersnare: If you're not careful, I could see some real problems.
23:03SegFaultAXf.*ck: "blah blah blah firetruck" I THINK YOU MEANT FUCK!
23:04sinistersnareLOL
23:04sinistersnarethe best bug possible
23:04arrdemokay, so we lock the bathroom doors and no-one leaves #clojure until the bots can pass the turing test. string interpolation problem solved.
23:04brehautjustin_smith: "buttbutton"
23:04brehauterr "buttbuttin"
23:04justin_smithheh, yeah
23:05arrdemthat or cljs targets C whichever comes first
23:05devnarrdem: how did you know that?!
23:05devnarrdem: oh right, it's public
23:06devnarrdem: i'm likely going to be contributing to the changelog and am making a list of projects and people who have been active recently
23:06SegFaultAXTIL arrdem is a wizard.
23:06arrdemdevn: just lurking in that black van across the street three doors down watching the packet stream nbd
23:06arrdemSegFaultAX: nah I'm only in the top 32% of clojure users. yall outrank me still.
23:07devnyou'll be there quick enough
23:07brehautarrdem: clojurebot already spans three VPSs and is enterprise ready. its also possibly sentient just extremely eccentric
23:08Brand0hmmmmm
23:09arrdembrehaut: as long as it isn't buying its own VPSs and spinning up new instances I'm not convinced that it's alive.
23:10brehauthard to say
23:10gfredericksmaybe it just finds those activities boring
23:11SegFaultAXMaybe it's too busy designing deep thought.
23:11arrdemif lazybot developed a HDL DSL for Clojure I for one would not be mad.
23:17grandyi have a fairly dumb question about clojure and threading, anyone care to humor me? It's about serial-port ...
23:18arrdem~anyone
23:18clojurebotanyone is anybody
23:18arrdem-_____-
23:18Raynesgrandy: Question.
23:18brehautthanks clojurebot
23:18arrdemRaynes: thank you.
23:19grandyok so using serial-port/on-byte seems to work w/o me having to set up a separate thread ... not sure if it would be blocking if run outside of a repl or if it just works this way in clojure
23:20grandysee i told you it was dumb
23:21OneFourSevenHey guys. I was wondering if it's possible to expose another library's functions in my library. Like if I wanted to build a monolithic framework and wanted to expose Hiccup for templating.
23:21arrdemOneFourSeven: is it possible, yes. should you do it? no.
23:22arrdemgrandy: except in very strange circumstances if it works in the repl it should "just work"
23:22brehautOneFourSeven: the first problem is you want to build a monolithic framework
23:22OneFourSevenarrdem: How do you suggest I approach building a web framework?
23:22brehautOneFourSeven: you dont
23:22technomancyOneFourSeven: use Compojure for a month. if you still want to build a web framework, we can talk.
23:23arrdemOneFourSeven: the last major framework, noir, was abandoned for not really having a purpose.
23:23brehautOneFourSeven: monolithic frameworks are antithical to the idioms preffered by the clojure community
23:23grandyarrdem: ok that's great.
23:23OneFourSevenYeah that's what I figured :|
23:23OneFourSevenBut I feel like whenever I start a new app with compojure I keep rebuilding a lot of stuff
23:23brehautOneFourSeven: have you looked at Luminus
23:25arrdemM-x google-this ftw!
23:25s4muelOneFourSeven: if you're doing a lot of prototyping you should make a lein-template with your usually-used libs, a default logging setup, etc.
23:26arrdemmongodb interface code... man that stuff is boilerplate
23:27xeqitechnomancy: I want to build a web framework
23:27arrdembrehaut: curse you now I'm adding all these cleanups of of my blag to the todo list
23:27brehautarrdem: lol
23:28OneFourSevenThanks s4muel. I'll look into that.
23:30arrdemwhat's the profile.clj option to automagically (require) in libs?
23:32technomancyarrdem: for the repl or in general?
23:32arrdemtechnomancy: if repl covers an nrepl then general is to be avoided.
23:33technomancyarrdem: you can put a require for in :repl-options {:init (require 'foo)}
23:34arrdemtechnomancy: awesome thanks.
23:35technomancynp
23:35grandyis there a way to get nrepl to re-eval an entire buffer?
23:35arrdemherp derp rtfm. https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L286
23:35coventry`I'm trying to clone clojure.core into a separate namespace, by parsing and eval'ing its forms (https://www.refheap.com/18466). All goes well until I hit (load "core_proxy"). That fails with the complaint "Could not locate core_proxy__init.class or core_proxy.clj on classpath". Why does this work in core.clj, but not in my constructed context?
23:35s4muelgrandy: emacs? C-c C-k
23:35grandys4muel: perfect
23:36technomancycoventry`: maybe load checks relative paths?
23:37coventry`technomancy: Yep, that's what it is...
23:37coventry`(doc load)
23:37clojurebot"([& paths]); Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash or relative to the root directory for the current namespace otherwise."
23:39coventry`Thanks. I guess i have to change the namespace's root-directory somehow.
23:40technomancyI would special-case load instead
23:41technomancyit's a weird edge case
23:41technomancyunless you only intend to perform this operation on clojure.core
23:43coventry`Good idea. Not sure whether I'm going to be applying this tool to entire files. I'm just cloning all of core as a robust test case for it at the moment.
23:45calebmpeterson,(+ 1 2)
23:45clojurebot3
23:46calebmpeterson,(filter even? (range 0 20))
23:46clojurebot(0 2 4 6 8 ...)
23:47amalloycalebmpeterson: you can /msg the bots if you just want a repl to play with
23:57justin_smithregarding OneFourSeven's question about exposing another library - what does expose even mean in this context? is there anything that would normally be hidden in the first place?
23:57justin_smithor maybe he meant provide
23:58arrdemjustin_smith: no. if I build an app atop B and B depends on C, I can use C freely
23:58arrdemjustin_smith: but it's good practice to use C explicitly rather than rely on the dependancy