#clojure log - Aug 13 2010

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:04lancepantz: 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:06notsonerdysunny: 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...

3:57notsonerdysunny: 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:07LauJensen: To be honest I dont keep up with most lawsuits between software companies

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

4: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."

4: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."

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:08naeu: 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:09LauJensen: "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:10LauJensen: 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:11naeu: I'm just concerned whether there may be any repercussions to Clojure's implementation.

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

4:12LauJensen: 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:16LauJensen: 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:17eevar_: question is how, when our political systems are crooked as hell

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

4:37LauJensen: 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:38eevar_: LauJensen: well, countries where people can't afford meat probably have a shorter life expectancy

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:39eevar_: that's what i'm saying. people die off before they'd get cancer and develop heart conditions

4:40naeu: 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:40LauJensen: 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:44LauJensen: 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:47Folcon: Well basically I'm trying to work out how to get it to parse rules...

6:19cais2002: 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..

9:48chouser: 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:48stuartsierra: 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:52hugod: 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:52stuartsierra: arkh: a-function will resolve at the time you called send-off

9:55hadronzoo: 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:55stuartsierra: hadronzoo: are you setting the classpath on the java command line as well? That overrides $CLASSPAH

9:56naeu: 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

11:09polypus: 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:20polypus: cmerick: that's what i intend to do. just use it to generate a pom basically

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

11:26polypus: 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

12:39arkh: 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:40craigmarshall9: Hi - how do I run a clojure script from the windows command prompt? e.g. "python myscript.py"

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

13:50craigmarshall9: 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:51wooby: forget about the batch script solution, cljr is what you want :)

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

13:55craigmarshall9: 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:56 Yes - just at the playing/learning part. I'm at project euler level 1, at the moment.

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

13:57craigmarshall9: 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:59arkh: 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:59dnolen: 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:02dnolen: 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:04craigmarshall9: 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:07dnolen: 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:09craigmarshall9: 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:12dnolen: 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:13arkh: 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:13dnolen: 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:21craigmarshall9: 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:23craigmarshall9: 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:24ninjudd: arkh: it supports most emacs keybindings. i don't think there is a way to use vim bindings, but i'm not certain

14:26craigmarshall9: 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:54Raynes: 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:54apgwoz: ... and, if you're an emacs user, there's an easy way to start swank for that project, provided you setup lein-swank

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

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

15:10chouser: 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:10ninjudd: craigmarshall9: you have to give the full path to the jar

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

15:11craigmarshall9: 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:16* ninjudd ninjudd might be willing to rename the 'cake' bin script to 'clojure' if you'll make it part of Clojure. ;)

15:16craigmarshall9: 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:37alexyk: can we get a whole list of functions in clojure.string from within repl?

15:37craigmarshall9: 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:54cemerick: 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:56 Whose build is within an order of magnitude of jvm startup time?

15:58craigmarshall9: 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:58alexyk: 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:59cemerick: 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:00rhudson: 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: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:02cemerick: 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:02alexyk: ruby comes standard on mac, and we don't care about the rest. macs are all uniform.

18:18mmarczyk: 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 ;-)