Multiple args: opts map vs inline arguments

2013-06-17 Thread Omer Iqbal
Hey folks, What'c considered more idiomatic when having multiple, optional arguments? (defn foo1 [a b & args] (let [opts (apply hash-map args] ...)) or (defn foo2 [a b opts] ...) Cheers, Omer -- -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: Clojure On Java Friendly Microcontrollers, Beaglebone, etc

2013-09-04 Thread Omer Iqbal
Another possible approach could be use clojurescript to a nodejs target. >From some cursory googling, there do seem to be node modules like https://github.com/kelly/node-i2c which offer I2C support. And I believe you might also get a better startup time. On Wed, Sep 4, 2013 at 8:35 PM, Jeremy Wri

Re: Clojure on iOS devices - Swift as a host?

2014-06-24 Thread Omer Iqbal
I believe you're right Colin. JavaScriptCore doesn't use the JIT compiler [1]. There might be a possibility of that changing though 1. http://phoboslab.org/log/2011/04/ios-and-javascript-for-real-this-time On Wed, Jun 25, 2014 at 6:13 AM, Colin Fleming wrote: > Mike's doing all the hard work o

Re: Hello, here´s a new clojur adict... with a question.

2014-01-14 Thread Omer Iqbal
(println (v 0)) (v 0) would give you the element at index 0 (println ..) would print whatever you supply as its argument. Cheers, Omer On Tue, Jan 14, 2014 at 6:44 PM, Andreas Olsson wrote: > > How can i "println" an index of a vector? > > tryed. > > (println vector index) > > like > > (printl

Simple FIFO cache for memoize

2013-01-22 Thread Omer Iqbal
I've been reading a bit about the STM, and here's an implementation of a FIFO cache for producing a memoized version of a function. Is it correct to use the STM in this case, or are there any drawbacks? (defn bounded-memoize "Return a bounded memoized version of fn 'f' that caches the las

Re: ANN Drip: A fast JVM launcher

2013-01-23 Thread Omer Iqbal
I tried the same on a ubuntu setup. Same issue as the rest I believe. :( time drip -cp ~/.m2/repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar clojure.main -e "(reduce + (range 100))" 4950 real 0m1.065s user 0m1.420s sys 0m0.068s time java -cp ~/.m2/repository/org/clojure/clojure/1.4.0/cloj

GSOC 2013 projects?

2013-01-30 Thread Omer Iqbal
Hey folks, Even though it hasn't been announced yet, I was wondering about project ideas for this year's GSOC. I was looking at a few projects from last year, which seemed pretty interesting. Is there any official list btw? *I'm rather enthusiastic about taking part this summer :D* (cheers) Ome

mysql auth issue when using upstart for ring

2013-02-06 Thread Omer Iqbal
Hey, I used a similar upstart script which works fine for ring. However, weirdly enough, my auth with a mysql database fails. I'm using korma to interface with the db. The problem only occurs with upstart script,, because it works fine when I run it myself. To be clearer. When I run: lein trampol

Re: mysql auth issue when using upstart for ring

2013-02-06 Thread Omer Iqbal
On Thursday, February 7, 2013 3:12:22 PM UTC+8, Omer Iqbal wrote: > > Hey, I used a similar upstart script which works fine for ring. [EDIT] ignore the above sentence. I was originally replying to a thread. #mybad > However, weirdly enough, my auth with a mysql database fails.

Re: mysql auth issue when using upstart for ring

2013-02-07 Thread Omer Iqbal
Thanks Michael. That was the problem! On Thu, Feb 7, 2013 at 5:20 PM, Michael Wood wrote: > Hi > > On 7 February 2013 09:12, Omer Iqbal wrote: > > Hey, I used a similar upstart script which works fine for ring. > > However, weirdly enough, my auth with a mysql data

Re: GSOC 2013 projects?

2013-02-11 Thread Omer Iqbal
Hey Daniel, GSOC 2013 just got announced:( http://google-opensource.blogspot.sg/2013/02/flip-bits-not-burgers-google-summer-of.html ) Would be super awesome to see clojure there :) Cheers, Omer On Fri, Feb 1, 2013 at 3:04 AM, Daniel Solano Gómez wrote: > On Thu Jan 31 11:52 2013, David Nolen wro

Clojurians in sg?

2013-02-12 Thread Omer Iqbal
Hey, any folks from Singapore here? I have heard that a couple of banks here use scala and possibly clojure, but don't know the extent. -- -- 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

[GSoC Idea] cljs layer/dsl over express js

2013-02-14 Thread Omer Iqbal
Just throwing ideas. Feel free to shoot it down if you folks think its not worth it :). Also, I'm a student, and would actually be participating in GSOC, so this is more of a shoutout for possible mentors, if you guys think the project makes sense. The Problem: 1. cljs doesn't yet have a library/f

[ANN] ring-filter-routes 0.1.1 ;simple route filtering middleware

2013-02-16 Thread Omer Iqbal
Would love some feedback. I used this code in another project, and decided to publish the (very simple) middleware as a clojar in case someone else finds it useful. Cheers, Omer -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group

Re: [ANN] ring-filter-routes 0.1.1 ;simple route filtering middleware

2013-02-16 Thread Omer Iqbal
Oh my bad, forgot to add the link: https://github.com/olenhad/ring-filter-routes Its on both :) On Sun, Feb 17, 2013 at 8:56 AM, Timothy Washington wrote: > Is it on github or clojars? Where can we take a look at the code? > > > Thanks > Tim > > > On Sat, Feb 16, 201

Multiple subselects, korma

2013-02-18 Thread Omer Iqbal
Hey folks, I'm using korma 0.3.0 RC4 in a project, and wanted to know what's the idiomatic way to perform a union of two subselects. e.g. Something of this sort (select foo (where {:somefield [in (subselect ...) (subselect ...)]})) Tha

Re: [GSoC Idea] cljs layer/dsl over express js

2013-02-24 Thread Omer Iqbal
e a new project using"lein new compojure" and start >>> creating your request handler functions from there ... Just like in >>> express. If you want a jade equivalent... you can use hiccup . >>> >>> Josh. >>> >>> >>> On F

Re: Persistent Data Structures for Objective-C/LLVM

2013-03-28 Thread Omer Iqbal
Most foundation objective c data structures are immutable (NSArray, NSDictionary, NSSet etc), and are most probably more performant than clojure counterparts, though terribly less elegant. However there's the clojure-scheme project ( https://github.com/takeoutweight/clojure-scheme) which compiles

Re: ANN: Kern 0.7.0 text parsing lib has fixes, better performance

2013-04-15 Thread Omer Iqbal
Thanks Armando! I've been using kern for a number of projects and I'm really grateful for the awesome documentation :) On Tue, Apr 16, 2013 at 12:38 AM, Armando Blancas wrote: > This is a much needed clean up and perf boost release. > > https://github.com/blancas/kern > > Function (parse-file)

Re: [GSoC Idea] cljs layer/dsl over express js

2013-05-02 Thread Omer Iqbal
5, 2013 at 4:09 AM, David Nolen wrote: > Done! > > On Sun, Feb 24, 2013 at 1:53 PM, Omer Iqbal wrote: > >> Extending dogfort for real world use >> Brief explanation: Node.js provides a lightweight and fast server >> implementation, that’s commonly used for real tim

Re: Clarification on setting up Clojure, Lein and Emacs on fedora

2013-01-01 Thread Omer Iqbal
Or you could try this: https://github.com/overtone/emacs-live Contains a very good emacs conf that works out of the box. On Sunday, December 30, 2012 4:47:21 AM UTC+5, Sayth Renshaw wrote: > > Just want to make sure I get this right. I am running F18 and am setting > up clojure. > > These would

Finding latest versions of clojars

2013-01-13 Thread Omer Iqbal
Hey guys, I recently decided to shift to clojure, and am loving the experience so far. However is there a method to find the latest versions of dependencies in lein2? It is rather inconvenient to search for them manually. Cheers, Omer -- You received this message because you are subscribed to

lein-daemon 0.5

2013-01-16 Thread Omer Iqbal
Hey guys, I've been wrestling with this for a bit. I have [seancorfield/lein-daemon "0.5.0-SNAPSHOT"] in my :plugins, which seems to be the latest lein-daemon. 0.4.2 doesn't seem to work with lein2. I'm using Lein 2.0.0-RC2 on Java 1.6.0_24 OpenJDK 64-Bit Server VM When I try "lein daemon start :