@Mark
To be honest i cannot answer your question...however it works...demo
follows:
sorted@sorted-desktop:~$ lein2 repl
nREPL server started on port 50832
REPL-y 0.1.0-beta10
Clojure 1.4.0
Exit: Control+D or (exit) or (quit)
Commands: (user/help)
Docs: (doc function-name-here)
I know my reply is a bit delayed but the past 2-3 days have been frantic!
On 12/12/12 18:00, Michał Marczyk wrote:
@Jim:
That function generates factory functions which themselves use no
reflection and incur no performance penalty at all. The only
performance hit visible at runtime comes from t
I've done this for a project in Emacs, and Slime needed to get
slightly confused sometimes. As I recall the buffer names got out of
sync with the filenames somehow or something like that. Has anyone
gotten this working smoothly with Slime or nrepl-el?
It works well even with the minor quirks.
jac
On Thursday, December 13, 2012 11:43:48 PM UTC+2, puzzler wrote:
>
> On Thu, Dec 13, 2012 at 1:31 PM, Timo Mihaljov
>
> > wrote:
>
>> (ns example.patron
>> "The patron doesn't have an artistic vision (that's the artist's job),
>> nor does it know how to talk to a graphics API (that's what the
Hi,
Am Freitag, 14. Dezember 2012 09:04:32 UTC+1 schrieb puzzler:
>
> Has the situation improved? (Specifically, are you speaking from
> experience with splitting files up in this way, or is this just a
> theoretical idea? If you have done this and had a good experience, what
> tools were you
On Thu, Dec 13, 2012 at 11:43 PM, Meikel Brandmeyer (kotarak)
wrote:
> You can still use load to split the implementations accross different
> files to keep things organised if that is your main concern.
>
In the early 1.0 days of Clojure, I experimented with splitting code across
different files
Hi,
playing devil's advocate:
Am Freitag, 14. Dezember 2012 06:51:43 UTC+1 schrieb puzzler:
>
> It's interesting that most of the solutions presented here involve
> something along the lines of immigrate / potemkin / redefine (in your
> piplin code). With so many people reinventing the same wh
It's interesting that most of the solutions presented here involve
something along the lines of immigrate / potemkin / redefine (in your
piplin code). With so many people reinventing the same wheel, it would
seem that this really is a key piece to solving the problem of putting a
friendly API on t
I've written a large application that uses this approach. You can see it
applied with protocols and multimethods in types.clj and protocols.clj, and
the remainder of the code in types/*.clj. I used this to manage over 10
different extensions, and it's been simple enough to keep organized.
I hav
On Thu, Dec 13, 2012 at 1:31 PM, Timo Mihaljov wrote:
> (ns example.patron
> "The patron doesn't have an artistic vision (that's the artist's job),
> nor does it know how to talk to a graphics API (that's what the canvases
> are for). What it *does* know is how many triangles and squares we can
On 12.12.2012 02:16, Mark Engelberg wrote:
Hi Mark,
Here's my take on the problem. I hope you can adapt it to your situation.
(ns example.canvas
"A canvas is an abstract interface to a graphics API. The canvas
namespace does not build new functionality on top of the APIs, that's a
job for ano
FWIW, also having struggled with overcoming circular ns deps in the
past, I adopted the approach/compromise below which still provides an
IMHO decent/sound usercode experience.
A contrived example:
core.clj
(ns mylib.core
(:require [mylib.types])
(:import [mylib.types Rect Circle]))
@Jim:
That function generates factory functions which themselves use no
reflection and incur no performance penalty at all. The only
performance hit visible at runtime comes from the fact that generating
those factory functions involves compiling code at runtime (but you
should hopefully be able t
On Wed, Dec 12, 2012 at 9:53 AM, Jim - FooBar(); wrote:
> Yes it would...You're using reflection so no need to :use or :require the
> namespaces any more.
> Point your browser here if you're not following:
> https://github.com/jimpil/Clondie24/blob/master/src/Clondie24/lib/util.clj
>
What gets th
Thanks. I was hoping that someone would see a way to organize the
namespaces to avoid circular dependencies, but perhaps there's simply no
way to do that short of what I already outlined.
I especially appreciate the pointer to Potemkin. Just reading through the
"apologia", it sounds like it is m
On 12/12/12 17:37, Mark Engelberg wrote:
Yes and no. That's basically what I'm trying to do, but I only have a
handful of concrete implementations to choose from, so I don't mind
writing a hard-coded cond that chooses between them based on some sort
of keyword that the user passes in. So the
What's stopping you to include the immigrate fn into your own library?
Source is here:
http://clojuredocs.org/clojure_contrib/clojure.contrib.ns-utils/immigrate
There's also Zach Tellman's Potemkin lib, which can be used to
immigrate individual vars:
https://github.com/ztellman/potemkin
(Although
On Wed, Dec 12, 2012 at 8:22 AM, Jim foo.bar wrote:
> On 12/12/12 00:16, Mark Engelberg wrote:
>
> I would much prefer to have some sort of core function that serves as a
> polymorphic constructor. This way users don't need to require the concrete
> implementations individually.
>
>
> I faced t
On 12/12/12 00:16, Mark Engelberg wrote:
I would much prefer to have some sort of core function that serves as
a polymorphic constructor. This way users don't need to require the
concrete implementations individually.
I faced the same sort of issue a couple of months ago. Just like you, I
wa
19 matches
Mail list logo