a little slim at the moment, and
probably make little sense without prior exposure to clojure.spec. I plan
to address this before sharing it with the larger Ruby community.
Jamie
On 22 January 2017 at 06:38, Xiyang Chen wrote:
> Hi,
>
> In addition to js.spec, here is another alter
On Thursday, 29 December 2016 19:14:49 UTC-8, Rich Morin wrote:
>
> On Thursday, December 29, 2016 at 6:24:39 PM UTC-8, Jamie English wrote:
>>
>> I've spent some time over the holidays working on a Ruby port of
>> clojure.spec: ...
>>
>
> I'm delight
th clojure.spec
within the next couple of months.
Cheers,
Jamie
On Thursday, 29 December 2016 18:17:47 UTC, Rich Morin wrote:
>
> Does anyone know of efforts to port clojure.spec to other languages? I
> thought I had seen someone mention versions for Haskell and Scala, but I
> ca
Excellent. I tried to watch on periscope, but it never showed up.
Jamie
On Apr 17, 2015, at 10:20 AM, Marc Fawzi wrote:
> yes, will post link here sometime next week
>
> all 3 presentations were screen captured too so it will be very easy to
> follow
>
> Sent from my iPho
Wow. Props for the Modern Times reference!
On Jan 29, 2014, at 4:50 PM, Mimmo Cosenza wrote:
> Thanks Sean.
> Ok. I'll update the various lein templates in accordance with this choice.
>
> Unfortunately we still have to wait for cljsbuild to be extended to support
> the auto mode for test
omponents,
> we're finally getting to the "good stuff" IMO :)
>
> David
>
>
> On Sun, Jan 26, 2014 at 9:59 PM, Jamie Orchard-Hays
> wrote:
> :) Worked through the Om tutorial today. Thanks much, David. Good stuff.
>
> On Jan 26, 2014, at 8:54
You can disable the bracket insertion by disabling the keys that
trigger it. Add this to your user.keymap:
:- {:editor.keys.normal {"\"" [(:editor.repeat-pair "\"")]
"(" [(:editor.open-pair "(")]
")" [(:editor.close-pair ")")]
a normalised view over a denormalised database.
On 10 December 2013 01:57, Jamie Brandon wrote:
> That part that seemed relevant to your question is compile queries on
> denormalised views to queries on normalised databases.
>
>
> On 9 December 2013 22:07, Brian Craft w
to sql queries against a db. It
> doesn't, for example, address indexing in-memory data.
>
>
> On Monday, December 9, 2013 11:23:36 AM UTC-8, Jamie Brandon wrote:
>
>> Take a look at "A practical theory of language-integrated query" at
>> http://homepages
Take a look at "A practical theory of language-integrated query" at
http://homepages.inf.ed.ac.uk/wadler/topics/recent.html . In the FPDays
talk linked there Wadler demonstrated writing queries which returned
denormalised views on tables, composing those with queries on the
denormalised view and co
Better late than never :)
https://github.com/jamii/strucjure
Strucjure is a library for describing stuff in an executable manner. It
gives you pattern matching (with first-class patterns), validators,
parsers, walks and lenses (and eventually generators). The shape of your
data is immediately app
ot sure.
On 26 November 2013 17:11, Guru Devanla wrote:
> Hi Jamie,
>
> Thats interesting. How do I not let the compiler not optimize away the fact
> that y refers to the constant. When I run your program I have two constant
> fields defined rather than 'y. Am I missing something.
> (def f (let [y 1] (fn [x] (+ x y
Let's have a look inside.
> (require '[no.disassemble :refer [disassemble]])
> (println (disassemble f))
// Compiled from /home/jamie/strucjure/src/strucjure.clj (version 1.5
: 49.0, super bit)
public final class strucjure$fn__55
gation code that
-- under some currently unknown load threshold -- lets us at least get some
more testing done.
https://gist.github.com/jsmorph/7042092
The excellent CLJ-1152 bug report (nice work!) suggests this approach.
Definitely not a work-around. Just some mitigation.
--Jamie
--
JVM bytecode can't contain data-structures, only code. If you eval
something or embed it in macro output the clojure compiler needs to be
able to output code that reconstructs an equal object. There are some
types that it can't do that for.
user=> (def x)
#'user/x
user=> x
#
user=> (eval x)
#
user
reful with
> doseq benchmarks like this though, if you aren't careful hotspot can
> completely eliminate parts of the computation as dead code if it can infer
> the results aren't used. Criterion has a neat trick for making sure this
> can't happen, IIRC.
>
>
> O
For larger patterns, the staged version is actually significantly faster:
https://gist.github.com/jamii/6597235
On 17 September 2013 16:29, Jamie Brandon wrote:
> I ran a little benchmark comparing different implementations of a toy
> pattern matching protocol:
>
> https://gist.gith
I ran a little benchmark comparing different implementations of a toy
pattern matching protocol:
https://gist.github.com/jamii/6595850
I'm surprised to find that the staged version is not significantly
slower than the compiled version. Now I'm wondering whether this is
feasible on a larger scale.
I wonder if you can do something clever with class-loaders to prevent
side-effects when testing functions...
On 7 September 2013 20:16, Islon Scherer wrote:
>> I wonder if it would be possible to improve it using the core.typed
>> library and doing some kind of static analysis similar to Haskell'
which Hotspot
> seems to be able to optimize just fine):
>
> (let [y 1 f (fn [x] (+ x y))] ((eval `(fn [g#] (g# 1))) f))
>
> Happy to elaborate if you like.
>
> Cheers,
> Jason
>
> [1] http://dev.clojure.org/jira/browse/CLJ-1206
>
>
> On Wednesday, August 28, 2013 10:59:
-in are doing.
>
> If the letfn is being generated by your compilation step, why can't that go
> inside of your generated fn rather than outside it?
>
> (clojure.core/fn
> [input__2288__auto__]
> (clojure.core/letfn
> [(num ...)
> (succ ...)
&
; repeat until you get bored
>> )
>>
>> (defn e [f]
>> (let [wr (Wrapper. f)]
>> (eval `(~wr 1))))
>>
>> (e inc)
>>
>> (e (with-meta (fn [x] (+ 4 x)) {}))
>>
>>
>>
>> On Wed, Aug 28, 2013 at 1:59 PM, Jamie Brandon
>>
> Just curious: what do you expect that to do?
It was actually the second example that was causing me trouble and
when I was digging through the compiler for the cause I noticed the
first. I don't actually want to write that code, I'm just confused as
to why nrepl.el gives a different answer to le
nsider this hacky or not.
>
> (def ^:dynamic *fn-helper*)
>
> (defn eval-at-one [f] (binding [*fn-helper* f] (eval '(*fn-helper* 1
>
>
> On Wed, Aug 28, 2013 at 1:28 PM, Jamie Brandon
> wrote:
>>
>> You will also run into problems if your functions close ov
(fn [] (do-stuff-with @~f))) {::strong-ref f}))
So that way f will be freed up when the resulting fn is gced.
On 28 August 2013 17:59, Ben Wolfson wrote:
> On Wed, Aug 28, 2013 at 9:27 AM, Jamie Brandon
> wrote:
>>
>>
>> If you aren't worried about leaking memory, a
Huh, I'm using nrepl.el but if I use lein repl I get the same results as you.
On 28 August 2013 18:16, Aaron Cohen wrote:
> What repl are you using? I think it's doing something weird.
>
> java -cp clojure-1.5.1.jar clojure.main
> user=> [do (inc 1)]
> 2
> user> ^{:line 11, :column 20} []
> Class
Clojure struggles with staged programming because of JVM limitations.
"The deeper issue here is that JVM bytecode is fundamentally static:
it's not allowed to contain references to objects that only exist at
runtime. In languages that have a built-in concept of a "runtime
image," like Smalltalk o
I had previously assumed that the clojure repl effectively just did
(eval (read-string input)). That doesn't seem to be the case eg:
user> [do (inc 1)]
CompilerException java.lang.RuntimeException: Unable to resolve
symbol: do in this context, compiling:(NO_SOURCE_PATH:1:1)
user> (eval '[do (inc 1
d?
> Regular code forms (as returned by the reader) don't usually contain
> functions. When the compiler doesn't know how to evaluate some value it
> treats it as a constant. Constants are serialized in the class and read
> back/instanciated when the class is loaded.
>
&g
gen.invokeStatic(RT_TYPE, Method.getMethod("clojure.lang.Var
> var(String,String)"));
> }
>
> Christophe
>
>
>
> On Thu, Aug 8, 2013 at 4:44 PM, Jamie Brandon
> wrote:
>>
>> What if it isn't inside a constant?
>>
&
quot;foo")])
CompilerException java.lang.RuntimeException: Can't embed object in
code, maybe print-dup not defined: java.io.StringReader@7504a5ce,
compiling:(NO_SOURCE_PATH:1:1)
So I guess Fn and Var have print-dup methods defined. I still don't
understand why print-dup is used at all though.
On 8 August 2
lize the constant.
> # is unreadable while #'user/x is that explains teh
> difference in behaviour.
>
>
> On Thu, Aug 8, 2013 at 3:40 PM, Jamie Brandon
> wrote:
>>
>> This has me stumped:
>>
>> user=> (with-local-vars [x nil] (eval x))
>> #
>
This has me stumped:
user=> (with-local-vars [x nil] (eval x))
#
user=> (with-local-vars [x nil] (eval [x]))
CompilerException java.lang.NullPointerException, compiling:(NO_SOURCE_PATH:1:1)
By comparison:
user=> (def x nil)
#'user/x
user=> (eval #'x)
#'user/x
user=> (eval [#'x])
[#'user/x]
--
(I fell afoul of the new gmail compose window)
Useful tools for writing gnome extensions in cljs:
https://github.com/jamii/lein-gnome
As a side effect, allows injecting a cljs repl into gnome-shell.
On 24 June 2013 23:02, Jamie Brandon wrote:
> Useful tools for writing gnome extensions
Useful tools for writing gnome extensions in cljs:
--
--
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 posts from new members are moderated - please be patient with your
first po
Last week I figured out how to add fair conjunction and a parallel
solver (via fork-join) to core.logic. I just wrote up an explanation
of how it works which may be interesting:
http://scattered-thoughts.net/blog/2012/12/19/search-trees-and-core-dot-logic/
https://github.com/jamii/core.logic/tree
A2. (instance? clojure.lang.IRecord (Foo.))
On 12 December 2012 14:53, Andy Fingerhut wrote:
> I haven't dug into the details, but this Clojure ticket looks like it might
> be related, if not the same issue:
>
> http://dev.clojure.org/jira/browse/CLJ-1105
>
> It has been vetted by Stuart Hallowa
Concerto extends nrepl (and nrepl.el) with a broadcast mechanism so
that multiple users can colloborate within a single repl.
Just an experiment, I'm curious to see whether anyone has a use for
this. My eventual goal is to use it for collaborative ovetone sessions
but for now I have to get back to
Ok, clearly I've not been keeping up, sorry :)
On 24 October 2012 18:17, David Nolen wrote:
> On Wed, Oct 24, 2012 at 6:07 PM, Jamie Brandon
> wrote:
>>
>> It sounds like something that would benefit from good constraint
>> propagation. If I remember corre
It sounds like something that would benefit from good constraint
propagation. If I remember correctly, core.logic only support
propagating equality/inequality constraints which can be pretty slow
for exploring large domains. Something like gecode
(http://www.gecode.org) might be a better fit if you
> Compared to core.logic
Oops, that should be core.match.
--
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 posts from new members are moderated - please be patient with your
can express eg context-free grammars.
I still have lot of work to do to make this production-ready but I
wanted to get some feedback before I start comitting to the current
design.
Jamie
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To po
", :value "1.53"}
;; {:target "1.61", :date "2012-06-05", :value "1.57"}
;; {:target "1.61", :date "2012-06-11", :value "1.60"}
;; {:target "1.61", :date "2012-06-15", :value "1.60"}
;; {:tar
s that use them together. Hopefully soon.
Thanks for all of your work here.
--Jamie
--
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 posts from new members are moderated - pl
q]
"A clojure.core.logic relation backed by Lucene. Lucene query
generated by lucene-query based on the given map."
(fn [a]
(logic/to-stream
(map #(logic/unify a % q)
(lucene-query q a)
--Jamie
--
You received this message because you are subscribed to the Goo
I ran across this behaviour today:
shackles.examples=> (import '[clojure.lang Seqable])
clojure.lang.Seqable
shackles.examples=> (deftype Foo [] Seqable (seq [this] ()))
shackles.examples.Foo
shackles.examples=> (empty? (Foo.))
false
shackles.examples=> (deftype Bar [] Seqable (seq [this] nil))
sh
n the initial proposal -
https://gist.github.com/1910754
Cheers
Jamie
--
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 posts from new members are moderated - please be pa
many people out there using Clojure for HPC?
Jamie.
--
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 posts from new members are moderated - please be patient with your
matica/platforms/
Player runs on Linux and Mac OS X but not Solaris:
http://www.wolfram.com/solutions/interactivedeployment/compare.html
We use Mathematica primarily to generate production graphics.
--Jamie
--
You received this message because you are subscribed to the Google
Groups &q
rising to me just how solid this innovative platform is.
Outstanding work.
Thanks again to Rich and the other contributors.
--Jamie
--
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
Matlab or R, and we
don't need to.
That's it for now. We'll look for ways we can contribute.
Thanks again for the excellent system.
--Jamie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "
> 1. Not a good way to READ from a string,
(read (PushbackReader. (StringReader. my-string)))
> I've noticed functions can only refer to those previously defined, so you
> couldnt have 2 that depend on one another
This is because symbols are looked up at compile time. So what you can do is
(d
52 matches
Mail list logo