Giter VIP home page Giter VIP logo

clojure.core's People

Contributors

jjunior130 avatar kevbuchanan avatar mylesmegyesi avatar patrickgombert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

clojure.core's Issues

Persistent Hash Map & Integers

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.

Consider refactoring away most namespaces

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:

  • I really don't like the big amount of namespaces that are getting created, there's no point to them, I'd propose grouping all the protocols from each on their own namespace to all the namespaces in a 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)
  • The current way of creating partial/extensible reimplementations for deftypes looks horrible (sorry :)). I've been down the road of reimplementing the clojure corelib before deciding to focus on the reader/compiler and I wrote neurotic for this purpose, you can see an example of how to define partial implementations reusable in deftypes here and how to actually use it in a deftype here.

What do you think?

Count with TransientHashMap

(require '[clojure.next :as n])
(n/count (n/persistent! (n/dissoc! (n/transient (n/hash-map :x :x)) :x)))
; => 1

Seq equality is broken for seqables

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

Remove platform macros

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.

Travis Build

It would be nice to have a TravisCI build on each PR

Clojure CLR

Use Clojure CLR as a way to tease out what is platform specific and what is not.

LazySeq realization

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.