#clojure log - Aug 13 2010

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

0:00 notsonerdysunny: hmm.. thx lancepantz

0:01 one more thing .. the maven repository only has version java3d 1.3.1 .. while the current version is 1.5.2 for which I have the jar file .. can I have lein to look at a local directory for some of the dependencies?

0:02 if so ... how could I do that?

0:03 lancepantz: its best practice to find a repo that does have it and add it to your repositories list

0:03 you can always put it on clojars as well

0:04 tomoj: you can install the jar directly into your local maven repository as well

0:04 but that's somewhat bad

0:04 lancepantz: the idea with build tools is that they make your environment repeatable, so another user on another machine can work with it as you do

0:06 notsonerdysunny: I guess I will upload it to the clojars.org.. btw. do the jar files have digital-signature mechanism? that would be nice? I am new to Java-world.. asking purely out of curiosity...

0:06 answering my own question .. it is possible .. http://download.oracle.com/javase/tutorial/security/toolfilex/step3.html

0:07 lancepantz: interesting, wasn't aware of that

2:40 LauJensen: Good morning all

2:52 old_sound: LauJensen: Good afternoon!

3:57 notsonerdysunny: I know this is not the correct forum for it .. but I was wondering if anybody has any comment on using BSD Licensed library in a commercial tool .. before doing any further due-diligence

4:03 naeu: Good morning

4:04 LauJensen: Morning Sam

4:04 naeu: I'm starting to get a bit more settled these days - I'm now living in Cambridge

4:05 and the house finally has no visible boxes of unsorted stuff! Yey!

4:05 LauJensen: Thats a big step :)

4:05 naeu: LauJensen: btw, morning :-)

4:05 What's with the Oracle lawsuit?

4:06 LauJensen: vs Android?

4:06 naeu: yup

4:06 is it against Android's JVM implementation?

4:07 LauJensen: To be honest I dont keep up with most lawsuits between software companies

4:07 naeu: I thought that Sun had open sourced Java prior to Oracle's aquisition of them

4:07 LauJensen: "Oracle has mounted a no-holds-barred legal attack on Google's Android operating system in a lawsuit that accuses the internet giant of deliberately infringing patents and copyrights Oracle holds for the Java platform."

4:07 naeu: Me neither, I'm just concerned of the repercussions

4:08 i.e. what does it mean to people developing with Java?

4:08 LauJensen: "Without consent, authorization, approval, or license, Google knowingly, willingly, and unlawfully copied, prepared, published, and distributed Oracle America's copyrighted work, portions thereof, or derivative works and continues to do so," Oracle attorneys, which include renowned litigator David Boies, wrote. "Google's Android infringes Oracle America's copyrights in Java and Google is not licensed to do so."

4:08 "The complaint asserts seven patents to various technologies associated with Java, in addition to copyrighted code, documentation, specifications, libraries, and other materials that comprise the platform"

4:08 naeu: yeah, I've read a bunch of articles - they all essentially say the same thing. However, none of them say what it might *mean*

4:09 LauJensen: "Attorneys said the intellectual property is infringed by various Java applications that make up the Android stack..."

4:09 As I see it, its not the JVM its the software stack they released with it

4:09 vIkSiT: jeezus

4:09 they filed THAT?

4:10 LauJensen: Oh - Looks like they might also think that they have a patent on 'Just in time compilation', which is their complaint against dalvik

4:10 naeu: exactly

4:10 LauJensen: The patents in the case are 6,125,447, "Protection domains to provide security in a computer system"; 5,966,702, "Controlling access to a resource"; 5,966,702, "Method and apparatus for pre-processing and packaging class files"; 7,426,720, "System and method for dynamic preloading of classes through memory space cloning of a master runtime system process"; RE38,104, "Method and apparatus for resolving data references in generated code";

4:10 6,910,205, "Interpreting functions utilizing a hybrid of virtual and native machine instructions"; and 6,061,520, "Method and system for performing static initialization."

4:11 naeu: I'm just concerned whether there may be any repercussions to Clojure's implementation.

4:11 LauJensen: Just look at the first one, incredibly how you can get a patent on something so broad

4:11 eevar_: so 30% of us will be shooting for haskell now then, with Java dying?

4:11 hoeck: LauJensen: this is just the abstract, they are always broad

4:12 LauJensen: the really interesting stuff lies in the patents claims

4:12 LauJensen: naeu: Yea I dont know. I think in a way capitalism has now brought us into a position where big corporations make their own laws. If you get sued, they can run you out of business long before you ever get into court, so the only thing which matters is not getting sued

4:12 eevar_: Naah, I think I'll just go with OpenJDK :)

4:13 eevar_: hmm.. seems it's only 29%

4:13 29% of people in the Clojure community would move to Haskell if Clojure disappeared, according to the State of Clojure survey.

4:13 naeu: LauJensen: yeah, that's the scary thing. Maybe we should all move to New Zealand?

4:13 LauJensen: What good would that do ?

4:13 Have you guys seen that movie 'Food inc' which is available on youtube ?

4:13 eevar_: LauJensen: running windows then, as you're not already using openjdk?

4:13 hoeck: what about hosting all software in nz?

4:14 LauJensen: eevar_: I run Arch Linux, and I dont use OpenJDK because its buggy

4:14 naeu: http://www.google.co.uk/search?hl=en&client=safari&rls=en&q=New+Zealand+software+patent&aq=f&aqi=g-c1&aql=&oq=&gs_rfai=

4:14 arbscht: hoeck: our international connectivity probably could not support it :)

4:14 LauJensen: naeu: wow, thats uplifting

4:15 naeu: indeed :-)

4:15 arbscht: but hey, if you all want to move here, you're welcome -- we could use a more active clojure community

4:16 hoeck: arbscht: I'm wondering wether it would then be illegal in europe to use european patented software running in nz

4:16 naeu: arbscht: I have a bunch of friends over there - they really recommend it. They're all living the god life.

4:16 eevar_: probably a better idea to get rid of software patents

4:16 naeu: s/god/good/

4:16 sexpbot: arbscht: I have a bunch of friends over there - they really recommend it. They're all living the good life.

4:16 hoeck: eevar_: right

4:16 LauJensen: Anyway, in Food Inc many farmers get sued completely unrightfully by this company Monsanto. First Monsanto won a came, making it illegal for farmers to keep their own seeds, so they must buy them from certain vendors, most of which are owned directly by Monsanto. Then secondly they aren't allowed to clean their own seeds to ensure that they dont break any patents, and anybody who's tried to clean their own seeds have been sued, and have

4:16 been bankrupt before they even reached court - So, he who has the most money wins

4:17 eevar_: question is how, when our political systems are crooked as hell

4:17 naeu: That's crazy scary.

4:18 LauJensen: I'll recommend you guys to watch all 10 parts http://www.youtube.com/watch?v=rCyGLQ_Iod4

4:19 eevar_: it's not just the food industry

4:19 LauJensen: No I think its everything in America - We dont quite have that situation in Europe yet I think

4:23 eevar_: well, the eu is pushing that data retention directive, for instance

4:24 hoeck: yet, but who knows, its said that europe lags behind the us by 10yrs or so

4:24 LauJensen: Yea, and capitalism is capitalism - The rich will always win in the end

4:25 esj: yup, more money => more power to get more money

4:25 in engineering we call that positive feedback and recognise that its unstable

4:26 woulda thunk politics and social science would have figured it by now

4:26 LauJensen: esj: well, guess who's paying them? :)

4:26 vIkSiT: hmm. So if I have a function say f, and I do a (def v (f ..)) - and assuming f takes a long time to run

4:27 esj: LauJensen: on your food lobby - I love this chart: http://blogs.alternet.org/speakeasy/2010/03/11/shocking-graphic-reveals-why-a-big-mac-costs-less-than-a-salad/

4:27 LauJensen: vIkSiT: then Oracle will sue you

4:27 vIkSiT: on the REPL, the next prompt only appears after f finishes executing..

4:27 but in a code window - when executing that line using CxCe - how do you know when it finishes?

4:27 LauJensen, :P

4:27 LauJensen: Yea esj, subsidies are putting everything on its head

4:28 vIkSiT: You get feedback in the minibuffer once it returns

4:28 esj: especially as SCOTUS just ruled that companies spending money is the equivalent of their free speech

4:28 vIkSiT: LauJensen, indeed. I mean - how do you know its still running? (because i can type all over the place and that feedback may be missed)

4:28 LauJensen: esj: I also heard, that walking 20 miles is more expensive than driving 20 miles in your car, IF the energy in your body comes from eating meat

4:28 esj: LauJensen: that's hilarious, I'll check it out.

4:28 LauJensen: vIkSiT: If you dont generate any other type of output, then you cant

4:28 naeu: LauJensen: damn, that's another scary fact.

4:29 vIkSiT: LauJensen, sigh.

4:29 notsonerdysunny: ~seen angerman

4:29 clojurebot: no, I have not seen angerman

4:29 esj: aaaaanyway... I need coffee. later.

4:29 notsonerdysunny: who angerman

4:29 naeu: Although perhaps that's only in the states where the price of petrol/gas is crazy cheap

4:29 although the price of meat is crazy cheap there too...

4:31 * naeu is happily vegetarian

4:31 vIkSiT: btw, does anyone have recommendations on a way to create bigrams out of a particular piece of text?

4:31 i currently made this : https://gist.github.com/f19624d36362ed654c45

4:31 but any improvements would be welcome

4:31 (this seems to be my bottleneck function over large pieces of text)

4:31 LauJensen: naeu: beef costs more than berries in Denmark

4:32 (or I should say 'some beefs' 'some berries', I dont have the prices in front of me)

4:32 naeu: LauJensen: I don't just eat berries - I eat carrots too...

4:32 LauJensen: oh?

4:32 naeu: and lettuce when I'm feeling special

4:33 notsonerdysunny: ~seen angerman

4:33 clojurebot: no, I have not seen angerman

4:33 LauJensen: Yea, I was just trying to tell you that we have those subsidies in Denmark too, where the governement pays half of your beef and diary, but if you want to eat healthy you on your own

4:35 eevar_: LauJensen: meh. what's unhealthy about beef or diary?

4:35 naeu: LauJensen: it's always been the case in the UK that healthy food is way more expensive than unhealthy food

4:36 eevar_: i agree that all subsidies are evil, tho

4:36 naeu: eevar_: except for bike subsidies. People should definitely cycle more and drive less...

4:37 LauJensen: eevar_: Colesterol kills you after a few decades of it. Colesterol in your arteries block the flow of blood and oxygen. When the situations becomes too severe in your heart, you get a heart attack, in your brain, you get a stroke. But in the rest of your body it provides a very cancer friendly environment. Thats why all meat eating nations have Heart desiease and cancer as their 2 biggest killers, and in non meat eating countries they

4:37 dont. A glass of milk contains the same amount of colesterol as 21 slices of bacon. So, they are very bad for your health.

4:38 Secondarily, eating meat fills you with a lot of medicine from the animals as well as their sicknesses. In men this produces abnormally high levels of testosterone, and in girls it means that they start their period about 5 years earlier than vegetarian girls, giving them incrased risk of many kinds of sicknesses

4:38 eevar_: LauJensen: well, countries where people can't afford meat probably have a shorter life expectancy

4:38 and less overweight?

4:39 LauJensen: eevar_: Yes, but for different reasons.

4:39 You can still live a very unhealthy life while eating healthy. But in the mid 1800's, no medical book handled the topic of heart decease, and cancer was a sickness which only affected rich people - look how times have changed

4:39 eevar_: that's what i'm saying. people die off before they'd get cancer and develop heart conditions

4:40 naeu: I wouldn't ever try and convince someone to become vegetarian, but I would encourage people to think about what they eat and where their food comes from. Which usually results in people eating less yet better quality meat.

4:40 LauJensen: eevar_: Not so - Consider turkey, they have about the same life expentancy as Denmark, but they have virtually no cancer compared to us

4:41 In times past, it used to be that people seriously had to worry about cancer when they turned 50, but nowadays its not uncommon for people below the age of 30 to get hit

4:41 So yea, for many many reasons and more than I will list here, I will also try to pursuade people to give up meats (especially from the industry) :)

4:41 s/also/always/

4:41 sexpbot: So yea, for many many reasons and more than I will list here, I will always try to pursuade people to give up meats (especially from the industry) :)

4:42 eevar_: and you have conclusive evidencd that it's actually _meat and dairy_ causing it..?

4:42 Folcon: Hey Everyone, does anyone have any experience with fnparse?

4:43 LauJensen: eevar_: Yes there are many studies which show that 'colesterol' is causing this, and you find that only in animal food

4:43 eevar_: there are also studies that claim cholesterol isn't harmful on it's own, it's being fat that's the killer

4:43 arbscht: Folcon: someone probably does. ask your question anyway

4:44 LauJensen: eevar_: Yea, so its a matter of reading the material intelligently, and perhaps experimenting a bit. I became vegaterian basically overnight and the effects on my body and especially immune system have been very tangible

4:47 Folcon: Well basically I'm trying to work out how to get it to parse rules...

4:54 Even trying to evaluate the example code (http://github.com/joshua-choi/fnparse/blob/3.%CE%B1.3/src/edu/arizona/fnparse/math.clj) is giving me Assert failed: (every? rule? rules). So I'm a little lost as to how to proceed. Quite a few people have said good things about this library so clearly I'm doing something wrong..

5:08 cais2002: does anybody know why after git clone of the clojure project, there are files under src/jvm that are "Changed but not updated"?

5:18 Chousuke: cais2002: on windows?

5:18 cais2002: chousuke: yes, is it a known issue?

5:18 Chousuke: cais2002: your git is probably messing with the newline characters

5:19 there's some setting to turn it off but I don't remember which one :/

5:19 cais2002: chousuke: ok, let me figure it out

5:19 Chousuke: ah, yeah, core.autocrlf

5:20 Folcon: cais2002: git config --global core.autocrlf true

5:20 Chousuke: true? isn't it supposed to be off?

5:21 Folcon: it tells it to convert, false tells it not to...

5:21 wait let me find a doc

5:21 http://help.github.com/dealing-with-lineendings/

5:21 Chousuke: right, you don't want to do any conversion

5:22 you want the files to be as they are in the repository.

5:22 any worthwhile editor on windows will handle unix line endings just fine

5:35 cais2002: Folcon: it works now.

5:43 Folcon: cais2002: Great!

5:49 cais2002: I am still encountering the stackoverflow problem if I use master-snapshot or RC3, no problem for beta1. http://pastebin.com/p4Ec0y01

5:49 any hint?

6:08 looks like the problem is gone after configuring -Xms256m -Xms512m .. but it seems to be a potential bug

6:10 LauJensen: cais2002: How do you replicate the problem ?

6:12 cais2002: LauJensen: I repeatedly encounter it when running my code. I will see if I could locate the portion of code that triggers the problem

6:12 LauJensen: The code is what matters. If you are putting a lot of stuff on the stack, then it should blow if it exceeds the Xms param

6:12 sorry, Xmx

6:14 bozhidar: LauJensen: you probably mean the heap, not the stack

6:14 LauJensen: Yes, indeed

6:19 cais2002: LauJensen: that's what I think, too. I hope the Keyword.intern method would have some way to detect that.. it seems possible to have infinite loop from that implementation, if memory is not enough and the softreference put into the table is always gone..

6:58 old_sound: Hi

9:26 lpetit: hi there

9:33 LauJensen: lpetit: hi

9:42 stuartsierra: Hello, World.

9:44 AWizzArd: Hi Stuart.

9:46 arkh: Is there a major difference between (send-off an-agent #'a-function) and (send-off an-agent a-function) ?

9:46 chouser: no

9:46 arkh: k

9:46 stuartsierra: arkh: #'a-function is the Var

9:46 a-function is the value of that Var at the time you call send-off

9:46 chouser: the former is in some older examples from when there was a major difference

9:47 arkh: ah - ok

9:47 stuartsierra: chouser: what was the difference?

9:48 chouser: stuartsierra: I think the Var's value was resolved earlier or something. I'm going on what I recall of rhickey's answer when I asked him the same thing.

9:48 stuartsierra: Theoretically, if the binding of the Var #'a-function changes between the time you call send-off and the time the action executes, using the Var #'a-function will allow the agent to see the most recent binding.

9:49 chouser: hm, good point

9:49 arkh: I saw the syntax on rich's ant.clj (which I know was written a while ago)

9:49 chouser: arkh: yeah, I think that's the only place I've seen it.

9:49 stuartsierra: somebody should really update that

9:49 it keeps popping up

9:50 cemerick: whoa, the old crowd is almost all here. :-)

9:51 arkh: stuartsierra: why would #'a-function resolve to the latest binding and a-function wouldn't necessarily?

9:52 hugod: Hi, I raised #424 yesterday - instance? fails (incorrect result) on a deftype instance, depending on how namespaces are loaded - could someone confirm I've not missed anything, and that this is not a known issue

9:52 stuartsierra: arkh: a-function will resolve at the time you called send-off

9:52 arkh: stuartsierra: ohhh ... that makes sense then

9:53 chouser: http://clojure-log.n01se.net/date/2008-11-23.html#10:39c

9:54 the same day he said "I'm thinking of renaming ns to defnamespace"

9:54 naeu: so does anyone have any advice on how to update a lib using instance-case to be 1.2 compatible?

9:55 chouser: what's instance-case?

9:55 hadronzoo: hello, I'm having a hard time getting clojure to recognize clojure-contrib. If I (:require clojure.contrib.math), I get a java.lang.ClassNotFoundException: clojure.contrib.math (NO_SOURCE_FILE:1) exception. clojure-contrib.jar is in my $CLASSPATH.

9:55 stuartsierra: hadronzoo: are you setting the classpath on the java command line as well? That overrides $CLASSPAH

9:56 naeu: chouser: seems like a macro built around the old clojure-contrib fcase which determines whether the conditional variable is one of a selection of classes

9:56 however, using clojure.contrib fcase throws up a bunch of namespace override warnings which I'm trying to remove

9:56 hadronzoo: stuartsierra: I'm executing clojure with "java jline.ConsoleRunner clojure.main"

9:57 stuartsierra: hadronzoo: you need to quote arguments to "require"

9:58 naeu: it's currently used like this: (map #(instance-case %1 Integer "i" Long "h" Float "f") args)

9:59 hmm, actually the name fcase is slightly misleading as I assumed it had similar performance properties to case, but it seems that it just uses cond internally

9:59 I guess I could just use that directly :-)

9:59 hadronzoo: stuartsierra: you mean "(require 'clojure.contrib.math)"?

9:59 stuartsierra: naeu: fcase has been superseded by clojure.core/case

9:59 hadronzoo: yes

10:00 Functions require/use/refer: quote arguments. NS declarations :require, :use, :refer: don't quote.

10:00 naeu: stuartsierra: how would I replicate the behaviour of instance-case with the new clojure.core/case

10:00 hadronzoo: stuartsierra: that returns nil, but clojure is still unable to resolve the expt symbol

10:01 stuartsierra: hadronzoo: "require" only loads the namespace; if you also want to refer the symbols in it, use "use"

10:01 naeu: dunno, never saw instance-case

10:02 polypus: is it possible to embed a jar in a lein project such that dependent projects automatically have that jar on their classpath?

10:02 rhickey: everyone humming on RC3?

10:03 AWizzArd: Is RC3 what I can download from build.clojure.org?

10:03 hadronzoo: stuartsierra: it worked! thanks. I wasn't understanding the clojure namespace system (I'm used to CL packages)

10:03 stuartsierra: AWizzArd: RC3 is available on build.clojure.org, as release "1.2.0-RC3"

10:04 AWizzArd: stuartsierra: thanks, will test it then

10:06 lpetit: chouser: defns would make sense. But what about in-ns which also creates an empty ns then ?

10:06 :)

10:09 naeu: my first attempt was the following: (defn a [y] (case (class y) Integer "int" String "stringy"))

10:09 however, it doesn't seem to match Integer with the class java.lang.Integer

10:12 rhickey: stuartsierra: is that visible through the Hudson interface?

10:13 stuartsierra: rhickey: not that I know of

10:14 Hudson only does CI, not repository management

10:14 w00t! contrib "modules" branch builds all the way through!

10:27 slyrus: hmm... I've made it this far without any reference types for chemiclj... hope I don't have to start here.

10:57 polypus: is it possible to embed a jar in a lein project such that dependent

10:57 projects automatically have that jar on their classpath?

11:01 ihodes: yes-the lib/ dir

11:02 stuartsierra: polypus: only if it's declared as a dependency

11:09 polypus: what i mean is, in project P i'd like to have some jar J, and in project Q i have :dependencies [[P "1.0"]] and in Q/src/foo.clj i'd like to write (import 'some.class.in.j.Klass) and have it just work

11:09 stuartsierra: dependencies are transitive

11:10 but P must declare J as a dependency

11:10 it can't just be a jar file that you stick in the lib/ dir

11:14 polypus: stuartsierra: but if P declares J as a dependency then J isn't packaged in P right. which is what i'd like to do

11:15 stuartsierra: you can't package a jar inside another jar in normal Java land.

11:15 Only classloader tricks make that possible.

11:15 polypus: ahh, ok ty, still somewhat of a javaland noob

11:16 stuartsierra: polypus: what "lein uberjar" does is expand all the jars of your dependencies and merge them into one big jar.

11:16 The maven assembly plugin does the same thing.

11:17 polypus: ok, that was also part of my confusion

11:17 thanks

11:17 stuartsierra: Some deployment environments, such as Java EE or Servlet containers, permit you to have a lib/ directory inside your jar, containing other jars.

11:18 polypus: so i could make a lein project with a jar in the lib folder and then do lein uberjar to make all classes of the embedded jar available to dependents

11:20 stuartsierra: no

11:20 cemerick: polypus: uberjars are only intended for final deployment, not for re-use

11:20 (not that that's stopped a lot of people from using them that way)

11:20 :-(

11:20 polypus: cmerick: that's what i intend to do. just use it to generate a pom basically

11:22 cemerick: polypus: Not sure how to grok that. None of this has much to do with pom generation.

11:26 polypus: i've got this java jar that isn't on any maven repo. i have two lein projects that depend on this jar (a clojure/jafafx bridge, and a lein plugin for compiling javafx). i'd like to release them without embedding the java jar in both projects, but to have the jar as a dependency in both. i was just trying to figure out, if i could use lein to make my life simpler in deploying the java jar to clojars

11:26 stuartsierra: It must be in a repo.

11:26 Even if that repo is clojars.

11:26 cemerick: polypus: You need to get the jar into a repo as stuartsierra.

11:27 Is using clojars as a de facto fallback repo recommended at this point?

11:28 danlarkin: what's the other choice? maven central?

11:28 stuartsierra: danlarkin: host your own!

11:28 cemerick: danlarkin: or host your own.

11:28 stuartsierra: like me!

11:28 danlarkin: oy

11:29 host your own X < let someone else do it

11:29 stuartsierra: http://stuartsierra.com/2009/09/08/run-your-own-maven-repository

11:29 step 3: profit!

11:29 cemerick: danlarkin: clojars is a swamp in part because people use it as a personal scratch space.

11:30 danlarkin: cemerick: yes that's true, but it doesn't prevent it from being a useful maven repo

11:31 ie. I don't care what's on it, as long as it has the libs I'm looking for

11:31 cemerick: danlarkin: yes, yes it does. Reminds me of the open FTP servers I used to find circa 1995.

11:31 stuartsierra: porn and malware?

11:31 danlarkin: why does it matter?

11:32 cemerick: stuartsierra: That would make it more interesting, anyway. ;-)

11:33 danlarkin: because conventions, provenance, and discoverability matters.

11:33 s/matters/matter

11:33 stuartsierra: some plans in the works on that front...here at Clojure/core

11:34 cemerick: stuartsierra: indeed, I heard a rumor. Good news, that.

11:34 danlarkin: cemerick: maybe I use it differently than you. I don't go browsing clojars, just add dependencies and if "lein deps" gets them then I know it worked

11:35 cemerick: danlarkin: That's how one *should* be able to use a repo. That's exactly how people use central and java.net and apache repos, in fact.

11:36 lrenn: I'm writing a leiningen plugin and plugins.md says "Note that Leiningen is an implied dependency of all plugins". However, I can't lein compile it unless I do add it as a dependency.

11:38 danlarkin: cemerick: maybe I'm just dealing with blub habits then, I look forward to SS improving things for us all

11:39 stuartsierra: It's actually @dliebke's project

11:39 I just complain. :)

11:42 polypus: lrenn: it's because it's an implied dependency when you run the lein command, but not within the leiningen project of the plugin itself

11:43 i.e. you don't have to worry about lein being on the classpath when your users run your plugin, but you do at compile time locally

11:44 lrenn: polypus: that's what i figured. Many thanks.

11:44 polypus: np

11:46 arohner: danlarkin: sonatype nexus is OSS and free and easy to setup

11:47 danlarkin: arohner: that may be the case, but surely you see the value in a "community" repo

11:47 arohner: danlarkin: of course. clojars does that, for OSS code

11:48 danlarkin: ah, I see

11:49 lrenn: polypus: so if i want lein jar to work, i should add leiningen as a dev dependency?

11:51 polypus: lrenn: yeah. just curious though, what are you compiling?

11:52 lrenn: polypus: it's a plugin that pulls dependency for leiningen using ivy instead of maven, can publish as well.

11:53 polypus: if i add leiningen/leiningen 1.3.0-SNAPSHOT I get a org.apache.maven:super-pom:jar:2.0 as missing.

11:57 polypus: lrenn: probably your best bet is to git clone leiningen and then in there do a lein install. i'm not sure that 1.3.0 is on a maven repo

12:00 lrenn: polypus: ah, that worked. thanks again.

12:00 polypus: np

12:03 lrenn: is it absolutely necessary for you to be compiling btw?

12:05 lrenn: polypus: no. This is something I had done a long time ago and I just wanted to see if it would still compile.

12:05 polypus: i guess when you specify namespaces in your project.clj lein jar automatically compiles?

12:06 polypus: lrenn: not sure what you mean

12:07 lrenn: lrenn: when i didn't list leiningen as a dependency, lein jar would throw class not founds. but no, i don't need to compile.

12:08 polypus: cuz if you can get away w/o compiling you should go that route, but you probably already know that

12:10 arkh: for a java.net.DatagramSocket receive, does anybody know if receive blocks until it fills it's buffer? The behavior I want is "packet received -> handle the packet's data"

12:11 lrenn: polypus: yeah, this won't ever be distributed though. It was just something I was fooling around with at one point and wanted to see if it still works.

12:12 polypus: cool

12:39 arkh: to answer my own question, it appears to have the behavior I want, which is receive a packet then make it immediately available, even if the data received doesn't fill the buffer. Unfortunately, my program still doesn't work ; )

13:40 craigmarshall9: Hi - how do I run a clojure script from the windows command prompt? e.g. "python myscript.py"

13:40 Is there something I have to add to my PATH variable, for example?

13:41 wooby: craigmarshall9: a small batch file will do the trick, see http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started#Create_clj_Script

13:43 craigmarshall9: wooby: Yes - I've just found that, I just wondered if that was out of date and there was an easier way. I guess not!

13:43 wooby: thanks though

13:44 wooby: craigmarshall9: no worries, glad to help

13:50 craigmarshall9: another alternative is cljr: http://github.com/liebke/cljr

13:50 after installing you can do 'cljr run myscript.clj', or get a repl with 'cljr repl'

13:50 craigmarshall9: Does anyone know if there any plane to make an installer for clojure? It would be nice to have path variables set, clojure.jar installed into "Program Files" or "/usr/share" for example, and to be able to dive right in and type "clojure myscript.clj"

13:51 wooby: forget about the batch script solution, cljr is what you want :)

13:51 craigmarshall9: wooby: do you mean rather than typing code into a file, type/edit it into the repl?

13:52 I thought that was only for running small snippets of code, rather than building up a program..

13:54 wooby: craigmarshall9: well, it is, for building up a program it's probably better to use an ide like netbeans/eclipse/emacs combined with maven or leiningen

13:54 arkh: craigmarshall9: the repl can be great to build up code but I think it's usually paired up with an editor or IDE

13:54 ... what wooby said ;)

13:55 wooby: craigmarshall9: cljr is a really great place to start playing and learning though, if that's where you're at

13:55 craigmarshall9: I'm just used to python, php, c, etc. Where it's a case of writing a file, running the file. I know python has the shell that you can type into and see results, but I've never found it that useful.

13:55 How do I save from the clojure repl to a file, for example?

13:56 Yes - just at the playing/learning part. I'm at project euler level 1, at the moment.

13:56 arkh: craigmarshall9: fwiw, ipython is a great example of an interactive shell / environment for writing python.

13:57 craigmarshall9: arkh: Yes - I've heard people rave about those, but they've never taken with me. Perhaps I'm just not trying hard enough

13:59 arkh: craigmarshall9: it can be a style thing, too. I have yet to work with emacs much in clojure and emacs is the most commonly used editor/IDE by other clojure users

13:59 dnolen: craigmarshall9: the python shell is weak compared to a good lisp REPL. you would be missing out on one of the more interesting aspects of Lisp development. Lisp is really about about redefining definitions as you work, even if the program is actually running.

14:00 jfields: how do you guys do named params for your functions?

14:00 dnolen: craigmarshal9: one issue with cljr is JVM boot time for every command. You might find cake more friendly, you only pay for boot time once. You can run scripts quickly with cake run.

14:00 jfields: fogus posted something as the first comment on my blog, but it doesn't work in clojure 1.1, maybe it works in 1.2?

14:00 http://blog.jayfields.com/2010/07/clojure-destructuring.html?showComment=1280233618538#c8205576450346352559

14:00 dnolen: jfields: yeah you need to be on 1.2.0 for the nice syntax.

14:01 jfields: ah, gotcha, thanks.

14:02 dnolen: craigmarshall: cake also means you can stick to yr favorite plain text editor w/o losing your mind or installing a 150mb Java IDE, or learning Emacs (which what I use actually)

14:04 craigmarshall9: I just guess it's my way of writing code, but I skip back and forwards over several lines of code editing until it makes sense, then I try to run it and refine until it does what I want. If I had to do that in a REPL, I'd forever be pressing up, and editing the lines (in a horrible MS-DOS environment on this machine), then when I finally got it right, I'd have no way of saving it... It just doesn't sound appealing!

14:04 Not heard of or tried cake yet, I will do so.

14:05 I'd love to see over your shoulder to see your workflow (any of you)

14:05 dnolen: craigmarshall: In a good Lisp environment you edit regular source files and can send expressions close to the cursor to the REPL. This is very unlike Python shells.

14:05 craigmarshall9: dnolen: okay, that sounds a little bit more magical than what I've tried so far.

14:06 And it can run the stuff that came beforehand, so it has the right "context"?

14:06 dnolen: craigmarshall9: magical is right :)

14:06 ninjudd: craigmarshall9: cake should work on windows too. even command-line history and tab-completion: http://wiki.github.com/ninjudd/cake/cake-on-windows

14:07 craigmarshall9: ninjudd: thanks - will take a loko

14:07 look*

14:07 dnolen: craigmarshall9: In Emacs or Netbeans or whatever you generally load the file, which compile it, then you add some stuff. No need to recompile the whole file, just send new definitions as you write them. In anycase this is a style preference. You can work with the edit file, run style if you want.

14:07 s/which compile it/which compiles it

14:09 craigmarshall9: dnolen: Okay - that sounds more palateable. Clojure/lisp is just so different from everything I've done and seen so far, I just feel like I need to keep *some* things similar (for now at least), or I just won't be able to get into it. It's a shame the clojure zip file didn't have something to help people run their code.

14:12 dnolen: craigmarshall9: sure start simple. It would be nice to have a simple script but cross platform executable scripts are anything but simple. Early days yet.

14:13 arkh: craigmarshall9: I've thought so too. The good news is different people have made a lot of great tools. The bad news is it can be difficult to learn about them. I didn't know about cake until dnolen just mentioned it (and it looks nice). I'm guessing as clojure gets older, more things will be incorporated or there will be more documentation.

14:13 dnolen: craigmarshall: also without some like Cake or Nailgun, simple scripting can be painful. And I don't see Clojure relying on either anytime soon.

14:14 s/some/something

14:14 ninjudd: dnolen: yeah, it would be nice if some kind of persistent jvm support was built in to Java

14:15 craigmarshall9: dnolen: Well, you say early days, but I tried learning clojure nearly 2 years ago (and gave up/failed), and it was actually you that helped me out on the mailing list back then (thanks!): http://groups.google.com/group/clojure/browse_thread/thread/69cf1b57dce8d4e4 - I'm still no farther ahead

14:15 ninjudd: i'm sure it's an issue in JRuby and Scala too

14:16 craigmarshall9: I can't remember how I ran scripts then, must have done the batch file thing.

14:16 dnolen: craigmarshall9: ha! :) well quite a fews have improved. I recommend cake as long you don't mind installing Ruby.

14:16 s/fews/few things

14:16 Raynes: Things were a lot different 2 years ago.

14:17 craigmarshall9: Raynes: I still can't run an installer and execute a script :/

14:17 (I don't want to sound ungrateful of course)

14:17 * Raynes doesn't really understand what one would "install" for Clojure.

14:17 Raynes: I guess startup scripts.

14:18 dnolen: craigmarshall9: gem install cake, cake eval '(println "Hello world!")'

14:18 craigmarshall9: dnolen: going to do that now, it's probably exactly what I'm looking for

14:18 Raynes: It seems like installers wouldn't do much but make people feel better, because cake pretty much does that sort of stuff, but just isn't in Clojure.

14:19 craigmarshall9: dnolen: No - don't mind installing Ruby, I played with ruby on rails a few years ago and had some fun

14:21 arkh: are rlwrap and jline interchangeable? Specifically wrt cake?

14:21 ninjudd: arkh: cake doesn't use either

14:21 craigmarshall9: Raynes: I don't mind doing it (doing it now), but t's a bit odd to have to install a different language and a relatively unheard of extra to be able to run code from a source file. You don't have to do this for Python, Ruby, Perl, probably a lot of others - I know clojure is quite different, but still..

14:21 arkh: ninjudd: because it's in ruby?

14:22 dnolen: craigmarshall9: uh, Ruby and Python, Perl are 15-20 years old ;)

14:22 ninjudd: arkh: right, it uses Ruby bindings to the c readline libraries (or libedit on mac)

14:22 craigmarshall9: dnolen: Then don't they have some things to offer, since they're still going strong? :-)

14:22 Raynes: If it didn't use Ruby, it would have to use bash and other stuff on other platforms which would be a nightmare. It obviously can't use Clojure.

14:22 ninjudd: and perhaps some other readline implementation on windows

14:23 dnolen: craigmarshall9: of course, very good getting started story. After that all bets are off ;)

14:23 Raynes: Either way, you'd have to use a different "language". Even if Clojure included startup scripts in bash and bat.

14:23 dnolen: j/k, I enjoy and work with Ruby, Python. Perl I'm ignorant of.

14:23 arkh: ninjudd: is there a way to get keybindings for editing with it? (e.g. vim or emacs)

14:23 Raynes: Perl 6 looks interesting.

14:23 craigmarshall9: dnolen: Even if they are no good after getting started, there are billions of people that are used to that way of working, and you might entice them in if it were more approachable. They could then be improving clojure for everyone.

14:24 ninjudd: arkh: it supports most emacs keybindings. i don't think there is a way to use vim bindings, but i'm not certain

14:24 arkh: ninjudd: ok - thank you

14:24 Raynes: I don't think that billions of people are programmers.

14:24 >_>

14:24 craigmarshall9: dnolen: lots would say you're better off that way (ignorant of perl)

14:24 Raynes: hyperbole. I mean lots.

14:25 dnolen: craigmarshall9: people have been improving the friendliness of Clojure, it's come a long way. Of course there's room for improvement, and improve it will. it's a process.

14:25 ninjudd: arkh: maybe editing ~/.inputrc would work

14:26 craigmarshall9: dnolen: Okay - that's great to hear. I think I'll love it, I bought the programming clojure ebook when it was in beta, and would love to use it for web development, but I am an impatient ass.

14:26 ninjudd: arkh: try http://snippets.dzone.com/posts/show/1990

14:27 dnolen: craigmarshall9: http://mmcgrana.github.com/2010/03/clojure-web-development-ring.html

14:27 and http://mmcgrana.github.com/2010/07/develop-deploy-clojure-web-applications.html

14:27 arkh: ninjudd: cool, thanks again

14:27 craigmarshall9: dnolen: Thanks for the links.

14:30 apgwoz: speaking of ring, i know there's ring-gae now, is there a compelling reason to use the gae version for app engine over plain ole ring?

14:31 craigmarshall9: dnolen: I noticed this as well: http://disclojure.org/projects/ bookmarked for later consumption

14:41 Well - want to try cake, downloaded ruby , just downloading the 66MB JDK for some reason now...

14:42 My first contribution to clojure community if I ever get that far will be an installer :-)

14:52 apgwoz: craigmarshall9: check out leiningen: http://github.com/technomancy/leiningen

14:52 craigmarshall9: apgwoz: Does it make clojure easier to get started with?

14:53 apgwoz: once you set it up (it's got a self installer), you can do lein new <nameofproject> and it'll grab clojure and other libs for you

14:53 craigmarshall9: yes.

14:53 craigmarshall9: apgwoz: great. I'll look into that too. Just finished downloading jdk, so will try cake first.

14:54 apgwoz: .. i think you'll have to do lein deps from within that directory, but it should pull clojure and clojure-contrib by default

14:54 then, lein repl will get you to a repl

14:54 Raynes: The lein/cake workflow is to not have Clojure "installed" somewhere, but to have it as a dependency in your projects. Even if you did have a standard version of Clojure "installed", this would still be the workflow. However, I do see how it would be easier to help people get their first REPL up and running.

14:54 apgwoz: ... and, if you're an emacs user, there's an easy way to start swank for that project, provided you setup lein-swank

14:55 Raynes: i think lein is pretty easy. it at least self-installs.

14:56 Raynes: apgwoz: But the point is that Leiningen and Cake aren't Clojure.

14:56 apgwoz: Raynes: this i strue

14:56 err, is true

14:56 Raynes: If you download the zip file, you still don't have Leiningen or cake.

14:56 ninjudd: craigmarshall9: are you on windows?

14:57 apgwoz: Raynes: right, but if you download the zip, you can get a repl by simply starting it up with the instructions provided

14:57 craigmarshall9: ninjudd: at the moment, yes

14:57 apgwoz: the correct solution is to tell people that the convention is to use a tool like lein or cake to help manage their projects--don't install clojure by itself

14:57 s/install/"install"/

14:57 sexpbot: the correct solution is to tell people that the convention is to use a tool like lein or cake to help manage their projects--don't "install" clojure by itself

14:58 Raynes: apgwoz: Indeed, but "java -jar clojure.jar" doesn't make much sense to people.

14:58 And then you have them trying to figure out how to run files and compile stuff.

14:58 "java -jar clojure.jar" doesn't make sense to Windows people, at least.

14:59 apgwoz: this is a problem with all JVM languages though, even plain ole Java.

14:59 ninjudd: craigmarshall9: if you have experience writing windows installers, i'd love to add one to cake that installs everything for you. that would be really cool!

14:59 Raynes: Indeed, but you can start java with "java" on the command line.

15:00 apgwoz: and you can start clojure *using* java. i don't see how it's any different

15:00 Raynes: You can't do "clj myfile.clj"

15:00 You can do that with cljr though. :>

15:00 apgwoz: so, why can't you provide a script? simple enough

15:00 ninjudd: you can do 'cake myfile.clj'

15:00 craigmarshall9: apgwoz: What's the command for the psuedo: "java -jar clojure.jar myscript.clj", without installing extra stuff?

15:00 Raynes: You can, but Clojure doesn't right now, and that's what he was complaining about.

15:01 ninjudd: Indeed. I was looking at the scripting stuff in the readme about the global project. Very cool.

15:02 craigmarshall9: Raynes: I don't really care about installing (though I did ask for it), I just want a way of running a file full of clojure code, without downloading/installing/writing stuff.

15:02 ninjudd: Unfortunately, no experience doing that yet!

15:02 ninjudd: Raynes: i also added 'cake filter' the equivalent of 'perl -p' for writing unix pipe filters

15:02 Raynes: wut

15:04 craigmarshall9: java -cp locationofyourfile:clojure.jar clojure.main path/to/your/file.clj

15:04 ninjudd: 'java -jar clojure.jar myscript.clj' should work too

15:04 Raynes: ninjudd: Really?

15:04 ninjudd: just tested it with: java -jar lib/clojure-1.2.0-RC2.jar ~/test_script

15:04 Raynes: ninjudd: I thought you had to do classpath stuff to add your file to the classpath or Clojure wouldn't see it.

15:04 craigmarshall9: Excellent! So clojure should just come with a batch file to wrap that

15:05 ninjudd: craigmarshall9: aye

15:05 Raynes: Cool.

15:05 craigmarshall9: And it should be advertised everywhere - because seemingly only one person knows about it! :-)

15:05 (three now)

15:05 chouser: Mmmm, batch file...

15:06 Raynes: ninjudd: If you do "cake run file" in a project, does it adhere to that project's rules?

15:06 ninjudd: yes, but 'cake file' uses the global project

15:06 Raynes: Okay.

15:06 ninjudd: 'cake file' is the equivalent of 'cake run file --global'

15:06 Raynes: ninjudd: I typically do this to start quotar's server and stuff: java -cp "lib/*:src" clojure.main src/quotar/run.clj

15:07 I can use this instead.

15:07 craigmarshall9: chouser: Not sure what you mean?

15:08 chouser: sorry, not being terribly helpful at the moment. I dislike batch files somewhat more than shell scripts even.

15:08 ninjudd: you could also use the :require and :startup keys in your project.clj to start it automatically with cake

15:08 craigmarshall9: ninjudd: I get NoClassDefFoundError when using that syntax

15:08 ninjudd: Raynes: or make a task for it

15:08 craigmarshall9: chouser: Fair enough - I guessed at sarcasm, which is fine, just wanted to make sure :-)

15:08 ninjudd: craigmarshall9: 'java -jar clojure.jar myscript.clj'?

15:09 ninjudd: what version of clojure? that may be a new feature

15:09 Raynes: ninjudd: http://gist.github.com/523383 Breakage.

15:09 craigmarshall9: ninjudd: Oops - my bad, I was doing java -cp clojure.jar myscript.clj

15:09 * Raynes notes that that last message was meant to be in #cake.clj

15:10 craigmarshall9: ninjudd: Now I get unable to access jarfile ..., so I probably need to adjust my classpath variable...

15:10 chouser: but apparently the JVM isn't up to providing its own host OS integration. Java apps on every platform I'm aware of require per-app platform-specific junk of some kind to be accessible to normal users: shell scripts on unix, batch scripts or launchers on Windows and Mac

15:10 ninjudd: craigmarshall9: you have to give the full path to the jar

15:10 chouser: Unlike ruby and python, for example, which integrate well enough that for example cake uses ruby to launch clojure.

15:11 craigmarshall9: chouser: Is that not something that could be provided by clojure? I occasionally use an editor called jedit, which is quite well integrated, so well that you wouldn't know. If the junk is inevitable, is it right it ignore it and make every beginner write it (or copy pasta) for themselves?

15:12 chouser: nope

15:12 clojure should provide it, but it's a pain to create and maintain in a way that's easy to use and sufficiently flexible to be useful to all developers.

15:12 clojurebot: Yes, Clojure can do that!

15:13 chouser: and a rather different kind of task to maintain than any of the rest of what comes with Clojure now.

15:13 craigmarshall9: chouser: OK understood.

15:13 chouser: so it should happen, and I imagine it will eventually, but there's a fair amount of inertia in the way

15:13 craigmarshall9: chouser: Clearly the jvm has advantages, but drawbacks too.

15:13 chouser: absolutely

15:14 in fact, perhaps clojure's most important advantages and most problematic drawbacks are both directly from the JVM.

15:14 metagov: chouser: Careful. Proposing that Java programs actually be easy to run from the command line sounds like a suing offense these days ;-)

15:14 chouser: heh

15:16 * ninjudd ninjudd might be willing to rename the 'cake' bin script to 'clojure' if you'll make it part of Clojure. ;)

15:16 craigmarshall9: chouser: how serious (in your opinion) is this problem? The fact that you can't download and immediately run source code from a filem, on a major platform, such as with other languages/platforms.

15:16 * ninjudd doesn't know how to use '/me'

15:17 * craigmarshall9 does

15:17 craigmarshall9: :-)

15:17 chouser: ninjudd: I somehow doubt rhickey would accept a dependency on ruby. :-)

15:17 ninjudd: well, i'd rewrite it in C if he asked nicely ;)

15:18 craigmarshall9: ninjudd: Is there a ruby compiler, like py2exe? Maybe that's your solution..

15:18 ninjudd: yeah, but it includes the entire ruby interpreter in the binary, i think

15:19 chouser: craigmarshall9: not sure. Clojure seems to be gaining popularity at a decent rate anyway.

15:20 ninjudd: chouser: i agree, i simple 'clj' bash alias worked fine for me for a long time

15:20 still use it in a bind

15:23 chouser: I've got a rather complicated shell script that attempts to let me have access to different versions of clojure, with groups of .jar's compatible with each version.

15:23 dnolen: ugh

15:24 craigmarshall9: So - I put my clojure-1.1.0 directory in Program Files, and now I can run a script with the following:

15:24 chouser: ...but it's fallen into disrepair and has quirky bugs. sigh.

15:24 dnolen: I'm spoiled by Clojure collections, slicing and dicing in Ruby is tedious

15:24 craigmarshall9: java -jar "C:\Program Files\ clojure-1.1.0\clojure.jar" myscript.jar

15:24 (After adding java to the PATH)

15:24 cemerick: chouser: There's some version of clojure other than HEAD? :-P

15:24 chouser: craigmarshall9: -jar will betray you

15:25 cemerick: :-)

15:25 craigmarshall9: chouser: It's already too complicated for a beginner, is there something more correct but as easy (or easier, preferably)?

15:25 chouser: craigmarshall9: nope. more correct and less easy. Or nearly as easy but less correct.

15:26 hm, I should probably stop talking now. I really don't appear to be in a helpful mood.

15:26 craigmarshall9: chouser: What does the more correct one look like? Nope - helpful so far.

15:27 chouser: (thanks) Keep it up and I might buy your book :-)

15:27 alexyk: so was string promoted to core already or not?

15:28 cemerick: alexyk: yessir

15:28 alexyk: wow awesome! as of 1.2 or in trunk only?

15:29 kencausey: This doesn't work anymore to get elpa working for slime on cygwin: http://groups.google.com/group/clojure/msg/3b4e04ef9fb0c8bf , there is no function 'package-write-file-no-coding in the current version of elpa. Any thoughts?

15:29 cemerick: alexyk: you can see what made it, etc. here: http://clojure.github.com/clojure/clojure.string-api.html

15:29 kencausey: oops

15:29 I failed to read the complete sources, ignore me please

15:31 chouser: craigmarshall9: I prefer -cp clojure.jar:clojure-contrib.jar ...this allows you add more .jar's, unlike -jar

15:33 craigmarshall9: chouser: Ok noted. Thanks.

15:33 I will stop asking questions now, losing the inclination to perservere today! Thanks for your help so far though, folks.

15:35 dnolen: craigmarshall9: sorry the cake bit didn't work out for you. it's trivial on OS X, Java and Ruby pre-installed.

15:37 ninjudd: craigmarshall9: what trouble did you run into with cake?

15:37 alexyk: can we get a whole list of functions in clojure.string from within repl?

15:37 craigmarshall9: dnolen: No problem. I will probably have more patience another day. I would of course rather the clojure download included whatever was necessary (files or instructions) to run code from a file, like almost all programmers are used to. Nothing against your software, of course, I'm sure it's great. I just want to start extremely simple in a familiar way.

15:37 alexyk: i.e. some equivalent of http://clojure.github.com/clojure/clojure.string-api.html

15:37 ?

15:38 cemerick: ,(keys (ns-interns 'clojure.string))

15:38 clojurebot: java.lang.Exception: No namespace: clojure.string found

15:38 cemerick: it's a lot less impressive when clojurebot isn't running the requisite version of clojure :-/

15:38 ninjudd: craigmarshall9: i see.. you like to know what's going on under the hood. i'm the same way

15:38 cemerick: ,(require 'clojure.string)

15:38 clojurebot: nil

15:38 cemerick: ,(keys (ns-interns 'clojure.string))

15:38 clojurebot: (trim lower-case split join upper-case replace-by trimr replace-first-char split-lines triml replace-first-by replace reverse capitalize escape blank? replace-first trim-newline)

15:38 cemerick: there we go

15:38 alexyk: nice nice

15:39 cemerick: ,(sort (keys (ns-interns 'clojure.string)))

15:39 clojurebot: (blank? capitalize escape join lower-case replace replace-by replace-first replace-first-by replace-first-char reverse split split-lines trim trim-newline triml trimr upper-case)

15:39 alexyk: I guess I can then run doc on those

15:39 poor man's api

15:39 guide

15:39 cemerick: having a browser window open is probably easier

15:39 :-)

15:39 alexyk: or, should I say ascii man's

15:39 craigmarshall9: ninjudd: You could say that. e.g. I just wrote my own (rough and ready) php routing and MVC framework, because I didn't like relying on external ones.

15:39 alexyk: cemerick: best read with telnet to port 80!

15:40 cemerick: ha

15:40 people here are so damn hardcore, it makes my eyes bleed sometimes ;-)

15:40 ninjudd: craigmarshall9: hehe.. that's kind of similar to how i ended up writing cake in the first place

15:40 alexyk: http://www.dgate.org/~brg/bvtelnet80/

15:42 ninjudd: though i did try to use and love other alternatives first (ant, maven. lein)

15:42 craigmarshall9: Telnet is for wimps, you should read straight from the CAT5 cable with a multimeter.

15:43 ninjudd: fair enough. I fully support all those things if they add to the development in some way.

15:43 ninjudd: Just wish I could install and run. I'm repeating myself badly now. Sorry about that.

15:43 alexyk: Leiningen's son full name is Oedipus Cake Jr.

15:45 craigmarshall9: ninjudd: commodore 64?!

15:45 ninjudd: Cake is going to marry his mother Rake

15:46 craigmarshall9: yep, but it takes forever to download Ruby and the JDK

15:47 craigmarshall9: ninjudd: I'm sure you've been asked before, but why wasn't cake written in clojure, why the need for ruby (besides possbly favourite language, etc.)?

15:47 alexyk: ninjudd: send evites to all of #clojure!

15:47 granfather Make will attend

15:48 all the rednecks and hi-falutin European daddy Leiningen will have a drunken fight

15:49 ninjudd: craigmarshall9: using clojure for the client would defeat the purpose. i wrote it in ruby so it would start up quickly. the jvm is too slow

15:49 alexyk: ninjudd: conceivably you could *always* run a gllbal JVM for that...

15:49 ninjudd: craigmarshall9: the majority of cake is in clojure though. everything that runs in the persistent JVM. ruby is just for the client that communicates with the JVM over sockets

15:50 alexyk: how would you communicate with it?

15:50 alexyk: ninjudd: ugh.

15:50 ninjudd: nailgun :)

15:50 ninjudd: craigmarshall9: http://github.com/ninjudd/cake/graphs/languages

15:51 craigmarshall9: ninjudd: I see - shame that last 1% couldn't be clojure too :-0

15:51 :-)

15:51 ninjudd: alexyk: ruby is more cross-platform

15:51 craigmarshall9: Reduce the number of dependencies by 50%

15:52 alexyk: wow, there's no way to invoke a script against a global JVM in Java-like language. except, of course, in an already running repl.

15:52 it almost calls for some magic copy-paste solution

15:52 ninjudd: craigmarshall9: as they say, "it is not possible"

15:53 craigmarshall9: ninjudd: Okay - I know nothing at all about java and clojure, as you might be able to tell.

15:54 alexyk: ninjudd: telnet to the global jvm with your bare hands! :)

15:54 cemerick: IMO, I don't buy the "too slow to startup" argument....and the workarounds (ruby, nailgun, whatever) seem like too high a price to pay for the admin cost and increased complexity. *shrug*

15:54 alexyk: pass the environment... ask it to do something

15:55 dnolen: craigmarshall9: this is the kind of complexity required for simple cross plaform, http://www.ohloh.net/p/python/analyses/latest

15:55 cemerick: for you, maybe

15:55 cemerick: dnolen: I'm talking about build tooling specifically, not scripting in general.

15:56 alexyk: cemerick: too slow no question. In Western Mass, maybe OK. Boston, no. :)

15:56 cemerick: phfft

15:56 Whose build is within an order of magnitude of jvm startup time?

15:58 craigmarshall9: dnolen: Python is a batteries-included laguage, clojure is batteries-included-thanks-to-java-libs language, so python will always be bigger and more complex. (not that reusing the java libs is bad, quite the opposite of course)

15:58 alexyk: cemerick: scripting and passing to repl from TextMate are perfect use cases

15:59 which is in fact the bulk of the lifecycle, it's not Java EE-like "builds" anymore

15:59 cemerick: alexyk: yeah, like I said, I'm talking about build tooling specifically. If you don't have a build, then we'll be at cross purposes in a variety of ways anyway. :-)

16:00 alexyk: cemerick: two different areas indeed

16:00 rhudson: I agree with cemerick. Though I haven't had the opportunity with Clojure, over the years I've written any number of scripts in Jython or Groovy. For a task that's worth venturing beyond shell, JVM startup just isn't a big deal

16:00 cemerick: alexyk: so, only manual releases and deployments for you? ;-)

16:01 ninjudd: cemerick: i think the overhead of installing and using NetBeans is way more than Ruby

16:01 alexyk: cemerick: TextMate into repl! research and data analysis

16:01 ninjudd: Ruby comes standard on everything but windows, and it is a one-click install there

16:01 alexyk: for big builds of roll-out software, even maven is ok

16:01 cemerick: but having a large-scale software product is more niche than scripting :)

16:02 dnolen deserves a prize for harnessing the powers of cake to textmate

16:02 cemerick: ninjudd: I don't care about overhead. That's what shiny machines are for. Having to muck with ensuring ruby is up to snuff will always drive me away. It's just not something I care to care about. :-)

16:02 alexyk: ruby comes standard on mac, and we don't care about the rest. macs are all uniform.

16:03 cemerick: ninjudd: but then, we've hashed this before :-)

16:03 craigmarshall9: cemerick: agreed

16:03 ninjudd: cemerick: i spent two days and couldn't get NetBeans working

16:03 that's the overhead i'm talking about

16:03 alexyk: ruby us more stable than your grandfather's clock, I say

16:03 scottj: cemerick: don't you use a package management tool?

16:03 cemerick: ninjudd: Damn, that's no good. You realize that 1000's of morts do it weekly, right? ;-)

16:04 dnolen: can't we just all get along :D

16:04 * alexyk wonders who needs NetBeans when there's a free IDEA

16:04 alexyk: dnolen: we're getting along before your very eyes! :)

16:04 cemerick: yeah, this is all in good fun :-D

16:04 ninjudd: cemerick: maybe my brain is just incompatible with java IDEs

16:04 cemerick: scottj: There's no good package manager on OS X (I don't have the time or patience for source pkg managers).

16:05 ninjudd: cemerick: macports is great

16:05 cemerick: wha!?

16:05 apgwoz: has anyone ever tried to compile clojure using gjc?

16:05 dnolen: ninjudd: now that's a bridge to far. macports has driven me batty as often as it's made me happy.

16:05 cemerick: The last time I touched it, it ground away for *three* hours....was building openssl when I killed it.

16:06 ninjudd: dnolen: hmm.. i've never had a problem with it

16:06 eevar: cemerick: you could try (home)brew

16:06 ninjudd: s/great/sufficient/

16:06 dnolen: I tried to rabbitmq and it it downloaded like seriously 60+ other packages, wtf

16:06 eevar: macports has been working fine for me, tho

16:06 dnolen: s/to/to install

16:06 the fault it not macports but maintainers I know

16:06 s/it/is

16:07 cemerick: The only stuff I touch the command line for is git, so I'm not in such a hurry to find a pkg management tool anyway.

16:07 eevar: but next time I'm tempted, I'll take a look :-)

16:07 ninjudd: that's the problem with any package management system.. had the same problem with debian and redhat years ago

16:07 cemerick: nah, apt is bliss

16:08 I don't care about it grabbing packages, I care about waiting for compiles.

16:08 *of stuff I've got already*

16:08 rhudson: :)

16:08 eevar: apt is awesome, yea. I like pacman as well, even if the interface is weird

16:11 scottj: anything's better than dselect

16:15 So what are the limitations of that trick jruby uses for fast startup, -Xbootpath or something i think. Can it be used with clojure and a script file, or only an uberjar, or neither?

16:16 chouser: I use -Xbootpath all the time

16:17 not sure how much it helps

16:25 callen-permnyc: I know this will sound a bit absurd, and I'm aware of Clojure CLR, but has anyone considered porting Clojure to LLVM?

16:27 qbg: callen-permnyc: Many people have considered a port to LLVM to be a possibility once Clojure-in-Clojure is done

16:27 opqdonut: yeah

16:27 until that it's too married with objects

16:28 qbg: And a port is a lot of work, having to rewrite a lot of the implementation

16:28 opqdonut: I'd imagine implementing the concurrency features would take some effort in LLVM

16:28 callen-permnyc: qbg: I know.

16:28 rhudson: There's also the question of GC & arguably JIT

16:29 callen-permnyc: qbg: I was just thinking about it lately.

16:29 opqdonut: rhudson: excellent point

16:29 callen-permnyc: rhudson: LLVM offers JIT.

16:29 rhudson: ah

16:29 callen-permnyc: rhudson: LLVM is an intermediate target that happens to be able to compile some really efficient code, it's not a gcc.

16:29 opqdonut: anyway, JVM and CLR differ in nature from LLVM

16:29 callen-permnyc: opqdonut: of course.

16:30 opqdonut: they offer functionality that clojure depends on that would need to be implemented from scratch

16:30 qbg: CiC would help a lot with being up to date with the JVM implementation

16:36 Another issue of course is the number of host-dependent libraries

17:03 Raynes: mmarczyk: ping

17:03 mmarczyk: Raynes: pong?

17:03 Raynes: mmarczyk: I got the package. The coffee was delicious. :>

17:04 mmarczyk: ah, great :-)

17:04 happy to hear that

17:04 now, tell me

17:04 did I misspell latte? ;-P

17:04 Raynes: To be honest, I couldn't really read any of that. It took me 30 minutes to just pick the words out, much less individual letters.

17:04 :p

17:05 mmarczyk: oh?

17:05 :-D

17:06 I seem to have a vague recollection of being told that before, once or twice ;-)

17:07 Raynes: mmarczyk: I've seen more readable handwriting on prescriptions from 80 year old doctors with Parkinson's.

17:08 mmarczyk: hm :-)

17:08 Raynes: Here is what I got out of the letter "Hi, Here's a ____ of CA, and a latte ____ from Coffee Haven. __ __ __, ___"

17:08 mmarczyk: heaven ;-)

17:08 Raynes: The only reason I got "latte" and "coffee heaven" is because I read it when I found the pictures.

17:08 Aye, typo.

17:08 mmarczyk: bunch, straight, all the best ;-)

17:09 Raynes: Ah!

17:09 The letter is now complete. :>

17:09 mmarczyk: :-)

17:09 Raynes: The pictures are awesome.

17:09 mmarczyk: :-)

17:10 good to know you've got it, it's got a bit overdue

17:10 Raynes: I highly appreciate it, and I owe ya one.

17:10 mmarczyk: not at all

17:10 now fill in a copy and mail it on to Rich :-)

17:11 * qbg is interested in the terrible handwriting

17:11 Raynes: Soon.

17:11 mmarczyk: qbg: who said terrible :-P

17:11 Raynes: qbg: I don't know if it's terrible handwriting, or just that I can't read cursive.

17:11 Of course, nobody else that I know could read it either.

17:11 But this is Alabama, after all.

17:12 mmarczyk: makes me internationally illegible ;-)

17:12 cross-continentally even

17:12 Raynes: :>

17:45 I assume that under projects, I'm supposed to list clojure and clojure-contrib, right? I'm not sure what "username(s)" should be though.

17:45 In the CA, that is.

17:47 mmarczyk: aye, it wasn't very clear to me either

17:47 I put down Clojure and contrib, listed my GitHub & Assembla usernames (as suggested on clojure.org)

17:47 all the while trying to fit it all into the little table :-P

17:48 Raynes: Oh, that's what I figured. I didn't read the stuff on clojure.org

17:48 :p

17:48 mmarczyk: :-)

17:48 Raynes: Thanks. <3

17:48 mmarczyk: 6 weeks later I was accepted into the fold ;-)

17:48 sure

17:51 Raynes: have a look at Stuart Halloway's first message here: http://groups.google.com/group/clojure-dev/browse_thread/thread/52eef34fb8e864f2

17:51 though apparently it's not a problem at the CA processing stage

18:15 Raynes: mmarczyk: Surely he isn't saying your Assembla username has to be your real name or some permutation of it, is he?

18:16 Because I've already made my account and filled the damn thing out. ._.

18:17 lancepantz: yes, he is

18:18 mmarczyk: Raynes: I'm not sure if you need to worry about the account name in the CA, plus it's precisely this kind of thing I wanted to make less problematic in putting 6 copies in the envelope ;-)

18:18 but I think that is indeed what he's saying

18:18 Raynes: I don't actually want to fill out 6 copies.

18:18 Well, I'll take my chances.

18:18 lancepantz: there are multiple threads on the dev list about this

18:18 mmarczyk: sure. but it'd be alright if you needed to throw out one ;-)

18:19 Raynes: My accounts can easily be associated with me, and I obviously can't change all of them now just to have a proper CA.

18:19 If they wont work, so be it. :\

18:19 mmarczyk: at any rate, clearly Robert had his CA accepted before setting up a "recognisable" account

18:20 plus this only matters on Assembla, I think

18:20 lancepantz: you can submit whatever you want on your ca, but stuart will ask you to change it before he enables it on assembla

18:20 Raynes: It's amusing. More people would recognize me by "Raynes" than by my real name. ;p

18:20 mmarczyk: I'm not sure if Assembla has the sort of "one rename only" policy that GitHub does

18:21 but if you're not using it for anything else, you can just get another account...

18:21 Raynes: I don't like using my real name for user names because it's not standard and my name is reasonably long.

18:21 But, if I /have/ to.

18:23 mmarczyk: I appreciate more than a single copy. I just get writers cramp way to easily. :P

18:50 mmarczyk: Raynes: :-)

19:04 arohner: Clojure can get around class methods being private. Can it get around classes being marked final?

19:11 tomoj: you mean like gen-class'ing a final class?

19:13 extending a final class with gen-class, I mean

20:02 hiredman: arohner: you can access methods and fields marked private

20:02 final classes are different altogether

20:03 you can extend a protocol to a final class, but you cannot extend a final class

20:15 tomoj: where else can clojure extend classes besides gen-class?

20:18 hiredman: reify, proxy

20:19 actually maybe just proxy

20:19 reify may not work on non interfaces now

20:20 Raynes: I thought reify could only ever extend interfaces, always.

20:32 mikejs: because I'm a sucker for shiny new bleeding-edge software, I've started playing around with a mongrel2 adapter for ring: http://github.com/mikejs/ring/tree/master/ring-mongrel2-adapter/

20:34 lancepantz: so when are we going to get a clojure conference anyways?

20:43 bendlas: Hi folks

20:44 (+ 1 2)

20:44 clojurebot: 3

20:45 bendlas: (sniptest "<a></a><b></b>"

20:45 {[:a][:b]} (content "x"))

20:45 can somebody tell me, why that sniptest doesn't do anything (enlive)

20:46 ?

20:54 bobbytek: Question: why use clojure if I can use another lisp?

20:54 what does clojure give me that I can't get from caml?

20:54 seancorfield: interop with java

20:55 interop with other jvm languages

20:56 bobbytek: and the jdk? can I leverage that and other java libs?

21:01 bendlas: bobbytek: yep

21:01 works really nice

21:02 bobbytek: but most java libraries hold a lot of state. how does clojure accommodate this?

21:02 for example, jdbc

21:03 dnolen: bobbytek: not yet really though perhaps some of rhickey's new ideas might help there.

21:04 bobbytek: the tight integration with performant immutable datastructures is a big advantage. it seems like something that other langs are clamoring to copy :)

21:06 bobbytek: not groovy :)

21:06 dnolen: bobbytek: are you a groovy user?

21:06 bobbytek: aye

21:06 boojum: bobbytek: you can serialize access to stateful java objects in agents

21:06 bobbytek: looking at scala and clojure now

21:07 dnolen: bobbytek: groovy is dynamic biased no?

21:07 bobbytek: indeed

21:07 although groovy++ changes some of that

21:07 groovy is heavily influenced by smalltalk and ruby

21:10 dnolen: bobbytek: huh groovy++ seems mostly about perf and basic compile time safety, not about rich type systems. scala is big on that.

21:11 bobbytek: more complete static type system is by definition less dynamic

21:12 dnolen: bobbytek: no argument there. just saying scala has loftier goals as far as type systems goes than groovy++. but if you're down with dynamic then Clojure has lot to offer

21:13 bobbytek: also Clojure protocols are a fascinating addition for a dynamic lang.

21:13 bobbytek: I'm down with dynamic :)

21:15 dnolen: bobbytek: rhickey has done and continues to do some magical stuff. he's trying to satisfy dynamic programming while getting near static compiled perf.

21:15 bobbytek: the only functional programming language I have used is caml

21:15 and c++ templates

21:15 dnolen: clojure is basically as dynamic as possible without sacrificing as fast as possible. that's why I got into it mysefl.

21:15 bobbytek: but caml was a while back

21:16 dynamic in what sense?

21:16 runtime polymorphism? MOP?

21:17 dnolen: bobbytek: you have those things in multimethods and protocols yes.

21:26 bobbytek: hmm, groovy seems to support a limited form of macro in its AST transformation hooks

21:26 I'm still unclear on macros though

21:26 looks kinda like a c++ template facility

21:29 dnolen: bobbytek: it *can* do that, 1.2.0but it can do a lot more.

21:30 s erg

21:30 1.2.0 generic vectors illustrate using macros in that fashion.

21:31 bobbytek: more importantly it can be used to "extend the language" so to speak. powerful stuff, though best used like saffron - in tiny amounts.

21:34 hiredman: there are really two types of macros you end up writing

21:34 public api sort of language extension macros

21:34 and CPP'ish preprocessor sort of things

21:34 like if you need retry boiler plate for a bunch of operations

21:34 the later tend to do horrible things like depend on expanding in a scope where a particular name is bound

21:35 bobbytek: I haven't looked at groovy's ast transformation hooks, but depending on the ast, lisp macros usually operate at a more reasonable abstraction level

21:36 dnolen: bobbytek: it's possible to do very interesting things like read something from the file system in order to generate code at compile time.

21:54 brweber2: hiredman what is your opinion on clj-peg vs. fnparse (strenghs and weaknesses)?

21:55 mmarczyk: how do I go about using clojure-mode for highlights and such, yet having a universal 2 space indent?

21:56 in case anyone's got an appropriate elisp snippet handy :-)

21:57 hiredman: brweber2: I've only used the increasingly obselete fnparse2

21:59 brweber2: hiredman I'm inclined to go with clj-peg just b/c it is more similar to the parsers I've used in the past, but why is fnparse2 obsolete? b/c of the impending re-write?

21:59 hiredman: the in process rewrtie

22:54 nickik: Hallo, whats the best way to count up something in a map?

22:55 (let [examplemap {:score 0}] (assoc examplemap :score inc))

22:55 but using the inc function on :score not putting it into

22:55 Scriptor: ,(count {:score 0})

22:55 clojurebot: 1

22:55 Scriptor: wait

22:56 rhudson: 'assoc doesn't change the value of examplemap; it creates a new map value

22:56 somnium: ,(update-in {:x 0} [:x] inc)

22:56 clojurebot: {:x 1}

Logging service provided by n01se.net