Re: what on earth is happening?

2013-02-28 Thread David Nolen
Your run protocol defines three arities, you do not implement all three. Did you try limiting the definition of the run protocol to the two arity case that you are actually implementing? On Thu, Feb 28, 2013 at 9:23 AM, Jim foo.bar jimpil1...@gmail.com wrote: I've got a project 1. I

Re: what on earth is happening?

2013-02-28 Thread David Nolen
On Thu, Feb 28, 2013 at 1:00 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: On 28/02/13 17:29, David Nolen wrote: Your run protocol defines three arities, you do not implement all three. what's wrong with that? protocols, unlike interfaces let you do that... It's not my understanding

Re: what on earth is happening?

2013-02-28 Thread David Nolen
On Thu, Feb 28, 2013 at 1:16 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: not that I have any serious arguments agaisnt what you're saying but this sounds very limiting...where is the power then? what are the chances that you will be able to extend a particular protocol to many types

Moving ClojureScript to Clojure 1.5.0 data.json dependency

2013-03-01 Thread David Nolen
Now that Clojure 1.5.0 is out the door I'd like to make ClojureScript depend on it. This would allow me to merge in the source map branch which is a work in progress but far enough along that the critical bits are there and it would be nice to get community contributions towards wrapping it up.

Re: Moving ClojureScript to Clojure 1.5.0 data.json dependency

2013-03-12 Thread David Nolen
Great! On Tue, Mar 12, 2013 at 2:16 PM, Stuart Sierra the.stuart.sie...@gmail.comwrote: No issue from me. Just make sure you get the right version of data.json: 0.2.0 was a bad release. Use 0.2.1. -S On Friday, March 1, 2013 2:41:26 PM UTC-5, David Nolen wrote: Now that Clojure 1.5.0

ANN: core.logic 0.8.0-rc3

2013-03-13 Thread David Nolen
This is probably the last version before I cut 0.8.0. If you're using core.logic please try this out. There are a couple of bugs that need squashing in JIRA but it's been nearly 8 months since the last release so I'd like to push this out now and address any issues with more incremental updates.

miniKanren / core.logic Google Group

2013-03-13 Thread David Nolen
William Byrd has started a new miniKanren / core.logic Google Group. Feel free to direct your relational and constraint logic programming queries there. It's fine to post on the Clojure lists of course especially if the inquiry / discussion is Clojure-centric, but I'm excited about the

Re: core.logic: Dividing the knowledge base

2013-03-14 Thread David Nolen
That's likely though pldb is so small I don't really think it would require much in the way of changes. On Thu, Mar 14, 2013 at 5:15 PM, JvJ kfjwhee...@gmail.com wrote: I'm not sure how else to go about contacting you about this, but I've found some problems in pldb. The system just doesn't

Re: clojurescript browser repl not working.

2013-03-14 Thread David Nolen
I'm not sure if lein-cljsbuild uses the latest release of ClojureScript - Evan would know. In general I think it's probably best to just specify the version of ClojureScript you want to use yourself to avoid any issues. On Thu, Mar 14, 2013 at 5:21 PM, Rohan Nicholls

Re: core.logic: Dividing the knowledge base

2013-03-14 Thread David Nolen
On Thu, Mar 14, 2013 at 7:18 PM, Norman Richards o...@nostacktrace.comwrote: PLDB was written against the current core.logic release. I have not yet started testing with the 0.8 pre releases, but judging from the recent core.logic announcement, now is probably a good time to start. :)

Re: core.logic : Fact assertion as a relational operator

2013-03-16 Thread David Nolen
Doesn't exist and I'm not that familiar with assert. Patch welcome of course. On Sat, Mar 16, 2013 at 5:24 PM, JvJ kfjwhee...@gmail.com wrote: I realize that it is possible to enter facts into the core.logic database with the facts function. However, I'm looking for something more like the

ANN: core.logic 0.8.0

2013-03-17 Thread David Nolen
I'm happy to announce the release of core.logic 0.8.0. There are far too changes, bug fixes, and enhancements to cover here. For the most part the miniKanren portion of core.logic has been left unchanged from the standpoint of the user. The biggest change is the inclusion of extensible constraint

Re: [ClojureScript] Re: Moving ClojureScript to Clojure 1.5.0 data.json dependency

2013-03-17 Thread David Nolen
Done! On Sun, Mar 17, 2013 at 4:49 PM, Darrick Wiebe d...@xnlogic.com wrote: On Friday, 1 March 2013 11:41:26 UTC-8, David Nolen wrote: Now that Clojure 1.5.0 is out the door I'd like to make ClojureScript depend on it. This would allow me to merge in the source map branch which is a work

Re: ANN: core.logic 0.8.0

2013-03-17 Thread David Nolen
/blob/master/CHANGES.md On Sun, Mar 17, 2013 at 2:50 PM, David Nolen dnolen.li...@gmail.com wrote: I'm happy to announce the release of core.logic 0.8.0. There are far too changes, bug fixes, and enhancements to cover here. For the most part the miniKanren portion of core.logic has been left

Re: Persistent Data Structures for Objective-C/LLVM

2013-03-28 Thread David Nolen
As far as I know the immutable Objective-C collections are not efficient to update and likely perform terrible in this respect to Clojure collections. On Thu, Mar 28, 2013 at 1:07 PM, Omer Iqbal momeriqb...@gmail.com wrote: Most foundation objective c data structures are immutable (NSArray,

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
You can express not member of list B with disequality. I could show you how to do this, but you'd probably learn more by giving it a try yourself ;) On Thu, Mar 28, 2013 at 2:47 PM, JvJ kfjwhee...@gmail.com wrote: In core.logic, how do the following: Give me everything that is a member of

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
negation is hard. This has come up several times. It may be possible to a better form of negation as failure via delays, but this not high on my current priority list. Patches to make it work are of course most welcome. On Thu, Mar 28, 2013 at 2:54 PM, JvJ kfjwhee...@gmail.com wrote: Thanks,

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
]]) (run* [q] (a q) (fresh [x] (b x) (!= q x))) (1 1 2 1 1 2 2 2 3 4 3 3 4 4) So what the heck is this all about? On Thursday, 28 March 2013 15:17:24 UTC-4, David Nolen wrote: negation is hard. This has come up several times. It may be possible to a better form of negation

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
) ) ( (== q 2) ) ( (== q 3) ) ( (== q 4) )) (conde ( (== x 3) ) ( (== x 4) ) ( (== x 5) ) ( (== x 6) )) (!= q x))) (1 1 1 2 1 2 2 2 3 4 3 3 4 4) On Thursday, 28 March 2013 15:44:01 UTC-4, David Nolen wrote: This won't work. Rewrite this example w/o using facts

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
March 2013 16:21:41 UTC-4, David Nolen wrote: My point here isn't to tickle your brain but point out that there's a bit of misunderstanding about how core.logic works and what facilities you should use to handle your problem. It should be clear soon enough that it will be very difficult

Re: core.logic : In one list but not in another

2013-03-28 Thread David Nolen
On Thu, Mar 28, 2013 at 5:01 PM, JvJ kfjwhee...@gmail.com wrote: (defn hates-drink [d] (is-drink d) (not-likes-drink d)) This is a common mistake. But consider that the following hardly makes any sense in Clojure either: (defn foo [a b] (+ a b) (- a b)) Clearly the addition

Re: How to use clojure.core.logic to generate strings?

2013-04-04 Thread David Nolen
str is a function not a goal/relation - it doesn't know how to deal with logic vars. If you want that to work you will need to project result first. But if you project result then order matters and the unification of query must come after the membero call. On Thu, Apr 4, 2013 at 9:25 AM, Adam

Re: How to use clojure.core.logic to generate strings?

2013-04-04 Thread David Nolen
There is currently no simple way to make a substring goal beyond manipulating strings as sequences which is not ideal. The constraint framework does make it possible, but that API is under change so you can't build things upon it reliably yet. So project is your best option for now. On Thu, Apr

Re: core.logic: Database context monad

2013-04-04 Thread David Nolen
Sounds interesting. I've seen nothing like this in the Prolog literature, but I may not have looked hard enough. Probably worth investigating, might turn up some other interesting ideas even if you can't make assertion/retraction relational. On Thu, Apr 4, 2013 at 9:21 PM, JvJ

Re: core.logic: Database context monad

2013-04-05 Thread David Nolen
bits and pieces about how goals work, but I'm not sure I totally understand the system. Do you know any good places to start with that? On Thursday, 4 April 2013 22:08:38 UTC-4, David Nolen wrote: Sounds interesting. I've seen nothing like this in the Prolog literature, but I may not have

Re: core.logic: Database context monad

2013-04-05 Thread David Nolen
Oops, thanks for the proper link! On Fri, Apr 5, 2013 at 10:28 AM, Rostislav Svoboda rostislav.svob...@gmail.com wrote: I found this http://gradworks.umi.com/3380156.pdf on http://www.cs.indiana.edu/~webyrd/ -- -- You received this message because you are subscribed to the Google Groups

Re: core.logic: Database context monad

2013-04-05 Thread David Nolen
I should clarify that only Chapter 3 is really relevant. The other chapters explain how tabling, disequality, and nominal logic work - but they are not essential. Also the version of miniKanren found in the dissertation is available here and I recommend running it in your favorite Scheme:

Re: core.logic: partial resolution

2013-04-05 Thread David Nolen
Your macro just produces more answers, it doesn't actually address the problem of divergence. I don't think it could be made to work nor any other approach. On Fri, Apr 5, 2013 at 4:24 PM, JvJ kfjwhee...@gmail.com wrote: Is there a way in core.logic to get something like the best possible

Re: Superset goal in clojure.core.logic?

2013-04-07 Thread David Nolen
I don't have much advice beyond looking at how people do this in Prolog. We're starting to look into CLP(Set) which will provide much better support for working with sets and doesn't rely on list encodings. On Sun, Apr 7, 2013 at 5:24 AM, Adam Saleh adamthecam...@gmail.com wrote: Hi, I am

Re: Clojure is in GSoC 2013!

2013-04-08 Thread David Nolen
WOOT! On Mon, Apr 8, 2013 at 9:33 PM, Daniel Solano Gómez cloj...@sattvik.comwrote: Hello, all, I am happy to report that Clojure has been accepted as a mentoring organization for Google Summer of Code 2013. Now is the time for sudents to start researching their projects and reaching out

Re: [GSOC 2013] core.match refactoring

2013-04-10 Thread David Nolen
anyone point me in the right direction to contacting David Nolen about refactoring/documenting core.match? I've done a bit of tinkering around with Erlang and it's gotten me intrigued with the implementation of pattern matching. I'm also looking over the papers mentioned in the repo, which

Re: [GSoC 2013] core.logic CLP(Prob)

2013-04-23 Thread David Nolen
On Tue, Apr 23, 2013 at 2:10 PM, Radosław Piliszek radzio.c...@gmail.comwrote: 1) Is this place the best to discuss this? Yes. 2) Are there some set goals that CLP(Prob) should achieve? (,,Basic support of CLP(Prob).'' does not express it too well! :-P ) This seems like a pretty

Re: [GSoC 2013] core.logic CLP(Prob)

2013-04-24 Thread David Nolen
a Clojure library to catch Church in terms of speed by the end of the summer, simply by emulating what they have done and letting pmap take care of the rest. -Zack On Wednesday, April 24, 2013 12:48:56 AM UTC+4, David Nolen wrote: On Tue, Apr 23, 2013 at 2:10 PM, Radosław Piliszek radzi

Re: [GSoC 2013] core.logic CLP(Prob)

2013-04-25 Thread David Nolen
On Thu, Apr 25, 2013 at 5:29 AM, Martin Forsgren martin.forsg...@gmail.comwrote: What are your thoughts on slpKanren? Could it be used as a base for probabilistic programming in core.logic? https://github.com/webyrd/slpKanren - Martin It's definitely worth taking a look at and assessing.

Re: Do functions never get inlined by jvm?

2013-04-25 Thread David Nolen
primitive hinted fns will get inlined. You can also play the same kinds of games that Clojure does with definterface+deftype and fns that declare :inline metadata. If you don't want to learn the subtleties of Clojure performance tuning then you can always write your performance critical bits in

Re: Do functions never get inlined by jvm?

2013-04-25 Thread David Nolen
msecs Elapsed time: 108.576746 msecs Elapsed time: 100.992193 msecs Elapsed time: 100.945511 msecs On Apr 25, 10:32 pm, David Nolen dnolen.li...@gmail.com wrote: primitive hinted fns will get inlined. You can also play the same kinds of games that Clojure does with definterface+deftype

Re: Do functions never get inlined by jvm?

2013-04-25 Thread David Nolen
Which is out of date. On Thu, Apr 25, 2013 at 12:47 PM, Alice dofflt...@gmail.com wrote: Found this blog post written by fogus: To provide this level of flexibility Clojure establishes a level of indirection. Specifically, all function lookups through a Var occur, at the lowest level,

Re: Do functions never get inlined by jvm?

2013-04-25 Thread David Nolen
(doc definline) On Thu, Apr 25, 2013 at 1:17 PM, Michael Klishin michael.s.klis...@gmail.com wrote: 2013/4/25 David Nolen dnolen.li...@gmail.com + :inline metadata Which is not documented anywhere and might as well not exist for regular Clojure users. -- MK http://github.com

Re: core.logic: Strange behaviour when using featurec with nested feature map (bug?).

2013-04-25 Thread David Nolen
Looks like a featurec bug, please file a ticket http://dev.clojure.org/jira/browse/LOGIC Thanks! David On Thu, Apr 25, 2013 at 5:53 PM, Martin Forsgren martin.forsg...@gmail.comwrote: Hi! I noticed something strange when using featurec with a nested feature map(I'm using core.logic

ANN: ClojureScript release 0.0-1798

2013-05-03 Thread David Nolen
artifact: http://search.maven.org/#artifactdetails%7Corg.clojure%7Cclojurescript%7C0.0-1798%7Cjar Git log: https://github.com/clojure/clojurescript/compare/r1586...r1798 Enhancements * Code size improvements, (.log js/console Hello world!) now generates ~100 LOC of pretty printed

Re: ANN: ClojureScript release 0.0-1798

2013-05-03 Thread David Nolen
Forgot to add CLJS now depends on Clojure 1.5.1 and data.json 0.2.2. On Friday, May 3, 2013, David Nolen wrote: artifact: http://search.maven.org/#artifactdetails%7Corg.clojure%7Cclojurescript%7C0.0-1798%7Cjar Git log: https://github.com/clojure/clojurescript/compare/r1586...r1798

Re: core.logic: Strange behaviour when using featurec with nested feature map (bug?).

2013-05-05 Thread David Nolen
Fixed in master, thanks for the report! On Thu, Apr 25, 2013 at 5:53 PM, Martin Forsgren martin.forsg...@gmail.comwrote: Hi! I noticed something strange when using featurec with a nested feature map(I'm using core.logic 0.8.3). This works as expected: (run* [x y] (featurec x {:a {:b

Re: [GSoC] Mentors: please review student proposals

2013-05-06 Thread David Nolen
Thanks for the reminder! On Mon, May 6, 2013 at 9:23 AM, Daniel Solano Gómez cloj...@sattvik.comwrote: Hello, all, This is just a quick reminder for mentors. Please sign up to be a mentor on Melange[1] with Clojure. Once you do so, please take a moment to review the proposal that have

Re: ANN: ClojureScript release 0.0-1798

2013-05-06 Thread David Nolen
Stuart Sierra just pushed out 0.0-1803 which fixes a regression around seq, get, reduce and extension to JavaScript natives pointed out by Kevin Lynagh. On Fri, May 3, 2013 at 6:14 PM, David Nolen dnolen.li...@gmail.com wrote: artifact: http://search.maven.org/#artifactdetails%7Corg.clojure

Re: Separating Out .cljs Content

2013-05-07 Thread David Nolen
I believe the ClojureScript compiler simply looks for all .cljs files on the specified compile path. I think maybe you could put your files in different directories so they don't all get concatenated together. You can one build specify one path, and another build specify both paths. Perhaps other

Re: Separating Out .cljs Content

2013-05-07 Thread David Nolen
correctly, the only way to not compile everything into a single file is to leave out the :optimization flag completely. If this is the case this should probably be considered a bug. I might be wrong though. Jonathan On Tue, May 7, 2013 at 5:49 PM, David Nolen dnolen.li...@gmail.comwrote: I

Re: Parallel code execution in ClojureScript?

2013-05-07 Thread David Nolen
It can probably be done with HTML 5 Workers in browsers that support it, On Tuesday, May 7, 2013, Ghassan Ayesh wrote: Hi: In Javascript language, and while the language is inherently functional, Javascript's *implementation* until now, does not support parallel code execution against

Re: Clojure/Script pr-str/read-string roundtrip differences

2013-05-09 Thread David Nolen
Patch welcome for 1. As far as 2 I myself see no way to make that work without considering a numerics overhaul. On Sun, Jan 6, 2013 at 7:13 PM, Thomas Heller th.hel...@gmail.com wrote: Hey, I'm writing a Clojure Webapp with a CLJS Frontend and expected to be able to cljs.reader/read-string

Re: Clojure/Script pr-str/read-string roundtrip differences

2013-05-09 Thread David Nolen
Heh didn't notice the date on the first post :) On Thu, May 9, 2013 at 8:29 PM, Thomas Heller i...@zilence.net wrote: Hey Brian, been a while since that Post, Issue #1 has been resolved for a while (see http://dev.clojure.org/jira/browse/CLJS-466) but I actually switched to using proper

Re: Clojure/Script pr-str/read-string roundtrip differences

2013-05-10 Thread David Nolen
I believe 0.0-1806 is the latest. On Fri, May 10, 2013 at 12:35 PM, Brian Jenkins bonky...@gmail.com wrote: Doh! I was running 0.0-1586 instead of 0.0-1798 Brian On Monday, January 7, 2013 1:13:30 AM UTC+1, Thomas Heller wrote: Hey, I'm writing a Clojure Webapp with a CLJS Frontend

Re: Quick question on protocols

2013-05-10 Thread David Nolen
It was my impression that extending to Object is handled as a special case - much like extend-type default in ClojureScript. On Fri, May 10, 2013 at 6:06 PM, Alan Malloy a...@malloys.org wrote: Even when the interface and class you've extended them to are related by inheritance? I thought the

Re: Untangling Compilation External Libs: Clojurescript - Javascript

2013-05-10 Thread David Nolen
to-array is not sufficient, use clj-js On Fri, May 10, 2013 at 8:58 PM, Timothy Washington twash...@gmail.comwrote: Hi all, I'm trying to suss out some problems I'm encountering when compiling Clojurescript, down to Javascript. I'm using i) a 3rd-party charting library (highcharts.com),

Re: Released lein-cljsbuild 0.3.1

2013-05-11 Thread David Nolen
Thanks! On Saturday, May 11, 2013, Evan Mezeske wrote: Nothing major in this release other than some bugfixes and bringing the default ClojureScript version up to date. Thanks to all contributors! Release notes: https://github.com/emezeske/lein-cljsbuild/blob/master/doc/RELEASE-NOTES.md

Re: [ANN] - purnam 0.0.9 (javascript.dot.notation language extensions for cljs)

2013-05-12 Thread David Nolen
It wasn't intentional that aset not be variadic, I'm surprised no one has ever opened a ticket for this. Fixed in master and it inlines into efficient javascript: (defn bad-code [obj val] (aset obj inner number 10) (aset val inner count (+ 10 (aget obj inner count))) On Sun, May 12, 2013

Re: Is there any particular reason for using this form?

2013-05-16 Thread David Nolen
It is necessary - integer literals default to primitive long and I'm not sure if = will inline if it doesn't have type information in scope. This bit of noise could probably be removed by improving type inference in the compiler. On Thu, May 16, 2013 at 3:09 PM, Pavel Prokopenko

Re: Is there any particular reason for using this form?

2013-05-16 Thread David Nolen
, Pavel Prokopenko pavel.a.prokope...@gmail.com wrote: Thanks, David! What about (.nth this i) vs (nth this i)? Is that also some optimization trick like direct object's method call vs reflection method call? On Thursday, May 16, 2013 10:34:16 PM UTC+3, David Nolen wrote: It is necessary

Re: Is there any particular reason for using this form?

2013-05-16 Thread David Nolen
On Thu, May 16, 2013 at 4:30 PM, David Nolen dnolen.li...@gmail.com wrote: .nth is a method call, nth is a function call. Another perf thing. In anycase if you're looking for examples of everyday Clojure it's best to look elsewhere :) fast Clojure tends to look a bit quirky and relies

Re: core.match

2013-05-16 Thread David Nolen
On Thu, May 16, 2013 at 11:35 PM, Mark Engelberg mark.engelb...@gmail.comwrote: core.match has been alpha for about two years. I've been itching to use it in real projects for a long time, but with the alpha status, I've been reluctant to trust that it has been vetted for correctness. What

core.logic: Negation As Failure

2013-05-17 Thread David Nolen
I've finally got around to adding a negation as failure operator `nafc` to core.logic. The constraint framework has allowed this to be done while avoided the many pitfalls you might encounter with this operator in Prolog. You can now write things like the following: (run* [q] (membero q '(:a :b

Re: ClojureScript: spurious warning about symbol not being a protocol

2013-05-21 Thread David Nolen
Looks like a bug, please open a ticket in JIRA with the example code. Thanks! David On Tue, May 21, 2013 at 1:16 AM, Praki praki.prak...@gmail.com wrote: Hi, For reasons I cant quite fathom, lein cljsbuild generates Symbol X is not a protocol warning. I am using clojure 1.5.1 and cljsbuild

Re: Has anyone here played with Wisp?

2013-05-25 Thread David Nolen
It's another interesting Lisp variant to JavaScript compiler but besides a surface like similarity, it doesn't really preserve many of Clojure's semantics (keyword behavior, data structures, immutability, notion of truth, protocols, multimethods, etc). David On Sat, May 25, 2013 at 1:59 AM,

Re: Knowledge derivation in core.logic?

2013-05-25 Thread David Nolen
I think Nada Amin has already done something like this with the nominal feature and at least her version was quite simple. Best to ask this question on the miniKanren/core.logic mailing list - http://groups.google.com/forum/#!forum/minikanren David On Sat, May 25, 2013 at 8:44 PM, Adam Saleh

Re: The Reasoned Schemer chpt 4: Please pass the aspirin

2013-05-25 Thread David Nolen
+1 On Sat, May 25, 2013 at 8:12 PM, Austin Haas aus...@pettomato.com wrote: Hi Brian, You should post your question to the miniKanren Google group. minikan...@googlegroups.com -austin -- Austin Haas Pet Tomato, Inc. http://pettomato.com On Sat May 25 10:21 , Brian Craft wrote:

Re: I don't feel the absence of a debugger, because I've learnt enough that I don't ever need a debugger.

2013-05-27 Thread David Nolen
Doesn't ritz support nrepl? http://github.com/pallet/ritz On Mon, May 27, 2013 at 5:53 PM, Mark Engelberg mark.engelb...@gmail.comwrote: I would be a lot happier with the state of Clojure debugging if, in addition to a stacktrace, I could easily explore the local variables in play when an

Re: GSOC Algebraic Expressions

2013-05-29 Thread David Nolen
A very cool of use of core.logic, look forward to seeing where it goes :) On Wed, May 29, 2013 at 11:10 AM, Maik Schünemann maikschuenem...@gmail.com wrote: Hello, I am glad to announce that my proposal got accepted for google summer of code. I am doing the algebraic expression project

Re: Core Logic Reference Documentation

2013-05-29 Thread David Nolen
A core.logic cheatsheet would be a fantastic resource. I'd also welcome help in generating the basic doc pages. On Wed, May 29, 2013 at 1:08 PM, Benjamin Peter benjaminpe...@arcor.dewrote: Hello, I am currently trying to find my way to using clojure core logic, watching some videos, reading

Re: Patching core.match

2013-05-29 Thread David Nolen
Good catch - please file a ticket here http://dev.clojure.org/jira/browse/MATCH. Please attach any work-in-progress patch you may have there and I'll review. Before I can apply any work you've done you need to send in your Contributor Agreement (CA) - http://clojure.org/contributing Thanks,

Re: Patching core.match

2013-05-29 Thread David Nolen
it when I've been added to the Clojure contributors. On Wed, May 29, 2013 at 12:36 PM, David Nolen dnolen.li...@gmail.comwrote: Good catch - please file a ticket here http://dev.clojure.org/jira/browse/MATCH. Please attach any work-in-progress patch you may have there and I'll review. Before I

Re: Future/Promise and not using threads

2013-05-30 Thread David Nolen
You might find this work in progress interesting then: http://github.com/clojure/core.async On Thu, May 30, 2013 at 3:46 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Paul, Thanks... but I want the opposite of delay. Basically, I do not want to consume a thread waiting for a

Re: core.match -- adding extractors?

2013-06-04 Thread David Nolen
I've looked at extractors a little bit, but I would need to investigate further. Does this offer any more power than supporting arbitrary function application in patterns? Also, I'm unlikely to dive into any feature addition related issues until all these pressing bugs in JIRA are squashed. On

Re: core.match -- adding extractors?

2013-06-04 Thread David Nolen
That said feel free to add an enhancement ticket. On Tue, Jun 4, 2013 at 5:12 PM, David Nolen dnolen.li...@gmail.com wrote: I've looked at extractors a little bit, but I would need to investigate further. Does this offer any more power than supporting arbitrary function application

Re: clojurescript 0.0-1820 release is percolating

2013-06-07 Thread David Nolen
Fixes: - * variadic aset * CLJS-513: fix out bound behavior for vectors * CLJS-515: emit positional factories for deftype * IReduce for primitive arrays and lists Changes: - * CLJS-499: ObjMap deprecated in favor of PersistentArrayMap Enhancements: - * Added

Re: David Nolen's logic programming readling list

2013-06-08 Thread David Nolen
I'll try to repost that list on my new blog, in the mean time: Art of Prolog Concepts Techniques and Models of Computer Programming Prolog Programming for Artificial Intelligence The Reasoned Schemer Are all all good starts. On Sat, Jun 8, 2013 at 9:27 AM, Craig Ching craigch...@gmail.com

Re: defrecord and namespace

2011-06-25 Thread David Nolen
On Sat, Jun 25, 2011 at 2:06 PM, Gregg Reynolds d...@mobileink.com wrote: (ns gae-lex.test.dataServiceTests (:use [gae-lex.core]) (:import (gae-lex.core.Author)) ...) (ns gae-lex.test.dataServiceTests (:use [gae-lex.core]) (:import [gae_lex.core Author]) ...) Should work. David

Re: Other way to express (((m2) 2) 1)?

2011-06-29 Thread David Nolen
On Wed, Jun 29, 2011 at 7:00 PM, Antonio Recio amdx6...@gmail.com wrote: (def m [1 2 [21 22 [221 222 223] 23] 3]) (((m 2) 2) 1) One my favorites. (get-in m [2 2 1]) David -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group,

Re: Other way to express (((m2) 2) 1)?

2011-06-29 Thread David Nolen
On Wed, Jun 29, 2011 at 8:54 PM, Dmitry Gutov raa...@gmail.com wrote: You can use 'reduce': (reduce nth m [2 2 1]) ;; or, for the general case (reduce #(%1 %2) m [2 2 1]) or (reduce get m [2 2 1]) -- You received this message because you are subscribed to the Google Groups Clojure

Re: Most concise way to determine that a sequence is consecutive integers starting with one?

2011-07-01 Thread David Nolen
On Fri, Jul 1, 2011 at 3:28 PM, .Bill Smith william.m.sm...@gmail.comwrote: I want a concise function that, given an arbitrary length sequence, determines whether the sequence is of consecutive integers starting with one. So: (f [1 2 3]) returns true (f [1 2 4]) returns false (f [0 1

Re: Most concise way to determine that a sequence is consecutive integers starting with one?

2011-07-01 Thread David Nolen
On Fri, Jul 1, 2011 at 4:04 PM, Chouser chou...@gmail.com wrote: (defn f [xs] (every? true? (map = xs (iterate inc 1 --Chouser Hrm, shoulda thought 'o that :) David -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Most concise way to determine that a sequence is consecutive integers starting with one?

2011-07-01 Thread David Nolen
On Fri, Jul 1, 2011 at 4:04 PM, Chouser chou...@gmail.com wrote: (defn f [xs] (every? true? (map = xs (iterate inc 1 --Chouser Also, (defn f [xs] (every? #{1} (map - xs (iterate inc 0 -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Please stand firm against Steve Yegge's yes language push

2011-07-02 Thread David Nolen
On Sat, Jul 2, 2011 at 4:05 AM, faenvie faen...@googlemail.com wrote: I agree, that clojure will not gain java-like popularity in a forseeable future. IMO clojure is much more a Language for SystemProgrammers (high demands, thinking in concurrency) than a Language for ApplicationProgrammers

Re: Please stand firm against Steve Yegge's yes language push

2011-07-02 Thread David Nolen
On Sat, Jul 2, 2011 at 12:23 PM, James Keats james.w.ke...@gmail.comwrote: I therefore see it most suited, as I said, for the advanced independent programmer, or at most a small team of advanced enough programmers. I think Clojure is great for programmers with all kinds of experience - from

Re: Please stand firm against Steve Yegge's yes language push

2011-07-02 Thread David Nolen
On Sat, Jul 2, 2011 at 3:21 PM, James Keats james.w.ke...@gmail.com wrote: And once you encounter the reality and frustration infamously characterized by likening the managing of lispers to the herding of cats then you begin to admire languages like python and java and see what they got right

Re: Please stand firm against Steve Yegge's yes language push

2011-07-02 Thread David Nolen
On Sat, Jul 2, 2011 at 4:19 PM, James Keats james.w.ke...@gmail.com wrote: Sure, good lisp programmers, I have no argument against that, the key operative word here being *good*; where do you find those in large enough numbers to fill industry positions? I would also like to be specific about

Re: Clojure for large programs

2011-07-05 Thread David Nolen
On Tue, Jul 5, 2011 at 12:59 PM, Ken Wesson kwess...@gmail.com wrote: On Tue, Jul 5, 2011 at 9:01 AM, Stuart Halloway stuart.hallo...@gmail.com wrote: In general, I have found that namespaces should be larger than my OO intuition would have them be. One problem with scaling up namespaces,

Re: Collaboration Proposal: Beyond CLOS Generic Methods, Predicate Dispatch, and Pattern Matching

2011-07-07 Thread David Nolen
, Heinz N. Gies he...@licenser.net wrote: On May 13, 2011, at 14:37 , David Nolen wrote: On Fri, May 13, 2011 at 2:04 AM, Heinz N. Gies he...@licenser.net wrote: Hearing Pattern Matching, do you mean Erlang like Pattern matching? Regards, Heinz Erlang, OCaml, SML, Haskell

Re: Confused about sequential definition

2011-07-07 Thread David Nolen
On Thu, Jul 7, 2011 at 5:14 PM, Ken Wesson kwess...@gmail.com wrote: (defn array? [x] (and x (contains? (set (.getName (.getClass x))) \[))) (defn seqable? [x] (or (coll? x) (nil? x) (instance? java.util.Collection x) (instance? java.util.Map x) (instance? java.util.Set

Re: Confused about sequential definition

2011-07-07 Thread David Nolen
On Thu, Jul 7, 2011 at 11:21 PM, Ken Wesson kwess...@gmail.com wrote: Interesting, but there is still going to be a performance issue for the perhaps-common case of testing a non-seqable for seqability: in that case, it will do the reflective check for isArray and it won't use the protocol to

Re: Confused about sequential definition

2011-07-07 Thread David Nolen
On Fri, Jul 8, 2011 at 1:00 AM, Ken Wesson kwess...@gmail.com wrote: On Thu, Jul 7, 2011 at 11:21 PM, Ken Wesson kwess...@gmail.com wrote: ... it won't use the protocol to cache the result. Making it do so, however, would cause problems if one had (seqable? some-foo) and later attempted

Re: Help on a Clojure performance question

2011-07-08 Thread David Nolen
Running a program like that with cake run is awful, use AOT: (ns clj-play.mapper (:use [clojure.java.io :only [reader]]) (:use [clojure.string :only [split]]) (:gen-class)) (defn mapper [lines] (doseq [line lines] (doseq [word (split line #\s+)] (println (str word \t1)

Re: Help on a Clojure performance question

2011-07-08 Thread David Nolen
are identical ~14.7-8s for 20 copies of the text so this looks like it's pretty much IO bound at this point. David On Fri, Jul 8, 2011 at 9:04 PM, David Nolen dnolen.li...@gmail.com wrote: Running a program like that with cake run is awful, use AOT: (ns clj-play.mapper (:use

Re: monads macros

2011-07-12 Thread David Nolen
On Tue, Jul 12, 2011 at 9:40 AM, James Keats james.w.ke...@gmail.comwrote: On Jul 12, 2:36 pm, Tamreen Khan histor...@gmail.com wrote: Are monads all that special? My understanding is that even in Haskell its wise to not use monads all that much, since it starts to make the code look a

Excellent intro to core.logic

2011-07-18 Thread David Nolen
I highly recommend checking this out if you're curious about core.logic, https://github.com/frenchy64/Logic-Starter/wiki David -- 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

Re: converting a string into a set

2011-07-18 Thread David Nolen
On Tue, Jul 19, 2011 at 12:48 AM, Tuba Lambanog tuba.lamba...@gmail.comwrote: Hi, I'm clear on what I want ;) (something new to me), but I'm not clear on how to get there. I'd like to compare str1 and str2, if at least one of the letters in str1 is in str2. I'm thinking that if I can convert

Re: Excellent intro to core.logic

2011-07-19 Thread David Nolen
On Tue, Jul 19, 2011 at 2:27 AM, Meikel Brandmeyer m...@kotka.de wrote: Hi Ambrose, I haven't been exposed to logic programming besides the examples David posted to the list. I found your tutorial very easy to follow and to read. I have two minor nit-picks. 1. I understand, that these

Re: Excellent intro to core.logic

2011-07-19 Thread David Nolen
On Tue, Jul 19, 2011 at 3:31 PM, Tassilo Horn tass...@member.fsf.orgwrote: David Nolen dnolen.li...@gmail.com writes: Hi David, I highly recommend checking this out if you're curious about core.logic, https://github.com/frenchy64/Logic-Starter/wiki I've just read it, and I think I've

Re: Excellent intro to core.logic

2011-07-20 Thread David Nolen
On Wed, Jul 20, 2011 at 3:45 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: On Wed, Jul 20, 2011 at 3:34 PM, Tassilo Horn tass...@member.fsf.orgwrote: Here's the relevant Jira issue, feel free to voice your opinion. http://dev.clojure.org/jira/browse/LOGIC-10 I had a

Re: Excellent intro to core.logic

2011-07-21 Thread David Nolen
On Thu, Jul 21, 2011 at 9:45 AM, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am Donnerstag, 21. Juli 2011 15:24:49 UTC+2 schrieb Ambrose Bonnaire-Sergeant: Ah, but is mapsto? a boolean predicate? :) Why should ? denote a boolean predicate? This is logic programming, not functional

Re: Excellent intro to core.logic

2011-07-21 Thread David Nolen
On Thu, Jul 21, 2011 at 10:27 AM, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am Donnerstag, 21. Juli 2011 16:06:23 UTC+2 schrieb Ambrose Bonnaire-Sergeant: You do not need to look at the surrounding code to know what (geto x y z) does. It establishes the geto relation between x y z. x

Re: Why is this code so slow?

2011-07-22 Thread David Nolen
(set! *warn-on-reflection* true) (set! *unchecked-math* true) (defn sk [^longs vs ^booleans ss] (fn ^long [^long k] (if (aget ss k) (aget vs k) (let [ans (if ( k 56) (- (mod (+ 13 (- (* k 23)) (* 37 k k k)) 100) 50)

Re: Alright, fess up, who's unhappy with clojurescript?

2011-07-24 Thread David Nolen
As a professional JavaScripter for the past 6 years who has built his own frameworks and written considerable amounts of Prototype, MooTools, and jQuery. I don't think jQuery is special or particularly interesting and most of the libraries around it are terrible IMO. It certainly doesn't help in

<    1   2   3   4   5   6   7   8   9   10   >