#clojure logs

2015-02-14

02:04vimmonkeyman what i love about lisp is how you write code and you can keep whittling it down to be very concise
02:08TEttingervimmonkey: heh, I have a very clear idea of how that happens
02:09vimmonkeylike i wanted to compare a couple of keys between two maps, so initially i was taking into 2 tokens and had a little bit of copy and paste code..didn't seem right so i threw in destrcutring, map, and select-keys, and poof, good solution. there even might be a built in function for this. technically i don't have to use map and create a new data, but would take a little bit of re writting
02:10vimmonkey*taking in 2 maps
02:15vimmonkeyTEttinger: what's your take?
02:15TEttingerI wrote a piece of code using lazybot as a repl to evaluate
02:15TEttingerit reached the limit of an IRC message length
02:16TEttingerI rewrote, again and again, as I added more features
02:16TEttingerdid you know two strings don't need a space between them in clojure?
02:16TEttingerhandy for code golf!
02:16vimmonkeyha, didn't know that ..makes sense
02:20TEttingervimmonkey: the final answer I got (this is meant to generate h.p. lovecraft-style cultist text)
02:20TEttinger&(let[a #(apply str(flatten %))r repeatedly p partition N rand-nth n #(a(N(concat(repeat %"")(mapcat p[1 2 3]%&))))v #(n 0"aioeu""iaai")w(fn[](let[b(n 6"!.""""...")s[(n 0"STKNYPKLG""GlThShNyFt""ZvrCth")(r(N[1 2])#(do[(v)(n 9(map str"'-"(r 2 v)))(n 0(concat"lpstnkgx"[(N["h""gl""gr""nd"])(v)])"rlthggghtsltrkkhshng")]))]][b(if(seq b)[" "s][(n 3",")" "(.(a s)toLowerCase)])]))](re-find #"[A-Z].+"(a[(r 500 w)"."])))
02:20lazybot⇒ "Sirl niae tu'irkak kurl zvrian! Cthorko-aiu, to'aihu'el, tegat ftut, gal gilt piai! Nirk ftig cthaithing! Zvrirk kai'iaxerl pulurl lugh... Pupaigh... Laltel ka'okh siahaits... Fti'ot pirl shaaiolt zvreng kia-otot. Fta'iaturl! Sharl thughia-il, glaiggap thog cthish t... https://www.refheap.com/97224
02:21vimmonkeyo.o lol
03:04winklol
03:39GuthurHi, I am trying to load the tutorial from https://github.com/franzinc/agraph-java-client/tree/v4.13.1/clojure
03:39GuthurI get classpath issues
03:40GuthurI am using lein and cider
03:40Guthurwhen i run lein deps it's all fine, and if I jack-in on the project.clj i get to a REPL
03:41Guthurthis is my first time using clojure and i'm not very experienced with Java hoop jumping
03:46ianhedoesitwhat classpath issues
03:47GuthurCould not locate com/franz/agraph/tutorial__init.class or com/franz/agraph/tutorial.clj on classpath:
03:47Guthurwhen i try (require 'com.franz.agraph.tutorial)
03:49GuthurI think it has not actually loaded the project properly, because if i try to compile the tutorial file C-c C-k it can't find some of the first imports
03:50Guthurif i check nrepl-server i see no mention of the agraph project
03:50Guthurshould i be seeing something loading there
03:52Guthurif it helps, i am familiar with SLIME/SWANK with Common Lisp
04:02Guthuris :main require in the project.clj for a project like this
04:02Guthuri notice there is none
05:14trigomanThis may be super OT, but I figured people in this channel would be able to give me pointers. I'm trying to understand this Koan: http://www.csd.uwo.ca/~magi/personal/humour/Computer_Folklore/The%20Lambda%20Nature%20Koan.html
05:15trigomanHow do I even begin to dissect this?
07:02skratl0x1Cgood day
07:09SagiCZhi, is there an intellij idea irc channel?
07:17ewemoaSagiCZ: haven't tried myself but there's something mentioned in: http://blog.jetbrains.com/idea/2012/05/get-involved-into-intellij-idea-community/
07:21SagiCZewemoa: thank you
07:21ewemoaSagiCZ: hope it works out :)
07:50patrkrishello everybody. it seems that many libraries use parentheses when importing java classes instead of square brackets. what is the reasoning behind this distinction?
07:53hyPiRionpatrkris: tooling indent parentheses and brackets differently
07:54hyPiRionBut I'd guess it's more of a historical coincidence
08:01Guthurpatrkris: from I can see the documentation uses parenthesis
08:01Guthurso I would imagine it might have a positive bias because of that
08:13zactsis there a good clojure equivalent to jekyll?
08:51adgtlIf anyone is in mood of hacking or oss. Please contribute to http://clojurebyexample.com/ https://github.com/anildigital/clojurebyexample
08:51adgtlwould appreciate even if you put empty files of the things there. I can put code snippets.
09:13m1dnight_adgtl: is that page built with marginal?
09:13m1dnight_or what is the name again
09:13m1dnight_The literate programming thing
09:13adgtlm1dnight_: yep
09:14m1dnight_I want to use it for my code in my thesis, havent checked it out hough
09:14adgtlmarginalia
09:14adgtlyep
09:14adgtlm1dnight_: you are welcome to contribute to my repo
11:45tomjackwhat fraction of the clojure community wants to murder you if they try to work on a project in which you used the 'always two spaces' rule?
11:46justin_smithalways two spaces?
11:48tomjacknot sure how to describe the rule precisely.. I'm thinking of clojure-defun-style-default-indent. I think maybe it's mostly: don't indent function arguments on the next line to the first argument in the previous line, just do two spaces
11:48tomjack(or a
11:48tomjack b)
11:49justin_smithIf your code were like that, I would assume you are weird, and would avoid contributing to your project, because I would either have to fix all the indents or indent in a way that feel unnatural (and is unsupported by my editor's auto-indent)
11:49justin_smithI wouldn't be angry though
11:49justin_smithjust a little confused
11:50tomjackyeah, I guess my worry is that a large fraction of the clojure community would be frustrated by anything except clojure-mode's indentation, which seems kinda nuts
11:50tomjackwhich makes me want to use clojure-defun-style-default-indent, which would frustrate most people, ... :(
11:50justin_smithtomjack: it's a really old set of conventions - remember that LISP dates to the '50s
11:51justin_smithit's not like we invented any of this recently
11:51tomjackmaybe it's a myth that it's virtually impossible for new editors (say cursive) to match the conventions?
11:51tomjacks/new/non-Emacs/
11:52justin_smiththe rules aren't super complicated, I'd be surprised to learn editors with auto-indent couldn't support them (though of course it may not be properly implemented yet)
11:53tomjackhmm. I guess maybe it's not even a myth
11:54tomjackI thought that was e.g. cemerick's claim, but now I see he just claims that per-var conventions are difficult to maintain across editors, and has a user configuration problem
11:54justin_smithright, because you need to add to the rules when you define new vars
11:54justin_smiththat's a bit different
11:54tomjackseems like that should be solvable
11:55justin_smithindent-config.edn
11:55tomjackby some convention where indentation rules are given as clojure data in the project, which hopefully can be read without loading the project jvm?
11:55justin_smithsomething like that
11:55justin_smithyeah
11:55tomjackyeah. wonder why this hasn't been done yet
11:56tomjackI wonder if everyone's just satisfied with their list of (put 'foo 'clojure-backtracking-indent '(2)) :)
11:57tomjack(of course, s/solvable/sometimes solvable/ for cemerick, because this won't "always work" due to depending on the convention)
11:59tomjackindednt?
13:41dnolencfleming: is it possible to disable map literal formatting, it's really frustrating to edit some code and get more whitespace changes than is desirable
14:25tomjackhow do you do "skip over this node" in a z/next walk?
14:25tomjackmy current attempt https://www.refheap.com/31e7787dc0f6bb0f899b43622
15:32tomjackfound this https://groups.google.com/d/msg/clojure/FIJ5Pe-3PFM/TbZdeyKthMUJ
15:34tomjackmy attempt was not even close to correct, at all
15:34tomjack:)
16:19irctc_#quit
16:27Integralistjustin_smith: hi there, was I speaking to you yesterday about some issues I was having (apologies if it wasn't you)?
16:27nicferrierI get frustrated with clojure because I don't know it well enough yet and I want to be productive in it.
16:28nicferrierhard problem.
16:28kaplannicferrier, happened to me when I was just starting out in programming
16:29nicferrierkaplan: I'm not just starting out. I've been doing it for 30+ years. The problem's the same though.
16:29nicferrierI can always get good enough in a new programming language... but getting productive is hard.
16:30IntegralistHello all, can any one tell if there is an issue with these two lines of code: http://goo.gl/RLEhss -> specifically if I open a repl and use the main namespace and manually execute the two highlighted lines then the required ns' are available. But when running the code with `lein ring server` the ns aren't available?
16:31IntegralistSo when that example web server runs, I get a Java exceptions about "core" namespace not existing.
16:31IntegralistEven though I can manually run the require calls inside the if statement and manually access the core ns
16:45IntegralistI've decided to open a stack overflow http://stackoverflow.com/questions/28520655/clojure-namespace-not-accessible in case any one is able to help me with what is likely a simple issue. Thanks.
16:49BronsaIntegralist: http://technomancy.us/143
16:50IntegralistBronsa: thanks! will take a read now
16:56emaczenwhat is so great about language level concurrency vs a library?
16:57AeroNotixemaczen: efficiency and consistency
16:57AeroNotiximagine implementing STM at the library level?
16:58AeroNotixWith Lisps, it's probably easier to get it to fit in nicely, though.
16:59BronsaAeroNotix: there's nothing preventing clojure's STM to be implemented as a library actually
16:59BronsaAeroNotix: it requires no special language support
17:00AeroNotixBronsa: for sure. I just mean it's easier given that you can design a language with features such as that in-mind.
17:00AeroNotixRather than retrofitting it in
17:00Bronsamost of the features in clojure don't actually require special language features, they are just implemented in java rather than in clojure for bootstrapping purposes
17:18arezhow can I use tracing in my clojure REPL?
17:18arezor some other kind of debugging?
17:18AeroNotixarez: tools.trace
17:26arezAeroNotix: thx
17:26AeroNotixnp
17:31cflemingdnolen: Yep, Settings->Code Style->Clojure->General->Align map values
17:34arezAeroNotix: wow, works really great :D
17:34AeroNotixarez: innit
17:36cflemingtomjack justin_smith: It's not that the single-space indent rule is difficult to implement, I think it's a stupid rule
17:38AeroNotixWTB Clojure for SBCL
17:43liflashhi, I'm using kioo for my reagent app. Is there a way to modify a given component? i.e. I get a component created by a call to a defsnippet and want to set the background color.
18:04ToBeReplacedi've got a few applications reading GPIOs... we use python right now for epoll and i2c support; any experience reports using clojurescript/nodejs for something similar?
18:05ToBeReplacedunfortunately, jvm overhead is too high, even with oracle on ARM
18:30tomjackcfleming: "single-space indent rule"?
18:30tomjack(foo
18:30tomjack bar)
18:30tomjack?
18:30tomjackI was thinking mostly about the "name+1-space indent rule":
18:31tomjack(foo bar
18:31tomjack baz)
18:31tomjackname+2 I guess..
19:02justin_smithToBeReplaced: I wonder if pixie is mature enough to do that yet. I've had some luck using it for C / system level interop.
19:05justin_smithemaczen: the STM stuff breaks easily with mutable datastructures, and it's more intuitive to use if all the default data structures are immutable
19:06justin_smithemaczen: in a "normal" language you'd have to implement all the immutable datatypes (and pragmatically these would hopefully be the persistent variant), and then you likely have a separate set of collection operations, because all of the normal ones presume mutable collections.
19:06justin_smithemaczen: much less convenient
19:46ToBeReplacedjustin_smith: neat, wasn't familiar... too early for me it looks like-- syscall support for epoll and the like haven't landed and i can't contribute at this moment
19:47ToBeReplacedi'll definitely keep an eye on it though for other reasons
19:48ToBeReplacedbeing able to replace python with a clojure dialect would have been helpful to cut down on number of internal languages... all told python is great for the problem domain though and the applications are small and manageable
19:58justin_smithToBeReplaced: I was able to do fork and pipe libc calls via interop
19:59justin_smithToBeReplaced: and epoll is also in libc
19:59justin_smithso it should just work
19:59justin_smithI can give you some example code if you want to try some time
20:01cflemingtomjack: Sorry, I got interrupted right when I was getting going with my rant
20:02cflemingright, I think lists continuations (when a single list continues over multiple lines) should nearly always receive a two-space indent
20:02justin_smithcfleming: single space indent being what happens if the first arg to the function is on the next line, right?
20:02cflemingjustin_smith: Right
20:03cflemingjustin_smith: I think historically other lisps did that because they use lists for nearly everything. In Clojure, the vast majority of the cases where you have a static list of some kind it's done with a vector
20:03cflemingjustin_smith: And lists are invocations 99% of the time.
20:03justin_smithright
20:03cflemingjustin_smith: I think a larger indent is important to show the continuation
20:04cflemingjustin_smith: I've actually been meaning to write to the mailing list about this recently after the recent discussion about trying to get some common formatting defaults for all tools
20:05cflemingjustin_smith: That the one rule that's in widespread use at the moment that I think is bad, the rest I can take or leave
20:06justin_smithcfleming: I pretty much avoid things that would follow that rule (I think many of us do)
20:06cflemingjustin_smith: How do you mean? You avoid running function parameters onto the next line?
20:07justin_smithcfleming: I avoid the situation where the first arg is on the next line - I thought this was the rule you were talking about
20:07cflemingjustin_smith: Right, so if the first arg is always on the same line, then the others line up under it, right?
20:08justin_smithright
20:09amalloycfleming: why do you think it's necessary to have (f RET x) indent two spaces rather than one? it's nice to know that a two-space indent means a &body argument or something like it
20:11cflemingamalloy: Well, except when it doesn't - there are plenty of cases where it makes sense to allow that for functions, see https://github.com/cursiveclojure/cursive/issues/536
20:12cflemingamalloy: Personally, I think a two-space indent makes it clearer that the line is a continuation of the previous line
20:12amalloydoesn't a one-space indent say the same thing?
20:13cflemingbbatsov clearly felt that the two-space rule should only apply to macros and only for do-bodies, which I don't agree with
20:13cflemingamalloy: No, because then the forms contained in the list are lined up, they're not offset at all
20:13amalloybut i can clearly see there's an open paren above this blank space
20:14amalloylike in (foo RET bar), there's a blank space directly below the (
20:14cflemingSure, but it's pretty subtle
20:15cflemingDunno, either Emacs users are suffering from Stockholm syndrome, or I'm just blind, I'm not sure which.
20:15amalloycfleming: actually, here is an example use-case that is kinda hard to read now, but would be really hard to read under your proposed change: ((fn foo [x y z] ... RET ... RET ...) RET a b c)
20:15amalloythe a would be indented so that it looks like it's inside of the fn
20:16amalloyand, i mean, of course emacs users have stockholm syntrome. but it doesn't mean the alternatives are all better
20:17cflemingTrue, but saying "this is the way things have always been around these parts" (which is really the only argument I've ever seen presented for this indentation) is pretty innovation-stifling, too
20:17amalloycfleming: didn't i just make another argument?
20:17cflemingamalloy: Well, before 5 minutes ago :)
20:18cfleminghttps://www.refheap.com/97246
20:18amalloycfleming: actually your propsed change would move a,b,c left one column of where they are now, i would think, right?
20:19cflemingamalloy: Yeah, you're right, sorry
20:20cflemingI guess I'm going to have to add an option for this since people clearly feel strongly enough about it, and it's important in mixed-editor teams
20:20cflemingIt's not so much a proposed change, it's how Cursive has always done it
20:20amalloycfleming: are you aware of emacs's clojure-defun-indent?
20:21cflemingamalloy: Yeah, I have an option for that, a lot of people wanted it
20:21cflemingBasically any line continuation is offset by two spaces
20:21raspasovif we don't come to consensus on the indentation debate we'll have to bring it to the Supreme Court
20:21amalloycfleming: well, not *any* continuation. clojure-defun-indent lets you customize a list of "symbols whose arguments should always be indented two columns"
20:22amalloy(i added that before technomancy added the setting to indent everything by two)
20:22cflemingamalloy: Ok, Cursive has always supported per-form customisation. The setting I'm talking about makes that the default for non-customised forms.
20:23amalloyokay
20:24tomjackwhoa
20:24cflemingMy impression is that most people who use that turn it on and never customise anything else
20:25tomjackI was going to ask whether there's more than just the by-var bit clojure-defun-indent and the global bit clojure-defun-style-default-indent
20:25tomjackthen I did a Cursive "Reformat code..." on a clojure-defun-style-default-indent file
20:27amalloycfleming: probably, yes
20:28cflemingtomjack: Were the results surprising?
20:29tomjackwell, hmm
20:30tomjacknothing is resolved (e.g. "ns cannot be resolved")
20:30tomjackmaybe that is why I got (defn foo [] []) with the return vector indented up to foo?
20:30cflemingYeah
20:30cflemingIf it can't resolve anything everything gets borked
20:30cflemingHow did you create the project?
20:30tomjackbut e.g. map alignment
20:30tomjackdon't remember, will try to debug myself :)
20:31cflemingThings to check - that you have a Clojure jar attached to your project, and that your files are under a source root (blue folder in the project view)
20:32tomjackI created the project from a clojure-maven-plugin pom file most likely
20:32cflemingtomjack: If it's a lein project, importing it should set everything up correctly
20:32cflemingOk, that should work, I think - those two things are the most likely culprits
20:33tomjackthe module has my src/main/clojure listed in "sources" in project structure, and clojure.jar is in "dependencies" there
20:34cflemingHmm
20:35cflemingDoes File->Invalidate Caches and restart help? Every so often the IntelliJ indexes get funky
20:37dmbennettanyone know of a guide for hitting restful apis with clojure?
20:38tomjackintellij is the only reason I know my computer has a fan
20:39cflemingHehe, that initial indexing always gets it going
20:41tomjackhmm, no luck
20:41tomjackI also deleted the project and recreated from the pom.xml before invalidating/restarting
20:42raspasovdmbennett: what do you mean "hitting", like making HTTP calls?
20:42dmbennettmaking a post request
20:42dmbennettyeah
20:42dmbennettclj-http?
20:42clojurebotI think you mean gnir.
20:42raspasovdmbennett: look into libraries like https://github.com/ztellman/aleph or http-kit.org
20:42cflemingtomjack: Hmm. A few people have reported problems with maven, but I've never been able to reproduce. Is this a project you can send me?
20:43tomjackno, unfortunately. but separating a test case from the huge maven web which prevents me from sharing would be useful for finding the cause :)
20:43gfrederickshow does linux communicate to a process that its output isn't being read anymore and it should probably quit therefore?
20:44gfrederickse.g. if I do `yes | head` how was `yes` told to quit?
20:44cfleminghehe, well, if you could that would be great. I have to go now but if you ever do get a test case could you mail it to me?
20:44justin_smithgfredericks: the stdout file descriptor gets closed
20:44gfredericksjustin_smith: uuhuhuhumusuhuhm
20:45justin_smith?
20:45gfredericksso all these different well-behaved programs just watch for that?
20:45justin_smithor they crash because they wrote to a closed file :)
20:45justin_smitheither way, they stop
20:46dmbennettraspasov: is this the "industry" standard, i.e. is this library more commonly used than say http-clj?
20:46justin_smithdmbennett: raspasov: aleph doesn't even do post requests
20:46gfredericksjustin_smith: oh hey I just got the jvm to do that too by switching to `lein trampoline`
20:46justin_smithgfredericks: awesome!
20:47justin_smithdmbennett: raspasov: though http-kit does have a client lib, I think clj-http.client is better
20:47raspasovjustin_smith: https://github.com/ztellman/aleph/blob/0.4.0/src/aleph/http.clj#L258
20:47justin_smithraspasov: it can SERVE http request
20:48justin_smiththat's not for acting as a client
20:48justin_smithor is it?
20:48justin_smithhmm
20:48raspasovI believe it is a client
20:48raspasov(http/get "https://google.com")
20:48raspasovI was using it over the last few days
20:48justin_smithraspasov: oh, OK
20:49dmbennettThis is nice, reminds me of unirest: (client/get "http://site.com/search" {:query-params {"q" "foo, bar"}})
20:49gfredericksjustin_smith: also I had to register a handler for SIGPIPE
20:49raspasovwas using only GET though, but since it does have a declaration for POST, I assume does that as well
20:49justin_smithgfredericks: I wonder if that is because java has an alternate handler you had to override?
20:49gfredericksprobably, I wonder why and what it does
20:49raspasovdmbennett: clj-http is popular, yes, but I dont think we have something like "industry" standard
20:49gfredericksmy handler called System/exit of course
20:50justin_smithgfredericks: raise an exception and let your app handle it maybe?
20:50gfredericksjustin_smith: on what thread? not the writing one afaict
20:50justin_smithinteresting
20:50justin_smithI never hit that corner of things
20:50dmbennettright, kind of figured, I work at a company that is in the midst of moving to many internal apis, "microservices" I guess
20:51dmbennettone of our search teams is looking at interacting with SOLR's FST using Clojure
20:51raspasovdmbennett: haha https://twitter.com/raspasov/status/566756964193943552
20:51dmbennettFor real
20:52raspasovdmbennett: you guys using Clojure?
20:52dmbennettbeginning to learn and use it this month
20:52dmbennettjust for this small project
20:52raspasovdmbennett: currently using what?
20:53dmbennettC#/.Net
20:53tomjackcfleming: http://s3.tomjack.co/maven-test.tar.gz
20:54dmbennettThough personally, I've been breaking my teeth with Ruby
20:54tomjackyou can tell by the indentation that I experienced the same problem
20:54justin_smithdmbennett: have you looked at clojure-clr at all? It's not as mature an ecosystem, but should fit in nicely with .net stuff
20:54raspasovdmbennett: good luck with it, as long as there's interest and perseverance the payoff is real after a few months
20:54justin_smithagreed
20:54dmbennettYeah, our engineering lead was going on about this recently
20:55raspasovdmbennett: I feel like Java experience can help, when I was starting I had 0 Java experience
20:55dmbennettditto
20:55justin_smithsame here
20:55raspasovbut it's definitely not 100% needed
20:55justin_smithI learned enough via the interop I was doing
20:55raspasovsame
20:55justin_smithbeing able to read the javadoc helps a ton :)
20:55tomjacklooks like I'm on cursive 0.1.45
20:55dmbennettI come from a background in philosophy, and studied alot of process philosophy, which ironically Rich Hickey is familiar with
20:55dmbennettso some of the theory behind clojure makes a great deal of sense to me
20:55justin_smithdmbennett: oh yeah, the old Whitehead / time thing
20:55raspasovdmbennett: haha, yea that's cool
20:56dmbennettfunctional programming though, gotta say, I think more functionally than OO I guess
21:00justin_smithOO "thinking" is weird
21:00dmbennettphilosophically or practically or both?
21:01justin_smithphilosophically - but even as a way of organizing code it gets messy imho
21:01dmbennettyeah, it's kind of a measure of how much you're willing to put up with/juggle in your mind all at once
21:02justin_smithI may be able to articulate it better someday, but I think it's essentially about this gray area where simple and intuitive are contradictory
21:03justin_smithand the things that are intuitive to human thought (and preferred by OO) are actually very complex and unsound
21:03dmbennettinteresting point
21:03dmbennettcan you expound?
21:03justin_smith(in this specific area - many intuitive things are also simple and good foundations)
21:03justin_smithencapsulation of state - it's a metaphor that comes readily
21:04justin_smithand doesn't really scale into sensible systems without a lot of help
21:05justin_smithas opposed to immutable values and simple composable rules - which look like nothing in the real world, but build very solid systems
21:05justin_smithwith far fewer pitfalls along the way in the design
21:05dmbennettThe state thing is really interesting, since philosophically the way that state is used in clojure works better with real world thinking
21:05justin_smithright
21:05justin_smithI think the intuitive version of state is a very bad foundation for making sense of anything
21:06dmbennettLegitimately though, I think what happened is that most people have unclear thinking about state in reality, and transferred that to OO rather than OO being represetnational of reality
21:06justin_smithwhile the philosophical version (which is more about stateless moments + time as a dimension if I get simplistic) is much more solid
21:06justin_smithdmbennett: well, the guiding design principle in OO is make code that works the way we intuit things to work in the real world
21:06justin_smithwell, one of them at least
21:06dmbennettthat doesn't mean people know how to do that well
21:06justin_smithright
21:07justin_smithmy problem is with intuition - I'll have to make a blog post or something about my complaints with intuition
21:07dmbennettand if it's based on a premise of objects being things in and of themselves, then we'll run into problems representing things that way
21:07justin_smitha lot of what's "intuitive" is really magical thinking
21:07dmbennettor subconscious extrapolation
21:07dmbennettsome big recommendation system in the sky
21:07dmbennetthaha
21:08justin_smithoh man
21:09justin_smith"ever since I mentioned a pen one time in a prayer, god keeps thinking I am only interested in office supplies"
21:09dmbennettwhat is that from?
21:10justin_smithI just made it up, imaginary testimonial from a land where there is a big recommendation system in the sky
21:10dmbennettoh, sorry, thought you were quoting something
21:11justin_smithquoting an alternate reality
21:13dmbennettCheck out Whitehead on objects: "An object is an ingredient in the character of some event. In fact the character of an event is nothing but the objects which are ingredient in it and the ways in which those objects make their ingression into the event. Thus the theory of objects is the theory of the comparison of events. Events are only comparable because they body forth permanences. We are comparing objects in events
21:13dmbennett whenever we can say, ‘There it is again.’ Objects are the elements in nature which can ‘be again.’ "
21:14dmbennettThus, while “The most concrete fact capable of separate discrimination is the event” (1920, 189), for Whitehead objects, unlike events, “do not pass”
21:14justin_smithright, so essentially immutable
21:15dmbennettyah
21:16dmbennettIn some sense events are like functions, but each transformation made by the function is immutable in that past moment
21:16dmbennettand thus history has meaning
21:16dmbennettand in some sense, an eternal impact
21:17dmbennettthat's probably where the metaphor breaks down for programming
21:17dmbennettand by metaphor I mean analogy
21:23justin_smithdmbennett: one major benefit of our using immutabulity is being able to replay events and have a meaningful history
21:28dmbennett@justin smith test
21:29dmbennett....
21:29dmbennettis there anything like a central repository of clojure libraries?
21:29justin_smithdmbennett: clojars
21:30justin_smithalso, via lein, we can easily use any maven repo
21:31dmbennettmaven is a java thing?
21:32justin_smith(clojars is a maven repo with low barrier to contribition, specializing in clojure packages)
21:32justin_smithyeah
21:32dmbennettyeah, on that subject, how does clojure make use of java libraries?
21:33dmbennettI mean if I wanted to call a maven jar?
21:33justin_smithit has a spec for declaring and finding deps that we also use
21:34justin_smithclojure.jar is a maven jar
21:34justin_smithfor
21:34dmbennettis this at compile time only?
21:34dmbennettI mean if I make use of a library can I repl it?
21:34dmbennettkeep in mind I have little to no knowledge of using clojure yet
21:35justin_smithpomegranate or pallet/alembic can fetch maven deps at runtime
21:36justin_smithwith clojure / repl it's frequently compile time ( there is no interpreted mode)
21:37dmbennettok
21:38justin_smithI put an alembic dep in my user profile so I can always pull in a fresh dep
21:39justin_smithalso criterium for micro-benchmarking
21:39dmbennettnice
21:41justin_smithin many ways I think lein is a killer app for clojure
21:41zactsso what all can lein do besides manage a clojure project?
21:41dmbennettyeah, been working with that a little
21:42dmbennettdoesn't it have an IRB like repl
21:42dmbennettlein repl
21:42dmbennettor some such
21:42justin_smithrun tests, manage deps, package and deploy, run a networked repl
21:43justin_smithdmbennett: yeah, clojure.main is a repl, bit lein adds some nice ui features
21:44dmbennettis there anything like a debugger, or what are the implications of clojure for debugging?
21:46TEttingerdmbennett: debugging clojure needs to use certain JVM facilities, and it's easiest right now with either Cursive (which adds clojure support to IntelliJ IDEA) or CCW (which adds clojure support to Eclipse)
21:47dmbennettok
21:47TEttingerprofiling isn't that hard, if you know how to use a JVM profiler most work with clojure. one comes for free with the JDK
21:47TEttingerit's generally best to debug early on by testing small functions in the REPL
21:48TEttingerlein really does a lot of nice stuff, and the plugins allow lots of extension
21:48dmbennettaka test driven development?
21:48TEttingeryou can do that too
21:49TEttingerthere are libs for it that I don't use myself, but I know lots of people do
23:48Lewix_(defn name doc-string? attr-map?
23:48Lewix_([params*] body)+)
23:48Lewix_what does the + mean?
23:52robindunbarrIs there a lightweight web framework like Bottle in Python for Clojure?
23:55apiology Lewix_: '+' means 'one or more' - you can have multiple 'arities' of functions - variants which take different numbers of parameters
23:55Jaoodrobindunbarr: not really, using something like ring(with some middleware), compojure and hiccup gets you very close
23:55Lewix_apiology: thanks
23:57robindunbarrJaood: How about Luminus?