how would you implement sending out a verification email?

2013-02-20 Thread Balint Erdi
Hey, So yesterday we discussed concurrency at our meetup (http://www.meetup.com/Budapest-Clojure-User-Group/) and a question occurred to me. Suppose we have a classic web application. (I'm not currently building such a web app in Clojure, so that's a "theoretical" question). When the user si

Re: how would you implement sending out a verification email?

2013-02-21 Thread Balint Erdi
mpted and if the side-effect > action itself fails then the transaction rolls back like always. > > On Wednesday, February 20, 2013 9:32:14 AM UTC-5, Balint Erdi wrote: >> >> Hey, >> >> So yesterday we discussed concurrency at our meetup ( >> http://www.meetup.

Working with a huge graph - how can I make Clojure performant?

2013-03-11 Thread Balint Erdi
Hey, I got an assignment to implement an algorithm to calculate strongly connected components in a graph ( http://en.wikipedia.org/wiki/Kosaraju's_algorithm). The graph is rather big, it has ~900.000 vertices. In its first pass, it needs to do a depth-first search on the graph and calcula

Re: Working with a huge graph - how can I make Clojure performant?

2013-03-28 Thread Balint Erdi
30 seconds. On Thursday, March 28, 2013 2:22:44 AM UTC+1, Stephen Compall wrote: > > On Mon, 2013-03-11 at 10:37 -0700, Balint Erdi wrote: > > (let [neighbors (persistent! > >(reduce > > (fn [

Re: Working with a huge graph - how can I make Clojure performant?

2013-03-28 Thread Balint Erdi
;s). > > On Thursday, March 28, 2013 12:06:45 PM UTC+1, Balint Erdi wrote: >> >> Yes, that's definitely a good idea. I tried a few other things (including >> that, I think) after I posted that but nothing really worked and it turned >> out that the tail-recursive

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-07-06 Thread Balint Erdi
Hey, AFAIK the clojure reducers library gains its performance boost since the underlying JVM can make use of multiple cores. I wonder how this changes with Javascript being the platform. Don't JS engines have a single execution thread? Balint On Thursday, June 28, 2012 11:47:46 PM UTC+2, Davi

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-07-07 Thread Balint Erdi
, Las wrote: > > Hi, > > using the reducers library also eliminates the per-step allocation of > temporary results when the processing code is composed of multiple > functions, AFAIK. > > Las > > 2012/7/4 Balint Erdi > >> Hey, >> >> AFAIK the clojur

Re: recursion question

2012-08-15 Thread Balint Erdi
This is the classic Subset sum problem (http://en.wikipedia.org/wiki/Subset_sum_problem) and is an NP one. I've implemented the pseudo-polynomial dynamic programming solution found on the above Wikipedia page: https://gist.github.com/3359504 It returns the indexes of the elements that give the

Re: The Value of Values

2012-08-25 Thread Balint Erdi
I'd like to read that thread, can you provide a url? Thank you, Balint On Saturday, August 25, 2012 2:41:40 AM UTC+2, Bost wrote: > > See the thread "The Value of Values" started by Conrad Barski > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

"strange" pattern to implement comp, juxt and partial

2012-10-02 Thread Balint Erdi
Hey, When browsing through clojure.core I noticed something peculiar in the implementation of comp, juxt and partial. All three share the same implementation pattern. They define separate methods for the arity of 0,1,2,3 and any. For example in juxt: (defn juxt (…) ([f g] (fn

Re: "strange" pattern to implement comp, juxt and partial

2012-10-02 Thread Balint Erdi
Makes sense but why don't we have it in all possible places then? Thank you. On Tuesday, October 2, 2012 9:55:42 PM UTC+2, Herwig Hochleitner wrote: > > That is because dispatch on argument count is fast, while apply is slow. > Especially so since it might have to create an intermediate seq. > I

Re: "strange" pattern to implement comp, juxt and partial

2012-10-02 Thread Balint Erdi
gt; My guess is that it's useful in the core functions which are more > heavily used. Otherwise you're getting into premature optimization if > you use it in any of your own functions without profiling it first. > > On Tue, Oct 2, 2012 at 4:18 PM, Balint Erdi > > wro

Re: what is the simplest user auth system possible?

2012-10-29 Thread Balint Erdi
If you share your pc with your brother then using the classic one username/password per site you'd have to log out and back in on each site you want to use (or use another browser/incognito window, etc.) With Persona you only have to do this once. On Sunday, October 28, 2012 9:05:20 PM UTC+1, S

Starting a Clojure user group in Budapest

2012-11-27 Thread Balint Erdi
Hey, I've grown extremely enthusiastic about Clojure (and still growing more and more :) ) and would like to spread the love around here in Budapest, Hungary. This is to estimate how many people are interested in attending a monthly meetup where we'd have presentations, code dojos, etc, so ple

Re: confused about the scope of variables, or is it something else? ClojureScript

2012-12-04 Thread Balint Erdi
As Sean suggested you should use doseq instead of for and map to force side-effects: http://clojuredocs.org/clojure_core/clojure.core/doseq Since doseq uses the exact same syntax as for, you should just write doseq in its place. map should be converted to doseq syntax, too. Balint On Monday, D

Re: group-by vs. reducers?

2012-12-07 Thread Balint Erdi
Hey, Reducers is fascinating and quite complex at the same time. I feel like "best practices" around it has not quite solidified yet. Here is how I made your example work: (ns group-by-reducers.core (:require [clojure.core.reducers :as r :only [fold reduce map]]) (:require [criterium.core :

Re: group-by vs. reducers?

2012-12-07 Thread Balint Erdi
BTW I understood the most about reducers (still not quite there yet, though :) ) from Rich Hickey's talk at EuroClojure: https://vimeo.com/45561411 On Friday, December 7, 2012 10:21:59 AM UTC+1, Balint Erdi wrote: > > Hey, > > Reducers is fascinating and quite complex at the

Re: group-by vs. reducers?

2012-12-07 Thread Balint Erdi
; "Elapsed time: 518.502 msecs" >>> Run 3 >>> "Elapsed time: 673.108 msecs" >>> "Elapsed time: 745.688 msecs" >>> "Elapsed time: 542.837 msecs" >>> Run 4 >>> "Elapsed time: 654.196 msecs" >>

Clojure user group in Budapest just launched

2013-01-11 Thread Balint Erdi
Hey, Delighted to announce that the Budapest Clojure Group has just launched: http://www.meetup.com/Budapest-Clojure-User-Group/ The official language is English so consider joining/attending if you're from a relatively close city but don't speak Hungarian (Bratislava & Vienna come to mind).

Re: Clojure user group in Budapest just launched

2013-01-11 Thread Balint Erdi
Great, just sent the pull request. On Friday, January 11, 2013 at 4:03 PM, Michael Klishin wrote: > 2013/1/11 Balint Erdi mailto:balint.e...@gmail.com)> > > Delighted to announce that the Budapest Clojure Group has just launched: > > > > http://www.meetup.com/Bud