Let's say I want to write a function that takes as an argument a list
of n numbers, and returns 4 lists, a list of odd numbers that are
multiples of 5, a list of even numbers that are multiples of 5, a list
of odd numbers that are not multiples of 5, and a list of even numbers
that are not multiple
Lets say I have the following function
(defn fib[n]
(if (> n 2)
(+ (fib (- n 2)) (fib (- n 1)))
1))
and I want to memoize it, what is the right way to do it?
Using the default memoize does not work correctly. the reason is even
though the first call to fib is memoized, the recursive ca
obody would write
> > fib like that in practice : good general question, bad example)
>
> > HTH,
>
> > --
> > Laurent
>
> > 2010/7/22 Mike Meyer
>
> > On Wed, 21 Jul 2010 14:47:12 -0700 (PDT)
> >> logan wrote:
>
> >> > Lets s
paul what version did you use? your version was the first one I tried,
and on 1.2 at least it does not work.
Jules version works, except lambda should be fn in clojure.
On Jul 22, 4:51 pm, Paul Mooser wrote:
> Why not simply do:
>
> (defn fib [n]
> (println "called with " n)
> (if (> n 2)
>
I don't know if "ergo" is the right name to describe this project.
Most of the default emacs key-bindings are very ergonomic, assuming
you remap your ctrl to your caps lock. Most of the commands that you
use most frequently can be entered in with just your left hand, with
your little finger on the
I think Yegge clarified in a follow-up post that what he really meant
to say was "say yes to USERS", not "say yes to FEATURES", but in his
typical off-the-cuff ranty writing style, he had accidentally
conflated the two.
As far as saying yes to every feature, I think that is obviously not a
great i
I think it's probably too early to speculate, but does the clojure/
core team have any thoughts on how Google Dash might affect
ClojureScript? Given that ClojureScript currently compiles to Closure
Javascript, can we then compile that into Dash for performance
enhancements?
http://css.dzone.com/ne
Are there currently any plans to eventually replace PersistentVector?
Looking at the code, the upper limit for the number of elements that can be
stored in PersistentVector is 32^6, which is quite a lot but still might
become a real limitation in the near future.
--
You received this message
OWL has several levels of increasingly expressive but general inferences.
Much of the domain could be represented in OWL (classes (i.e. sets),
instances (i.e. set membership), relationships with domains and ranges,
etc.), but there would still be a need for the domain-specific inferences
descri
Apache Jena is another good choice for a graph database. It has the choice
of an in-memory database, memory-mapped file database (optionally with ACID
transactions), or mapped to a relational database. It can also run as a
separate database server. There is a procedural java API and the standard
On Monday, May 27, 2013 12:40:34 AM UTC-7, Phillip Lord wrote:
>
> Patrick Logan > writes:
> > OWL has several levels of increasingly expressive but general
> inferences.
> > Much of the domain could be represented in OWL (classes (i.e. sets),
> >
On Tuesday, May 28, 2013 2:51:51 AM UTC-7, Phillip Lord wrote:
>
>
> >
> > "Given a secret key and encrypted nonce for that key, assert the
> > unencrypted nonce."
> >
> > What I mean is that there is no way to express this in OWL alone. This
> > could be expressed in core.logic, in clojure,
On Tuesday, May 28, 2013 5:48:08 AM UTC-7, Phillip Lord wrote:
>
> One of the things that I am sort of interested in with tawny is whether
> there is any value to the overlap of Clojure and OWL in the same
> syntax. It would be, for example, possible to annotate a Clojure
> function with the O
Hi all .. I hope it is OK to post in here. I am looking for a number of
Java developers with clojure experience for an exciting start up in
Auckland. If you are interested to hear more then please email or call me -
cheers, Indiana
ilo...@globalattract.co.nz
09 903 0865
--
You received this m
You'll have to adopt some form of reference designator. JSON-LD defines these.
More domain specific, you could implement a subset of or borrow ideas from
EDIF, a standard Electronic Design Interchange Format, which happens to be
based on Lisp.
http://en.m.wikipedia.org/wiki/EDIF
--
You rece
Space is one thing, but I would assume the net list should be able to represent
sequential logic, which implies a cyclic graph.
--
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 po
how libraries are done, etc.. Also it appears to be mask-based, ie IC
> design; I'm trying to do something PCB level.I'll take a look at
> JSON-LD.
>
>
> On Sunday, August 10, 2014 6:37:01 PM UTC-7, Patrick Logan wrote:
>>
>> You'll have to adopt som
See inline...
On Monday, August 11, 2014 3:32:21 PM UTC-7, MS wrote:
>
> Actually there are several things going on.
> In general the database I'm trying to define would include not only the
> actual net list (ie a mapping between nets and pins), but also all the PCB
> junk that goes on.
>
> Th
The JVM on most platforms has good support for memory-mapped files.
--
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 y
predicates such as int?, string?, rational? etc to have noun or
adjective names, and collection predicates such as every? to have
determiners such as every, some, any as names.
Logan
On Wednesday, July 13, 2016 at 6:15:14 AM UTC-4, Tassilo Horn wrote:
>
> Alex Miller > writes:
&g
that operate on seqs instead of
many specialized data structures.
You don't gain much by storing the state in a closure unless you need to
guarantee that the user of your code can't access it, which with immutable
data structures isn't often necessary.
-Logan
On Saturday, Decem
Jozef,
You might be interested in the JSON-LD w3c standard which defines
representations for most of the items in your table using JSON. Primarily
missing are "discards" and direct ties to clojure/script functions and
macros.
JSON-LD has several implementations, a test suite, and support of s
Brilliant analysis.
--
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 post.
To unsubscribe from this group
w
> [2] http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/#dfn-iri
> [3] see section 'Decision 3' at
> http://manu.sporny.org/2014/json-ld-origins-2/
>
> Jozef
>
> On Saturday, May 31, 2014 5:32:55 PM UTC+2, Patrick Logan wrote:
>>
>> Brilliant analysis.
>
&
for one possible approach.
>
> Jozef
>
> On Sunday, June 1, 2014 2:18:00 AM UTC+2, Patrick Logan wrote:
>>
>> Now *that* is a pretty reasonable comparison. I would quibble here and
>> there: I don't find JSON-LD as heavy-weight as you; the benefit of
>>
It will work for 0 if you use `number` instead of `js/Number`. Generally
you shouldn't extend any js/* type
On Friday, June 6, 2014 9:57:38 AM UTC-7, Karsten Schmidt wrote:
>
> I'm trying to extend-protocol for numbers and various other types (incl.
> collections & nil) in CLJS, so have been doi
"Expansion Passing Style" is a similar mechanism described in
http://citeseerx.ist.psu.edu/viewdoc/summary;jsessionid=B1F3B3E99DE8FD3BD5CA489868730967?doi=10.1.1.50.4332
A number of interesting (and easy to implement) examples are in the paper,
including debugging tools. This is an easy way to g
I've posted a writeup of my experience from this year's Clojure/conj and
wanted to share with those who couldn't make it:
http://loganlinn.com/blog/2013/11/18/clojureconj-2013/
Big thanks to all who helped organize & operate the event!
--
--
You received this message because you are subscribe
This was great news to hear. Looking forward to it.
Talks will be presented in two tracks
Does this mean there will be two stages/presentations at a time?
On Thursday, January 9, 2014 8:01:13 PM UTC-8, Alex Miller wrote:
>
> At long last, we have finalized the plans for Clojure/West 2014!
>
>
"finds dates, and other data types, heuristically" -- I'm sure Google would
rather not, but that's life on the web.
Google also supports JSON-LD which is a W3 standard for semi-structured and
linked data. JSON-LD defines "in-band" syntax for dates, all XSD data
types, and arbitrary data types (
I've been working on a game in my spare time that does this.
The Clojure backend and ClojureScript client communicate with core.async
over WebSocket carrying edn data
Game: https://github.com/loganlinn/ji
Client WebSocket using: https://github.com/loganlinn/cljs-websockets-async
Server WebSocket
* one side of the channel is in clojure land
* other side of the channel is in cljs land
Are you implementing coordination across the wire, as if the two channels
are "the same virtual channel"? If so, read on... otherwise, n/m, sorry if
I misinterpreted...
CSP-like channels aren't a good a
are intended to coordinate concurrency within a single runtime.
Coordination is possible through the blocking semantics of CSP, but isn't
the only mechanism it provides. CSP also facilitates buffered, asynchronous
operations. I don't see why it would imply anything about a single runtim
In CSP you might have a limited size buffer, but then block on the next Put.
That's not something you want to casually attempt over a distance. It seems you
want an interface like Channels that deal in fully formed objects, but you
don't want CSP blocking semantics.
--
--
You received this me
This seems like more trouble than it is worth. There are almost certainly
suitable but more established protocols and implementations for the problem at
hand. Anyway, maybe it's worth exploring. To me it seems to muddy the waters
for what core.async seems intended to provide, which seems to me t
Congrats and thanks to all those who contributed!
On Friday, March 1, 2013 7:56:58 AM UTC-8, stuart@gmail.com wrote:
>
> We are pleased to announce the release of Clojure 1.5.
>
> Getting Clojure:
>
> Web: http://clojure.org/downloads
> Lein/Maven: :dependencies [[org.clojur
Gambit Scheme especially has a great interface to C/C++/Objective-C. I've
been happily using Gambit quite a bit for 20+ years, when it originated as
gambit-68k for the Motorola 68000.
Gambit-C's been ported to iOS, Nintendo DS, etc.
In addition to the great C interface, it also has a great Unix
Cassowary seems like a good summer-sized project. My only concern is that
browsers are already gaining fairly expressive constraint-based layout.
A project that would extend beyond a summer, but move clojure to the forefront
of UI development (and by "forefront" I mean "up to early 1990s state o
90s-state-of-the-art more
> accessible, similar to how core.logic introduced so many folks to
> logic programming even though Prolog has been around for ages.
>
>
>
>
>
>
> On Apr 6, 7:13 pm, Patrick Logan wrote:
> > Cassowary seems like a good summer-sized proje
I am unsure whether you are writing about STM in general or in Clojure
specifically.
I worked for Gemstone Systems for five years on the object engine as well
as applications of the distributed, multi-user, garbage-collected STM that
is the centerpiece of Gemstone Smalltalk. During that time I
Paul,
Another concurrency model I've used a great deal is the tuplespace model,
specifically javaspaces. This is an often forgotten model that has a lot to
offer with a high expressiveness to complexity ratio.
Not closure specific, so feel free to contact me again directly if you're
interested
I've used javaspaces a fair bit in high-flexibility situations, although
not in a truly high-scale situation. I am aware of truly high-scale
implementations. Just be careful extrapolating from one case to another.
Contact the apache river folks for detailed reports of javaspaces in
high-scale..
://river.apache.org/
You can also contact the gigaspaces commercial effort, where they are very
willing to talk: http://www.gigaspaces.com/
On Thursday, December 13, 2012 9:51:50 PM UTC-8, Paul Butcher wrote:
>
> On 14 Dec 2012, at 00:22, Patrick Logan >
> wrote:
>
> Another concurrency
>From what I can tell, dojo is testing an argument to see whether it has a
method named "call". dojo seems to be assuming that if such a method
exists, then the argument will not be a string.
Then clojurescript seems to be assigning a function named "call" to the
String prototype. And so these
f/when we
> get proper Keywords/Symbol types.
>
> David
>
>
> On Sat, Dec 29, 2012 at 8:46 PM, Patrick Logan
>
> > wrote:
>
>> From what I can tell, dojo is testing an argument to see whether it has a
>> method named "call". dojo seems to be a
I don't want to bog the list down with my javascript naivete, but the full
fix to dojo/on.js is something like this:
if (type.call && !(((typeof type) === "string") || (type instanceof
String))){...
On Wednesday, November 28, 2012 9:15:11 PM UTC-8, Brian Nelson wrote:
>
> ok. I've had
46 matches
Mail list logo