#clojure logs

2009-03-17

00:01gavin___I also see the InterruptedException on a (Thread/sleep 10) like you describe
00:02durka42when i press C-c, or run "kill -INT <pid>" the REPL just exits
00:02gavin___durka42: did you run (add-break-thread!) first?
00:02durka42oh, no i didn't
00:02gavin___;-)
00:03Chouserif we get all these kinks worked out, perhaps the repl will someday do this by default
00:04gavin___would be nice, the other day I was about to gouge my eyes out from having to kill and restart my repl over and over ;-) too much fun with infinite sequences
00:05Chouseryou've tried *print-length* ?
00:05gavin___no, I need to. But I think I wasn't smart enough to use lazy sequences to begin with, i.e. my code really was going into an infinite loop
00:05gavin___loop/recur madness
00:08Raynesgavin___: You have too many _'s in your name. Feel's like you're calling a function and disregarding its arguments.
00:09gavin___lol. I don't really use irc much, just typed gavin into my client and this is what i got
00:10RaynesYou can change your nick with /nick if you want.
00:12gavindsthanks, found one!
02:32RaynesI'm learning all sorts of swingfoo.
02:32RaynesI'm about to drown in BorderLayouts
03:53RaynesGetting people to check out Clojure is almost a sport to me now.
04:02Lau_of_DKTop of the morning gents
06:00AWizzArdclojurebot: max people
06:00clojurebotmax people is 162
06:51Lau_of_DKAWizzArd, What is max people ?
06:51Lau_of_DK~max people?
06:51clojurebotmax people is 162
06:51Lau_of_DK~162?
06:51clojurebotIt's greek to me.
07:05AWizzArdLau_of_DK: the highest number of people at the same time in this channel.
07:05AWizzArdRecord is 162.
07:05Lau_of_DKOh ok
07:05Lau_of_DKSo its the record of all time
07:06AWizzArdYes.
07:06AWizzArdI remember when it was around 80 in October.
07:06AWizzArdLau_of_DK: hmm, since you came here the number of users doubled
07:06Lau_of_DKAs expected...
07:06Lau_of_DK:D
08:36gnuvinceGood morning
08:37rhickeygnuvince: hey - did you get anywhere in your perf tuning?
08:39gnuvincerhickey: nowhere yet, I'm planning to branch my code and try different approaches. I'm beginning to think that my declaration of byte fields might be suboptimal.
08:40rhickeyyou should focus on your innermost loop(s) - profiling should have pointed that out, but that profiler output looked goofy
08:45gnuvinceThe weird profile output was due to the JVM packaging problem in Hardy; running it on my Ibex machine gave me a much more "believable" output.
09:01lpetithi all
09:02gnuvinceHello lpetit
09:06blbrown_lthello all
09:46danlarkinbig mistake coming into the office today... we're three floors above an irish bar and I can still hear them
09:47gnuvincedanlarkin: hahaha :)
09:47gnuvinceawesome
09:57Chouser,(assoc (bean Integer) :a 1)
09:57clojurebotjava.lang.reflect.InvocationTargetException
09:57Chouserhm.
09:57ChouserI get java.lang.AbstractMethodError
09:58p_lanyone knows the state of trivial-http? I'm wondering whether I should modify the lib to use drakma or leave trivial-http in...
09:59danlarkinChouser: it works on my box
09:59Chouserdanlarkin: what rev do you have?
10:00danlarkinclojure 1327, java 1.5
10:00Drakesoncompojure.html provides a handy way for generating html from trees, like [:html [:body [:p "Hello world]]] -> what you would expect. Is there a reverse convertor?
10:02Chouserdanlarkin: ok, that rev works for me too
10:02danlarkinah ha
10:02Chouser1328, 1329, 1330 were all proxy patches. bean uses proxy. it's broken now.
10:06Chouser1328 works fine
10:06Chouserfor this test, anyway
10:06Chouser1329 breaks it
10:08cgrand,(.assoc (bean Integer) :a 1) ;works...
10:08clojurebotjava.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers)
10:09Chouserhuh
10:10Chouserbut casting the proxy to Associative first breaks it?
10:13rhickeydanlarkin: current svn passes all 2278 assertions in contrib tests
10:15rhickeycgrand: you'll probably need to look at what javac generates in the same scenario - covariant returns inherited from multiple interfaces
10:16rhickeyprobably two methods, one marked as bridge
10:17Chouseryikes. I bet I'll have to understand that soon.
10:18Chouseror maybe I'll just crib off of whatever cgrand comes up with.
10:19rhickeyChouser: you'll need to understand that because ... ?
10:20cconstantineclojure newbie here. Is there anyway (besides 'take') to end an infinate sequence?
10:20Chouserrhickey: so that 'instance' can emit the right code.
10:20cconstantinepreferably with a tester func
10:21rhickeyChouser: I see - how's that going?
10:21ChouserI haven't started on any emits yet, so perhaps I misunderstand what I'll need to understand
10:21rhickeyI'd like to get involved ASAP, ASAP being after ILC
10:21ChouserI'm enjoying it.
10:21Chouseroh!
10:21Chouserwell
10:21rhickeyA good first target is source code
10:22rhickeyemit target
10:22Chouserthere's a chance that by then analyze/compile will be done.
10:22cconstantinecconstantine: take-while thanks :)
10:22Chousera good chance it will be sorta working, but may need a lot of cleanup
10:23rhickeyI have a lot of ideas about this (obviously), doing something a second/third time is always productive
10:23ChouserI'm learning as I go -- generally I translate a class or method a bit rote, not understanding. Then it clicks and I can clean it up a bit.
10:23rhickeyOne thing I'm not sure will be possible from source is locals clearing
10:24Chouseryeah, if you need to look at what I've done, smile politely, and do it over from scratch, I won't be offended. :-)
10:24rhickeyI want to get ASM out on its own
10:26Chouserwhat I have is still very mutable -- lots of dynamic vars and even a few atoms. But I'm afraid of removing that the Wrong Way before I understand where the mutation is currently being used.
10:27rhickeyChouser: that will have to go at some point. as I said before, I think I'd be happy to pass/return more than I did in Java
10:27ChouserI expect to have analyze for all the special forms "done" in the next couple days, and was then planning on cleaning out all the mutation.
10:29rhickeydef is only marginally special, I'd like to make it not so, leaving let/letfn/do/if/./try/loop/recur/instance/quote/var/assign ...?
10:31ChouserI've got let, loop, do, instance so far. Working on "dot" now
10:31rhickeyI would thread the environment through analyze, and have it return an (extensible) map
10:31ChouserI hope you find some of this code useful, but I really don't know.
10:32rhickeyChouser: I think it would be a fantastic addition and appreciate the help
10:32Chousermy code's not up anywhere yet. I would hesitate to show it to anyone, but if that'd be better than me trying to describe it...
10:32rhickeycould easily see new ActionScript and ObjC targets
10:32Chouseryes, absolutely
10:33ChouserThis is already the level at which ClojureScript works
10:33rhickeyClojure ... on ... iPhone ... (I dare not consider)
10:33Chouser:-)
10:33Chousukehmm, writing firefox extensions in clojure...
10:34shooverChouser: What the heck are you talking about? the clojure-log hasn't caught up
10:34Chouseranalyze currently takes a single form arg -- everything else is in dynamic vars (even context, because I didn't see why it should be special)
10:34rhickeyhrm
10:35Chouserso I think it'll make the most sense to pass two args -- form and an "env" map
10:35Chouserand similary return two things: the ast of the form, and an updated env map.
10:36rhickeyChouser: env definitely implies environment of names, maybe context map, which would include environment et al
10:36Chouserthen places that currently have (into [] (map analyze args)) would have to be some kind of reduce
10:36rhickeymost analysis doesn't return modified env, but does need to communicate a few things out, esp. closed-overs
10:37rhickeyand nested instances
10:37Chousershoover: The clojure compiler is currently written in Java. We're talking about re-writing it in Clojure.
10:37shooverah
10:38Chouserrhickey: ok, it's the details of what can be "changed" by sub-forms that I need a better grasp of before I try to kill all the mutation.
10:39ChouserI'm under the vague impression that sets of vars, keywords, constants, etc. need to bubble up
10:40ChouserI'm very pleased with the LOC-per-concept, and the grouping of code by multimethod rather than by type. I think it makes the whole thing much easier to understand.
10:40rhickeyright, encapsulated in registerXXX
10:40Chouser...as will removing mutation.
10:40rhickey+ closeOver
10:42Chouser1000 LOC for analyze + compile + emit might be a bit optimistic
10:42rhickeyLisp in Lisp is really quire easy and pretty
10:42rhickeyquite
10:43Chousukehow are you going to handle bootstrapping the thing? are you just going to keep the java compiler in for bootstrapping purposes? :/
10:44rhickeyChousuke: yes, some version of Clojure will always exist from now on
10:44ChouserI need a better name for eval/expr/statement context. "context" is too vague
10:44rhickeyit needn't be the Java version, just AOT-compiled
10:44Chousukeright.
10:45rhickeyChouser: ah, that context, never goes away with these targets...
10:46ChouserI keep hoping eval will, but yes I assume expr vs. statement is important.
10:46Chouseris that "emit context"?
10:46rhickeyexpr/statement/return
10:46Chouserah, yes
10:46rhickeyemit-context is fine
10:47rhickeyit is very much about the target capabilities/distinctions
10:48rhickeyone thing that is tricky is that right now some lambda wrapping/lifting occurs during analysis, might not apply to all targets (but probably will)
11:17Chouseranyone know of a static method in the standard Java library that takes 0 args?
11:18cgrandChouser: look at Desktop
11:19triddellSystem.currentTimeMillis() ?
11:19Chousergreat, thanks guys.
11:19blbrown_ltRuntime.systemCurrentTimeMillis() ...or whatever
11:19blbrown_lttriddell, beat you
11:19blbrown_ltof course mine is wrong
11:26triddellterm
11:31marklarHas anyone here done anything with Android? I'm trying to put a class I created using gen-class (extends SurfaceView) into a layout file and it can't find the class
11:32marklaror another way to ask that is if I call something like (ns net.marklar.clojuretests :gen-class :name surfaceview.... what would be the fully qualified name of that class?
11:35danlarkinmarklar: http://github.com/remvee/clojurehelloandroid/tree/master
11:37marklardanlarkin: Yes, I've looked at that... I've been able to load programs programs into the emulator and run them, but I'm having trouble loading this custom class in a layout
11:37marklarI have a feeling it has to do with the fully qualified name of the class that is generated
11:38danlarkinI think the class name would be net.marklar.clojuretests.surfaceview
11:39marklardanlarkin: yeah, thats what I thought, thanks
11:39danlarkinalthough I haven't really done much at all with gen-class
11:39danlarkinso I could be wrong, and often am!
11:40marklardanlarkin: the two of us couldn't be wrong, could we?!?!
11:40ChouserI think you need to fully-qualify the :name arg
11:41marklarChouser: ah, ok I'll give that a shot
11:41Chouser":name aname The package-qualified name of the class to be generated"
11:41marklarah thanks
11:41marklarguess we could be wrong ;)
11:42Chouserit's pretty common to leave out the :name arg, and do one class per namespace/file
11:42Chouseroh
11:42Chousernm
11:42Chouserdon't leave out the :name arg. :-)
11:42Chouser"Options should be a set of key/value pairs, all except for :name are optional"
11:42marklarChouser: lol ok :)
11:42danlarkin:o
11:43danlarkinI'm not using :name :-[
11:43danlarkinand it worked! a few revisions ago anyway
11:43marklarI think there is a difference between using (gen-class) and (:gen-class) right?
11:43marklarI've used :gen-class without a name before
11:44rhickey(doc ns)
11:44clojurebotSets *ns* to the namespace named by name (unevaluated), creating it if needed. references can be zero or more of: (:refer-clojure ...) (:require ...) (:use ...) (:import ...) (:load ...) (:gen-class) with the syntax of refer-clojure/require/use/import/load/gen-class respectively, except the arguments are unevaluated and need not be quoted. (:gen-class ...), when supplied, defaults to :name corresponding to the ns name, :m
11:44marklarrhickey: ah, thanks
11:46danlarkinhere's my one and only use of :gen-class, http://github.com/danlarkin/madison/blob/59dd04cd3723e9fbcb83ca40724e18312106bc9d/src/madison/main.clj
11:47danlarkinand that gets Main-Class'ed in the jar
12:23jhawk28I think I got Issue 34 fixed
12:24jhawk28:)
12:42jhawk28I posted the fix to the Clojure group
12:43AWizzArdjhawk28: did you sign the Clojure Contributor Agreement?
12:43jhawk28yep
12:44jhawk28Joshua Foster (jhawk28)
12:44jhawk28http://clojure.org/contributing
12:44AWizzArdThen your fix has a chance to get checked in :)
12:44jhawk28as long as its not too noobish
12:45rhickeyjhawk28: that seems to miss the main intent - you are reading something you don't necessarily trust, so it is unlikely to contain #r, the idea behind a flag is: (binding [*read-eval* false] (read untrusted-source))
12:46rhickeyi.e. it requires no new reader syntax, just the reader looking at *read-eval*
12:47jhawk28the problem with the (binding [*read-eval* false] (read untrusted-source)) is that the reader does not have visibility of the *read-eval* at read time
12:47rhickeywhy not?
12:47jhawk28its not in the thread scope
12:48rhickeysure it is
12:49rhickeyyou just have to access the var from Java, and use .deref
12:50rhickeywill see the thread-local binding
12:50jhawk28the .deref always pointed to the inital value of true while in the reader
12:50jhawk28it would point to false if I used set! instead of binding
12:51jhawk28but set! changes the global value instead of thread local
12:52rhickeynone of that is true
12:53jhawk28most likely, Im a clojure newb
12:53rhickeyset! can't change a root binding, and dynamic bindings are visible during a read nested within binding
12:53rhickeycan you paste what you tried?
12:53jhawk28just so that I understand what you are saying...
12:55jhawk28(binding [*read-eval* false] #=(eval (def x 3)))
12:55Lau_of_DKHi guys
12:55jhawk28I may have been focussing on the wrong problem
12:55WizardofWestmarcheya Lau
12:55jhawk28I was trying to disable the use of the EvalReader which is #=
12:56rhickeyjhawk28: you are mixing up the reading of that expression and its evaluation, people aren't going to put (binding [*read-eval* ... in the thing being read
12:57rhickeythey are going to do an explicit read/load-file inside a binding
12:57rhickeythe thing they are reading might contain #=, which they want to disable
12:57jhawk28ah, ok like the load-string
12:59rhickeyright, or read-string
13:00jhawk28(binding [*read-eval* false] (load-string "#=(eval (def x 3))" ))
13:00jhawk28I knew I was missing something
13:00rhickeyit's unlikely to be load, since it is untrusted
13:01rhickeyread-string should be your use case
13:01jhawk28ok, thanks
13:01jhawk28I'll remove the extra reader and add the doc for *read-eval* to the core.clj
13:03jhawk28should I be using Var.get or deref? get calls deref
13:03rhickeyderef
13:06rhickeyhttp://constc.blogspot.com/2009/03/relativity-of-simultaneity.html
13:10danlarkinthis opening paragraph sure is glowing
13:13danlarkinhe puts his idea into words well, I think. I like it
13:14ChousukeIt made me think about the sinfest Buddha character who in some strips just walks around without saying anything and touches the other characters on the forehead and *ping* they experience a moment of Zen
13:32pjstadigclojurebot: any message?
13:32clojurebotI don't understand.
13:33pjstadigbah
13:37fandahello!
13:38fandaI have question about the reader
13:38fandahttp://clojure.org/reader
13:38fandaNumbers say "as per Java"
13:39fandaI found that e.g. "2." read Java as double and Clojure as int
13:40fandaall these read as double in Java:
13:40fanda2. .1 +.0 -.0 +2. -2.
13:41fandaClojure either sees them as int or errors out
13:41fandaok, not ok?
13:42jhawk28I think you need 2.0 0.1 +0.0 +2.0 -2.0
13:43fandayes, I know - I am just wondering about consistency Java vs. Clojure reader
13:43fandado we want to copy all Java behavior exactly?
13:43pjstadigfanda: i'm not sure how exactly Clojure is supposed to match Java in that regard
13:43pjstadigbut could be a bug
13:44fandaI will post it to the group
13:45fandait's apparently rhickey's call to answer
13:46fandathanks!
13:48ChousukeI don't think being able to use .5 instead of 0.5 is a significant enough convenience that it should be supported. :/
13:49danlarkinwell I think he's just asking about the inconsistency
14:13jhawk28fanda: 2f is not accepted in Clojure as a float
14:14jhawk28fanda: I have a feeling that the "as per Java" is in reference to the types and limitations associated with the type rather than the syntax of the type
14:17fanda_jhawk28: I posted a question to the group, so hopefully Rich answers
14:18fanda_it is more of a theoretical question than any need
14:20hiredmanthe 2f thing sounds familiar, it may have come up before
14:20fanda_(float 2) ? ;-)
14:22hiredmanI think someone was asking for clojure's reader to read 2f as a float
14:24fanda_yes, floats are supposedly faster than doubles, so number crunching people use floats
14:42lisppaste8beatis-fly pasted "lame merge" at http://paste.lisp.org/display/77190
14:43baetis-flyanyone feel like telling me how to make the above a little less ... lame?
14:44rhickeybaetis-fly: add a comment that describes what it is supposed to do? ;)
14:45baetis-flyrhickey: ah, that would be helpful wouldn't it :) It does what it's supposed to do (i think). Takes two sorted collections and returns a single one. I know there are other ways to do this, but I wanted to do it from scratch.
14:46baetis-flyrhickey: it's the classic merge used in a merge sort.
14:47baetis-flyrhickey: actually, the two lists don't have to be sorted...takes two unsorted cols, returns one sorted col made up of the elements of left and right. which is still an awful explaination.
14:47baetis-flyrhickey: ug, scratch that last one. they do have to be sorted.
14:47cmvkknah, if you pass unsorted colls to it, the result won't be sorted.
14:48baetis-flyyeah, brain melted there for a second.
14:48baetis-flyanyway, it works for what I want it to do, but I hate the reverse i have to do when i'm done, and i just feel like some functional wizard could do it in one line :)
14:49cgrandbaetis-fly: use a lazy-seq instead
14:50baetis-flycgrand: see, i was going to get to that as well, but was having a hard time understanding it. Do I just have to wrap the whole thing in (lazy-seq o?
14:51cmvkkbasically, then instead of recur, you (cons (first left) (merge-col (rest left) right)) or something like that
14:53baetis-flyand I don't have to worry about the stack I take it?
14:54cmvkkthat is my current understanding, yes.
14:56lisppaste8cgrand annotated #77190 "for; baetis-fly" at http://paste.lisp.org/display/77190#1
14:59baetis-flycmvkk: doesn't quite work, but i get the idea. That's pretty awesome. Many thanks.
15:02lisppaste8beatis-fly annotated #77190 "lazy version fixed" at http://paste.lisp.org/display/77190#2
15:02lisppaste8cgrand annotated #77190 "now with matching parenthesis!" at http://paste.lisp.org/display/77190#3
15:02baetis-fly:) thanks again. that's really cool.
15:03cgranddidn't see you fixed it :-)
15:04slashus2baetis-fly: Or you could just use concat
15:04slashus2wait
15:04slashus2forget I typed anything
15:05hiredman!
15:05hiredmanthe skills matter podcast whatever is up
15:09lisppaste8rhickey annotated #77190 "merge-coll redux" at http://paste.lisp.org/display/77190#4
15:11baetis-flyrhickey: that looks cool too. has the added benefit of making me learn what :as is for ;)
15:15Chousukethat is asking for a merge-coll-by :)
15:15Chousukeor -with perhaps
15:22slashus2One of my professors went to the Washington D.C. conference on parallel computing last weekend, and he said that people there were excited about clojure.
15:23hiredmanhttp://video.google.co.uk/videoplay?docid=-4617600643842067036&amp;hl=en
15:24danlarkinheh, I saw that date, 12-30-2009, and I was like... uhhh what? it's not December yet
15:24danlarkin03, rather
15:38hiredmancrazy little-endian dates
15:38RaynesCould someone give me an example of something that a set would be useful for.
15:38RaynesI'
15:38RaynesI'm drawing blanks.
15:39hiredmana collection of things with no dupplicates
15:39hiredmanalso sets are functions of their members
15:39hiredmanso doing lookups
15:41Retonatorhey guys what is the best starter to learn some clojure (i have read most of the blogs and the main site etc...), maybe some project euler problems?
15:41RaynesProgramming Clojure.
15:41RaynesWonderful book.
15:42hiredmanyeah, euler is good for learning the sequence functions
15:43harpastumI'm currently working through this detailed article: http://ociweb.com/jnb/jnbMar2009.html
15:43harpastumyou might try that
15:44Chouseralso good for learning to work with immutable collections
15:44Retonatoryeah i have been looking at the book didn't know if it would be a good investement
15:44Chouserimmutable locals
15:44Retonatorharpastum: i will be looking at it
15:45Retonatoryeah i really have to read up on all the data structures
15:45Chouserwell, read some, but trying to use them will teach you quick.
15:45RaynesI was wondering because, I'm conjoining a number too a vector after every button click and then getting the numbers from that vector and doing stuff with them, but a set would work just the same.
15:46RaynesA set would probably be more appropriate.
15:46ChouserRaynes: if the order doesn't matter, sure.
15:46Retonatoryes trying things out is worth alot
15:46hiredmanwell, do want a set of unique elements, or a vector of numbers?
15:46danlarkinorder or dupes
15:46RaynesNope, sure doesn't.
15:46Retonatorharp: seems a pretty good link
15:46RaynesOh I see, you can't have duplications in it.
15:46RaynesVector it is.
15:47Chouseryou want to know how many of each number, but the order doesn't matter?
15:48hiredmando you even need the properties of a Vector?
15:48RaynesI just need something I can put 2 numbers in, and then first-last them out.
15:49RaynesI don't need anything special at all.
15:49RaynesThat's why a vector seemed like over kill.
16:05Retonatormaybe a noob question but if i read correctly all of the other clojure functions are build up of, off the special forms?
16:06harpastumYup. They're either built-in functions or macros using the special forms
16:06harpastumAlthough I'm no expert, I think that's right
16:06Retonatorok thanks
16:07Chousukesome of them use java methods too.
16:07Retonatorbut they use the . special form i guess?
16:07Chouseryes
16:07Chousukeyeah, or its lispier cousin :)
16:07Chousuke(the .method form)
16:08Chousukebut that's a macro which is transformed into the . form
16:08Chouserreader macro
16:08Chouseressentially
16:09Chousersame for AClass/staticMember -- built in macro-like foo turns that into (. AClass staticMember)
16:09rhickeyChouser: not a reader macro, normal macroexpansion time
16:10rhickeyuser=> (read-string "(.foo bar)")
16:10rhickey(.foo bar)
16:10rhickeyuser=> (macroexpand (read-string "(.foo bar)"))
16:10rhickey(. bar foo)
16:10harpastumIs there any way to get the java documentation of a function within the REPL?
16:10Chouserhm. yes, but you can't define such a macro yourself
16:10Retonatorwhat is a reader macro? some special form expanded by the reader?
16:11harpastumsorry to disrupt the conversation
16:11rhickeytrue, but doesn't make it a reader macro - that's important for other macros, can treat .foo as a symbol
16:11Chouserrhickey: ok, yes.
16:11Chouserharpastum: (doc doc)
16:11Retonatorno problem harp
16:11harpastum(doc Math/pow)
16:11clojurebotPardon?
16:12Chouserharpastum: oh, java docs, sorry. (javadoc Math)
16:12Chouserharpastum: but for that to work you need (use 'clojure.contrib.repl-utils)
16:13harpastumok
16:14harpastumI'm getting a filenotfound exception when i try that
16:14harpastumit doesnt look like i have the contrib package
16:15harpastumI'm working from the packaged version of clojure, does that make a difference?
16:15harpastumi.e. not svn
16:16Chousukecontrib is separate from clojure itself
16:16Chousercontrib's only available via svn or git, but you should be able to grab a similarly dated version of contrib and get that to work
16:16Chouserhttp://code.google.com/p/clojure-contrib/source/checkout
16:17Chousukeharpastum: a recent version of contrib won't work with the release because of changes in SVN
16:19Retonatorare function defined without namespace always in the user/ namespace?
16:21ChouserRetonator: they're always put in the current namespace, which defaults to user
16:22Chouseryou can change that with 'in-ns' or the 'ns' macro.
16:22Retonatorok thanks
16:24hiredmanwell, fns (function objects) don't seem to have a concept of their location in the realm of names
16:24Retonatormaybe something different but what do you guys think about computer science education and the emvasis on declartive / imperative languages? I know that i had some class (years back) on clean(functional language) and that most of the ppl really had problems understanding anything, just do to there brain used to declartive / imperative thinking
16:27harpastumWell, I'm a computer engineer, and one of my professors told us today that PHP is a functional language
16:27harpastumso i'd say we're not doing too well
16:27hiredmanheh
16:29p_lRetonator: I just read about how bad OOP is for introductory teaching :P
16:29powr-tocp_l: sounds like an interesting article :-) , have you got a link?
16:29Retonatorand why is that?
16:30Retonatornot that i dissagree
16:30Retonator-s
16:30p_lRetonator: compare "Hello World" in Pascal and Java :>
16:30jhawk28p_l: but what about all those pretty pictures?
16:30jhawk28(OO diagrams)
16:31hiredmanphp's anonymous function creation is, uh, wow
16:31powr-tocp_l: that's a weak argument... compare helloworld in Pascal to Helloworld in smalltalk or ruby...
16:31Retonatori don't think the size of hello world is an argument ;)
16:31p_lhttp://www.bcs.org/server.php?show=ConWebDoc.24941 (newer one), http://www.bcs.org/server.php?show=ConWebDoc.18854 (previous one)
16:32powr-tocugh, not the bcs!! :-\
16:32p_lRetonator: in Ruby or Pascal or C or Lisp etc. the hello world will be a simple set of instructions... in Java you'll have to build an OOP skeleton just to write one line of output :>
16:32p_llol @ powr-toc
16:33harpastum"It is well known that students, regardless of their background, find programming the least popular aspect of their studies"
16:33harpastumreally?
16:33kotarakWhat would be an elegant way to transparently provide some functionality depending on whether another module is available?
16:33p_lI find it not popular because it's redoing the same thing for n-th time
16:33Retonatormm i actually liked programming the most ;)
16:33p_l(for me)
16:33jhawk28harpastum: for the average CS stutent, yes
16:34p_lRetonator: When you are force-fed Java while for last few year you have been basking in Ruby/Python/CL/Haskell/Erlang...
16:34jhawk28how many professionals do you see actually coding at home?
16:34harpastumI must just be black sheep then
16:34harpastumI enjoying programming in _java_
16:35Retonatorme 2
16:35p_lharpastum: BlueJ makes it harder >_>
16:35powr-tocamateurs FTW! :-)
16:35harpastumclojure just makes everything easier
16:35Retonatori enjoy learning lots of languages
16:35jhawk28I work at a defense contractor and most coders dont do anything technical outside of work
16:35jhawk28and Defense contractors have mostly "average coders"
16:35powr-tocjhawk28: Professional Software Engineers make me embarrased to call myself a professional!
16:36jhawk28the good ones go home and still code
16:36jhawk28powr-toc: professional meaning, get paid to code
16:36Retonatoryeah i guess that is the meaning
16:37p_l(and I was paid for it)
16:38Retonatori still get paid, but i code mainly IL code ea c#, so it was very nice to read that clojure can target the clr in some time
16:39powr-tocjhawk28: professional, meaning gets paid to code, and assumes bcs membership means they are somehow better at what they do than people who enjoy coding and shun professional bodies for the racketeering jobs they are!
16:39p_lRetonator: there's also F#
16:40p_lpowr-toc: I'm only looking through BCS in order to get access to some "professional" networking :)
16:40jhawk28retonator: probably not any time soon - look at the troubles Fan has for CLR and JVM compatability
16:40powr-tocp_l: lol
16:40hiredmanI got $100 to fix someone's asp page that wasn't sending emails properly
16:40p_lpowr-toc: basically, to get enough contacts to find some work
16:41Retonatori did look at f# for some time it is mainly in the spirit of ocaml
16:41RaynesF# is a mess. :|
16:42powr-tocp_l: you're on irc, in an obscure chatroom talking about an obscure functional language... Why aspire to professionalism when you're clearly already way beyond most professionals? :-)
16:42RaynesI'd still rather use it than C# though.
16:42powr-tocp_l: What I'm saying is, I don't think my rant applies to anyone in here! ;-)
16:42RaynesD isn't so obscure anymore.
16:42RaynesCLojure*
16:43RaynesI'm positively amazed at the rate that the language is growing and gaining users.
16:44RaynesClojure that is. ._.
16:44hiredmanclojurebot: what do you think of clojure?
16:44clojurebotclojure is far closer to perfection then python
16:44harpastumBeing one of those new users (just started a couple days ago), I'm surprised it isn't already widely used
16:45RaynesI've said that about many languages, like Haskell and Scala. But Clojure looks like it might take the cake too me.
16:45Raynesto
16:45Retonatorwhat makes you think that raynes
16:45harpastummy main language is objective-C, which I enjoy because of the great base that cocoa provides.
16:46p_lpowr-toc: it's the pitiful little thing known widely under the sign of �
16:46harpastumthe comedy i find
16:46Retonatordo you think most "common" programmers are ready for the clojure paradigms?
16:46harpastumis that i've been using mutable datatypes in immutable languages
16:46harpastumwhen it's really better the other way around
16:46RaynesRetonator: Just the fact that the language design is awesome, and it's powerful. People can't deny that Clojure has a lot going for it. People who see it are impressed by it and I've yet to see someone who hasn't been.
16:47RaynesI don't think that there is any such thing as a "Common" programmer. There are programmers who care about programming and would do it even if profit wasn't involved and there are those who just want cash.
16:47powr-tocRaynes: I agree, clojure's gaining a hell-of-a-lot-o' traction... but trust me, for most people in the industry it's obscure if it's not sold on golf courses or by Microsoft ;-)
16:47Retonatorbut if i refer back to my first saying on the education and the problem people had with functional languages. i mean been impressed is one? but coding them selves
16:47RaynesWe are attracting number 1 at the moment, but number 2 might come eventually if Clojure ever gets used in the industry.
16:48harpastumRaynes: I think it's very similar to the difference between craftsmen and carpenters
16:48RaynesI think that people have a problem with "pure" functional programming actually. They hear about functional programming and find out that Haskell is the end all be all of functional programming, they try to learn it and get discouraged.
16:49Retonatorand people are so used to side-effect
16:49p_lthere's also a visible split between "traditional" programmers and people who had come to programming by finding that you can make pretty effect in JS and add some dynamism with PHP
16:49RaynesHaskell can ruin your view on functional programming, or it can open up a world of possibilities. It all depends on your experience.
16:49harpastumSide-effects never bothered me until my most recent project
16:50harpastumtrying to explore possibilities in game trees is a pain in the ass in java
16:50RaynesI've seen so many people hear about functional programming, try to learn Haskell, fail, and then start posting blogs on why functional programming is impractical.
16:50Retonatorwhy do you guess they fail?
16:51RaynesDon't get me wrong, Haskell is a wonderful language, I just wish people didn't think that Haskell is equal to functional programming as a whole.
16:51harpastumProbably the massive paradigm shift
16:51RaynesRetonator: Monads, for one.
16:51RaynesIs that a rhetorical question?
16:52RaynesFunctional programming can be /toned/ down and still be the "best thing evar".
16:52baetis-flyRaynes: expect the same thing when java folks start looking at scala.
16:52RaynesI've seen even functional programmers have issues with Scala.
16:52Chousukeyou don't need a functional language to do functional programming. it just helps. a lot :P
16:52RaynesSomething about the type system. I don't know, never really messed with scala.
16:53Chousukethe basics of functional programming could be taught with something more familiar like ruby or python
16:53RaynesUgh.
16:54RaynesOr they could just be taught with Clojure.
16:54Raynes:)
16:54jhawk28Clojure is a little easier to teach functional to a Java dev because of the ability to loop
16:54ChousukeClojure might be a bit too alien if the learner already knows a bit about programming.
16:55RaynesI don't think so.
16:55RaynesI really don't understand why Clojure could ever be hard for anyone.
16:55Chousukebut if you start with functional principles in python or something, it wouldn't be too difficult to transition to clojure.
16:55jhawk28the difficulty with Lisp and other forms are the shortcuts - Java is mostly all spelled out
16:56RaynesClojure is the simplest programming language I have ever used.
16:56RaynesYet the funnest as well.
16:56Retonatorbtw this is a very nice article ;) http://ociweb.com/jnb/jnbMar2009.html
16:56jhawk28its a feature when you know what the keywords mean, but learning can be a challenge
16:57ChousukeRaynes: yeah, clojure is simple and fun, but it's rather different from the traditional language where you have return statements and special keywords and syntax for stuff
16:57Raynes,(println "Hello, world!")
16:57ChousukeI think the lack of an explicit return statement is one thing that can throw off beginners.
16:57clojurebotHello, world!
16:58Chousukeyou could first show them in python or something that it doesn't really matter that much :)
16:59hiredmandefine beginers
17:00hiredmanI mean, if you know nothing about programming, who cares about a "return statement"
17:00Chousukehiredman: beginners to functional programming.
17:00Chousukeexperienced programmers are actually more difficult than beginners I suppose
17:00hiredman*shrug*
17:00Chousukethe problem is that not everyone "gets it" without putting significant effort into breaking their old mental model.
17:00Retonatorhow do i load a contrib lib in the slime repl, like this (require 'clojure.contrib.repl-utils)
17:01Retonatorshould it be on some path?
17:01Chousukeonce your brain decides something is good, convincing it otherwise can be *really* difficult.
17:02jhawk28Mutability is a good example, it takes more work to write everything in an Immutable way
17:03Chouserat first
17:03jhawk28but, show someone a complicated mess of an object model in a concurrent environment and they start to wish it was immutable
17:03Chousukejhawk28: that's not even the whole problem. To some people, it might not make any sense at all that you can even do things with immutable data.
17:03Retonatorbecause ppl are used to mutabilty not because it is easier by default
17:04Chousukejhawk28: they might be used to thinking in "commands" that are used to effect a change in some complex machinery.
17:04Chousukeit'll take a lot of effort to change that way of thinking.
17:06Chousukeand in reality, that's the way the machine works at the lowest level anyway.
17:07jhawk28using Java as the context for mutability, it is simpler to write a Javabean that is mutable than trying to keep it immutable
17:07hiredmanthere was just some paper on making hardware behave functionally
17:07Chousukefunctional memory would be interesting :/
17:08Chousukeyou'd have to have hardware garbage collection or something...
17:08hiredmanjhawk28: yeah, and java beans are a core programing concept
17:08Retonatori have clojure-contrib.jar on the classpath of swank but still i can't use the source function even after an require
17:08Retonatorwhat am i doing wrong?
17:09hiredmanhttp://lambda-the-ultimate.org/node/3234
17:09powr-tocregarding immutability... I'm not sure if it's really that hard... Or if people will dislike it, particularly because it doesn't have any of the cosmetic problems of single-assignment like Erlang
17:09hiredman"A New Approach to the Functional Design of a Digital Computer"
17:09hiredmanhah
17:09hiredman1961
17:10hiredmanI really should pay attention to dates on things
17:10powr-tocin clojure that is
17:10Chousukepowr-toc: immutability is not really difficult. you just need to get used to it.
17:10kotarakHow can I transparently use some code if an optional module is available or fall back to some default implementation?
17:11hiredmankotarak: you have a some kind of place where code can "register"
17:12Chouserkotarak: you could look at contrib.lazy-xml
17:12hiredmanthen you have a multimethod that dispatches based on what is registered
17:12ChouserI'm not saying it's perfect, but I try to do it there -- if the xpp.jar is in the classpath, use it. Otherwise, silently fall back on SAX.
17:12powr-tocChousuke: My point exactly... I always felt when showing people erlang they disliked it because of it's single assignment syntax... but clojure doesn't have that cosmetic barrier of having Var1, Var2, Var3 etc...
17:13powr-tocyet it still has immutability :-) My point is that people almost always judge the book by it's cover (or something else rather superficial)
17:14Chousukeclojure doesn't have much of a cover to look at :)
17:15Chouserlisp. lisp has all those parens. I don't like it. Oooh, scala...
17:15Chousukejust an assortment of brackets and identifiers.
17:16ChousukeChouser: yeah but the first thing they notice when they come to clojure.org is the logo and they go "ooh, shiny"
17:16powr-tocChousuke: well clojure's biggest (only?) problem regarding mainstream adoption is that it looks like lisp... obviously one of it's biggest advantages is that it actually *IS* a lisp.
17:16kotarakChouser: I tried a, (try (require ...) (catch Exception _)) but that didn't work. Maybe the trick is to load the file. Will try. Thanks for the pointer.
17:17powr-tocChouser: you beat me to it ;-)
17:17Chousukepowr-toc: I think the judicious use of [] and {} make the paren soup much more bearable.
17:17Chousukepowr-toc: Though it takes a while to get that I guess.
17:18Chouserkotarak: the problem is that the exception is thrown before eval, at compile time, so you need to make the compile happen inside your try/catch
17:18powr-tocChousuke: yeah, I agree... I really like the use of vectors for argument definitions etc... it's almost like having syntax highlighting
17:18Chousukebut you rarely need to wonder whether a (foo bar) is evaluated as a function call or whether it's a macro, because it's more clojurey to use [foo bar] in your syntax when writing a macro.
17:18jhawk28once the main editors have the full Clojure support, the parens become less of an issue
17:18kotarakChouser: which is done inside the other via load, right?
17:18Chouserkotarak: right
17:18kotarakChouser: good. :) will try
17:19Chouserplus it lets me put all the stuff that depends on that jar in its own file. works out nicely
17:19Chouser...until you AOT compile. :-/
17:19powr-tocChousuke: whenever I look at examples of lisp code in books, I find myself missing the square brackets etc... Especially because the lisp classics were printed before syntax highlighting was common place
17:19Retonatorwho do i know what clojure has on the classpath from a repl?
17:20Retonatorwho = how
17:20Chousukepowr-toc: I always stop to wonder whether it's a function call or just special macro syntax :/ The vector form offers a huge readability boost that IMO can not be stressed enough :)
17:21ChouserChousuke, powr-toc: yes!
17:21triddellRetonator: (System/getProperty "java.class.path")
17:21powr-tocChousuke: yeah, it really helps in disambiguating macros
17:24Retonatorthanks triddel
17:25Chousukethe html libraries are good examples. you have something like (html [:html [:body [:table (map generate-table-entries dataseq)]]]) and it's almost obvious the keyword-vectors are part of the macro DSL.
17:25duncanmcan someone give me a quick example of WHEN-LET's syntax?
17:25Chousukewith a function in the middle that obviously has nothing to do with the DSL :P
17:26Retonatorwhich contrib lib hold the source function?
17:26Chousuke,`source
17:26clojurebotsandbox/source
17:26Chousukehm :/
17:27hiredmanhttp://github.com/ryanb/ruby-warrior/tree/master <-- this is way cute, it needs porting to clojure
17:27hiredmanwith a nice swing gui of course
17:28Retonator,`get-source
17:28clojurebotsandbox/get-source
17:29hiredman,(when-let [x (#{1 3 4} 2)] (* x 3))
17:29clojurebotnil
17:29hiredman,(when-let [x (#{1 2 3 4} 2)] (* x 3))
17:29clojurebot6
17:38kotarakChouser: thanks :) VimClojure has now transparent pretty printing support if Tom Faulhaber's cl-format is available. :D
17:39hiredmankotarak: :D
17:39Chousukehopefully that pretty-printer will be in core sometime soon :)
17:40kotarakno dependency, if there => pretty, if not there => prn :)
17:40kotarakyeah. that would be nice.
17:40Chouserkotarak: woo! great.
17:45hiredmankotarak: I just noticed, if I turn gorilla on I cannot use %y to yank a form (everything between matching parens) and paste it between files
17:46powr-tocWill any of the clojure-contrib functions/libraries ever get pushed into the clojure distro?
17:47kib2powr-toc: I was just asking myself the same question
17:47hiredmannormally if I put the cursor over a paren an type "%y" it will yank everything between matchin parens, then I switch to another tab and P or p to paste
17:47hiredmanthis behaviour no longer works with gorilla enabled
17:47kotarakhiredman: you mean probably y%. Hmmm... works for me.
17:47kotarakWhat happens ?
17:48Chouserpowr-toc: some already have
17:48kotarakhiredman: Instead, I mean. Does it paste some garbage? or nothing at all?
17:48Chouseruse/require and friends started out in contrib and was moved over
17:48hiredmanit pastes a blank line
17:48kotarakhiredman: let me try with a tab.
17:49hiredmanacutally "%y" and "y%" do the same thing
17:49powr-tocChouser: Are there any criteria for inclusion?
17:49kotarakhiredman: not for me. % moves to the closing paren and y waits for a motion.
17:50kotarakhiredman: y% yanks to the matching paren.
17:51Chouserpowr-toc: sure, the criteria is that rhickey decides to include it.
17:51Chouser:-)
17:51powr-tocChouser: And that's not a bad one :-)
17:51kotarakThere was a poll once. What was the result?
17:52hiredmankotarak: neither works with gorilla enabled
17:52Chouserkotarak: a little report which everyone ignored.
17:53powr-tocI'm just wondering if it's mostly restricted to addressing language holes... or if there will ever also be basic libraries for other stuff, e.g. HTTP-clients/SMTP/XML etc...
17:53Chouserthere's xml parse/emit already in core
17:54Chouserwhich is an annoying and specific way of saying I don't know
17:54slashus2hiredman: How complicated is your security policy with your bot?
17:54powr-toclol
17:54kotarakhiredman: can you send me your vimrc and your zipped .vim directory? Several people reported strange issues with copy'n'paste. All these things work for me..... So it would be good to get a failing setup for bug hunting.
17:57hiredmanit seemed to work there for a minute, but I exited vim and restarted and it stopped working
17:58slashus2hiredman: Do your permissions allow for things like file-seq ?
17:58hiredmannope
17:59slashus2I was playing around with your sandbox, and when I inserted it into my bot and ran eval-in-box it allowed for (file-seq) I am guessing the magic is in the .policy file?
18:00hiredmanthe policy file and turning on the security manager
18:01slashus2So the policy file dictates what the security manager does?
18:01hiredmanuh
18:01hiredmanYes
18:01hiredmanit is kind of complicated, let me order it in my mind
18:03hiredmanthe security manager is off, if you turn the security manager on, the permissions you get by default are very limited and you cannot do anything. and you need the security manager on in order to sandbox code
18:03hiredmanso the policy file tells the secutiry manager to allow everything, and later on in hiredman.sandbox a seperate context is created with no permissions in which sandbox code is executed
18:04hiredmanacutally it isn't no permissions, I think it is the same set of permissions which applets get
18:09Lau_of_DKTalk from QCon up anywhere yet?
18:10slashus2hiredman: I am wondering why... I can do a file-seq with mine.
18:11hiredmanslashus2: is your policy file in place? do you enable the security manager?
18:11gnuvince_Hi
18:13WizardofWestmarcLau: Not qcon I don't think but another talk Rich gave around the same time: http://video.google.co.uk/videoplay?docid=-4617600643842067036&amp;hl=en
18:13lisppaste8slashus2 pasted "policy" at http://paste.lisp.org/display/77204
18:14slashus2hiredman: Okay, I think this is going to work. I created a policy file with
18:14hiredmanslashus2: I have no idea if that is enough to run clojure
18:15slashus2It appears to be working.
18:15hiredmaninteresting
18:15hiredmanhmmmmm
18:15slashus2When I first start it, I get java.security.AccessControlException: access denied (java.io.FilePermission clojureevalbot.clj read)
18:15slashus2:-)
18:16hiredmanwell, the policy file defines the permissions for the whole jvm
18:16slashus2right
18:16hiredmanso if you don't put file io in there then file io won't happen
18:16Lau_of_DKthanks WizardofWestmarc
18:17WizardofWestmarcplus it adds to my collection of clojure links on delicious, always a plus
18:17slashus2hiredman: I was trying to eliminate the possibility of someone reading files off my system.
18:17slashus2Maybe if the last thing that I ran was the activation of the Security Manager.
18:17slashus2That way clojure already read everything that it needs?
18:18hiredman~sandbox
18:18clojurebotsandbox is http://calumleslie.blogspot.com/2008/06/simple-jvm-sandboxing.html
18:18hiredmanslashus2: the policy file while required for sandbox is sort of a red herring
18:18hiredmanhiredman.sandbox is where the "magic" happens
18:19slashus2I see that it isn't activated by default.
18:19hiredmanclojurebot's policy file allows everything, but, it evals code in a new security contex that disallows IO
18:19slashus2So your sandbox won't run? (file-seq (java.io.File. "/"))
18:19hiredman,(file-seq (java.io.File. "/"))
18:19clojurebotjava.security.AccessControlException: access denied (java.io.FilePermission / read)
18:19slashus2:-|
18:21slashus2Don't know why it is doing that with me using your code.
18:21hiredmanjust a) use the policy file included in the clojurebot git b) use eval-in-box from hiredman.sandbox
18:21hiredmanand
18:22hiredmanenable the security manager
18:22hiredmanjava -Djava.security.manager or I think there is a function in hiredman.sandbox to enable it
18:22slashus2I think I understand now.
18:22slashus2The sandbox uses the security manager, but a hack to get it to work is to enable all security at the first.
18:23hiredmanclojurebot: clojure is also a language to use if you want to up your game
18:23clojurebotOk.
18:23hiredmanslashus2: Yes
18:44hiredmanso .. doesn't require dots in methods?
18:44kotarakhiredman: (.. obj method method), I would use ->, it's more general (-> obj .method .method)
18:45hiredmanExcellent
18:47WizardofWestmarclater guys, have a good evening
18:49jhawk28hiredman: does the EvalReader work around the IO limitation?
18:51jhawk28,#=(eval (file-seq (java.io.File. "/")))
18:51clojurebotjava.lang.RuntimeException: java.security.AccessControlException: access denied (java.io.FilePermission / read)
18:51jhawk28nope
18:54hiredmanjhawk28: the sandboxing happens at the jvm lavel
18:54hiredmanlevel
18:55hiredmanbelow the clojure runtime
18:55hiredman,#=(System/exit 0)
18:55clojurebotSystem
18:56hiredmaneh?
18:56hiredman,#=(eval (System/exit 0))
18:56clojurebotjava.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.0)
18:58jhawk28interesting
20:21slashus2hiredman: I found that if I ran (doto (javax.swing.JFrame.) (.setVisible true) (.show)) in a chatroom through the bot, it creates a window on my screen.
20:41duderdoHi!
20:43duderdoWhile trying to build clojure with ant on Debian5.0 I'm getting the error "Compliance level '1.4' is incompatible with target level '1.5'. However, ant -diagnostics shows java.runtime.version as 1.5.0.
20:45blbrowndebian 5 doesn't have java 6. Woa, well I won't be using that anytime soon
20:45durka42off-topic: is there an svn wizard in the house?
20:46Chouserrhickey can do branches *and* merges now, so I think he's your man.
20:47durka42:)
20:47durka42i'm only trying to do the former
20:48duderdoBut... ant says it is runtime version 1.5.0, which is why I'm confused
20:50slashus2Doesn't debian 5 have openjdk?
20:50durka42huh, i don't even have trunk/branches/tags folders
20:54Chouserdurka42: yeah, you have to make those manually
20:54Chouserdurka42: you're sure you don't want to use git?
20:55durka42i kinda do
20:55durka42i'll make that the next project, once this application goes live :)
20:55durka42after that, i'll rewrite it using clabango
20:56Chouseranyway, you can "svn mkdir" for trunk and branches, then "svn mv" your other top-level dirs into trunk
20:56Chouserthen "svn cp" trunk into "branches/my-new-branch" or whatever. I think that would do it
20:57Chouseryou probably have to check everything in between one or two of those steps... svn is a little weak in the mind, can't understand too much at once.
20:57durka42that it is
20:57durka42i want git's chunked commits, though
21:02Chouseri use git svn for clojure and contrib. it's nice.
21:02Chouserbranches are a breeze
21:03slashus2hiredman: I tried to add an item to the bad forms and I realized that it isn't checking the top level form.
21:51hiredmanwhat in the what now?
22:02dnolen,(macroexpand-1 '(fn [a b] (+ a b)))
22:03hiredmanclojurebot well?
22:03hiredmanclojurebot: well?
22:03dnolendarn
22:03hiredmanoh
22:04baetis-flyso, swank-clojure/slime work fine on my linux box, but on my mac I only get the inferior-lisp buffer, no slime repl buffer. Same .emacs. Only difference is I'm using an older version of slime on linux. any thoughts?
22:04dnolenbaetis-fly, emacs-starter-kit seems to eliminate a lot of the config problems have you tried that
22:04dnolenso clojurebot is out?
22:05dnolenkaput?, well perhaps someone knows the answer anyway.
22:06dnolenClojurians- why does (macrexpand-1 '(fn [a b] (+ a b))) ->
22:06dnolen(fn* [a b] (+ a b))
22:06baetis-flydnolen: thanks, but I don't want to replace my years of tweaking my .emacs for some one elses. looks like a great project though.
22:07dnolenbaetis-fly: i know what you mean, are you using latest swank-clojure, clojure-mode and slime from github? that works for me.
22:07jhawk28hiredman: clojurebot doesnt look to be part of the channel
22:08baetis-flydnolen: thanks, i'll try the slime from git hub. I'm using the cvs version.
22:09jhawk28,(println "welcome back all!")
22:09clojurebotwelcome back all!
22:09dnolen,(macorexpand-1 '(fn [a b] (+ a b)))
22:09clojurebotjava.lang.Exception: Unable to resolve symbol: macorexpand-1 in this context
22:10dnolen,(macroexpand-1 '(fn [a b] (+ a b)))
22:10clojurebot(fn* ([a b] (+ a b)))
22:10dnolenvoila!
22:10dnolenwhat the heck is fn*?
22:11hiredmanmore primitive fn
22:11hiredman,(macroexpand-1 '(fn [[a b]] (+ a b)))
22:11clojurebot(fn* ([p__1016] (clojure.core/let [[a b] p__1016] (+ a b))))
22:13dnoleninteresting
22:15hiredman,(macroexpand '(fn [[a b]] (+ a b)))
22:15clojurebot(fn* ([p__1022] (clojure.core/let [[a b] p__1022] (+ a b))))
22:15hiredman:/
22:16hiredman,(macroexpand '(clojure.core/let [[a b] p__1022] (+ a b)))
22:16clojurebot(let* [vec__1027 p__1022 a (clojure.core/nth vec__1027 0 nil) b (clojure.core/nth vec__1027 1 nil)] (+ a b))
22:16baetis-flyaccording to the slime NEWS file, the repl is no longer loaded by default. why on earth would they do that?
22:17dnolenbaetis-fly: wow, SLIME is weird project, powerful stuff in there but some things don't make sense. I've gotten broken builds a couple of times.
22:18dnolenI suppose you could a slime load hook tho yrself, but it's annoying.
22:18baetis-fly(slime-setup '(slime-repl))
22:18baetis-flyThe news file tells you how to get the old behavior.
22:18baetis-fly(as pasted)
22:52slashus2hiredman: Did you fix the (doto (javax.swing.JFrame.) (.setVisible true) (.show)) case?
22:56cconstantine_I'm trying to find the max in a sequence. In the doc it looks like pmax is what I want, but when I try to use it I get an "resolve symbol" error. Could I get some help?
22:58Chouser,(reduce max [2 5 3 4 1])
22:58clojurebot5
22:58cconstantine_oh fancy :)
22:59cconstantine_Thanks, I'm a clojure newb but I'm trying
23:02Jedi_Stannisis there a function that does #(partition-by identity %)?
23:03ChouserJedi_Stannis: I think you just wrote it.
23:05Jedi_StannisChouser: ok thanks, just wasn't sure if there was a function already in the api that did it. sometimes its hard to find it, and I don't won't to be rewriting functions that already exist
23:06durka42hmm, don't try and compile something that depends on clojure.jar while clojure.jar is being compiled in the background :)
23:08durka42Jedi_Stannis: isn't that #(partition 1 %) ?
23:12ChouserJedi_Stannis: sure, it's a valid question but I think you found the easiest way to do it
23:14durka42oh, i see
23:34psticknewow.
23:34pstickneso popular :p
23:34pstickneso uhm...
23:35pstickneI guess this means I should install clojure ^^
23:35markgunnelsAbsolutely.
23:35markgunnels:-)
23:35markgunnelsAnd then pull Compojure.
23:39pstickneErr...