I just noticed that there was an extra line of code (which doesn't work) in
my original post. Sorry. I edited it out below.
In molecular dynamics a popular format for writing out the positions of the
atoms in a system is the xyz file format (see:
http://en.wikipedia.org/wiki/XYZ_file_format
or even write it to disk
> for iota to read later.
>
> I wrote a small gist to demonstrate the basic procedure:
> https://gist.github.com/favila/035718ab762c6adfc8dc
>
>
> On Friday, December 26, 2014 10:00:57 AM UTC-6, cej38 wrote:
>>
>> Line-by-line is the pro
t;
>
> Jony
>
> On Friday, 26 December 2014 14:49:59 UTC, cej38 wrote:
>>
>> In molecular dynamics a popular format for writing out the positions of
>> the atoms in a system is the xyz file format (see:
>> http://en.wikipedia.org/wiki/XYZ_file_format and/or
In molecular dynamics a popular format for writing out the positions of the
atoms in a system is the xyz file format (see:
http://en.wikipedia.org/wiki/XYZ_file_format and/or
http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/xyzplugin.html). The
format allows for storing the positions of the
I picked a toy problem that was really easy to solve, figuring that once I
had the idea down, I would be able to easily change the equation to the one
that I am interested in solving. In moving to my real problem I hit the
next snag I can't use real numbers within the equation. I note that the
9) to do a fair
approximation of the non-negative integers, but out of curiosity, would
there be a better way of doing this?
On Tuesday, June 10, 2014 11:12:11 AM UTC-4, cej38 wrote:
>
> I am interested in solving a simple equation for all of its solutions when
> some constr
I am interested in solving a simple equation for all of its solutions when
some constraints are applied. This sounds like a problem for core.logic.fd.
Let's use a toy example:
8 = 3*x + 2*y, where x and y must be non-negative integers.
Here are the possible solutions: [x,y]= {[2,1],[0,4]}.
Any of these projects would be a welcome addition to the Clojure world, but
I personally hope that the Linear Algebra project is worked on and that it
uses NDArray from last year as the starting point.
Congratulations on being picked as a host community again. I am excited to
see what comes ou
It is hard to say where the root of your problem lies without looking at
the code more. I would look closely at laziness. I find that lazy
evaluation really kills parallelization.
On Friday, November 8, 2013 4:42:11 PM UTC-5, Jose M. Perez Sanchez wrote:
>
> Hello everyone:
>
> This is my f
Friends,
Thanks for the replies. I will try your suggestions and get back to you
if I have further questions.
--
--
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
Note that posts from ne
Suppose I have a vector of maps (this could also be a vector of records)
(def aa [{:a 0 :b 0 :c 0} {:a 50 :b 0 :c 0} {:a 100 :b 0 :c 0}])
and I want to go in an change the value of associated with :c when :a has a
value of 50, so that the final col of maps looks like
[{:a 0 :b 0 :c 0} {:a 50 :b
Hello,
I have noticed a couple of things that I think are standard Clojure
symbols but that aren't specified in the API documentation. These are "."
and "_". It may be that they are more Java than Clojure (I don't know Java
at all) and are thus supposedly known. I run across "_" all of the
Adam,
Good job. You answered the question I asked. Thank you.
Everyone else,
Yes, I told you I could usually come up with ways around what I was
asking for, but there could be problems with what you have suggested. I
haven't had time to do more detailed testing, so there might be more use
No, you don't. I want a command that works INSIDE of f not ON f. The
function that I gave earlier was something overly simple.
On Monday, November 5, 2012 12:46:24 AM UTC-5, Jerry Peng wrote:
>
> If I understand your problem correctly, you could use `apply`.
>
> user=> (defn f [w x y z] (+ w
Say you are given a vector A=[a1 a2 a3 a4] by some function/library/Java
call/whatever.
You want to use A in some function F that expects the values a1 a2 a3 a4
but not in the form of A; for example (defn F [w x y z] (+ w x y z)).
Is there some function G that you can use on A such that (F (G A
I have watched, listened-to, or read most of the stuff out there that is on
how to tune your code to be faster (ie. type-hints). All of these pointers
are great. It is useful to know. What I haven't seen is something similar
about best practices for how to make your code use as little memory
I am interested in updating the clojure.contrib section.
--
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
Note that posts from new members are moderated - please be patient with your
first
I am a core.logic noob as well, but I think David Nolen talked about this
in a presentation that you can watch at:
http://vimeo.com/46163091
He will start talking about what I think you are interested in at about 12
minutes and 20 seconds into the presentation.
By the way, if I grow my hair
I think that you have to talk about concurrency! It is on everyone's mind.
I would like to see the discussion go further than what I have seen in
most other Clojure books. If you are REALLY interested in concurrency, you
are probably interested in looking at using more than one node in a
clu
I know that this might be more of a question for elsewhere, but I have been
playing with core.logic from time to time when I am sick of looking at
stuff for my day job. Many months ago, I figured out how to make a project
using lein and at the time core.logic-0.6.8.jar was the newest version
Wow, that really blew me away.
--
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
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from
I am willing to contribute, and have in the past, but I think that
instead of just contributing some cash and hoping things that we want
will be worked on, I would propose that we structure it some. In
fact, I come up with a few projects that could be of use to the whole
community, or at least a l
>Should there be a standard Clojure IO API that each flavor of Clojure would
>implement?
You are correct. This is more of what my question should have been.
I do NOT want to restrict myself to a particular platform.
--
You received this message because you are subscribed to the Google
Groups
This is a NOOB question.
Would it be possible to write a library that could do IO without
resorting to the underlying VM?
--
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
Note that posts fr
+1 Mark.
One of the things that was really nice about clojure.contrib up
through 1.2 was the unified API documentation. I would also like to
see that come back.
On Jan 31, 4:06 pm, Base wrote:
> +1 Mark.
>
> On Jan 31, 1:59 pm, Mark Engelberg wrote:
>
>
>
>
>
>
>
> > On Tue, Jan 31, 2012 at
2 1])
>
> Pretty cool!
>
> Thanks,
> Ambrose
>
>
>
>
>
>
>
> On Sun, Jan 1, 2012 at 4:31 AM, cej38 wrote:
> > I am trying to learn how to use core.logic. Here is a toy problem
> > that I am thinking about.
>
> > (run* [q]
> > (fr
I am trying to learn how to use core.logic. Here is a toy problem
that I am thinking about.
(run* [q]
(fresh [a b c]
(membero a [1 2 3])
(membero c [1 2 3])
(== b 2)
(!= a b)
(!= a c)
(!= b c)
(== q [a b c])))
I would like to create a function that replaces the thr
I was getting the same error when I tried to use (:refer
[clojure.core :exclude [==]]) in a name space definition. The
following worked.
On Nov 25, 10:55 am, Tassilo Horn wrote:
>
> user> (ns core-logic-playground
> (:refer-clojure :exclude [==])
> (:use clojure.core.logic))
I used lein to create a new project. Here is my project.clj file:
(defproject SUDOKU_CLOJURE "0.01"
:description "My superduper SUDOKU solver."
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure/core.logic "0.6.5"]])
After running "lein deps" I then run "lein repl" a
://groups.google.com/group/clojure/browse_thread/thread/4ffcd546445bbedf/5e35a3fc95de5130?lnk=gst&q=cej38+Aparapi#5e35a3fc95de5130
On Sep 8, 4:22 pm, Timothy Baldridge wrote:
> However, last I checked, the OpenCL kernel
> language did not support virtual functions or dynamic memory
> allocation.
Friends,
Thank you for the replies. I think you have proved my point.
--
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
Note that posts from new members are moderated - please be patient w
One of the first things that I want to know how to do when I learn a
new programming language is how to read from or print to a file. The
problem is that none of the clojure books do a good job of explaining
how to do so, in my opinion. What little is said is usually tucked
away and not highlight
I am not your man for being a tutor, but what type of math libraries?
On Jul 28, 1:26 pm, Jay Vyas wrote:
> Hi guys (and hello to my beloved london-clojurians) : My name is jay and I
> want to pair program some Clojure scripts against REPL with a moderate to
> good clojure tutor. If anyone is
I don't know if calx is the best choice or not. Also, I know that
this suggestion isn't clojure, but AMD is working on a java API for
running on code on in openCL:
http://developer.amd.com/zones/java/aparapi/pages/default.aspx
I haven't used it at all (my java knowledge is about zero, and I
have
Hello.
Has anyone looked at using AMD's Aparapi API from within Clojure?
--
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
Note that posts from new members are moderated - please be patient
Hi,
I would like the simplest method to compile a few lines of clojure
code into a jar file that I can distribute to some fellow scientists
that don't know much (if anything) about java or clojure. Since I am
not creating a huge product that I will be updating often, maven and
Lenningen seem lik
I am sorry if this question has been asked and answered, but I didn't
see it when I searched.
Has anyone really looked at the performance benefits, when running
clojure, of the different JVM's that are out there? For example, I
use the stock JVM that comes with my operating system. But, would I
Laziness is great when there are things that may not ever be needed.
But it slows things down when you know that you are going to need some
function applied to every element of some col. The doall function is
your friend in this case.
If there are things that you are using pmap on then I would op
I am currently at the Naval Research Laboratory, Washington DC.
Chad
On Jan 18, 11:59 am, Konrad Hinsen wrote:
> On 18 Jan, 2011, at 17:37 , cej38 wrote:
>
> > I think the clojure community should be seeking the type of funding to
> > make it the goto language for HPC.
I think the clojure community should be seeking the type of funding to
make it the goto language for HPC. As a community we definitely have
the brains to make it happen.
While I am not enough of a computer scientist to be able to contribute
to the development, I am willing to help write proposals
I have read large chunks of all of the (English language) Clojure
books. I think "The Joy of Clojure" is the most well written of the
books. It is true that I didn't start reading it until I was already
familiar with Clojure, but I think that this is the one to start
with. "Programming Clojure"
I would also like to watch the videos of the presentations. Even if I
had to pay for them.
On Oct 24, 1:40 pm, Saul Hazledine wrote:
> On Oct 24, 6:03 pm, Stuart Halloway wrote:
>
> > It was terrific meeting so many of you for the first time. Thanks again to
> > all the attendees, speakers, sp
Another thought:
9. Unit testing is much easier! The effort it takes to write unit
tests is Fortran is so high, it might as well be impossible, and thus
almost no one does it.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, se
Having a fast code is important, but as I have often said to
colleagues, computer time is cheap, my time is not. If I can write
code that does the same thing in two languages, and the code written
in one language runs in half the time of the other, while the code in
the other language took half th
yes
On Nov 24, 12:28 pm, Joop Kiefte wrote:
> 2010/11/24 cej38 :
>
>
>
>
>
> > 5. ease of changing function calls to allow for extra stuff/
> > functionality without breaking other stuff. An example would be best
> > here. Suppose I had defined some
I am a physicist. I have been using Clojure full time for the last
year and a half. The reasons that Rich (and most other Clojure
evangelists) give for using Clojure, are all nice and good, but they
point to what computer scientists think about. If you want scientists
and engineers to think abou
It is wonderful that people are so willing to help with a specific
problem, and I encourage you to continue doing so, but I don't think
anyone has answered the real question. Is there material out there
that describes some of the mechanisms, tools, ideas, etc. that will
allow the average clojure u
Before I make a slight criticism, let me state, that clojure.org web
pages are by far the best reference pages I have seen on any
language. That being said, the Reference bar on the left-hand-side of
the page, appears to be out of date. I believe that there should also
be a link for
http://cloju
great! good to know
On Oct 20, 3:21 pm, Rich Hickey wrote:
> On Oct 20, 1:34 pm, cej38 wrote:
>
>
>
>
>
> > This question leads into something that I read in Joy of Clojure (page
> > 161 in the latest MEAP edition):
> > "If you manage to hold onto
This question leads into something that I read in Joy of Clojure (page
161 in the latest MEAP edition):
"If you manage to hold onto the head of a sequence somewhere within a
function, then that sequence will be prevented from being garbage
collected. The simplest way to retain the head of sequence
I am kinda sorry that I started this whole thing. I don't need
another lesson in limits. The simple fact of the matter is that, in
my code, I run into a place where I have a comparison (= some-value
(some-function some-data)), the function, data, and value can change.
In a use case that I am inte
The more that I think about it, the more I would rather have a set of
equalities that always work. float= was a good try.
--
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
Note that posts fr
On Oct 12, 12:50 pm, David Sletten wrote:
> This discussion may
> help:http://www.gettingclojure.com/cookbook:numbers#comparing-floats
I originally tried something like float= described in the link, I give
the definition here
(defn float=
([x y] (float= x y 0.1))
([x y epsilon]
(le
I keep running into this type of problem:
user=> (- 12.305 12.3049)
9.9976694E-5
The computer (probably the JVM) has just lied to me. Any fourth grade
student will know that this does not equal 0.0001. This would be less
of a problem is the JVM was consistent; if it were consistent then
I noticed that clojure.string is not showing up on the API webpage,
http://clojure.github.com/clojure/, is that an oversight?
--
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
Note that posts
I don't understand doto.
Suppose I try the following:
user=> (doto 1 println)
1
1
user=>
Now suppose I try the following:
user=> (doto 1 #(println (inc %)))
1
user=>
But if I make the following definition:
(defn some-function [x]
(println (inc x)))
user=> (doto 1 some-function)
2
1
user=>
+1 for an optimizer
--
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
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group,
help please
On Aug 16, 5:22 pm, cej38 wrote:
> Hello,
> I work with text files that are, at times, too large to read in all
> at one time. In searching for a way to read in only part of the file
> I came acrosshttp://meshy.org/2009/12/13/widefinder-2-with-clojure.html
>
> I
My first question would be how do you want to interact with clojure?
Are you going to be using something like Netbeans, or emacs, or
[shudder] vi? The answer really kinda depends on that.
I really like Netbeans. The Enclojure plug-in works well. Also, all
of these problems with using Macports,
Hello,
I work with text files that are, at times, too large to read in all
at one time. In searching for a way to read in only part of the file
I came across
http://meshy.org/2009/12/13/widefinder-2-with-clojure.html
I am only interested in the chunk-file and read-lines-range functions.
My pro
I think that the examples should be part of the function definition.
I wouldn't think it wouldn't noticeably slow down running code (as it
would be ignored at run time). Having the examples in the definition
would be the easiest way of having access at all times (say
programming on a laptop withou
I am a physicist by training and practice, this means that I am an
expert on Fortran 95. To say my exposure to Java is minimal would be
generous. And until last year when I heard about Clojure from a
friend, I thought LISP was a speech impediment.
Setting up Clojure was a MAJOR problem for me, w
I discussed prewalk and postwalk with a another Clojure user that I am
friends with. He sent me the following, via email, this morning:
I have a workaround/solution for you.I still don't know exactly
why, but the :else clause in walk calls outer on form. This will give
you all sorts of class
Kevin, thank you for your example.
Ok here is what I get:
(prewalk #(doto % prn) [[3 [3]] [3 3]])
[[3 [3]] [3 3]]
[3 [3]]
3
[3]
3
[3 3]
3
3
[[3 [3]] [3 3]]
Thus, it appears that an "element" of my nested vectors isn't just the
values within the vectors, but also stands for the inner vectors as
we
This post has two parts.
Part 1.
I know that the API is trying to hit the sweet spot on the brevity vs.
information curve, but there are several areas where more information
is needed; one of these is clojure.walk.
Let's say that I have some nested set of vectors:
(def nestV [ [0 [0] ] [0 0] ])
>
> - When I run clj (from the most recent ClojureX) on the command line with -i
> and a source file it runs the file but then hangs. If I also specify -r then
> I get a REPL after the file runs, which is nice, but I was hoping that
> without -r it would terminate and return to a shell prompt w
I noticed a thread on the clojure developer's google group last night,
http://groups.google.com/group/clojure-dev/browse_thread/thread/97e5fa7c49f457b2#
I first want to give my vote for including:
io
seq
string
I would also like to see seq include more functionality. Two
examples, which I use a
+1 for debugging
I would add clojure.contrib.logging.
--
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
Note that posts from new members are moderated - please be patient with your
first po
Hi,
This is interesting. I have often wanted something like this. Is
there a way to access clojure.contrib?
Thanks
--
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
Note that posts from n
I found another missing function: fmap.
I notice these things because still don't know Clojure very well, but
I work with someone that does. Thus, as I have time to work on it, I
end up spending a fair amount of time trying to figure out his code.
--
You received this message because you are su
Hi,
I am writing because there seem to be missing functions in the API
webpage. The only one that I know for sure at the moment is the
filter function.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@goo
Hi,
I am sorry if this has already discussed, but I didn't see it when I
did a search.
I keep running into instances where I would like to define a struct,
using defstruct, and then have that be applied to the elements of a
coll. A simple example might explain it better.
(defstruct mystruct
Does anyone know of any college courses that are using Clojure? For
example, instead of LISP in an AI course?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloju
I was just looking through the main web page of clojure-contrib and
came across this:
"If you wish to have a version for off-line use you can use the
download button on the page at GitHub .gh-pages branch."
Is there a similar repository for the clojure.org?
--~--~-~--~~
74 matches
Mail list logo