Re: Designing API for a Markov Model

2014-09-15 Thread Quzanti
Is there a limited number of models? The model should stay decoupled from the state as they are totally distinct so general-fn[model old-state] -> new-state then either you (if you know the model) or the user if they can choose any model should define a partial fn partial specific-model-fn ge

Re: Is Clojure a language for growth?

2014-08-20 Thread Quzanti
rs (it's hard not to), and the last months people have been starting to > say "yeah, my java friends really likes it" or "yes, my bf likes it too". > > Wind of change. > > /Linus > working at Agical AB, a consultancy in love with technology and sometimes

Re: Is Clojure a language for growth?

2014-08-20 Thread Quzanti
Just looked at your profile. Sweden? A very enlightened place. I am a big fan of the Paradox Interactive games. What happens in Sweden when investors lose their money? On Wednesday, August 20, 2014 7:16:55 PM UTC+1, Henrik Eneroth wrote: > > > … as soon as anything goes wrong whether it has any

Re: Is Clojure a language for growth?

2014-08-20 Thread Quzanti
Whenever there is an external institutional stakeholder it is almost guaranteed to happen. Someone in that external institution has a bonus or promotion depending on the outcome, and will demand results. They will also have penalty clauses in the contract which can be anything from non-payment,

Re: Is Clojure a language for growth?

2014-08-20 Thread Quzanti
I'd agree with this. A closely held (financially) company with a small team of very bright programmers (preferably with a decent stake in the outcome so they stay around) will be able to exploit the power and productivity of clojure to do with a small team fast what would need far more people i

Re: Dynamic record creation

2011-02-03 Thread Quzanti
On Feb 4, 3:04 am, Kevin Downey wrote: > then define a factory function when you define the record, and use > that, you can easily apply a function to arbitrary arguments without > using eval > Thanks. There may be something in that. Would there be an easy way of dynamically determining which f

Re: Dynamic record creation

2011-02-03 Thread Quzanti
> I see no reason for the ctor to be defined as a string as you've done with > "Person.". The reason is that I am reading in XML and mapping a tag name to the record class. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: Dynamic record creation

2011-02-03 Thread Quzanti
On Feb 4, 2:55 am, Kevin Downey wrote: > I strongly recommend against writing or designing anything that > requires dynamically generating defrecords. if you want to dynamically > generate classes I suggest getting familiar with the asm library and > reading up on classloaders. > Its just the i

Re: Dynamic record creation

2011-02-03 Thread Quzanti
On Feb 4, 2:47 am, Kevin Downey wrote: > if you really want to keep things simple you should just say > '(Person. "..." 18) > without all the concat noise the solution becomes obvious. you have a > form (new Person X Y), you want to execute the code with different > values bound to X and Y at ru

Re: Dynamic record creation

2011-02-03 Thread Quzanti
%3Acomment-tabpanel Does anyone know anything more about it, or where the sourcecode would be? On Feb 4, 2:44 am, Aaron Cohen wrote: > On Thu, Feb 3, 2011 at 9:36 PM, Quzanti wrote: > > > On Feb 4, 2:23 am, Kevin Downey wrote: > > >> whole crazy concat thing > &

Re: Dynamic record creation

2011-02-03 Thread Quzanti
On Feb 4, 2:23 am, Kevin Downey wrote: > whole crazy concat thing >                 which has nothing to do with anything I probably should have clarified that the reason I need concat is that various functions are returning subsets of the arguments as vectors, but as stated to keep things sim

Dynamic record creation

2011-02-03 Thread Quzanti
Hello. I need to dynamically define records Suppose I have a record (defrecord Person [name age]) Then to dynamically construct an instance I do a much more complex version of (concat [(symbol "Person.")] ["Peter"] [18]) Where things like Peter and the class of the record are actually the resu

Re: Clojure application in the wild, to learn beautiful Clojure technique(s) from

2010-10-31 Thread Quzanti
The Compojure project interacts with templating languages and web servers (presumably). Don't know about databases. The design is elegant and idiomatic. http://github.com/weavejester/compojure/wiki On Oct 31, 3:49 am, Alex Baranosky wrote: > Hi all, > > I've read Programming Clojure, and written

Re: Improving Contrib

2010-10-20 Thread Quzanti
I understand that contrib wasn't intended to be a standard library, but it inclusion in contrib did suggest to me that a library was being widely used (and tested) and is relatively stable, and that is there was a common problem, then contrib would likely have a library for it Then there is the co

Evaluating elements of a vector in order

2010-09-20 Thread Quzanti
Hello I have a vector containing three macro calls. The third macro relies on the first having been fully evaluated. I want to define a macro to declare these three macros in order Call my vector 'stuff' then the following code inside a macro works (doall [(eval (get stuff 0)) (eval (get stuff 1

Re: More urgency for CinC & CLR given Oracle's lawsuit against Google?

2010-08-13 Thread Quzanti
I think it is all just posturing and gamesmanship, and will get settled by Google paying some sort of fee. Unless Google can buy someone with patents that Oracle is infringing then they can cross license. The only two implications I can think of are (1) Hardly helpful for people's confidence in t

Re: Function called from macro loses record structure

2010-07-17 Thread Quzanti
Thanks Michał I suppose this raises a deeper question - should an expression and what it evaluates to always be interchangeable in source code? I naively assumed it should, but then after reading Kyle's explanation decided that maybe there is a difference? On Jul 17, 2:18 am, Michał Marczyk wrot

Re: Function called from macro loses record structure

2010-07-15 Thread Quzanti
Kyle I think I understand what you are saying. So in practice you should prevent functions called from a macro from evaluating the records (using quoting), so that the output is in a form that looks like source code should? So think it probably is my lack of intuition about macros that is the pr

Function called from macro loses record structure

2010-07-15 Thread Quzanti
Hi Here is my sorry tale http://gist.github.com/477069 I am not sure if this could be my misunderstanding of macros or the ~ idiom Anyway if you spell out a record structure to a macro then you keep the Record information, even you call a function which spells out the structure then the records

Re: Attaching metadata to defrecord fields

2010-07-11 Thread Quzanti
Birds etc!! Charles. On Jul 11, 5:15 pm, Pedro Henriques dos Santos Teixeira wrote: > On Sun, Jul 11, 2010 at 11:45 AM, Quzanti wrote: > > Thanks Michał > > > You did understand my intention, and it was the former non-existent > > case I was referring to. > > > I

Re: Attaching metadata to defrecord fields

2010-07-11 Thread Quzanti
. Charles. On Jul 11, 3:15 pm, Michał Marczyk wrote: > On 11 July 2010 14:30, Quzanti wrote: > > > Please could someone tell me the preferred way of attaching field > > (key?) specific metadata in a defrecord definition? > > I'm not sure if I understand your intention correct

Attaching metadata to defrecord fields

2010-07-11 Thread Quzanti
Hello Please could someone tell me the preferred way of attaching field (key?) specific metadata in a defrecord definition? And how to I extract this metadata on a field by field basis? Thank you -- You received this message because you are subscribed to the Google Groups "Clojure" group. To p

Re: Non-tail recursion (Clojure way to hierarchies)

2010-06-16 Thread Quzanti
the second call as well" On Jun 15, 11:28 pm, James Reeves wrote: > On 15 June 2010 22:56, Quzanti wrote: > > > Thanks Mike. > > > So does is the only kind of recursion optimisation tail recursion? > > > Can you only eliminate stack calls in tail calls? > >

Re: Non-tail recursion (Clojure way to hierarchies)

2010-06-15 Thread Quzanti
PDT) > > Quzanti wrote: > > You can use recur to build a hierarchy. What do you mean by you can't > > use it as it is not the last statement? > > Exactly that. recur in some sense terminates the current call, and > hence is required to be the last statement in the c

Re: Non-tail recursion (Clojure way to hierarchies)

2010-06-15 Thread Quzanti
You can use recur to build a hierarchy. What do you mean by you can't use it as it is not the last statement? I have used recur in all sorts of places in the fn, without noticing any restrictions, and built hierarchies. I am no expert so I may have been conforming to the restrictions accidentally

Re: ClojureCheck 2.0

2010-06-14 Thread Quzanti
Useful, but not that sort of thing I'd ever think to look for unless I had read about it. Is there a wiki page somewhere that lists all this little libraries with a one line description? Would be great to just read a list of ideas and check a few out that hadn't thought about before. On Jun 14,

Re: "special form" vs. "macro"

2010-05-31 Thread Quzanti
ef is a special form. You must generate def at macro time; you cannot make 'dynamic' calls to def at runtime" On May 31, 4:05 pm, Joost wrote: > On May 31, 4:35 pm, Quzanti wrote: > > > That was interesting. > > > One more Q. > > > What determines whet

Re: "special form" vs. "macro"

2010-05-31 Thread Quzanti
That was interesting. One more Q. What determines whether special forms can be used in functions eg you can't def a variable in a fn. Is it there some rule or is it special form specific depending on (a) the intended use of the special form (b) the mechanics of getting the compiler to use the sp

Re: Which GUI toolkit would you like to see wrapped in an idiomatic Clojure library?

2010-05-31 Thread Quzanti
+1 Swing with caveats Will Swing itself continue to receive serious backing from Oracle? Will they get JavaFX to do everything Swing can and then deprecate Swing (if not officially then in practice?) It really depends on Netbeans. All the L&F issues and other minor ones got attention when Sun bega

Re: Macro expand time

2010-05-26 Thread Quzanti
Thanks Laurent. It does give me an overall view, but more importantly it gives me the impression that there are some subtleties, so I am not feeling so bad about the fact some of the behaviour hasn't been what I had predicted. On May 26, 1:55 pm, Laurent PETIT wrote: > Hi, > > 201

Macro expand time

2010-05-26 Thread Quzanti
Hi, As a newbie to lisp/clojure one thing I am having real trouble with is understanding macro expand time (now having discovered the difference between quote and backquote I was hoping I was on the way to nirvana but still trip up) Some newbie questions: If the macro is run at compile time how

Re: PDF generation with Clojure?

2010-05-25 Thread Quzanti
I am not enough of a functional programming / Clojure expert to comment on which library would integrate best with Clojure. However I have always found iText to be badly designed (even though historically it has been the mindshare leader with most features) Also the licence on iText is GPL 3 with

Re: Dumbest test Q you ever heard

2010-05-13 Thread Quzanti
function is run more than once it only adds one thing to the Set as the Set removes duplicates) Think my mind works in an obscure way, so prob not much use to anyone else. On May 12, 7:55 pm, Quzanti wrote: > Found an :each example using binding - is that the suggested option? > > Would

Re: Dumbest test Q you ever heard

2010-05-12 Thread Quzanti
Found an :each example using binding - is that the suggested option? Would still be really grateful for a link to the best examples of using the test framework out there. Thanks. On May 12, 7:10 pm, Quzanti wrote: > Hi > > Now I am a bit baffled as how to store a fixture (eg a p

Re: Dumbest test Q you ever heard

2010-05-12 Thread Quzanti
rk is heavily used. I searched for with-test and :once in the clojure and contrib 1.1 source and couldn't find anything. Thanks. On May 8, 7:30 am, Quzanti wrote: > Ah hah! > > Thanks > > On May 7, 9:35 pm, Stuart Sierra wrote: > > > > > On May 6, 12:40 pm, Qu

Re: Dumbest test Q you ever heard

2010-05-07 Thread Quzanti
Ah hah! Thanks On May 7, 9:35 pm, Stuart Sierra wrote: > On May 6, 12:40 pm, Quzanti wrote: > > > If you do anything outside an assertion you get an error saying you > > were outside an assertion. > > No, clojure.test permits any arbitrary code inside deftest.  If y

Re: Dumbest test Q you ever heard

2010-05-06 Thread Quzanti
. making the test code closely tied to the function, if you could do a function specific fixture?? On May 6, 2:34 pm, Sean Devlin wrote: > Can you just use a local let in the specific test? > > On May 6, 6:41 am, Quzanti wrote: > > > > > Sorry about this, but after an hour&#

Dumbest test Q you ever heard

2010-05-06 Thread Quzanti
Sorry about this, but after an hour's googling I have drawn a blank. For clojure.test fixtures I understand you use :each for doing something around each and every test, and :once for doing it once around all the tests in that namespace What happens if you want to do some setup just for one parti

Re: Logic programming in Clojure

2010-03-23 Thread Quzanti
Very interesting write up. What advantages would prolog have over such a language. Or if we are trying to move beyond language wars - what styles of logic programming would be more natural in either one or the other? I say that because my first thought is if you could build a logic language on to

Re: Why I have chosen not to employ clojure

2010-03-21 Thread Quzanti
But if he had never been in the Java mindset it wouldn't be obvious to him that there is nothing to be gained by compiling your own java code. Platform independence, bytecode etc means that a jar file of the stable build is the optimum solution. That is so obvious to us we forget that its a revolut

Re: Why I have chosen not to employ clojure

2010-03-21 Thread Quzanti
Reading his post I got the impression he was a bit of an egocentric (a bit more information about himself than was relevant), those sorts tend to overreact. However I can imagine the whole just bung the jar file on your classpath thing wouldn't make much sense for a java newbie. It may highlight

Re: Var Value from String of varname

2010-02-24 Thread Quzanti
ormance impact of using eval,as presumably the > > compiler can't do much until runtime? Or is the idea of functional > > languages to delay as much until runtime as possible anyway? > > > On Feb 24, 11:16 am, Quzanti wrote: > >> I am sure this is really ob

Re: Var Value from String of varname

2010-02-24 Thread Quzanti
he idea of functional languages to delay as much until runtime as possible anyway? On Feb 24, 11:16 am, Quzanti wrote: > I am sure this is really obvious but as I don't know the technical > term for what I am trying to do I can't google it > > (def age 3) > > then >

Var Value from String of varname

2010-02-24 Thread Quzanti
I am sure this is really obvious but as I don't know the technical term for what I am trying to do I can't google it (def age 3) then (cons (symbol "age") [2 1]) I get (age 2 1) rather than (3 2 1) which is what I was hoping for. Or maybe you cannot do this at runtime? -- You received thi

Re: Request for Feedback: Improve VimClojure's documentation

2010-02-12 Thread Quzanti
I'll give the newbie perspective, which given as I did not really know what I was doing may involve several false assumptions but will provide insight into the thinking of a newbie, which may be a hard frame of mind for experts to imagine. Firstly when you are new you just want to get something wo