Re: Clojure Truck Factor

2015-08-17 Thread Andrew Chambers
>From my outside observation you would need to hit Rich Hickey, Timothy Baldridge, David Nolen, Stuart Halloway + other cognitect staff all at once. This wouldn't exactly "kill" clojure. But may put it into maintenance only mode for a while. On Saturday, August 8, 2015 at 4:21:40 AM UTC+12, Gu

Re: Durable atom

2015-08-16 Thread Andrew Chambers
UTC-4, Andrew Chambers wrote: >> >> Datomic is basically what you want. >> > > What if he wants open source? > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Re: Durable atom

2015-08-16 Thread Andrew Chambers
Datomic is basically what you want. when you get a db instance from the connection it is equivalent to dereffing an atom - You get an immutable reference to the data at that point in time. On Monday, August 17, 2015 at 2:59:09 AM UTC+12, Jeremy Vuillermet wrote: > > Hello, > > With the rise of O

Re: Functional programming and security

2014-05-04 Thread Andrew Chambers
I would say the transaction model of datomic would have saved Mt Gox from its problems dealing with atomic transactions, however that's more due to datomic's design and poor design of the Mt Gox system than a clojure specific thing. On Monday, May 5, 2014 6:21:47 PM UTC+12, Magnus Therning wrot

Re: Idiomatic tokenizing and performance

2014-05-04 Thread Andrew Chambers
I hope you don't > mind. > > https://gist.github.com/muhuk/7c4a2b8db63886e2a9cd > > > On Mon, May 5, 2014 at 12:36 PM, Andrew Chambers > > > wrote: > >> I've been trying to make a tokenizer/lexer for a project of mine and came >> up with the f

Idiomatic tokenizing and performance

2014-05-04 Thread Andrew Chambers
q [cs] (let [[newcs tok] (next-token cs)] (lazy-seq (cons tok (token-seq newcs) Cheers, Andrew Chambers -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that p

Re: testing clojure.core/group-by with clojure.test.check

2014-04-30 Thread Andrew Chambers
One approach you can use is write the generators in such a way that they generate the final answer group-by should return, then you write code which does the inverse to group by and then you check the group by answer is equal to the originally generated solution. On Wednesday, April 30, 2014 1

Re: cursive plugin question

2014-04-29 Thread Andrew Chambers
To do this i created a new run configuration with and in the run config dialog set it to local clojure repl, then you need to go to preferences and create keybindings for send current form to repl (I just used shift + enter). Then it should work no problem. On Tuesday, April 29, 2014 11:04:24 P

Re: Update

2014-04-29 Thread Andrew Chambers
For the llvm based approach you can look at vmkit. On Wednesday, April 30, 2014 3:39:21 AM UTC+12, Divyansh Prakash wrote: > > Check out my previous reply. The parrot vm provides gc and everything, But > still the author defines lambda primitives in c, and then builds over it. -- You received t

Re: Update

2014-04-29 Thread Andrew Chambers
Well, why write it in primitives when there is a perfectly good compiler from java to primitives? I dont quite understand why you think there would be benefit from manually writing everything with java bytecode. The JVM works with classes, thats how its designed, Clojure itself is just a java l

Re: ring streaming efficiency

2014-04-22 Thread Andrew Chambers
it might > be useful hosting your files on a service like S3, and redirecting your > users instead. > > - James > > > On 23 April 2014 04:03, Andrew Chambers > > wrote: > >> When you set the body of a ring response to a java input stream and >> return it,

Re: Which linux distro has intelij ?

2014-04-22 Thread Andrew Chambers
Just for reference, i use xubuntu (with the apt-get java jdk) and windows with cursive no problem. I love cursive compared to other clojure dev tools I've tried. On Wednesday, April 23, 2014 11:37:12 AM UTC+12, Andrew Chambers wrote: > > Don't install intellij from and package

ring streaming efficiency

2014-04-22 Thread Andrew Chambers
When you set the body of a ring response to a java input stream and return it, is this still a thread per stream? or does it use some sort of java event loop for efficiency? I'm worried that a traffic download/upload server in ring wouldn't handle many concurrent large file uploads and downloads

Re: Which linux distro has intelij ?

2014-04-22 Thread Andrew Chambers
Don't install intellij from and package manager (it will probably be out of date/not there), just install java then download it from the intellij/cursive website. Its self updating anyway and should work on any distro and on windows that way. On Wednesday, April 23, 2014 5:11:54 AM UTC+12, Roel

Re: [ANN] Gorilla REPL 0.2.0 - all new extensible renderer

2014-04-15 Thread Andrew Chambers
Is there a way to rerun the whole notebook top to bottom with a hotkey? On Wed, Apr 16, 2014 at 3:59 PM, SteveSuehs wrote: > I'm running Leiningen 2.1.2 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit > Server VM > > Upgrading now...version 2.3.4 > Removed tools.nrepl from project.clj > $ lein gorilla

Re: "true" lightweight threads on clojurescript?

2014-04-15 Thread Andrew Chambers
You need to write either an interpreter of some sort of bytecode in javascript/clojurescript and and have the interpreter implement the threading, or use a webworker for each process then something like core.async for sending ui events to the main browser loop. Clojurescript doesnt attempt to e

Re: [ANN] Gorilla REPL 0.2.0 - all new extensible renderer

2014-04-15 Thread Andrew Chambers
This is awesome (reminds me of ipython notebooks). I hope to use this to custom render some data structures internal to my compiler project. I'll have to read up on how to render directed graphs. On Thursday, March 20, 2014 9:22:57 AM UTC+13, Jony Hudson wrote: > > Hi all, > > I'm happy to ann

Re: Clojure compiletime vs runtime

2014-04-15 Thread Andrew Chambers
j > (def y 1) > > > Now the AOT would only load the first file in the namespace because > (load "user_y") would not be evaluated. > > Why are you worried about this? Most of the time compilation in Clojure > is an implementation detail, as it is in python. It j

Re: Clojure compiletime vs runtime

2014-04-15 Thread Andrew Chambers
Why are the toplevel forms which arent macros executed at compile time? For example Lua can be compiled to bytecode without executing its top level calls. On Tue, Apr 15, 2014 at 9:04 PM, Softaddicts wrote: > Ahem :) > > a) The fn x does not exist in the universe until you call foo, hence you >

Re: Clojure compiletime vs runtime

2014-04-14 Thread Andrew Chambers
Forgive me, the first example was meant to be The following code wont compile: (defn y[]) ((x)) (defn x [] nil) On Tuesday, April 15, 2014 4:39:59 PM UTC+12, Andrew Chambers wrote: > > Is there an explanation of how clojure deals with scoping and its static > checking. It seems to be

Clojure compiletime vs runtime

2014-04-14 Thread Andrew Chambers
Is there an explanation of how clojure deals with scoping and its static checking. It seems to be a hybrid of a static language and a dynamic language when it comes to compilation. I'll elaborate. The following code wont compile: (defn x [] nil) (defn y[]) ((x)) however this code will compile:

Re: Extending a data model

2014-04-14 Thread Andrew Chambers
An update, I read about protocols and multimethods. I think multimethods are a decent way to go (cant use protocols without a defrecord) provided they work across namespaces. On Tuesday, April 15, 2014 11:52:36 AM UTC+12, Andrew Chambers wrote: > > Hi everyone, > > I'm new

Re: Extending a data model

2014-04-14 Thread Andrew Chambers
on. This is probably the > easiest thing to do, as in your (accesses-memory?) you can simply enquire > of the target description structure rather than relying on the user to have > provided a multimethod implementation or anything else. > > Hope this helps, > Reid > > On M

Re: Potential Intro clojure projects - libraries and ideas with wow factor

2014-04-14 Thread Andrew Chambers
Clojure logic programming with core.logic (something akin to a sudoku solver https://gist.github.com/swannodette/3217582 is a good example) or using datomic to have a database with a time machine and datalog for queries might be cool (perhaps visualizing the data in the database at arbitrary ti

Extending a data model

2014-04-14 Thread Andrew Chambers
Hi everyone, I'm new to clojure and in order to learn I'm working on making some compiler tools which converts a lightweight IR code into assembly. My data model for an IR function is along the lines of (def code { :entry [[:loadaddr :x "global_label"] [:loadconst 1 :y]