[ANN] Specter: a library for deep introspection and transformation of nested data

2015-02-26 Thread Nathan Marz
It's been far too long since I've open sourced anything, so today I'm happy to open source a small library that I use extremely heavily: https://github.com/nathanmarz/specter Specter lets you write code like this: user (select [ALL :a even?] [{:a 1} {:a 2} {:a 4} {:a 3}]) [2 4]

Re: Running test.check and cljs.test tests under Clojurescript

2015-06-30 Thread Nathan Marz
, June 30, 2015 at 7:20:58 PM UTC-4, Nathan Marz wrote: I'm trying to get Specter's tests running under ClojureScript. I can run the tests manually in a REPL just fine, but I cannot figure out a straightforward way to run all the tests like you can in Clojure with lein test. Here

Running test.check and cljs.test tests under Clojurescript

2015-06-30 Thread Nathan Marz
I'm trying to get Specter's tests running under ClojureScript. I can run the tests manually in a REPL just fine, but I cannot figure out a straightforward way to run all the tests like you can in Clojure with lein test. Here are the tests I'm trying to run, which are a mix of tests defined using

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

[ANN] Specter 0.11.1 released

2016-06-08 Thread Nathan Marz
Released Specter 0.11.1 with bug fixes and performance improvements. It also has a new README which I hope provides a better introduction to the project. https://github.com/nathanmarz/specter The navigators are now very intelligent about using the best means possible for traversing data

Re: ANN: Specter 0.11.0, performance without the tradeoffs

2016-05-31 Thread Nathan Marz
No, because that global mutable variable would need to be specifiable by Specter on usage of the library. For example, if you wrote: (defn foo [] (select [:a :b] {:a {:b 1}})) `select` has no ability to control anything outside the context of its form. It certainly can't wrap `foo` to put a

Re: ANN: Specter 0.11.0, performance without the tradeoffs

2016-05-31 Thread Nathan Marz
some additional concurrency/locking details to worry about that I assume > ConcurrentHashMap handles for you. > > Or just use an ArrayList's slot directly as the cache (rather than storing > a volatile to add a level of indirection), but then the concurrency > logistics wou

ANN: Specter 0.11.0, performance without the tradeoffs

2016-05-31 Thread Nathan Marz
Specter is a library for querying and transforming nested data structures concisely and efficiently. The 0.11.0 release is a huge milestone that implements something which for the better part of the past year I wasn't sure was possible. In summary: now you don't have to do anything special to

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

2016-02-09 Thread Nathan Marz
d/currentThread)) > 34 > > > mimmo > > On 09 Feb 2016, at 19:38, Alex Miller <a...@puredanger.com> 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: >> >

How do threads work in command-line REPL?

2016-02-09 Thread Nathan Marz
I was doing some work that involved the use of thread locals, and I noticed that within a REPL session (launched via 'lein repl') my thread locals would reset themselves to their initial value. I did some digging and found that the thread id keeps changing within a single REPL session, e.g.:

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

2016-02-09 Thread Nathan Marz
ols.nrepl/blob/master/src/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

Re: [ANN] Specter 0.9.2

2016-01-28 Thread Nathan Marz
Both of those examples use half-open intervals :) The first selects the subsequence with indices 1,2,3, and the second selects the subsequence with indices 2,3. You can see in the second example that [2 3] in the overall sequence is replaced by [-1 -1 -1]. On Thu, Jan 28, 2016 at 9:10 PM, Alan

Re: [ANN] Specter 0.9.2

2016-01-29 Thread Nathan Marz
ate cljx dependencies 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 <nathan.m...@gmail.com> wrote: > >> I just released Specter 0.9.2: >> >> https://gi

Re: [ANN] Specter 0.9.2

2016-01-29 Thread Nathan Marz
2 > subsequence 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 <nat...@nathanmarz.com> > wrote: > >> Both of those examples use ha

[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

[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

Specter 0.12.0 released

2016-08-05 Thread Nathan Marz
Specter 0.12.0 has been released with many new features, performance improvements, and bug fixes. There are a few highlights: 1. Performance of `select` has been greatly improved. Specter no longer creates intermediate vectors during navigation and has performance very close to transducers

Contribute Specter to Clojure core?

2017-02-14 Thread Nathan Marz
One of the most common questions I get about Specter is whether it will ever become part of Clojure core. I think it's an interesting proposal and would like to see what the community and core team thinks. The primary reason for contributing would be that Specter makes Clojure a stronger

Re: Contribute Specter to Clojure core?

2017-02-15 Thread Nathan Marz
he way specter has the ability to add new > generally useful navigators and paths with new versions as people > "discover" them, I don't think that's a great fit for the overhead of a > language release process. > > On Wednesday, February 15, 2017 at 8:02:55 AM UTC+11, Nath

[ANN] Specter 1.0: Clojure's missing piece

2017-03-01 Thread Nathan Marz
Specter is a library that supercharges your ability to work with regular Clojure data structures. Happy to announce I just released 1.0, a huge milestone for the project. I also wrote a post about why I consider Specter to be Clojure's missing piece:

ANN: Specter 0.13.0 released

2016-09-06 Thread Nathan Marz
Specter 0.13.0 has been released. Specter is a library that supercharges your ability to query and transform regular data structures. https://github.com/nathanmarz/specter The new version rewrites the core nearly from scratch to make Specter faster and more dynamic. This post gives a detailed

Specter 0.13.2 released

2016-12-21 Thread Nathan Marz
Specter 0.13.2 has been released, available from Clojars https://clojars.org/com.rpl/specter Specter supercharges your ability to work with regular data structures. This release contains a few bug fixes and is likely the last release before 1.0. Changes: * Bug fix: Fix race condition

Re: Navigators and lenses

2017-03-09 Thread Nathan Marz
Edwin, these personal comments about me are extremely inappropriate. Your claim that I ignore the work of others is just plain wrong, and that you would make such comments out of the blue is truly incomprehensible. You claim Specter is "deeply un-Clojure-y" without providing a single example.

Re: Contribute Specter to Clojure core?

2017-03-05 Thread Nathan Marz
To answer a few comments/misconceptions on this thread: - Specter is not a DSL. Things like ALL and MAP-VALS are first class objects that implement the underlying navigator interface. Specter's core is a high-performance method of composing implementations of that interface. It makes zero

[ANN] Specter 1.0.3

2017-08-14 Thread Nathan Marz
Specter supercharges your ability to query and manipulate regular Clojure data structures. https://github.com/nathanmarz/specter 1.0.3 includes navigators for navigating to the index of an element in a sequence, a so far unexplored area of the problem space. Some examples of the new

[ANN] Specter 1.0.2 released

2017-06-12 Thread Nathan Marz
Specter supercharges your ability to use and manipulate data structures in Clojure and ClojureScript. 1.0.2 contains minor improvements. https://github.com/nathanmarz/specter Full changelog: * Added `pred=`, `pred<`, `pred>`, `pred<=`, `pred>=` for filtering using common comparisons * Add

[ANN] Specter 1.0.4

2017-10-17 Thread Nathan Marz
Specter fills in the holes in Clojure's API for manipulating immutable data, allowing data manipulation to be done concisely and with near-optimal performance. Specter 1.0.4 has minor changes. The biggest highlight since the last release is the greatly improved documentation courtesy of

[ANN] Specter 1.0.5

2017-11-16 Thread Nathan Marz
Specter fills in the holes in Clojure's API for manipulating immutable data, allowing data manipulation to be done concisely and with near-optimal performance. Specter is especially powerful for working with nested and recursive data. Specter 1.0.5 adds `regex-nav` which navigates to

[ANN] Specter 1.1.0: solving the `dissoc-in` problem

2018-01-02 Thread Nathan Marz
Specter fills in the holes in Clojure's API for manipulating immutable data, allowing data manipulation to be done concisely and with near-optimal performance. Specter is especially powerful for working with nested and recursive data. Project link: https://github.com/nathanmarz/specter

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-18 Thread Nathan Marz
If you want to be able to arbitrarily manipulate your data structures, you should look at Specter. I recommend reading my introductory blog post on it: http://nathanmarz.com/blog/clojures-missing-piece.html The `BEFORE-ELEM` and `AFTER-ELEM` navigators are what you use for

[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

[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,

[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

[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

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

2020-01-13 Thread Nathan Marz
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 a strange implementatio

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

2020-01-14 Thread Nathan Marz
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 >> interacts with Graal. >> &g

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

2020-01-20 Thread Nathan Marz
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. > java.io.Pr

[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:*

Re: Tour of our 250k line Clojure codebase

2021-06-10 Thread Nathan Marz
istributed systems. That's about as much illumination as I can give without showing example code. On Wednesday, June 9, 2021 at 5:45:16 PM UTC-10 tbald...@gmail.com wrote: > On Wed, Jun 9, 2021 at 6:14 PM Nathan Marz wrote: > >> Continuations in our language are expressed ver

Re: Tour of our 250k line Clojure codebase

2021-06-09 Thread Nathan Marz
t;>> radically new kind of software tool. It's not just for the initial >>>> construction of an application, but also encapsulates deployment, >>>> monitoring, and maintenance. It implements the first truly cohesive model >>>> for building software applic

Re: Tour of our 250k line Clojure codebase

2021-06-03 Thread Nathan Marz
Derek – we have a bunch of open-source on our Github . I'd like to release our new language one day, but that won't be for a long time. When I release it I want to do it the right way – extensive documentation, academic papers, and a commitment to supporting

Re: Tour of our 250k line Clojure codebase

2021-06-03 Thread Nathan Marz
th greatly reduced engineering cost." > > It seems like a full article expanding on the infrastructure-level design, > and the approach to generalizing and abstracting infrastructure, would be > very interesting. > > > On Thu, Jun 3, 2021 at 7:12 PM Nathan Marz wro

Announcing Clojure API for Rama: build end-to-end scalable backends in 100x less code

2023-10-11 Thread Nathan Marz
I'm happy to announce we've released a Clojure API for Rama in the latest release. We've published an introductory blog post that culminates in building a scalable auction application with timed listings, bids, and