Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-10 Thread David Toomey
Thanks for the repiles -- and sorry for the delayed reply. I guess I'm doing something obnoxiously stupid. The code I'm working with looks like this: (GET "/:profile-page" [profile-page] . ;;; check if user is in database, if so, show the profile page: )) I've tried several

Re: Working with big datasets, merging two ordered lists by key

2014-03-10 Thread Frank Behrens
Thanks for your suggestions. a for loop has to do 100.000 * 300.000 compares Storing the database table into a 300.000 element hash, would be a memory penalty I want to avoid. I'm quite shure that assential part of the solution is a function to iterate through both list at once, spitting out p

Re: Working with big datasets, merging two ordered lists by key

2014-03-10 Thread Frank Behrens
Hey, just to share, I came up with this code, which seem quite ok to me, Feels like I already understand something, do i, Have a nice day, Frank (loop [a '(1 2 3 4) b '(1 3) out ()] (cond (and (empty? a)(empty? b)) out (empty? a) (recur a (rest b) (conj out [nil

Re: Need help understanding a lazy sequence function

2014-03-10 Thread Asfand Yar Qazi
Hi, On Sunday, 9 March 2014 14:58:47 UTC, Atamert Ölçgen wrote: > > Hello, > > (take 1 fib-seq) => (1) > > > Which can also be seen as[*] (map + (0) (1)) > > (map + '(0) '(1)) => (1) > > > Makes sense? > > I'm afraid it still doesn't make sense; I still don't understand how (cons 0 (cons 0 fib-se

Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-10 Thread James Reeves
You should be able to write: (GET "/:profile-page" [profile-page] ...) Compojure (via Clout) automatically decodes parameters in the URL, so there shouldn't be any need to decode the data any further. However, for future reference, routes in Compojure have a syntax very similar to functions.

Re: Need help understanding a lazy sequence function

2014-03-10 Thread Alan Forrester
On 10 March 2014 10:26, Asfand Yar Qazi wrote: > Hi, > > On Sunday, 9 March 2014 14:58:47 UTC, Atamert Ölçgen wrote: >> >> Hello, >> >> (take 1 fib-seq) => (1) >> >> >> Which can also be seen as[*] (map + (0) (1)) >> >> (map + '(0) '(1)) => (1) >> >> >> Makes sense? >> > > I'm afraid it still does

Re: Need help understanding a lazy sequence function

2014-03-10 Thread Asfand Yar Qazi
On Monday, 10 March 2014 11:35:30 UTC, Alan Forrester wrote: > > According to the documentation for map > http://clojuredocs.org/clojure_core/clojure.core/map > (map + x y) > > where x and y are two collections adds the first element of x to the > first element of y, the second element of x to

Re: [soft/philosophical] event handers in cljs

2014-03-10 Thread juan.facorro
Hi Sam, On Sunday, March 9, 2014 11:16:13 PM UTC-3, Sam Ritchie wrote: > > Well, I typically have multiple channels. No need to have a single global > event bus for everything. With multiple channels, you can have a bunch of > local event loops. > I have taken this approach as well, but I can

Do I have to have knowlegde about Lisp

2014-03-10 Thread Roelof Wobben
Hello, I like the idea of Clojure but I wonder if I have to know a lot of Lisp to work with Clojure. What is the best way to go from a absolute beginner to someone who can work with Clojure. Roelof -- You received this message because you are subscribed to the Google Groups "Clojure" group

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Dennis Haupt
you can learn clojure without learning lisp first :) 2014-03-10 15:41 GMT+01:00 Roelof Wobben : > Hello, > > I like the idea of Clojure but I wonder if I have to know a lot of Lisp to > work with Clojure. > > What is the best way to go from a absolute beginner to someone who can > work with Cloj

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Moritz Ulrich
It might actually be counter-productive to learn Common Lisp before Clojure, as Clojure is so much simpler easier to learn/understand than Common Lisp. On Mon, Mar 10, 2014 at 4:52 PM, Dennis Haupt wrote: > you can learn clojure without learning lisp first :) > > > 2014-03-10 15:41 GMT+01:00 Roel

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Gary Trakhman
1. Read a good book. 'Clojure Programming' has a good reputation. 'Joy of Clojure' is a good second book. 2. Do some small examples, 4clojure is great for this. 3. Build up larger programs from smaller chunks. Learning another lisp at the same time is going to distract more than help, clojure doc

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Thomas
Roelof, I wanted to learn Lisp for a lng time (maybe even 10 year +) tried common Lips once or twice, but failed miserably. But it was Clojure that really got me going. Watch the various video's that Rich Hickey did that are on youtube (https://www.youtube.com/user/ClojureTV) if you don't w

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Jacob Goodson
Let me rephrase your question to show you something... Should I learn LISP in order to learn LISP... Clojure is a dialect of LISP as is common lisp; when you learn Clojure you are learning LISP. Clojure "has its opinions" about how to do its list processing, however, all other list processing

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Roelof Wobben
Op maandag 10 maart 2014 15:41:12 UTC+1 schreef Roelof Wobben: > > Hello, > > I like the idea of Clojure but I wonder if I have to know a lot of Lisp to > work with Clojure. > > What is the best way to go from a absolute beginner to someone who can > work with Clojure. > > Roelof > > -- You

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Shantanu Kumar
On Monday, 10 March 2014 20:11:12 UTC+5:30, Roelof Wobben wrote: > > Hello, > > I like the idea of Clojure but I wonder if I have to know a lot of Lisp to > work with Clojure. > > What is the best way to go from a absolute beginner to someone who can > work with Clojure. > To have a quick fee

Re: More functional Quil

2014-03-10 Thread Nikita Beloglazov
Lee, I think question about managing/updating state in quil pop ups pretty frequently and many people expect quil to have built-in tools to do it in functional style. And using atoms to update state may feel hacky. I think this tools should exist and quil 2.0 is a good time to address the issue. Y

Re: More functional Quil

2014-03-10 Thread Gary Trakhman
The complicated-looking semaphore code was adapted from http://stackoverflow.com/a/5275254/2559313 . I think some issues with other alternatives are in there. On Mon, Mar 10, 2014 at 1:27 PM, Nikita Beloglazov wrote: > Lee, > > I think question about managing/updating state in quil pop ups prett

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Benedict Apuna
I'm still a beginner with Clojure so I can't give any definite answers. For what it's worth, I've been working through both Clojure from the ground upand Clojure for the Brave and True , and I'm finding

[ANN] 1st public release of thi.ng geometry toolkit (CLJ & CLJS)

2014-03-10 Thread Karsten Schmidt
It is my absolute pleasure to finally announce the first public release of the 2d/3d geometry library/toolkit: thi.ng/geom Having worked on this regularly since late 2011 as successor of my Java-based toxiclibs.org project, the new project has already undergone three complete overhauls as I've bee

Re: [ANN] 1st public release of thi.ng geometry toolkit (CLJ & CLJS)

2014-03-10 Thread Mimmo Cosenza
This stuff should be great. Thanks so much for sharing it. mimmo On 10 Mar 2014, at 22:32, Karsten Schmidt wrote: > It is my absolute pleasure to finally announce the first public > release of the 2d/3d geometry library/toolkit: thi.ng/geom > > Having worked on this regularly since late 2011 a

[ANN] 1st public release of luxor - 3d scene compiler for Luxrender

2014-03-10 Thread Karsten Schmidt
Following up on the announcement of thi.ng/geom, I've also just pushed the first release of a related support library: thi.ng/luxor, a 3d scene compiler & mesh exporter for creating high definition & high resolution renders with Luxrender. Luxrender.net is an open source, physically based, unbiase

[ANN] thi.ng/validate - purely functional validation & correction

2014-03-10 Thread Karsten Schmidt
Last release of today, I promise... :) thi.ng/validate is (by now) yet-another-validation library, but actually is almost a year old and AFAIK has some unique features I dearly missed in other contenders and maybe you've (missed them) too: - pure functions, no macros - composable validator fns -

Re: Need help understanding a lazy sequence function

2014-03-10 Thread Frank Behrens
Hello, I'm trying to understand the lazyness, how they work, how to create them, how to avoid pre-realisation. Can someone point me to which documentation would be helpful, where do I find it ? Frank Am Montag, 10. März 2014 13:16:00 UTC+1 schrieb Asfand Yar Qazi: > > On Monday, 10 March 2014

Re: Need help understanding a lazy sequence function

2014-03-10 Thread Gary Trakhman
If you haven't seen the impl yet, it's relatively small and simple: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L642 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LazySeq.java Chunked seqs are more complex, but they're basically a performance optim

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Karsten Schmidt
May I also chip in with a 15k word intro tutorial I've co-written (and whose upcoming part 2 is focused on Quil): http://www.creativeapplications.net/tutorials/introduction-to-clojure-part-1/ On 10 March 2014 20:19, Benedict Apuna wrote: > I'm still a beginner with Clojure so I can't give any d

Re: [ANN] durable-queue: an in-process disk-backed queue

2014-03-10 Thread Zach Tellman
Hey Leif, When using :fsync-interval, the actual calls to .force() on the underlying ByteBuffers occur on another thread, making it effectively a background process. This is contrasted with :fsync-threshold, which will synchronously call fsync when the write threshold is hit. Note that if the

Re: [ANN] 1st public release of thi.ng geometry toolkit (CLJ & CLJS)

2014-03-10 Thread Malcolm Sparks
Karsten, This is amazing. Watching you work with your geom library in this fantastic video has really inspired me :- http://www.youtube.com/watch?v=tKIVJ2TaS2k&feature=youtu.be&t=20m9s I've been looking for some geom library to build animated data visualizations, so I'm looking forward to exp

[ANN] ClojureCLR mailing list

2014-03-10 Thread dmiller
ClojureCLR now has its own Google group for discussions. https://groups.google.com/forum/#!forum/clojure-clr Please use this new forum for ClojureCLR-specific questions, suggestions, requests related to usage, development, tooling etc. ClojureCLR-specific announcements will be the new list.

Re: Working with big datasets, merging two ordered lists by key

2014-03-10 Thread Timothy Washington
Hey Frank, Right. So I tried this loop / recur, and it runs, giving a result of *([4 nil] [3 3] [2 nil] [1 1])*. But I'm not sure how that's going to help you (although not discounting the possibility). You can simultaneously iterate through pairs of lists, to compare values. However you cannot g

Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-10 Thread David Toomey
You should be able to write: (GET "/:profile-page" [profile-page] ...) Compojure (via Clout) automatically decodes parameters in the URL, so there shouldn't be any need to decode the data any further. Heh, I would have thought something was baked in, but I still get urls with nothing filli

Re: 1.6.0-beta2 / sumatra / graal / okra / hsa / gpgpu

2014-03-10 Thread kovas boguta
This is pretty cool. Keep us updated! On Sun, Mar 9, 2014 at 5:42 PM, Jules wrote: > Well - not sure about interest levels :-) but I am soldiering on. > > I've tidied up and checked in the code I mentioned and some more stuff that > I am playing with. > > If you are running Fedora 20 x86_64 then

Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-10 Thread Jarrod Swart
This has become super confusing to follow, possibly because you have the wrong expectation of compojure? Compojure is not specificy how your routes will look, it is responding to whatever URLs you put in place. In the case of: (GET "/:profile-page" [profile-page] ...) :profile-page in the rou

Re: Working with big datasets, merging two ordered lists by key

2014-03-10 Thread Leif
Re. Tim's points below: *i)* The seqs have to be ordered, or one of them has to be loaded fully into memory; I don't think there's any way around that. *ii)* Frank's solution does *not* require the seqs to be the same length, and it gives you the complete 'diff' of the seqs (aka outer join), w

Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-10 Thread David Toomey
Fair enough. So if I want pretty urls, I have to have an extra column in my database then. This is one compromise, but I was hoping for something a little more programmatic. As a counter to G+, StackOverflow alters the name to lower-case and add a '-', so that M User becomes www./m-user.

Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-10 Thread Jarrod Swart
Right, either way the compojure route would be the same. (GET "/:profile-name" [profile-name] ...). You don't need an extra column in your DB unless you want to do so. The route/compojure is simply responding to the URL you write out in your template, or that is requested by some other mecha

Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-10 Thread Jarrod Swart
No edit button so I have to post again, that first example should end with ";; (make-profile-url "John Smith") => "/John-Smith" And to reiterate you decide what your url will look like in your template: http://myapp.com/JohnSmith";>View John Smith's Profile or http://myapp.com/John-Smith";>View

Good quick reference screencasts

2014-03-10 Thread The Dude (Abides)
Found a good set of screencasts as quick references for functions, namespaces, collections, destructuring, sequences and conditional flow. Quick 1 to 2 min screencasts on each: http://www.pluralsight.com/training/Courses/TableOfContents/clojure-fundamentals-part-one And the more advanced for co

ANN Langohr 2.7.1 is released

2014-03-10 Thread Michael Klishin
Langohr [1] is a small, feature complete Clojure client for RabbitMQ. Release notes: http://blog.clojurewerkz.org/blog/2014/03/11/langohr-2-dot-7-1-is-released/ 1. http://clojurerabbitmq.info -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- You received this message

Re: [ANN] 1st public release of thi.ng geometry toolkit (CLJ & CLJS)

2014-03-10 Thread Kuba Roth
Hey, Karsten great stuff and congrats! I haven't been following toxic closely for quite some time, sadly but does that mean it's been discontinued completely and you are working in clojure full time? :) What's your impression on working with big code base as above library in clojure vs java?