#clojure log - Feb 14 2015

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

2:04 vimmonkey: man what i love about lisp is how you write code and you can keep whittling it down to be very concise

2:08 TEttinger: vimmonkey: heh, I have a very clear idea of how that happens

2:09 vimmonkey: like 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

2:10 *taking in 2 maps

2:15 TEttinger: what's your take?

2:15 TEttinger: I wrote a piece of code using lazybot as a repl to evaluate

2:15 it reached the limit of an IRC message length

2:16 I rewrote, again and again, as I added more features

2:16 did you know two strings don't need a space between them in clojure?

2:16 handy for code golf!

2:16 vimmonkey: ha, didn't know that ..makes sense

2:20 TEttinger: vimmonkey: the final answer I got (this is meant to generate h.p. lovecraft-style cultist text)

2:20 &(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)"."])))

2:20 lazybot: ⇒ "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

2:21 vimmonkey: o.o lol

3:04 wink: lol

3:39 Guthur: Hi, I am trying to load the tutorial from https://github.com/franzinc/agraph-java-client/tree/v4.13.1/clojure

3:39 I get classpath issues

3:40 I am using lein and cider

3:40 when i run lein deps it's all fine, and if I jack-in on the project.clj i get to a REPL

3:41 this is my first time using clojure and i'm not very experienced with Java hoop jumping

3:46 ianhedoesit: what classpath issues

3:47 Guthur: Could not locate com/franz/agraph/tutorial__init.class or com/franz/agraph/tutorial.clj on classpath:

3:47 when i try (require 'com.franz.agraph.tutorial)

3:49 I 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

3:50 if i check nrepl-server i see no mention of the agraph project

3:50 should i be seeing something loading there

3:52 if it helps, i am familiar with SLIME/SWANK with Common Lisp

4:02 is :main require in the project.clj for a project like this

4:02 i notice there is none

5:14 trigoman: This 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

5:15 How do I even begin to dissect this?

7:02 skratl0x1C: good day

7:09 SagiCZ: hi, is there an intellij idea irc channel?

7:17 ewemoa: SagiCZ: haven't tried myself but there's something mentioned in: http://blog.jetbrains.com/idea/2012/05/get-involved-into-intellij-idea-community/

7:21 SagiCZ: ewemoa: thank you

7:21 ewemoa: SagiCZ: hope it works out :)

7:50 patrkris: hello everybody. it seems that many libraries use parentheses when importing java classes instead of square brackets. what is the reasoning behind this distinction?

7:53 hyPiRion: patrkris: tooling indent parentheses and brackets differently

7:54 But I'd guess it's more of a historical coincidence

8:01 Guthur: patrkris: from I can see the documentation uses parenthesis

8:01 so I would imagine it might have a positive bias because of that

8:13 zacts: is there a good clojure equivalent to jekyll?

8:51 adgtl: If anyone is in mood of hacking or oss. Please contribute to http://clojurebyexample.com/ https://github.com/anildigital/clojurebyexample

8:51 would appreciate even if you put empty files of the things there. I can put code snippets.

9:13 m1dnight_: adgtl: is that page built with marginal?

9:13 or what is the name again

9:13 The literate programming thing

9:13 adgtl: m1dnight_: yep

9:14 m1dnight_: I want to use it for my code in my thesis, havent checked it out hough

9:14 adgtl: marginalia

9:14 yep

9:14 m1dnight_: you are welcome to contribute to my repo

11:45 tomjack: what 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:46 justin_smith: always two spaces?

11:48 tomjack: not 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:48 (or a

11:48 b)

11:49 justin_smith: If 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:49 I wouldn't be angry though

11:49 just a little confused

11:50 tomjack: yeah, 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:50 which makes me want to use clojure-defun-style-default-indent, which would frustrate most people, ... :(

11:50 justin_smith: tomjack: it's a really old set of conventions - remember that LISP dates to the '50s

11:51 it's not like we invented any of this recently

11:51 tomjack: maybe it's a myth that it's virtually impossible for new editors (say cursive) to match the conventions?

11:51 s/new/non-Emacs/

11:52 justin_smith: the 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:53 tomjack: hmm. I guess maybe it's not even a myth

11:54 I 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:54 justin_smith: right, because you need to add to the rules when you define new vars

11:54 that's a bit different

11:54 tomjack: seems like that should be solvable

11:55 justin_smith: indent-config.edn

11:55 tomjack: by some convention where indentation rules are given as clojure data in the project, which hopefully can be read without loading the project jvm?

11:55 justin_smith: something like that

11:55 yeah

11:55 tomjack: yeah. wonder why this hasn't been done yet

11:56 I wonder if everyone's just satisfied with their list of (put 'foo 'clojure-backtracking-indent '(2)) :)

11:57 (of course, s/solvable/sometimes solvable/ for cemerick, because this won't "always work" due to depending on the convention)

11:59 indednt?

13:41 dnolen: cfleming: 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:25 tomjack: how do you do "skip over this node" in a z/next walk?

14:25 my current attempt https://www.refheap.com/31e7787dc0f6bb0f899b43622

15:32 found this https://groups.google.com/d/msg/clojure/FIJ5Pe-3PFM/TbZdeyKthMUJ

15:34 my attempt was not even close to correct, at all

15:34 :)

16:19 irctc_: #quit

16:27 Integralist: justin_smith: hi there, was I speaking to you yesterday about some issues I was having (apologies if it wasn't you)?

16:27 nicferrier: I get frustrated with clojure because I don't know it well enough yet and I want to be productive in it.

16:28 hard problem.

16:28 kaplan: nicferrier, happened to me when I was just starting out in programming

16:29 nicferrier: kaplan: I'm not just starting out. I've been doing it for 30+ years. The problem's the same though.

16:29 I can always get good enough in a new programming language... but getting productive is hard.

16:30 Integralist: Hello 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:31 So when that example web server runs, I get a Java exceptions about "core" namespace not existing.

16:31 Even though I can manually run the require calls inside the if statement and manually access the core ns

16:45 I'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:49 Bronsa: Integralist: http://technomancy.us/143

16:50 Integralist: Bronsa: thanks! will take a read now

16:56 emaczen: what is so great about language level concurrency vs a library?

16:57 AeroNotix: emaczen: efficiency and consistency

16:57 imagine implementing STM at the library level?

16:58 With Lisps, it's probably easier to get it to fit in nicely, though.

16:59 Bronsa: AeroNotix: there's nothing preventing clojure's STM to be implemented as a library actually

16:59 AeroNotix: it requires no special language support

17:00 AeroNotix: Bronsa: for sure. I just mean it's easier given that you can design a language with features such as that in-mind.

17:00 Rather than retrofitting it in

17:00 Bronsa: most 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:18 arez: how can I use tracing in my clojure REPL?

17:18 or some other kind of debugging?

17:18 AeroNotix: arez: tools.trace

17:26 arez: AeroNotix: thx

17:26 AeroNotix: np

17:31 cfleming: dnolen: Yep, Settings->Code Style->Clojure->General->Align map values

17:34 arez: AeroNotix: wow, works really great :D

17:34 AeroNotix: arez: innit

17:36 cfleming: tomjack justin_smith: It's not that the single-space indent rule is difficult to implement, I think it's a stupid rule

17:38 AeroNotix: WTB Clojure for SBCL

17:43 liflash: hi, 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:04 ToBeReplaced: i'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:05 unfortunately, jvm overhead is too high, even with oracle on ARM

18:30 tomjack: cfleming: "single-space indent rule"?

18:30 (foo

18:30 bar)

18:30 ?

18:30 I was thinking mostly about the "name+1-space indent rule":

18:31 (foo bar

18:31 baz)

18:31 name+2 I guess..

19:02 justin_smith: ToBeReplaced: I wonder if pixie is mature enough to do that yet. I've had some luck using it for C / system level interop.

19:05 emaczen: the STM stuff breaks easily with mutable datastructures, and it's more intuitive to use if all the default data structures are immutable

19:06 emaczen: 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:06 emaczen: much less convenient

19:46 ToBeReplaced: justin_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:47 i'll definitely keep an eye on it though for other reasons

19:48 being 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:58 justin_smith: ToBeReplaced: I was able to do fork and pipe libc calls via interop

19:59 ToBeReplaced: and epoll is also in libc

19:59 so it should just work

19:59 I can give you some example code if you want to try some time

20:01 cfleming: tomjack: Sorry, I got interrupted right when I was getting going with my rant

20:02 right, I think lists continuations (when a single list continues over multiple lines) should nearly always receive a two-space indent

20:02 justin_smith: cfleming: single space indent being what happens if the first arg to the function is on the next line, right?

20:02 cfleming: justin_smith: Right

20:03 justin_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:03 justin_smith: And lists are invocations 99% of the time.

20:03 justin_smith: right

20:03 cfleming: justin_smith: I think a larger indent is important to show the continuation

20:04 justin_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:05 justin_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:06 justin_smith: cfleming: I pretty much avoid things that would follow that rule (I think many of us do)

20:06 cfleming: justin_smith: How do you mean? You avoid running function parameters onto the next line?

20:07 justin_smith: cfleming: I avoid the situation where the first arg is on the next line - I thought this was the rule you were talking about

20:07 cfleming: justin_smith: Right, so if the first arg is always on the same line, then the others line up under it, right?

20:08 justin_smith: right

20:09 amalloy: cfleming: 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:11 cfleming: amalloy: 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:12 amalloy: Personally, I think a two-space indent makes it clearer that the line is a continuation of the previous line

20:12 amalloy: doesn't a one-space indent say the same thing?

20:13 cfleming: bbatsov clearly felt that the two-space rule should only apply to macros and only for do-bodies, which I don't agree with

20:13 amalloy: No, because then the forms contained in the list are lined up, they're not offset at all

20:13 amalloy: but i can clearly see there's an open paren above this blank space

20:14 like in (foo RET bar), there's a blank space directly below the (

20:14 cfleming: Sure, but it's pretty subtle

20:15 Dunno, either Emacs users are suffering from Stockholm syndrome, or I'm just blind, I'm not sure which.

20:15 amalloy: cfleming: 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:15 the a would be indented so that it looks like it's inside of the fn

20:16 and, i mean, of course emacs users have stockholm syntrome. but it doesn't mean the alternatives are all better

20:17 cfleming: True, 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:17 amalloy: cfleming: didn't i just make another argument?

20:17 cfleming: amalloy: Well, before 5 minutes ago :)

20:18 https://www.refheap.com/97246

20:18 amalloy: cfleming: actually your propsed change would move a,b,c left one column of where they are now, i would think, right?

20:19 cfleming: amalloy: Yeah, you're right, sorry

20:20 I 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:20 It's not so much a proposed change, it's how Cursive has always done it

20:20 amalloy: cfleming: are you aware of emacs's clojure-defun-indent?

20:21 cfleming: amalloy: Yeah, I have an option for that, a lot of people wanted it

20:21 Basically any line continuation is offset by two spaces

20:21 raspasov: if we don't come to consensus on the indentation debate we'll have to bring it to the Supreme Court

20:21 amalloy: cfleming: well, not *any* continuation. clojure-defun-indent lets you customize a list of "symbols whose arguments should always be indented two columns"

20:22 (i added that before technomancy added the setting to indent everything by two)

20:22 cfleming: amalloy: Ok, Cursive has always supported per-form customisation. The setting I'm talking about makes that the default for non-customised forms.

20:23 amalloy: okay

20:24 tomjack: whoa

20:24 cfleming: My impression is that most people who use that turn it on and never customise anything else

20:25 tomjack: I 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:25 then I did a Cursive "Reformat code..." on a clojure-defun-style-default-indent file

20:27 amalloy: cfleming: probably, yes

20:28 cfleming: tomjack: Were the results surprising?

20:29 tomjack: well, hmm

20:30 nothing is resolved (e.g. "ns cannot be resolved")

20:30 maybe that is why I got (defn foo [] []) with the return vector indented up to foo?

20:30 cfleming: Yeah

20:30 If it can't resolve anything everything gets borked

20:30 How did you create the project?

20:30 tomjack: but e.g. map alignment

20:30 don't remember, will try to debug myself :)

20:31 cfleming: Things 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:32 tomjack: I created the project from a clojure-maven-plugin pom file most likely

20:32 cfleming: tomjack: If it's a lein project, importing it should set everything up correctly

20:32 Ok, that should work, I think - those two things are the most likely culprits

20:33 tomjack: the module has my src/main/clojure listed in "sources" in project structure, and clojure.jar is in "dependencies" there

20:34 cfleming: Hmm

20:35 Does File->Invalidate Caches and restart help? Every so often the IntelliJ indexes get funky

20:37 dmbennett: anyone know of a guide for hitting restful apis with clojure?

20:38 tomjack: intellij is the only reason I know my computer has a fan

20:39 cfleming: Hehe, that initial indexing always gets it going

20:41 tomjack: hmm, no luck

20:41 I also deleted the project and recreated from the pom.xml before invalidating/restarting

20:42 raspasov: dmbennett: what do you mean "hitting", like making HTTP calls?

20:42 dmbennett: making a post request

20:42 yeah

20:42 clj-http?

20:42 clojurebot: I think you mean gnir.

20:42 raspasov: dmbennett: look into libraries like https://github.com/ztellman/aleph or http-kit.org

20:42 cfleming: tomjack: 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:43 tomjack: no, unfortunately. but separating a test case from the huge maven web which prevents me from sharing would be useful for finding the cause :)

20:43 gfredericks: how does linux communicate to a process that its output isn't being read anymore and it should probably quit therefore?

20:44 e.g. if I do `yes | head` how was `yes` told to quit?

20:44 cfleming: hehe, 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:44 justin_smith: gfredericks: the stdout file descriptor gets closed

20:44 gfredericks: justin_smith: uuhuhuhumusuhuhm

20:45 justin_smith: ?

20:45 gfredericks: so all these different well-behaved programs just watch for that?

20:45 justin_smith: or they crash because they wrote to a closed file :)

20:45 either way, they stop

20:46 dmbennett: raspasov: is this the "industry" standard, i.e. is this library more commonly used than say http-clj?

20:46 justin_smith: dmbennett: raspasov: aleph doesn't even do post requests

20:46 gfredericks: justin_smith: oh hey I just got the jvm to do that too by switching to `lein trampoline`

20:46 justin_smith: gfredericks: awesome!

20:47 dmbennett: raspasov: though http-kit does have a client lib, I think clj-http.client is better

20:47 raspasov: justin_smith: https://github.com/ztellman/aleph/blob/0.4.0/src/aleph/http.clj#L258

20:47 justin_smith: raspasov: it can SERVE http request

20:48 that's not for acting as a client

20:48 or is it?

20:48 hmm

20:48 raspasov: I believe it is a client

20:48 (http/get "https://google.com")

20:48 I was using it over the last few days

20:48 justin_smith: raspasov: oh, OK

20:49 dmbennett: This is nice, reminds me of unirest: (client/get "http://site.com/search" {:query-params {"q" "foo, bar"}})

20:49 gfredericks: justin_smith: also I had to register a handler for SIGPIPE

20:49 raspasov: was using only GET though, but since it does have a declaration for POST, I assume does that as well

20:49 justin_smith: gfredericks: I wonder if that is because java has an alternate handler you had to override?

20:49 gfredericks: probably, I wonder why and what it does

20:49 raspasov: dmbennett: clj-http is popular, yes, but I dont think we have something like "industry" standard

20:49 gfredericks: my handler called System/exit of course

20:50 justin_smith: gfredericks: raise an exception and let your app handle it maybe?

20:50 gfredericks: justin_smith: on what thread? not the writing one afaict

20:50 justin_smith: interesting

20:50 I never hit that corner of things

20:50 dmbennett: right, kind of figured, I work at a company that is in the midst of moving to many internal apis, "microservices" I guess

20:51 one of our search teams is looking at interacting with SOLR's FST using Clojure

20:51 raspasov: dmbennett: haha https://twitter.com/raspasov/status/566756964193943552

20:51 dmbennett: For real

20:52 raspasov: dmbennett: you guys using Clojure?

20:52 dmbennett: beginning to learn and use it this month

20:52 just for this small project

20:52 raspasov: dmbennett: currently using what?

20:53 dmbennett: C#/.Net

20:53 tomjack: cfleming: http://s3.tomjack.co/maven-test.tar.gz

20:54 dmbennett: Though personally, I've been breaking my teeth with Ruby

20:54 tomjack: you can tell by the indentation that I experienced the same problem

20:54 justin_smith: dmbennett: have you looked at clojure-clr at all? It's not as mature an ecosystem, but should fit in nicely with .net stuff

20:54 raspasov: dmbennett: good luck with it, as long as there's interest and perseverance the payoff is real after a few months

20:54 justin_smith: agreed

20:54 dmbennett: Yeah, our engineering lead was going on about this recently

20:55 raspasov: dmbennett: I feel like Java experience can help, when I was starting I had 0 Java experience

20:55 dmbennett: ditto

20:55 justin_smith: same here

20:55 raspasov: but it's definitely not 100% needed

20:55 justin_smith: I learned enough via the interop I was doing

20:55 raspasov: same

20:55 justin_smith: being able to read the javadoc helps a ton :)

20:55 tomjack: looks like I'm on cursive 0.1.45

20:55 dmbennett: I come from a background in philosophy, and studied alot of process philosophy, which ironically Rich Hickey is familiar with

20:55 so some of the theory behind clojure makes a great deal of sense to me

20:55 justin_smith: dmbennett: oh yeah, the old Whitehead / time thing

20:55 raspasov: dmbennett: haha, yea that's cool

20:56 dmbennett: functional programming though, gotta say, I think more functionally than OO I guess

21:00 justin_smith: OO "thinking" is weird

21:00 dmbennett: philosophically or practically or both?

21:01 justin_smith: philosophically - but even as a way of organizing code it gets messy imho

21:01 dmbennett: yeah, it's kind of a measure of how much you're willing to put up with/juggle in your mind all at once

21:02 justin_smith: I 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:03 and the things that are intuitive to human thought (and preferred by OO) are actually very complex and unsound

21:03 dmbennett: interesting point

21:03 can you expound?

21:03 justin_smith: (in this specific area - many intuitive things are also simple and good foundations)

21:03 encapsulation of state - it's a metaphor that comes readily

21:04 and doesn't really scale into sensible systems without a lot of help

21:05 as opposed to immutable values and simple composable rules - which look like nothing in the real world, but build very solid systems

21:05 with far fewer pitfalls along the way in the design

21:05 dmbennett: The state thing is really interesting, since philosophically the way that state is used in clojure works better with real world thinking

21:05 justin_smith: right

21:05 I think the intuitive version of state is a very bad foundation for making sense of anything

21:06 dmbennett: Legitimately 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:06 justin_smith: while the philosophical version (which is more about stateless moments + time as a dimension if I get simplistic) is much more solid

21:06 dmbennett: well, the guiding design principle in OO is make code that works the way we intuit things to work in the real world

21:06 well, one of them at least

21:06 dmbennett: that doesn't mean people know how to do that well

21:06 justin_smith: right

21:07 my problem is with intuition - I'll have to make a blog post or something about my complaints with intuition

21:07 dmbennett: and 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:07 justin_smith: a lot of what's "intuitive" is really magical thinking

21:07 dmbennett: or subconscious extrapolation

21:07 some big recommendation system in the sky

21:07 haha

21:08 justin_smith: oh man

21:09 "ever since I mentioned a pen one time in a prayer, god keeps thinking I am only interested in office supplies"

21:09 dmbennett: what is that from?

21:10 justin_smith: I just made it up, imaginary testimonial from a land where there is a big recommendation system in the sky

21:10 dmbennett: oh, sorry, thought you were quoting something

21:11 justin_smith: quoting an alternate reality

21:13 dmbennett: Check 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:13 whenever we can say, ‘There it is again.’ Objects are the elements in nature which can ‘be again.’ "

21:14 Thus, while “The most concrete fact capable of separate discrimination is the event” (1920, 189), for Whitehead objects, unlike events, “do not pass”

21:14 justin_smith: right, so essentially immutable

21:15 dmbennett: yah

21:16 In some sense events are like functions, but each transformation made by the function is immutable in that past moment

21:16 and thus history has meaning

21:16 and in some sense, an eternal impact

21:17 that's probably where the metaphor breaks down for programming

21:17 and by metaphor I mean analogy

21:23 justin_smith: dmbennett: one major benefit of our using immutabulity is being able to replay events and have a meaningful history

21:28 dmbennett: @justin smith test

21:29 ....

21:29 is there anything like a central repository of clojure libraries?

21:29 justin_smith: dmbennett: clojars

21:30 also, via lein, we can easily use any maven repo

21:31 dmbennett: maven is a java thing?

21:32 justin_smith: (clojars is a maven repo with low barrier to contribition, specializing in clojure packages)

21:32 yeah

21:32 dmbennett: yeah, on that subject, how does clojure make use of java libraries?

21:33 I mean if I wanted to call a maven jar?

21:33 justin_smith: it has a spec for declaring and finding deps that we also use

21:34 clojure.jar is a maven jar

21:34 for

21:34 dmbennett: is this at compile time only?

21:34 I mean if I make use of a library can I repl it?

21:34 keep in mind I have little to no knowledge of using clojure yet

21:35 justin_smith: pomegranate or pallet/alembic can fetch maven deps at runtime

21:36 with clojure / repl it's frequently compile time ( there is no interpreted mode)

21:37 dmbennett: ok

21:38 justin_smith: I put an alembic dep in my user profile so I can always pull in a fresh dep

21:39 also criterium for micro-benchmarking

21:39 dmbennett: nice

21:41 justin_smith: in many ways I think lein is a killer app for clojure

21:41 zacts: so what all can lein do besides manage a clojure project?

21:41 dmbennett: yeah, been working with that a little

21:42 doesn't it have an IRB like repl

21:42 lein repl

21:42 or some such

21:42 justin_smith: run tests, manage deps, package and deploy, run a networked repl

21:43 dmbennett: yeah, clojure.main is a repl, bit lein adds some nice ui features

21:44 dmbennett: is there anything like a debugger, or what are the implications of clojure for debugging?

21:46 TEttinger: dmbennett: 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:47 dmbennett: ok

21:47 TEttinger: profiling 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:47 it's generally best to debug early on by testing small functions in the REPL

21:48 lein really does a lot of nice stuff, and the plugins allow lots of extension

21:48 dmbennett: aka test driven development?

21:48 TEttinger: you can do that too

21:49 there are libs for it that I don't use myself, but I know lots of people do

23:48 Lewix_: (defn name doc-string? attr-map?

23:48 ([params*] body)+)

23:48 what does the + mean?

23:52 robindunbarr: Is there a lightweight web framework like Bottle in Python for Clojure?

23:55 apiology: Lewix_: '+' means 'one or more' - you can have multiple 'arities' of functions - variants which take different numbers of parameters

23:55 Jaood: robindunbarr: not really, using something like ring(with some middleware), compojure and hiccup gets you very close

23:55 Lewix_: apiology: thanks

23:57 robindunbarr: Jaood: How about Luminus?

Logging service provided by n01se.net