Wouldn't this be simpler with pmap, e.g. http://gist.github.com/399269
although to be honest I don't really know how the automatically
parallelized clojure functions decide how many threads to use. Is the
JVM smart enough to only create as many system-level threads as make
sense on my hardware?
://nakkaya.com
On Thu, May 13, 2010 at 2:26 AM, Eric Schulte schulte.e...@gmail.com wrote:
Wouldn't this be simpler with pmap, e.g. http://gist.github.com/399269
although to be honest I don't really know how the automatically
parallelized clojure functions decide how many threads to use
Hi Steven,
I recently put together a propagator/cell system using Clojure's
actors/watchers. The code for implementing a concurrent propagator
system actually came out to a little less than a single page. Take a
look at the following for the full implementation.
http://gist.github.com/403987
Mark Engelberg mark.engelb...@gmail.com writes:
If you're developing a trio, like ltrim, trim, rtrim, wouldn't it be
better to call them triml, trim, trimr so that they show up next to
each other in the alphabetized documentation?
+1 for modifiers at the end
Let's not forget those of us who
Hi Sunil,
This is not quite what your asking for, but Org-mode [1] (an Emacs
outlining mode) has support for embedded code blocks which can be
executed, tangled etc... [2] in a number of languages including Clojure.
Also, I often see ^L characters in lisp files inside of Emacs, I believe
these
Ken Wesson kwess...@gmail.com writes:
Are you honestly suggesting I search the archives
It is common courtesy on open-source lists such as this one to check if
a question you are about to ask has already been answered. Not only
does it save a lot of noise on the list, but it often means that
Ken Wesson kwess...@gmail.com writes:
On Wed, Dec 15, 2010 at 12:51 PM, Eric Schulte schulte.e...@gmail.com wrote:
Ken Wesson kwess...@gmail.com writes:
Are you honestly suggesting I search the archives
It is common courtesy on open-source lists such as this one to check if
a question you
of arguments than necessary like it
happens in haskell..
thanks,
Sunil.
On Sat, Dec 18, 2010 at 3:02 AM, Eric Schulte schulte.e...@gmail.comwrote:
Hi Sunil,
This is already possible using `partial' function in clojure core, which
also works for variable arity functions, e.g.
(map
Tim Daly d...@axiom-developer.org writes:
Haskell has neat ideas but I've seen them before in lisp-based
systems. I work in a language which is strongly typed, allows
currying, is functional, etc., implemented in Common Lisp. I have
not found the ah-hah! in Haskell.
Sounds interesting,
Hi,
I just recently became aware of the built-in `align' [1] function for
Emacs while looking for a nice way to auto-align some hash-maps in my
Clojure code. This was easily done using align with the following piece
of customization.
#+begin_src emacs-lisp
(add-to-list 'align-lisp-modes
Thanks for sharing this library, I found reading your code to be very
useful.
I need to be able to read and write elf files from within Clojure code,
and Gloss initially looked like a good option. However much of the
streaming support and frame-based conception got in the way of my
particular
also, here's a patch to Gloss which I've used locally but which may be
generally useful.
Cheers -- Eric
Eric Schulte schulte.e...@gmail.com writes:
Thanks for sharing this library, I found reading your code to be very
useful.
I need to be able to read and write elf files from within
Seth wbu...@gmail.com writes:
The literate programming is actually a contrib to org-mode.
http://orgmode.org/worg/org-contrib/babel/
This has been moved out of contrib and into the Org-mode core, so with
recent versions of Org-mode the code block Literate Programming and
Reproducible Research
Hi,
Seth wbu...@gmail.com writes:
Just discovered org-mode myself --- does anyone know of guide to using
it with clojure for a total newbie?
I havent actually used it for clojure per se. I was just imagining how
it could be used. You have the ability to embed arbitrary code (from
many
Hi Tim,
I'm confused as to what parts of LP practice are not supported by
Org-mode. Are you aware that Org-mode files can be exported to formats
more suitable for publication and human consumption (e.g. woven). See
http://orgmode.org/manual/Exporting.html
Tim Daly d...@axiom-developer.org
For the most up-to-date and comprehensive documentation of using
Org-mode to work with code blocks (e.g. Literate Programming or
Reproducible Research) the online manual is also very useful.
http://orgmode.org/manual/Working-With-Source-Code.html
also, for a good review of Org-mode's support for
Mark Engelberg mark.engelb...@gmail.com writes:
On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte schulte.e...@gmail.com wrote:
For the most up-to-date and comprehensive documentation of using
Org-mode to work with code blocks (e.g. Literate Programming or
Reproducible Research) the online manual
Emacs org-mode, on the other hand, is a useful development
technology but it really isn't literate programming.
I would be interested to hear your thoughts as to why Org-mode is not a
literate programming tool.
I never said org-mode wasn't a 'literate programming tool'. It is clearly an
Can you post examples of these? I'd love to see some other examples.
Sure thing, check out this old version of a file which tangles out into
the directory layout expected by lein.
http://gitweb.adaptive.cs.unm.edu/?p=asm.git;a=blob;f=asm.org;h=f043a8c8b0a917f58b62bdeac4c0dca441b8e2cb;hb=HEAD
Tim Daly d...@axiom-developer.org writes:
On 1/6/2011 12:03 AM, Eric Schulte wrote:
Can you post examples of these? I'd love to see some other examples.
Sure thing, check out this old version of a file which tangles out into
the directory layout expected by lein.
http
like it's way of specifying formats using (keyword, type) pairs and
reading and writing maps instead of bytebuffer's which specifies
formats as strings ('b' for byte, 'i' for int, and so on) and reads
and writes seqs of values.
- Geoff
On Jan 5, 5:45 pm, Eric Schulte schulte.e...@gmail.com
Hi,
The following case statement
#+begin_src clojure
(defn buggy-case [n]
(case (int n)
0 :null
1 :load
0x7000 :loproc))
#+end_src
throws the following error
No distinct mapping found
[Thrown class
Hi,
Even using Phil's clojure-mode I find myself often editing the source
code of clojure-mode to add custom indentation or fontification for my
own macros or for forms I feel have been missed. Perhaps some of the
lists of function/marco-names in clojure-mode could be tucked behind
As an example of a user-accessible function for customizing indentation,
the following can be used with the latest clojure-mode either
interactively or from a user's config.
(defun clojure-new-indent (optional func level)
Set the indentation level of FUNC to LEVEL.
(interactive)
Miki miki.teb...@gmail.com writes:
It isn't nearly as big a deal as you think it is. I'm guessing you have a
single file called 'fs.clj' with the namespace 'fs', right?
mkdir src/fs/
mv src/fs.clj src/fs/core.clj
and then edit the file and change the namespace to fs.core.
I know it's
Nice concise example,
A while back I implemented something similar; a propagator system using
agents fed with `send', coming in at a slightly more verbose ~35 lines
of code.
http://cs.unm.edu/~eschulte/research/propagator/
Cheers -- Eric
Ken Wesson kwess...@gmail.com writes:
(defmacro
Ken Wesson kwess...@gmail.com writes:
On Sat, Jan 22, 2011 at 11:26 AM, Eric Schulte schulte.e...@gmail.com wrote:
Nice concise example,
Thanks.
A while back I implemented something similar; a propagator system using
agents fed with `send', coming in at a slightly more verbose ~35 lines
That would be a great application for this system. Each cell of the
spreadsheet could be a cell, and each formula could be a propagator.
I've implemented this and it seems to work well, I've committed this to
the repo above, and posted the spreadsheet code with example usage into
a gist at
This is the best I've seen so I thought I'd share
(pulled from a post on the guile mailing list)
http://mumble.net/~campbell/scheme/style.txt
(note: the attached copy opens in Org-mode in Emacs for easier reading)
--
You received this message because you are subscribed to the Google
Groups
and segregated.
- Greg
On Aug 31, 2010, at 9:47 AM, Eric Schulte wrote:
This is the best I've seen so I thought I'd share
(pulled from a post on the guile mailing list)
http://mumble.net/~campbell/scheme/style.txt
(note: the attached copy opens in Org-mode in Emacs for easier reading
Hi,
I'd recommend looking at how plt-scheme solved this problem (see [1]).
They actually defined alternative readers in which either prose or code
can be the default input mechanism (with the other escaped in some way).
I don't know if Clojure's reading system is quite flexible enough to
support
Phil Hagelberg p...@hagelb.org writes:
On Tue, Sep 7, 2010 at 1:25 AM, Mark Engelberg mark.engelb...@gmail.com
wrote:
[...]
Javadoc has an interesting property: it considers that the first
sentence serves as a summary for the doc. The sentence delimiter is
just the point in the case of
Hi,
Having recently upgraded to this newest lein
$ lein --version
Leiningen 1.3.1 on Java 1.6.0_18 OpenJDK Client VM
I notice that the lein swank command is no longer supported.
$ lein swank
That's not a task. Use lein help to list all tasks.
What's the recommended way to start up a
Phil Hagelberg p...@hagelb.org writes:
On Mon, Sep 20, 2010 at 12:08 PM, Eric Schulte schulte.e...@gmail.com wrote:
Having recently upgraded to this newest lein
$ lein --version
Leiningen 1.3.1 on Java 1.6.0_18 OpenJDK Client VM
I notice that the lein swank command is no longer supported
Related to controlling an Arduino with Clojure, a while ago I put
together a wrapper enabling interacting with a group of IXM boards
(cousin to the Arduino) from a Clojure REPL.
http://repo.or.cz/w/ixm-repl.git
Although in this case the boards are exposed through a shell script
which the Clojure
Baishampayan Ghose b.gh...@gmail.com writes:
Why do you ask? Is there some particular functionality you are
interested in?
Well, I'm just learning too. Currently I rely on lein swank to start
up my JVM so that slime can connect to it. CDT seems to want you to
manually start up the JVM with
Mike Meyer mwm-keyword-googlegroups.620...@mired.org writes:
It was also more work than submitting patches looks to be for apache,
django, gnu
FWIW in gnu projects if your patch is 10 lines long then they do
require you to go through a fairly lengthy attribution process.
Chris christopher.ma...@gmail.com writes:
On Oct 26, 9:54 am, Andrew Gwozdziewycz apg...@gmail.com wrote:
I like that idea, especially if it could be extended to reference other code:
Agreed. So now that's links to images, web pages, Clojure vars...
anything else?
LaTeX equations. Which
of gobbledegook back. That's the
thing that's been making me look for a better format than markdown.
(Autodoc already does markdown translation for supporting
documentation).
Tom
On Oct 26, 9:25 am, Andrew Gwozdziewycz apg...@gmail.com wrote:
On Tue, Oct 26, 2010 at 12:21 PM, Eric Schulte schulte.e
I don't know if use of `partial' is considered idiomatic, but I think
it's the clearest in cases like this.
user (def all-pairs '([ [1 2] [3 4] [5 6] ] [[5 6] [7 8] [9 0]]) )
#'user/all-pairs
user (apply map (partial map +) all-pairs)
((6 8) (10 12) (14 6))
-- Eric
Ulises
Hi,
Inspired by cgrand's regexp example [1], I've implemented a simple DSL
for specifying neural networks using Clojure data types. The code is
available in this gist [2], and a brief introduction with some usage
examples is up at [3].
Construction of this simple language involved a number of
Hi Saul,
Saul Hazledine shaz...@gmail.com writes:
On Nov 10, 11:20 pm, Eric Schulte schulte.e...@gmail.com wrote:
Hi,
Inspired by cgrand's regexp example [1], I've implemented a simple DSL
for specifying neural networks using Clojure data types.
This is really clear. The web page
overtop of this DSL and
testing them over some slightly more realistic data (a classification
problem). I'll post that work up to [3] as it progresses.
Sean
On Nov 10, 2010, at 2:20 PM, Eric Schulte wrote:
Hi,
Inspired by cgrand's regexp example [1], I've implemented a simple DSL
Carson c.sci.b...@gmail.com writes:
Hi! That looks interesting. I'm curious how big a network are you
intending to experiment with? (ie, # of layers, size of layers?).
I haven't really thought about limits on the size of the networks,
although I suppose with very large networks it may
Hi Albert,
Albert Cardona sapri...@gmail.com writes:
Hi Eric,
Your neural network DSL looks great. One minor comment: why use lists
instead of sets? In the webpage you state:
Lists are used to represent a unordered series
I used lists because I want to be able to specify a network in
#+begin_src clojure
(let [n {:phi identity
:accum (comp (partial reduce +) (partial map *))
:weights [2 2 2]}]
[(repeat 3 n) (repeat 5 n) (assoc n :weights (vec (repeat 5 1)))])
#+end_src
would result in the following connection pattern
[[file:/tmp/layers.png]]
Hi,
I find myself frequently using the `comp' and `partial' functions and
while I really enjoy being able to program in a point free style, the
length (in characters) of these command names often has the effect of
causing what should be a brief statement to span multiple lines.
I'm about to
Hi Paul,
Thanks for sharing this. It seems like the best compromise between the
desire to keep my code brief (at least to my eyes) without wanting to
introduce my own custom function names for global functions.
If you don't mind I'd like to add this to my fork of the Emacs Starter
Kit (will
atreyu atreyu@gmail.com writes:
Yep, you have to use flip and it is not so elegant
Prelude let f x y z=(x+z)*y
Prelude map (flip (f 1) 2) [3,4,5]
[9,12,15]
OTOH in clojure we have, you guess..., macros!!!
user (- [[2 3][3 3][6 6]] (filter (comp even? sum)) concat2 (map
#(+ 5 %)))
think the results look quite nice, a small example is attached
Best -- Eric
Eric Schulte schulte.e...@gmail.com writes:
Hi Paul,
Thanks for sharing this. It seems like the best compromise between the
desire to keep my code brief (at least to my eyes) without wanting to
introduce my own
I generally prefer to pass in a sequence rather than use a variable
number of arguments. The only time variable arguments are really useful
is in functions like map (or maybe +) in which you rarely use more than
one (or two) arguments and it would be a pain to wrap the last argument
in a list.
51 matches
Mail list logo