Re: Architectural doubts

2015-02-01 Thread Milton Silva
For now I'm hand coding a big loop with transients and a bytebuffer. It is an incredibly ugly imperative mess but, it is fast enough and so far it fits nicely into ram. It takes 2s (at this point gloss was taking upwards of 5 minutes) to decode 200MB all the way to tcp and uses 500MB of heap.

Architectural doubts

2015-01-31 Thread Milton Silva
While using wireshark to analyse libpcap files (= 200 MB) I routinely think that it would be great to preform relational queries but, wireshark only supports search. I thought I would decode the entire file, hold it in memory as clojure data structures and use datomic's datalog. Besides

core.logic vectors vs lists

2014-01-01 Thread Milton Silva
Given this: (defn nullo [l] (== '() l)) (defn all-uno [l] (conde [(nullo l) s#] [(fresh [f r] * (firsto l 1)* (resto l r) (all-uno r))])) why is it that (run* [q] (all-uno [1 q 1 q])) unifies q with 1 and (run* [q] (all-uno '(1 q 1 q))) doesn't? More

Re: core.logic vectors vs lists

2014-01-01 Thread Milton Silva
Thank you for the response and for core.logic. I assumed '(a b c) was equal to (list a b c) which I now see is a wrong assumption. On Wednesday, 1 January 2014 15:57:38 UTC, Milton Silva wrote: Given this: (defn nullo [l] (== '() l)) (defn all-uno [l] (conde [(nullo l) s

clojure.zip branch? and next behaviour

2013-12-02 Thread Milton Silva
I was trying to write a function next-branch. I wrote somthing like: (use 'clojure.zip) (def zp (seq-zip '(+ 1 2 (+ 3 4) (+ 5 6 (defn next-branch [loc] (second (filter branch? (iterate next loc (next-branch (next-branch (next-branch zp))) this results in: NullPointerException

Re: A New Core.logic Primer

2012-03-15 Thread Milton Silva
This primer is a good introduction to core.logic operators. What I think is missing is a tutorial that answers these questions: What type of problems does core.logic excel at solving? How do you solve problems with core.logic? How does it enable simplicity? (Rich said in simple made easy that

Re: Alternative structures to arrays?

2011-12-24 Thread Milton Silva
http://en.wikipedia.org/wiki/Quadtree Quadtrees and octrees are very good for sparse data(2-d and 3-d respectively), but it depends on the manipulations you want to make (depending on how they are implemented some update operations can be very costly when compared to arrays). I think there isn't

Re: problems of a newbie

2011-11-07 Thread Milton Silva
On Nov 7, 9:14 am, Dennis Haupt d.haup...@googlemail.com wrote: The main thing to keep in mind is that when coming from java/scala, you'll have a hard time adjusting to clojure, and you're making it harder by trying something so inherently full of state. I understand the need to tackle

Re: problems of a newbie

2011-11-07 Thread Milton Silva
On Nov 7, 12:41 pm, Milton Silva milton...@gmail.com wrote: On Nov 7, 9:14 am, Dennis Haupt d.haup...@googlemail.com wrote: The main thing to keep in mind is that when coming from java/scala, you'll have a hard time adjusting to clojure, and you're making it harder by trying something

Re: problems of a newbie

2011-11-06 Thread Milton Silva
On Nov 5, 12:16 pm, Dennis Haupt d.haup...@googlemail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, i'm half done with my asteroids clone. i stumbled over a few problems and wanted to know how others already solved them :) i am used to less concrete programming. i ask my

Re: advantage of dynamic typing

2011-09-20 Thread Milton Silva
+1 On Sep 20, 4:43 am, Sean Corfield seancorfi...@gmail.com wrote: On Mon, Sep 19, 2011 at 4:19 PM, Dennis Haupt d.haup...@googlemail.com wrote: an advantage i see is very, very concise code since you have no type annotations at all. the downside is that exactly this code might be

Re: Thoughts on CUDA + Clojure

2011-09-08 Thread Milton Silva
Why not opencl? This way you would be able to run the code in any hardware and even a hybrid approach cpu+gpu(AMD and NVIDIA), you could even think about webcl (javascript to access the gpu) which I think has some form of GC. Besides, opencl code is very similar to CUDA code. Whatever you do,

Re: Clojure for large programs

2011-07-02 Thread Milton Silva
On Jul 3, 2:26 am, Mark Engelberg mark.engelb...@gmail.com wrote: Ideally, I was hoping to start a more in-depth discussion about the pros and cons of programming in the large in Clojure than just waxing poetic about Clojure/Lisp's capabilities in the abstract :) Yes, much of the initial

Re: Complement to clojure survey

2011-06-30 Thread Milton Silva
Results are open(to see the graphs, go to form-show summary of responses). The contrib results aren't very meaningful but, the rest are interesting. https://spreadsheets.google.com/spreadsheet/ccc?key=0AldCQypVmS28dFFJTTZWT2lXR1N1dTJTWk5mdjZXZlEhl=en_US On Jun 30, 2:06 am, Milton Silva milton

Re: Complement to clojure survey

2011-06-30 Thread Milton Silva
try this link https://spreadsheets.google.com/spreadsheet/gform?key=0AldCQypVmS28dFFJTTZWT2lXR1N1dTJTWk5mdjZXZlEhl=en_USgridId=0#chart On Jun 30, 9:49 pm, Phil Hagelberg p...@hagelb.org wrote: Milton Silva milton...@gmail.com writes: Results are open(to see the graphs, go to form-show summary

Re: Complement to clojure survey

2011-06-30 Thread Milton Silva
The graphs are now in sheet 3 and 4. I could not find a way to enable users to view the summary. On Jun 30, 11:37 pm, Phil Hagelberg p...@hagelb.org wrote: Milton Silva milton...@gmail.com writes: try this link https://spreadsheets.google.com/spreadsheet/gform?key=0AldCQypVmS28dF... Still

Re: Complement to clojure survey

2011-06-30 Thread Milton Silva
even more polished. On Thu, Jun 30, 2011 at 3:49 PM, Milton Silva milton...@gmail.com wrote: The graphs are now in sheet 3 and 4. I could not find a way to enable users to view the summary. -- You received this message because you are subscribed to the Google Groups Clojure group

Re: Complement to clojure survey

2011-06-30 Thread Milton Silva
On Jul 1, 1:43 am, Sean Corfield seancorfi...@gmail.com wrote: On Thu, Jun 30, 2011 at 5:37 PM, Milton Silva milton...@gmail.com wrote: I wish that book also had preview chapters like joy of clojure, that would very probably earn it some more early buys. (that was what happened with me

Re: Complement to clojure survey

2011-06-29 Thread Milton Silva
At this point there are 69 responses, I think they are enough to draw some conclusions but I'll keep the survey open till later today(to see if we can get around 100 responses). As soon I close it, the results will be available for everyone. On Jun 23, 9:22 pm, Milton Silva milton...@gmail.com

Complement to clojure survey

2011-06-23 Thread Milton Silva
As suggested by Chas Emerick here: http://cemerick.com/2011/06/15/the-2011-state-of-clojure-survey-is-open/#comments I've created the following survey: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dFFJTTZWT2lXR1N1dTJTWk5mdjZXZlE6MQ -- You received this message because you are

Re: Complement to clojure survey

2011-06-23 Thread Milton Silva
done ;) btw, why do you find it useful to use more than one? or is it a necessity? On Jun 23, 9:44 pm, Aaron Bedra aaron.be...@gmail.com wrote: On 06/23/2011 04:22 PM, Milton Silva wrote: As suggested by  Chas Emerick here: http://cemerick.com/2011/06/15/the-2011-state-of-clojure-survey-is-op