Re: RESTful API Auth with Friend and Liberator

2014-01-19 Thread Bastien
Sam Ritchie sritchi...@gmail.com writes: The code for that tutorial is all here: https://github.com/paddleguru/liberator-friend Yes, thanks. PaddleGuru.com isn't open source, so I can't share any of the dashboards, unfortunately. Maybe some examples down the road. Looking forward! --

Re: [ANN] - modern-cljs integrates a port on emacs of lt-cljs-tutorial By David Nolen

2014-01-19 Thread Magomimmo
It works on Eclipse/CCW too thanks to the recent CCW updates by Laurent Petit. mimmo On Saturday, January 18, 2014 7:44:43 PM UTC+1, Magomimmo wrote: Hi all, the `modern-cljs` series https://github.com/magomimmo/modern-cljs now includes a port for Emacs users

Re: oob schemas, re: The Language of the System

2014-01-19 Thread Jonah Benton
I read these self-describing, extensible points in the context of EDN, which has a syntax/wire format for some types- maps, strings, etc- and also has an extensibility syntax: #myapp/Person {:first Fred :last Mertz} These tagged elements are extensions because they allow values of types not

Redefining the notion of S-EXP, and pattern matching S-EXPs in clojure

2014-01-19 Thread Dave Tenny
As I try to reconcile my ancient past in writing common lisp code with a clojure learning exercise, I wonder whether clojure philosophy redefines the notion of an s-expression or whether it just adds vectors and maps to s-expressions in without trying to define what an s-expression is. The

Re: oob schemas, re: The Language of the System

2014-01-19 Thread Brian Craft
That helps, thanks. It's still unclear to me that this is important enough to worry about. What application or service is hindered by string encoding a date in JSON? An example would really help. It's not compelling to assert or imagine some hypothetical application that benefits from knowing a

Re: Redefining the notion of S-EXP, and pattern matching S-EXPs in clojure

2014-01-19 Thread Jozef Wagner
s-expression is a notation, with which nested lists can be represented in a textual form. In any lisp language, your code is not working with s-expressions, but with a data structure, which is most likely a cons. s-expressions provide a convenient textual representation from which you can *read*

OOP question re: The Language of the System

2014-01-19 Thread Brian Craft
http://www.youtube.com/watch?v=ROor6_NGIWU Around 56:28 Rich is talking about whether components pass a data structure, or an object that has all these verbs and knows how to do stuff Clojure data types also have verbs, in protocols, and if one component passes a record to another

Re: OOP question re: The Language of the System

2014-01-19 Thread James Reeves
On 19 January 2014 19:55, Brian Craft craft.br...@gmail.com wrote: http://www.youtube.com/watch?v=ROor6_NGIWU Around 56:28 Rich is talking about whether components pass a data structure, or an object that has all these verbs and knows how to do stuff Clojure data types also have

Re: oob schemas, re: The Language of the System

2014-01-19 Thread Matching Socks
Hmm, here's a date field that says 090715. I wonder what it means... -- -- 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

Re: OOP question re: The Language of the System

2014-01-19 Thread Timothy Baldridge
A couple of things on this subject: 1) protocols were invented primarily for their speed. If one was going to write Clojure in Clojure it would be a little hard to implement PersistentHashMaps using pure data. You have to start with something. Thus deftype and defprotocol were born. 2) Unlike in

cljx repetition

2014-01-19 Thread t x
Consider the following two code blocks: (ns util.core #+clj (:require [clojure.core.async :as async] [types]) #+cljs (:require [cljs.core.async :as async] [types]) #+cljs (:require-macros [cljs.core.async.macros :as async])) (ns macros.lett #+clj

Re: oob schemas, re: The Language of the System

2014-01-19 Thread Patrick Logan
finds dates, and other data types, heuristically -- I'm sure Google would rather not, but that's life on the web. Google also supports JSON-LD which is a W3 standard for semi-structured and linked data. JSON-LD defines in-band syntax for dates, all XSD data types, and arbitrary data types

Re: OOP question re: The Language of the System

2014-01-19 Thread Sam Ritchie
can you elaborate on #3? What constraints did you run into with type-based dispatch that a multimethod that dispatched on :op allowed you to get around? It seems like, if that's your pattern, lifting the :op field up into an actual record type would only give you MORE freedom. You rely on the

Re: OOP question re: The Language of the System

2014-01-19 Thread Softaddicts
If you implement an API returning custom types or records, consumers will have to adhere to the same implementation in their own implementations, The so called freedom becomes a cage for others, they are stuck with your implementation and it leaks out in places were they should not. Using

Clojure development laptop battery usage

2014-01-19 Thread gvim
Is it likely that a typical Clojure development environment: - LightTable instarepl - Luminus web app running within `lein ring server` will consume significantly more battery power than a typical Rails environment: - Vim - Rails app running within `rail server` It's just that I've

Re: Clojure development laptop battery usage

2014-01-19 Thread Timothy Baldridge
One thing that will totally kill MBP batter performance is if the system decides do kick over to dedicated graphics. I highly recommend this app: http://gfx.io/ It'll put an icon in the top right of your screen that shows which GFX card is in use. On my 2012 MBP I get about 6 hours of life on the

Re: OOP question re: The Language of the System

2014-01-19 Thread Jonah Benton
I'm curious for the response re: #3 as well, but one pain point I've experienced with protocols vs multimethods is that as a system evolves, retaining the semantics that led me to bundle functions together into a protocol in the first place has sometimes been difficult, a source of incidental

Re: Clojure development laptop battery usage

2014-01-19 Thread gvim
Good points about the graphics, Tim. Do you have any idea if the JVM's RAM requirement in itself takes more power from the system than developing, say, a Rails app in Vim? One pisser with my new-ish Macbook Pro is there's no such thing as a spare battery. gvim On 20/01/2014 03:47, Timothy

Re: Clojure development laptop battery usage

2014-01-19 Thread Mars0i
fwiw, there is the option of developing Clojure in vim. That's what I prefer at present--but everyone's needs and preferences are different. (Also, probably not relevant, but I noticed that 'lein repl' eats up CPU even when it's not doing anything, if I start it in a directory without a

MyType cannot be cast to MyType?

2014-01-19 Thread Jonathan Barnard
For fun, I've been porting a very simple particle animation from Java to Clojure. It was somewhat slow so to see how fast I could make it I decided to try using mutation. I've defined a Particle type, and a PSlice type that contains an array of objects and a length (number of non-nil objects in

Re: OOP question re: The Language of the System

2014-01-19 Thread Jonah Benton
Will just add, in re: an earlier thread on this talk, one way to view this is in re: the lifespan of the data. Building and evolving the components that deal with live data passed around between them is easier and more fluid when working with maps than with working with types. One can add a field

Re: OOP question re: The Language of the System

2014-01-19 Thread Mars0i
This is peripheral to the real focus of this thread, but it's worth noting the parallel between objects and closures. You can implement encapsulation with closures--although it's less useful if without mutability. Scheme was supposedly designed as a language for exploration of object-oriented

binding / async / go

2014-01-19 Thread t x
Hi, Consider this piece of code: (binding [*foo* 20] (async/!! (async/go (+ 1 2 *foo* From this, it follows that binding and async/go do not work together (probably due to the go block running in another thread). ## Question: Is there anyway to pass a _dynamic_ var to a go

Re: Clojure development laptop battery usage

2014-01-19 Thread gvim
On 20/01/2014 04:37, Mars0i wrote: fwiw, there is the option of developing Clojure in vim. That's what I prefer at present--but everyone's needs and preferences are different. (Also, probably not relevant, but I noticed that 'lein repl' eats up CPU even when it's not doing anything, if I start

Re: Clojure development laptop battery usage

2014-01-19 Thread john walker
The JVM hasn't been receiving the love it deserves lately! Fortunately, percent memory usage isn't going to have any effect on battery life until you hit swap. The resources you should consider are just activity on the cpu/gpu/disk. So yeah, it's light table. It's not its fault for being

Re: Clojure development laptop battery usage

2014-01-19 Thread gvim
On 20/01/2014 05:43, john walker wrote: The JVM hasn't been receiving the love it deserves lately! Fortunately, percent memory usage isn't going to have any effect on battery life until you hit swap. The resources you should consider are just activity on the cpu/gpu/disk. So yeah, it's light

Re: binding / async / go

2014-01-19 Thread Timothy Baldridge
That works just fine on my box, infact, core.async's test code includes checking that dynamic vars actually work. Timothy On Sun, Jan 19, 2014 at 10:11 PM, t x txrev...@gmail.com wrote: Hi, Consider this piece of code: (binding [*foo* 20] (async/!! (async/go (+ 1 2 *foo*

Re: binding / async / go

2014-01-19 Thread t x
It also works for me now. Problem: I'm an idiot and forgot to write: (def ^:dynamic *foo*). On Sun, Jan 19, 2014 at 9:54 PM, Timothy Baldridge tbaldri...@gmail.comwrote: That works just fine on my box, infact, core.async's test code includes checking that dynamic vars actually work.

cljs / format

2014-01-19 Thread t x
Hi, Does cljs provide anything like format? I do not need it to provide the same output as clojure's format. I just want to write things like: (format ... % ... % ... % ... arg1 arg2 arg3 ) rather than: (str ... arg1 ... arg2 ... arg3 ...) Thanks! -- -- You received this

Re: cljs / format

2014-01-19 Thread john walker
Kind of ..? Based off the discussion, it's probably better not to, but the closure library provides an implementation that's trivial to wrap (accepting the problems). Discussion: http://dev.clojure.org/jira/browse/CLJS-324 Example: https://www.refheap.com/19693 On Monday, January 20, 2014

Re: concat/forth in -, -

2014-01-19 Thread Brandon Bloom
It's worth noting that the - and - macros are just that: macros. They have lexical extent and are expanded at compile time. Factjor is (essentially) interpreted, but can be used in interesting higher order ways. For example, you can write functions that return lazy sequences of Factjor

New Functional Programming Job Opportunities

2014-01-19 Thread Functional Jobs
Here are some functional programming job opportunities that were posted recently: Software Developer at Xively http://functionaljobs.com/jobs/8676-software-developer-at-xively Cheers, Sean Murphy FunctionalJobs.com -- -- You received this message because you are subscribed to the

Re: Redefining the notion of S-EXP, and pattern matching S-EXPs in clojure

2014-01-19 Thread Dom Kiva-Meyer
I'm not sure if this is what you're looking for, but seqex ( https://github.com/jclaggett/seqex) might be of use. On Sun, Jan 19, 2014 at 9:40 AM, Dave Tenny dave.te...@gmail.com wrote: As I try to reconcile my ancient past in writing common lisp code with a clojure learning exercise, I

Re: liberator video, compression question

2014-01-19 Thread Philipp Meier
Hi, Am Sonntag, 19. Januar 2014 03:04:40 UTC+1 schrieb Benjamin R. Haskell: On Sat, 18 Jan 2014, Brian Craft wrote: http://www.youtube.com/watch?v=OEZZOz6__CY At about 30 min he mentions that gzip, etc. aren't so interesting here because we can use, um.. something transfer,

clojure meetups / Stanford

2014-01-19 Thread t x
Hi, (apologies for spamming non-bay area people) Is there an official site listing Clojure study-groups / meetups? In particular, I'm looking for one close to Stanford (i.e. wouldn't mind meeting in Gates) and focused on sharing cool Clojure/CLJS/macro tricks over lunch / dinner. Thanks!

Re: clojure meetups / Stanford

2014-01-19 Thread Andy Fingerhut
There is this list of Clojure user groups: http://dev.clojure.org/display/community/Clojure+User+Groups You can go to meetup.com and search for Clojure. There are several meetings per month in the Bay area, in San Francisco and San Mateo, usually. There is also the #clojure IRC channel, which