Rusts Upgrades

2018-07-27 Thread Nathan Fisher
. Thoughts? Cheers, Nathan -- - sent from my mobile -- 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 with your firs

Re: Rusts Upgrades

2018-07-28 Thread Nathan Fisher
to improve the aggregate view, date of last build, etc. Cheers, Nathan On Sat, 28 Jul 2018 at 19:50 Sean Corfield wrote: > I suspect quite a few Travis-enabled Clojure projects do full > multi-version testing – but it’s hard to tell at a glance from Travis’s > logs. For example, bo

Improving Library Status Visibility - was Re: Rusts Upgrades

2018-07-28 Thread Nathan Fisher
t; > > > Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > > *From:* clojure@googlegroups.com on behalf of > Na

Re: Improving Library Status Visibility - was Re: Rusts Upgrades

2018-07-29 Thread Nathan Fisher
Hi Alex, I don't think it would be necessary to scrape the Jenkins server too often. I speculate daily would be enough, hourly at most. Cheers, Nathan On Sun, 29 Jul 2018 at 03:42 Alex Miller wrote: > On contribs, I just added the emeddable build status plugin - that’s easy. > M

Re: Rusts Upgrades

2018-07-30 Thread Nathan Fisher
clude. #RememberLeftPad > > Don't get me wrong, I like the idea. I'm just trying to think through the > possible hazards. > > Alan > > > On Friday, July 27, 2018 at 4:11:27 PM UTC-7, Nathan Fisher wrote: >> >> Hi Folks, >> >> Reading up

Re: Webassembly as a Clojure target platform

2018-07-31 Thread Nathan Fisher
I haven’t been following it that closely. I thought GC is planned but not targeted for MVP or has that changed? On Thu, Jul 26, 2018 at 20:32, Gerard Klijs wrote: > Kotlin native can also target wasm. But I don't know enough of it to know > if it's usefull for the clojure story. Since there is v

Re: Clojure(Script) web apps in 2018

2018-09-23 Thread Nathan Fisher
Duct looks interesting. I found luminous useful for when I first started with web dev in clojure but started running against its project layout. On Sun, Sep 23, 2018 at 15:17, Rick Moynihan wrote: > I really quite like weavejester's duct, because it's essentially a > familiar / standard ring app

Rich Hickey Calls for Book List, Creates Nice Resource as a Side Effect

2018-11-02 Thread Nathan Smutz
rning materials they've created, and links to early material for works in progress. Here's the Twitter thread: https://twitter.com/richhickey/status/1057970957040660480?s=09 Booya, Nathan -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: Noob: Getting (re)started with Clojure on OS X

2019-03-13 Thread Nathan Fisher
I would even argue against using central profiles. I think it obscures behavioural differences between machines and can impair reproducibility. Arguably better to have all deps in project where possible. On Wed, Mar 13, 2019 at 22:45, Mike Rodriguez wrote: > > [cider/cider-nrepl "0.8.2"] > > is q

Re: find first match in a sequence

2019-03-21 Thread Nathan Booth
I'm glad you pointed this out! On stackoverflow everyone was assuming filter was completely lazy in all cases On Sunday, May 19, 2013 at 4:54:53 PM UTC+2, Jim foo.bar wrote: > > ha! you cheated with iterate... > > try this which is closer to the example... > > (first (filter odd? (map #(do (prin

Re: Missing fns: rotate & rotate-while

2019-03-22 Thread Nathan Rogers
(defn rotate [a n] (let [l (count a) off (mod (+ (mod n l) l) l)] (flatten (list (drop off a) (take off a) (rotate '(1 2 3 4 5) -1) => (5 1 2 3 4) (rotate '(1 2 3 4 5) -6) => (5 1 2

Re: Missing fns: rotate & rotate-while

2019-03-23 Thread Nathan Rogers
Concat (defn rotate [a n] (let [l (count a) off (-> (mod n l) (+ (mod n l) l) l)] (concat (drop off a) (take off a (rotate '((1 2) (3 4) (5 6) (7 8) (9 10)) 3) => ((7 8) (9 10) (1 2) (3 4) (5 6)) On Saturd

Re: Missing fns: rotate & rotate-while

2019-03-23 Thread Nathan Rogers
(defn rotate [a n] (let [l (count a) off (mod (+ (mod n l) l) l)] (concat (drop off a) (take off a (rotate '((1 2) (3 4) (5 6) (7 8) (9 10)) 3) => ((7 8) (9 10) (1 2) (3 4) (5 6)) On Saturday, March 23, 2

Trouble with advanced macros

2019-03-28 Thread Nathan Rogers
(def dict {:key `(str "obj isn't defined in this scope" (:blah ~'obj))}) (defmacro my-macro [obj & args] `(print ~(:key dict) ~@args)) (macroexpand '(my-macro {:blah "thingy"} "test string")) I have a n

Re: Trouble with advanced macros

2019-03-28 Thread Nathan Rogers
my-macro [obj & args] `(let [o# ~obj a# ~args] (apply (fn [obj args] (print ~(:key dict) args)) o# a#))) This approach looks even better and still doesn't work :( On Thursday, March 28, 2019 at 9:58:25 PM UTC-6, Natha

Re: Trouble with advanced macros

2019-03-29 Thread Nathan Rogers
Thanks everyone. That's what I needed. On Fri, Mar 29, 2019 at 3:25 AM Alexander Yakushev wrote: > Looks like you are missing a few unquotes. Is this what you expected? > > (def dict > {:key `(str "obj isn't defined in this scope" (:blah ~'obj))}) > > (defmacro my-macro [my-obj & args] > `(

Re: Trouble with advanced macros

2019-03-30 Thread Nathan Rogers
Ok, so it turns out I have other issues. Args is (:keys dict) and that doesn't evaluate (def dict {:key `(str "obj isn't defined in this scope" (:blah ~'obj))})

Re: Trouble with advanced macros

2019-03-30 Thread Nathan Rogers
(def dict {:key `(str "obj isn't defined in this scope" (:blah ~'obj))}) (defmacro encode [ncode get-key]

Re: Trouble with advanced macros

2019-03-30 Thread Nathan Rogers
(defmacro encode [get-key] (let [body (eval get-key)] `(~@body))) It turns out this is actually the macro I'm looking for, but I still don't want to use eval :( Honestly, it looks to me that you are concocting something overl

[ANN] Red Planet Labs, a new well-funded Clojure startup

2019-04-03 Thread Nathan Marz
I'm really happy to announce my startup Red Planet Labs with $5M in funding. We have some incredible investors on board including Max Levchin, Naval Ravikant, and Alexis Ohanian. We're building a new kind of software development tool that will radically change the economics of software developm

Re: Java Interop on steroids?

2019-06-21 Thread Nathan Fisher
mp;utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.co

Re: Java Interop on steroids?

2019-06-22 Thread Nathan Fisher
t; > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > > -- > *From:* clojure@googlegroups.com on behalf of > Nathan Fisher > *Sent:* Friday, June 21, 2019 4:17:43 PM > *To:* clojure@googl

[ANN] defexception 0.1.0: a library for dynamically defining exception types in Clojure

2019-08-22 Thread Nathan Marz
Authored by Bruce Hauman, defexception makes it really easy to define new exception types in Clojure just by doing (defexception MyException). See the README for details. https://github.com/redplanetlabs/defexception -- You received this message because you are subscribed to the Google Groups

Re: [ANN] defexception 0.1.0: a library for dynamically defining exception types in Clojure

2019-09-16 Thread Nathan Marz
We don't want such a tiny library to pull in any other dependencies. The subset of ASM used by defexception is so core and so minimal that we think it's extremely unlikely to ever break. A dependency collision with an ASM used by another library seems far more likely. On Saturday, August 24, 2

[ANN] nippy-serializable-fns: Serialize and deserialize Clojure functions

2020-01-06 Thread Nathan Marz
We've open-sourced some code for serializing and deserializing Clojure functions across processes that share the same code version. It's implemented as an extension for Nippy and is quite fast! *Blog post:* https://tech.redplanetlabs.com/2020/01/06/serializing-and-deserializing-clojure-fns-wit

[ANN] proxy-plus: Faster and more usable replacement for "proxy"

2020-01-13 Thread Nathan Marz
proxy+ is a replacement for Clojure's proxy that's faster and more usable. proxy has a strange implementation where it overrides every possible method and uses a mutable field to store a map of string -> function for dispatching the methods. This causes it to be unable to handle methods with th

Re: [ANN] proxy-plus: Faster and more usable replacement for "proxy"

2020-01-13 Thread Nathan Marz
fferences in behavior to be aware of? AOT, Graal, > consuming proxy+ classes from vanilla clojure classes? > > On Mon, Jan 13, 2020, 11:47 AM Nathan Marz > wrote: > >> proxy+ is a replacement for Clojure's proxy that's faster and more >> usable. proxy has

Re: [ANN] proxy-plus: Faster and more usable replacement for "proxy"

2020-01-14 Thread Nathan Marz
t; description of how it works? > > On Monday, January 13, 2020 at 1:28:46 PM UTC-5, Nathan Marz wrote: >> >> No differences in behavior except for API being like reify. It integrates >> with AOT and can be consumed just like any other class. No idea how it >> interact

Re: [ANN] proxy-plus: Faster and more usable replacement for "proxy"

2020-01-20 Thread Nathan Marz
(.flush this) > (when close-fn (close-fn)) > nil) > (write [this ^chars str-cbuf off len] > (when (pos? len) >(.append sb str-cbuf ^int off ^int len)))) > java.io.BufferedWriter. >

[JOB] Software Engineer | Red Planet Labs | Fully distributed team

2020-02-20 Thread Nathan Marz
We're a well-funded startup building a new kind of software development tool that will radically change the economics of software development. We're backed by some amazing investors including Max Levchin, Naval Ravikant, and Alexis Ohanian. Since our first round of hiring last year we've gotten

Reviewers needed for new Clojure book!

2015-08-26 Thread Nathan Smutz
I'd be interested. I've been looking for Clojure books past the introductory level. It sounds like you're aiming for a good "second Clojure book." -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr

Using type hints to optimize protocol invocation

2015-09-08 Thread Nathan Marz
My understanding is that invocation of protocol methods incurs about 30% overhead due to the need to look up the appropriate function for the type. I also learned recently that Clojure does not use static type information to do the lookup at compile-time and avoid the overhead. Given that Clojure a

[ANN] Release of pulley.cps 0.2.0

2015-09-21 Thread Nathan Davis
g run-time library. The main feature of this release is the addition of exception support — you can now use try, throw, and catch just like you would in regular Clojure code. There are various other enhancements as well, mostly to support the exception code, as documented in the changelog. N

Re: [ANN] Release of pulley.cps 0.2.0

2015-09-22 Thread Nathan Davis
On Tuesday, September 22, 2015 at 6:37:13 AM UTC-5, Francesco Bellomi wrote: > > Hi Nathan, > > I think it's an awesome project, thanks for sharing this. > > Thanks. I appreciate the feedback. > I see that currently only full continuations are supported. Would it be

Re: [ANN] Release of pulley.cps 0.2.0

2015-09-22 Thread Nathan Davis
Thanks, Francesco. I'll definitely take a look at those resources. Nathan Davis On Tuesday, September 22, 2015 at 4:31:07 PM UTC-5, Francesco Bellomi wrote: > > Thanks for taking the time to write such a detailed answer, I really > appreciated it. > > Delimited continuati

Re: functions that operate on map_entry?

2015-09-25 Thread Nathan Davis
Try key and val: user=> (doc key) - clojure.core/key ([e]) Returns the key of the map entry. nil user=> (doc val) - clojure.core/val ([e]) Returns the value in the map entry. nil user=> On Friday, September 25, 2015 at 3:32:51 PM UTC-5, Fenton

Re: Lazy deserialization / reserialization, aatree release 0.3.0

2015-10-01 Thread Nathan Davis
structure compatible with Clojure maps. But then you say that serializing "updates" is done incrementally. Could you elaborate on this? Do you mean that the new copy to be serialized is basically diff'd agaist the old version, and just the difference is serialized? Thanks,

Re: Lazy deserialization / reserialization, aatree release 0.3.0

2015-10-01 Thread Nathan Davis
> This is where I get confused. Are aatrees persistent structures (in the functional programming sense, like Clojure's data structures) whose values cannot be changed (although their internal representation ("form") may change), or are they mutable? If they are persistent,

Re: Lazy deserialization / reserialization, aatree release 0.3.0

2015-10-01 Thread Nathan Davis
there aren't any examples on using the library. I think adding a few examples (with perhaps a little explanation of what is happening under the covers) would go a long way. Nathan Davis On Thursday, October 1, 2015 at 4:22:48 PM UTC-5, William la Forge wrote: > > Sorry for my bad la

Re: 'seq' performance for 'empty?' compared to 'count'. And where's !=?

2015-10-01 Thread Nathan Davis
nce is empty without potentially realizing its head, please let the Clojure community know! I'm not saying having an explicit 'empty' method is a bad idea, but I'm not sure the current situation is as bad as you think. Nathan Davis -- You received this message because you

Re: Library suggestions requested for clojure-toolbox.com

2015-10-06 Thread Nathan Davis
pulley.cps: https://github.com/positronic-solutions/pulley.cps On Monday, October 5, 2015 at 2:41:11 PM UTC-5, James Reeves wrote: > > If you've written or know about a Clojure or ClojureScript library, and > it's not already on clojure-toolbox.com , > I'd like t

Re: ANN: ClojureScript 1.7.145

2015-10-13 Thread Nathan B
On Tuesday, October 13, 2015 at 8:02:07 AM UTC-7, David Nolen wrote: > ClojureScript, the Clojure compiler that emits JavaScript source code. > > > README and source code: https://github.com/clojure/clojurescript > > > Leiningen dependency information: > > >     [org.clojure/clojurescript "1.

[ANN] pulley.cps 0.2.1

2015-10-27 Thread Nathan Davis
Hi everyone, I'm pleased to annouce the release of pulley.cps <https://github.com/positronic-solutions/pulley.cps> version 0.2.1. This is a bugfix release that fixes a couple bugs related to dynamic vars and def forms. Nathan Davis -- You received this message because you are su

Re: [ANN] Clojure 1.8.0-beta2

2015-10-27 Thread Nathan Davis
Or better yet, is there any interest in providing an interface to hook into the namespace loading process, so that monkey-patches are not necessary? Nathan Davis On Tuesday, October 27, 2015 at 6:47:21 PM UTC-5, Ambrose Bonnaire-Sergeant wrote: > > I've been monkey-patching `clojur

Re: [ANN] Clojure 1.8.0-beta2

2015-10-28 Thread Nathan Davis
On Wednesday, October 28, 2015 at 9:57:54 AM UTC-5, Alex Miller wrote: > > > On Tuesday, October 27, 2015 at 9:02:49 PM UTC-5, Nathan Davis wrote: >> >> Or better yet, is there any interest in providing an interface to hook >> into the namespace loading process, so

Extending namespace loading

2015-10-28 Thread Nathan Davis
ions be considered useful, or does it unnecessarily complicate namespace loading? Any alternative designs you feel would be better? Nathan Davis -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroup

Re: ANN: ClojureScript 1.7.170, Enhanced Build Pipeline

2015-11-06 Thread Nathan B
Just some early results on our builds show a roughly 30% decrease in compile time when using cljsbuild auto. That helps a lot during development. Awesome work as usual, thanks! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

[Clojurescript] .getElementById returns NULL

2016-01-03 Thread Nathan Smutz
. Attempting any operations on (. js/document getElementById "test-content")) gives errors about trying to do things with "null". Is there some requirement I'm missing for accessing the dom? Best, Nathan -- You received this message because you are subscribed to the Googl

Re: [Clojurescript] .getElementById returns NULL

2016-01-05 Thread Nathan Smutz
Thanks Francis, that did it. Rookie mistake, that. I wonder if there's ever enough page content to make it worth just delaying the DOM hooks. On Sunday, January 3, 2016 at 7:49:39 PM UTC-8, Francis Avila wrote: > > Your problem is unrelated to clojurescript. > > Your script runs before the bo

[ANN] Specter 0.9.2

2016-01-26 Thread Nathan Marz
I just released Specter 0.9.2: https://github.com/nathanmarz/specter https://clojars.org/com.rpl/specter/versions/0.9.2 Specter solves a near-universal problem encountered when writing Clojure/ClojureScript: the need to transform or query a data structure that's more sophisticated than a basic

Re: [ANN] Specter 0.9.2

2016-01-28 Thread Nathan Marz
Thompson wrote: > Looks great, Nathan. I also highly enjoyed your recent interview on the > Cognitect podcast <http://blog.cognitect.com/cognicast/095>. > > One quick question: In the first example below from the README (verified > at the repl), it seems that the (srange ..

Re: [ANN] Specter 0.9.2

2016-01-29 Thread Nathan Marz
e with a length-3 subsequence. Very flexible. > > It might be useful to point out that feature in the docs. :) > > Alan > > > On Thu, Jan 28, 2016 at 10:49 PM, Nathan Marz > wrote: > >> Both of those examples use half-open intervals :) The first selects the >> su

Re: [ANN] Specter 0.9.2

2016-01-29 Thread Nathan Marz
cies in favor > of cljc, and I'd be happy to help with the effort if it's on the roadmap. > > cheers, > Jason > > On Tue, Jan 26, 2016 at 3:51 PM Nathan Marz wrote: > >> I just released Specter 0.9.2: >> >> https://github.com/nathanmarz/spect

How do threads work in command-line REPL?

2016-02-09 Thread Nathan Marz
ne who knows the internals of the REPL could shed some light onto why this is the behavior and why it was designed this way. Thanks, Nathan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Re: How do threads work in command-line REPL?

2016-02-09 Thread Nathan Marz
) > 34 > > > mimmo > > On 09 Feb 2016, at 19:38, Alex Miller wrote: > > That seems pretty weird. I can't reproduce it. I'm using lein 2.5.2. > > On Tuesday, February 9, 2016 at 12:19:09 PM UTC-6, Nathan Marz wrote: >> >> I was doing some work that involv

Re: How do threads work in command-line REPL?

2016-02-09 Thread Nathan Marz
c/main/clojure/clojure/tools/nrepl/middleware/interruptible_eval.clj#L243 >> >> But I can't say I really understand that much of the eval code, so like I >> say, I could be totally wrong here! >> >> >> Jony >> >> >> On Tuesday, 9 Februar

Reduce + merge-with error on lazy sequence of maps

2016-02-11 Thread Nathan Smutz
1 m2] (reduce1 merge-entry (or m1 {}) (seq m2)))] (reduce1 merge2 maps Well that's my mystery. I should get around to fiddling and seeing if I can reproduce this with a more straighforward program. Best, Nathan -- You received this message because you are subscribed to the Google Groups

Re: Reduce + merge-with error on lazy sequence of maps

2016-02-13 Thread Nathan Smutz
Thanks James, There was definitely a missing aggregation step in there. I appreciate your eyeballing it. Best, Nathan -- 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

[ANN] Specter 0.10.0 released

2016-04-26 Thread Nathan Marz
Happy to announce the release of Specter 0.10.0. If you're unfamiliar with Specter, it's a library that supercharges your ability to query and manipulate data structures and has performance rivaling hand-optimized code. The README and my talk at Clojure/west are the best introductions to the pr

[ANN] pulley.cps 0.2.2

2016-05-09 Thread Nathan Davis
ically, (fn* [<...>] <...>) forms are now transformed properly, so e.g. (delay <...>) now works. Thank you for your feedback and support! Nathan Davis -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send emai

Re: Attempt at rethrow macro

2013-04-03 Thread Nathan Davis
the resulting body in a "do" form. Does this violate separation between the macro expander and the compiler? Are there states that can not be reached (i.e., the pre-expanded code is semantically different than the non-expanded code), no matter how we implement our expande

Re: Clojure on top of ObjC?

2013-05-05 Thread Nathan Sorenson
On Tuesday, 23 April 2013 13:37:59 UTC-7, Steven Degutis wrote: > > While this is certainly neat, it doesn't allow Clojure to be used as > an embedded scripting language inside an ObjC app. > Since the Clojure/West talk I've been busy trying to get clojure-scheme self-hosted. I've been a week

Reduce a function over more than one sequence (like map)

2010-06-11 Thread Nathan Sorenson
Is there a way to fold over multiple sequences, in the same way that 'map' can apply a multi-parameter function over several seqs? In other words, is there a function like this: (defn reduce* [f val & colls] (reduce (fn [acc args] (apply f acc args)) val

Re: Reduce a function over more than one sequence (like map)

2010-06-12 Thread Nathan Sorenson
od to know the destructuring approach is more or less the obvious way to go about things, and I am not overlooking an idiomatic approach. On Jun 12, 3:53 am, Jürgen Hötzel wrote: > 2010/6/11 Nathan Sorenson : > > > Is there a way to fold over multiple sequences, in the same way that >

Macro closing over atom gives "Can't embed object in code" error.

2010-09-18 Thread Nathan Sorenson
I am playing around with a macro to define accessor functions for a closed-over atom. Here is a simplified example: (defmacro hidden-atom [] (let [a (atom :hello)] `(defn get-value [] (deref ~a When I evaluate this macro, I get the error: "Can't embed object in code, maybe print-dup not

Re: Macro closing over atom gives "Can't embed object in code" error.

2010-09-19 Thread Nathan Sorenson
ot a macro but a closure: > >     (defn hidden-atom [] >       (let [a (atom :hello)] >         (fn [] (deref a > >     (def x (hidden-atom)) > >     (x) >     ;;=> :hello > > -S > > On Sep 19, 12:32 am, Nathan Sorenson wrote: > > > I am playing

Any clean way to avoid explicit recursion when creating nested loops?

2010-09-30 Thread Nathan Sorenson
I was discussing this on the clojure channel, and it seems as though avoiding explicit recursion is the idiomatic thing to do. Is there a better way to define a function that loops over an arbitrary number of sequences in a nested fashion, similar to the 'for' macro, without relying on recursion?

Re: Any clean way to avoid explicit recursion when creating nested loops?

2010-09-30 Thread Nathan Sorenson
That's perfect, thanks! On Sep 30, 4:55 pm, Mark Engelberg wrote: > clojure.contrib.cartesian-product does what your nested function does, > but more efficiently, using iteration rather than recursion. -- You received this message because you are subscribed to the Google Groups "Clojure" group.

Emacs slime repl now printing carriage returns after Clojure 1.3.0-alpha5

2011-03-16 Thread Nathan Sorenson
property for newline"? I'm just wondering which program in the chain I should fix: clojure, swank-clojure, or emacs? -Nathan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.

Re: Emacs slime repl now printing carriage returns after Clojure 1.3.0-alpha5

2011-03-16 Thread Nathan Sorenson
I'm using Windows 7, and again, I see this behaviour when using the regular windows shell or Cygwin to launch the swank-repl. On Mar 16, 12:10 pm, Nathan Sorenson wrote: > In my clojure repl, i'm now seeing CTRL-M characters at the end of > each line printed to the repl (print

*ns* unexpectedly changing on me, via SwingUtilities/invokeLater

2011-03-18 Thread Nathan Sorenson
I want to examine the namespace within a swing thread, as I want to see if a particular var is defined from another part of the program before operating on it. However, inside the "do-swing" macro (or just using SwingUtilities/invokeLater directly) *ns* will always refer to clojure.core, not the na

Re: *ns* unexpectedly changing on me, via SwingUtilities/invokeLater

2011-03-18 Thread Nathan Sorenson
best idea. On Mar 18, 4:37 pm, Daniel Solano Gómez wrote: > On Fri Mar 18 15:53 2011, Nathan Sorenson wrote: > > > > > > > > > > > I want to examine the namespace within a swing thread, as I want to > > see if a particular var is defined from another part

SubVector's (via 'subvec') do not support 'transient'

2011-04-29 Thread Nathan Sorenson
(transient (subvec [1 2 3 4 5] 0 2)) fails with a class cast exception. Is this expected/unavoidable? How do I know whether the vectors I'm passed are regular vectors or come via subvec? I'm assuming I lose all the performance benefits of subvec if I defensively pour all vectors into a new vector

Re: 2D graphics options with Clojure?

2011-04-30 Thread Nathan Sorenson
Batik can serialize to both PNG and PDF. http://xmlgraphics.apache.org/batik/ I currently use Batik in a clojure project doing a lot of drawing of 2d vector-based images. It's a very extensive library but it suits my needs well. On Apr 29, 9:26 pm, stu wrote: > Hi, > > I'm developing a Clojure p

Re: SubVector's (via 'subvec') do not support 'transient'

2011-04-30 Thread Nathan Sorenson
I've read that, and the claim seems to be that Vectors support transience. Within Clojure's abstraction SubVectors are Vectores: (vector? (subvec [1 2 3] 0 2)) => true. On Apr 30, 8:27 am, Armando Blancas wrote: > Check this out:http://clojure.org/Transients > > On Ap

Re: SubVector's (via 'subvec') do not support 'transient'

2011-04-30 Thread Nathan Sorenson
y abstraction. On Apr 30, 10:57 am, Ken Wesson wrote: > On Sat, Apr 30, 2011 at 11:27 AM, Armando Blancas > > wrote: > > On Apr 29, 10:54 am, Nathan Sorenson wrote: > >> (transient (subvec [1 2 3 4 5] 0 2)) fails with a class cast > >> exception. Is this expected/u

Re: Quicksort

2012-02-10 Thread Nathan Sorenson
Couple of things to watch out for, Clojure doesn't pattern match on the args in the way you seem to be expecting, so this will blow the stack (i.e. calling qsort with the empty list won't call the 0-argument method you have there.) The error you're running into is that pop/peek isn't defined fo

Re: Quicksort

2012-02-10 Thread Nathan Sorenson
Obviously the example of doall not being up to the task should read: scratch> (type (doall (lazy-seq [1 2 3]))) clojure.lang.LazySeq -- 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 th

[ANN] clojure-scheme - Compiling Clojure to Scheme to C

2012-03-14 Thread Nathan Sorenson
I've modified the output of the ClojureScript compiler to emit Scheme code. At this point the core library is successfully compiled by Gambit Scheme. A nice advantage of this is that Gambit compiles code via C, meaning that stand-alone Clojure executables are now available for any platform with

Re: clojure-scheme - Compiling Clojure to Scheme to C

2012-03-21 Thread Nathan Sorenson
I see the C code generation as an advantage, in that it becomes possible to target any platform with a C compiler. Can Clozure compile to iOS? Just a question, why Clojure->Scheme->C, instead of Clojure->Clozure? > > That way there would no be any C compiler dependency. > -- You received th

Re: clojure-scheme - Compiling Clojure to Scheme to C

2012-03-27 Thread Nathan Sorenson
ClojureScript has plenty of sharp edges, and this project is a bit rougher than even ClojureScript at the moment so you'll have to pardon the mess. The magic happens in the cljs.compiler namespace. Load up a clojure repl and do something along the lines of: (do (require 'cljs.compiler) (require

motivation behind laziness of apply in ClojureScript

2012-03-27 Thread Nathan Sorenson
When trawling the ClojureScript source, I was a little puzzled when I first noticed that cljs.core/apply respects the laziness of the seq its provided. Fogus mentioned this feature in his Clojure/west talk and it reminded me of my earlier puzzlement. This choice seems to contradict Clojure's ea

Re: motivation behind laziness of apply in ClojureScript

2012-03-28 Thread Nathan Sorenson
Your right the core apply is lazy too. The same question still remains: is there a use case behind apply being lazy when Clojure is otherwise a strictly evaluating language? Perhaps is this the intended mechanism to smuggle non-strictness into evaluation? -- You received this message because y

Re: motivation behind laziness of apply in ClojureScript

2012-03-28 Thread Nathan Sorenson
Actually now that I've thought about it, you couldn't mimic non-strict evaluation with lazy apply, so that's not a use-case. All you could provide is left-to-right argument non-strictness which is not sufficient. W.r.t. your example, you can force evaluation the first 3 args, but you can't, sa

Re: motivation behind laziness of apply in ClojureScript

2012-03-28 Thread Nathan Sorenson
> I don't think it's possible to ever have apply not evaluate all its > arguments? I think this is what Nathan was saying. > Cedric is right that apply, itself, is strict and evaluates its arguments as one might expect. But I'm not referring to manual thunking/del

Re: motivation behind laziness of apply in ClojureScript

2012-03-28 Thread Nathan Sorenson
An example of "lazy" apply, with your foo fn: > (apply foo (iterate inc 0)) d -- 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 pat

Re: Polymorphic namespaces?

2012-03-28 Thread Nathan Sorenson
> One example, in the frontend we wrap all the database calls in a caching > layer but we don't need that when the same code runs in the backend. > One option for something like this (a configuration option that doesn't change much between function calls/expected to largely remain the same fo

Re: motivation behind laziness of apply in ClojureScript

2012-03-28 Thread Nathan Sorenson
> > Put another way: why does apply need to promise not to realize its seq > > argument? > > (apply + some-lazy-seq-too-big-to-fit-in-main-memory) > > Not "avoid evaluating some of its arguments" but "avoid holding onto > the head" in that case. > I'd reach for 'reduce' in this case but that's st

Re: Source code as metadata

2012-03-30 Thread Nathan Matthews
Hi, I wanted to serialise functions and send them over the network. The problem with serializable-fn is that it doesn't capture closures. I wrote some code which re-programmed the fn macro to capture the closures as well as the actual function form, and attach them as meta-data also on the ac

Re: Source code as metadata

2012-03-31 Thread Nathan Matthews
On 31 Mar 2012, at 00:00, Cedric Greevey wrote: > On Fri, Mar 30, 2012 at 6:17 PM, Lee Spector wrote: >> >> On Mar 30, 2012, at 5:11 PM, Cedric Greevey wrote: >>> >>> That opens a giant can of worms. How, for example, do we discover that >>> (partial * 2) and #(* % 2) and (fn [x] (* 2 x)) and

ClojureScript allows fns to be called with too many arguments

2012-04-04 Thread Nathan Sorenson
ClojureScript doesn't complain when you supply too many arguments to a function, silently dropping the superfluous args. Is this a bug or feature? I'm not sure if I should replicate this behaviour in clojure-scheme, as it differs from Clojure. P.S. is there a separate group for ClojureScript b

Re: Idea around SCMs and Clojure

2012-07-18 Thread Nathan Matthews
Hi Nahuel, I think from a technical perspective something like Datomic would be a good fit, I think it has the right ingredients. If Git allows access to the lower layers, that may also be a good fit. One of my frustrations with source control systems is the way you end up repeating information

[Jobs] Big Data Engineer Position at Google-backed SF Startup

2012-11-21 Thread Nathan Visconti
The Climate Corporation is Google Ventures backed big data startup with a mission to help people adapt to climate change . We make sense of huge amounts of complicated data and run simulations to determine the risk of adverse weather, which influences 25% of GDP. We are cu

Re: Meaning of "="

2012-12-11 Thread Nathan Matthews
For more "surprising" behaviour: (= #".*" #".*") Sent from my iPhone On 11 Dec 2012, at 13:32, "Jim foo.bar" wrote: > If you're looking for some truly unintuitive equality behavior check this > out: > > user=> (def pred (Boolean. false)) ;;not a primitive but an object > #'user/pred > use

Re: Clojure vs Scala - anecdote

2011-09-13 Thread Nathan Sorenson
I adore Clojure as well, but could this success not be partially due to the "reimplementing for the second time" phenomenon? i.e. if you re- wrote the entire thing in Scala again, perhaps you would see similar gains in brevity etc? On Sep 6, 10:32 pm, Sean Corfield wrote: > I just wanted to share

Re: Recursion/Algorithm Question

2011-09-21 Thread Nathan Sorenson
A recursive formulation is exactly the right idea. Also, you're right when you say it won't work with recur as you've set it up. In fact, you won't be able to use recur at all in this situation as a you are doing a depth-first search through possible paths--it's impossible to formulate a depth-firs

Re: advantage of dynamic typing

2011-09-21 Thread Nathan Sorenson
These types of discussions seem to get very broad in their scope and not much is ever settled. That being said, it seems one place where dynamic typing is a huge advantage is for records--Clojure records are prevalent and extremely easy to use, and are an excellent substrate for where we would nor

Re: clojure type casting vs java type casting

2011-09-21 Thread Nathan Sorenson
long entails a call to RT/longCast, which dynamically dispatches on the type of the object passed to it. I haven't tested this, but i would imagine the java cast would compile directly to the single byte- code instruction i2l. Presumably, then, the java call would be a touch faster by a few instruc

Re: Spread work onto multiple threads (in pure Clojure)

2011-09-21 Thread Nathan Sorenson
Futures begin executing their contents immediately, you don't have to deref them to trigger the side effects. (perhaps you were thinking of delay?) I'm assuming you are using futures because email-request is an io- blocking operation? The thing to note is that the body of a future automatically ru

Re: Recursion/Algorithm Question

2011-09-22 Thread Nathan Sorenson
ration on sequences which gave you a sequence back. There's a category for that on the sheet. It can save some time in narrowing down the docs you have to read through when you're just getting familiar with the core API. On Sep 22, 3:48 pm, ax2groin wrote: > Thanks, Nathan, that did h

<    1   2   3   >