#clojure logs

2012-02-03

00:11muhoook stupid question time. first returns nil if the list is empty, but rest returns empty list?
00:11muhoothat seems... confusing.
00:13muhoo(let [foo '()] [(first foo) (rest foo)])
00:13muhoo&(let [foo '()] [(first foo) (rest foo)])
00:13lazybot⇒ [nil ()]
00:14_phil,(doc rest)
00:14clojurebot"([coll]); Returns a possibly empty seq of the items after the first. Calls seq on its argument."
00:14G0SUBmuhoo, that's the difference between rest & next.
00:15G0SUB,(doc next)
00:15clojurebot"([coll]); Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil."
00:15muhoohm, ok. it still seems weird to me.
00:15_phil,(reduce + 0 nil)
00:15clojurebot0
00:16G0SUBmuhoo, use next if you need that behavior.
00:16_phil,(reduce + nil)
00:16clojurebot0
00:16_philok then i dunno what it is for :)
00:17_philsince functions operating on seqs seem to not have any problems with nil
00:17muhoo&(seq nil)
00:17lazybot⇒ nil
00:17muhoo&(seq)
00:17lazybotclojure.lang.ArityException: Wrong number of args (0) passed to: core$seq
00:18muhoook, so first/next instead of first/rest, got it.
02:20echo-areaIs `alter' retried for every commits in other transactions?
02:21echo-areaE.g. if there are 5 versions made by some other transactions, an alter will be retried for 5 times?
02:24echo-areahttp://pastebin.com/PqatZHZu
02:25echo-areaFor example, the transaction in function `retries' is always retried for 3 times
02:42echo-areaHmm, Clojure's Java source code is in Whitesmiths style
02:51raekecho-area: have you seen this? http://java.ociweb.com/mark/stm/article.html
02:51echo-arearaek: No, but I'm reading now, thank you
02:55echo-arearaek: The first glance makes me believe that this link is definitely more informational than the source code. Thank you!
02:57raekthe point in time when it is determined if the current transaction should be retried is at the end of the transaction
02:57raekthey are optimistic, so they won't be aborted halfway through
02:59echo-areaI seem to understand what these two sentences mean, but don't know how this connects to my question. Will come back to them when I finish reading.
03:00raek"Is `alter' retried for every commits in other transactions?" Calls to alter are not retried, whole dosync blocks are.
03:01raek"E.g. if there are 5 versions made by some other transactions, an alter will be retried for 5 times?"
03:02raekif those 5 changes by some other thread all happen during the transaction of the first thread, the transaction if the first thread will be retried once
03:02echo-areaOh, I see. So when the whole transaction is retried for the second time, another change to `r1' happens, this triggers the third retry.
03:03echo-areaCompletely understood. Thank you :)
03:03raekthe "start point" and the "end point" of a transaction are where the interesting things happen at...
03:15mduerksenwhat tools are recommended for authentication in a ring-based web-app?
03:15mduerksensandbar?
03:33brehautmduerksen: what tools are recommended for building a build? it depends on the building
03:38Blktgood morning everyone
03:40mduerksenbrehaut: you're right, my question is quite vague. next try: do you know of other alternatives for basic-authentication+ssl in a ring-based web-app?
03:55tscheiblmduerksen: cookies + ssl
03:55clojurebotI don't understand.
04:05mduerksentscheibl: yes, basic-auth for login, then cookies, and everything with ssl, that's what i have in mind. my question is: should i write it myself, with my own ring middleware for redirecting to https when necessary, together with ring.middleware.cookie, or is there already a solution for this? i'm not experienced in security and authentification, so i don't know what puzzle pieces i may miss.
04:05ivan___Good Evening. In scala i have a state machine that is implemented with actors because we have several tasks running through it - ie one thread manages a lot of of concurrent workflows. Is there a way I can do this with clojure? I've been looking at agents but im not 100% sure
04:11aperiodicyeah, agents are an easy way to do that
04:12aperiodici have some code that does farms out most of its io to agents
04:12aperiodicto deal with so many failures and dropped connections
04:13aperiodicbasically, set the state of the agent to the data you want to send, then write a function that takes that state as input and attempts to flush it
04:14aperiodicit returns what it didn't manage to flush, so if it flushed everything, it returns an empty collection
04:15ivan___aperiodic: so one state machine is something that provisions a ec2 server. the workflow is, you launch a server, then wait until it comes up, currently in akka I use a scheduler to send a message every 10s to look at state of server to see if its ready
04:15ivan___if its not, i send the same state 10s later
04:15ivan___if it is, im done
04:15aperiodicivan___: you could have the agents implement state machine functionality, sure
04:15aperiodicthey run in their own threads
04:16ivan___1 agent = 1 thread?
04:16aperiodicyup
04:16aperiodicuse send-off! to start an io-bound agent, though
04:16ivan___what happens if you want to have say 10 threads for the state machines (in akka you do 10 actor instances, and you can load balance them)
04:16aperiodicit denotes that it's gonna be sleeping a lot, so cpu cores will be oversubscribed
04:16aperiodicthat's fine
04:16aperiodicfire them up as needed
04:17aperiodicwhen you need to wait on one, deref it (see the '@' reader macro)
04:17aperiodicthey're even stopped if the reference is gc'd!
04:18aperiodicthat's one of the great things about clojure; this kind of thing is not hairy at all
04:18aperiodici mean, i haven't had an issue, it's possible YMMV
04:18ivan___do they have to store state?
04:18aperiodicmy n is 1
04:19aperiodicwell you can just think of it as a computation
04:19ivan___so in akka my state is what i send the actor, its not actaully reading input, and mutating state
04:20ivan___the function that reads the state sends a new message back to itself with the new state, progressing the machine
04:20aperiodicthe state machine is implemented as a pure function?
04:21aperiodicyou can do the same thing in clojure
04:21ivan___so its like def receive = { case Task("somestate") => self ! Task("somenewstate")
04:21ivan___if you are familiar with scala at all ..
04:21aperiodici am not familiar in the least, sorry
04:22aperiodicbut you can have the actor do only io
04:22aperiodicum, agent
04:22aperiodicsorry
04:22aperiodicor do both
04:22ivan___thats just matching a case with state == somestate, and sending a new message back to the actor with the updated state, no internal mutation of state
04:22ivan___ok
04:23ivan___it doesnt help that im learning clojure while doing this ;)
04:23aperiodichave you done any erlang?
04:24aperiodicthis sounds a bit similar to some erlang idioms i've seen
04:24echo-areaIs add-watcher removed in the current Clojure?
04:24ivan___yeah i believe akka/scala actors were based on erlang
04:24ivan___i havent done any erlang, although its on my todo list
04:25ivan___we do use erlang at work (the scala state machine is from a work project too)
04:25ivan___aperiodic: i guess one question i have is am i even approaching this the right way in clojure. I feel like im just trying to reimplement an actor
04:26aperiodichave you read through all the sidebars on clojure.org?
04:26ivan___ive done about half 4clojure.org hehe, and read some of the sidebars
04:27ivan___aperiodic: until i found 4clojure i was really lost in lisp
04:27aperiodici'd highly recommend sitting down and reading through all those sidebars
04:28aperiodiconce i grokked clojure's focus on immutability and its approaches to concurrency writing this sort of code became much easier for me
04:28ivan___immutability is fine, most of the scala i write is immutable, its more the approach to concurrency
04:29aperiodiceach concurrency primitive has a really well-defined scope, and one is usually a fairly natural fit for any given way i want to access the data/have the computation performed
04:29ivan___actaully learning clojure has been fairly easy, everything is a function, just look up the function api
04:29aperiodicright?
04:29aperiodicit's just a big list
04:29aperiodicnot some crazy javadoc where you have to do the class hunt
04:30aperiodicalso, i've been reading through joy of clojure this weex
04:30aperiodic*week
04:30aperiodicand i've learned a ton
04:30ivan___aperiodic: so there is one more constraint i havent told you about... i need to update a db each time the state changes, and have the state machine be resumable - this is by far the hardest part of the whole exercise since state machines are pretty common
04:31aperiodicafraid i don't have any RDB experience
04:31aperiodiconly redis and hbase
04:31ivan___we are probably going to be using redis
04:31ivan___but where its persisted is irrelevant
04:31ivan___thats easy
04:31Psy-Qwow, that's some big doc comments in clojure core :|
04:32aperiodicivan___: i've found using redis to be pretty painless
04:32ivan___aperiodic: currently we store everything in json on disk, anything is painless compared to that... :)
04:33aperiodicivan___: just in the fs? access it via file open?
04:33ivan___i mean, im trying to right a v2 of this app, v2 wont do fs
04:33aperiodicivan___: gotcha ;)
04:34patchworkI am having a problem with load-file. I try to say (use 'clojure.string) but it gives me "Unable to resolve symbol: use in this context"? Does load-file really not know use?
04:35aperiodicivan___: i don't see much need for a state-machine framework/library... i think they're implemented pretty well using letfn
04:35twem2//
04:35twem2#
04:35twem2uit
04:36aperiodicivan___: if you wanted you could write some macros for that, or even just high-level functions
04:36ivan___aperiodic: a workmate said we could implement it around a blocking queue, actors are just conventent in scala
04:36ivan___i need to read up on concurrency more
04:38lucianivan___: your scala case can be expressed in a regular clojure function in several ways, afaikl
04:38aperiodicivan___: i usually use a map, since our data is coming in semi-structured, and it allows me to, e.g., flush certain parts of that structure faster than others
04:38lucianivan___: explicit (case ...), multimethod, protocol
04:38ivan___i was just pointed to channels
04:39lucianivan___: there are also a few matching libraries for clojure
04:39lucianivan___: i think i'd express a state machine as a multimethod
04:39aperiodicivan___: have the main thread loop through the structure and see what needs flushing, then farm out the actual transaction to an agent, have the agent return what it couldn't flush, rinse, repeat
04:39ivan___lucian: that stuff im not really worried about, its more the state changes
04:40aperiodicivan___: but i'm not a whiz or anything, so there are almost certainly better ways to do it ;)
04:40lucianivan___: right. the way i understand it (and i'm a clojure newbie too) is that you give the actor a function to change itself with
04:40lucians/actor/agent/
04:40ivan___aperiodic: i think ill ask again tomorrow during more primetime, but you have given me things to thing about
04:40luciandammit, the terms are too similar
04:40ivan___lucian: yeah, although im not sure i even need an agent
04:41lucianivan___: so i think you could put your data in an agent and then pass it the state machine function until it runs out of data
04:41osa1why (type 'true) is java.lang.Boolean? shouldn't it be clojure.lang.Symbol ?
04:41aperiodicivan___: yeah, i'll probably be actually online 2-5 PST
04:42lucianivan___: they seem the right thing to use here, i guess. i highly recommend reading The Joy of Clojure
04:42ivan___aperiodic: i think ill try and write some code with an agent, and then gist it and ask for advice... one issue i have is actaully visualising what we have been talking about ;)
04:42aperiodicivan___: yeah, that's how one really gets a handle on things.
04:43aperiodicman fogus must love us
04:43ivan___i have a few ideas
06:27osa1why (type 'true) is java.lang.Boolean? shouldn't it be clojure.lang.Symbol ?
07:05raekosa1: no. true, false, and nil look like symbols but they aren't
07:14osa1raek: why do we need false and true as symbols when we already have true/false special values?
07:18fhd_I'm changing the Leiningen source path by setting :source-path (to src/clj), but now it doesn't find my custom plugin (under src/clj/leiningen) anymore. Ideas?
07:26raekosa1: are you asking why one would want to have true/false/nil as special values or why one would want to have true/false/nil as symbols?
07:27osa1raek: actually why one would want to have both at once
07:28raekI didn't say that one would want that
07:28raekbut technically it is possible in CLojure
07:29raek(just not recommended)
07:29lucianone could make false truthy or something
07:30raekthat too :)
08:30yawNOhowdy world
09:07uvtcWhen using `ns`, why don't the "references" need to be quoted? That is, (ns foo (:use (my.lib this that))) seems like it ought to be (ns foo '(:use (my.lib this that))) or (ns foo (:use '(my.lib this that)))...
09:09compjns is a macro I guess
09:10uvtcSeems like Clojure would try to treat (my.lib this that) as a fn call... and also it would not be able to resolve those symbols.
09:13compjthe forms are already quoted passed to the (ns...) call, because it is a macro
09:13compjsentence broken, hope you get it :)
09:14uvtccompj, thanks. Yes ... macros appear to be aware of the matrix. :)
09:14uvtcIs there a way to ask if a given symbol refers to a macro (as opposed to a regular fn)?
09:15compjtry (.isMacro #'ns)
09:16compjdon't think this is part of the stable api
09:16uvtccompj: oooh.
09:17uvtccompj, neat. Oh, doh -- also it says right at the top of the output from `(doc ns)` that it's a macro. Should've noticed that.
09:17TimMcHuh, I figured that was a special form.
09:18compjyes, thought you were looking for a api call. (:macro (meta #'ns)) should also work
09:18TimMcseeing as it is used in the first form in core.clj
09:19compjis defined in core.clj:5065 here
09:25TimMcInteresting...
09:25TimMcbut it is definitely used at the top of the file, also
09:26compjso macros can be used over its definition, maybe
09:26TimMcThat's probably a compiler literal that is later shadowed by a macro.
10:07Psy-Qany book recommendations to get into clojure?
10:08joegalloJoy of Clojure is very good.
10:08Psy-Qi'm reading Joy of Clojure and will probably get the pragprog book, but beyond that i'd be happy about recommendations.
10:08Psy-Qoh good, then i'm on the right path :)
10:08joegallo"The best book on programming for the layman is 'Alice in Wonderland'; but that's because it's the best book on anything for the layman."
10:08joegallo;)
10:08joegallojk, jk
10:09Psy-Q:)
10:09Psy-Qit seems there's no section on book recommendations in the wikibook linked from clojure.org
10:09jeremyheilerPsy-Q: Just start creating stuff.
10:09Psy-Qis that on purpose, so as not to be biased towards anyone's book?
10:09TimMcDoubt it.
10:10algernonIt's because all of them are awesome, so if you buy and read any Clojure book, that's good.
10:10jeremyheilerPsy-Q: oh, and solve problems on 4clojure.com !
10:10Psy-Qjeremyheiler: we're making a media archive system and we have a small REST interface now, i wanted to dive into the deep end and make something in clojure that displays a grid of images from the archive via REST with a java GUI
10:11jeremyheilerPsy-Q: Nice, that sounds cool.
10:11Psy-Qcould do that in clojurescript with a browser, now that i think about it
10:11Psy-Qjeremyheiler: ah, will do 4clojure stuff this weekend then
10:48brett_hJava Interop question: I can't figure out how to access the CompressionType enum given the SequenceFile class http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/io/SequenceFile.CompressionType.html
10:48brett_hI've tried (. foo bar), foo/bar, etc to no avail
10:48joegalloSequenceFile$CompressionType
10:48joegallobit a wart, imho
10:49joegallobit of a wart, even
10:50brett_hthanks
10:50brett_hah, that's kind of hidden on http://clojure.org/java_interop :)
10:51brett_hhmm, Unable to resolve symbol: SequenceFile$CompressionType in this context
10:51joegalloof course, that's the actual class on disk, but java provides pretty sugar when you reference it
10:51joegalloimport it?
10:51brett_hSequenceFile is
10:52joegallogotta do both, i think
10:52brett_hI don't have to/can't import CompressionType can I?
10:52brett_hhmm
10:52joegallothese are two distinct classes, the name relationship is a trap
10:52brett_hit's nested, now I'm confused, so do I actually import foo$bar?
10:52joegallo(:import (some.package Foo$Bar))
10:53joegalloIt's a legitimate distinct class, you just need to treat it as such, do not be fooled by the $. ;)
10:54gtrak`can you actually construct non-static inner classes from clojure?
10:55gtrak`in java you would do this.new InnerClass();
10:55raekthe whole nested classes thing is a java compiler invention
10:55raekit does not exist on the byte code level
10:56raek(except for some annotations and attibutes)
10:56gtrak`I imagine in clojure you would have to do (InnerClass. outer arg1 arg2..)
10:56raekgtrak`: ah, now I understood the question.
10:56raekin theory, yes
10:57raekyou can look at the output from javap -c to see what the contstructors really look like
10:57raekthere is a good article about this
10:59raekah, here it is: http://www.theserverside.com/news/1363881/The-Working-Developers-Guide-to-Java-Bytecode
11:03gtrak`raek: thanks, on my reading list :-)
11:03TimMctmciver and I are working on "import+", which will have renaming imports.
11:04TimMcDoing something about the inner$class situation would be in scope.
11:22raekTimMc: will it be able to import static fields too? (e.g. enum values)
11:40tmciverraek: you can import static fields like Math/PI but...no sure about enums
11:44TimMcraek: Sure, that's the goal.
11:44TimMcraek: We're actually building it off of clojure.contrib.import-static, which really needs an overhaul itself.
13:17cemerickFYI, new Mostly λazy: Episode 0.0.4 w/ hugod and tbatchelli about #pallet and more (from Clojure Conj 2011) http://wp.me/p1Y10D-15
13:18pyrwhen / where is euroconj
13:19tbatchellipyr: may 24+25, London
13:19pyr'k sounds nice
13:20tbatchelliit does. Airplane tickets from SF don't look that nice though :(
13:20pyrheh
13:20pyrnot gonna complain for once
13:20pyrtickets from geneva will be much less :)
13:31tutysaraHi room
13:31mdeboardhi
13:31tutysaraclojure newbie
13:31tutysaratrying to setup a clojure env with emacs
13:32tutysarafollowing the instructions at - http://data-sorcery.org/2009/12/20/getting-started/
13:32tutysaragot an error while installing - slime-repl
13:32mdeboardtutysara: That is very outdated
13:32the-kenny-w2009 is pretty outdated
13:32dnolen_tutysara: http://dev.clojure.org/display/doc/Getting+Started+with+Emacs
13:32tutysaraslime-repl.el:122:39:Error: No setf-method known for slime-connection-output-buffer
13:33tutysarayes outdated
13:33tutysaralet me try your link
13:33mdeboardIt's literally like 2 steps nowadays :P
13:33the-kenny-wShort version: Use leiningen, install swank-clojure as leiningen plugin, install clojure-mode in emacs and do M-x clojure-jack-in
13:34tutysaraas simple as that?
13:35technomancyyou probably have to get rid of your current slime setup first
13:35mdeboardtutysara: Yes
13:35mdeboardtutysara: It's extremely easy thanks to that one dude who made lein
13:35mdeboardand all the other contribs to it
13:36the-kenny-wtechnomancy: Btw. is there a way to prevent jack-in from bootstrapping slime by installing a compatible version? Sometimes, when I restart emacs, I find myself without slime when I want to use it with scheme.
13:39technomancythe-kenny-w: if you don't want to bootstrap slime you should use lein swank instead of jack-in
13:40the-kenny-wHmm
13:40the-kenny-wNah, I'll stick with jack-in.
13:57hagnaI suppose someone here would agree with Rich Hickey that you should leave information alone and not turn it into an object?
13:58TimMchagna: Not sure where you're getting that.
13:59TimMc{:a 5} is an object
14:00hagna56:23 in http://www.infoq.com/presentations/Simple-Made-Easy he said class with information-specific methods
14:00TimMcOh, *classes*, sure.
14:01hagnaheh not sure I get it then hmmm
14:01TimMchagna: {:a 5} is an object that is an instance of.... let's see: ##(class {:a 5})
14:01lazybot⇒ clojure.lang.PersistentArrayMap
14:02TimMcthat ^
14:02hagnaTimMc: I don't know clojure that well
14:02hagnaTimMc: but an ORM does seem to hide information behind a micro-language
14:02TimMcORM's are a whole 'nother kettle of monkeys
14:03arohner_hagna: the point there is that each class is it's own mini-DSL, .getFoo, .getBar, etc, while 'everything is a map' means you can use the same api on all maps
14:03TimMcarohner_: Thanks, I was struggling to phrase that.
14:04hagnaarohner_: so if I have a database then ... what's the nice way to represent the data?
14:04hagnaeverything is a map again?
14:04arohner_hagna: every row is a map, in most clojure DB libraries
14:05TimMca set or list or vector of maps
14:06TimMcor more likely, a seq of maps
14:11ibdknoxhagna: try Korma: http://www.sqlkorma.com
14:11hagnaseems to me the ORM made databse access more consistent and possible easier to reason about
14:11hagnaibdknox: ok
14:12hagnas/possible/possibly
14:12TimMcibdknox: Does Korma provide data manipulation, or just retrieval?
14:13ibdknoxTimMc: hm? I does all the standard SQL stuff
14:13ibdknoxit*
14:13ibdknoxinsert/update/delete/select
14:13ibdknoxkorma.incubator has some of the DDL stuff in it too
14:13ibdknoxthough I didn't finish it
14:18TimMcI've run into a situation in one of my projects where SQL wasn't sufficient, so I pull allll the data into memory and munge it from there, then stuff it all into a different database at the end.
14:19TimMcNow there's a bit where I actually wish I had SQL semantics for data-structures.
14:19TimMcI probably just need to dump stuff into the DB sooner than I had been.
14:20hagnais it pretty simple to give someone a clojure program if that someone is using osx, windows, linux or droid linux?
14:22TimMchagna: Yes, if they have a JVM installed.
14:22TimMcwhich most people do
14:22ibdknoxTimMc: I played around with doing that
14:22ibdknoxI don't have the motivation to really do it though
14:22TimMcibdknox: ANy luck?
14:22hagnaTimMc: so what do you give the person a jar file?
14:23ibdknoxTimMc: yeah, it seemed like I could apply a decent subset of Korma's functionality directly to objects
14:23TimMchagna: Yep. `lein uberjar` makes a jar with all the dependencies, and you hand them that and maybe a shell script to call java -jar foo.jar
14:24dougs87TimMc: is that jar file then dependent on a particular JVM version?
14:24TimMc"Sufficiently recent" should be good.
14:25dougs87same major version sort of thing?
14:25ibdknoxTimMc: simple example: https://refheap.com/paste/601
14:26hagnaleiningen as in vs. the ants?
14:26mdeboardyes
14:27hagnathat'
14:27hagnas quite humerous
14:28ibdknoxTimMc: with some more macro magic, you could get rid of the (% :t) necessary
14:32ibdknoxit'd probably be pretty useful
14:35ibdknoxFor those not using Noir, I'd love to hear why not :)
14:38hagnalein compile gave me Exception in thread "main" java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class
14:38technomancyhagna: leiningen from git is not quite ready for consumption; use a stable release.
14:39hagnatechnomancy: ahh ok
14:39hagnaI suppose I ought to delete .lein to get back to a fresh state?
14:40chewbrancaibdknox: I've been using noir for some personal projects and its been working well, clean framework that makes it easy to get stuff done. I would say the biggest issue is mainly just lack of 3rd party libs, especially coming from the rails world, but that will only get better with time
14:40technomancyhagna: probably doesn't matter, but you can try that if you have trouble
14:41ibdknoxchewbranca: yeah, just a matter of people building them :)
14:41hagnatechnomancy: so I was following the instructions that say download lein then do lein self-install
14:41TimMcibdknox: Yeah, definitely looks reasonable.
14:42technomancyhagna: yes, but the instructions point to the stable branch, not master
14:42hagnatechnomancy: do I need a different version of lein or just a different jar in the .lein/self-installs/ directory
14:42hagnaoh oops I copied the link instead
14:43chewbrancaibdknox: one recommendation I have is to maybe add some documentation about how to go from a development noir app to actually running in a production environment. Right now I'm just using git and manually grabbing the latest and then I've got a little shell script that sets some server environment variables
14:43hagnatechnomancy: the link to download one file points to master http://zef.me/2470/building-clojure-projects-with-leiningen
14:44chewbrancawhich works decently well, but I'm not sure how to do things like no downtime deploys and what not, although that could be more related to my inexperience with the java ecosystem
14:44technomancyhagna: you'll do much better if you follow the official documentation rather than some dude's blog from 2 years ago =)
14:44ibdknoxchewbranca: that's not really a noir-level problem
14:45ibdknoxchewbranca: most of the time you should run a server in front of your actual app (nginx probably)
14:45ibdknoxchewbranca: or you could deploy to heroku :)
14:47hagnatechnomancy: oh ok where is that on github?
14:47technomancyclojurebot: leiningen?
14:47clojurebotleiningen is always the easiest way
14:47technomancy...
14:47chewbrancaibdknox: I agree that its not entirely a noir level problem, and I am running behind nginx, but nginx doesn't assist you in doing live deploys, you would want to use something like ha proxy for that
14:47technomancyhagna: yeah
14:47TimMchagna: Google it!
14:47chewbrancaibdknox: but things like dev/production mode in noir I didn't see until I was poking around in the noir src
14:47ibdknoxchewbranca: well, if you have nginx setup as a reverse proxy, you can do hot deploys
14:48ibdknoxchewbranca: just bring up to instaces on different ports, swap the config and restart nginx
14:48ibdknoxtwo*
14:49chewbrancayeah that works ok, I just thought haproxy handles reloading configs better when dealing with live connections
14:49ibdknoxyeah, it will :)
14:50chewbrancaibdknox: anyways, I'm enjoying noir a lot and its working well, just giving my thoughts as someone new to clojure who started using noir as their first clojure web stack
14:50ibdknoxchewbranca: you're right though, a tutorial or some documentation on that would be a good addition. There are a few such things I need to write at some point
14:51ibdknoxchewbranca: I'm glad it's work out :) Thanks for the feedback!
14:52chewbrancaibdknox: no problem, thanks for the great projects!
14:52ibdknoxman my typing is terrible today
14:52pandeiroibdknox: it's the vim you've been vimming man
14:53ibdknoxlol
14:53ibdknoxI think it's the half-asleep bit more than anything heh
14:53pandeirohave you been doing a lot of client-side stuff too lately?
14:54ibdknoxpandeiro: have you been talking to someone from the bay area clojure group? lol
14:54ibdknoxI showed a bunch of stuff last night
14:54pandeiroibdknox: wish i was... i would like to see!
14:55ibdknoxwell enough people hounded me last night that I'll try and put some stuff up this weekend
14:56pandeiroibdknox: i won't hound you... in person
14:56ibdknoxhaha
14:56pandeirocan i ask you one question with a bug i'm having?
14:56pandeirocljs.reader stuff
14:57ibdknoxpandeiro: here's the example code I showed: https://refheap.com/paste/602
14:57ibdknoxsure
14:57pandeirothe cljs reader should be able to process maps with keys that begin with a colon and a number?
15:00technomancyibdknox: doing a little sneak peaking?
15:00technomancy*peeking
15:01pandeirofor serialization purposes i am playing with cljs.reader/read-string and it can't handle such keys... when i try to debug, i come to a function in the same ns called number-literal? that i cannot get to return true...
15:01pandeiroanyway i could just file a bug on jira but i was trying to solve the mystery
15:01ibdknoxtechnomancy: not of the thing I showed you :)
15:02ibdknoxpandeiro: I'm not sure
15:02ibdknoxsounds like a bug
15:03dnolenpandeiro: definitely a bug please open a ticket.
15:03technomancyibdknox: aha. how many did you guys have there?
15:03ibdknoxtechnomancy: 25ish?
15:03technomancynice
15:03pandeirodnolen: will do, sorry i couldn't patch it myself
15:04dnolenpandeiro: reader isn't actually that tricky :) feel to try to patch it at anytime ;)
15:04dnolenfeel free
15:07ibdknoxtechnomancy: that refheap has some new stuff in it actually. I've been working on some state management stuff and there's a little bit of my lazy-store in there too. Basically a map that you can request keys for that get fetched lazily and cached :)
15:08pandeirodnolen: sadly i already did :) ... i can't get cljs.reader/number-literal? to ever return true, and there the trail goes cold for me
15:09technomancyyou mean ... a memoized function? =)
15:09ibdknoxtechnomancy: no, sorry, fetched over the network :)
15:09technomancygotcha
15:09ibdknoxfrom the server to the client
15:09dnolenpandeiro: gotcha, please do put what you've discovered in the ticket
15:17pandeirodnolen: http://dev.clojure.org/jira/browse/CLJS-142
15:18dnolenpandeiro: thx
15:26pjstadighugod: ping
16:00daakuis there some easy way to have code auto reload on file save in a running repl? (one started using `lein repl`)
16:00brehaut(use :reload 'my.namespace)
16:00brehautor (use :reload-all 'my.namespace)
16:00brehautyou could probably steal some of the autoreload stuff from ring
16:01brehautand those should be requires probably
16:01daakubrehaut: i use :reload atm, was wondering if i could somehow trigger that on file save -- the ring stuff for sure -- will look into it
16:01duck1123I have a feeling it would be kind of annoying if your namespace was automatically reloaded on every save
16:02brehautdaaku: https://github.com/mmcgrana/ring/blob/master/ring-devel/src/ring/middleware/reload.clj
16:02brehautdaaku: looks like it depends on an ns-tracker library
16:03brehautdaaku: https://github.com/weavejester/ns-tracker
16:04daakubrehaut: nice, thanks -- that doesn't look terribly difficult to build into my stuff
16:04daakutrigger it via :repl-init
16:04daakuthanks
16:16cemerickLazySeq.withMeta forces the first value in the seq. Anyone know the rationale for that?
16:19technomancydoes the fact that (seq ()) is nil imply that there's no such thing as an empty seq, only an empty list?
16:20dnolen,(lazy-seq)
16:20clojurebot()
16:20cemerickThere are definitely empty seqs.
16:21technomancywhat's the rationale behind getting nil there then?
16:21cemerickI just can't think of why anything meta-related should impact realization.
16:21tomoj'seq' is conflated?
16:21technomancyseems like a bizarre special case just to avoid using clojure.core/empty?
16:22cemerick(seq ()) => nil is just part of the contract.
16:22cemericks/the/seq's
16:22cemerickbut, (not= (seq ()) (lazy-seq ()))
16:22technomancydoesn't make it any less bizarre
16:40cemericktechnomancy: I just realized that your first msg re: seqs had nothing to do with my msg re: meta on lazy seqs. :-P
16:42technomancynot necessarily
17:17simonjConfused as to why the seq returned by this func isn't lazy. https://gist.github.com/1716056
17:23Raynessimonj: What is the type of nodes? (type nodes)
17:24tmciversimonj: my guess is that the call to getLength on nodelist walks the seq
17:24hiredmansimonj: there is optimization on lazy-seqs called chunking that happens
17:24hiredmanrange creates a chunked seq, iterate does not
17:25RaynesThat's what I figured.
17:25Raynessimonj: Your seq is still lazy, but instead of being evaluated one at a time as needed, it is evaluated in chucks of 32 elements.
17:25hiredmancertain operations like for and map respect chunking
17:39muhoodoes korma deal with composite primary keys?
17:40muhooi.e. PRIMARY KEY (foo_id, bar_id, baz_id) , where all 3 are foreign keys referencing another table?
17:44emezesketechnomancy: I'm having trouble finding the docs on what each :dependencies sub-vector can look like
17:44muhoohagna: "droid linux"?
17:44muhoowhat's that?
17:44emezesketechnomancy: I'm probably just bad at google-fu :(
17:44emezesketechnomancy: can you point me in the right direction?
17:45technomancyemezeske: I think it's all in "lein help sample"?
17:45technomancylemme see
17:45technomancyyeah, just :exclusions, :type, and :classifier
17:46emezesketechnomancy: gah, why didn't I look there!?
17:46emezesketechnomancy: thanks
17:46emezesketechnomancy: is it safe to assume that the first entry of the vector is always the symbol describing the jar?
17:46technomancyyep
17:46emezeskecool, thanks!
17:47technomancysure
17:47muhoohiredman: Raynes: also, i remember reading that "do" is an implicit non-lazy, or something like that.
17:48RaynesThat'd surprise me.
17:49amalloyit's not clear what that means, but whatever it is it's nonsense
17:52brehautmuhoo: are you perhaps confusing dorun, doall, and doseq with plain do?
17:53muhoobrehaut: probably, yes. thanks.
17:53brehautmuhoo: do just lets you do a bunch of expressions imperatively; like { } in a c-family language
17:54brehaut(and the return value of a do is the result of the last expression)
17:54muhooah, ok. thanks.
18:07daakufor anyone interested in the repl auto reloading stuff, i made it into a module (uses java 1.7 file watching stuff) -- https://github.com/nshah/auto-reload.clj/blob/master/src/auto_reload/core.clj
18:09aaelonyI've been using R for years with various tools, but the RStudio guys really did a great job providing an ideal IDE experience (Demo video at http://rstudio.org/). Would really nice to see something like that for Clojure as they've done a great job really thinking about how people use R and what they need/use. Worth checking out! :)
18:26ibdknoxmuhoo: it doesn't deal with composite keys implicitly, but you can always do your joins and specify the keys to join on
18:33amalloydoes anyone know what the deal is with org.clojure.contrib/mock? it's got a name that sounds like...half compatible with 1.3, and half old-contrib; i can't figure out where its source is to have a look at it, and the only projects that depend on it seem to be hiccup and clojureql
18:36Scriptoron windows 7, where should should I install the emacs starter kit?
18:36ScriptorI tried putting it in documents and settings but it didn't seem to work
18:36konrNo REPL was launched with clojure-jack-in, which I got from el-get. Must I launch it through a command or something?
18:38technomancykonr: I've seen that in a few cases, but I'm not sure what causes it. I recommend installing via marmalade in any case.
18:38konrtechnomancy: ok! Thanks!
18:45TimMctechnomancy: Here's how I *tried* to do work in a temporary namespace: <https://refheap.com/paste/4f2b029ae4b03b1563d4028f&gt; -- but in-ns inside a let doesn't do anything! How did you solve it in slamhound?
18:45TimMcI was looking, but failed to spot the trick.
18:45technomancydon't you just have to bind *ns* first?
18:46TimMcHuh!
18:46TimMcI'll take a look at that.
18:46TimMctechnomancy: The interesting thing is that it works fine in a 'do form, just not in a 'let.
18:47TimMcWow, is it really just as simple as binding *ns*?
18:48technomancyset! only works on bound vars
18:49TimMcI wasn't using set! at all.
18:49technomancy,(source in-ns)
18:50clojurebotSource not found
18:50technomancy~botsmack
18:50clojurebotclojurebot evades successfully!
18:50TimMc I'll take a look.
18:51TimMcAh, it's a special.
18:53TimMctechnomancy: It's interesting that you use 'remove-ns inside the binding. Looks dangerous!
18:54technomancyslamhound is hell of dangerous
18:54technomancythat's why it's named after an explosive device
18:55TimMcheh
19:00TimMctechnomancy: It's not good enough -- I'm seeing defs from the "outer" namespace from inside.
19:01TimMcI wonder if macro expansion is the problem -- if things are getting namespace-resolved...
19:03ibdknoxTimMc: what are you doing this for?
19:04TimMcibdknox: I'm working with tmciver to bring clojure.contrib.import-static into 2012. I'd like the tests to not pollute each other's namespaces.
19:05ibdknoxah cool
19:06TimMcbut for now I think we might just import stuff and test the test namespace
19:25TimMcSample syntax: (import+ [java.awt Color [geom :rename {Point2D$Double P2D}]])
19:28TimMcI'd like to unify that with static imports, and I'm kind of stuck on the syntax.
19:31aperiodicstatic imports? is that another import+ feature?
19:31TimMchopefully!
19:32TimMcI'd like to be able to say, "I want sin, cos, and PI from java.lang.Math, but PI should be pi"
19:34arohnerTimMc: how would that work? Wouldn't you need to create a clojure fn to wrap the java method?
19:35aperiodicdo you have a static import syntax already?
19:39TimMcaperiodic: Insofar as import-static does. It's not very extensible, and that API will probably be thrown out for 2.0
19:39TimMcarohner: Yep, needs to be wrapped in a hinted fn. I think it will be HotSpot-inlinable!
19:39TimMcarohner: c.c.import-static currently makes macros, which you can't pass around. Terrible.
19:40TimMcI was thinking that (import+ (java.lang (Math :statics {PI pi}))) would be reasonable, until I remembered that you can't distinguish packages from classes of the same name.
19:41TimMcemr, pretend those inner lists were vectors, for clarity ;-)
19:42TimMcI really don't want to give up the sub-package syntax.
19:42aperiodicyeah, that's pretty nice
19:43TimMcThis should be able to simplify the handling of both fuckoff-long package names and classnames.
19:44aperiodicyou mean i won't have to have thirty lines of hadoop class imports?
19:44TimMcHopefully.
19:45TimMcYou can only reduce the problem so much, though.
19:47aperiodicyou say that the above syntax doesn't distinguish packages from classes: is the capitalization distinction for packages and classes just a convention?
19:47TimMcyeah
19:47TimMcAnd I just tried building com.java and com/foo.java in the same space -- it totally worked.
19:48TimMcPackages, classes, methods, and fields all have completely separate "namespaces".
19:51benares_98Would this quicksort require O(n) extra memory allocation? https://refheap.com/paste/610
19:51aperiodicthat all map down to source code representations non-injectively
19:51aperiodicbrilliant
19:51aperiodicis there any way to detect conflict/misuse?
19:51TimMcaperiodic: There *are* no conflicts, just abuses.
19:52TimMcbenares_98: It will consume O(n) stack
19:53TimMcMemory allocation... I'm not even going to try to figure that out.
19:54gfredericks(malloc 10)
19:54TimMchaha
19:54benares_98TimMc: that's what I meant thanks
19:59arohnergfredericks: goto is easy when you have access to the instruction pointer :-)
19:59lynaghkaperiodic, is that you Dan?
20:01TimMcgfredericks: I bet you love first-order continuations.
20:02aperiodiclynaghk: hey kevin!
20:02lynaghkhow's it going?
20:02lynaghksmall internets.
20:03aperiodicno kiddin'
20:03lynaghkAre you finally getting on the Clojure boat then?
20:03arohnerwhere did wall-hack-method go?
20:03aperiodicI've been on the Clojure boat since about June
20:03TimMcarohner: From contrib?
20:03aperiodicfinally starting to get the hang of it now
20:03aperiodici think
20:04lynaghkHave you bitten the bullet and moved over to emacs then?
20:04arohnerTimMc: didn't it get renamed, and possibly moved into cor?
20:04hiredmanarohner: it got renamed to something boring
20:04arohnerhiredman: yeah, I remember that, and now I can't find it
20:04aperiodiclynaghk: nope! vim forever
20:05TimMcaperiodic: I hear vim is pretty good for Clojure, actually.
20:05aperiodicTimMc: I've been meaning to trick it out more. Right now I only have syntax highlighting + tslime.
20:06TimMcaperiodic: And paredit, surely?
20:06lynaghkis there a paredit for vim?
20:06TimMcyep!
20:06aperiodicTimMc: I'll probably just copy Raynes's setup
20:06lynaghkYes, Dan, you need the paredit!
20:06aperiodicTimMc: nope
20:06lynaghktalk to homer right now
20:06aperiodici've been using %
20:06TimMcYou *have* to have it.
20:07gfredericksaugh; I wanted to find out how big this data structure was without vomiting it up on the screen so I said (count (prn data))
20:07TimMcIt's not as fully-featured as Emacs' version, but I wouldn't be able to code in lisps without it.
20:07gfredericksthat was not the way to do it.
20:07TimMchaha
20:07hiredman(ha ha)
20:08TimMcI probably wouldn't even consider moving to vim until paredit.vim supported paredit-convolute-sexp
20:08TimMc(def ha #(% %))
20:08gfredericksTimMc: I was just thinking that
20:09hiredmanearlier today a co-worker and I were doing things with seqs of numbers, and we wanted to save some for local analysis, so (spit some-file some-numbers)
20:09arohnerok, so wallhack got moved to c.c.reflect
20:09arohnerwhich also didn't get promoted
20:09hiredmanand guess what was in the file we scp'ed down the localhost?
20:09hiredman,(.toString (map inc (range 10)))
20:09clojurebot"clojure.lang.LazySeq@c5d38b66"
20:10gfrederickshiredman: wonderful
20:11hiredmanarohner: there is a clojure.reflect now, but I think it only describes classes, no accessing fields or invoking methods
20:13amalloyarohner: https://github.com/flatland/useful/blob/develop/src/useful/java.clj#L28 if you don't need something officially blessed
20:15arohneramalloy: no worries, I still have https://github.com/arohner/clojure-contrib/tree/1.3-compat
20:19hiredmanhttps://github.com/clojure/clojure-contrib/commit/cc4e2ec2bf558f059330ebc97a031d7806a1e364?w=true
20:35daakui'm specifying a module for :repl-init which does things upon being required -- but seems like marginalia includes this module and ends up stuck because my :repl-init logic spawns a thread. not sure what the right fix is here (only start the thread for :repl-init somehow, or detect marginalia?). anyone got any pointers?
20:36TimMcWhy would marginalia do that?
20:37daakuTimMc: to get the vars defined in the ns i assumed?
20:37daakumaybe it's lein doing it.. since i'm running "lein marg" (but then why is lein running :repl-init for "lein marg")
20:38TimMcMaybe the answer lies in the marg plugin. grep for the string "repl".
20:38brehautdaaku: i think marginalia uses its own reader to dig about your code, rather than loading the NSes?
20:38brehaut(it might do both though)
20:40daakugit grep repl in lein-marginalia yields nothing
20:40daakuoh, here's a definitive test -- this happens even without :repl-init defined
20:41daakuso it's marginalia that must be including the ns
20:41daakuor lein-marginalia
20:45tmciverI find that I finally have to learn how to write macros. I have what I think is probably a dumb question: why do I have to quote the if here: ##(list 'if true :true)
20:45lazybot⇒ (if true :true)
20:45tmciver,(list if true :true)
20:45clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: if in this context, compiling:(NO_SOURCE_PATH:0)>
20:47gfrederickstmciver: if you didn't quote it that would mean you were trying to take its value
20:47Null-A,(eval '(if true :true))
20:47clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
20:47TimMctmciver: Because you want the symbol, not its value.
20:47TimMcdammit, gfredericks-sniped
20:47Null-A,(defn fact [n] 3)
20:47clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
20:47TimMctmciver: Leaving aside 'if not resolving to a value at all, itself being a macor or special form.
20:48TimMcNull-A: The SANBOX forbids!
20:48gfredericks,(let [if 12] (list if true :true))
20:48clojurebot(12 true :true)
20:48Null-A,((fn foo [n] (* (foo (dec n)) (foo (- n 2)))) 3)
20:48tmciverooh, nice.
20:48clojurebot#<RuntimeException java.lang.RuntimeException: java.lang.StackOverflowError>
20:48gfredericks^ I'm sure that clears everything up
20:49Null-A,((fn foo [n] (if (= n 1) 1 (* (foo (dec n)) (foo (- n 2))))) 3)
20:49clojurebot#<RuntimeException java.lang.RuntimeException: java.lang.StackOverflowError>
20:49tmciver,(list (symbol if) true :true)
20:49clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: if in this context, compiling:(NO_SOURCE_PATH:0)>
20:49Null-A,((fn foo [n] (if (<= n 1) 1 (* (foo (dec n)) (foo (- n 2)))))
20:49clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
20:49tmciver,(list (symbol "if") true :true)
20:49clojurebot(if true :true)
20:49tmciverGot it! Thanks.
20:49Null-A,((fn foo [n] (if (< n 2) 1 (* (foo (dec n)) (foo (- n 2)))))
20:49clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
20:50Null-A,((fn foo [n] (if (< n 2) 1 (* (foo (dec n)) (foo (- n 2))))) 3)
20:50clojurebot1
20:50Null-A,((fn foo [n] (if (< n 2) 1 (* (foo (dec n)) (foo (- n 2))))) 30)
20:50clojurebot1
20:51gfredericksNull-A: dost thou have thine own repl?
20:51Null-Ano, I develop all my programs here
20:51gfredericksah, carry on then
20:51TimMcNull-A: clojurebot and lazybot support /msg
20:53brehautare we writing fibonaccis with the bots again?
20:55Null-AIt would be like bill gates back in mainframe days
20:56Null-AHe could only afford an ethernet cable and a 5 volt battery
20:57gfredericksone-repl-per-child
20:57TimMcand apparently only one window per IRC server?
20:58TimMctmciver: Did you see my email?
21:02TimMcUgh, I do *not* want an O(n^2) algorithm over a list of 1e4 items.
21:02gfredericksTimMc: so use a O(log n) algorithm duh
21:02TimMcOh!
21:02TimMcThanks, you're a life-saver!
21:03TimMc(I find it amusing that a layperson would not realize that was all a joke.)
21:03gfrederickshaha laypeople are dumb
21:04TimMc>_<
21:04gfredericksTimMc: but I am curious what your algorithm is
21:06TimMcI have a list of image-to-tag records, {:imageID int, :catID int, :tagID int} (where category and tag are a composite key for tags), and a map of {:catID {:tagID set(tagIDs)}} indicating parent relationships.
21:07TimMcI want to end up with a list of image-to-tag records like the first, but with an additional :implicit boolean key indicating whether it was in the original list or added via that map.
21:08TimMc(Actually, those tagIDs are not parents, but *all* ancestors -- I've already computed the transitive closure.)
21:08TimMcI suppose the first step is to group everything by category and merge again at the end.
21:08gfredericksa hash-set doesn't help here?
21:09gfredericksi.e., to check whether things exist yet...
21:09TimMcI'm sure it does, but I haven't figured out the algorithm yet.
21:09gfredericksif I understood what the parent-child relationship meant I might be able to imagine it
21:09gfredericksyou have hierarchical tags?
21:09TimMcyeah
21:09TimMctag DAG
21:09gfredericksokay, I guess that makes sense
21:10gfrederickswait
21:10gfredericksin your second map
21:10gfredericksthe values are always singleton maps with just the :tagID key?
21:10TimMcNo, I forgot the ellipses in both levels.
21:11gfrederickswait what's a category? just a non-leaf tag?
21:11gfredericksit's not a tree? it's a proper DAG?
21:11TimMcThe tag space is partitioned into completely independent categories.
21:12TimMceach of which contains a probably-disconnected DAG of tags.
21:12gfredericksokay, I give up. I need to finish my own algorithm. This doesn't sound very O(n^2)ey though
21:12TimMcProbably ends up being O(n log n).
21:13TimMchttp://gallery.brainonfire.net/view/8b28667c47b2b47b8246e824953389bc is the final result -- categories of tags, with some implicit and some explicit.
21:14amalloygfredericks: a lot classier: "Hast thou thine own repl?" i'm not sure the other one is good grammar, but maybe it is
21:15TimMcdost has!
21:15gfredericksamalloy: it's so frustrating not having a reliable intuition about these things
21:15TimMc<insert lolcat in Shakespearean garb here>
21:15gfredericks#0thworldproblems
21:19amalloygfredericks: "thou" is the second-person informal, whereas "you" is second-person formal. english decided to junk the informal quite a while ago, but if you're talking olde tyme, you want to make sure your verbs conjugate to match the subjects (hast thou, have you)
21:19gfredericksamalloy: this sounds fuzzily familiar
21:22amalloyi guess that doesn't really address the actual issue of putting in a "dost"
21:22amalloybut it's a fun little history lesson all the same
21:24gfredericksquite
21:26gfrederickswhy is that buffer named "*slime-repl nil*"?
21:42gfredericksemacs tabs semicolon comments to the weirdest places...
21:43jodarowhat, like the back of a volkswagen?
21:43TimMcgfredericks: double-semicolon is probably what you want
21:44gfredericksTimMc: I bet I do; so what does single-semicolon function as?
21:44jodaro(i guess that works better with "uncomfortable places")
21:44hiredmangfredericks: that is to warn you are making a mistake
21:44gfredericksoh; single semicolons are accidents?
21:44TimMcRight-column comments, like you see in assembly code.
21:44hiredmangfredericks: for comments on their own like use double semi colons
21:44hiredmansingle semicolons are for comments after a form
21:45gfredericksaah, I see
21:45gfredericksthanks
21:46TimMcIgnore hiredman, follow http://mumble.net/~campbell/scheme/style.txt
21:46TimMcOh, I misinterpreted "after a form".
21:48oakwisejodaro: I chortled
21:48gfredericksRationale: The parentheses grow lonely if their closing brackets are
21:48gfredericks all kept separated and segregated.
21:48gfredericksjodaro: I also appreciated the comment but didn't think of any good way to acknowledge it
21:48TimMcThis is why God invented "LOL", which stands for "Laughing On-Line".
21:49TimMc(not really, it is just punctuation these days)
21:49gfredericksreally?LOL!
21:49gfrederickshuh that kind of looks legible
21:51jodarothanks guys
21:52TimMcgfredericks: MY DEAREST MARIA LOL STORE BURNED DOWN LOL COMING HOME WITHIN WEEK FULL LOL
21:53gfredericks:D
21:53TimMc(I didn't invent that interpretation, but could not find the original.)
21:55gfredericksI suppose he means to eat a large meal before he comes home?
21:55TimMcAre you familiar with "full stop" from telegrams?
21:56gfredericksoh that makes sense of it
21:56gfredericksI was sure that "week full" meant something
21:56TimMcThe original made it clearer.
22:03benares_98Lots of Love
22:03TimMcHaha, yeah.
22:03benares_98"I heard your father died, LOL"
22:19TimMcYesss... expansion takes 75,565 tag-to-image relationships to 148,872.
22:31echo-areaIs there the online video of Mark Volkmann's Clojure STM talk on StrangeLoop 2009?
22:50tutysrahi there
22:51tutysratrying to install clojure-mode for emacs and following the instructions in its site - https://github.com/technomancy/clojure-mode/blob/master/README.md
22:51tutysrastruck at - step 2 (Setting up package.el)
22:52tutysrai didn't had a init.el in my emacs.d dir, so i created a new file and added the contents given to that file
22:52tutysra(require 'package)
22:52tutysra(add-to-list 'package-archives
22:52tutysra '("marmalade" . "http://marmalade-repo.org/packages/&quot;))
22:52tutysra(package-initialize)
22:53tmcivertutysra: you can add that stuff to your .emacs too.
22:53tutysrathen called init.el from my .emacs file as (when (load (expand-file-name "~/.emacs.d/init.el")) (package-initialize))
22:54tutysrai thought init.el was a better place since we have a separate place to put all our initialization stuff (that is what the site recommends anyway)
22:55tutysrai get this error when i start emacs - Symbol's value as variable is void: package-archives
22:55tmcivertutysra: go with that then. I have similar code to what you posted in my .emacs; I didn't have an init.el either.
22:56tmciverI'm sure it works either way.
22:56tutysraok
22:57tutysraadd-to-list 'package-archives - this is the line which gives an error message when put in init.el, have any idea how to fix it?
22:59tmcivertutysra: what error? Is it complaining about 'package-archives?
22:59tutysrayes you are right - Symbol's value as variable is void: package-archives
23:00tmciverMy setup may be a little out-dated but I think you have to call 'package-initialize' (once you've loaded the package.el file).
23:01tmcivertutysra: here is the relevant section of my .emacs: https://refheap.com/paste/613
23:01tutysratmciver: yes, I am doing the package-initialize in .emacs where I have the setup to load package.el
23:03tmcivertutysra: are you using package.el from here: http://bit.ly/pkg-el23
23:03tmcivertutysra: and are you using emacs 23?
23:03tutysratmciver: yes 23.3.1 build
23:04tmcivertutysra: I'm no expert on this stuff, but I know there was a version of package.el that you had to get - not the one that comes with emacs.
23:05tmciverthe declaration of package-archives is only in the package.el at the link above; you need that one.
23:05tutysratmciver: I got that from elpa site - http://tromey.com/elpa/install.html
23:06tmcivertutysra: Yeah, I think that might be the wrong one.
23:07tmcivertutysra: there's a link to the right package.el that you can get to from the link you listed above: https://github.com/technomancy/clojure-mode/blob/master/README.md
23:07tutysratmciver : I tried moving that to my .emacs file, still the same error, so as you guessed something with package.el versions
23:12tutysratmciver : got the package.el from the link you had given, works without issues for the configs in .emacs, i will also try init.el
23:13TimMctmciver: Signing off for the night.
23:14tutysratmciver :thx, it works from init.el as well