#clojure logs

2010-08-13

00:00notsonerdysunnyhmm.. thx lancepantz
00:01notsonerdysunnyone 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?
00:02notsonerdysunnyif so ... how could I do that?
00:03lancepantzits best practice to find a repo that does have it and add it to your repositories list
00:03lancepantzyou can always put it on clojars as well
00:04tomojyou can install the jar directly into your local maven repository as well
00:04tomojbut that's somewhat bad
00:04lancepantzthe idea with build tools is that they make your environment repeatable, so another user on another machine can work with it as you do
00:06notsonerdysunnyI 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...
00:06notsonerdysunnyanswering my own question .. it is possible .. http://download.oracle.com/javase/tutorial/security/toolfilex/step3.html
00:07lancepantzinteresting, wasn't aware of that
02:40LauJensenGood morning all
02:52old_soundLauJensen: Good afternoon!
03:57notsonerdysunnyI 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
04:03naeuGood morning
04:04LauJensenMorning Sam
04:04naeuI'm starting to get a bit more settled these days - I'm now living in Cambridge
04:05naeuand the house finally has no visible boxes of unsorted stuff! Yey!
04:05LauJensenThats a big step :)
04:05naeuLauJensen: btw, morning :-)
04:05naeuWhat's with the Oracle lawsuit?
04:06LauJensenvs Android?
04:06naeuyup
04:06naeuis it against Android's JVM implementation?
04:07LauJensenTo be honest I dont keep up with most lawsuits between software companies
04:07naeuI thought that Sun had open sourced Java prior to Oracle's aquisition of them
04:07LauJensen"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."
04:07naeuMe neither, I'm just concerned of the repercussions
04:08naeui.e. what does it mean to people developing with Java?
04:08LauJensen"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."
04:08LauJensen"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"
04:08naeuyeah, I've read a bunch of articles - they all essentially say the same thing. However, none of them say what it might *mean*
04:09LauJensen"Attorneys said the intellectual property is infringed by various Java applications that make up the Android stack..."
04:09LauJensenAs I see it, its not the JVM its the software stack they released with it
04:09vIkSiTjeezus
04:09vIkSiTthey filed THAT?
04:10LauJensenOh - Looks like they might also think that they have a patent on 'Just in time compilation', which is their complaint against dalvik
04:10naeuexactly
04:10LauJensenThe 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";
04:10LauJensen6,910,205, "Interpreting functions utilizing a hybrid of virtual and native machine instructions"; and 6,061,520, "Method and system for performing static initialization."
04:11naeuI'm just concerned whether there may be any repercussions to Clojure's implementation.
04:11LauJensenJust look at the first one, incredibly how you can get a patent on something so broad
04:11eevar_so 30% of us will be shooting for haskell now then, with Java dying?
04:11hoeckLauJensen: this is just the abstract, they are always broad
04:12hoeckLauJensen: the really interesting stuff lies in the patents claims
04:12LauJensennaeu: 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
04:12LauJenseneevar_: Naah, I think I'll just go with OpenJDK :)
04:13eevar_hmm.. seems it's only 29%
04:13eevar_29% of people in the Clojure community would move to Haskell if Clojure disappeared, according to the State of Clojure survey.
04:13naeuLauJensen: yeah, that's the scary thing. Maybe we should all move to New Zealand?
04:13LauJensenWhat good would that do ?
04:13LauJensenHave you guys seen that movie 'Food inc' which is available on youtube ?
04:13eevar_LauJensen: running windows then, as you're not already using openjdk?
04:13hoeckwhat about hosting all software in nz?
04:14LauJenseneevar_: I run Arch Linux, and I dont use OpenJDK because its buggy
04:14naeuhttp://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=
04:14arbschthoeck: our international connectivity probably could not support it :)
04:14LauJensennaeu: wow, thats uplifting
04:15naeuindeed :-)
04:15arbschtbut hey, if you all want to move here, you're welcome -- we could use a more active clojure community
04:16hoeckarbscht: I'm wondering wether it would then be illegal in europe to use european patented software running in nz
04:16naeuarbscht: I have a bunch of friends over there - they really recommend it. They're all living the god life.
04:16eevar_probably a better idea to get rid of software patents
04:16naeus/god/good/
04:16sexpbotarbscht: I have a bunch of friends over there - they really recommend it. They're all living the good life.
04:16hoeckeevar_: right
04:16LauJensenAnyway, 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
04:16LauJensenbeen bankrupt before they even reached court - So, he who has the most money wins
04:17eevar_question is how, when our political systems are crooked as hell
04:17naeuThat's crazy scary.
04:18LauJensenI'll recommend you guys to watch all 10 parts http://www.youtube.com/watch?v=rCyGLQ_Iod4
04:19eevar_it's not just the food industry
04:19LauJensenNo I think its everything in America - We dont quite have that situation in Europe yet I think
04:23eevar_well, the eu is pushing that data retention directive, for instance
04:24hoeckyet, but who knows, its said that europe lags behind the us by 10yrs or so
04:24LauJensenYea, and capitalism is capitalism - The rich will always win in the end
04:25esjyup, more money => more power to get more money
04:25esjin engineering we call that positive feedback and recognise that its unstable
04:26esjwoulda thunk politics and social science would have figured it by now
04:26LauJensenesj: well, guess who's paying them? :)
04:26vIkSiThmm. So if I have a function say f, and I do a (def v (f ..)) - and assuming f takes a long time to run
04:27esjLauJensen: 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/
04:27LauJensenvIkSiT: then Oracle will sue you
04:27vIkSiTon the REPL, the next prompt only appears after f finishes executing..
04:27vIkSiTbut in a code window - when executing that line using CxCe - how do you know when it finishes?
04:27vIkSiTLauJensen, :P
04:27LauJensenYea esj, subsidies are putting everything on its head
04:28LauJensenvIkSiT: You get feedback in the minibuffer once it returns
04:28esjespecially as SCOTUS just ruled that companies spending money is the equivalent of their free speech
04:28vIkSiTLauJensen, indeed. I mean - how do you know its still running? (because i can type all over the place and that feedback may be missed)
04:28LauJensenesj: 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
04:28esjLauJensen: that's hilarious, I'll check it out.
04:28LauJensenvIkSiT: If you dont generate any other type of output, then you cant
04:28naeuLauJensen: damn, that's another scary fact.
04:29vIkSiTLauJensen, sigh.
04:29notsonerdysunny~seen angerman
04:29clojurebotno, I have not seen angerman
04:29esjaaaaanyway... I need coffee. later.
04:29notsonerdysunnywho angerman
04:29naeuAlthough perhaps that's only in the states where the price of petrol/gas is crazy cheap
04:29naeualthough the price of meat is crazy cheap there too...
04:31vIkSiTbtw, does anyone have recommendations on a way to create bigrams out of a particular piece of text?
04:31vIkSiTi currently made this : https://gist.github.com/f19624d36362ed654c45
04:31vIkSiTbut any improvements would be welcome
04:31vIkSiT(this seems to be my bottleneck function over large pieces of text)
04:31LauJensennaeu: beef costs more than berries in Denmark
04:32LauJensen(or I should say 'some beefs' 'some berries', I dont have the prices in front of me)
04:32naeuLauJensen: I don't just eat berries - I eat carrots too...
04:32LauJensenoh?
04:32naeuand lettuce when I'm feeling special
04:33notsonerdysunny~seen angerman
04:33clojurebotno, I have not seen angerman
04:33LauJensenYea, 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
04:35eevar_LauJensen: meh. what's unhealthy about beef or diary?
04:35naeuLauJensen: it's always been the case in the UK that healthy food is way more expensive than unhealthy food
04:36eevar_i agree that all subsidies are evil, tho
04:36naeueevar_: except for bike subsidies. People should definitely cycle more and drive less...
04:37LauJenseneevar_: 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
04:37LauJensendont. A glass of milk contains the same amount of colesterol as 21 slices of bacon. So, they are very bad for your health.
04:38LauJensenSecondarily, 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
04:38eevar_LauJensen: well, countries where people can't afford meat probably have a shorter life expectancy
04:38eevar_and less overweight?
04:39LauJenseneevar_: Yes, but for different reasons.
04:39LauJensenYou 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
04:39eevar_that's what i'm saying. people die off before they'd get cancer and develop heart conditions
04:40naeuI 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.
04:40LauJenseneevar_: Not so - Consider turkey, they have about the same life expentancy as Denmark, but they have virtually no cancer compared to us
04:41LauJensenIn 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
04:41LauJensenSo 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) :)
04:41LauJensens/also/always/
04:41sexpbotSo 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) :)
04:42eevar_and you have conclusive evidencd that it's actually _meat and dairy_ causing it..?
04:42FolconHey Everyone, does anyone have any experience with fnparse?
04:43LauJenseneevar_: Yes there are many studies which show that 'colesterol' is causing this, and you find that only in animal food
04:43eevar_there are also studies that claim cholesterol isn't harmful on it's own, it's being fat that's the killer
04:43arbschtFolcon: someone probably does. ask your question anyway
04:44LauJenseneevar_: 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
04:47FolconWell basically I'm trying to work out how to get it to parse rules...
04:54FolconEven 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..
05:08cais2002does anybody know why after git clone of the clojure project, there are files under src/jvm that are "Changed but not updated"?
05:18Chousukecais2002: on windows?
05:18cais2002chousuke: yes, is it a known issue?
05:18Chousukecais2002: your git is probably messing with the newline characters
05:19Chousukethere's some setting to turn it off but I don't remember which one :/
05:19cais2002chousuke: ok, let me figure it out
05:19Chousukeah, yeah, core.autocrlf
05:20Folconcais2002: git config --global core.autocrlf true
05:20Chousuketrue? isn't it supposed to be off?
05:21Folconit tells it to convert, false tells it not to...
05:21Folconwait let me find a doc
05:21Folconhttp://help.github.com/dealing-with-lineendings/
05:21Chousukeright, you don't want to do any conversion
05:22Chousukeyou want the files to be as they are in the repository.
05:22Chousukeany worthwhile editor on windows will handle unix line endings just fine
05:35cais2002Folcon: it works now.
05:43Folconcais2002: Great!
05:49cais2002I am still encountering the stackoverflow problem if I use master-snapshot or RC3, no problem for beta1. http://pastebin.com/p4Ec0y01
05:49cais2002any hint?
06:08cais2002looks like the problem is gone after configuring -Xms256m -Xms512m .. but it seems to be a potential bug
06:10LauJensencais2002: How do you replicate the problem ?
06:12cais2002LauJensen: I repeatedly encounter it when running my code. I will see if I could locate the portion of code that triggers the problem
06:12LauJensenThe 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
06:12LauJensensorry, Xmx
06:14bozhidarLauJensen: you probably mean the heap, not the stack
06:14LauJensenYes, indeed
06:19cais2002LauJensen: 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..
06:58old_soundHi
09:26lpetithi there
09:33LauJensenlpetit: hi
09:42stuartsierraHello, World.
09:44AWizzArdHi Stuart.
09:46arkhIs there a major difference between (send-off an-agent #'a-function) and (send-off an-agent a-function) ?
09:46chouserno
09:46arkhk
09:46stuartsierraarkh: #'a-function is the Var
09:46stuartsierraa-function is the value of that Var at the time you call send-off
09:46chouserthe former is in some older examples from when there was a major difference
09:47arkhah - ok
09:47stuartsierrachouser: what was the difference?
09:48chouserstuartsierra: 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.
09:48stuartsierraTheoretically, 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.
09:49chouserhm, good point
09:49arkhI saw the syntax on rich's ant.clj (which I know was written a while ago)
09:49chouserarkh: yeah, I think that's the only place I've seen it.
09:49stuartsierrasomebody should really update that
09:49stuartsierrait keeps popping up
09:50cemerickwhoa, the old crowd is almost all here. :-)
09:51arkhstuartsierra: why would #'a-function resolve to the latest binding and a-function wouldn't necessarily?
09:52hugodHi, 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
09:52stuartsierraarkh: a-function will resolve at the time you called send-off
09:52arkhstuartsierra: ohhh ... that makes sense then
09:53chouserhttp://clojure-log.n01se.net/date/2008-11-23.html#10:39c
09:54chouserthe same day he said "I'm thinking of renaming ns to defnamespace"
09:54naeuso does anyone have any advice on how to update a lib using instance-case to be 1.2 compatible?
09:55chouserwhat's instance-case?
09:55hadronzoohello, 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.
09:55stuartsierrahadronzoo: are you setting the classpath on the java command line as well? That overrides $CLASSPAH
09:56naeuchouser: seems like a macro built around the old clojure-contrib fcase which determines whether the conditional variable is one of a selection of classes
09:56naeuhowever, using clojure.contrib fcase throws up a bunch of namespace override warnings which I'm trying to remove
09:56hadronzoostuartsierra: I'm executing clojure with "java jline.ConsoleRunner clojure.main"
09:57stuartsierrahadronzoo: you need to quote arguments to "require"
09:58naeuit's currently used like this: (map #(instance-case %1 Integer "i" Long "h" Float "f") args)
09:59naeuhmm, 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
09:59naeuI guess I could just use that directly :-)
09:59hadronzoostuartsierra: you mean "(require 'clojure.contrib.math)"?
09:59stuartsierranaeu: fcase has been superseded by clojure.core/case
09:59stuartsierrahadronzoo: yes
10:00stuartsierraFunctions require/use/refer: quote arguments. NS declarations :require, :use, :refer: don't quote.
10:00naeustuartsierra: how would I replicate the behaviour of instance-case with the new clojure.core/case
10:00hadronzoostuartsierra: that returns nil, but clojure is still unable to resolve the expt symbol
10:01stuartsierrahadronzoo: "require" only loads the namespace; if you also want to refer the symbols in it, use "use"
10:01stuartsierranaeu: dunno, never saw instance-case
10:02polypusis it possible to embed a jar in a lein project such that dependent projects automatically have that jar on their classpath?
10:02rhickeyeveryone humming on RC3?
10:03AWizzArdIs RC3 what I can download from build.clojure.org?
10:03hadronzoostuartsierra: it worked! thanks. I wasn't understanding the clojure namespace system (I'm used to CL packages)
10:03stuartsierraAWizzArd: RC3 is available on build.clojure.org, as release "1.2.0-RC3"
10:04AWizzArdstuartsierra: thanks, will test it then
10:06lpetitchouser: defns would make sense. But what about in-ns which also creates an empty ns then ?
10:06lpetit:)
10:09naeumy first attempt was the following: (defn a [y] (case (class y) Integer "int" String "stringy"))
10:09naeuhowever, it doesn't seem to match Integer with the class java.lang.Integer
10:12rhickeystuartsierra: is that visible through the Hudson interface?
10:13stuartsierrarhickey: not that I know of
10:14stuartsierraHudson only does CI, not repository management
10:14stuartsierraw00t! contrib "modules" branch builds all the way through!
10:27slyrushmm... I've made it this far without any reference types for chemiclj... hope I don't have to start here.
10:57polypusis it possible to embed a jar in a lein project such that dependent
10:57polypus projects automatically have that jar on their classpath?
11:01ihodesyes-the lib/ dir
11:02stuartsierrapolypus: only if it's declared as a dependency
11:09polypuswhat 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:09stuartsierradependencies are transitive
11:10stuartsierrabut P must declare J as a dependency
11:10stuartsierrait can't just be a jar file that you stick in the lib/ dir
11:14polypusstuartsierra: 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:15stuartsierrayou can't package a jar inside another jar in normal Java land.
11:15stuartsierraOnly classloader tricks make that possible.
11:15polypusahh, ok ty, still somewhat of a javaland noob
11:16stuartsierrapolypus: what "lein uberjar" does is expand all the jars of your dependencies and merge them into one big jar.
11:16stuartsierraThe maven assembly plugin does the same thing.
11:17polypusok, that was also part of my confusion
11:17polypusthanks
11:17stuartsierraSome deployment environments, such as Java EE or Servlet containers, permit you to have a lib/ directory inside your jar, containing other jars.
11:18polypusso 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:20stuartsierrano
11:20cemerickpolypus: uberjars are only intended for final deployment, not for re-use
11:20cemerick(not that that's stopped a lot of people from using them that way)
11:20cemerick:-(
11:20polypuscmerick: that's what i intend to do. just use it to generate a pom basically
11:22cemerickpolypus: Not sure how to grok that. None of this has much to do with pom generation.
11:26polypusi'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:26stuartsierraIt must be in a repo.
11:26stuartsierraEven if that repo is clojars.
11:26cemerickpolypus: You need to get the jar into a repo as stuartsierra.
11:27cemerickIs using clojars as a de facto fallback repo recommended at this point?
11:28danlarkinwhat's the other choice? maven central?
11:28stuartsierradanlarkin: host your own!
11:28cemerickdanlarkin: or host your own.
11:28stuartsierralike me!
11:28danlarkinoy
11:29danlarkinhost your own X < let someone else do it
11:29stuartsierrahttp://stuartsierra.com/2009/09/08/run-your-own-maven-repository
11:29stuartsierrastep 3: profit!
11:29cemerickdanlarkin: clojars is a swamp in part because people use it as a personal scratch space.
11:30danlarkincemerick: yes that's true, but it doesn't prevent it from being a useful maven repo
11:31danlarkinie. I don't care what's on it, as long as it has the libs I'm looking for
11:31cemerickdanlarkin: yes, yes it does. Reminds me of the open FTP servers I used to find circa 1995.
11:31stuartsierraporn and malware?
11:31danlarkinwhy does it matter?
11:32cemerickstuartsierra: That would make it more interesting, anyway. ;-)
11:33cemerickdanlarkin: because conventions, provenance, and discoverability matters.
11:33cemericks/matters/matter
11:33stuartsierrasome plans in the works on that front...here at Clojure/core
11:34cemerickstuartsierra: indeed, I heard a rumor. Good news, that.
11:34danlarkincemerick: 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:35cemerickdanlarkin: 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:36lrennI'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:38danlarkincemerick: maybe I'm just dealing with blub habits then, I look forward to SS improving things for us all
11:39stuartsierraIt's actually @dliebke's project
11:39stuartsierraI just complain. :)
11:42polypuslrenn: 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:43polypusi.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:44lrennpolypus: that's what i figured. Many thanks.
11:44polypusnp
11:46arohnerdanlarkin: sonatype nexus is OSS and free and easy to setup
11:47danlarkinarohner: that may be the case, but surely you see the value in a "community" repo
11:47arohnerdanlarkin: of course. clojars does that, for OSS code
11:48danlarkinah, I see
11:49lrennpolypus: so if i want lein jar to work, i should add leiningen as a dev dependency?
11:51polypuslrenn: yeah. just curious though, what are you compiling?
11:52lrennpolypus: it's a plugin that pulls dependency for leiningen using ivy instead of maven, can publish as well.
11:53lrennpolypus: if i add leiningen/leiningen 1.3.0-SNAPSHOT I get a org.apache.maven:super-pom:jar:2.0 as missing.
11:57polypuslrenn: 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:00lrennpolypus: ah, that worked. thanks again.
12:00polypusnp
12:03polypuslrenn: is it absolutely necessary for you to be compiling btw?
12:05lrennpolypus: no. This is something I had done a long time ago and I just wanted to see if it would still compile.
12:05lrennpolypus: i guess when you specify namespaces in your project.clj lein jar automatically compiles?
12:06polypuslrenn: not sure what you mean
12:07lrennlrenn: 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:08polypuscuz if you can get away w/o compiling you should go that route, but you probably already know that
12:10arkhfor 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:11lrennpolypus: 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:12polypuscool
12:39arkhto 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:40craigmarshall9Hi - how do I run a clojure script from the windows command prompt? e.g. "python myscript.py"
13:40craigmarshall9Is there something I have to add to my PATH variable, for example?
13:41woobycraigmarshall9: a small batch file will do the trick, see http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started#Create_clj_Script
13:43craigmarshall9wooby: 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:43craigmarshall9wooby: thanks though
13:44woobycraigmarshall9: no worries, glad to help
13:50woobycraigmarshall9: another alternative is cljr: http://github.com/liebke/cljr
13:50woobyafter installing you can do 'cljr run myscript.clj', or get a repl with 'cljr repl'
13:50craigmarshall9Does 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:51woobyforget about the batch script solution, cljr is what you want :)
13:51craigmarshall9wooby: do you mean rather than typing code into a file, type/edit it into the repl?
13:52craigmarshall9I thought that was only for running small snippets of code, rather than building up a program..
13:54woobycraigmarshall9: 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:54arkhcraigmarshall9: the repl can be great to build up code but I think it's usually paired up with an editor or IDE
13:54arkh... what wooby said ;)
13:55woobycraigmarshall9: cljr is a really great place to start playing and learning though, if that's where you're at
13:55craigmarshall9I'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:55craigmarshall9How do I save from the clojure repl to a file, for example?
13:56craigmarshall9Yes - just at the playing/learning part. I'm at project euler level 1, at the moment.
13:56arkhcraigmarshall9: fwiw, ipython is a great example of an interactive shell / environment for writing python.
13:57craigmarshall9arkh: Yes - I've heard people rave about those, but they've never taken with me. Perhaps I'm just not trying hard enough
13:59arkhcraigmarshall9: 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:59dnolencraigmarshall9: 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:00jfieldshow do you guys do named params for your functions?
14:00dnolencraigmarshal9: 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:00jfieldsfogus 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:00jfieldshttp://blog.jayfields.com/2010/07/clojure-destructuring.html?showComment=1280233618538#c8205576450346352559
14:00dnolenjfields: yeah you need to be on 1.2.0 for the nice syntax.
14:01jfieldsah, gotcha, thanks.
14:02dnolencraigmarshall: 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:04craigmarshall9I 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:04craigmarshall9Not heard of or tried cake yet, I will do so.
14:05craigmarshall9I'd love to see over your shoulder to see your workflow (any of you)
14:05dnolencraigmarshall: 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:05craigmarshall9dnolen: okay, that sounds a little bit more magical than what I've tried so far.
14:06craigmarshall9And it can run the stuff that came beforehand, so it has the right "context"?
14:06dnolencraigmarshall9: magical is right :)
14:06ninjuddcraigmarshall9: cake should work on windows too. even command-line history and tab-completion: http://wiki.github.com/ninjudd/cake/cake-on-windows
14:07craigmarshall9ninjudd: thanks - will take a loko
14:07craigmarshall9look*
14:07dnolencraigmarshall9: 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:07dnolens/which compile it/which compiles it
14:09craigmarshall9dnolen: 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:12dnolencraigmarshall9: 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:13arkhcraigmarshall9: 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:13dnolencraigmarshall: also without some like Cake or Nailgun, simple scripting can be painful. And I don't see Clojure relying on either anytime soon.
14:14dnolens/some/something
14:14ninjudddnolen: yeah, it would be nice if some kind of persistent jvm support was built in to Java
14:15craigmarshall9dnolen: 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:15ninjuddi'm sure it's an issue in JRuby and Scala too
14:16craigmarshall9I can't remember how I ran scripts then, must have done the batch file thing.
14:16dnolencraigmarshall9: ha! :) well quite a fews have improved. I recommend cake as long you don't mind installing Ruby.
14:16dnolens/fews/few things
14:16RaynesThings were a lot different 2 years ago.
14:17craigmarshall9Raynes: I still can't run an installer and execute a script :/
14:17craigmarshall9(I don't want to sound ungrateful of course)
14:17RaynesI guess startup scripts.
14:18dnolencraigmarshall9: gem install cake, cake eval '(println "Hello world!")'
14:18craigmarshall9dnolen: going to do that now, it's probably exactly what I'm looking for
14:18RaynesIt 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:19craigmarshall9dnolen: No - don't mind installing Ruby, I played with ruby on rails a few years ago and had some fun
14:21arkhare rlwrap and jline interchangeable? Specifically wrt cake?
14:21ninjuddarkh: cake doesn't use either
14:21craigmarshall9Raynes: 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:21arkhninjudd: because it's in ruby?
14:22dnolencraigmarshall9: uh, Ruby and Python, Perl are 15-20 years old ;)
14:22ninjuddarkh: right, it uses Ruby bindings to the c readline libraries (or libedit on mac)
14:22craigmarshall9dnolen: Then don't they have some things to offer, since they're still going strong? :-)
14:22RaynesIf 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:22ninjuddand perhaps some other readline implementation on windows
14:23dnolencraigmarshall9: of course, very good getting started story. After that all bets are off ;)
14:23RaynesEither way, you'd have to use a different "language". Even if Clojure included startup scripts in bash and bat.
14:23dnolenj/k, I enjoy and work with Ruby, Python. Perl I'm ignorant of.
14:23arkhninjudd: is there a way to get keybindings for editing with it? (e.g. vim or emacs)
14:23RaynesPerl 6 looks interesting.
14:23craigmarshall9dnolen: 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:24ninjuddarkh: it supports most emacs keybindings. i don't think there is a way to use vim bindings, but i'm not certain
14:24arkhninjudd: ok - thank you
14:24RaynesI don't think that billions of people are programmers.
14:24Raynes>_>
14:24craigmarshall9dnolen: lots would say you're better off that way (ignorant of perl)
14:24craigmarshall9Raynes: hyperbole. I mean lots.
14:25dnolencraigmarshall9: 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:25ninjuddarkh: maybe editing ~/.inputrc would work
14:26craigmarshall9dnolen: 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:26ninjuddarkh: try http://snippets.dzone.com/posts/show/1990
14:27dnolencraigmarshall9: http://mmcgrana.github.com/2010/03/clojure-web-development-ring.html
14:27dnolenand http://mmcgrana.github.com/2010/07/develop-deploy-clojure-web-applications.html
14:27arkhninjudd: cool, thanks again
14:27craigmarshall9dnolen: Thanks for the links.
14:30apgwozspeaking 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:31craigmarshall9dnolen: I noticed this as well: http://disclojure.org/projects/ bookmarked for later consumption
14:41craigmarshall9Well - want to try cake, downloaded ruby , just downloading the 66MB JDK for some reason now...
14:42craigmarshall9My first contribution to clojure community if I ever get that far will be an installer :-)
14:52apgwozcraigmarshall9: check out leiningen: http://github.com/technomancy/leiningen
14:52craigmarshall9apgwoz: Does it make clojure easier to get started with?
14:53apgwozonce 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:53apgwozcraigmarshall9: yes.
14:53craigmarshall9apgwoz: great. I'll look into that too. Just finished downloading jdk, so will try cake first.
14:54apgwoz.. i think you'll have to do lein deps from within that directory, but it should pull clojure and clojure-contrib by default
14:54apgwozthen, lein repl will get you to a repl
14:54RaynesThe 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:54apgwoz... and, if you're an emacs user, there's an easy way to start swank for that project, provided you setup lein-swank
14:55apgwozRaynes: i think lein is pretty easy. it at least self-installs.
14:56Raynesapgwoz: But the point is that Leiningen and Cake aren't Clojure.
14:56apgwozRaynes: this i strue
14:56apgwozerr, is true
14:56RaynesIf you download the zip file, you still don't have Leiningen or cake.
14:56ninjuddcraigmarshall9: are you on windows?
14:57apgwozRaynes: right, but if you download the zip, you can get a repl by simply starting it up with the instructions provided
14:57craigmarshall9ninjudd: at the moment, yes
14:57apgwozthe 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:57apgwozs/install/"install"/
14:57sexpbotthe 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:58Raynesapgwoz: Indeed, but "java -jar clojure.jar" doesn't make much sense to people.
14:58RaynesAnd then you have them trying to figure out how to run files and compile stuff.
14:58Raynes"java -jar clojure.jar" doesn't make sense to Windows people, at least.
14:59apgwozthis is a problem with all JVM languages though, even plain ole Java.
14:59ninjuddcraigmarshall9: 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:59RaynesIndeed, but you can start java with "java" on the command line.
15:00apgwozand you can start clojure *using* java. i don't see how it's any different
15:00RaynesYou can't do "clj myfile.clj"
15:00RaynesYou can do that with cljr though. :>
15:00apgwozso, why can't you provide a script? simple enough
15:00ninjuddyou can do 'cake myfile.clj'
15:00craigmarshall9apgwoz: What's the command for the psuedo: "java -jar clojure.jar myscript.clj", without installing extra stuff?
15:00RaynesYou can, but Clojure doesn't right now, and that's what he was complaining about.
15:01Raynesninjudd: Indeed. I was looking at the scripting stuff in the readme about the global project. Very cool.
15:02craigmarshall9Raynes: 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:02craigmarshall9ninjudd: Unfortunately, no experience doing that yet!
15:02ninjuddRaynes: i also added 'cake filter' the equivalent of 'perl -p' for writing unix pipe filters
15:02Rayneswut
15:04Raynescraigmarshall9: java -cp locationofyourfile:clojure.jar clojure.main path/to/your/file.clj
15:04ninjudd'java -jar clojure.jar myscript.clj' should work too
15:04Raynesninjudd: Really?
15:04ninjuddjust tested it with: java -jar lib/clojure-1.2.0-RC2.jar ~/test_script
15:04Raynesninjudd: I thought you had to do classpath stuff to add your file to the classpath or Clojure wouldn't see it.
15:04craigmarshall9Excellent! So clojure should just come with a batch file to wrap that
15:05ninjuddcraigmarshall9: aye
15:05RaynesCool.
15:05craigmarshall9And it should be advertised everywhere - because seemingly only one person knows about it! :-)
15:05craigmarshall9(three now)
15:05chouserMmmm, batch file...
15:06Raynesninjudd: If you do "cake run file" in a project, does it adhere to that project's rules?
15:06ninjuddyes, but 'cake file' uses the global project
15:06RaynesOkay.
15:06ninjudd'cake file' is the equivalent of 'cake run file --global'
15:06Raynesninjudd: I typically do this to start quotar's server and stuff: java -cp "lib/*:src" clojure.main src/quotar/run.clj
15:07RaynesI can use this instead.
15:07craigmarshall9chouser: Not sure what you mean?
15:08chousersorry, not being terribly helpful at the moment. I dislike batch files somewhat more than shell scripts even.
15:08ninjuddyou could also use the :require and :startup keys in your project.clj to start it automatically with cake
15:08craigmarshall9ninjudd: I get NoClassDefFoundError when using that syntax
15:08ninjuddRaynes: or make a task for it
15:08craigmarshall9chouser: Fair enough - I guessed at sarcasm, which is fine, just wanted to make sure :-)
15:08ninjuddcraigmarshall9: 'java -jar clojure.jar myscript.clj'?
15:09ninjuddninjudd: what version of clojure? that may be a new feature
15:09Raynesninjudd: http://gist.github.com/523383 Breakage.
15:09craigmarshall9ninjudd: Oops - my bad, I was doing java -cp clojure.jar myscript.clj
15:10craigmarshall9ninjudd: Now I get unable to access jarfile ..., so I probably need to adjust my classpath variable...
15:10chouserbut 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:10ninjuddcraigmarshall9: you have to give the full path to the jar
15:10chouserUnlike ruby and python, for example, which integrate well enough that for example cake uses ruby to launch clojure.
15:11craigmarshall9chouser: 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:12chousernope
15:12chouserclojure 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:12clojurebotYes, Clojure can do that!
15:13chouserand a rather different kind of task to maintain than any of the rest of what comes with Clojure now.
15:13craigmarshall9chouser: OK understood.
15:13chouserso it should happen, and I imagine it will eventually, but there's a fair amount of inertia in the way
15:13craigmarshall9chouser: Clearly the jvm has advantages, but drawbacks too.
15:13chouserabsolutely
15:14chouserin fact, perhaps clojure's most important advantages and most problematic drawbacks are both directly from the JVM.
15:14metagovchouser: Careful. Proposing that Java programs actually be easy to run from the command line sounds like a suing offense these days ;-)
15:14chouserheh
15:16craigmarshall9chouser: 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:17craigmarshall9:-)
15:17chouserninjudd: I somehow doubt rhickey would accept a dependency on ruby. :-)
15:17ninjuddwell, i'd rewrite it in C if he asked nicely ;)
15:18craigmarshall9ninjudd: Is there a ruby compiler, like py2exe? Maybe that's your solution..
15:18ninjuddyeah, but it includes the entire ruby interpreter in the binary, i think
15:19chousercraigmarshall9: not sure. Clojure seems to be gaining popularity at a decent rate anyway.
15:20ninjuddchouser: i agree, i simple 'clj' bash alias worked fine for me for a long time
15:20ninjuddstill use it in a bind
15:23chouserI'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:23dnolenugh
15:24craigmarshall9So - I put my clojure-1.1.0 directory in Program Files, and now I can run a script with the following:
15:24chouser...but it's fallen into disrepair and has quirky bugs. sigh.
15:24dnolenI'm spoiled by Clojure collections, slicing and dicing in Ruby is tedious
15:24craigmarshall9java -jar "C:\Program Files\ clojure-1.1.0\clojure.jar" myscript.jar
15:24craigmarshall9(After adding java to the PATH)
15:24cemerickchouser: There's some version of clojure other than HEAD? :-P
15:24chousercraigmarshall9: -jar will betray you
15:25chousercemerick: :-)
15:25craigmarshall9chouser: It's already too complicated for a beginner, is there something more correct but as easy (or easier, preferably)?
15:25chousercraigmarshall9: nope. more correct and less easy. Or nearly as easy but less correct.
15:26chouserhm, I should probably stop talking now. I really don't appear to be in a helpful mood.
15:26craigmarshall9chouser: What does the more correct one look like? Nope - helpful so far.
15:27craigmarshall9chouser: (thanks) Keep it up and I might buy your book :-)
15:27alexykso was string promoted to core already or not?
15:28cemerickalexyk: yessir
15:28alexykwow awesome! as of 1.2 or in trunk only?
15:29kencauseyThis 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:29cemerickalexyk: you can see what made it, etc. here: http://clojure.github.com/clojure/clojure.string-api.html
15:29kencauseyoops
15:29kencauseyI failed to read the complete sources, ignore me please
15:31chousercraigmarshall9: I prefer -cp clojure.jar:clojure-contrib.jar ...this allows you add more .jar's, unlike -jar
15:33craigmarshall9chouser: Ok noted. Thanks.
15:33craigmarshall9I will stop asking questions now, losing the inclination to perservere today! Thanks for your help so far though, folks.
15:35dnolencraigmarshall9: sorry the cake bit didn't work out for you. it's trivial on OS X, Java and Ruby pre-installed.
15:37ninjuddcraigmarshall9: what trouble did you run into with cake?
15:37alexykcan we get a whole list of functions in clojure.string from within repl?
15:37craigmarshall9dnolen: 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:37alexyki.e. some equivalent of http://clojure.github.com/clojure/clojure.string-api.html
15:37alexyk?
15:38cemerick,(keys (ns-interns 'clojure.string))
15:38clojurebotjava.lang.Exception: No namespace: clojure.string found
15:38cemerickit's a lot less impressive when clojurebot isn't running the requisite version of clojure :-/
15:38ninjuddcraigmarshall9: i see.. you like to know what's going on under the hood. i'm the same way
15:38cemerick,(require 'clojure.string)
15:38clojurebotnil
15:38cemerick,(keys (ns-interns 'clojure.string))
15:38clojurebot(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:38cemerickthere we go
15:38alexyknice nice
15:39cemerick,(sort (keys (ns-interns 'clojure.string)))
15:39clojurebot(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:39alexykI guess I can then run doc on those
15:39alexykpoor man's api
15:39alexykguide
15:39cemerickhaving a browser window open is probably easier
15:39cemerick:-)
15:39alexykor, should I say ascii man's
15:39craigmarshall9ninjudd: 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:39alexykcemerick: best read with telnet to port 80!
15:40cemerickha
15:40cemerickpeople here are so damn hardcore, it makes my eyes bleed sometimes ;-)
15:40ninjuddcraigmarshall9: hehe.. that's kind of similar to how i ended up writing cake in the first place
15:40alexykhttp://www.dgate.org/~brg/bvtelnet80/
15:42ninjuddthough i did try to use and love other alternatives first (ant, maven. lein)
15:42craigmarshall9Telnet is for wimps, you should read straight from the CAT5 cable with a multimeter.
15:43craigmarshall9ninjudd: fair enough. I fully support all those things if they add to the development in some way.
15:43craigmarshall9ninjudd: Just wish I could install and run. I'm repeating myself badly now. Sorry about that.
15:43alexykLeiningen's son full name is Oedipus Cake Jr.
15:45craigmarshall9ninjudd: commodore 64?!
15:45ninjuddCake is going to marry his mother Rake
15:46ninjuddcraigmarshall9: yep, but it takes forever to download Ruby and the JDK
15:47craigmarshall9ninjudd: 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:47alexykninjudd: send evites to all of #clojure!
15:47alexykgranfather Make will attend
15:48alexykall the rednecks and hi-falutin European daddy Leiningen will have a drunken fight
15:49ninjuddcraigmarshall9: 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:49alexykninjudd: conceivably you could *always* run a gllbal JVM for that...
15:49ninjuddcraigmarshall9: 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:50ninjuddalexyk: how would you communicate with it?
15:50alexykninjudd: ugh.
15:50alexykninjudd: nailgun :)
15:50ninjuddcraigmarshall9: http://github.com/ninjudd/cake/graphs/languages
15:51craigmarshall9ninjudd: I see - shame that last 1% couldn't be clojure too :-0
15:51craigmarshall9:-)
15:51ninjuddalexyk: ruby is more cross-platform
15:51craigmarshall9Reduce the number of dependencies by 50%
15:52alexykwow, 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:52alexykit almost calls for some magic copy-paste solution
15:52ninjuddcraigmarshall9: as they say, "it is not possible"
15:53craigmarshall9ninjudd: Okay - I know nothing at all about java and clojure, as you might be able to tell.
15:54alexykninjudd: telnet to the global jvm with your bare hands! :)
15:54cemerickIMO, 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:54alexykpass the environment... ask it to do something
15:55dnolencraigmarshall9: this is the kind of complexity required for simple cross plaform, http://www.ohloh.net/p/python/analyses/latest
15:55dnolencemerick: for you, maybe
15:55cemerickdnolen: I'm talking about build tooling specifically, not scripting in general.
15:56alexykcemerick: too slow no question. In Western Mass, maybe OK. Boston, no. :)
15:56cemerickphfft
15:56cemerickWhose build is within an order of magnitude of jvm startup time?
15:58craigmarshall9dnolen: 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:58alexykcemerick: scripting and passing to repl from TextMate are perfect use cases
15:59alexykwhich is in fact the bulk of the lifecycle, it's not Java EE-like "builds" anymore
15:59cemerickalexyk: 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:00alexykcemerick: two different areas indeed
16:00rhudsonI 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:00cemerickalexyk: so, only manual releases and deployments for you? ;-)
16:01ninjuddcemerick: i think the overhead of installing and using NetBeans is way more than Ruby
16:01alexykcemerick: TextMate into repl! research and data analysis
16:01ninjuddRuby comes standard on everything but windows, and it is a one-click install there
16:01alexykfor big builds of roll-out software, even maven is ok
16:01alexykcemerick: but having a large-scale software product is more niche than scripting :)
16:02alexykdnolen deserves a prize for harnessing the powers of cake to textmate
16:02cemerickninjudd: 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:02alexykruby comes standard on mac, and we don't care about the rest. macs are all uniform.
16:03cemerickninjudd: but then, we've hashed this before :-)
16:03craigmarshall9cemerick: agreed
16:03ninjuddcemerick: i spent two days and couldn't get NetBeans working
16:03ninjuddthat's the overhead i'm talking about
16:03alexykruby us more stable than your grandfather's clock, I say
16:03scottjcemerick: don't you use a package management tool?
16:03cemerickninjudd: Damn, that's no good. You realize that 1000's of morts do it weekly, right? ;-)
16:04dnolencan't we just all get along :D
16:04alexykdnolen: we're getting along before your very eyes! :)
16:04cemerickyeah, this is all in good fun :-D
16:04ninjuddcemerick: maybe my brain is just incompatible with java IDEs
16:04cemerickscottj: There's no good package manager on OS X (I don't have the time or patience for source pkg managers).
16:05ninjuddcemerick: macports is great
16:05cemerickwha!?
16:05apgwozhas anyone ever tried to compile clojure using gjc?
16:05dnolenninjudd: now that's a bridge to far. macports has driven me batty as often as it's made me happy.
16:05cemerickThe last time I touched it, it ground away for *three* hours....was building openssl when I killed it.
16:06ninjudddnolen: hmm.. i've never had a problem with it
16:06eevarcemerick: you could try (home)brew
16:06ninjudds/great/sufficient/
16:06dnolenI tried to rabbitmq and it it downloaded like seriously 60+ other packages, wtf
16:06eevarmacports has been working fine for me, tho
16:06dnolens/to/to install
16:06dnolenthe fault it not macports but maintainers I know
16:06dnolens/it/is
16:07cemerickThe 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:07cemerickeevar: but next time I'm tempted, I'll take a look :-)
16:07ninjuddthat's the problem with any package management system.. had the same problem with debian and redhat years ago
16:07cemericknah, apt is bliss
16:08cemerickI don't care about it grabbing packages, I care about waiting for compiles.
16:08cemerick*of stuff I've got already*
16:08rhudson:)
16:08eevarapt is awesome, yea. I like pacman as well, even if the interface is weird
16:11scottjanything's better than dselect
16:15scottjSo 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:16chouserI use -Xbootpath all the time
16:17chousernot sure how much it helps
16:25callen-permnycI know this will sound a bit absurd, and I'm aware of Clojure CLR, but has anyone considered porting Clojure to LLVM?
16:27qbgcallen-permnyc: Many people have considered a port to LLVM to be a possibility once Clojure-in-Clojure is done
16:27opqdonutyeah
16:27opqdonutuntil that it's too married with objects
16:28qbgAnd a port is a lot of work, having to rewrite a lot of the implementation
16:28opqdonutI'd imagine implementing the concurrency features would take some effort in LLVM
16:28callen-permnycqbg: I know.
16:28rhudsonThere's also the question of GC & arguably JIT
16:29callen-permnycqbg: I was just thinking about it lately.
16:29opqdonutrhudson: excellent point
16:29callen-permnycrhudson: LLVM offers JIT.
16:29rhudsonah
16:29callen-permnycrhudson: LLVM is an intermediate target that happens to be able to compile some really efficient code, it's not a gcc.
16:29opqdonutanyway, JVM and CLR differ in nature from LLVM
16:29callen-permnycopqdonut: of course.
16:30opqdonutthey offer functionality that clojure depends on that would need to be implemented from scratch
16:30qbgCiC would help a lot with being up to date with the JVM implementation
16:36qbgAnother issue of course is the number of host-dependent libraries
17:03Raynesmmarczyk: ping
17:03mmarczykRaynes: pong?
17:03Raynesmmarczyk: I got the package. The coffee was delicious. :>
17:04mmarczykah, great :-)
17:04mmarczykhappy to hear that
17:04mmarczyknow, tell me
17:04mmarczykdid I misspell latte? ;-P
17:04RaynesTo 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:04Raynes:p
17:05mmarczykoh?
17:05mmarczyk:-D
17:06mmarczykI seem to have a vague recollection of being told that before, once or twice ;-)
17:07Raynesmmarczyk: I've seen more readable handwriting on prescriptions from 80 year old doctors with Parkinson's.
17:08mmarczykhm :-)
17:08RaynesHere is what I got out of the letter "Hi, Here's a ____ of CA, and a latte ____ from Coffee Haven. __ __ __, ___"
17:08mmarczykheaven ;-)
17:08RaynesThe only reason I got "latte" and "coffee heaven" is because I read it when I found the pictures.
17:08RaynesAye, typo.
17:08mmarczykbunch, straight, all the best ;-)
17:09RaynesAh!
17:09RaynesThe letter is now complete. :>
17:09mmarczyk:-)
17:09RaynesThe pictures are awesome.
17:09mmarczyk:-)
17:10mmarczykgood to know you've got it, it's got a bit overdue
17:10RaynesI highly appreciate it, and I owe ya one.
17:10mmarczyknot at all
17:10mmarczyknow fill in a copy and mail it on to Rich :-)
17:11RaynesSoon.
17:11mmarczykqbg: who said terrible :-P
17:11Raynesqbg: I don't know if it's terrible handwriting, or just that I can't read cursive.
17:11RaynesOf course, nobody else that I know could read it either.
17:11RaynesBut this is Alabama, after all.
17:12mmarczykmakes me internationally illegible ;-)
17:12mmarczykcross-continentally even
17:12Raynes:>
17:45RaynesI 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:45RaynesIn the CA, that is.
17:47mmarczykaye, it wasn't very clear to me either
17:47mmarczykI put down Clojure and contrib, listed my GitHub & Assembla usernames (as suggested on clojure.org)
17:47mmarczykall the while trying to fit it all into the little table :-P
17:48RaynesOh, that's what I figured. I didn't read the stuff on clojure.org
17:48Raynes:p
17:48mmarczyk:-)
17:48RaynesThanks. <3
17:48mmarczyk6 weeks later I was accepted into the fold ;-)
17:48mmarczyksure
17:51mmarczykRaynes: have a look at Stuart Halloway's first message here: http://groups.google.com/group/clojure-dev/browse_thread/thread/52eef34fb8e864f2
17:51mmarczykthough apparently it's not a problem at the CA processing stage
18:15Raynesmmarczyk: Surely he isn't saying your Assembla username has to be your real name or some permutation of it, is he?
18:16RaynesBecause I've already made my account and filled the damn thing out. ._.
18:17lancepantzyes, he is
18:18mmarczykRaynes: 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:18mmarczykbut I think that is indeed what he's saying
18:18RaynesI don't actually want to fill out 6 copies.
18:18RaynesWell, I'll take my chances.
18:18lancepantzthere are multiple threads on the dev list about this
18:18mmarczyksure. but it'd be alright if you needed to throw out one ;-)
18:19RaynesMy accounts can easily be associated with me, and I obviously can't change all of them now just to have a proper CA.
18:19RaynesIf they wont work, so be it. :\
18:19mmarczykat any rate, clearly Robert had his CA accepted before setting up a "recognisable" account
18:20mmarczykplus this only matters on Assembla, I think
18:20lancepantzyou can submit whatever you want on your ca, but stuart will ask you to change it before he enables it on assembla
18:20RaynesIt's amusing. More people would recognize me by "Raynes" than by my real name. ;p
18:20mmarczykI'm not sure if Assembla has the sort of "one rename only" policy that GitHub does
18:21mmarczykbut if you're not using it for anything else, you can just get another account...
18:21RaynesI don't like using my real name for user names because it's not standard and my name is reasonably long.
18:21RaynesBut, if I /have/ to.
18:23Raynesmmarczyk: I appreciate more than a single copy. I just get writers cramp way to easily. :P
18:50mmarczykRaynes: :-)
19:04arohnerClojure can get around class methods being private. Can it get around classes being marked final?
19:11tomojyou mean like gen-class'ing a final class?
19:13tomojextending a final class with gen-class, I mean
20:02hiredmanarohner: you can access methods and fields marked private
20:02hiredmanfinal classes are different altogether
20:03hiredmanyou can extend a protocol to a final class, but you cannot extend a final class
20:15tomojwhere else can clojure extend classes besides gen-class?
20:18hiredmanreify, proxy
20:19hiredmanactually maybe just proxy
20:19hiredmanreify may not work on non interfaces now
20:20RaynesI thought reify could only ever extend interfaces, always.
20:32mikejsbecause 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:34lancepantzso when are we going to get a clojure conference anyways?
20:43bendlasHi folks
20:44bendlas(+ 1 2)
20:44clojurebot3
20:45bendlas(sniptest "<a></a><b></b>"
20:45bendlas {[:a][:b]} (content "x"))
20:45bendlascan somebody tell me, why that sniptest doesn't do anything (enlive)
20:46bendlas?
20:54bobbytekQuestion: why use clojure if I can use another lisp?
20:54bobbytekwhat does clojure give me that I can't get from caml?
20:54seancorfieldinterop with java
20:55seancorfieldinterop with other jvm languages
20:56bobbytekand the jdk? can I leverage that and other java libs?
21:01bendlasbobbytek: yep
21:01bendlasworks really nice
21:02bobbytekbut most java libraries hold a lot of state. how does clojure accommodate this?
21:02bobbytekfor example, jdbc
21:03dnolenbobbytek: not yet really though perhaps some of rhickey's new ideas might help there.
21:04dnolenbobbytek: the tight integration with performant immutable datastructures is a big advantage. it seems like something that other langs are clamoring to copy :)
21:06bobbyteknot groovy :)
21:06dnolenbobbytek: are you a groovy user?
21:06bobbytekaye
21:06boojumbobbytek: you can serialize access to stateful java objects in agents
21:06bobbyteklooking at scala and clojure now
21:07dnolenbobbytek: groovy is dynamic biased no?
21:07bobbytekindeed
21:07bobbytekalthough groovy++ changes some of that
21:07bobbytekgroovy is heavily influenced by smalltalk and ruby
21:10dnolenbobbytek: huh groovy++ seems mostly about perf and basic compile time safety, not about rich type systems. scala is big on that.
21:11bobbytekmore complete static type system is by definition less dynamic
21:12dnolenbobbytek: 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:13dnolenbobbytek: also Clojure protocols are a fascinating addition for a dynamic lang.
21:13bobbytekI'm down with dynamic :)
21:15dnolenbobbytek: rhickey has done and continues to do some magical stuff. he's trying to satisfy dynamic programming while getting near static compiled perf.
21:15bobbytekthe only functional programming language I have used is caml
21:15bobbytekand c++ templates
21:15dnolenclojure is basically as dynamic as possible without sacrificing as fast as possible. that's why I got into it mysefl.
21:15bobbytekbut caml was a while back
21:16bobbytekdynamic in what sense?
21:16bobbytekruntime polymorphism? MOP?
21:17dnolenbobbytek: you have those things in multimethods and protocols yes.
21:26bobbytekhmm, groovy seems to support a limited form of macro in its AST transformation hooks
21:26bobbytekI'm still unclear on macros though
21:26bobbyteklooks kinda like a c++ template facility
21:29dnolenbobbytek: it *can* do that, 1.2.0but it can do a lot more.
21:30dnolens erg
21:30dnolen1.2.0 generic vectors illustrate using macros in that fashion.
21:31dnolenbobbytek: more importantly it can be used to "extend the language" so to speak. powerful stuff, though best used like saffron - in tiny amounts.
21:34hiredmanthere are really two types of macros you end up writing
21:34hiredmanpublic api sort of language extension macros
21:34hiredmanand CPP'ish preprocessor sort of things
21:34hiredmanlike if you need retry boiler plate for a bunch of operations
21:34hiredmanthe later tend to do horrible things like depend on expanding in a scope where a particular name is bound
21:35hiredmanbobbytek: 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:36dnolenbobbytek: it's possible to do very interesting things like read something from the file system in order to generate code at compile time.
21:54brweber2hiredman what is your opinion on clj-peg vs. fnparse (strenghs and weaknesses)?
21:55mmarczykhow do I go about using clojure-mode for highlights and such, yet having a universal 2 space indent?
21:56mmarczykin case anyone's got an appropriate elisp snippet handy :-)
21:57hiredmanbrweber2: I've only used the increasingly obselete fnparse2
21:59brweber2hiredman 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:59hiredmanthe in process rewrtie
22:54nickikHallo, whats the best way to count up something in a map?
22:55nickik (let [examplemap {:score 0}] (assoc examplemap :score inc))
22:55nickikbut using the inc function on :score not putting it into
22:55Scriptor,(count {:score 0})
22:55clojurebot1
22:55Scriptorwait
22:56rhudson'assoc doesn't change the value of examplemap; it creates a new map value
22:56somnium,(update-in {:x 0} [:x] inc)
22:56clojurebot{:x 1}