Re: Redubicle NIO

2012-10-18 Thread David Nolen
On Thu, Oct 18, 2012 at 7:15 PM, Herwig Hochleitner hhochleit...@gmail.comwrote: 2012/10/19 Bruno França dos Reis bfr...@gmail.com The reason why I wrote a macro instead of a function is because 'get' and 'duplicate' are not declared in any common superclass of the different buffers, so I

Re: UTF-8 behavior ClojureScript (vs. Clojure)

2012-10-19 Thread David Nolen
On Fri, Oct 19, 2012 at 4:52 AM, Henrik Mohr lupos...@gmail.com wrote: Still I hope someone can answer the question on why ClojureScript behaves differently from Clojure. Output from Clojure: user= (str ø) *ø* Output from ClojureScript: #_= (str ø) *\xF8* Output from node.js:

Re: Core.logic performance of looping over a list with tabling

2012-10-19 Thread David Nolen
On Fri, Oct 19, 2012 at 11:47 AM, Coen De Roover cdero...@vub.ac.be wrote: Hi David, What are your plans about the tables? I would side with the title of the issue rather than its description :) I don't have any current plans to further improve the performance of tabling. The only thing I

Re: Is there any reason to make different file extension (clj and cljs) for Clojure and ClojureScript?

2012-10-19 Thread David Nolen
On Fri, Oct 19, 2012 at 3:02 PM, Tamreen Khan histor...@gmail.com wrote: While Clojurescript aims to be close to Clojure, they're still different languages, with entirely different compilers. Much of the Clojure toolchain uses the extension to figure out how to compile a given file.

Re: Error when compiling the node.js example on the quick page.

2012-10-20 Thread David Nolen
On Sat, Oct 20, 2012 at 2:05 AM, Jiajian Huang analysis...@gmail.comwrote: I am trying clojurescript right now and when I compiling the node example on the quick page, an error happens. * temp : cat nodehello.cljs (ns nodehello) (defn -main [ args] (println (apply str (map [\ world

Re: CLJS: How can you find the version of clojurescript that you're running?

2012-10-21 Thread David Nolen
There is not. That would be useful. On Saturday, October 20, 2012, Frank Siebenlist wrote: When you have different versions of clojurescript in the dependencies of your main project, how do you ask the repl what version it is running with… is there any easy function/var that I overlooked?

Re: ANN: ClojureScript release 0.0-1513

2012-10-21 Thread David Nolen
Please isolate the commit by using the lein checkouts feature - you can use the ClojureScript repo directly then and use git bisect to determine the exact commit that broke your build. Thanks. On Sunday, October 21, 2012, Shantanu Kumar wrote: On Oct 20, 12:52 am, Stuart Sierra

Re: Bug in jayq clj-js function ?

2012-10-22 Thread David Nolen
On Mon, Oct 22, 2012 at 12:52 PM, Max Penet m...@qbits.cc wrote: This reminds me, maybe having something like this function, probably with its protocol in core would be nice. Thoughts? map-js in core? There's no good conversion for arbitrary keys. David -- You received this message because

Re: ANN: ClojureScript release 0.0-1513

2012-10-22 Thread David Nolen
On Mon, Oct 22, 2012 at 1:56 PM, Shantanu Kumar kumar.shant...@gmail.comwrote: On Oct 21, 11:21 pm, David Nolen dnolen.li...@gmail.com wrote: Please isolate the commit by using the lein checkouts feature - you can use the ClojureScript repo directly then and use git bisect to determine

Re: ANN: ClojureScript release 0.0-1513

2012-10-22 Thread David Nolen
On Mon, Oct 22, 2012 at 3:08 PM, Shantanu Kumar kumar.shant...@gmail.comwrote: 19afb31a52504293ba2182c584b1867917316662 Do you have top level lets in your code? (let [foo ...] (defn bar ...)) David -- You received this message because you are subscribed to the Google Groups Clojure

Re: ANN: ClojureScript release 0.0-1513

2012-10-22 Thread David Nolen
On Mon, Oct 22, 2012 at 3:20 PM, Shantanu Kumar kumar.shant...@gmail.comwrote: On Oct 23, 12:11 am, David Nolen dnolen.li...@gmail.com wrote: On Mon, Oct 22, 2012 at 3:08 PM, Shantanu Kumar kumar.shant...@gmail.comwrote: 19afb31a52504293ba2182c584b1867917316662 Do you have top

Re: immutable objects in js

2012-10-23 Thread David Nolen
On Tue, Oct 23, 2012 at 3:17 PM, Brian Craft craft.br...@gmail.com wrote: Does clojurescript have to do full copies on collection types to keep them immutable? Or is there some nice way to efficiently do immutable objects in js? ClojureScript now implements all of Clojure's persistent data

Re: CLJS: println stopped working (r1514) ?

2012-10-23 Thread David Nolen
On Tue, Oct 23, 2012 at 4:18 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Bump. Could someone please confirm that printing from the repl doesn't work anymore? Thanks, Frank. In what REPL? Works fine for me using the Rhino one via script/repljs David -- You received this

Re: CLJS: println stopped working (r1514) ?

2012-10-23 Thread David Nolen
On Tue, Oct 23, 2012 at 4:33 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Sorry - browser-repl- any browser. Ah. This is possible given some of the changes around printing. Help welcome on this one, a bit busy this week. David -- You received this message because you are

Re: CLJS: println stopped working (r1514) ?

2012-10-23 Thread David Nolen
A related ticket - http://dev.clojure.org/jira/browse/CLJS-404 if someone is interested. Would be grand if we could automate testing the browser REPL to avoid regressions like this. David On Tue, Oct 23, 2012 at 5:51 PM, Paul deGrandis paul.degran...@gmail.comwrote: Frank, Do you have an

Re: CLJS: println stopped working (r1514) ?

2012-10-23 Thread David Nolen
On Tue, Oct 23, 2012 at 6:47 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Thanks Paul. Just wanted a confirmation first that this printing from the browser repl doesn't work before opening a new issue. (too many versions and uncommitted changes on my mac - it's a pain trying to

Re: ANN: ClojureScript release 0.0-1513

2012-10-23 Thread David Nolen
On Mon, Oct 22, 2012 at 3:20 PM, Shantanu Kumar kumar.shant...@gmail.comwrote: On Oct 23, 12:11 am, David Nolen dnolen.li...@gmail.com wrote: On Mon, Oct 22, 2012 at 3:08 PM, Shantanu Kumar kumar.shant...@gmail.comwrote: 19afb31a52504293ba2182c584b1867917316662 Do you have top

Re: core.logic for constraint logic programming

2012-10-24 Thread David Nolen
On Wed, Oct 24, 2012 at 4:56 PM, nathanmarz nathan.m...@gmail.com wrote: I'm looking into rewriting Storm's resource scheduler using core.logic. I want to be able to say constraints like: 1. Topology A's slots should be = 10 and as close to 10 as possible (minimize the delta between assigned

Re: core.logic for constraint logic programming

2012-10-24 Thread David Nolen
On Wed, Oct 24, 2012 at 5:17 PM, nathanmarz nathan.m...@gmail.com wrote: Cool, thanks for the quick response. We'll be looking into this pretty soon. I ultimately want the logic engine itself being exposed to users so they can add their own company-specific constraints to resource scheduling

Re: core.logic for constraint logic programming

2012-10-24 Thread David Nolen
On Wed, Oct 24, 2012 at 5:35 PM, Andy Fingerhut andy.finger...@gmail.comwrote: Nathan: I don't know core.logic's capabilities, and I haven't looked at the kinds of constraints you describe in enough detail to say for sure, but my initial reaction is that linear/integer programming might be a

Re: core.logic for constraint logic programming

2012-10-24 Thread David Nolen
On Wed, Oct 24, 2012 at 6:07 PM, Jamie Brandon ja...@scattered-thoughts.net wrote: 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

Re: Generating permutations in core.logic

2012-10-25 Thread David Nolen
On Thu, Oct 25, 2012 at 3:10 PM, Jordan Lewis jordanthele...@gmail.comwrote: Hi, I'm new to core.logic and logic programming in general. I tried to write a small program to generate all permutations of any size for an input list with unique elements. To start, I hardcoded the input list to

Re: Generating permutations in core.logic

2012-10-25 Thread David Nolen
On Thu, Oct 25, 2012 at 3:27 PM, David Nolen dnolen.li...@gmail.com wrote: On Thu, Oct 25, 2012 at 3:10 PM, Jordan Lewis jordanthele...@gmail.comwrote: Hi, I'm new to core.logic and logic programming in general. I tried to write a small program to generate all permutations of any size

Re: Generating permutations in core.logic

2012-10-25 Thread David Nolen
On Thu, Oct 25, 2012 at 3:10 PM, Jordan Lewis jordanthele...@gmail.comwrote: (run 16 [q] (distincto q) (everyo #(membero % (range 3)) q)) ;; returns (() [0] [1] [2] (0 0) (0 1) (1 0) (0 2) (1 1) (2 0) (1 2) (2 1) (2 2) (0 0 0) (0 0 1) (0 1 0)), incorrect Ticket created for the distincto bug

Re: Generating permutations in core.logic

2012-10-25 Thread David Nolen
On Thu, Oct 25, 2012 at 3:10 PM, Jordan Lewis jordanthele...@gmail.comwrote: Hi, I'm new to core.logic and logic programming in general. I tried to write a small program to generate all permutations of any size for an input list with unique elements. To start, I hardcoded the input list to

Re: [core.logic] How to implement synthetic answers?

2012-10-26 Thread David Nolen
On Fri, Oct 26, 2012 at 4:16 AM, Tassilo Horn t...@gnu.org wrote: Any ideas and pointers how to implement that? I don't really see anyway to do this without the graph itself being a relational data structure. I haven't seen any data structure that fits that bill beyond lists (which of course

ANN: core.logic-0.8.0-beta2

2012-10-26 Thread David Nolen
Enhancements: - experimental support for Datomic - eqfd now supports - / Fixes: - distinctfd goal behaved badly if argument wasn't ground - LOGIC-62: distincto bug reveals much larger issues around how we look up constraints. because vars can be bound in any order and we use vars to map to

Re: Bug in CLJS compiler?

2012-10-27 Thread David Nolen
On Sat, Oct 27, 2012 at 8:19 AM, Tim tram...@gmail.com wrote: While playing around with a little test website I came across what, I believe to be a bug in the CLJS compiler. It seems like the generation of symbols for use in macros (e.g. var#) is broken when compiled into certain JavaScript

Re: core.logic and other types of solvers

2012-10-27 Thread David Nolen
On Sat, Oct 27, 2012 at 12:11 AM, Brandon Bloom snprbo...@gmail.com wrote: I'd suspect the specialized solvers provide performance and predictability tuned to their particular use cases. It's worth noting is that both components must provide interactive performance. I wonder if there is some

Re: CLJS: println stopped working (r1514) ?

2012-10-27 Thread David Nolen
On Tue, Oct 23, 2012 at 4:18 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Bump. Could someone please confirm that printing from the repl doesn't work anymore? Thanks, Frank. I just checked browser REPL on CLJS master - it works fine for me. David -- You received this message

Re: Bug in CLJS compiler?

2012-10-27 Thread David Nolen
On Sat, Oct 27, 2012 at 8:19 AM, Tim tram...@gmail.com wrote: While playing around with a little test website I came across what, I believe to be a bug in the CLJS compiler. It seems like the generation of symbols for use in macros (e.g. var#) is broken when compiled into certain JavaScript

Re: [core.logic] Detecting overlapping FDs

2012-10-30 Thread David Nolen
On Tue, Oct 30, 2012 at 1:11 PM, Anthony Rosequist anthony.rosequ...@gmail.com wrote: I'm playing around with core.logic, and have this code so far: https://gist.github.com/3981557 There are 2 people and 3 tasks. Each task has a start time (you can't start the task until this time or

Re: [core.logic] Detecting overlapping FDs

2012-10-30 Thread David Nolen
On Tue, Oct 30, 2012 at 1:11 PM, Anthony Rosequist anthony.rosequ...@gmail.com wrote: I'm playing around with core.logic, and have this code so far: https://gist.github.com/3981557 It might help to understand exactly what kind of output were you expecting. David -- You received this

Re: [core.logic] Detecting overlapping FDs

2012-10-30 Thread David Nolen
On Tue, Oct 30, 2012 at 8:58 PM, Anthony Rosequist anthony.rosequ...@gmail.com wrote: (conde [(!= person1 person2)] [(=fd start2 start1) (=fd end2 start1)] [(=fd end1 start2) (=fd end1 end2)]) Here's a version that at least guarantees that people aren't appearing in the task list

Re: [core.logic] Detecting overlapping FDs

2012-10-31 Thread David Nolen
On Wed, Oct 31, 2012 at 12:00 AM, Anthony Rosequist anthony.rosequ...@gmail.com wrote: I updated my gist with a solution that's working: https://gist.github.com/3981557 Unfortunately, I had to copy my conde expression 3 times (to cover all combinations of the three tasks). So, what I

Re: ANN Typed Clojure 0.1.1

2012-11-02 Thread David Nolen
Typed Clojure Hackathon at the Conj?! ;) David On Fri, Nov 2, 2012 at 12:43 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Also, if you'd like to contribute to Typed Clojure, there are a lot of small, fun jobs around.

Re: How to call javascript's call/apply to set context/scope with this from clojurescript?

2012-11-06 Thread David Nolen
You could do: (.call f context ...) On Tue, Nov 6, 2012 at 5:33 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: In Javascript you seem to be able to set the context for this to any fn-object by specifying your desired context's this in the call/apply call. (never knew about this

Re: Where did the idea of metadata come from?

2012-11-13 Thread David Nolen
Macros. Metadata is a perfect way to annotate symbols that need to be processed in some specific way or to provide extra information when debugging. Many serious macros I've written use metadata on forms symbols. David On Mon, Nov 12, 2012 at 11:55 PM, Takahiro Hozumi

Re: core.match - how to simplify patterns with repeated guards

2012-11-14 Thread David Nolen
There's no way to make that work currently. Whether it should work requires some discussion but at the moment I'm inclined to say no. On Wednesday, November 14, 2012, David Jagoe wrote: Hi all, I have a core.match pattern that looks something like this: (def !nil? (complement nil?))

Re: core.logic matche with maps

2012-11-16 Thread David Nolen
On Thu, Nov 15, 2012 at 9:53 AM, MHOOO thomas.karol...@gmail.com wrote: Hello everybody, recently I was using the following pattern a lot, in order to get access to a value inside a map: (defn map-geto* [m k v] (matche [m] ([[[k v] . _]]) ([[_ . tail]]

Re: Clojurescript question

2012-11-17 Thread David Nolen
What is the error under simple optimizations? Errors under advanced optimizations are not particularly informative :) Thanks On Saturday, November 17, 2012, Paul Gearon wrote: Looking at the Clojurescript page on Github I can't find the appropriate place to ask about potential bugs unless

Re: proposal to exclude some cljs source from being compiled

2012-11-20 Thread David Nolen
If someone creates a patch for this I'll happily apply it. On Tue, Nov 20, 2012 at 7:29 AM, Giacomo Cosenza mimmo.cose...@gmail.comwrote: Hi all, I'd like to add a new feature to both cljsbuild and clojurescript to allow the exclusion of some cljs source from being compiled. the motivation

Re: proposal to exclude some cljs source from being compiled

2012-11-20 Thread David Nolen
Great. Be sure to send your CA if you haven't already. This should be a fairly simple patch to closure.clj. David On Tue, Nov 20, 2012 at 11:20 AM, Giacomo Cosenza mimmo.cose...@gmail.comwrote: Hi David, I'll work on it next days. Thanks mimmo On Nov 20, 2012, at 5:06 PM, David Nolen

Re: More ClojureScript questions....

2012-11-20 Thread David Nolen
connectOptions ) (fn [] (js/console.log failure Connect))) If you need any more info please let me know. Thomas On Tuesday, November 20, 2012 4:07:12 PM UTC, David Nolen wrote: What does your ClojureScript code look like? On Tue, Nov 20, 2012 at 5:47 AM, Thomas th.van...@gmail.com wrote: Hi

Re: Will the upcoming Clojure 1.5 stuff be available in Clojurescript too?

2012-11-20 Thread David Nolen
I think ClojureScript will be pretty closely tied to Clojure development for the foreseeable future. 1.5.0 has column data which is critical for accurate source mapping for example. Feature Expressions can't come soon enough, fingers crossed for 1.6.0. On Tue, Nov 20, 2012 at 1:39 PM, László

Re: core.logic and laziness...

2012-11-22 Thread David Nolen
core.logic has lazy-run. On Thursday, November 22, 2012, Jim foo.bar wrote: Hi all, this question may sound stupid but I've got to ask it given a fn like the one below, how would one make it lazy (assuming that it can be done)? also if it can, I'd like to make it fully-lazy (instead of

Re: Can I safely put that Clojure will Primarily remain a JVM language in the future as it is now?

2012-11-24 Thread David Nolen
ClojureScript dev is actively working towards Clojure sans JVM. On Saturday, November 24, 2012, Leon Adler wrote: Hi, JVM is known to be a robust, reliable and optimised platform for development and deployment. Rich Hicky's decision to develop Clojure on the JVM is fantastic, and it's

Re: Can I safely put that Clojure will Primarily remain a JVM language in the future as it is now?

2012-11-24 Thread David Nolen
Nope. On Saturday, November 24, 2012, Laurent PETIT wrote: You probably meant towards ClojureScript sans JVM ;-) 2012/11/25 David Nolen dnolen.li...@gmail.com javascript:;: ClojureScript dev is actively working towards Clojure sans JVM. On Saturday, November 24, 2012, Leon Adler wrote

Re: Can I safely put that Clojure will Primarily remain a JVM language in the future as it is now?

2012-11-24 Thread David Nolen
targetting the JVM without that being an implementation detail ? :-) 2012/11/25 David Nolen dnolen.li...@gmail.com: Nope. On Saturday, November 24, 2012, Laurent PETIT wrote: You probably meant towards ClojureScript sans JVM ;-) 2012/11/25 David Nolen dnolen.li...@gmail.com

Re: clojurescript: ex-info and ex-data

2012-11-25 Thread David Nolen
Agreed. Patches welcome! On Saturday, November 24, 2012, Dave Sann wrote: Is there a plan to add these? It seems like a step towards more generic exception handling between clj and cljs code. Dave -- You received this message because you are subscribed to the Google Groups Clojure

Re: Using a dynamic number of lvars in core.logic.

2012-11-26 Thread David Nolen
You can do something like the following: (run [q] (let [vars (repeatedly some-n lvar)] (all (== q vars functional programming FTW ;) David On Mon, Nov 26, 2012 at 10:22 AM, Frederik De Bleser frede...@burocrazy.com wrote: Using core.logic, I sometimes have the need to

Re: Using a dynamic number of lvars in core.logic.

2012-11-26 Thread David Nolen
`gensym` doesn't create logic vars, `lvar` does. Use `lvar` not `gensym`. David On Mon, Nov 26, 2012 at 12:48 PM, Frederik De Bleser frede...@burocrazy.com wrote: Hey David, I don't quite understand how I would apply your suggestion this with my example. 1. So the all function creates a

Re: cljs: extend-protocol to Keyword

2012-11-26 Thread David Nolen
keywords symbols as proper types is probably not far off and optimizing them doesn't need to wait for a general whole program optimization strategy. David On Mon, Nov 26, 2012 at 3:42 PM, Herwig Hochleitner hhochleit...@gmail.comwrote: Encoding Keywords as Strings is a performance

Re: cljs: extend-protocol to Keyword

2012-11-26 Thread David Nolen
will be obfuscated away). That's the basic sketch I have in mind. David On Mon, Nov 26, 2012 at 4:45 PM, Herwig Hochleitner hhochleit...@gmail.comwrote: 2012/11/26 David Nolen dnolen.li...@gmail.com keywords symbols as proper types is probably not far off and optimizing them doesn't need to wait

Re: cljs: dynamic/reflective calls

2012-11-26 Thread David Nolen
You can use `aget` for that. (aget object someProperty) David On Mon, Nov 26, 2012 at 5:00 PM, Krukow karl.kru...@gmail.com wrote: Continuing my exploration of ClojureScript.. I'm writing a small query language. The syntax consists of data structures like [:button {:name Login}] In

Re: Promise for ClojureScript?

2012-11-26 Thread David Nolen
Another interesting approach would be real compiler support for promises so we can get something closer to Clojure JVM semantics. This would require someone to get a bit more serious about the CLJS AST and related infrastructure for pluggable passes. David On Mon, Nov 26, 2012 at 6:51 PM, Frank

Re: Clojure/ClojureScript Spotting

2012-11-26 Thread David Nolen
WOW! Awesome :) David On Mon, Nov 26, 2012 at 8:58 PM, Baishampayan Ghose b.gh...@gmail.comwrote: Hi, I was checking out the new GoPanda2 client for IGS (Internet Go Server) and I was pleasantly surprised to discover that the app is actually written in Clojure ClojureScript -

Re: Clojurescript tests not including non-test source-path

2012-11-27 Thread David Nolen
I think you need to make sure that the cljs files are also on the Lein 2 :source-paths David On Tue, Nov 27, 2012 at 12:50 PM, Sean Grove s...@cloudfuji.com wrote: I've been trying to create a simple project with CLJS source and CLJS tests using lein-cljsbuild 0.2.9, but it doesn't seem to

Re: Clojurescript tests not including non-test source-path

2012-11-27 Thread David Nolen
-profile :as zup])) Any other ideas? On Tue, Nov 27, 2012 at 11:24 AM, David Nolen dnolen.li...@gmail.comjavascript:; wrote: I think you need to make sure that the cljs files are also on the Lein 2 :source-paths David On Tue, Nov 27, 2012 at 12:50 PM, Sean Grove s

Re: [cljs] Implement transport for a REPL

2012-11-27 Thread David Nolen
It's definitely possible. I've been to meaning to merge some experimental work I've done creating a Node.js ClojureScript REPL in hopes that some one would be willing to take it further. David On Tue, Nov 27, 2012 at 4:22 PM, Krukow karl.kru...@gmail.com wrote: Hi, I have a special

Re: [cljs] Implement transport for a REPL

2012-11-27 Thread David Nolen
. On Nov 27, 2012, at 1:32 PM, David Nolen dnolen.li...@gmail.com wrote: It's definitely possible. I've been to meaning to merge some experimental work I've done creating a Node.js ClojureScript REPL in hopes that some one would be willing to take it further. David On Tue, Nov 27

Re: Using a dynamic number of lvars in core.logic.

2012-11-27 Thread David Nolen
Yep infd's api is a bit annoying - I'd like to change it to match distinctfd. David On Tue, Nov 27, 2012 at 5:57 PM, Frederik De Bleser frede...@burocrazy.comwrote: I had some trouble because all goals need to take in the list of lvars. `infd` doesn't take in a list, but your sudoku blog

Re: CLJS: UUID generator for ClojureScript

2012-11-29 Thread David Nolen
closures inside the body of a function are not free in JS. I would lift those helpers out. In general I see no benefit to writing your fast code in JS - all the facilities for writing efficient code are available in ClojureScript itself. I agree that it's not completely clear what subset of

Re: CLJS: UUID generator for ClojureScript

2012-11-29 Thread David Nolen
Oh though before you lift them out by hand - I would double check that :simple optimizations doesn't already do this for you :) On Thu, Nov 29, 2012 at 1:25 AM, Frank Siebenlist frank.siebenl...@gmail.com wrote: I need UUIDs in my CLJS code… cljs.core does include a UUID type, but no

Re: CLJS: UUID generator for ClojureScript

2012-11-29 Thread David Nolen
at the repl without any optimization so far… -FS. On Nov 29, 2012, at 8:36 AM, David Nolen dnolen.li...@gmail.com wrote: Oh though before you lift them out by hand - I would double check that :simple optimizations doesn't already do this for you :) On Thu, Nov 29, 2012 at 1:25 AM, Frank

Re: [ANN] ClojureScript release 0.0-1535 with G.Closure 0.0-2029

2012-11-30 Thread David Nolen
Can we move forward on this? Option 1 seems best to me. That said what's the compelling reason these days for lein-cljsbuild to depend on a specific version of ClojureScript? Are you relying on certain aspects of the analyzer or compiler's API and find that they change quite frequently? On Fri,

Re: math expression simplifier, kibit implementation

2012-12-02 Thread David Nolen
On Sat, Dec 1, 2012 at 12:24 AM, Jonas jonas.enl...@gmail.com wrote: * Predicates on logic vars: [(foo (? x number?)) (bar ?x)] = match (foo 42) but not (foo :bar) This is now possible since we have constraints. * Segment vars: [(* ??x 1 ??y) (* ??x ??y)] = (* 4 3 2 1 2 3 4)

Re: math expression simplifier, kibit implementation

2012-12-02 Thread David Nolen
On Sun, Dec 2, 2012 at 1:42 PM, Jonas jonas.enl...@gmail.com wrote: On Sunday, December 2, 2012 7:33:17 PM UTC+2, David Nolen wrote: On Sat, Dec 1, 2012 at 12:24 AM, Jonas jonas@gmail.com wrote: * Predicates on logic vars: [(foo (? x number?)) (bar ?x)] = match (foo 42

Re: [ANN] ClojureScript release 0.0-1535 with G.Closure 0.0-2029

2012-12-02 Thread David Nolen
On Sun, Dec 2, 2012 at 2:11 AM, Evan Mezeske emeze...@gmail.com wrote: That said what's the compelling reason these days for lein-cljsbuild to depend on a specific version of ClojureScript? Are you relying on certain aspects of the analyzer or compiler's API and find that they change quite

Re: clojurescript browser repl possible regression

2012-12-03 Thread David Nolen
Don't call your file repl.* this has special meaning - it's the file that's meant to be loaded into the cross page iframe. On Monday, December 3, 2012, Brent Millare wrote: I've already tried both ways. Creating the html file with the script tag with the simple code you showed, and just simply

Re: clojurescript browser repl possible regression

2012-12-03 Thread David Nolen
view.html. repl is the name of the response from the call (repl/connect http://localhost:9000/repl;) On Monday, December 3, 2012 3:29:13 PM UTC-5, David Nolen wrote: Don't call your file repl.* this has special meaning - it's the file that's meant to be loaded into the cross page iframe

Re: clojurescript browser repl possible regression

2012-12-03 Thread David Nolen
[] (clojure.browser.repl/connect http://localhost:9000/repl;)) hence, the url is like file:///home/.../out/view.html Again only the error message says repl:3 On Monday, December 3, 2012 4:29:43 PM UTC-5, David Nolen wrote: It sounds like you are trying to navigate to http://localhost:9000/replthough

Re: clojurescript browser repl possible regression

2012-12-03 Thread David Nolen
the call to connect works. On Monday, December 3, 2012 6:22:24 PM UTC-5, David Nolen wrote: file:// urls don't work anymore due to changes in the Google Closure Library. You need to point your browser to http://localhost:9000/, by default it looks for index.html. David -- You received

Re: clojurescript browser repl possible regression

2012-12-04 Thread David Nolen
/bmillare/dj/usr/src/minimal/clojurescript/lib/goog.jar!/goog/net/xpc/nativemessagingtransport.js line 26 : 0 On Monday, December 3, 2012 7:50:11 PM UTC-5, David Nolen wrote: Please create a minimal project that demonstrates the issue for you, then we can try to run that. On Tue, Dec 4, 2012 at 12

Re: [lein-cljsbuild] exclude a cljs from compilation

2012-12-07 Thread David Nolen
I chimed in on the patch. Taking Brenton's approach sounds like it would be significantly simpler and require a very small patch to lein-cljsbuild. On Fri, Dec 7, 2012 at 1:24 PM, Mimmo Cosenza mimmo.cose...@gmail.comwrote: Hi Evan, Brenton Ashworth said that this kind of options should not

Re: A Practical Optional Type System for Clojure - Final Honours Dissertation

2012-12-07 Thread David Nolen
Congrats! :) David On Fri, Dec 7, 2012 at 7:33 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi everyone, Very pleased to have handed in my final honours dissertation today. Thanks to all that submitted corrections and offered encouragement.

Re: core.logic vs. Prolog

2012-12-10 Thread David Nolen
core.logic is still pretty young - some (many?) Prolog niceties may not be present. Don't know until you try ;) On Tue, Dec 11, 2012 at 12:29 AM, JvJ kfjwhee...@gmail.com wrote: I have some code that uses Prolog, but I want to get rid of the native dependencies inherent in SWI Prolog/JPL.

Re: core.logic vs. Prolog

2012-12-11 Thread David Nolen
and it will be considered. David On Tue, Dec 11, 2012 at 1:56 PM, JvJ kfjwhee...@gmail.com wrote: Is there a list of features that you'd like to implement that core.logic doesn't have yet? On Tuesday, 11 December 2012 00:52:24 UTC-5, David Nolen wrote: core.logic is still pretty young

Re: core.logic vs. Prolog

2012-12-11 Thread David Nolen
Oh and of course AND and OR parallelism. On Tue, Dec 11, 2012 at 5:44 PM, David Nolen dnolen.li...@gmail.com wrote: There's not a list of features so much as a list of improvements I would like to make. Some medium to big project ideas: - CLP(Set) - Improvements to tabling (currently a lot

Re: Countdown numbers game in clojure.core.logic

2012-12-14 Thread David Nolen
Looks nice and short to me. Again I don't have the time to ponder optimizations so I'm curious myself how it could be made faster. David On Thu, Dec 13, 2012 at 9:22 PM, Adam Clements adam.cleme...@gmail.comwrote: Hi, so I chose this problem as my first foray into core.logic too My solution

Re: How am I using partial-map wrong in core.logic?

2012-12-14 Thread David Nolen
Yeah that's not how partial maps work are intended to be used, though it's not very clear - Philip Potter actually brought up a good criticism of the behavior of partial maps at ClojureX in London when I gave a quick demonstration - you lose transitivity. I'm inclined to push the functionality of

Re: How am I using partial-map wrong in core.logic?

2012-12-14 Thread David Nolen
Oh to answer your question - expecting two separate unifications to change a var defeats the spirit of logic programming - you're back to something stateful. That said the framework is probably laid well enough to implement CLP(Map). I don't have any time to do such a thing but I can explain how

Re: defrecord and overriding empty

2012-12-15 Thread David Nolen
, September 27, 2011 1:06:37 PM UTC-5, David Nolen wrote: On Tue, Sep 27, 2011 at 1:54 PM, Nathan Sorenson nd...@sfu.ca wrote: Should IPersistentCollection even be defining 'empty', if one of the language's key data types doesn't support it? I think it would be better to either pull 'empty

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread David Nolen
I don't think you can type hint a field as a primitive array. On Tuesday, December 18, 2012, Vladimir Matveev wrote: Hello, Consider the following code (gen-interface :name IntStack :methods [[stackPeek [] int] [stackPush [int] void] [stackPop [] int]

Re: core.logic - explaining transitive relationships

2012-12-18 Thread David Nolen
On Tuesday, 18 December 2012 15:52:47 UTC, David Nolen wrote: There is no general explain functionality. However the following simple solution should give you some ideas: (defrel is-a Entity Parent) (fact is-a :pitbull :dog) (fact is-a :dog :mammal) (fact is-a :mammal :chordate) (fact

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread David Nolen
considered primitive then I actually can hint the fields to be primitive arrays. Nonetheless, it does not look like that problem is in the field array: wrapping aget form with (int) does not help. вторник, 18 декабря 2012 г., 17:46:14 UTC+4 пользователь David Nolen написал: I don't think you can

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread David Nolen
of an error in the compiler... вторник, 18 декабря 2012 г., 23:18:28 UTC+4 пользователь David Nolen написал: Oops, looking over gvec.clj it looks like I'm wrong about type-hinting fields. However you may need to type-hint the primitive array with a string instead of the symbol shorthand

Re: Will the JVM will always likely, remain the primary Clojure implementation ?

2012-12-28 Thread David Nolen
On Fri, Dec 28, 2012 at 4:08 PM, Marko Topolnik marko.topol...@gmail.comwrote: If you had any optimized code relying on primitives/arrays, you'd probably be looking at a full rewrite to whatever gives performance on the new platform (this takes a lot of time and experience with the platform).

Re: Core.logic performance of looping over a list with tabling

2012-12-28 Thread David Nolen
behavior return it will need to come after an overhaul of the `defrel` related features. On Fri, Oct 19, 2012 at 11:47 AM, Coen De Roover cdero...@vub.ac.be wrote: On 17 Oct 2012, at 19:31, David Nolen dnolen.li...@gmail.com wrote: On Mon, Oct 8, 2012 at 10:00 AM, Reinout Stevens reste

Re: cljs-clj interop

2012-12-29 Thread David Nolen
I think you've just formatted your code incorrectly. Did you try something like this? (extend-type js/Packages.clojure.lang.IFn IFn (-invoke ([this] (.invoke this)) ([this a] (.invoke this a))) ) On Sat, Dec 29, 2012 at 8:22 PM, Stuart Campbell stu...@harto.org wrote: Hi all,

Re: Trouble calling Dojo grid constructor from ClojureScript

2012-12-29 Thread David Nolen
Yes this is known problem w/ ClojureScript that could be solved if/when we get proper Keywords/Symbol types. David On Sat, Dec 29, 2012 at 8:46 PM, Patrick Logan patrickdlo...@gmail.comwrote: From what I can tell, dojo is testing an argument to see whether it has a method named call. dojo

ANN: core.logic 0.8.0-beta5, Hello CLP(Nom)!

2013-01-01 Thread David Nolen
Hot on the heels of beta4, we have beta5. It fixes an annoying bug around the `=fd` constraint discovered by Gary Fredericks. However the biggest change is the inclusion of an entirely new constraint domain - Nominal Abstract Syntax. This exciting addition is thanks to the awesome work of Nada

Re: [core.logic] Performance issues

2013-01-05 Thread David Nolen
On Sat, Jan 5, 2013 at 4:38 AM, Timo Westkämper timo.westkam...@mysema.comwrote: Hi. I have some performance issues with a type inference I wrote in core.logic. Here is the source code https://github.com/timowest/symbol/blob/master/src/symbol/types.clj That's a neat bit of core.logic you

Re: [core.logic] Performance issues

2013-01-05 Thread David Nolen
On Sat, Jan 5, 2013 at 1:49 PM, Timo Westkämper timo.westkam...@mysema.comwrote: Are there or will there be goals to do this in core.logic? Having direct support for maps would be great. It's something I've been thinking about for a long time. So it's likely it will appear at some point, I'm

Re: [core.logic] Performance issues

2013-01-05 Thread David Nolen
On Sat, Jan 5, 2013 at 2:44 PM, Timo Westkämper timo.westkam...@mysema.comwrote: Here is one example (def l (range 0 2000)) (run* [q] (appendo l l q)) One my machine this works without a hitch. What version of core.logic are you using? [org.clojure/core.logic 0.8.0-beta4] I cannot

Re: [core.logic] Performance issues

2013-01-05 Thread David Nolen
Thanks for the report, will look into it - http://dev.clojure.org/jira/browse/LOGIC-99 On Sat, Jan 5, 2013 at 3:39 PM, Timo Westkämper timo.westkam...@mysema.comwrote: user= (def l (range 0 2000)) #'user/l user= (run* [q] (appendo l l q)) StackOverflowError clojure.core.logic.LVar

Re: [core.logic] Performance issues

2013-01-05 Thread David Nolen
On Sat, Jan 5, 2013 at 1:49 PM, Timo Westkämper timo.westkam...@mysema.comwrote: Are there or will there be goals to do this in core.logic? Having direct support for maps would be great. Here's a brain dump of how I think it should / could work:

Re: what is js/ in clojurescript?

2013-01-07 Thread David Nolen
Yes a warning would be great as well as fixing the examples. Ticket patch welcome. On Monday, January 7, 2013, Peter Taoussanis wrote: I would not rely on this behavior. Follow Clojure's property access conventions. Sorry to dig this up again - would just like to clarify: The idiomatic

ANN: core.logic 0.8.0-rc1

2013-01-07 Thread David Nolen
If you are still using core.logic 0.7.5 now's a good time to try the latest :) From 0.8.0-beta5 to 0.8.0-rc1 Enhancements * Add `seqc` constraint, this is preferred over `listo` as found in TRS Bux Fixes * LOGIC-100: undiscard diseqality constraints * LOGIC-101: fix suprising

Re: core.logic: datomic unification

2013-01-08 Thread David Nolen
The dispatching mechanism was more trouble than it was worth but we did lose some flexibility. Do you really need to unify Sequential or is unifying with a concrete type like PersistentVector work well enough for your use case? David On Tue, Jan 8, 2013 at 2:01 AM, Austin Haas

<    7   8   9   10   11   12   13   14   15   16   >