#clojure logs

2009-12-14

00:50tolstoyhow do you get Ant to print out the classpath it thinks it has?
00:50tolstoyOops! Nevermind! Getting a useful error message! Yay!
02:44ordnungswidrigg'morning, all
03:24LauJensenMorning team :)
03:55LauJensenWhere are the results for the Wide Finder 2 runs ? For all languages?
03:58LauJensenAh got it
04:14LauJensenIs Danny from Dannynet present here today?
04:30G0SUBhey
04:30G0SUBI am facing some problems in downloading compojure using lein + clojars
04:31G0SUBcompojure depends on clojure-1.1.0-alpha
04:31G0SUBthere is nothing called clojure-1.1.0-alpha
04:31G0SUBit's either 1.1.0-master or 1.1.0-new
04:32hiredmanwell, you might be able to go into lein's cache (~/.m2/ maybe?) and just change the name of a jar file
04:36G0SUBhiredman: hmm, but why does compojure depend on a non-existent jar?
04:39hiredmanG0SUB: the name of the jars built was changed to include the name of the branch
04:40hiredmanhappened a few days ago
04:40G0SUBhmm
04:41G0SUBhiredman: any idea when compojure will get fixed?
04:41hiredmannope
04:42hiredmanI think I might have heard something about a recent version of lein that somehow works around this, but I could be wrong
04:42G0SUBhmm
05:06G0SUBhiredman: where can I get the project.clj file used for compojure?
05:08hiredmanno idea
05:08G0SUBok
06:02G0SUBwhich is the best FTP client for Java?
06:14carki'm using apache commons ftp
06:15G0SUBcark: any nice Clojure wrappers around it?
06:15carknot that i know
06:15G0SUBok
06:15carkit wouldn't be that usefull anyways
06:17G0SUBcark: found one http://github.com/kyleburton/sandbox/blob/master/clojure-utils/kburton-clojure-utils/src/main/clj/com/github/kyleburton/sandbox/ftp.clj :)
06:18carknice =)
07:17fliebelWoha! This morning I woke up thinking about an application as fluid going though a set of pipelines and filters from input to output. Like… streaming data instead of calling functions. I invented flow programming, looked it up on google, found this: http://en.wikipedia.org/wiki/Flow-based_programming This actually fits quite nicely in the lazy functional style of clojure, doesn't it?
07:21fliebelactually more like this maybe: http://en.wikipedia.org/wiki/Dataflow_programming
07:27karmazillaI wonder how common it is to have this experience where you reinvent dataflow programming. I've tried it too.
07:32lpetit,(doc promise)
07:32clojurebot"([]); Experimental. Returns a promise object that can be read with deref/@, and set, once only, with deliver. Calls to deref/@ prior to delivery will block. All subsequent derefs will return the same delivered value without blocking."
07:37fliebelkarmazilla: I'm not sure about that… anyone else had the same?
07:38fliebellpetit: that is something like a lazy var, right? I'm not sure if I understand that...
07:39lpetitfliebel: it enables threads to synchronize on the availability of data. Sort of "dataflow" building block
07:39fliebel,(doc deliver)
07:39clojurebot"([promise val]); Experimental. Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver on a promise will throw an exception."
07:40fliebellpetit: So I set up a whole train of functions to use that object, and the 'release' it with the input source?
07:42lpetitfliebel: something like that, but I'm not expert. Just remembered this having been mentioned in the ml. I guess if there are several functions waiting for the delivery of the value, they must be in different threads.
07:42karmazillalpetit: Neat. I've been annoyed that Java doesn't have a standard Promise class.
07:43fliebellpetit: yea, you'd need treads… or you'd need to be able to return something and then happily continue computations.
07:43lpetitfliebel: there is this :http://richhickey.github.com/clojure-contrib/dataflow-api.html , I don't know it much, though.
07:44fliebellpetit: sounds cool
07:45fliebelI've found another Wikipedia page about something like this: http://en.wikipedia.org/wiki/Functional_reactive_programming I think it might be more appropriate for a functional language…
07:55lpetitfliebel: yes, there so much interesting stuff to read. this one is close in my todo, also :)
07:57fliebellpetit: agreed! :D
08:08fliebelIt seems like such a powerful paradigm, yet I can find out so little about it. Some obscure languages doing it and some packages adding it to existing languages, most likely not designed with this paradigm in mind.
08:13lpetitfliebel: there's an introductory book on haskell which as a comprehensive example using this (if I remember correctly), but I didn't manage to get through the book past this example, since: 1./ I had little time to read the book, and 2./ I rediscovered clojure in the mean time :-)
08:14lpetitfliebel : there it is : http://www.haskell.org/soe/
08:16fliebellpetit: thanks
08:32LauJensenI apologize for the OT question, but Google is let me down. Does anyone know of a time-tracker with similar functionality as org-mode, which just sits in a little linux desktop app instead of Emacs? (not Hamster)
08:37ohpauleezLauJensen: I know of a Java-based time tracker app I thought looked real nice, but I never ended up using
08:37ohpauleezlet me see if I can dig it up
08:37LauJensenohpauleez: Makagiga? I'm looking at it right now
08:37ohpauleezLauJensen: http://rachota.sourceforge.net/en/index.html
08:37LauJensenah ok, thanks
08:38ohpauleeztotally welcome
08:50LauJensenIs there a way to pass the working directory as a command-line-arg to Java? java -jar /myproj/start.jar -wp /myproj ?
08:57fliebelI think you're supposed to cd there. If you only need the classes you can of course add it to cp.
08:57LauJensenk
09:10fliebellpetit: I found a new language! http://www.mozart-oz.org/ Not nearly as cute and clean as Clojure and Python, but it looks powerful.
09:15lpetitfliebel: yes, it's the language the "CTM" book is based upon
09:15lpetitfliebel: "Concepts, Techniques and Models" of programming. Great book, bought it, 940 pages, read ~ 50 at the moment :-)
09:16lpetitfliebel: http://www.amazon.com/Concepts-Techniques-Models-Computer-Programming/dp/0262220695/ref=sr_1_1?ie=UTF8&s=books&qid=1260800058&sr=8-1
09:16fliebelcool
09:18lpetitfliebel: honestly, I find it a little bit hard to follow. But certainly worth reading it because it does not impose a certain vision (object oriented, purely functional, imperative, declarative, etc) on you, but rather seems to present all those alternatives and compares them
09:19lpetitfliebel: by "compares", I don't mean with the goal of having some final word such as "which one is the best", but rather "which one works the best for which kind of situation"
09:20fliebellpetit: so you know oz?
09:20lpetitfliebel: just by name, and because it's the language used for the examples in the CTM book.
09:23lpetitfliebel: they use the notion of a "kernel language", with just enough primitives to allow write other primitives on top of it. They present the programming paradigms one by one, showing adding the missing primitives to the kernel language as they go, showing which notion is missing to be able to introduce each new paradigm.
09:23lpetitfliebel: sometimes I which I had not a job and could just sit at home in front of my laptop and with the dozen or so books I've bought but not yet read :-)
09:24LauJensenlpetit: sounds like an interesting comparison :)
09:25lpetitLauJensen: talking about my desire to have more time to study, or the previous post describing CTM ? :-)
09:26LauJensen"You'd want Objects when you need complexity which is unmanageable and no real tool for handling time. On the other hand, go with Functional paradigms for the cases where you dont want bugs and need a smaller codebase."
09:26LauJensenYour 'book review'
09:28lpetitLauJensen: where did you see this citation ?
09:28LauJensenI was just imagining what 'compares in terms of what to use when and not which is better' looks like written out in a book
09:29lpetitLauJensen: when I eventually finish the book (hopefully in 10 months, more certainly in 10 years) I promise I give you the answer :-)
09:30LauJensenI'll look forward to it :)
09:57Tommockhello
09:57Tommockcan anyone figure out what is wrong with this http://pastebin.org/64723 ?
09:59chouser((if ...)) will try to execute the return value of the 'if'
09:59chouserperhaps you want (if ...), this is only a single pair of parens
10:03Tommockchouser: oh so easy, thanks a lot!
10:04chousernp
10:04Tommockbeen trying to figure out what whas wrong for an hour or so now :)
10:04chouserout of curiousity, where'd the extra parens come from in the first place?
10:05Tommockmy reasoning probably whent something like "the body of the function should be inclosed by something
10:05chouserok
10:05chouserit jumped out at me because (( is pretty rare in Clojure code
10:05Tommockchouser: how is my indent style? looks ok?
10:05Tommocknot sure how things should look
10:07chouserThe body of 'do' should be indented another level
10:07chouserthat way the 'then' and 'else' parts of 'if' stand out as the only two things at the same level under 'if'.
10:08chouserother than that it's ok, though I'd recommend spaces instead of tabs -- 2 spaces per level is most common, though 4 is probably ok.
10:09Tommockchouser: my personal preference is tabs but thanks for the advice :D
10:10Tommockwell I
10:10Tommock'm off then
10:10chouserbye
10:21rhickeyhttp://clojure.org/funding
10:22chouserrhickey: might be good to have a donate button (or link to one) on that page.
10:22rhickeyI added a link back to the home page
10:22chouseroh ok, I see that now.
10:22rhickeycould put it right there...
10:25LauJensenrhickey: I think that a public indication of how much support you raise would be motivational for private contributors, how would you feel about that?
10:25rhickeyok, Donate button right on funding page now
10:26rhickeyLauJensen: I am asking people if they want to be listed on a Donors page, will set that up soon
10:27LauJensenrhickey: Not quite was I was thinking, but something like Wikipedias progressbars.
10:27rhickeyLauJensen: no
10:27lpetitLauJensen: you mean a progress bar towards a full year of work from Rich funding ?
10:28LauJensenYes something like that
10:28LauJensenI always find that stuff motivational
10:38cemerickrhickey: A donors page would be good. Mix that with the opportunity to list job openings from sponsors, perhaps.
10:42rhickeycemerick: you've mentioned that before - what's the idea there?
10:44cemerickrhickey: well, from the perspective of larger sponsors (whatever that means), being able to highlight that connection and therefore perhaps attract highly self-screened candidates (programmers already looking at the clojure.org site) would be an obvious advantage compared to existing recruitment paths
10:44iceyPython uses "sponsor members" for corporate donors: http://python.org/psf/#id2
10:44iceymaybe something like that?
10:45cemerickfor you and the broader clojure community, being able to show that there is an active job market lends to the language's credibility in all sorts of ways
10:46cemerickrhickey: I think it would be totally reasonable for you to host a clojure-centric job board, charge some nominal amount to submit listings (which obviously helps with the funding), and then sponsors' listings are always at the top, or highlighted, or whatever.
10:47cemerickicey: yeah, something like that, although the presentation there is...lacking
10:47rhickeycemerick: I'm all for job listings, I guess my initial pang is that limiting it to sponsors might be excluding. OTOH, once you are hiring Clojure devs, sponsoring is a good idea. This would be for Clojure-related jobs only, right?
10:48iceycemerick: well I'm not suggesting using their design ;) However, I do know that the donors page has turned into a good recruitment tool for companies that want to show that they support the language
10:48chouserwell. Clojure and PHP of course.
10:48rhickey:)
10:48angermanphew ... I can continue to use clojure.
10:48cemerickrhickey: oh, I would never say that listings should be limited to sponsors. I would say that a sponsorship of $X or more would get the organization in question N "free" job listings for the following year or whatever.
10:48angerman;;)
10:49cemerickrhickey: "clojure-centric" is a reasonable phrase, although the meaning is obviously flexible.
10:49chouser:-)
10:49cemerickheh
10:50angerman~t-test (:ns incanter.stats)
10:50clojurebotI don't understand.
10:50angerman:/
10:51cemerickrhickey: it's obviously going to be a little thin for some time, so until there's a regular deal flow, as it were, just keeping a list of available jobs on a static page would be fine :-)
10:51chouserangerman: I'm curious about your comment about continuing to use clojure.
10:51iceyYou could always threaten people with adoption of a bizarre Franz-like licensing model for forward versions ;)
10:51angermanchouser: I'm student at TU Munich
10:51cemerickouch
10:51angermanmoney is quite shallow
10:51chouserangerman: ah, ok. That was my guess.
10:52angermanMy stupid questions reveal my identity I guess, he
10:53chouserangerman: oh, nonsense.
10:54angermanwell, Google Talk on YouTube in 10 minutes. bye
10:55the-kennyGoogle Talk on Youtube?
10:55maddisperhaps a talk at Google live on YouTube?
10:55angermanyes. They host it in our biggest lecture hall at the Mathematics and Computerscience Bldg. Campus Garching.
10:57the-kennyOh, Google holds a talk about Youtube? I read it "Google Talk (the Xmpp-Service) on Youtube"
10:57angermanyes
11:02chouserit might be fun to add "I paid for Clojure" to your signature on google group posts.
11:03cemerickah, good idea
11:03iceyhave you considered forming a nonprofit (501(c)3) for the Clojure finances?
11:03cemerickif licensing won't do it, if entreaties won't do it, then shame will! :-)
11:03esjcemerick: you must be Catholic :p
11:03cemerickheh, hardly
11:04cemerickbut shame is a *wonderful* motivator.
11:04cemerickinternet anonymity makes it slightly harder to pull off, but it's worth a shot
11:09rhickeychouser: Yes, "I paid for Clojure" is a fine idea
11:09shooverAs distinct from a "Clojure was my idea" marketing campaign
11:10rhickey:)
11:10shooverOnly authors of books and langs on the Clojure reading list can put that
11:11the-kennyMaybe everyone who donates can get a handwritten closing-parenthesis from rhickey, xkcd does something like this with scans from their comics.
11:12chouserhaha! a closing paren.
11:12_fogus_If you donate above a certain amount you can get a matching opening paren
11:13Chousukewhat about the other data structures? :/
11:13iceyI wonder how much effort it would take to create one of those laminated 1-page "cheatsheets" you see out there, and sell them from the website. The language is small enough that the pertinent information should fit
11:15cemericklittle chotchkies are nice, but I'll wager making them would be a huge PITA for rhickey *shrug*
11:16iceycemerick: yeah, that's what i was concerned about
11:16stuartsierraYou'd want to outsource all the printing/delivery to something like cafepress.
11:16devlinsfcemerick: So do what PBS does, and "sell" them for $50 each
11:17stuartsierradevlinsf: Yes!
11:17iceyalthough, along the cafepress route, i'd certainly buy a clojure logo coffee cup. but that's probably just the caffiene addict in me speaking
11:17devlinsficey: :)
11:17chouserthere are already clojure T-shirts
11:17iceychouser: they don't hold my coffee well :(
11:18chouserto date they've brought in about enough money to pay for about 30mins of rhickey clojure development time. :-)
11:19chouserwhich granted is long enough to fully develop a feature like 'trampoline', but still...
11:19the-kennyicey: But you can drain them in coffee and absorb the coffeine with your skin
11:19iceyI definitely agree that straight donations are the most efficient way to go; but there will always be a number of people who won't donate straight cash but will buy little toys or whatever. no idea why, but i know they're out there
11:20_fogus_chouser: Are those the "State: YDiW" shirts?
11:20chouser_fogus_: there are a few styles.
11:21chouserhttp://www.zazzle.com/clojure
11:21chouser"don't be so eager"
11:21chouser"lisp is not dead. The url is now clojure.org"
11:21chouser"I get more done when I'm lazy"
11:22_fogus_Ahhh. I got the state shirt a long time ago but didn't know there were more to choose from. Looks like I will never again need to wear non-Clojure clothing.
11:23chouserheh.
11:23chouseroh, you bought it from zazzle? How was the print quality? I haven't seen one yet.
11:24_fogus_Very nice actually. Good quality fabric also. I've had it since perhaps day 2 and it's still in great shape.
11:26maravillascertainly there must be a threads pun appropriate for a tshirt
11:26hiredmanping?
11:26clojurebotPONG!
11:27hiredmanaww, come on
11:27hiredmanthere we go
11:29esjis it idiomatic to put your tests in .clj where the target functions are defined ?
11:30devlinsfesj: how are you testing?
11:30esjclojure.test
11:30devlinsfMy opinion is no
11:30devlinsfIf you were using the meta, I'd say yes
11:31devlinsfYou're talking about putting it all in the same ns, right?
11:31esjThanks. I tend to agree. I want to put them in a seperate file and then (use it. I'm missing something though, because then I run into ns issues.
11:31esjaaah, devlinsf, read my mind
11:32devlinsfWell, I do the following w/ my code
11:32devlinsfI have (ns a.long.ns ... and I define a test lib. Usually (ns test.a.long.ns
11:32devlinsfAlso depends one the code
11:32esjok
11:33devlinsfA lot of my stuff has a lib prefix in the ns
11:33stuartsierraesj: It's tempting to try to put tests and fns in the same file, I even tried to support it with clojure.test. But it ends up being messy in practice.
11:33esjthen test.a.a.long.ns uses a.long.ns and badda bind ?
11:33devlinsfbadda?
11:33esjs/badda bind/badda-bing/
11:33devlinsfOh, badda nibg
11:33devlinsfbing
11:33devlinsfYes
11:33esj:)
11:34esjok, thanks gents. This time I'm reall, REALLY, going to write the tests for my code...
11:34devlinsfcheck out contrib's structure
11:34devlinsfthere's clojure.contrib.a-ns
11:34esjdevlinsf: great idea, shoulda thought of that.
11:34devlinsfand usually clojure.contrib.test.a-ns
11:35devlinsfSome libs are different, though
11:35esjwill do.
11:35patrkrisI'm reviewing some of the articles that are critical of STM, and wondered if there is a fundamental difference between the transaction systems found in database systems that makes transactions viable in those and not in programming languages?
11:35devlinsfesj: Good luck
11:36chouserpatrkris: STM is a very broad category of functionality. Don't assume that critisizm of one STM implementation applies to another.
11:37esjdevlinsf: thanks.
11:37arohnerpatrkris: and even between programming languages, the functionality in one language STM is very different from another
11:38arohnermost of the "STM is a failure" articles you see talk about cramming STM into Java / C#, with little to no change in syntax or semantics
11:39patrkrischouser, arohner: yes, but reading "STM: Why is it only a research toy?" gives the impression, that there is something fundamentally wrong with STM - but I see so many things in that article that doesn't apply to Clojure's implementation
11:39arohnerSTM in java with lots of mutable state everywhere and no change in language semantics is a very different beast that building STM in at the start to a functional language with immutable data
11:40patrkrisarohner: yes you are right
11:40arohnerthe proof is still in the pudding. their articles really just say "*we* couldn't get STM to work". Look at clojure yourself, and decide if clojure got STM to work. :-)
11:41patrkrisyes... their focus is also on performance, it appears. Doesn't matter whether your programs are correct, I suppose :)
11:41chouserfor one, because of the immutable collections and other reference types, you can actually do quite a lot of even multithreaded work in Clojure without ever using the STM.
11:41dabdwhere is the macro 'defprotocol' defined?
11:42chouserdabd: in the 'new' branch
11:42patrkrischouser: yes, that is one of the things I am going to mention in what I'm writing
11:42dabdchouser: I'm trying to compile the enclojure plugin and it fails because it uses this macro
11:45liwpdabd: defprotocol is defined only in the 'new' branch of the clojure github repository, so if you're using the 'master' branch or the 1.0 version of clojure you won't have the defprotocol macro
11:46liwpdabd: you'll have to move to the 'new' branch to be able to use the compojure plugin if it depends on defprotocol
11:46hiredmanliwp: enclojure
11:46liwpuhh, sorry
11:47hiredmanit's odd that enclojure would depend on the new branch
11:47chouserthat's what I was thinking.
11:47chouserdabd: maybe you should try a slightly older version of enclojure?
11:48dabdchouser: yes currently I'm unable to use enclojure because it fails to start a project REPL
11:48dabdso I was trying to build it from source to see what is happening
11:49cemerickrhickey: to what degree are you going to report on fundraising efforts? I know that's getting very close to your personal finances, but being able to say "X has been raised across N contributions averaging K per contribution" would be interesting/encouraging.
11:50dabdhiredman: you can see defprotocol being used here in the enclojure source http://github.com/EricThorsen/enclojure/blob/master/src/protocols/src/org/enclojure/protocols.clj
11:51rhickeycemerick: maybe X% of a year of funding? and a graph/chart?
11:52cemerickrhickey: sure. A normalized distribution of contribution amounts would be decent.
11:53cemerickPeople could infer a lot from something like that, so I wouldn't blame you for not sharing to that degree.
11:53iceyrhickey: the only real problem with stating a goal like that is that I think you'll end up less likely to recieve donations as you near your goal
11:54iceyalthough it's not bad for the time you're under 50% of your goal
11:54rhickeyicey: true
11:54cemericksomeone mentioned a progress bar before though, which can be motivating for some
11:55Chousukewhat's the minimum donation that benefits you, by the way?
11:56iceyhmmm... if you made the progress bar the goal for 2 years instead of one, it'd probably be less of an issue - even if you exceeded the goal for 1 year, it would give you the chance to start raising for the next year
11:56iceyand if you could raise 2 years worth of funding inside of a 1 year window, you could change the verbiage
12:01iceyI am curious if today's push will pay for at least a month of development when all is said & done.
12:21reifytime to ebay all my non-essential computer equipment =)
12:21reifyclojure, the "cloud", is all i need
12:23_fogus_Hacker News seems to think that Clojure was created by some guy named Rick.
12:31maddisi have a remote REPL running through leiningen ('lein swank') and connected to it through M-x slime-connect, but I can't figure out how to compile/run local code I have open in another buffer through C-c C-k (or the slime-compile* commands). and tips on that?
12:32the-kennymaddis: Maybe with M-x slime-connection-list?
12:32the-kennyIt should be possible to make a connection the "default" one in that buffer.
12:41maddishmm, on C-c C-k it tires to find the local file on the remote location, which is not there.
12:41maddis1 compiler notes: Unknown location: error: java.io.FileNotFoundException: /home/matthias/da/code/garec/src/garec.clj (No such file or directory). Compilation failed.
12:42maddisor am I completely wrong here and this all works different? :)
12:46the-kennymaddis: Hm.. then try M-x eval-region
12:46the-kennyuhm
12:47the-kennyslime-eval-region or slime-eval-buffer
12:49maddisok, that works. thanks
13:00the-kennyWhat are the naming-conventions for the defproject from leiningen, if I want to push it to clojars>
13:01patrkrisare there any case studies available of large applications with a high degree of concurrency using Clojure (and especially the STM) succesfully?
13:03maddispatrkris, perhaps this will help you: http://portal.acm.org/citation.cfm?id=1562870
13:04patrkrismaddis: thanks
13:49qedwhere can we donate to clojure?
13:49hiredmanclojure.org
13:49qedoh, right :)
13:49qedthanks
13:50KirinDaveI hope Rich will disclose how much he makes in a day from this campaign. ;)
13:54qedKirinDave: heh
14:09headiustechnomancy: ping
14:15djorkif I spent as much on Clojure as my wife did on her hair rhickey would be better off
14:15djorkor at least his wife could get her hair done
14:16LauJensenIs Matt of Conjure fame here tonight?
14:20technomancyheadius: ICMP_ECHO_REPLY
14:20headiushi there!
14:21headiusI was going to suggest we should bundle up a gem that's just clojure and release it
14:21headiusso other gems could depend on that one
14:21SergeyDidenkoHi, could anyone advise the workaround for the absent "byte-array"? - (byte-array [1 2 3])
14:21headiusI want to do a pass at wrapping the collections with some Ruby stuff
14:21technomancyheadius: oh yeah, sure. I don't think my gem ever made it out to any servers outside github, so there shouldn't be any overlap issues.
14:21headiusok
14:21SergeyDidenkoIs "make-array" + "aset" the only way?
14:22cemerickSergeyDidenko: (into-array Byte/TYPE [1 2 3])
14:22technomancyI never quite got that exception-wrapping problem solved for transaction retries.
14:22cemerick,(into-array Byte/TYPE [1 2 3])
14:22clojurebotjava.lang.IllegalArgumentException: argument type mismatch
14:22cemerickhrm
14:23cemerickyuck
14:23cemerick,(into-array Integer/TYPE [1 2 3])
14:23clojurebot#<int[] [I@1a8de42>
14:23cemerick,(into-array Byte/TYPE (map byte [1 2 3]))
14:23clojurebot#<byte[] [B@2b9edc>
14:23cemerickSergeyDidenko: Looks like ^^ is the best you can get right now
14:24chouser,byte-array
14:24clojurebotjava.lang.Exception: Unable to resolve symbol: byte-array in this context
14:25SergeyDidenkocemerick, strange it does not work on my computer. Probably I need to get the latest sources
14:25hiredmanSergeyDidenko: that should work
14:25hiredmanwhat exception are you seeing?
14:25cemerick,(into-array Integer/TYPE (map byte [1 2 3]))
14:25clojurebot#<int[] [I@1994498>
14:25SergeyDidenkocemerick, do you use the recent Clojure version ?
14:26cemerickSergeyDidenko: I'm generally on 1.1-new, although that should work fine even in 1.0 (I think)
14:27SergeyDidenko(into-array Byte/TYPE [1 2 3]) throws java.lang.IllegalArgumentException: argument type mismatch (NO_SOURCE_FILE:0)
14:27lghtngI started out wanting to just contribute a few sparql wrappers as a learning project and now im sitting here reading Marvin Minsky's "Semantic Information Processing" c.1968: Is there a word for that?
14:27danm_SergeyDidenko: missed the map byte part
14:27chouser1.1-alpha and 1.1-new should have byte-array now.
14:27cemerickah, (into-array Byte/TYPE [1 2 3]) would work if a type.cast() call were made in RT.seqToTypedArray
14:27SergeyDidenkothank you guys :)
14:27chouserlghtng: enlightenment?
14:28cemerickalthough I suppose we wouldn't want the overhead
14:28lghtngworks for me
14:34KirinDaveI think I may have a functioning webapp using compojure. Whee.
14:34KirinDaveWhat compojure needs, what every webapp framework needs, is a generator.
14:35chousernonono
14:35cemerickooh, this'll be fun :-)
14:35KirinDave?
14:35Chousukegenerator? :/
14:35lghtngtransformer
14:35KirinDaveLike, lein new.
14:36Chousukeaha.
14:36KirinDaveSomething that does mundane shit like drop a shell script that can help target public and things like that.
14:36Chousukewrite a lein plugin!
14:36cemerickKirinDave: don't mind me, I've just always enjoyed the dynamic vs. static site debate.
14:36the-kennyShould be easy to write a leiningen plugin for this :)
14:36Chousukenein new-compojure :P
14:36KirinDaveSure.
14:36Chousukelein* too
14:38hiredmanhttp://github.com/hiredman/appengine-helper
14:41the-kennyGoogle should allow Threads for clojure :(
14:41stuartsierraMy take on datatypes/protocols: http://stuartsierra.com/2009/12/14/objects-are-not-adts
14:44KirinDaveMan, the power of SSDs
14:44KirinDaveit takes less time to start my app in -server on my laptop than on this big server.
14:44maaclDoes anyone know of any Crane usgae examples ?
14:54jgracinI see that add-classpath has been deprecated. Is there some new way of modifying classpath at runtime?
14:56the-kennyjgracin: IIRC, changing the classpath just causes problems, I wouldn't do it.
14:56danm_all I've read is that you can't
14:57danm_so if you want to change the classpath, restart clojure
14:57the-kennydanm_: There *was* add-classpath in clojure, but it just caused problems, so it's deprecated now.
14:57danm_yeah
14:57danm_it never seemed to work for me anyway
14:57stuartsierraIt's a problem with how classpaths are usually implemented in Java.
14:58stuartsierraThe root classpath is created when the JVM starts and cannot be changed.
14:59hiredmanstuartsierra: would replacing the system classpath fix that?
14:59hiredmaner
14:59stuartsierrahiredman: You can't replace the system classpath without hacking the JVM, I think.
14:59hiredmansystem classloader
14:59stuartsierraYou can replace the system classloader I think.
14:59hiredman-Djava.system.class.path
14:59stuartsierraYes. But that's real JVM voodoo right there.
15:00hiredmanhttp://gist.github.com/255766
15:01hiredmandanm_: I'd like to see people who had trouble with add-classpath try this out
15:01rhickeyjava.system.class.loader
15:01stuartsierraLike I said, voodoo.
15:01hiredmanrhickey: right!
15:02hiredmanrhickey: would that fix the visibility problems from add-classpath?
15:02jgracinI have a standalone application which needs to contact a configuration registry system and find out which plugins to load.
15:02rhickeyI think it would be generally useful for someone to make a solution based upon that, just for development
15:02rhickeythe big problem is that people will build runtime dependencies on it, and that can't be satisfied in all runtime environments
15:03hiredman:| like the above mentioned plugin system
15:03rhickeyhiredman: yes, it would not have those problems, but it can't be used in all situations, i.e. when you don't control startup
15:03hiredmanright
15:04hiredmanI was thinking along the lines of lien
15:04hiredmanlein?
15:04stuartsierraSee? No one can spell it!
15:04hiredman:P
15:05lghtngtangential question: can the classpath be modified via emacs/slime?
15:05hiredmananyway, that gist above generates a cl.jar (that contains a classloader class) and prints out (cryptic) usage instructions
15:05stuartsierralghtng: no, same problem
15:08fanatico,seen technomancy
15:08clojurebotjava.lang.Exception: Unable to resolve symbol: seen in this context
15:08lghtng.seen technomancy
15:08hiredmanclojurebot: seen technomancy?
15:08clojurebottechnomancy was last seen quiting IRC, 18 minutes ago
15:09fanaticothanks.
15:11qedJust sent my relatives an email asking they donate to clojure instead of buying me presents or gift certificates.
15:11qedHopefully they haven't gotten me anything yet. :)
15:15lghtnghttp://en.wikipedia.org/wiki/GNU_Classpath
15:16hiredman:|
15:22maddisqed, that is a really good idea! don't think my parents/relatives understand that, but it's worth a try :)
15:23qedmy mom wont have a clue, but my dad actually asked me if clojure was like dylan
15:23qedi was pretty surprised he knew about dylan :)
15:24the-kennyqed: Bob Dylan? :P
15:24qedhaha
15:24qednah, you know, the programming language
15:25qedhe's an old mac nerd, worked w/ Kai Krause and Eric Wenger once upon a time
15:25maddisi thought of Dylan from 90210, the tv series ;P
15:25qedhahaha
15:26the-kennyMy father asks me every two days if and how he can copy a folder into another folder.
15:26qeddo you tell him `cp -R`
15:26qedas in "you'll need `cp -R` if you ask me that again"
15:26the-kenny...he is using windows
15:26qedget him on ubuntu and show him how to google
15:27the-kennyI told him if he want me to keep supporting him with computer related things, he should either buy a mac or let me install linux.
15:27qedi really think that there needs to be some google instruction for people
15:27the-kennyWe agreed to do this when his current laptop dies
15:27qednice
15:27the-kenny(Which should happen in the next months :))
15:28the-kennyHe's also using an old pc with a pentium 2 in his office
15:28the-kennywindows 2000
15:33qedThat is..old
15:33the-kennyYes
15:33qedThere are still some machines we support that run Win2k unfortunately
15:34the-kennyand full of viruses ;)
15:34the-kennyIt's time to replace it.
15:39the-kennyI had a dream last night about a cool project in clojure and something with tagsoup.... But I forgot what it was :(
15:50lghtngwould be interesting to see clojure running inside jnode or looking glass
15:50lghtngor as an appliance in jnode
15:51hiredmanmaxine!
15:51hiredmanguestos vm!
15:51qedlooking glass?
15:52qedis that a way to view router configs?
15:53lghtnghttp://research.sun.com/projects/maxine/max.html
15:53lghtnglg3d has been pronounced dead by its founder
15:54lghtngthe deb repositories dont work but there is still an .iso built on pclinuxos
15:57lisppaste8the-kenny pasted "lein deps problems" at http://paste.lisp.org/display/92100
15:57the-kennyCan someone tell me where's the problem there?
15:58hiredmanstuff got renamed a few days ago yadda yadda yadda
15:58qedsomeone was talking about this the other day
15:58qedyeah
15:58qedi think chouser is the guy who renamed some stuff
15:58cemerickdarn that chouser :-P
15:58qedthe-kenny: your best bet is to just download them and put them in ~/.m2
15:59hiredmanclojurebot: rename?
15:59clojurebotHuh?
15:59hiredmanclojurebot: rename is <reply>clojure-alpha was renamed clojure-master, and this broke most of the projects on Clojars
15:59clojurebotIk begrijp
16:00qedclojurebot: rename?
16:00clojurebotclojure-alpha was renamed clojure-master, and this broke most of the projects on Clojars
16:00qedclojurebot: @markov chouser
16:00clojurebotWho??
16:00qedheh, worth a shot...
16:02the-kennyhm.. how long will it take clojars to normalize again?
16:03hiredmanI imagine it is up to the projects to update their config and push
16:04the-kennyYeah, got that.. maybe someone should write about this in the mailing list?
16:05hiredmanhas been
16:05hiredmanlike a week ago, or something, when the rename came up
16:06the-kennySo [org.clojure/clojure "1.1.0-master-SNAPSHOT"] is the right thing to include in project.clj now?
16:06hiredmanI suppose
16:10the-kenny_ato: Is that your compojure-jar on clojars?
16:17qedwith file-seq, I get a coll of Files, im trying to break them up into a structure like xml
16:20IntertricityIs there a clojure equivalent to python's pickle?
16:22maravillasc.c.duck-streams/spit and /slurp maybe?
16:22stuartsierraNo.
16:23arohnerpr is closer, but still not comprehensive
16:23stuartsierraIntertricity: read/pr gets you 9/10 of the way there
16:23Intertricitystuartsierra, ahh thanks :)
16:24qedNo matching method found: parse for class com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
16:26hiredmanqed: read the docs on parse and pass it one of the specified classes
16:28drewrchouser: I'm happy to fix that *-seq issue
16:29drewrthe buggy patch is from me :-/
16:33qedhiredman: I have something like (file-seq (java.io.File. "/path/to/dir")) -- parse looks like it takes Files, so why can't I parse that?
16:33hiredman,(doc clojure.xml/parse)
16:33clojurebot"([s] [s startparse]); Parses and loads the source s, which can be a File, InputStream or String naming a URI. Returns a tree of the xml/element struct-map, which has the keys :tag, :attrs, and :content. and accessor fns tag, attrs, and content. Other parsers can be supplied by passing startparse, a fn taking a source and a ContentHandler and returning a parser"
16:34hiredman,(doc file-seq)
16:34clojurebot"([dir]); A tree seq on java.io.Files"
16:34qedhow would i turn what I have into an InputStream?
16:34hiredmanhmmm
16:34hiredman~def file-seq
16:35lghtng,(doc element)
16:35clojurebotNo entiendo
16:35qedhow could I turn it into an InputStream?
16:35lghtng,(doc :tag)
16:35clojurebotjava.lang.ClassCastException: clojure.lang.Keyword cannot be cast to clojure.lang.Symbol
16:35lghtngright
16:35lghtng,(doc InputStream)
16:35hiredmanwhat does the output of file-seq look like?
16:35clojurebotExcuse me?
16:36qed(#<File /Users/defn/foo> #<File /Users/defn/foo/bar> #<File /Users/defn/foo/bar/bar.txt> #<File /Users/defn/foo/baz> #<File /Users/defn/foo/baz/baz.txt> #<File /Users/defn/foo/foo.txt>)
16:36lghtng,(doc startparse)
16:36clojurebotGabh mo leithscéal?
16:36qed(doc clojure.xml/startparse)
16:36clojurebotTitim gan éirí ort.
16:37lghtng,(doc clojure.xml/startparse)
16:37clojurebotexcusez-moi
16:37qed(doc clojure.xml/startparse-sax)
16:37clojurebot"([s ch]); "
16:37hiredmanand how are you calling parse?
16:37lghtng,(doc ddt)
16:37clojurebotExcuse me?
16:37hiredmanlghtng: knock it off
16:37lghtngeep
16:38qedhiredman: i tried to just run (parse (file-seq...)), also tried to map it to see if that worked but got an exception about content and prolog
16:40hiredmana. file-seq does not return one of the types mentioned by xml/parse b. the other error most likely means you don't have a well formed xml file (the default parser is a stickler)
16:40hiredmanignoring exceptions like that is a bad habit to get into
16:40hiredmanjust the fact that you are getting a different exception is useful information
16:41qedi guess my question is, can i turn that file-seq output into an inputstream
16:41hiredmanit won't matter if your xml is not well formed
16:41hiredmanwhich is most likely what that exception was trying to tell you
16:41qedah, okay -- ill mess with it and try to figure out what's up with it
16:45lghtngdoes clojure do natural inheritance? like native OO?
16:45ChousukeClojure is not very object-oriented.
16:46lghtngor does it rely on backdoor methods like CLOS did?
16:46Chousukebackdoor?
16:46ChousukeI'm not sure what you mean.
16:46lghtngwe've got object orientation, only its all extentions
16:47lghtngso inheritance is something you build, not included
16:47Chousukethe closest to a native OO construct in Clojure (not interop) would be defprotocol and deftype I guess.
16:47the-kenny_ato: ping
16:47Chousukebut even those emphasise *decoupling* objects from methods
16:47chouseralso 'derive' and multimethods
16:48hiredmandispatch hierarchies are reified
16:48lghtngi know it can do all those things and alot more, im just wondering how much has already been done
16:48chousermultimethod dispatch has type inheritence built in.
16:49lghtngsince this is all library building stuff going on here, there is a SHITLOAD of undocumented stuff thats available but unlisted
16:49hiredmannot true
16:49hiredmanclojure.org
16:49lghtngwe dont want any unnecessary duplication, right?
16:49ChousukeI'm not sure what you mean.
16:49ChousukeWhat are you looking for, exactly?
16:50lghtngjust knowledge
16:50hiredmanlghtng: I would avoid righting a oop library for clojure
16:50hiredmanI doubt anyone will use it
16:50lghtngi have no plan to, im just interested in the state of it's emergence
16:51lghtngas it will emerge, just at what rate and how dominant it will be
16:51chouserwhat feature are you looking for that such a library would provide?
16:51lghtngits funny about that
16:51ChousukeI mean, if you really want to do the "traditional" kind of OOP, maybe Clojure isn't the best language. However, many things you would do using OOP in other languages are perfectly doable using non-OOP methods in Clojure.
16:51lghtngnothing in particular
16:51lghtngnot me, in general
16:51hiredmanthere is at least one oop library that has already been abandoned
16:52hiredman~rationale
16:52clojurebotrationale is http://clojure.org/rationale
16:52ChousukeOOP in clojure that is not completely whacked is essentially equivalent to having functions that take some "special" value as their first argument, anyway.
16:53hiredman"for Functional Programming"
16:53hiredmanclojurebot: oo?
16:53clojurebotOO is to programming what astrology is to astronomy
16:53Chousukeheh :P
16:53hiredmanclojurebot: why oo sucks?
16:53Chousukebut I think protocols and deftype will satisfy most people's "OO" needs.
16:53clojurebotOO is to programming what astrology is to astronomy
16:53lghtngi've recommended clojure to developers as an alternative to java, so far the answers have ranged from 'what about side effects' to 'what about side effects'
16:53hiredmanclojurebot: why oo sucks is <reply>http://www.sics.se/~joe/bluetail/vol1/v1_oo.html
16:53clojurebotIk begrijp
16:54hiredmanlghtng: you mean the questions
16:54lghtng'ignore side effects at your peril' seems to be the moral that java programmers are offering
16:54dnolenlghtng: it might be helpful to look at some of the long threads discussing this stuff on the mailing list, there a couple actually.
16:54Chousukelghtng: Clojure is not purely functional, so just write side-effecting functions.
16:54drewrdoes Sean Devlin hang out on here?
16:55chouserdrewr: at times
16:55lghtngi should see if the guy will come here to speak with you himself
16:55dnolenlghtng: also don't understand the "what about side effects"? Clojure is firmly in the anti-side effects camp.
16:55chouserDid someone recommend ignoring side-effects? seems unlikely
16:55hiredmandnolen: but not purely functional
16:56Chousukelghtng: clojure even provides time constructs for managing a real process (which has side-effects, in the form of changing state). :)
16:56dnolenhiredman: yes, of course.
16:57lghtngstate transactional memory, right?
16:57lghtngand if you want side effects you use 'do'
16:57chouserit's not nearly that magical
16:57Chousukelghtng: software transactional memory
16:58lghtngah, that
16:58hiredmanlghtng: you don't have to use do
16:58Chousukelghtng: it's just a bunch of mutable reference types with well-defined concurrency semantics.
16:58hiredmanclojure seemlessly calls java
16:58hiredmanjava is full of side effects
17:00lghtnga side effect is basically just something a function does that isnt part of its return value but affects something outside it's scope?
17:00ChousukeI guess so.
17:00ChousukeThat's probably not a rigorous definition, but anyway :P
17:01lghtngit turns the knob 1 quarter turn to the right, igniting the flame on the burner
17:02lghtngit places the teapot onto the burner
17:02hiredmanhttp://en.wikipedia.org/wiki/Side_effect_%28computer_science%29
17:02Chousukelghtng: rather, it activates the machinery that does those thins :)
17:02Chousukethings*
17:02chouserthe future is a function of the past
17:02hiredmanlghtng: if your world is map, then a function can return an updated map with the new position of the teapot
17:03chouserhistory is its domain
17:03Chousukehiredman: but you also need a side-effecting procedure to activate the machinery.
17:03chouserright, it depends on if you're simulating the world or actually interacting with it.
17:03Chousukehiredman: but as long as you isolate the side-effecting procedure from the "pure" world-map model, you're golden.
17:05hiredmanChousuke: he never mentioned machinery, so to assume he isn't just doing world modeling is a mistake
17:05ChousukeI'm pretty sure the pure model always exists, too, since software of course needs some values to work with. :)
17:07hiredmananyway, clojure is targeted squarly at java, and as such can do anything java can do (except annotations, at this point)
17:11ChousukeI guess in automation terms, the "pure model" would be your transfer functions, and the things that integrate them with the real world are the DA or AD transformers.
17:12Chousukeand the clojure stm models the fact that inputs are functions of t.
17:13Chousuke(hey, at least it's not a car analogy)
17:13lghtngwhich fits nicely with the concept that the program is the data
17:15lghtngthat clojure goes ahead and takes the next step of collapsing alot of byzantine verbiage is really helpful in learninr
17:15lghtngit should be the exception that proves the rule, not the rules that prove the exception
17:17lghtngthat the author has to explicetly take alot of time in the videos to explain, well, this is a that and that is a this and they are pretty much the same thing and frankly irrelevant shows that there are so Original Ideas(tm) operating here, which is really cool and innovative-like
17:20ChousukeIf you dig deep enough, I'm sure few of the ideas in Clojure are truly original
17:20Chousukebut it's the combination of them that makes it interesting :)
17:22lghtngsometime we all need to learn to ignore that missile-radar warning in our ears and go ahead and accept a new paradigm with grace
17:23lghtngwe are not all equally blessed in that regard, so it's fortunate for me that clojure appears to embrace that spirit
17:23lghtngmaybe i can finally learn how to program :D
17:24ChousukeYou don't have to forget the old paradigms either. But chances are that once you learn new things, you realise that you *should* forget some things you learned previously
17:25ChousukeLike when learning about complex numbers... Addition and substraction still work pretty intuitively, but what, you suddenly can calculate the square root of a negative number? shocking!
17:26lghtngwhat previous knowledge must be forgotten there?
17:27lghtngperhaps you mean the example of 1C+1C=1C where C=light-speed?
17:29Chousukehm, I haven't seen that example.
17:32Chousukebut you might have learnt that it's not possible to take the square root of a negative number, and complex numbers give you a way to meaningfully do that, opening up new possibilities. Then, when you examine the properties of complex numbers, many assumptions you previously had about numbers will likely need to be revised :)
17:32lghtnggranted.
17:47hiredmanclojurebot: big o?
17:47clojurebotHuh?
17:47hiredmanclojurebot: big o is <reply>http://twitter.com/cgoldberg/status/6340157473
17:47clojurebotIk begrijp
17:58qedhiredman: haha
18:00ohpauleezhaha, that's awesome
18:02arohnerdoes defmacro support let-destructuring its arguments?
18:02hiredmanyes
18:03arohnerthanks
18:04maddisi am using this (http://wiki.github.com/technomancy/leiningen/emacs-integration) method from technomancy to connect to a remote repl. is there any way to open only a local port on the server side and tunnel everything through ssh? I am not very comfortable with opening my repl to everybody on the internet.
18:04arohnerssh -L localport:localhost:remote-repl-port user@remote
18:05ohpauleezthat way or socat
18:06arohnerthat will connect to the remote box, and tunnel traffic from localhost:remote-repl port to localport on your box
18:06maddisok, that's a ssh tunnel. but isn't the port on the server side still open to everyone?
18:06arohnerno
18:06maddiswith open I mean, everybody could connect?
18:06arohnerit tunnels traffic from localhost:remote-repl-port to localport on your box
18:07arohneranyone on your box can connect to localport
18:07arohnerif your firewall is set up properly, the repl port is closed to outsiders
18:08arohnerthen you ssh in via the SSH port, and tunnel is created on your side. the only remotely accessible open ports are 1) ssh on the remote box, 2) localport on your box. I assume the firewall on your local box is set up properly :-)
18:08maddisyou mean the firewall on the server side? that is not the case here...that's why I ask this question :)
18:09maddishmm, ok
18:09maddisi guess I have to thing about this again :)
18:09arohnerthis will work, even if your box allows no open connections, and the remote box only allows SSH connections
18:09esbenainstalling clojure-mode (using ELPA) results in: 'clojure-slime-config: Cannot open load file: swank-clojure-autoload' - known problem?
18:09esbena
18:11hiredmanI think you have to pass an argument to ssh to let connections not originating from localhost traverse the tunnel
18:14mabesis the fn rest lazy? I have a lazy collection which I want to map all of the elements except the first one...
18:15arohnermabes: rest will evaluate the first item, and not evaluate the rest of the list
18:15mabesarohner: ok, great, thanks
18:18polypushow to get a function's arity?
18:19the-kennypolypus: (:arglists (meta (var +)))
18:19the-kenny,(:arglists (meta (var +)))
18:19clojurebot([] [x] [x y] [x y & more])
18:20polypusty, is this also for user defined functions? i thought not
18:21the-kennyWorks with user-defined funcions too.
18:21technomancyesbena: yep; it's been deprecated. see the readme for swank-clojure.
18:21maddisarohner, i think you got me wrong. i am talking about the port 4005 opened by the swank server on the server side. when I start the server with 'lein swank', one could connect to that port simply with slime-connect in emacs
18:21the-kennyBut you have to know the symbol, as far as I know, there is no way to get the arity of functions itself.
18:22arohnermaddis: yes, swank-server will open port 4005 on the server side. If you don't want that to be accessible to anyone, firewall it off. Block everything on the box except port 22
18:22polypusthe-kenny: right its metadata on the var really
18:23arohnermaddis: the ssh command I wrote above will open a port 4006 on your box, which all traffic on your side will go through ssh to the remote box, and then to localhost:4005, from the perspective of the remote box
18:23maddisok, so there is no option to let it accept only local connections. thanks :) will block it through the firewall
18:23maddisarohner, yes, I got the ssh part.
18:24maddismy issue was only the open port 4005 on thr server side. that's all
18:24polypus,(:arglists (meta (fn [x] x)))
18:24clojurebotnil
18:25hiredmanthe arglist metadata is not on the function, but on the var
18:25the-kennypolypus: Functions don't have metadata. Only the vars
18:25the-kennyThat's what I was trying to say
18:25the-kennySorry, English isn't my native language.
18:26arohnermaddis: I haven't heard of an option to make swank only listen on localhost. It might be possible
18:26technomancymaddis: it should be added in swank-clojure, but it doesn't exist yet afaict.
18:26arohnerI'm sure the patch would be easy
18:28maddisi was just wondering because I read this page http://common-lisp.net/project/slime/doc/html/Setting-up-the-lisp-image.html#Setting-up-the-lisp-image
18:28maddissee footnote 2
18:28hiredman*snort*
18:29polypusis that a thread local snort?
18:30the-kenny,*snort*
18:30clojurebotjava.lang.Exception: Unable to resolve symbol: *snort* in this context
18:51jeremyevansIs there a Clojure function similar to Ruby/Perl/Python pack/unpack, such that (unpack "V" "\0\1\0\0") returns 256
18:52jeremyevansOr any other facility to pack/unpack integers to/from strings?
18:52djorkno but it sounds like fun to write
18:53djorkseems like a clojurey kind thing to have
18:53djorkhttp://www.perlmonks.org/?node_id=211105
18:53jeremyevansdjork: Thanks. Shouldn't be difficult, just didn't want to recreate the wheel
18:54hiredman,(Integer/parseInt "0100" 16)
18:54clojurebot256
18:54jeremyevanshiredman: That's "0100", not "\0\1\0
18:54jeremyevans0"
18:55hiredmanI understand, but what is the poing of the slashes to begin with?
18:55hiredman,(Integer/toString 256 16)
18:55clojurebot"100"
18:55jeremyevanshiredman: "\0" is ascii 0x0, "0" is ascii 0x30
18:56jeremyevanshiredman: "0100" and "\0\1\0\0" are two very different things
18:57jeremyevans,(= "\0" "0")
18:57clojurebotfalse
18:58hiredmanping?
18:58hiredmanclojurebot: ping?
18:58hiredmannuts
18:58clojurebotPONG!
18:58clojurebotPONG!
18:59hiredmanclojurebot: why?
18:59clojurebothttp://clojure.org/rationale
19:14fawxtinanyone running swank-clojure, doing a remote REPL with lastest slime?
19:15dnolenfawxtin: I'm not sure that you can use latest slime, there were some breaking changes a while back.
19:16RaynesI really wish they would change the name.
19:17RaynesYou can't tell someone you're running Slime without extra explanation.
19:17fawxtindnolen: oh, I see, it seens to work with old versions (using the simple swank.swank/start-server ...)
19:18fawxtinbut now when I eval "list" expression (with parenthesis), it hangs up
19:19dnolenfawxtin: I use slime from the git mirror, I note that I'm on commit 74a4b66bf85f55e878df2974ab3d713f87c1a42f.
19:19fawxtindnolen: nice!
19:19fawxtinlet me see
19:20dnolengit mirror -> github mirror
19:20fawxtinyeah, sure
19:27Raynesdnolen: I've seen some of your SO posts. Nice ones. ,3
19:27Raynes<3*
19:28dnolenRaynes: SO posts?
19:30fawxtindnolen: worked really fine, thanks
19:30dnolenfawxtin: great!
19:31Raynesdnolen: Stackoverflow
19:31dnolenfawxtin: there was some effort to try to keep the slime devs from breaking Clojure support, hopefully something comes of it. It was really great for a year or so.
19:31dnolenRaynes: oh yes, thx.
19:35fawxtindnolen: I see, it must be hard as hell to keep sync on everything
19:35fawxtinfor slime devs
19:43fawxtinor not.. dnolen, that commit seens to be one of the lastest (if not *the*) to work
19:44dnolenfawxtin: yes, I used to always stay at slime tip, I believe it's only a 2 or 3 commits before it broke at most.
19:48tomojwhat's the breakage look like?
19:49fawxtinthe eval hangs up
19:50fawxtinIm brute forcing to see what commit broke it
19:50fawxtineval I mean repl
19:53fawxtinfound the bad guy: 22dba9f590a55977f41cb9a333012e9cb6619505
19:54_atoWTF? https://gist.github.com/ffc64fc2a18382dbfaf6
19:54_atousing a non-direct buffer and looping over the underlying array with aget is also slower than the infinite loop with a underflow catch
19:54_atoNIO is weird
19:58_atoand it's not that (.remaining) is O(n), even if I call it above the loop it still doesn't slow down the second one
19:59_atomaybe the JIT does more magical inlining in the second case or something
20:00alexykI want to parse twits like "hey @man there's a #clojure blog at http://bot.ly/xyz&quot; into: @names, #hashtags, URLs, and remaining words. Questions: how do folks tag token types, and is there a library to simplify this?
20:00dnolen_ato: you going to publish your blog post soon, or are you still fine tuning wf2-optimized? :)
20:04alexykI I mean I can boringly scan and add characters to a StringBuilder... should I then place into a map, {:token blah :kind :url } or something?
20:05alexykis this how algebraic types are simulated? :)
20:06_atodnolen: still fine tuning my extremely optimised version. I had an idea that might make it (shock!) competitive with C++, but NIO is proving troublesome. It can be *really* fast in certain cases, but it seems to be really easy to slow it down, like that weird example I just posted
20:06dysingerrhickey: are around ?
20:07dnolen_ato: wow, head to head with C++. I'm impressed you got it close to Ocaml, that's a feat. Those are respectable numbers already.
20:47arohneris there a way to specify that a #() should take any number of arguments, but only use the first one?
20:48arohnerI have a #(foo %1) that is unhappy about being called with more than one argument
20:49timothypratley(fn [x & ignore] ...) :)
20:50arohnertimothypratley: yeah ;-), I was hoping for a #() form
21:25harrison,(floats (into-array [1 2 3]))
21:26aldebrnI need to do FFTs in Clojure (really need to :D), are there any gold-standard Java FFT libraries? or wrappers to FFTW?
21:34harrison,(floats (into-array [1 2 3]))
21:34harrisonclojurebot seems to be slacking
21:39tomojclojurebot: botsnack
21:46harrisonis there any way to make a float array from clojure? (not a Float array. i'm using java.nio.FloatBuffer, and it wants a float array)
21:46chouser(floats (float-array [1 2 3]))
21:47chouseryou don't need 'floats'
21:47tomojhuh, how long has floats been there?
21:47tomojand ints, never noticed them
21:48chouserif your version of Clojure doesn't have float-array, you can use (into-array Float/TYPE [1 2 3])
21:49harrisonchouser: excellent. float-array was all it needed. i wasn't aware that existed. also, floats is redundant there.
21:50liebkealdebrn: I've never used it, but checkout jtransforms (which is included in the Incanter distribution): http://sites.google.com/site/piotrwendykier/software/jtransforms
21:57chousertomoj: a while now. booleans, bytes, chars and shorts are newer.
22:02hamzaguys, i don't know if this is one of those FAQ questions but why does
22:02hamza, (seq? [1 2 3])
22:02hamzaequals false?
22:03laughingboyNewbie Q: Is it possible to change the current working dir used by load-file?
22:03tomojhamza: vectors aren't seqs
22:03harrisonthese nio buffers are a pain in the ass.
22:03tomoj,(seq? (seq [1 2 3]))
22:04tomojclojurebot would say "true" if she were not dead
22:04hamzatomoj: is there a pred for testing vectos?
22:04hamzahe he
22:04hamza*vectors
22:04hamzaor should i use (seq? (seq ..))
22:05tomojwell, there's vector?
22:05tomojbut is that what you really want to know? that what you were given was a vector?
22:05clojurebotfalse
22:05clojurebottrue
22:06tomojoh hello there clojurebot
22:06hamzalol, i assumed it vas vec? i am iterating a vector using recursion i want to use this for stopping contition
22:06tomojthen, no, I don't think you're looking for vector?
22:06laughingboyNewbie Q: Is it possible to change the current working dir used by load-file?
22:07tomojwell, what will the value be when you want to stop?
22:08hamzai am going rest rest so i can use nil? then right?
22:08tomojif you're using rest, you're not getting a vector anyway
22:08tomoj,(vector? (rest [1 2 3]))
22:08clojurebotfalse
22:08tomojunless I misunderstand you
22:09hamzalaughingboy: (System/setProperty "user.dir" "mydirectoryPath") works in java but i never used it in clojure.
22:09hamzaohh ok there is my mistake..
22:09tomojif you're using rest, you're getting seqs
22:09laughingboyhamza: thx, I will try
22:10tomojthe idiomatic stopping condition is (if (seq ...) ...)
22:10hamzaok so seq? then should work so i got another logic problem.
22:10tomojif you use next instead you will get nil when you're done
22:11hamzaok thanks..
22:11tomojmight be better to use seq anyway, depends I guess
22:42interferondoes clojure have support for annotations?
22:42arohnerinterferon: no
22:47interferonare there ways to work around that?
22:49arohnernot that I know of
22:54KirinDave1Is there a way to react to a ref or atom changing?
22:54arohner,(doc add-watcher)
22:55arohneroh, no clojurebot
22:55arohneranyways, add-watch and add-watcher
23:04drewrany slime users have issues with namespaces not being recognized when there's metadata present?