How to get result of default pprint from custom simple-dispatch

2018-04-30 Thread MS
I have a defrecord which is not pprinting exactly the way I want. When print-dup is true, I want to eliminate any references to the namespace, as I want to write out to edn and read it back in, but without running eval while doing so, and without exposing the clojure implementation details to t

Clojure data vs. JavaFX Properties

2015-02-13 Thread MS
Short version: Is there any way to get JavaFX (8.0) to tell Clojure that a Property is no longer available, such that I may (remove-watch) a watch on a ref/atom which notifies that Property of ref/atom changes? Long version: My domain/application data is a nested Clojure hash-map that lives

Re: Clojure for Desktop UI Design Application

2015-01-13 Thread MS
hought experiments about different architectures and >> paradigms (specifically FRP related paradigms). >> >> Oh, and have a quick scan through http://swannodette.github.io/, there >> are a few "mind-changing" posts. >> >> On Monday, 12 January 2015 1

Re: Clojure for Desktop UI Design Application

2015-01-13 Thread MS
, I do think you might > want to do some thought experiments about different architectures and > paradigms (specifically FRP related paradigms). > > Oh, and have a quick scan through http://swannodette.github.io/, there > are a few "mind-changing" posts. > > On Monday

Clojure for Desktop UI Design Application

2015-01-12 Thread MS
(Cross-posted on StackOverflow) I'm trying to design a desktop UI for schematics, layout, drawing stuff. Just looking for high level advice from actual software designers. Assuming an in-memory "database", (clojure map of arbitrary depth for all user data, and possibly another one for applicat

Re: What to use for serializing reference types?

2014-08-11 Thread MS
Actually there are several things going on. In general the database I'm trying to define would include not only the actual net list (ie a mapping between nets and pins), but also all the PCB junk that goes on. The cyclic graph requires some type of mutability if I want to find the net that bel

Re: What to use for serializing reference types?

2014-08-11 Thread MS
produce the same sequence of > bytes, which are easily compressed. I believe Nippy has a fast compression > via Snappy enabled by default. > > - James > > > On 10 August 2014 19:36, MS <5lvq...@sneakemail.com > wrote: > >> I'm trying to write an EE sche

Re: What to use for serializing reference types?

2014-08-11 Thread MS
thing like > > {:prototype-components {:r10k {:resistance 10, :type :fixed, :unit :kΩ}} > :components [{:name "resistor 1", :proto :r10k}, {:name "resistor 2", > :proto :r10k}]} > > Jozef > > On Sun, Aug 10, 2014 at 8:36 PM, MS <5lvq...@sneakemail.c

Re: What to use for serializing reference types?

2014-08-11 Thread MS
Thanks, I'm roughly familiar with edif, having seen it on occasion in various previous lifetimes. However I'm trying to get away from Big EDA companies in genera. Without looking at the format in too much detail, it seems to want to define how the internal structure of the program would be, i

What to use for serializing reference types?

2014-08-10 Thread MS
I'm trying to write an EE schematic capture program in clojure. I'd like to be able to define a prototype component, say a resistor with value=10k, then be able to instantiate that many times, with each instance having an additional property such as a name string. It's easy to ensure (identica

Re: Functional program design concepts

2011-02-17 Thread MS
> If your domain model can be represented by a simple vector / map / > set, then you have a very rich set of tools (in Clojure) to operate on > your domain model. If your domain model is represented by fixed types, > you have to write all sorts of wrapper functions to be able to apply > those oper

Re: Functional program design concepts

2011-02-17 Thread MS
On Feb 15, 4:12 pm, James Reeves wrote: > On 15 February 2011 22:53, MS <5lvqbw...@sneakemail.com> wrote: > > >> So an electrical circuit is a data structure containing vertices and > >> edges and describing how they are connected. Then you'll have some >

Re: Functional program design concepts

2011-02-17 Thread MS
On Feb 15, 3:10 pm, Sean Corfield wrote: > On Tue, Feb 15, 2011 at 2:53 PM, MS <5lvqbw...@sneakemail.com> wrote: > > Because I'm not sure how else to use (for example) a graph library and > > still have it look like a circuit, rather than a graph. > > Almost an

Re: Functional program design concepts

2011-02-15 Thread MS
Cool, thanks for the tips. More inline below: > > > For example, I'm trying to figure out how to do polymorphism in FP. > > Why? Because I'm not sure how else to use (for example) a graph library and still have it look like a circuit, rather than a graph. > > > Specifically, an electrical circu

Re: Functional program design concepts

2011-02-15 Thread MS
Thanks, I have HTDP on my computer but after the first chapter I got distracted and have been meaning to get to itI'll look for my answers there! :) On Feb 15, 1:13 pm, Raoul Duke wrote: > On Tue, Feb 15, 2011 at 1:12 PM, Raoul Duke wrote: > > for a functional take: > >http://ac.aua.am/triet

Functional program design concepts

2011-02-15 Thread MS
Hi, I just (mostly) finished reading the Programming Clojure book and while it gave a great overview of the language, I'm still at a loss for how to design programs. Maybe my mind has been polluted by OO concepts. For example, I'm trying to figure out how to do polymorphism in FP. Specifically, a

Re: Clojure Newbie trying to represent electrical circuit

2011-01-03 Thread MS
thanks... actually I have the hardcopy of sicp, but it's buried someplace. I was hoping do divine the solution with mostly my own brain. :) Michael On Jan 3, 4:13 pm, Miki wrote: > You might be interested in > readinghttp://mitpress.mit.edu/sicp/full-text/book/book-Z-H-22.html#%_sec_3.3.4 > (I

Clojure Newbie trying to represent electrical circuit

2011-01-03 Thread MS
Hi, I'm new to clojure (though I've messed around in scheme a little) and I'm trying to represent an electrical circuit with "pins" and "nets" (ie in graph terminology vertices and edges). I'd like to represent the nets as {:name "net_name" :pins #{pin1 pin2 pin3}} etc. I'd like to represent each