Re: parsing and chunking large xyz files

2014-12-27 Thread cej38
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:

parsing and chunking large xyz files

2014-12-26 Thread cej38
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

Re: parsing and chunking large xyz files

2014-12-26 Thread cej38
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 http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/xyzplugin.html

Re: parsing and chunking large xyz files

2014-12-26 Thread cej38
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 problem. I need groups of lines at a time. On Friday, December 26, 2014 10:33:27 AM UTC-5, Jony Hudson

solving an equation for all solutions with constraints: core.logic.fd

2014-06-10 Thread cej38
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]}.

Re: solving an equation for all solutions with constraints: core.logic.fd

2014-06-10 Thread cej38
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 constraints

Re: solving an equation for all solutions with constraints: core.logic.fd

2014-06-10 Thread cej38
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

Re: [GSoC]: How to participate

2014-03-05 Thread cej38
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

Re: gemacl: Scientific computing application written in Clojure

2013-11-12 Thread cej38
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

Re: changing a value in a vector of maps

2013-07-31 Thread cej38
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 new

changing a value in a vector of maps

2013-07-30 Thread cej38
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

clojure API documentation

2013-01-29 Thread cej38
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 time

Re: unseq

2012-11-08 Thread cej38
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

Re: unseq

2012-11-05 Thread cej38
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 x y

unseq

2012-11-04 Thread cej38
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

best practices for small RAM usage

2012-10-03 Thread cej38
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

Re: ClojureDocs and Clojure 1.4

2012-09-12 Thread cej38
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

Re: why would this fail in core.logic?

2012-08-06 Thread cej38
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

Re: What concurrency models to document?

2012-08-02 Thread cej38
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

newer versions

2012-07-15 Thread cej38
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

Re: Light Table - a new IDE concept

2012-04-16 Thread cej38
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

Re: revisiting community funding?

2012-03-23 Thread cej38
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

clojure.io

2012-03-08 Thread cej38
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

Re: clojure.io

2012-03-08 Thread cej38
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

Re: Contrib for Clojure 1.3

2012-01-31 Thread cej38
+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 basselh...@gmail.com wrote: +1 Mark. On Jan 31, 1:59 pm, Mark Engelberg mark.engelb...@gmail.com wrote:

distincto

2011-12-31 Thread cej38
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

Re: distincto

2011-12-31 Thread cej38
, cej38 junkerme...@gmail.com wrote: 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

(refer '[clojure.core :exclude [==]])

2011-11-25 Thread cej38
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 and then try

Re: (refer '[clojure.core :exclude [==]])

2011-11-25 Thread cej38
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 tass...@member.fsf.org wrote: user (ns core-logic-playground          (:refer-clojure :exclude [==])          (:use

Re: Thoughts on CUDA + Clojure

2011-09-09 Thread cej38
://groups.google.com/group/clojure/browse_thread/thread/4ffcd546445bbedf/5e35a3fc95de5130?lnk=gstq=cej38+Aparapi#5e35a3fc95de5130 On Sep 8, 4:22 pm, Timothy Baldridge tbaldri...@gmail.com wrote: However, last I checked, the OpenCL kernel language did not support virtual functions or dynamic memory

Re: I/O

2011-08-26 Thread cej38
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

I/O

2011-08-25 Thread cej38
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

Re: Pair Coding over Skype

2011-07-29 Thread cej38
I am not your man for being a tutor, but what type of math libraries? On Jul 28, 1:26 pm, Jay Vyas jayunit...@gmail.com 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

Re: [incanter]State, how to do it right ? (rng state for parallel computing)

2011-07-23 Thread cej38
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

Aparapi

2011-07-15 Thread cej38
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

dead simple compile to jar file

2011-04-27 Thread cej38
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

Re: Realtime Clojure program

2011-02-14 Thread cej38
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

Re: The Joy of Closure

2011-01-18 Thread cej38
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 is

Re: HPC in scala ..

2011-01-18 Thread cej38
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

Re: HPC in scala ..

2011-01-18 Thread cej38
I am currently at the Naval Research Laboratory, Washington DC. Chad On Jan 18, 11:59 am, Konrad Hinsen konrad.hin...@fastmail.net 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

Re: post your feedback on the conj

2010-11-30 Thread cej38
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 shaz...@gmail.com wrote: On Oct 24, 6:03 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: It was terrific meeting so many of you for the first time. Thanks again

discussing Clojure with non-CS types

2010-11-24 Thread cej38
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

Re: discussing Clojure with non-CS types

2010-11-24 Thread cej38
yes On Nov 24, 12:28 pm, Joop Kiefte iko...@gmail.com wrote: 2010/11/24 cej38 junkerme...@gmail.com: 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 function

Re: discussing Clojure with non-CS types

2010-11-24 Thread cej38
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

Re: discussing Clojure with non-CS types

2010-11-24 Thread cej38
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,

Re: Resources on optimizing Clojure code

2010-11-04 Thread cej38
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

Reference Menu sans Transients

2010-10-22 Thread cej38
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

Re: Let usage question

2010-10-20 Thread cej38
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

Re: Let usage question

2010-10-20 Thread cej38
great! good to know On Oct 20, 3:21 pm, Rich Hickey richhic...@gmail.com wrote: On Oct 20, 1:34 pm, cej38 junkerme...@gmail.com 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 the head

Re: precise numbers

2010-10-14 Thread cej38
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

precise numbers

2010-10-12 Thread cej38
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

Re: precise numbers

2010-10-12 Thread cej38
On Oct 12, 12:50 pm, David Sletten da...@bosatsu.net 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

Re: precise numbers

2010-10-12 Thread cej38
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

clojure.string

2010-09-24 Thread cej38
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

doto

2010-08-27 Thread cej38
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=

Re: cool compiler-project?

2010-08-18 Thread cej38
+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,

Re: Installing Clojure on OS X

2010-08-17 Thread cej38
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,

Re: a more general chunk-file

2010-08-17 Thread cej38
help please On Aug 16, 5:22 pm, cej38 junkerme...@gmail.com 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 am

Re: examples (like doc)

2010-07-08 Thread cej38
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

Re: Why I have chosen not to employ clojure

2010-03-21 Thread cej38
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,

Re: clojure.walk

2010-03-20 Thread cej38
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

clojure.walk

2010-03-19 Thread cej38
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] ])

Re: clojure.walk

2010-03-19 Thread cej38
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

clojure.lib

2010-02-24 Thread cej38
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

Re: Full Disclojure - I Need Topics!

2010-01-26 Thread cej38
+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

Re: Clojure on Ideone!

2010-01-18 Thread cej38
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

Re: new API webpage format

2009-12-23 Thread cej38
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

new API webpage format

2009-12-07 Thread cej38
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

struct coll

2009-11-25 Thread cej38
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

college courses

2009-10-18 Thread cej38
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

If you wish to have a version for off-line use...

2009-09-19 Thread cej38
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?