For FAQ style plain text I like having the RHS comments moved below
the S-Expression as I can C-n down the file and do C-x C-e evaluation
to REPL as I go.
Once the RHS ;;;Comments are below the S-Expressions I find i like
having a symbol to indicate the eval =>
I took the liberty of re-formattin
Also, it's worth noting that my trick to highlight def-initions
probably isn't going to work if we have hierarchical parsing of S-
expressions. I'm not entirely sure how jEdit is going to handle
certain cases if we try to merge the two. It might be possible to
make it work, but I suspect that jE
On 16.12.2008, at 02:58, Mark Volkmann wrote:
> I'm trying to understand the difference between these. Is it that
> macros expanded by macroexpand-1 could result in calls to additional
> macros that won't be expanded, but macroexpand will continue expanding
> until no macro calls remain?
Right.
Hi,
On 16 Dez., 04:08, Alex Burka wrote:
> I put plugin/gorilla.vim in /Applications/MacVim.app/Contents/
> Resources/vim/runtime/plugin/.
The correct way to install Gorilla is to copy the contents of the
plugin, after and doc directories to your .vim directory in your
home directory. Be sure t
> I been thinking about this during the weekend, and I think I prefer the mode
> to be aware of nesting (unless you can cause it to blow the stack on a large
Well, this would be my question: why? :-) Auto-indent needs to be
aware of nesting, but that's already handled in a separate pass from
th
the template function is missing parameter binding part of a let
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this
I'll take a crack at this. It may appear that the doall and dorun return
something
different with subsequent calls but they don't actually. The doall always
returns
the sequence (1 2) and dorun always returns nil.
The first time (doall x) is called the for loop executes and prints 1 2 (a
side e
In recent versions of test-is, it appears that exceptions are only
caught inside of the 'is' macro, as opposed to during the whole test
run. This is a problem when running test-is from slime, because when a
test throws an exception outside of the 'is' macro, it requires user
intervention to handle
whoops, chopped of the end of that last message - forgot the nasake-no
ichigeki
user> (seq? '(nil))
==|]==>true
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email
> How did you know that it delegates to 'get'?
sorry, I rushed that part.
the keyword and symbol are instances of clojure.lang.Keyword and
clojure.lang.Symbol
which are _java_ classes found in Keyword.java and Symbol.java (I
found these in the src/jvm directory)
These are what the invoke( ) m
Hi,
Because clojure set, vector and map all implements
java.util.Comparator (indirectly via AFn), they interact with
java.util.TreeSet/TreeMap in surprising way due to overloaded ctor
(java.util.Comparator).
user=> (def s (java.util.TreeSet. [1 2 3 3]))
#'user/s
user=> s
#=(java.util.TreeSet. #{
Neat :) Thanks for the in depth examination, that's a very clear
explanation!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscr
On Mon, Dec 15, 2008 at 9:43 PM, Daniel Eklund wrote:
>
> > Looks like an if then else version of the map lookup??
> > ie: (if (%1 %2) (%1 %2) %3)
> > Is this a special feature of maps in general, such that you can look
> > up a key but return something else if it doesn't exist?
> > I hadn't come
> Flattening nothing gives something?
"Nothing" was minding the gap until you put it inside flatten's
sequence
interface at which point you got a flattened sequence full of nil.
Prior to
that there was *not* an empty list waiting for nil. Returning nothing
when in fact you
expect a list (even on
> Looks like an if then else version of the map lookup??
> ie: (if (%1 %2) (%1 %2) %3)
> Is this a special feature of maps in general, such that you can look
> up a key but return something else if it doesn't exist?
> I hadn't come across it yet, but it sounds useful :)
This is exactly right (I j
Hello,
doall and dorun returns different results from seond run on...
e.g.
user=> (def x (for [i (range 1 3)] (do (println i) i)))
#'user/x
user=> (doall x)
1
2
(1 2)
user=> (doall x)
(1 2)
user=> (doall x)
(1 2)
user=>
user=> (def x (for [i (range 1 3)] (do (println i) i)))
#'user/x
user=> (dor
> user=> ('b '{a 10, b 11, c 12})
> 11
Ah, yes so the 1 arg version is the map lookup, which also works in
reverse
user=> ('{a 10, b 11, c 12} 'b)
11
That makes perfect sense...
What is the 2 arg version?
user=> ('{a 10, b 11, c 12} 'b 'c)
11
user=> ('b '{a 10, b 11, c 12} 'c)
11
user=> ('b 'c '
On Mon, Dec 15, 2008 at 10:42 PM, Mike Perham wrote:
>
> Why do we have to do this?
>
> (in-ns 'myns)
> (clojure/refer 'clojure)
>
> Java automagically imports java.lang. Shouldn't Clojure automagically
> map the core namespace?
It does if you use the 'ns' macro (depending on whether you specif
What is the meaning of:
('+ '1 '2)
On the surface it appears that '2 is simply the last evaluated, but
lets try some similar calls:
user=> ('+)
java.lang.IllegalArgumentException: Wrong number of args passed to:
Symbol
user=> ('+ '1)
nil
user=> ('+ '1 '2)
2
user=> ('+ '1 '2 '3)
java.lang.IllegalA
Why do we have to do this?
(in-ns 'myns)
(clojure/refer 'clojure)
Java automagically imports java.lang. Shouldn't Clojure automagically
map the core namespace?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cloju
I've been trying to get 'ns' right. The doc for 'require' tells me
the following about library loading:
"The root resource path
is derived from the root directory path by repeating its last
component
and appending '.clj'. For example, the lib 'x.y.z has root directory
/x/y/z; root resource
SOLVED:
Hi everyone,
thanks for your help. I figured out what I was doing wrong.
In my clojure directory there is a subfolder clojure/trunk
I was supposed to run "ant" inside "clojure/trunk" and not "clojure".
The correct generated "clojure.jar" is 1389436 bytes
--~--~-~--~~---
Thanks for Gorilla. I am using it with MacVim. One (or :bug :pebkac)
report...
I put plugin/gorilla.vim in /Applications/MacVim.app/Contents/
Resources/vim/runtime/plugin/ and it seems to be loaded when MacVim
starts. But the keybindings are not set up. \sr doesn't do anything
(well, the '
On Mon, Dec 15, 2008 at 9:41 PM, Mark Volkmann
wrote:
>
> ; Quoting a list is *not* the same as quoting everyting inside it.
> (println ('+ '1 '2)) ; outputs 2 which is the value of the last item evaluated
Your example works, but your comment is not always true:
user=> ('+ '1)
nil
user=> ('+ '1
Here's a summary of what I think I know about quoting in Clojure. I'd
appreciate some feedback if I said anything wrong below or maybe
didn't describe something well.
; One use of quoting is to prevent a list from being evaluated
; where the first item is treated as the name of a function
; and t
I'm running the REPL by typing
"java -jar clojure.jar"
in the directory "C:\clojure"
which contains the "clojure.jar" file.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, sen
--- On Mon, 12/15/08, CuppoJava wrote:
> And i get the message "Unable to resolve symbol:
> compile in this context" when i type "(compile)"
> at the REPL.
How are you running the REPL?
It's working for me whether I build with Ant or Maven, rev 1160.
Dave
--~--~-~--~~
I tried "ant clean" followed by "ant"
which built a clojure.jar which is exactly 488,904 bytes.
And i get the message "Unable to resolve symbol: compile in this
context" when i type "(compile)" at the REPL.
Thanks very much for your help
-Patrick
--~--~-~--~~~---~--
On Monday 15 December 2008 17:58, Mark Volkmann wrote:
> I'm trying to understand the difference between these. Is it that
> macros expanded by macroexpand-1 could result in calls to additional
> macros that won't be expanded, but macroexpand will continue
> expanding until no macro calls remain?
I'm trying to understand the difference between these. Is it that
macros expanded by macroexpand-1 could result in calls to additional
macros that won't be expanded, but macroexpand will continue expanding
until no macro calls remain?
It tried:
(macroexpand-1 '(or (< 2 1) (< 3 2) (< 1 2)))
which
Hi,
I've just started using agents and as I've done that, I've noticed that
once you use an agent, exiting the REPL leads to a hang (with zero CPU
usage). As Rich pointed out to me, this is avoided by calling
(shutdown-agents).
So my question is this: What's a simple way to ensure that
(shut
On Monday 15 December 2008 17:05, CuppoJava wrote:
> I checked with SVN.
> It says I checked out revision number 1160?
As of this writing, that's the latest rev.
In your previous message you said you tried "ant clean". I assume that
you followed that by "ant jar" (or just did "ant clean jar").
I checked with SVN.
It says I checked out revision number 1160?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this g
Tried "ant clean",
it's still giving me the same error.
Unable to resolve symbol: compile in this context.
Is there a way to check my Clojure version from the REPL?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"C
On Dec 15, 4:29 pm, Rich Hickey wrote:
> On Dec 15, 5:57 pm, Bradbev wrote:
Thanks for the quick reply. Very helpful.
Cheers,
Brad
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this
On Dec 15, 5:35 pm, CuppoJava wrote:
> Hi,
> I just ran into a need for using gen-class, and need some help getting
> started.
>
> I upgraded to the latest Clojure version using
> svn cohttps://clojure.svn.sourceforge.net/svnroot/clojureclojure
>
> and I run the REPL using
> java -jar clojure.j
Using enumeration-seq does the trick! Thanks.
user=> (enumeration-seq (.entries (java.util.zip.ZipFile. "")))
On Mon, Dec 15, 2008 at 5:14 PM, Rich Hickey wrote:
>
>
>
> On Dec 15, 6:01 pm, "Brian Doyle" wrote:
> > According to the docs the seq function should be able to take an
> > enumerati
On Dec 15, 5:57 pm, Bradbev wrote:
> I have the following scenario:
> - a server that is listening on a socket for incoming connections.
> - when the server accepts a connection it uses send-off to run a
> handler function to handle the connection
> - the handler function loops using recur
On Dec 15, 6:01 pm, "Brian Doyle" wrote:
> According to the docs the seq function should be able to take an
> enumeration,
> but here is what I see:
>
> user=> (seq (.elements (doto (java.util.Vector.) (.add "hello") (.add
> "world"
> java.lang.IllegalArgumentException: Don't know how to cr
On Monday 15 December 2008 15:22, Stephen C. Gilardi wrote:
> On Dec 15, 2008, at 6:08 PM, Randall R Schulz wrote:
> > user=> (class *err*)
> > java.io.PrintWriter
>
> PrintWriter is (as far as I can determine) the more modern of the two
> classes that are accepted as an argument to
> "Throwable.p
On Dec 15, 2008, at 6:08 PM, Randall R Schulz wrote:
user=> (class *err*)
java.io.PrintWriter
PrintWriter is (as far as I can determine) the more modern of the two
classes that are accepted as an argument to
"Throwable.printStackTrace" which is used frequently in Clojure's
implementatio
On Sunday 14 December 2008 17:21, Randall R Schulz wrote:
> Hi,
>
> I have quite a bit of Java code with I/O capabilities that generally
> support both PrintStream and PrintWriter. I was a bit perplexed when
> I tried to apply one of these methods to *out* and was rebuffed
> thusly:
>
> java.lang.
According to the docs the seq function should be able to take an
enumeration,
but here is what I see:
user=> (seq (.elements (doto (java.util.Vector.) (.add "hello") (.add
"world"
java.lang.IllegalArgumentException: Don't know how to create ISeq
from: (NO_SOURCE_FILE:0)
SVN 1160, thanks.
--
I have the following scenario:
- a server that is listening on a socket for incoming connections.
- when the server accepts a connection it uses send-off to run a
handler function to handle the connection
- the handler function loops using recur to handle packets
- the handler function uses
Hello all!
I ported beatiful functional geometry:
http://www.frank-buss.de/lisp/functional.html
http://intricatevisions.com/index.cgi?page=nlcodetk
into Clojure:
http://intricatevisions.com/source/clojure/fg.clj
(link from the page http://intricatevisions.com/index.cgi?page=clojure)
When you ru
Rich Hickey schreef:
> On Dec 15, 2008, at 1:49 PM, Joost wrote:
> > Rich Hickey schreef:
> >> Dot is too overloaded in Java, and overloaded enough in Clojure. This
> >> one doesn't seem too important to me.
> >
> > I ran into this issue yesterday. Or more precisely: I couldn't find
> > any way to
Yep, it is:
(name symbol)
-Stuart Sierra
On Dec 15, 5:34 pm, Paul Reiners wrote:
> Is there anything in Clojure that is equivalent to Common Lisp's
> symbol-name function?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
Hi,
I just ran into a need for using gen-class, and need some help getting
started.
I upgraded to the latest Clojure version using
svn co https://clojure.svn.sourceforge.net/svnroot/clojure clojure
and I run the REPL using
java -jar clojure.jar
However when I type:
user=> (compile)
I get the f
Is there anything in Clojure that is equivalent to Common Lisp's
symbol-name function?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To
Here is a minor update to what I posted previously (but this time as
an attachment). This is just a small library that allows you turn on
tracing for all functions in a namespace all at once, or toggle
tracing for individual functions.
--~--~-~--~~~---~--~~
You rece
I been thinking about this during the weekend, and I think I prefer the mode
to be aware of nesting (unless you can cause it to blow the stack on a large
file or something, which I think would be unlikely anyway), so I'm going to
take the keywords from your mode and bolt on the set structures I had
Hi Rich, hi everybody,
I finally got around to trying an implementation of condp. I had to
write two other libs to do it the way I wanted. Here's the result:
(condp (instance? _ (* 99 99))
Number "it was a Number"
String "it was a String"
"it was something
I didn't know about the symbol function. Thanks! I just want to call use
on all
of the namespaces in the clojure.contrib jar when starting the repl and this
will
work nicely!
On Mon, Dec 15, 2008 at 1:59 PM, Stuart Sierra
wrote:
>
> You can do this:
> (apply use (map symbol (list "clojure.contr
You can do this:
(apply use (map symbol (list "clojure.contrib.str-utils"
"clojure.contrib.duck-streams")))
-Stuart Sierra
On Dec 15, 3:51 pm, "Brian Doyle" wrote:
> I have a seq of strings that are namespaces like,
> ("clojure.contrib.str-utils", "clojure.contrib.duck-streams").
> I wanted to c
I have a seq of strings that are namespaces like,
("clojure.contrib.str-utils", "clojure.contrib.duck-streams").
I wanted to call the use function on this seq. I can't seem to do that
though. Any way I can do this or
is this just a bad idea? Thanks.
--~--~-~--~~~-
On Monday 15 December 2008 07:44, Rich Hickey wrote:
> On Mon, Dec 15, 2008 at 10:40 AM, Randall R Schulz
wrote:
> > On Friday 05 December 2008 15:36, Randall R Schulz wrote:
> >> I make pretty extensive use of nested classes
> >> (most significantly Enum types).
> >>
> >> I was wondering if it
*agent* and a few others have recently been properly documented at
http://clojure.org/api
Unfortunately this isn't true for all of the 'standard' globals. *in*
and *out* don't have entries of their own, though they are mentioned
in the functions that use them, so a search within that page will fin
On Dec 15, 2008, at 1:49 PM, Joost wrote:
>
> Rich Hickey schreef:
>> Dot is too overloaded in Java, and overloaded enough in Clojure. This
>> one doesn't seem too important to me.
>
> I ran into this issue yesterday. Or more precisely: I couldn't find
> any way to refer to inner classes in the
How about adding a rest around tree-seq:
(defn flatten
"Takes any nested combination of sequential things (lists, vectors,
etc.) and returns their contents as a single, flat sequence."
[x]
(let [s? #(instance? clojure.lang.Sequential %)]
(filter (complement s?) (rest (tree-seq s? seq
On Dec 15, 5:34 pm, Paul Reiners wrote:
> I have the following Clojure code and I'm not sure why it's not
> working:
>
> (defn match (x y &optional binds)
> (cond
> ((eql x y) (values binds t))
> ((assoc x binds) (match (binding x binds) y binds))
> ((assoc y binds) (match x (binding
> I have the following Clojure code and I'm not sure why it's not working:
The short answer is: That's not Clojure code, it is Common Lisp code.
Longer answer: Despite having similar-looking syntax, the two are not
particularly related. Of the functions/macros you tried to use, I
think only "and
Rich Hickey schreef:
> Dot is too overloaded in Java, and overloaded enough in Clojure. This
> one doesn't seem too important to me.
I ran into this issue yesterday. Or more precisely: I couldn't find
any way to refer to inner classes in the docs on the clojure.org site.
I personally don't like
On Monday 15 December 2008 09:34, Paul Reiners wrote:
> I have the following Clojure code and I'm not sure why it's not
> working:
>
> (defn match (x y &optional binds)
> (cond
>((eql x y) (values binds t))
>((assoc x binds) (match (binding x binds) y binds))
>((assoc y binds) (match
Should I interpret the silence on this topic to mean that there aren't
any places I can go to find out about *agent*, etc.? In another
thread on this group, I see that there is a *out*, as well; I assume
therefore that there is a *in*. Perhaps those are documented
somewhere - any pointers? (Per
I have the following Clojure code and I'm not sure why it's not
working:
(defn match (x y &optional binds)
(cond
((eql x y) (values binds t))
((assoc x binds) (match (binding x binds) y binds))
((assoc y binds) (match x (binding y binds) binds))
((var? x) (values (cons (cons x y) bi
On Dec 15, 12:30 pm, Mon Key wrote:
> > > > I would expect (flatten nil) => nil
>
> Why?
Sorry, Mon Key, but I have to agree with Randall here. All the
sequence-related functions (first, rest, filter, map, etc.) return nil
for nil. If flatten is returning a sequence, I expect it to do the
same
On Monday 15 December 2008 09:30, Mon Key wrote:
> > > > I would expect (flatten nil) => nil
>
> Why?
> => nil
> nil is not a sequence - your expectation is that Clojure flatten and
> return `nothing'... which *would* be a bug
Flattening nothing gives something?
Flatten is not consistent with se
Clojure needs a FAQ - a plain old school vanilla FAQ.
Clojure.org is useful;
The wiki is useful;
The gg Group is useful;
The /# clojure is useful;
(doc some-fn) is useful;
(show some-fn) is useful;
None of these are a FAQ.
None accomplish what a FAQ accomplishes.
Lots of people look for a FAQ
On Mon, Dec 15, 2008 at 11:02 AM, Chouser wrote:
> On Mon, Dec 15, 2008 at 10:47 AM, Rich Hickey wrote:
>>
>> It seems the interface detection is not quite right - many things that
>> are interfaces are shown as classes.
>
> Yes, the legend is misleading. Diamonds are for non-clojure
> interfac
> > > I would expect (flatten nil) => nil
Why?
=> nil
nil is not a sequence - your expectation is that Clojure flatten and
return `nothing'... which *would* be a bug
Not a bug. Implementation deficiency/wrong expectations/
preconceptions/mis-application of earlier idiom to new platform.
@ http
This is great stuff. Thanks Chouser!
On Fri, Dec 12, 2008 at 10:37 PM, Chouser wrote:
>
> I've added updated versions of 'show' and 'source' to a new lib named
> clojure.contrib.repl-utils
>
> 'show' is for exploring classes at the REPL. What's new is that it
> now displays the modifiers of th
Hello
I was just following the directions on Ubuntu setup directions on
http://riddell.us/clojure/
I get the following error when I try ANTS.CLJ. Has something changed?
Peter
(defn setup
"places initial food and ants, returns seq of ant agents"
[]
>>> (sync nil
(dotimes [i food-pla
On Mon, Dec 15, 2008 at 10:47 AM, Rich Hickey wrote:
>
> It seems the interface detection is not quite right - many things that
> are interfaces are shown as classes.
Yes, the legend is misleading. Diamonds are for non-clojure
interfaces, ovals are clojure.lang.* classes and interfaces.
--Chou
On Mon, Dec 15, 2008 at 4:52 PM, Randall R Schulz wrote:
>
> Hi,
>
> I'm wondering whether it's a good idea to create a defsomething -style
> macro that establishes multiple root bindings? In other one, a macro
> that expands to multiple (def ...) forms?
Well that sounds quite like declare:
use
On Friday 05 December 2008 15:36, Randall R Schulz wrote:
> I make pretty extensive use of nested classes
> (most significantly Enum types).
>
> I was wondering if it might be a good idea to
> allow "dot" resolution to find such types.
>
>
> E.g.:
>
> user=> tau.run.TSEvent.TSEKind
> java.lang.Cla
On Dec 15, 10:27 am, Stuart Sierra
wrote:
> Cool, thanks!
> -S
>
> On Dec 14, 4:47 pm, Chouser wrote:
>
> > I've updated the Clojure classes graph (thanks for the push, R.
> > Schulz!) The new version includes the newest classes as well as Java
> > interfaces that are applicable. These latte
On Mon, Dec 15, 2008 at 10:40 AM, Randall R Schulz wrote:
>
> On Friday 05 December 2008 15:36, Randall R Schulz wrote:
>> I make pretty extensive use of nested classes
>> (most significantly Enum types).
>>
>> I was wondering if it might be a good idea to
>> allow "dot" resolution to find such t
On Monday 15 December 2008 07:22, Stuart Sierra wrote:
> On Dec 15, 9:08 am, Randall R Schulz wrote:
> > > flatten returns a sequence - in this case a sequence containing
> > > 'nil. How else would you flatten on nil?
> >
> > I would expect (flatten nil) => nil
>
> I agree, it's a bug, but I'm n
Cool, thanks!
-S
On Dec 14, 4:47 pm, Chouser wrote:
> I've updated the Clojure classes graph (thanks for the push, R.
> Schulz!) The new version includes the newest classes as well as Java
> interfaces that are applicable. These latter are shown inside
> diamonds.
>
> A couple different .svg a
On Dec 15, 9:08 am, Randall R Schulz wrote:
> > flatten returns a sequence - in this case a sequence containing
> > 'nil. How else would you flatten on nil?
>
> I would expect (flatten nil) => nil
I agree, it's a bug, but I'm not sure how to fix it, unless it's just
a special case that needs an
Hi Randall,
Seems the general consensus is that there is nothing inherently bad
with such a design.
The idea of macros is to give you the power to generate code from
commonly occurring templates. Emitting multiple def forms certainly
falls under this umbrella.
/mike.
On Mon, Dec 15, 2008 at
Hi,
I'm wondering whether it's a good idea to create a defsomething -style
macro that establishes multiple root bindings? In other one, a macro
that expands to multiple (def ...) forms?
The first thing I noticed when I did this is that (barring further
machinations within the macro) it evalua
On Monday 15 December 2008 01:16, Albert Cardona wrote:
> Randall R Schulz wrote:
> > What might be the issues or consequences of making the root binding
> > of *out* a PrintWriter?
>
> I've been using a PrintWriter for *out* for months now, and no
> problems so far. Using always nearly latest svn
On Sunday 14 December 2008 21:56, Mon Key wrote:
> > user=> (flatten nil)
> > (nil)
>
> Not a bug.
>
> flatten returns a sequence - in this case a sequence containing
> 'nil. How else would you flatten on nil?
I would expect (flatten nil) => nil
> ...
Randall Schulz
--~--~-~--~~
Jim,
you were quicker than me in implementing monad transformers! What I
had in mind is exactly what you did: a monad transformer would be
implemented as a function taking a monad as an argument. That's in
fact why I defined the monad macro in addition to defmonad.
> I did some more work
On Dec 12, 3:35 pm, Christophe Grand wrote:
> I was sure it was a job for iterate:
>
> (defn reductions
> "Returns a lazy seq of the intermediate values of the reduction (as
> per reduce) of coll by f, starting with init."
> ([f coll]
>(if (seq coll)
> (for [s (iterate (fn [[x &
+1. For example i did a function that calls some Oracle PL/SQL stored
procedure
(defn db-read-proc [callback]
(sql/with-connection
db
(with-open [stmt (.prepareCall (connection) "{call STORED_PROCEDURE
(?)}")]
(. stmt registerOutParameter 1 -10)
(. stmt execute)
(callback (
Hi there
This may be a problem with the way I'm doing things but I think it
would be useful for the (connection) function of internal to not be
internal. For example, lets say i do a query on a db to see if a user
exists, if they don't I want to insert, so I need a new statement for
that within
On Dec 14, 2008, at 23:16, jim wrote:
> Also, I came across set-state and fetch-state being implemented in
> terms of update-state.
Indeed, those are the implementations I had in my first monad
implementation. I replaced them by manually inlining update-state
when I wanted to get rid of mona
Randall R Schulz wrote:
> What might be the issues or consequences of making the root binding of
> *out* a PrintWriter?
>
I've been using a PrintWriter for *out* for months now, and no problems
so far.
Using always nearly latest svn clojure.
Albert
--
Albert Cardona
http://albert.rierol.
> Wow, that's a lot of things that have to be in the classpath!
>
> In your example the namespace is fj.tests.process.
> You say the classpath must contain:
> 1) the "fj" directory
> 2) the "process" directory
> 3) the "classes" directory where the .class files will be written
>
> I would have gu
On 15.12.2008, at 02:24, Mark H. wrote:
>>(lazy-cons X1 (lazy-cons X2 (transform-to-gaussian uniform-
>> rest))
>
> Also much better -- the structs were ugly. Thanks for the nice
> revision!
In fact, this is a good test-case for the interface design for random-
number generators. I
92 matches
Mail list logo