mylesmegyesi / clojure.core Goto Github PK
View Code? Open in Web Editor NEWA host agnostic implementation of clojure.core
License: Eclipse Public License 1.0
A host agnostic implementation of clojure.core
License: Eclipse Public License 1.0
The current implementation defines -equivalent?
on the IEquivalence
protocol. However, clojure uses ==
only for numbers and will throw a type error without Number
s as arguments.
https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L1059
Persistent Hash Map is very reliant on integer math, and you'll see things like this where integers are added together in clojure. Unfortunately, this implementation relies on +
which is currently defined in next. The type output of +
when adding integers is Long
.
This means that we need a solution for type preserving math operations or something.
Hi,
I've been watching the activity on this repo hoping that one day this could be made into another piace in the tools.reader/tools.analyzer[.jvm]/tools.emitter group of libraries that will help towards a CinC implementation, I like the way this library is going and I am considering starting to contribute when I'll have some free time.
I have a couple of complains though:
clojure.lang.protocols
namespace and all the "wrapping" namespaces in a clojure.core'
namespace (e.g get rid of namespaces clojure.lang.deref
or clojure.lang.map-entry
)What do you think?
(require '[clojure.next :as n])
(n/count (n/persistent! (n/dissoc! (n/transient (n/hash-map :x :x)) :x)))
; => 1
when checking equality on an array seq (which uses aseq/seq-equal?) with a seqable (in this a vector) it claims that they are not equal
(require '[clojure.next :as n])
(n/= (n/seq (n/to-array (n/vector 1 2 3))) (n/vector 1 2 3))
; => false
(n/= (n/seq (n/to-array (n/vector 1 2 3))) (n/seq (n/vector 1 2 3))))
; => true
This is a deviation from clojure
(= (seq (to-array (vector 1 2 3))) (vector 1 2 3))
; => true
Type hinting functions (when appropriate) is much faster than using macros so we should use a type hint when it conforms with existing clojure behavior.
It would be nice to have a TravisCI build on each PR
Use Clojure CLR as a way to tease out what is platform specific and what is not.
We are using a running length value https://github.com/mylesmegyesi/clojure.core/blob/master/src/clj/clojure/lang/persistent_vector.clj#L23
This should instead be a calculated value https://github.com/clojure/clojure/blob/clojure-1.6.0/src/jvm/clojure/lang/PersistentVector.java#L340
it causes the count
branch for IPersistentCollection
to fail.
The following does not repeat infinitely and will recurse infinitely
(defn repeat
([x] (lazy-seq (cons x (repeat x))))
([n x] (take n (repeat x))))
but the following does
(defn repeatedly-true []
(test-seqable '(true (lazy-seq (repeatedly-true)))))
it seems like there is an issue in the realization of lazy seqs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.