automat reverse path

2016-01-14 Thread Kurt Sys
I'd like to use automat as a core engine for web applications. It should be able to hold state, as a state machine does :). However, I can only see 'forward' paths in automat (which is probably what a state machine is about). Taking 'the short example' on the webpage: > (def pages [:cart :chec

Re: gen-class: override only 1 method of an arity-overloaded method of a (Java) superclass

2016-01-05 Thread Kurt Sys
ere is an example of where I successfully > subclassed a Java class from an external library and called some superclass > methods: > https://github.com/brunchboy/afterglow-max/blob/master/src/afterglow/max/Var.clj > > On Wednesday, December 23, 2015 at 3:23:41 AM UTC-6, Kurt Sys wrote: >

gen-class: override only 1 method of an arity-overloaded method of a (Java) superclass

2015-12-23 Thread Kurt Sys
When using gen-class and arity-overloaded methods of a superclass seems not very obvious, or I am missing something... There's a (java) superclass 'some.Superclass' (which is from a library, so I can't change this one): public abstract class Superclass { public void method() { } publi

gen-class and overriding only 1 (arity-)overloaded method of superclass

2015-12-23 Thread Kurt Sys
When using gen-class and arity-overloaded methods of a superclass seems not very obvious, or I am missing something :p. There's a (java) superclass 'some.Superclass' (which is from a library, so I can't change this one): public abstract class Superclass { public void method() { } publ

Re: finding optimal pairs/triplets

2015-10-07 Thread Kurt Sys
Yes! That's what I was looking for :). I really like the idea of 'team-centric' and 'player-centric', and combining them! It might take me some time to figure it all out in detail, but with this idea and your example, I'll pretty confident I'll get there :). I could go for heuristics as well, b

Re: finding optimal pairs/triplets

2015-10-06 Thread Kurt Sys
t > (it will just return "nil" because the return value of $nth has no :level > key). > > Let me know how my alternative solution works for you. > > Thanks! > --Alex > > On Tuesday, October 6, 2015 at 7:22:55 AM UTC-7, Kurt Sys wrote: >> >> >>

Re: finding optimal pairs/triplets

2015-10-06 Thread Kurt Sys
; for dispatch value: null clojure.lang.MultiFn.getFn (MultiFn.java:156) I clearly misunderstand how $nth (or how loco in general) works. How I can use my player characteristics (the vector of player data maps) for adding constraints? Thx, qsys Op dinsdag 6 oktober 2015 12:10:23 UTC+2 sc

finding optimal pairs/triplets

2015-10-06 Thread Kurt Sys
Reading the thread: generate al possible teams , I realized I was facing a slightly similar problem. Although many valuable suggestions were made, I'm very interested in one ma

Re: top-level lets or private globals

2015-08-26 Thread Kurt Sys
I do understand that point of view and largely agree. However, some (pretty small) functions or constants are private to some namespace, or rather, to some scope inside a namespace. I consider the public functions as the 'API of the namespace'. Internals shouldn't be exposed, so I can change i

Re: top-level lets or private globals

2015-08-26 Thread Kurt Sys
Allright, so I'll probably stick to top-level lets... Thx! Op woensdag 26 augustus 2015 18:44:18 UTC+2 schreef Herwig Hochleitner: > > I can't really speak to what's more idiomatic, but there is a slight > difference between a top-level let and ^:const ^:private. > ^:const makes the compiler dire

Re: top-level lets or private globals

2015-08-25 Thread Kurt Sys
ry often, most of these can be put in a kind of seperate 'utility' namespace, but not always) 2. functions that do use the 'namespace constants', mostly the public namespace functions (to be called from another namespace) Op dinsdag 25 augustus 2015 14:14:52

Re: top-level lets or private globals

2015-08-25 Thread Kurt Sys
t 2:19 PM, Alan Thompson > wrote: > >> Ya know, I've never seen that before but I like it! >> >> I have noticed that you can have "naked" expressions in a file (i.e. not >> inside of a def/defn). For example, I use a statement like this: >> >>

top-level lets or private globals

2015-08-25 Thread Kurt Sys
I'm refering to a few posts in an old thread: https://groups.google.com/d/msg/clojure/r_ym-h53f1E/RzUdb5oYeX4J What really puzzles me is that it doesn't seem to be generally > regarded as idiomatic Clojure style to just use top-level (let)s for > your "private" globals. So, here's the questio